Skip to main content

Disk Scheduling Algorithms in Operating Systems

Disk Scheduling Algorithms

Disk Scheduling is one of the most important topics in Operating Systems. It determines the order in which disk I/O requests are processed. Since disk access time is much slower compared to RAM, efficient scheduling improves overall system performance significantly.

1. Why Disk Scheduling is Needed

A disk drive contains multiple tracks and sectors. When multiple processes request disk access, the disk arm (read/write head) must move to different track positions.

This movement is called Seek Time, and it is the most time-consuming part of disk access.

Goal of Disk Scheduling:

  • Minimize seek time
  • Maximize throughput
  • Reduce waiting time
  • Ensure fairness

2. Components of Disk Access Time

  • Seek Time – Time to move head to correct track
  • Rotational Latency – Time for sector to rotate under head
  • Transfer Time – Time to transfer data

Disk scheduling mainly focuses on reducing seek time.

3. FCFS (First Come First Serve)

FCFS processes requests in the order they arrive.

Example:

Request Queue: 98, 183, 37, 122, 14, 124, 65, 67 Initial Head Position: 53

The head moves sequentially according to request order.

Advantages

  • Simple
  • Fair

Disadvantages

  • High average seek time
  • Poor performance

4. SSTF (Shortest Seek Time First)

SSTF selects the request closest to current head position.

Advantages

  • Reduced seek time
  • Better than FCFS

Disadvantages

  • May cause starvation
  • Not fully fair

5. SCAN (Elevator Algorithm)

SCAN moves the disk arm in one direction servicing requests until it reaches the end, then reverses direction.

It works like an elevator.

Advantages

  • Better performance
  • Prevents starvation

6. C-SCAN (Circular SCAN)

C-SCAN moves in one direction only. After reaching the end, it jumps back to beginning without servicing requests on return.

Advantages

  • Uniform waiting time
  • Fairer than SCAN

7. LOOK Algorithm

LOOK is similar to SCAN but stops at last request instead of going to disk end.

Improves efficiency by avoiding unnecessary movement.


8. C-LOOK Algorithm

C-LOOK is similar to C-SCAN but only moves as far as last request before jumping.

9. Comparison Table

Algorithm Seek Time Starvation Fairness
FCFS High No High
SSTF Low Yes Medium
SCAN Low No Good
C-SCAN Low No Very Good
LOOK Lower No Good
C-LOOK Lower No Very Good

10. Numerical Example (Exam Focused)

Request Queue: 176, 79, 34, 60, 92, 11, 41, 114 Initial Head Position: 50

Students are commonly asked to calculate total head movement using different algorithms. Practice solving using FCFS, SSTF, SCAN and C-SCAN.

11. Which Algorithm is Best?

  • FCFS → Simple but inefficient
  • SSTF → Good but risk of starvation
  • SCAN → Balanced performance
  • C-SCAN → Most uniform waiting time
  • LOOK / C-LOOK → Most efficient practical variants

12. Real-World Relevance

Modern SSDs reduce mechanical seek time, but disk scheduling remains important in HDD-based systems and theoretical OS studies.

Conclusion

Disk Scheduling Algorithms play a critical role in improving I/O performance in Operating Systems. By minimizing seek time and optimizing request order, they significantly enhance system efficiency.

Understanding FCFS, SSTF, SCAN, C-SCAN, LOOK and C-LOOK is essential for:

  • Operating System exams
  • Technical interviews
  • System-level programming


Frequently Asked Questions (FAQs)

What is disk scheduling in OS?

Disk scheduling determines the order in which disk I/O requests are serviced.

Which disk scheduling algorithm is best?

LOOK and C-LOOK are generally most efficient, while C-SCAN provides uniform waiting time.

What is seek time?

Seek time is the time required for the disk head to move to the required track.

Comments

Popular posts from this blog

A Comparative Study of Deep Learning Architectures for Chest X-Ray Image Classification

Comparative Analysis of Deep Learning Models for Chest X-Ray Image Classification Author: Akrash Noor, Saba Latif & Hifzun Nisa | Published: December 21, 2025 | Category: AI · Medical Imaging · Deep Learning Introduction Medical imaging has become an important aspect in the contemporary healthcare and especially the diagnosis of thoracic diseases utilizing the images of chest X-ray. In recent years, artificial intelligence has advanced significantly, and convolutional neural networks that are based on deep learning have demonstrated impressive results in the domain of automated disease detection and classification. This paper compares and contrasts several deep learning models that are trained on chest X-ray data with PyTorch and TensorFlow in their accuracy, generalization, and computational efficiency. Deep Learning Models Used Custom Convolutional Neural Networks (CNN) ResNet (Residual Networks) DenseNet VGG-styl...

Process vs Threads

Process vs Threads in Operating Systems Process vs Threads in Operating Systems Operating System Course Article Introduction An operating system is responsible for managing system resources and ensuring that multiple programs run efficiently at the same time. Modern systems perform multitasking by executing several activities concurrently. To achieve this, operating systems rely on two fundamental execution units: processes and threads . Although both represent executing tasks, processes and threads differ in memory usage, execution speed, communication methods, and reliability. Understanding these differences is essential for learning CPU scheduling, concurrency, and parallelism. What is a Process? A process is a program that is cur...

AI-Driven Protein Designer for Cancer Therapy

Deep Learning Based Protein Design for Targeted Cancer Treatment Author: Akrash Noor & Saba  | Published: September 10, 2025 | Category: AI, Bioinformatics, Cancer Therapy This article presents a mathematical and computational overview of an AI-driven protein design framework for cancer therapy . It explains how artificial intelligence can assist in designing novel proteins that selectively target cancer-related biomarkers. 1. Protein Sequence Representation A protein can be represented as a sequence of amino acids: P = (a₁, a₂, a₃, …, aₙ), aᵢ ∈ A n is the length of the protein A represents the 20 standard amino acids Each amino acid is converted into a numerical vector using encoding techniques such as one-hot encoding or learned embeddings: aᵢ → xᵢ ∈ ℝᵈ 2. AI-Based De Novo Protein Generation Protein design is treated as a sequence generation problem: P* = arg max P p(P...