= Time slice
A <time slice> is an interval of <CPU> time that a scheduler allows a runnable <operating-system process> or thread before it may preempt it to serve another. In <round-robin scheduling>, runnable tasks take repeated turns using a <scheduling quantum>; a task can block or finish before consuming its whole turn.<Operating Systems: Three Easy Pieces by Remzi H. Arpaci-Dusseau and others>[chapter7, §7.6 Round Robin]{ref}
If three continuously runnable tasks share one <CPU> with quantum $q$ and negligible switching cost, each receives about one third of its time and waits about $2q$ between turns. Shortening $q$ improves responsiveness but increases the frequency of <context switches>. With fixed switching cost $s$ per full turn, the overhead fraction is $s/(q+s)$. This simple model explains the trade-off without assuming that real switching costs or workloads are constant.
Back to article page