Published: 27 Nov 2025 | Reading Time: 6 min read
Disk scheduling in an operating system (OS) is required to make disk drive operation as efficient as possible. As there is more than one process involved in current systems, all of which attempt to access the disk, disk scheduling algorithms assist in queuing these requests to optimise disk access. Disk scheduling attempts to reduce the time spent by the read/write head of the disk traveling, which improves the overall system performance. The algorithms can lead to less waiting time and an active system.
This article will discuss disk scheduling algorithms in operating systems, types and examples with advantages and disadvantages.
Disk scheduling algorithms control the sequence of disk I/O (input/output) requests being executed. The fundamental concept is to reduce disk arm movement so that it serves all the requests with minimum overhead. Essentially, these algorithms decide the order of operation or the path through which the disk access requests are executed.
Disk scheduling is important because the hard disk is one of the slower devices in the system, particularly relative to the CPU and memory. As a result, effectively managing how and when data is read or written to disk can impact system performance. Disk scheduling prevents these I/O requests from being serviced in a manner that will cause delays and reduce throughput.
Quick Note: Disk scheduling is essential because disk access is slow; optimizing request order significantly improves overall OS performance.
Disk scheduling is a method that deals with how the requests for disk input/output are carried out to achieve the highest performance. The following are the essential terms related to disk scheduling:
Seek time is the time that the disk arm is being moved to the track which has the required data. It is the main factor of disk performance and the most important parameter in the development of disk access.
At rotational latency, the read/write head is waiting for the arrival of the desired sector. In order to reduce the rotational latency to a minimal value, it is necessary to have high disk speeds, which therefore leads to an overall improvement of the disk efficiency and the data-accessing speed.
Transfer time is the time that is taken for the data to be moved to memory after the read/write head is positioned. Generally, it is less than the seek time and the rotational latency.
Disk access time is the sum of time consumed by a disk operation, i.e., seek time, rotational latency, and transfer time. It shows the effectiveness of reading data from a disk.
Disk response time is a request's average wait time to complete its I/O operation. Reduced response times mean superior scheduling and better system performance.
Starvation is when a request has to wait forever because other requests are always serviced with a higher priority. Disk scheduling algorithms prevent starvation by ensuring each request has an equal opportunity.
Key Takeaways So Far:
Several disk scheduling algorithms are designed to optimize different aspects of disk access. Below are some of the most common disc scheduling algorithms:
The FCFS disk scheduling algorithm serves disk access requests based on their arrival time, regardless of their physical location on the disk. The earliest arrived request is served first, making it one of the simplest and easiest-to-implement scheduling algorithms.
We have a disk containing 200 tracks (track 0 to track 199). The request sequence is (60, 150, 25, 130, 80, 10, 190). The disk head's initial position is 50.
In the FCFS (First Come, First Serve) disk scheduling algorithm, the disk arm goes through each request in their arrival order, not moving the head optimally.
Seek time is computed as the sum of the absolute differences of the current disk head position and the target track.
Seek Time = (60−50)+(150−60)+(150−25)+(130−25)+(130−80)+(80−10)+(190−10)
= 10+90+125+105+50+70+180
= 630
Here are the advantages of FCFS disk scheduling:
Here are the disadvantages of FCFS disk scheduling:
Quick Note: FCFS processes requests strictly by arrival order, making it fair but extremely inefficient when requests are physically far apart.
The SSTF disk scheduling algorithm chooses the closest request to the disk arm's current location. The disk arm moves to the closest requested track and, when it completes, moves to the next closest request. SSTF always chooses the closest request and, therefore, minimizes the seek time.
Suppose the same 200-track disk (0-199). The order of requests is: (60, 150, 25, 130, 80, 10, 190). The head's initial position is 50.
In the SSTF algorithm, the disk arm travels to the request nearest to its current position, reducing seek time per move.
Seek Time = (60−50)+(80−60)+(130−80)+(150−130)+(190−150)+(25−190)+(10−25)
= 10+20+50+20+40+165+15
= 320
Here are the advantages of SSTF disk scheduling:
Here are the disadvantages of SSTF disk scheduling:
Key Takeaway: SSTF improves performance but can lead to starvation for far requests.
The SCAN disk scheduling algorithm has the disk arm travel in one direction (either from the innermost track to the outermost track or vice versa), servicing all requests along the way. The arm switches directions at the end of the disk and continues servicing requests in the opposite direction. This technique is also called the elevator algorithm, which was named after the direction the arm moves back and forth.
The same disk with 200 tracks (0-199). The sequence of requests is: (60, 150, 25, 130, 80, 10, 190). The head starts at position 50.
Seek Time = (199−50)+(199−10)
= 149+189
= 338
Key Takeaway: SCAN is efficient but may cause unnecessary movement to the disk ends.
The C-SCAN disk scheduling algorithm is the same as SCAN, with one significant difference: when the disk arm hits the end of the disk, it returns to the beginning without serving any requests in the return direction. It then serves requests in only one direction, which makes the disk arm movement more consistent.
Assume the same disk is divided into 200 tracks (0-199). The request sequence is: (60, 150, 25, 130, 80, 10, 190). The head is currently at location 50.
Seek Time = (199−50)+(199−0)+(43−0)
= 149+199+43
= 391
Bottom Line: C-SCAN offers consistent performance and fairness by preventing priority bias toward middle tracks.
The LOOK disk scheduling algorithm is like SCAN but with one advancement. Unlike SCAN, LOOK never goes to the end of the disk (although there are no requests there). It goes only as far as the farthest request in its direction. After it satisfies the farthest request, it changes direction and begins to satisfy the remaining requests.
Suppose the same disk with 200 tracks (0-199). The sequence of requests is: (60, 150, 25, 130, 80, 10, 190). The head starts at position 50.
Seek Time = (150−50)+(150−10)
= 100+140
= 240
Here are the advantages of LOOK disk scheduling:
Here are the disadvantages of LOOK disk scheduling:
Quick Note: LOOK stops at the last request instead of the disk edge, reducing unnecessary travel and improving efficiency over SCAN.
The C-LOOK (Circular LOOK) disk scheduling algorithm is an enhanced version of the LOOK algorithm. Similar to LOOK, the disk arm travels in one direction to the farthest request. However, rather than traveling to the end of the disk, when it reaches the farthest request, it jumps to the start and continues serving requests in the same direction.
Imagine the same 200-track disc (0-199). The head's initial position is 50. The request sequence is: (60, 150, 25, 130, 80, 10, 190).
The C-LOOK (Circular LOOK) algorithm is the same as LOOK, except that it does not reach the end of the disk while returning. Instead, it jumps back to the last request in the opposite direction after serving the furthest request and continues serving.
The disk arm begins at 50, travels to 150, then jumps to 10, serving all requests in between.
Seek Time = (150−50)+(150−10)+(190−10)
= 100+140+180
= 420
Here are the advantages of C-LOOK disk scheduling:
Here are the disadvantages of C-LOOK disk scheduling:
Bottom Line: C-LOOK combines consistency with minimized travel, making it one of the most efficient scheduling techniques.
In addition to the popular algorithms like SCAN, C-LOOK disk scheduling algorithm, and FCFS, there are a few other disk scheduling methods that provide solutions for different scenarios or system requirements. These methods are mostly significant in the context of random due dates, random processing times, random weights, and situations where the starvation of requests and stochastic machine breakdowns are possible.
Random Scheduling chooses the next I/O request randomly from the disk queue without consideration of the position or arrival time. This method is mainly used for performance evaluation and system simulation in which random processing time or random due dates are the major factors. Although it does not minimize seek time, it can serve as a way to model unpredictable workloads or check system stability.
Last-In First-Out algorithm is the one that performs the I/O operation that has been most recently requested by the user. In this way, it is possible to maximize the locality and resource utilization since the newer requests may be related to each other or be in the same cluster. However, LIFO can lead to the phenomenon of starvation of requests that arrived earlier if new requests continue to come, as older requests may be constantly deferred.
N-STEP SCAN organizes the disk queue into sub-queues or buffers of N requests each. All requests in the current buffer are serviced using the SCAN disk scheduling algorithm, and new requests are held in subsequent buffers until the current one is completed. This method guarantees service for all requests in a buffer and prevents starvation, as every request is eventually processed in its turn.
F-SCAN improves upon N-STEP SCAN by using two sub-queues: one for current requests and one for new arrivals. During each scan, only the requests present in the active queue at the start are serviced, while new requests are added to the secondary queue and held until the next scan. This approach helps prevent the disk arm from getting stuck servicing a continuous stream of new requests and ensures fairness and guaranteed service.
Key Takeaways So Far:
To solidify your understanding of disk scheduling algorithms, let's work through several example problems. These practical scenarios demonstrate how to apply the algorithms and calculate key metrics like seek time.
Scenario: A disk has cylinders numbered from 0 to 199. The disk queue contains I/O requests for the following cylinders in order: 98, 183, 41, 122, 14, 124, 65, 67. The disk head starts at cylinder 53.
Calculate: The total head movement (seek time) incurred while servicing these requests using the FCFS disk scheduling algorithm.
Solution:
Calculate the movement for each step (absolute difference):
Total Seek Time = 45 + 85 + 142 + 81 + 108 + 110 + 59 + 2 = 632
Scenario: Suppose you have a disk with blocks of disk numbered 0–199. The disk queue contains requests with random due dates, random processing times, and random weights due to stochastic machine breakdowns. The requests arrive at: 25, 89, 132, 45, 10. The head starts at 50.
Question: If the requests have the following random weights (importance):
And the processing times are:
How would you prioritize the disk queue if you wanted to minimize total weighted seek time, and what would the seek time be for your chosen order?
Solution: One approach is to serve requests in order of highest weight first, breaking ties by shortest processing time:
Order: 45 (5), 10 (4), 25 (3), 132 (2), 89 (1)
Calculate seek times:
Total Seek Time = 5 + 35 + 15 + 107 + 43 = 205
Scenario: A disk scheduling system faces stochastic machine breakdowns, causing delays in servicing I/O requests. Given a disk queue of requests: 30, 70, 110, 150, with the head at 40, and a breakdown occurs after servicing the second request, causing a 5ms delay.
Question: Calculate the total seek time and account for the breakdown delay.
Solution: Order: 70, 110, 150
Total Seek Time = 30 + 40 + 40 = 110
Total Time Including Delay = 110 (seek) + 5 (breakdown) = 115
Key Takeaways So Far:
To sum up, disk scheduling algorithms are a major factor of the success of operations related to disk I/O in an operating system. From FCFS to C-LOOK, all algorithms have their pros and cons, and the best algorithm depends on the particular system requirements. The algorithms in question work to reduce the time it takes to move the disk arm thus they minimize seek time, rotational latency, and system performance. Understanding the advantages and disadvantages of each disk scheduling algorithm is the key to making the best speed-fairness-resource utilization tradeoff in different computer systems.
Scheduling of the disk is one of the performance factors of the OS that cannot be overlooked. Good algorithms are the cause of very few I/O operations delays thus they contribute to the system's responsiveness. In such environments where I/O requests are abundant, perfecting disk scheduling can have a great positive effect on throughput and user experience.
Disk scheduling is the process for scheduling the sequence in which disk I/O requests are serviced. The primary objective is to maximize the efficiency of disk operations, minimize the time required by each I/O operation, and achieve fairness among competing processes.
Disk scheduling is necessary because it has a direct relation to system performance. Proper disk scheduling results in quick data access, the optimum utilization of disk resources, and minimizing aggregate I/O operation time. Bad disk scheduling can result in huge seek times and response times, making the system inefficient.
The common types of disk scheduling algorithms are:
Each algorithm operates in servicing disk I/O requests differently regarding efficiency, fairness, and complexity.
SCAN and C-SCAN have the disk arm scanning from one side of the disk to the other. The only difference is:
CPU Scheduling Algorithms in OS: Complete Guide - Learn CPU scheduling algorithms in OS, including FCFS, SJF, Priority, and Round Robin, with examples, advantages, and comparisons. (29 Dec 2025, 5 min read)
Understand Process Scheduling in OS with Simple Examples - Learn Process Scheduling in OS, its types, algorithms, queues, and schedulers explained with examples for efficient CPU management and performance. (29 Dec 2025, 6 min read)
A Guide to Master Linux Networking Commands: From Beginner to Expert - Master Linux networking commands from basics to advanced. Learn essential tools, syntax, and tips to boost your system admin and networking skills. (26 Dec 2025, 5 min read)
Services Of Operating System: Understanding Core Functions and Applications - Explore the key services of operating systems. Understanding their importance, types, and real-world applications, from process control to memory management. (26 Dec 2025, 4 min read)
Device Management in Operating System: Types & its Functions - Device management in an OS involves controlling and coordinating hardware devices, ensuring proper communication, resource allocation, and efficient device usage. (26 Dec 2025, 8 min read)
Major Functions of an OS You Must Know - Learn the key functions of an operating system, including process, memory, file, device, and security management, explained with clear examples. (13 Dec 2025, 5 min read)
About NxtWave
NxtWave is a technology education platform offering comprehensive programs in software development, data analysis, and emerging technologies. Contact: [email protected] | WhatsApp: +919390111761