by Dinesh Thakur

Multitasking is a logical extension of multiprogramming system that supports multiple programs to run concurrently. In multitasking more than one task are executed at the same time. In this technique the multiple tasks, also known as processes, share common processing resources such as a CPU. In the case of a computer with single CPU, only one job can be processed at a time. Multitasking solves the problem by scheduling and deciding which task should be the running task and when a waiting task should get turn. This attempt is done with the help of interrupt (a signal) which is attended by CPU by keeping the current activity aside, saves its present status in buffer and returns to another important job whatever task it was doing earlier. The act of re-assigning a CPU from one task to another one is known as context switch.

The multitasking systems were developed to provide interactive use of a computer system. This system uses the CPU scheduling and multiprogramming to provide each user with a small portion of a time-shared computer. Thus multitasking makes the best possible use of available hardware at any given instance of time and improves the overall efficiency of computer system. A multi-tasking operating system is characterized by its capability to support the concurrent execution of more than one task. This is achieved by simultaneous management of several processes in the main memory at the same time and by availing I/O resources amongst the active tasks. The multi-tasking OS monitors the state of all the tasks and of the system resources.

Multitasking provides the fundamental mechanism for an application to control and react to multiple, discrete real-world events and is therefore essential for many real-time applications. A multitasking environment allows applications to be constructed as a set of independent tasks, each with a separate thread of execution and its own set of system resources. The inter-task communication facilities allow these tasks to synchronize and coordinate their activity. Multitasking creates the appearance of many threads of execution running concurrently when, in fact, the kernel interleaves their execution on the basis of a scheduling algorithm. This also leads to efficient utilization of the CPU time and is essential for many embedded applications where processors are limited in computing speed due to cost, power, silicon area and other constraints. In a multi-tasking operating system, it is assumed that the various tasks are to cooperate to serve the requirements of the overall system Co-operation will require that the tasks communicate with each other and share common data in an orderly and disciplined manner, without creating the contention and deadlocks.