In computing, cooperative multitasking (or non-preemptive multitasking) is a form of multitasking in which multiple tasks execute by voluntarily ceding control to other tasks at programmer-defined points within each task. Operating systems such as Microsoft Windows prior to Windows 3.01, and Mac OS prior to Mac OS X relied on this approach to execute multiple programs simultaneously. While its usage in modern computing is on the wane, RISC OS is an example of an operating system which still retains this method.
Cooperative multitasking has the advantage of making the operating system design much simpler, but it also makes it less stable because a poorly designed application may not cooperate well. Preemptive multitasking, on the other hand, puts the onus on the programmer to notify the system of sections of code where the application must not be pre-empted.
Note 1: In Windows/386, released 1987, it was possible to have two or more DOS applications running simultaneously in separate DOS boxes, under preemptive multitasking, but Windows applications had to run under cooperative multitasking.
Under "cooperativemultitasking" the running task decides when to give up the CPU and under "pre-emptive multitasking" (probably more common) a system process called the "scheduler" suspends the currently running task after it has run for a fixed period known as a "time-slice".
Multitasking introduces overheads because the processor spends some time in choosing the next job to run and in saving and restoring tasks' state, but it reduces the worst-case time from job submission to completion compared with a simple batch system where each job must finish before the next one starts.
Multitasking also means that while one task is waiting for some external event, the CPU to do useful work on other tasks.
Share your thoughts, questions and commentary here
Want to know more? Search encyclopedia, statistics and forums:
Press Releases |
The Wikipedia article included on this page is licensed under the
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms, 1022, m