Scheduling Queues, Response Time, and Fairness

Compute response and turnaround for a small ready queue and see how time-slice size changes what users experience.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Arrival, first service, and completion measure different times
  2. Time slices let a scheduler share an uncertain workload

Arrival, first service, and completion measure different times

If two jobs arrive at time zero and require five and one time units, running the long job first makes the short one wait until time five and finish at six. Shortest-first order finishes the short one at one and the long one at six. Total CPU work stays six, while average turnaround changes from \(5.5\) to \(3.5\). That choice uses prior knowledge of job length.

Time slices let a scheduler share an uncertain workload

Under round robin, runnable jobs cycle through bounded quanta. A shorter quantum can improve time to first service but increases dispatch frequency. A long-running job receives repeated slices instead of monopolizing a processor. Wakeups, priorities and load imbalance affect actual queueing. Context switches give a cost to choosing another job. Priority inversion describes how a resource dependency can interfere with the order even when priorities are assigned.[1]

References

  1. Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau, Operating Systems: Three Easy Pieces ↩