Give every process a turn — a slice at a time — so nobody waits forever. Each job runs at most one quantum q, then goes to the tail of the ready queue. The result is bounded response and equal shares, proven here by exhaustive simulation, not asserted.
source · AMBER Corbató, Daggett & Daley, “An Experimental Time-Sharing System” (CTSS), AFIPS Spring Joint Computer Conf., vol. 21, pp. 335–344, 1962. No stable open DOI — cited by author/title/year. Rendered, not quoted.
A ready queue of processes, each with a remaining CPU burst. A fixed time quantum q is the maximum any process runs before the scheduler preempts it and moves it to the queue tail.
Dispatch loop: pop head i → run min(q, rem[i]) → if work remains, push i to tail; else it completes. Repeat until the queue is empty.
Two limits fall out for free: with q ≥ max burst no one is ever preempted → FCFS. As q → 1 the CPU is sliced ever finer → processor sharing. Round-robin lives on the dial between them.
Fair time-slicing — round-robin: the scheduler that gives everyone a turn. It is the preemptive core of the-cron-job, where the clock tick that ends a quantum is the same interrupt that wakes a timer. One rotates the ready queue; the other rotates the wall clock.
Neighbour in THE FOLD: the-cron-job → periodic dispatch on a timer; THE ROUND ROBIN → periodic dispatch on a quantum.
Re-runs the fairness invariant against the engine's current state every time you touch it. Green = n equal jobs each hold exactly 1/n of the CPU over the window. Flips red the instant window 6 tampers with the quantum.
WITNESS · verifying…
Ready set (arrive at t=0, in order):
A=5 B=3 C=6 D=2 (burst units)
Quantum q is yours to turn below. All integers — discrete, exact.
boot…
Round-robin is fair, not fast. Real failure modes it cannot dodge:
Quantum tuning is a trap. Too large → FCFS, short jobs stuck behind long ones. Too small → context-switch overhead dominates and throughput collapses. The sweet spot is workload-dependent and unknowable in advance.
Equal weight ≠ fair. Pure RR gives an I/O-bound job the same slice as a CPU hog, wasting the slices it yields early. Real kernels add priorities/aging (Linux CFS) — plain RR does not.
“Round-robin gives the lowest average waiting time.”
✔ False — SJF does. RR trades average latency for bounded latency and no starvation.
“A smaller quantum is always fairer and better.”
✔ Only fairer per-slice; below the context-switch cost, useful throughput drops toward zero.
“Round-robin needs process burst lengths in advance.”
✔ No — that is SJF. RR is preemptive and needs nothing but the clock.
The disclosed planted void. Sets the quantum to ∞ — the scheduler never preempts, so each job runs to completion (FCFS). A long job at the head then starves the short jobs behind it. Watch the Gantt collapse and the Witness (7) go red.