the time quantum
Think of a shared video-game console at a party with a kitchen timer: each player gets the controller until the timer dings, then must pass it on. The time quantum (or time slice) is that timer setting for the CPU — the maximum length of time a process is allowed to run before round-robin preempts it and moves on to the next ready process.
How it works in detail: when the dispatcher hands the CPU to a process, it also arms a hardware timer for q milliseconds. If the process voluntarily blocks or finishes before q elapses, fine — the next process starts early. But if q expires while the process is still running, the timer fires an interrupt, the kernel preempts the process, puts it at the back of the ready queue, and dispatches the next one. So the quantum is the knob that converts the CPU into time-shared slices.
Why it is the heart of round-robin: the quantum sets a direct trade-off. Make it very large and a process almost always finishes its burst within one slice, so round-robin behaves just like first-come-first-served, and the convoy effect comes back. Make it very small and you switch constantly; since each switch costs dispatch latency, a tiny quantum wastes a big fraction of the CPU on overhead instead of useful work — a kind of thrashing on context switches. A common rule of thumb is to pick q so that the great majority of CPU bursts finish within a single quantum, while q still stays comfortably larger than the cost of one context switch.
Quantum 100 ms: most short bursts finish in one slice, switching is rare — but a long job hogs 100 ms at a stretch, edging toward FCFS. Quantum 1 ms with a 0.1 ms switch cost: you switch every millisecond, so about 10 percent of the CPU is pure overhead, and ten jobs feel sluggish from constant churn.
Too big a quantum behaves like FCFS; too small wastes the CPU on switching — the quantum is the central tuning knob.
There is no universally best quantum; it is tuned per system and workload. The classic guideline: pick it so roughly 80 percent of CPU bursts are shorter than one quantum, while keeping it well above the context-switch cost.