Cooperative multitasking

From Wikipedia, the free encyclopedia
  (Redirected from Nonpreemptive multitasking)
Jump to: navigation, search

Cooperative multitasking (also non-preemptive multitasking) is a style of computer multitasking in which the operating system never initiates a context switch from a running process to another process. Instead, processes voluntarily release control periodically or when idle in order to enable multiple applications to be run simultaneously. This type of multitasking is called "cooperative" because all programs must cooperate for the entire scheduling scheme to work. In this scheme, the process scheduler of an operating system is known as a cooperative scheduler, having its role reduced down to starting the processes and letting them return control back to it voluntarily.[1][2]

Although it is rarely used in modern larger systems except for specific applications such as CICS or the JES2 subsystem, cooperative multitasking was the primary scheduling scheme for 16-bit applications employed by Microsoft Windows before Windows 95 and Windows NT, and by Mac OS before OS X. Windows 9x used non-preemptive multitasking for 16-bit legacy applications, as the PowerPC versions of Mac OS X prior to Leopard used it for classic applications.[1] NetWare, which is a network-oriented operating system, used cooperative multitasking up to NetWare 6.5. Cooperative multitasking is still used on RISC OS systems.[3]

As a cooperatively multitasked system relies on each process regularly giving up time to other processes on the system, one poorly designed program can consume all of the CPU time for itself, either by performing extensive calculations or by busy waiting; both would cause the whole system to hang. In a server environment, this is a hazard that makes the entire environment unacceptably fragile.[1] However, cooperative multitasking allows much simpler implementation of applications because their execution is never unexpectedly interrupted by the process scheduled; for example, various functions inside the application do not need to be reentrant.[2]

In contrast, preemptive multitasking interrupts applications and gives control to other processes outside of the application's control.


  1. ^ a b c "Definition of non-preemptive multitasking". Retrieved August 15, 2015. 
  2. ^ a b Joe Bartel (November 5, 2011). "Non-Preemptive Multitasking" (PDF). Retrieved August 15, 2015. 
  3. ^ "Preemptive multitasking". November 2, 2009. Retrieved August 15, 2015.