Advanced Topic 40 of 51 Operating Systems
Disk Scheduling
Ordering disk requests such as SCAN to reduce seek time.
How it works
Disk scheduling orders pending read and write requests to reduce the time the head spends seeking on a hard drive. Algorithms include FCFS, shortest seek time first, SCAN or elevator, which sweeps from one end to the other servicing requests, C-SCAN, which returns without servicing, and LOOK variants. Fairness and starvation are traded against total head movement.
Step-by-step walkthrough
- Requests wait for tracks 95, 10, 70 and 40, with the head at 50.
- FCFS follows arrival order and wastes much head movement.
- SSTF picks the closest request, risking starvation.
- SCAN sweeps one direction serving requests along the way.
- It then reverses, giving fair service with less seeking.
Where it is used
Operating-system I/O schedulers, such as Linux's deadline, CFQ and BFQ, and storage controllers use these ideas for hard disks. They matter for databases and servers under heavy random I/O.
Common pitfall
SSDs have no moving heads, so seek-minimizing schedulers add little, and simple policies like none or noop are used. SSTF can starve distant requests. Ignoring request deadlines leads to latency spikes. Measure real workloads, because merged and sorted requests change patterns.
Where it fits in the course
Disk Scheduling is topic 40 of 51 in Operating Systems, rated Advanced. It follows Journaling File Systems. The next topic is I/O Management.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Operating Systems quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Operating Systems quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Disk Scheduling?
Where do people use Disk Scheduling?
What is the most common mistake with Disk Scheduling?
What should I learn before this topic?
How can I practice it?
Is Disk Scheduling hard to learn?
How long does it take to learn Disk Scheduling?
Which topics are related to Disk Scheduling?
What should I study after Disk Scheduling?
Related topics
- Journaling File Systems (Operating Systems)
- I/O Management (Operating Systems)
- File Allocation Methods (Operating Systems)
- Device Drivers (Operating Systems)
- Real-Time Constraints and Scheduling (Mobile, Embedded & IoT)