CPU Scheduling
A hundred runnable processes, eight cores. Ready queues, time slices, priority, preemption, fairness, and what a context switch actually saves and restores.
A hundred runnable processes and eight cores forces a decision every few milliseconds — who runs, on which core, for how long, and who waits — and every scheduler is one particular answer to that question.
Run six processes on one to four cores under three textbook policies and watch the convoy effect, starvation and the quantum trade-off appear in the timeline — as an educational model, not a kernel.
A context switch saves one task’s registers and stack pointer, swaps the address space, and restores another’s — a few microseconds of direct work whose real cost is the cold caches and TLB the new task inherits.