Disk scheduling is done by operating systems to schedule I/O requests arriving for the disk. Disk scheduling is also known as I/O scheduling. Disk scheduling is important because:
Multiple I/O requests may arrive by different processes and only one I/O request can be served at a time by the disk controller. Thus other I/O requests need to wait in the waiting queue and need to be scheduled. Two or more request may be far from each other so can result in greater disk arm movement. Hard drives are one of the slowest parts of the computer system and thus need to be accessed in an efficient manner. There are many Disk Scheduling Algorithms.

Lorem ipsum dolor sit, amet consectetur adipisicing elit. Provident odit, nobis unde nulla corporis animi, culpa quidem natus suscipit enim quisquam ipsam atque eos placeat quia eveniet obcaecati?
Consequuntur, perspiciatis! Nihil inventore, eaque vero quas obcaecati ex qui fuga, temporibus iure voluptas nulla, et placeat repellendus! Neque corporis molestiae accusantium facilis, nam sunt, saepe necessitatibus adipisci animi maxime commodi cupiditate?Lorem ipsum dolor sit amet consectetur, adipisicing elit. Aut ducimus reprehenderit laborum ipsum quae explicabo soluta quia? Unde delectus aperiam commodi necessitatibus soluta dolore reiciendis totam assumenda, eligendi incidunt neque!
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Soluta voluptate quod ad placeat eos voluptatem, tempora totam ipsa corporis blanditiis.

Terms used in Disk Scheduling :


Seek Time:Seek time is the time taken to locate the disk arm to a specified track

Rotational Latency: Rotational Latency is the time taken by the desired sector of disk to rotate into a position so that it can access the read/write heads. So the disk scheduling algorithm that gives minimum rotational latency is better.

Transfer Time: Transfer time is the time to transfer the data. It depends on the rotating speed of the disk and number of bytes to be transferred.

Disk Access Time:
Disk Access Time = Seek Time + Rotational Latency + Transfer Time

Disk Response Time: Response Time is the average of time spent by a request waiting to perform its I/O operation. Average Response time is the response time of the all requests. Variance Response Time is measure of how individual request are serviced with respect to average response time. So the disk scheduling algorithm that gives minimum variance response time is better.

FCFS



FCFS is the simplest of all the Disk Scheduling Algorithms. In FCFS, the requests are addressed in the order they arrive in the disk queue.

Advantages of FCFS :
1.There is no indefinite delay.
2.There is no starvation ,because each request gets a fair chance.

Disadvantages of FCFS :
1.FCFS scheduling is not offered as the best service.
2.Scheduling disk time is not optimized.

SSTF



In SSTF (Shortest Seek Time First), requests having shortest seek time are executed first. So, the seek time of every request is calculated in advance in the queue and then they are scheduled according to their calculated seek time.

Advantages of SSTF :
1.The average response time is decreased.
2.Increased throughput.

Disadvantages of SSTF :
1.There may be a chance of starvation.
2.SSTF is not an optimal algorithm.

SCAN



In SCAN algorithm the disk arm moves into a particular direction and services the requests coming in its path and after reaching the end of disk, it reverses its direction and again services the request arriving in its path. So, this algorithm works as an elevator and hence also known aselevator algorithm.

Advantages of SCAN :
1.There is a low variance of response time.
2.Throughput is high.
3.Response time is average and No starvation.

Disadvantages of SCAN :
1.Long waiting time.
2.We have to move the disk head to the end of the disk even when we don’t have any request to service.

CSCAN



In SCAN algorithm, the disk arm again scans the path that has been scanned, after reversing its direction. So, it may be possible that too many requests are waiting at the other end or there may be zero or few requests pending at the scanned area.

Advantages of CSCAN :
1.C-SCAN offers better uniform waiting time.
2.It offers a better response time.

Disadvantages of CSCAN :
1.There are more seek movements as compared to SCAN disk scheduling.
2.We have to move the disk head to the end of the disk even when we don’t have any request to service.

LOOK



It is similar to the SCAN disk scheduling algorithm except for the difference that the disk arm in spite of going to the end of the disk goes only to the last request to be serviced in front of the head and then reverses its direction from there only.

Advantages of LOOK :
1.There is no starvation.
2.It offers low variance in waiting time and response time.

Disadvantages of LOOK :
1.There is more overhead to find the end request.
2.Look disk scheduling is not used in case of more load.

CLOOK



As LOOK is similar to SCAN algorithm, in similar way, CLOOK is similar to CSCAN disk scheduling algorithm. In CLOOK, the disk arm in spite of going to the end goes only to the last request to be serviced in front of the head and then from there goes to the other end’s last request.

Advantages of CLOOK :
1.There is no starvation.
2.The performance of the C-Look scheduling is better than Look disk scheduling.
3.It offers low variance in waiting time and response time.

Disadvantages of CLOOK :
1.There is more overhead in calculations.