Disk Scheduling Algorithms: FCFS, SSTF, SCAN, C-SCAN, LOOK and C-LOOK, Worked
A disk scheduling question gives you the current head position, a queue of cylinder requests, the disk's cylinder range and sometimes the head's direction, and asks for the total head movement (the number of cylinders the arm crosses) under FCFS, SSTF, SCAN, C-SCAN, LOOK or C-LOOK. You list the service order, add the absolute jumps, and you are done. Operating Systems carries 5% of the NSCT according to HEC's Areas of Competencies, and it had the lowest accuracy of any area in 2026, at 33.8%, per the HEC NSCT report and APP.
Disk structure, RAID and free-space management are covered in Secondary Storage Management. This page works one queue through all six algorithms.
The method, step by step
- Note the givens: start cylinder, queue, range (for example 0-199) and direction. Direction matters for SCAN, C-SCAN, LOOK and C-LOOK only.
- Write the service order using the algorithm's rule.
- Write the head path, including any trip to the disk edge (SCAN, C-SCAN) or return jump (C-SCAN, C-LOOK).
- Add the absolute differences between consecutive points in the path.
- Check the convention for return jumps; state it if the question does not.
For a sweep, you can skip step 4: distance = (far end - start) + (far end - lowest point reached). That shortcut handles most SCAN and LOOK questions in one line.
The running example
Cylinders 0-199. The head is at 85, moving towards higher cylinders. Queue (in arrival order):
140, 20, 170, 55, 102, 9, 130, 77
Requests above 85: 102, 130, 140, 170. Requests below 85: 77, 55, 20, 9.
FCFS: first come, first served
Serve in arrival order. Path: 85, 140, 20, 170, 55, 102, 9, 130, 77.
| Move | 85-140 | 140-20 | 20-170 | 170-55 | 55-102 | 102-9 | 9-130 | 130-77 |
|---|---|---|---|---|---|---|---|---|
| Cylinders | 55 | 120 | 150 | 115 | 47 | 93 | 121 | 53 |
Total = 754 cylinders. Fair, but the arm swings wildly.
SSTF: shortest seek time first
Always go to the closest pending request, ignoring direction.
| From | Nearest pending | Distance |
|---|---|---|
| 85 | 77 (102 is 17 away) | 8 |
| 77 | 55 (102 is 25 away) | 22 |
| 55 | 20 (102 is 47 away) | 35 |
| 20 | 9 | 11 |
| 9 | 102 | 93 |
| 102 | 130 | 28 |
| 130 | 140 | 10 |
| 140 | 170 | 30 |
Total = 237 cylinders. Much better, but a request far from a busy region can starve.
SCAN (elevator)
Move in the current direction to the end of the disk, serving requests on the way, then reverse.
Path: 85, 102, 130, 140, 170, 199, 77, 55, 20, 9.
Distance = (199 - 85) + (199 - 9) = 114 + 190 = 304 cylinders.
C-SCAN (circular SCAN)
Move up to the end, jump back to cylinder 0 without serving, then continue upwards.
Path: 85, 102, 130, 140, 170, 199, 0, 9, 20, 55, 77.
- Counting the return jump: 114 + 199 + 77 = 390 cylinders.
- Not counting it: 114 + 77 = 191 cylinders.
Where books differ. Silberschatz describes the return as a fast move that serves nothing, and some keys leave it out of the total; many university and exam keys include it. Follow the question; if it is silent, say which convention you used. The service order is the same either way.
LOOK
Like SCAN, but reverse at the last request in the current direction instead of the disk edge.
Path: 85, 102, 130, 140, 170, 77, 55, 20, 9.
Distance = (170 - 85) + (170 - 9) = 85 + 161 = 246 cylinders. The 58 cylinders saved against SCAN are the wasted trip from 170 to 199 and back.
C-LOOK
Like C-SCAN, but go only as far as the last request, then jump to the lowest pending request.
Path: 85, 102, 130, 140, 170, 9, 20, 55, 77.
- Counting the jump: 85 + 161 + 68 = 314 cylinders.
- Not counting it: 85 + 68 = 153 cylinders.
Comparing the results
| Algorithm | Total (moving up) | Total (moving down) |
|---|---|---|
| FCFS | 754 | 754 |
| SSTF | 237 | 237 |
| SCAN | 304 | 255 |
| C-SCAN (with return) | 390 | 381 |
| LOOK | 246 | 237 |
| C-LOOK (with jump) | 314 | 305 |

