LearnViz CompSci
Home / Learn / Operating Systems / Disk Scheduling

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

  1. Requests wait for tracks 95, 10, 70 and 40, with the head at 50.
  2. FCFS follows arrival order and wastes much head movement.
  3. SSTF picks the closest request, risking starvation.
  4. SCAN sweeps one direction serving requests along the way.
  5. 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

How to study this topic

  1. Read the explanation above and restate the definition in your own words.
  2. Open the interactive lesson and answer its mini quiz.
  3. Read the common pitfall, then write a short example that avoids it.
  4. Check your understanding in the Operating Systems quiz, and revisit the topic if you miss a question.

Frequently asked questions

What is Disk Scheduling?
Ordering disk requests such as SCAN to reduce seek time. It belongs to Operating Systems and is an advanced-level topic.
Where do people use Disk Scheduling?
Operating-system I/O schedulers, such as Linux's deadline, CFQ and BFQ, and storage controllers use these ideas for hard disks.
What is the most common mistake with Disk Scheduling?
SSDs have no moving heads, so seek-minimizing schedulers add little, and simple policies like none or noop are used.
What should I learn before this topic?
Start with Journaling File Systems, the topic just before it in Operating Systems.
How can I practice it?
Answer the mini quiz in the interactive lesson, then take the Operating Systems quiz.
Is Disk Scheduling hard to learn?
It is an Advanced topic. Expect to read the explanation more than once and to connect it with earlier topics. Working through a small example by hand helps most.
How long does it take to learn Disk Scheduling?
Most learners can read the explanation and finish the interactive lesson in under an hour. Fluency comes from applying the idea, so plan a few short practice sessions with the quiz.
Which topics are related to Disk Scheduling?
Journaling File Systems, I/O Management, File Allocation Methods are closely connected. The full list is in the related topics section of this page.
What should I study after Disk Scheduling?
Continue with I/O Management, the next topic in Operating Systems.

Related topics