Operating System - C-SCAN (Circular SCAN) Disk Scheduling Algorithm
Definition:
C-SCAN (Circular SCAN) is a disk scheduling algorithm that works like the SCAN (elevator) algorithm but with a twist — it only services requests in one direction, and when it reaches the end of the disk, it jumps to the beginning without servicing requests on the return trip.
How It Works:
-
The disk arm moves from one end to the other, servicing all requests in one direction.
-
Once it reaches the end, it returns immediately to the beginning of the disk without servicing any request during the return.
-
Then it continues servicing in the same direction again.
This ensures uniform wait time for all cylinders.
Example:
-
Disk Size: 0 – 199
-
Initial Head Position: 53
-
Requests (in queue order):
98, 183, 37, 122, 14, 124, 65, 67
-
Direction: Moving towards higher cylinders (right)
C-SCAN Execution Steps:
-
Start at 53, move right (increasing order).
-
Service requests greater than 53 in order:
→ 65, 67, 98, 122, 124, 183 -
Reach the end (199), jump to 0 (without servicing).
-
Now service the lower requests:
→ 14, 37
Serviced Order:
65 → 67 → 98 → 122 → 124 → 183 → [Jump to 0] → 14 → 37
Head Movements:
-
From 53 → 65 → 67 → 98 → 122 → 124 → 183 → 199
-
Moves = 199 - 53 = 146
-
-
Jump from 199 → 0 (not servicing)
-
Moves = 199
-
-
From 0 → 14 → 37
-
Moves = 37
-
Total Head Movement = 146 + 199 + 37 = 382 cylinders