While I’m on this topic, I’ll go ahead and take a brief moment to explain preemptive multitasking versus cooperative multitasking. Back in the bad old days, which wasn’t so long ago for Mac users, the OS relied on each program to give up voluntarily the CPU after its time slice was up. This scheme was called “cooperative multitasking” because it relied on the running programs to cooperate with each other and with the OS in order to share the CPU among themselves in a fair and equitable manner. Sure, there was a designated time slice in which each program was supposed to execute, and but the rules weren’t strictly enforced by the OS. In the end, we all know what happens when you rely on people and industries to regulate themselves–you wind up with a small number of ill-behaved parties who don’t play by the rules and who make things miserable for everyone else. In cooperative multitasking systems, some programs would monopolize the CPU and not let it go, with the result that the whole system would grind to a halt.
Preemptive multi-tasking, in contrast, strictly enforces the rules and kicks each program off the CPU once its time slice is up. Coupled with preemptive multi-tasking is memory protection, which means that the OS also makes sure that each program uses the memory space allocated to it and it alone. In a modern, preemptively multi-tasked and protected memory OS each program is walled off from the others so that it believes it’s the only program on the system.
Related posts:




















