10. Scheduling#

Scheduling is the policy the operating system uses to time multiplexes the CPU between different tasks. A large number of scheduling policies have been developed over the years. Some of these are specialized for particular types of computing systems, while others aim to support more general-purpose systems. We first discuss why scheduling is complicated and the goals scheduling policies are designed to meet, and then review a number of these policies.

Note

Space and time multiplexing: In reality today all computers have many physical CPUs, and the kernel does both space and time multiplexing. Given the existence of caches and NUMA memory, the decision of not only when to run a task but also where (i.e. on which CPU) to run it has profound performance implications. However, we will largly focus on introducing the problem of scheduling from he perspective of a single CPU.