← BYTES
Operating System·Starter·Ref: 14.1.16

What is the difference between preemptive and cooperative multitasking?

Have a question about this video? Mention reference 14.1.16 when you contact us.

a.They are identical scheduling approaches with different names
b.Preemptive multitasking only works on single-core CPUs
c.Cooperative multitasking is always faster than preemptive multitasking
d.In preemptive multitasking, the OS scheduler can forcibly interrupt a running task to give the CPU to another, without that task's cooperation; in cooperative multitasking, each task must voluntarily yield control back to the scheduler on its own, and a misbehaving task that never yields can freeze the entire system
Older/simpler systems used cooperative multitasking, relying on every program to politely yield the CPU periodically -- a single buggy or malicious program that never yields could freeze the whole system. Modern operating systems use preemptive multitasking instead, where the OS scheduler can forcibly interrupt any running task (via a timer interrupt) regardless of whether that task cooperates, guaranteeing fairness and responsiveness even in the presence of a misbehaving program.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES14116#OperatingSystem