Part 1 of 7 · 1 min read
Why this page comes second
In this module you will
- Explain why the order of waiting disk requests changes the total arm movement.
- Trace FCFS, SSTF, SCAN, C-SCAN, LOOK and C-LOOK on a queue of cylinder numbers and give the total movement.
- Explain how SSTF can starve a request, and which algorithms avoid it.
- Say which disk schedulers Linux offers, and read the one in use from
/sys. - Explain why a flash disk needs almost no seek-based scheduling.
Page 1 showed that one request on a hard disk is dominated by the seek and the rotation. When many requests wait at once, the OS can choose which to serve next. This page shows how that choice changes the arm movement. Page 3 shows why flash disks changed the question, and Level 9 builds file systems that try to avoid the problem by placing related data close together.
About this example About this example
Real: The simulator in section 2 was compiled with gcc -Wall -Wextra and run on a Linux test machine (2 processors, kernel 6.18). The scheduler list in section 5 was read from /sys/block/vda/queue/scheduler on that machine.
Scripted: The queue of cylinder numbers and the cost of 0.05 ms per cylinder are made up to show the idea. Real seek time is not linear in distance.
Not real: The model counts only arm movement. It ignores rotational delay, the head switch, requests that arrive during the run, and the queue inside the drive itself.