In this tutorial, we are going to learn about disk scheduling algorithms of any operating systems.

Operating system do disk scheduling to schedule I/O requests arriving for the disk. So, disk scheduling is basically I/O scheduling.

## Some of the Important Terms :

• Seek Time : The time it takes the disc arm to locate a specific track where data we want to read or written is seek time.
• Rotational Latency : It is the time it takes for the required sector of the disc to rotate into position so that we may may access the read/write heads .
• Transfer time : The time it takes to send data is the transfer time. It is determined by the disk’s rotational speed and the quantity of bytes to be transferred.
• Disk Access Time : Seek Time + Rotational Latency + Transfer Time
• Disk Response Time : The average amount of time a request spends waiting for its I/O operation to complete is response time. The average response time is the sum of all requests’ responses.

## Disk Scheduling Algorithms :

### FCFS Disk Scheduling Algorithms :

The FCFS (First Come First Serve) Disk Scheduling Algorithm is the most basic of all the Disk Scheduling Algorithms. In FCFS, the requests are addressed in the order they arrive in the disk queue.

### SSTF Disk Scheduling Algorithms :

Requests with the shortest seek time are executed first in SSTF (Shortest Seek Time First). As a result, each request’s seek time is computed in advance in the queue. Then they are scheduled based on that determined seek time. As a result, the request that is closest to the disc arm will be processed first.

### SCAN Disk Scheduling Algorithms :

In the SCAN algorithm, the disc arm moves in a specific direction and services the requests that come its way, then reverses direction and services the requests that come its way again after reaching the end of the disc. As a result, this algorithm is also known as the elevator algorithm because it acts like an elevator. As a result, requests at the midpoint receive greater attention, while those arriving after the disc arm must wait.

### CSCAN :

Instead of reversing direction, the disc arm in the CSCAN algorithm moves to the opposite end of the disc and begins serving requests from there. As a result, the disc arm moves in a circular pattern. This process is comparable to the SCAN algorithm, hence the name C-SCAN (Circular SCAN)

### LOOK Disk Scheduling Algorithms :

It’s identical to the SCAN disc scheduling algorithm. But instead of travelling to the end of the disc, the disc arm only goes to the last request in front of the head. Then reverses course from there.

### CLOOK :

CLOOK is comparable to the CSCAN disc scheduling method in the same way that LOOK is related to the SCAN algorithm. Despite travelling to the end, the disc arm in CLOOK only goes to the last request to be serviced in front of the head and then to the opposite end’s last request.