CSE Roadmap

Core tier · about 4 hours · 6 parts

Part 1 of 6 · 1 min read

Why this page comes third

In this module you will

  • Trace round robin for any time quantum, with the rule for ties.
  • Compute turnaround, waiting and response time under round robin.
  • Show how the quantum changes response time, turnaround time and switch overhead.
  • Compute the share of time lost to context switches for a given quantum.
  • Measure the time slice and the wait of a process on a real Linux system.

Page 2 ended with a problem: shortest-first policies need burst lengths and can starve long jobs. Round robin needs no prediction and starves nobody, because it simply gives each ready process a turn of fixed length. It is the base of nearly every general-purpose scheduler, and it explains why interactive programs feel quick even when the machine is busy. The sources are "Operating Systems: Three Easy Pieces" (OSTEP), chapter 7, "Operating System Concepts" (OSC), chapter 5, and "Modern Operating Systems" (MOS), chapter 2. The measurements come from a two-processor Linux machine.

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.