Time-sharing operating system 2026-11-05
A time-sharing operating system multiplexes processor time among interactive operating-system processes so that each can make progress while sharing one machine. A timer interrupt can end the current time slice, enter the kernel and let Process scheduling select another runnable process. Saving and restoring its Execution context lets the interrupted process later resume where it stopped.
In a simplified round-robin example, four always-runnable processes with10ms time slices each receive a turn every40ms, ignoring switch overhead. A blocked process need not consume its turn. Smaller slices reduce scheduling delay but increase the fraction of time spent switching contexts. Interactive responsiveness therefore depends on both the scheduling policy and workload; merely supporting multiple users does not guarantee a latency bound. The1974 Unix paper describes a concrete time-sharing system organized around protected processes, files and shared system services.[ref]
The UNIX Time-Sharing System by Dennis M. Ritchie and Ken Thompson. process and system-overview sections
Time slice 2026-11-05
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.[ref]
Operating Systems: Three Easy Pieces by Remzi H. Arpaci-Dusseau and others. chapter7, §7.6 Round Robin
If three continuously runnable tasks share one CPU with quantum and negligible switching cost, each receives about one third of its time and waits about between turns. Shortening improves responsiveness but increases the frequency of context switches. With fixed switching cost per full turn, the overhead fraction is . This simple model explains the trade-off without assuming that real switching costs or workloads are constant.