CS 3733 Operating Systems Notes: Disk Head Scheduling Algorithms
This material is taken from Silberschatz, section 14.2, pp 492-498 of the 6th
edition or section 12.4, pp 456-462 of the 7th edition.
- Recall that a disk drive consists of a number of platters, each having one
or two surfaces.
- Each surface is divided into tracks and each track is divided into
sectors.
- The drive has one head per surface and the heads move together.
- For a given position of the heads, the collection of sectors that can be
accessed is called a cylinder.
- There are three parts to accessing a sector on the disk:
- Move the head to the appropriate cylinder - seek time
- Wait for the desired sector to rotate under the head -
rotational latency
- Transfer the data - transfer time
- Since I/O is slow, disk operations are usually queued.
- Example from book:
     queued requests to cylinders:
98, 183, 37, 122, 14, 124, 65, 67
- In what order should these accesses be made?
- FCFS: first-come, first-served
- SSTF: shortest seek time first
- SCAN and LOOK: move the head in one direction.
when you get to the end, turn around a look again going back.
With SCAN, move all of the way to the end (first or last cylinder).
With LOOK, change directions if there are no more references
in the current direction.
- C-SCAN and C-LOOK: This is a modification of SCAN or LOOK in which
references are only picked up as the head moves in one direction.
When done with that direction, move the head quickly back to the
other end and start looking again.
This algorithm is more fair than SCAN or LOOK.
A simulator
As in the process scheduling simulator, perform experiments consisting of
runs.
Look at the simulator running the above problem
here.