Difference between C-SCAN and SSTF Disk Scheduling AlgorithmIn this article, you will learn the difference between the C-SCAN and SSTF disk scheduling algorithm. But before discussing the differences, you need to know about the C-SCAN and SSTF disk scheduling algorithm. What is C-SCAN Disk Scheduling Algorithm?It is also known as the Circular Elevator algorithm. It is an improved version of the SCAN disk scheduling algorithm. In this algorithm, the head works for requests in a single direction, i.e., it scans all the way to the end of a direction and then jumps to another end and services the requests in the same direction. 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 right-hand side. Find the total number of track movements of the Read/Write head using the C-SCAN algorithm. Solution: ![]() Total head movements, The initial head point is 45, = (50-45) + (65-50) + (75-65) + (90-75) + (135-90) + (170-135) + (179-170) + (179-0) + (10-0) + (40-10) = 5 + 15 + 10 +15 + 45 + 35 + 9 +179 + 10 + 30 = 353 Advantages and Disadvantages of C-SCAN Disk Scheduling AlgorithmThere are various advantages and disadvantages of the C-SCAN 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. If 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: 92, 100, 40, 148, 67, 170, 29, 10. 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, = (45-40) + (40-29) + (29-10) + (67-10) + (92-67) + (100-92) + (148-100) + (170-148) = 5 + 11 + 19 + 57 + 25 + 8 + 48 + 22 = 195 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 C-SCAN and SSTF Disk Scheduling Algorithm![]() Here, you will learn the main differences between the C-SCAN and SSTF Disk Scheduling Algorithm. Various differences between the C-SCAN and SSTF Disk Scheduling Algorithm are as follows:
Head-to-head Comparison between the C-SCAN and SSTF Disk Scheduling AlgorithmHere, you will learn the head-to-head comparison between the C-SCAN and SSTF Disk Scheduling Algorithm. The main differences between the C-SCAN and SSTF Disk Scheduling Algorithm are as follows:
Next TopicLook vs C-Look Disk Scheduling Algorithm
|