Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Difference between FCFS and C-SCAN disk scheduling algorithm

  • Last Updated : 04 Sep, 2020

1. FCFS Disk Scheduling Algorithm :
FCFS stands for First come first serve, this algorithm entertains the task in the order they arrived in the disk queue. It is the simplest and easy to understand disk scheduling algorithm. In this the head or pointer moves in the direction in which the task arrives and moves till all request is served. However, FCFS algorithm has more fair policy of handling upcoming requests.

Example –
Consider a disk with 200 tracks (0-199) and the disk queue having I/O requests in the following order as follows :

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

98, 183, 40, 122, 10, 124, 65

The current head position of the Read\Write head is 53. Calculate the total number of track movements of Read/Write head using FCFS algorithm.



Total head movements,

= (98-53)+(183-98)+(183-40)
               +(122-40)+(122-10)+(124-10)+(124-65)
= 640

2. C-SCAN Disk Scheduling Algorithm :
C-SCAN algorithm, also known as Circular Elevator algorithm is the modified version of SCAN algorithm. In this algorithm, the head pointer starts from one end of disk and moves towards the other end, serving all requests in between. After reaching the other end, the head reverse its direction and go to the starting point. It then satisfies the remaining requests, in same direction as before. C-SCAN is one of the best disk scheduling algorithm.

Example –
Consider a disk with 200 tracks (0-199) and the disk queue having I/O requests in the following order as follows :

98, 183, 40, 122, 10, 124, 65

The current head position of the Read/Write head is 53 and will move in Right direction . Calculate the total number of track movements of Read/Write head using C-SCAN algorithm.

Total head movements,

= (65-53)+(98-65)+(122-98)+(124-122)+(183-124)
               +(199-183)+(199-0)+(10-0)+(40-10)
= 395



Difference between FCFS and C-SCAN Disk Scheduling Algorithm :

S.No.FCFS DISK SCHEDULING ALGORITHMC-SCAN DISK SCHEDULING ALGORITHM
1FCFS is inefficient in seek movements.Whereas C-SCAN is very efficient in seek movements.
2FCFS cause more average waiting time and response time.But C-SCAN cause less average response time and waiting time.
3In above example of FCFS, the head starts from 53 and serves the requests in the order of their arrival in disk queue.In the above example of C-SCAN algorithm, the head moves from 53, serves all requests in right direction till it reaches the other end. Then it jumps to the opposite end and serves remaining requests in right direction only.
4In FCFS algorithm there is decrement in Throughput.Here there is increment in Throughput.
5FCFS doesn’t cause starvation to any request, but request can experience Convoy effect.In C-SCAN algorithm neither the requests suffers starvation nor Convoy effect.
6FCFS algorithm is easy to understand and implement.The performance of C-SCAN algorithm is far better than FCFS algorithm.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!