Two lessons: direction changes every sweep answer, so read the stem carefully; and the "best" algorithm depends on the queue. Here LOOK moving down ties SSTF at 237.
Disk access time
Total access time = seek time + rotational latency + transfer time. Scheduling algorithms cut seek time only.
Average rotational latency = half a rotation = (60,000 / RPM) / 2 ms. At 7,200 RPM one rotation takes 8.33 ms, so the average latency is 4.17 ms.
Speed tricks
- SCAN shortcut: (end - start) + (end - lowest request). LOOK shortcut: (highest request - start) + (highest request - lowest request). Swap the roles when moving down.
- C-LOOK shortcut: (highest - start) + (highest - lowest) + (highest request below start - lowest).
- SSTF: write the queue sorted first; the nearest request is always a neighbour of the head in the sorted list.
- FCFS cannot be shortcut; just add carefully and double-check the biggest jumps.
- If all requests lie on one side of the head, SCAN, LOOK and their circular forms collapse into simple one-way trips.
Common mistakes
- Ignoring the given direction for SCAN or LOOK.
- Going to the disk edge in LOOK, or stopping at the last request in SCAN.
- Forgetting whether the C-SCAN return jump is counted, then matching the wrong option.
- In C-SCAN, serving the low requests in descending order. After the jump the head moves up again.
- Using cylinder 200 as the edge of a 0-199 disk.
- Thinking SSTF is optimal. It is greedy, not guaranteed minimal, and it can starve requests.
Practice set
Cylinders 0-199, head at 45 moving up, queue 90, 12, 160, 33, 70.
- FCFS total head movement?
- SSTF service order and total?
- SCAN total?
- LOOK total?
- C-SCAN total, with and without the return jump?
- C-LOOK total, with and without the jump?
- Which algorithm gives the smallest total for this queue?
- Average rotational latency at 5,400 RPM?
- Average rotational latency at 15,000 RPM?
Show answers
- 435. 45 + 78 + 148 + 127 + 37.
- 33, 12, 70, 90, 160; total 181.
- 341. (199 - 45) + (199 - 12).
- 263. (160 - 45) + (160 - 12).
- 386 with the return, 187 without. 154 + 199 + 33.
- 284 with the jump, 136 without. 115 + 148 + 21.
- SSTF (181), since three requests sit close below the head.
- About 5.56 ms. 11.11 ms per rotation, halved.
- 2 ms. 4 ms per rotation, halved.
Practise
The quiz below has 20 disk scheduling questions, filterable by tier and difficulty. Every total was produced by a Python implementation of each algorithm.
Practise: 20 questions
FAQs
Which disk scheduling algorithm is best?
None wins on every queue. SSTF often gives low totals but can starve requests. SCAN and LOOK bound the waiting time, and C-SCAN and C-LOOK make it more uniform across cylinders. Textbooks recommend SSTF or LOOK as reasonable defaults, and modern drives also reorder requests themselves.
Is SSTF the same as shortest job first?
It is the disk version of the same greedy idea: serve the cheapest request next. Like SJF it reduces the average, and like SJF it can starve requests that are always "expensive". Unlike SJF, SSTF is not guaranteed to give the minimum total head movement.
Do I count the starting position as a request?
No. The starting cylinder is where the head already is, so it adds no movement and is not served. Average seek distance divides the total movement by the number of requests in the queue only.
What if a request is at the head's current cylinder?
It is served immediately with zero movement under every algorithm. Include it in the order but add nothing to the total.
Next step
Read the theory in Secondary Storage Management, then try CPU Scheduling Numericals for the same style of tracing. Return to the Operating Systems MCQ hub or take the NSCT mock test.