Chapter 7

I/O scheduling

Disk-scheduling numericals are path problems before they are timing problems. Write the service order, include the movements required by the selected policy, and then apply the given seek-time model. Mechanical timing below supplies the context needed for I/O scheduling.

7.1 Device service and access time

Past papers · CS 2014–2026 (23 papers): 2 questions, 4 marks

A blocking I/O caller can sleep while other processes execute. For polling, interrupt and DMA interface costs, see the Computer Organization and Architecture handbook.

Sequential transfers need not pay a full seek and half revolution for every block. For a request spanning tracks, use the stated track-switch and layout assumptions. SSDs have no mechanical seek or rotational wait; the head-movement algorithms below model moving-head disks.

7.2 Service order and head movement

Past papers · CS 2014–2026 (23 papers): 5 questions, 9 marks

PolicyNext request / turnaround rule
FCFSService in arrival order
SSTFSelect the request closest to the current head; break ties as stated
SCANService along one direction, reach the disk endpoint, then reverse
LOOKReverse at the furthest outstanding request in that direction
C-SCANService one direction; reach endpoint, return to the opposite endpoint without servicing on return
C-LOOKService one direction; return from the furthest request to the nearest request at the other end

SSTF may starve distant requests when new nearby requests continue to arrive. For a finite queue, stop the movement count when the last required request is served unless the question explicitly asks for a complete sweep.

7.3 A complete path comparison

SCAN includes the endpoint before reversing; LOOK reverses at the last request.SCAN includes the endpoint before reversing; LOOK reverses at the last request.

Last-minute recall

  • Sort a snapshot of requests only when the policy permits it.
  • SSTF re-evaluates distance after each service.
  • State direction before drawing a sweep.
  • Include endpoint and return movements when required.
  • Cylinder distance and seek time are not interchangeable without a model.
  • Queueing delay is additional to device service time.

Revise offline: the whole Operating System handbook as one PDF

50 pages · 2.0 MBFree to read online. Sign in to download the PDF.We save the handbook, version and request time in My downloads. Privacy policy

All chapters · Corrections