Disk Scheduling Algorithms to Know for Operating Systems

Disk scheduling algorithms manage how disk requests are processed in operating systems. They aim to optimize efficiency and minimize wait times while balancing fairness among requests. Understanding these algorithms helps improve overall system performance and user experience.

  1. First-Come, First-Served (FCFS)

    • Processes disk requests in the order they arrive, without prioritization.
    • Simple to implement and understand, as it follows a straightforward queue model.
    • Can lead to the "convoy effect," where shorter requests wait for longer ones, causing inefficiency.
    • Fair in terms of request handling, as every request gets equal treatment.
    • Performance can degrade significantly under heavy load due to increased average wait time.
  2. Shortest Seek Time First (SSTF)

    • Selects the disk request that is closest to the current head position, minimizing seek time.
    • Reduces average wait time compared to FCFS, making it more efficient for random access patterns.
    • Can lead to starvation, where far-off requests may be delayed indefinitely if closer requests keep arriving.
    • More complex to implement than FCFS due to the need for calculating distances.
    • Balances efficiency and fairness but may still favor requests that are frequently accessed.
  3. SCAN (Elevator) Algorithm

    • Moves the disk arm in one direction, servicing requests until it reaches the end, then reverses direction.
    • Mimics an elevator system, reducing the overall seek time by servicing requests in a linear fashion.
    • Provides a more uniform wait time for requests compared to FCFS and SSTF.
    • Can still experience starvation for requests that are at the ends of the disk.
    • Effective for systems with a high volume of requests, as it reduces the back-and-forth movement of the disk arm.
  4. C-SCAN (Circular SCAN)

    • Similar to SCAN, but when the disk arm reaches the end, it jumps back to the beginning without servicing requests on the return trip.
    • Ensures a more uniform wait time for all requests, as it treats the disk as circular.
    • Reduces the maximum wait time for requests, especially those at the beginning of the disk.
    • Can be more efficient in systems with a high number of requests spread across the disk.
    • Still susceptible to starvation, but less so than SCAN due to its circular nature.
  5. LOOK Algorithm

    • A variation of SCAN that only services requests in the direction of the current head movement until there are no more requests.
    • Reduces unnecessary movement of the disk arm, improving efficiency.
    • Provides better average wait times compared to SCAN by not moving to the end of the disk if there are no requests.
    • Can still lead to starvation for requests that are not in the immediate path of the head.
    • Balances efficiency and fairness, making it suitable for many operating systems.
  6. C-LOOK Algorithm

    • A variation of C-SCAN that only services requests in the direction of the head movement and jumps back to the start when it reaches the last request.
    • Minimizes the seek time and provides a more uniform wait time for all requests.
    • Reduces unnecessary movement, making it more efficient than traditional SCAN and C-SCAN.
    • Ensures that all requests are eventually serviced, reducing the risk of starvation.
    • Particularly effective in environments with a high volume of disk requests.


© 2024 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.

© 2024 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.