A process needs two type of time, CPU time and IO time.
For I/O,it requests the Operating system to access the disk.
Disk scheduling is done by operating systems to schedule I/O requests arriving for the disk.
Disk Scheduling is important because:
1. Multiple I/O requests may arrive by different processes and only one I/O requests 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.
2.Two or more request may be far from each other so can result in the greater disk arm movement.
3.Hard drives need to be acessed in an efficient manner as they are the slowest parts of the computer system.
Some of the important terms:
Seek Time:
Seek time is the time taken to locate the disk arm to a specified track where the data is to be read or write. So the disk scheduling algorithm that gives minimum average seek time is better.
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. 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 = Seek Time + Rotational Latency + Tranfer time
Requests are served in the order that they arrive.
Request with lowest seek time is executed first.
All requests arriving in the path are addressed. Head moves till the end track.
Similar to that of SCAN. Requests are addressed when the head moves in a single direction.
Similar to SCAN, but the head moves only till the last request.
Similar to C-SCAN, but the head moves only till the first and last request.