To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

Cooperative multitasking

From Wikipedia, the free encyclopedia

Cooperative multitasking, also known as 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, in order to run multiple applications concurrently, processes voluntarily yield control periodically or when idle or logically blocked. This type of multitasking is called cooperative because all programs must cooperate for the scheduling scheme to work.

In this scheme, the process scheduler of an operating system is known as a cooperative scheduler whose role is limited to starting the processes and letting them return control back to it voluntarily.[1][2]

This is related to the asynchronous programming approach.

YouTube Encyclopedic

  • 1/3
    Views:
    2 110
    185 767
    953
  • Oli Evans: A bluffers guide to cooperative multitasking -- Devshop London March 2015
  • Multitasking Operating Systems as Fast As Possible
  • Co operative Multitasking Operating System AMIE

Transcription

Usage

Although it is rarely used as the primary scheduling mechanism in modern operating systems, it is widely used in memory-constrained embedded systems and also, in 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 the classic Mac OS. Windows 9x used non-preemptive multitasking for 16-bit legacy applications, and 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]

Cooperative multitasking is similar to async/await in languages, such as JavaScript or Python, that feature a single-threaded event-loop in their runtime. This contrasts with cooperative multitasking in that await cannot be invoked from a non-async function, but only an async function, which is a kind of coroutine.[4][5]

Cooperative multitasking allows much simpler implementation of applications because their execution is never unexpectedly interrupted by the process scheduler; for example, various functions inside the application do not need to be reentrant.[2]

Problems

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 is often considered to make the entire environment unacceptably fragile,[1] though, as noted above, cooperative multitasking has been used frequently in server environments including NetWare and CICS.

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

The potential for system hang can be alleviated by using a watchdog timer, often implemented in hardware; this typically invokes a hardware reset.

References

  1. ^ a b c "Definition of non-preemptive multitasking". pcmag.com. Retrieved August 15, 2015.
  2. ^ a b Joe Bartel (November 5, 2011). "Non-Preemptive Multitasking" (PDF). classiccmp.org. Archived from the original (PDF) on August 19, 2019. Retrieved August 15, 2015.
  3. ^ "Preemptive multitasking". riscos.info. November 2, 2009. Retrieved August 15, 2015.
  4. ^ Kerkour, Sylvain (January 25, 2022). "Async Rust: Cooperative vs Preemptive scheduling". Retrieved January 30, 2023.
  5. ^ Skvortsov, Victor. "Python behind the scenes #12: How async/await works in Python". Retrieved January 30, 2023.
This page was last edited on 31 January 2024, at 16:15
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.