Comparison
As we know, a process needs 2 types of time, CPU time and I/O time. For I/O, it requests the operating system to access the disk. However, the operating system must be fare enough to satisfy each request and at the same time, operating system must maintain the efficiency and speed of process execution. The technique that operating system uses to determine the request which is to be satisfied next is called disk scheduling.
The main purpose of disk scheduling algorithm is to select a disk request from the queue of I/O requests and decide the schedule when this request will be processed.
SEEK TIME : Seek time is the time taken in locating the disk arm to a specified track where the read/write request will be satisfied.
RESPONSE TIME : It is the average of time spent by each request waiting for the I/O operation.
-
FCFS : In FCFS, the requests are addressed in the sequence they come in the disk queue. This algorithm is simple and easy to implement, but it might be possible that best services may not be delivered.
-
SSTF : In SSTF, execution of requests having the shortest seek time takes place first. So, in advance, the seek time of every request is calculated in the queue. Then they are scheduled according to their seek time as it is calculated. As a result, the request closer to the disk arm will be executed first. SSTF is certainly better over FCFS because it reduces the average response time and improves the throughput of the system.
-
SCAN : In SCAN, the disk arm moves into a particular direction till the end, satisfying all the requests coming in its path,and then it turns backand moves in the reverse direction satisfying requests coming in its path. So, this algorithm also recognized as elevator algorithm. As a result, the requests at the midrange are serviced more and those incoming behind the disk arm will have to wait.
-
C-SCAN : In C-SCAN, the arm of the disk moves in a particular direction servicing requests till the end, then it jumps to the end of the opposite direction without servicing any request then it turns back and start moving in that direction servicing the remaining requests. So, the disk arm transfers in a circular fashion and this algorithm is also like SCAN algorithm, hence it is known as C-SCAN.
-
LOOK : It is like the SCAN disk scheduling algorithm but the change is that the disk arm in spite of going to the end of the disk goes only to the last request to be checked in front of the head and then returns its direction from there only. Therefore, it avoids the additional postponement which arose due to pointless traversal to the last of the disk.
-
C-LOOK : C-LOOK is alike to C-SCAN disk scheduling algorithm. In C-LOOK, the disk arm in spite of going to the end, it goes only to the last request to be examined in front of the head and then from there moves to the other end’s last request. Thus, it also stops the additional delay which happened due to needless traversal to the end of the disk.
Enter the track numbers upto 200.