Ch 8 · Scheduling & Memory Management (A Level) · Theory
Topic 8 of 9 in System Software & the Toolchain — What Runs Your Programs — 4 lessons.
Sharing One CPU Fairly
When many processes are ready but there's one CPU, the OS scheduler decides who runs next and for how long. A good schedule keeps the CPU busy, responds quickly to users, and treats processes fairly. Several algorithms make that trade-off differently.
Scheduling Algorithms
Round robin is what makes a single-core machine *feel* like it runs everything at once.
Round Robin in Action
This runs three processes with a time slice of 2, rotating until each finishes — exactly how RR shares the CPU.
Virtual Memory & Paging
When programs need more memory than the physical RAM, the OS uses virtual memory: it splits memory into fixed-size pages and moves pages it isn't using out to disk, bringing them back on demand.