...

/

Cooperative Multitasking

Cooperative Multitasking

You will be introduced to cooperative multitasking in this lesson.

Cooperative multitasking

Unlike operating system threads, which are paused (suspended) and resumed by the operating system at unknown points in time, a fiber pauses itself explicitly and is resumed by its caller explicitly. According to this distinction, the kind of multitasking that the operating system provides is called preemptive multitasking and the kind that fibers provide is called cooperative multitasking.

Preemptive multitasking

In preemptive multitasking, the operating system allots a certain amount of time to a thread when it starts or resumes its ...