Definition[]
Multitasking is
“ | [t]he ability of a processing unit to switch rapidly among threads of execution. Multitasking divides processor time among threads as if each thread ran on its own slower processor. These systems allow two or more applications to run at the same time and can provide a greater degree of service to applications than single-tasking operating systems.[1] | ” |
Overview[]
One means by which this is done is with a special signal called aninterrupt, which can periodically cause the computer to stop executing instructions where it was and do something else instead. By remembering where it was executing prior to the interrupt, the computer can return to that task later. If several programs are running "at the same time", then the interrupt generator might be causing several hundred interrupts per second, causing a program switch each time. Since modern computers typically execute instructions several orders of magnitude faster than human perception, it may appear that many programs are running at the same time even though only one is ever executing in any given instant. This method of multitasking is sometimes termed "time-sharing" since each program is allocated a "slice" of time in turn.
Before the era of powerful and cheap computers, the principle use for multitasking was to allow many people to share the same computer.
Seemingly, multitasking would cause a computer that is switching between several programs to run more slowly - in direct proportion to the number of programs it is running. However, most programs spend much of their time waiting for slow input/output devices to complete their tasks. If a program is waiting for the user to click on the mouse or press a key on the keyboard, then it will not take a "time slice" until the event it is waiting for has occurred. This frees up time for other programs to execute so that many programs may run at the same time without unacceptable speed loss.
References[]
This page uses Creative Commons Licensed content from Wikipedia (view authors). |