Multitasking

Thanoshan MV
2 min readJul 23, 2020

--

Photo by Bailey Torres on Unsplash

Multitasking refers to the execution of multiple tasks simultaneously. Tasks can be programs, processes, and threads. For example, we can play songs on Windows Media Player and edit documents in Microsoft Word simultaneously. Multitasking systems are known as time sharing systems.

This concept is for single CPU (single processor).

Multitasking is the logical extension of multi programming. Multi programming is based on context switching while multitasking is based on context switching and time sharing (time slicing).

Multitasking system executes process on CPU with a timer. Once that timer has finished, it interrupts the current process and switches the process.

Each process executes on CPU until time slice expires or it requires I/O.

Since we have timer, context switching occurs very frequently. So, it seems like multiple tasks/ processes are executing simultaneously to the user but actually processor executes a process at a time.

Advantages of Multitasking

  1. Maximize CPU utilization.
  2. Increased responsiveness of tasks: with the help of timer, CPU executes different processes frequently. Hence, tasks will be more responsive than in multi programming system.

--

--