Prerequisite – Disk Scheduling Algorithms
1. SCAN Disk Scheduling Algorithm :
SCAN Disk Scheduling Algorithm is also known as Elevator algorithm. In this, head or pointer can move in both the direction i.e., disk arm starts to move from one end of the disk to the other end servicing all the requests until it reaches to the other end of the disk. After reaching the other end, head movement direction is reversed and further continues servicing the requests.
The problem with this is that it takes longer waiting time than the C-SCAN scheduling algorithm for requesting the locations.
Assuming the head starts at 53 and starts moving towards left end.
Total head movements,
= (53-37)+(37-14)+(14-0)+(65-0)+(67-65) +(98-67)+(122-98)+(124-122)+(183-124) = 236
2. C-SCAN Disk Scheduling Algorithm :
In C-SCAN disk scheduling algorithm, the only difference with respect to SCAN algorithm is that, it is designed to provide more uniformity in waiting time. In this, head or pointer works in a single direction i.e., it scans for the requests all the way to a direction and once it reaches the end, it jumps back to another end and services the requests in the same direction unlike, SCAN does it in both reversed and forward direction.
Assuming the head starts at 53 and starts moving towards right end.
Total head movements,
= (65-53)+(67-65)+(98-67)+(122-98)+(124-122) +(183-124)+(199-183)+(199-0)+(14-0)+(37-14) = 382
Let’s see the difference between SCAN and C-SCAN disk scheduling algorithm –
|S. No.||SCAN Scheduling Algorithm||C-SCAN Scheduling Algorithm|
|1.||It is also known as Elevator Algorithm.||It is also known as Circular Elevator Algorithm.|
|2.||It services all the requests in both the direction.||It services the requests in one direction only.|
|3.||In above example of SCAN algorithm, head starts moving from 53 towards left servicing all the requests in that direction and further, reaching at left end, it changes the head direction to right and further servicing all the requests from 0 to 199.||In above example of C-SCAN algorithm, head starts from 53 toward right servicing all the requests in that direction and after reaching at right end it does not reverses its direction rather, head jumps to the opposite end of the disk servicing the requests on its right.|
|4.||SCAN Algorithm provides a longer waiting time to request the locations.||C-SCAN Algorithm provides uniform waiting time in requesting the locations over Elevator Algorithm.|
|5.||It has higher throughput and provides low variance response time.||This algorithm provides better response time.|
Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.
- Difference between SCAN and LOOK Disk scheduling algorithms
- Difference between FCFS and SCAN disk scheduling algorithms
- SCAN (Elevator) Disk Scheduling Algorithms
- Difference between C-SCAN and SSTF Disk Scheduling Algorithm
- C-SCAN Disk Scheduling Algorithm
- N-Step-SCAN disk scheduling
- Difference between LOOK and C-LOOK Disk scheduling algorithms
- Difference between Rotational Latency and Disk Access Time in Disk Scheduling
- Disk Scheduling Algorithms
- Difference between Transfer Time and Disk Access Time in Disk Scheduling
- Difference between Seek Time and Disk Access Time in Disk Scheduling
- FCFS Disk Scheduling Algorithms
- Advantages and Disadvantages of various Disk scheduling algorithms
- Difference between SSTF and LOOK disk scheduling algorithm
- Difference between FCFS and C-LOOK disk scheduling algorithm
- Difference between FCFS and SSTF Disk Scheduling Algorithm
- Difference between Seek Time and Rotational Latency in Disk Scheduling
- Difference between Rotational Latency and Transfer Time in Disk Scheduling
- Difference between Raster Scan and Random Scan
- Difference between Interlaced Scan and Progressive Scan
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : vanshgaur14866