The full picture
- Vocabulary to deploy precisely: turnaround time (submit→finish), response time (submit→first output), waiting time (time in ready queue), quantum/time slice, CPU-bound vs I/O-bound tasks.
- The key behavioral insight: I/O-bound tasks use tiny CPU bursts then block — good schedulers effectively favor them (they yield early, they get dispatched quickly), keeping disks/NICs busy and interactivity snappy.
- Preemptive vs cooperative: the timer interrupt is the OS's insurance policy against
while(true). Cooperative scheduling survives today inside runtimes — event loops (Node, Netty) are cooperative, which is exactly why one blocking call on an event loop is a production incident. - Where you meet this as a backend engineer: p99 latency under load is a scheduling story — run-queue depth (
load averagebeyond core count) means requests are waiting for CPU, not working.