Difference between SCAN and FCFS Disk Scheduling AlgorithmIn this article, you will learn the difference between the SCAN and FCFS disk scheduling algorithm. But before discussing the differences, you need to know about the SCAN and FCFS disk scheduling algorithm. What is SCAN Disk Scheduling Algorithm?It is also known as the Elevator algorithm. In this algorithm, the head may move in both directions, i.e., the disk arm begins to move from one end of the disk to the other end and servicing all requests until it reaches the other end of the disk. After reaching the other end, the head position direction is changed and further continues servicing the requests till the end of the disk. Example: Let's take a disk with 180 tracks (0-179) and the disk queue having input/output requests in the following order: 75, 90, 40, 135, 50, 170, 65, 10. The initial head position of the Read/Write head is 45 and will move on the left-hand side. Find the total number of track movements of the Read/Write head using the SCAN algorithm. Solution: ![]() Total head movements, Initial head point is 45, = (45-40) + (40-10) + (10-0) + (50-0) + (65-50) + (75-65) + (90-75) + (135-90) + (170-135) = 5 + 30 +10 +50 +15 + 10 +15 + 45 + 35 = 215 Advantages and Disadvantages of SCAN Disk Scheduling AlgorithmThere are various advantages and disadvantages of SCAN disk scheduling algorithm. These advantages and disadvantages are as follows: Advantages
Disadvantages
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: 75, 90, 40, 135, 50, 170, 65, 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, = (75-45) + (90-75) + (90-40) + (135-40) + (135-50) + (170-50) + (170-65) + (65-10) = 30 + 15 + 50 + 95 + 85 + 120 + 105 + 55 = 555 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
Main Differences between the SCAN and FCFS Disk Scheduling Algorithm![]() Here, you will learn the main differences between the SCAN and FCFS Disk Scheduling Algorithm. Various differences between the SCAN and FCFS Disk Scheduling Algorithm are as follows:
Head-to-head Comparison between the SCAN and FCFS Disk Scheduling AlgorithmHere, you will learn the head-to-head comparison between the SCAN and FCFS Disk Scheduling Algorithm. The main differences between the SCAN and FCFS Disk Scheduling Algorithm are as follows:
Next TopicLamport's Bakery Algorithm
|