Part 1 of 6 · 1 min read
Why this page comes first
In this module you will
- Describe a process as a loop of CPU bursts and waits for input or output.
- Say when the scheduler runs and what the dispatcher does.
- Tell preemptive scheduling from non-preemptive scheduling.
- Compute turnaround time, waiting time and response time from a table of arrival and finish times.
- Explain why no single policy is best on every measure.
Levels 1 and 2 showed how processes and threads are created and how they switch. This level asks the question those levels left open: with many threads ready and only a few processors, which one runs next, and for how long? This page gives the vocabulary and the measures. Pages 2 to 5 cover the policies, page 6 covers several processors and deadlines, and page 7 returns to Linux. The main sources are "Operating Systems: Three Easy Pieces" (OSTEP), chapters 7 and 8, "Operating System Concepts" (OSC), chapter 5, and "Modern Operating Systems" (MOS), chapter 2. Measurements were made on a two-processor Linux machine, kernel 6.18.
About this example About this example
Real: The facts, definitions and algorithms on this page come from the books named in the text. No program on this page was timed.
Scripted: Numbers marked "made up to show the idea" were chosen for the examples.
Not real: The page simplifies real systems. Actual kernels add more cases, limits and tuning than a short page can show.