Difference between FCFS and SSTF Disk Scheduling AlgorithmIn this article, you will learn the difference between the FCFS and SSTF disk scheduling algorithm. But before discussing the differences, you need to know about the FCFS and SSTF disk scheduling algorithm. What is FCFS Disk Scheduling algorithm?FCFS stands for First-Come-First-Serve. It is a very easy algorithm among the all-disk scheduling algorithms. It is an OS disk scheduling algorithm that runs the queued requests and processes in the way that they arrive in the disk queue. It is a very easy and simple CPU scheduling algorithm. In this scheduling algorithm, the process which requests the processor first receives the processor allocation first. It is managed with a FIFO queue. Example: Let's take a disk with 180 tracks (0-179) and the disk queue having input/output requests in the following order: 81, 110, 38, 156, 68, 172, 92, 10. The initial head position of the Read/Write head is 45. Find the total number of track movements of the Read/Write head using the FCFS algorithm. Solution: ![]() Total head movements, The initial head point is 45, = (81-45) + (110-81) + (110-38) + (156-110) + (156-68) + (172-156) + (172-92) + (92-10) = 36 + 29 + 72 + 46 + 88 + 16 + 80 + 82 = 449 Advantages and Disadvantages of FCFS Disk Scheduling AlgorithmThere are various advantages and disadvantages of FCFS Disk Scheduling Algorithm. These advantages and disadvantages are as follows: Advantages
Disadvantages
What is SSTF Disk Scheduling Algorithm?SSTF stands for Shortest Seek Time First, and it serves the request that is closest to the current position of the head. The direction of the head pointer is quite important in this algorithm. When a tie happens between requests, the head will serve the request in its current direction. In comparison to the FCFS, the SSTF algorithm is very efficient in terms of the total seek time. Example: Let's take an example to understand the SSTF Disk Scheduling Algorithm. Let's take a disk with 180 tracks (0-179) and the disk queue having input/output requests in the following order: 87, 110, 50, 172, 67, 156, 39, 15. The initial head position of the Read/Write head is 45 and will move in the left-hand side direction. Find the total number of track movements of the Read/Write head using the SSTF algorithm. Solution: ![]() Total head movements, Initial head point is 45, = (50-45) + (50-39) + (39-15) + (67-15) + (87-67) + (110-87) + (156-110) + (172-156) = 5 + 11 + 14 + 52 + 20 + 23 + 46 + 16 = 187 Advantages and Disadvantages of SSTF Disk Scheduling AlgorithmThere are various advantages and disadvantages of SSTF Disk Scheduling Algorithm. These advantages and disadvantages are as follows: Advantages
Disadvantages
Main Differences between the FCFS and SSTF Disk Scheduling Algorithm![]() Here, you will learn the main differences between the FCFS and SSTF Disk Scheduling Algorithm. Various differences between the FCFS and SSTF Disk Scheduling Algorithm are as follows:
Head-to-head Comparison between the FCFS and SSTF Disk Scheduling AlgorithmHere, you will learn the head-to-head comparison between the FCFS and SSTF Disk Scheduling Algorithm. The main differences between the FCFS and SSTF Disk Scheduling Algorithm are as follows:
Next TopicLRU vs LFU Page Replacement Algorithm
|