Disk Scheduling Algorithms: FCFS, SSTF, SCAN, C-SCAN, LOOK and C-LOOK, Worked

By the NSCT Exam Editorial Team · Updated 2026-11-24 · Facts checked against official sources on 2026-11-24

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

  1. Note the givens: start cylinder, queue, range (for example 0-199) and direction. Direction matters for SCAN, C-SCAN, LOOK and C-LOOK only.
  2. Write the service order using the algorithm's rule.
  3. Write the head path, including any trip to the disk edge (SCAN, C-SCAN) or return jump (C-SCAN, C-LOOK).
  4. Add the absolute differences between consecutive points in the path.
  5. 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.

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.

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
Head-movement plots for FCFS (754 cylinders), SSTF (237) and LOOK moving up (246) with the head starting at cylinder 85.
The page's running example: head at 85, queue 140, 20, 170, 55, 102, 9, 130, 77 on cylinders 0 to 199.

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

Common mistakes

Practice set

Cylinders 0-199, head at 45 moving up, queue 90, 12, 160, 33, 70.

  1. FCFS total head movement?
  2. SSTF service order and total?
  3. SCAN total?
  4. LOOK total?
  5. C-SCAN total, with and without the return jump?
  6. C-LOOK total, with and without the jump?
  7. Which algorithm gives the smallest total for this queue?
  8. Average rotational latency at 5,400 RPM?
  9. Average rotational latency at 15,000 RPM?
Show answers
  1. 435. 45 + 78 + 148 + 127 + 37.
  2. 33, 12, 70, 90, 160; total 181.
  3. 341. (199 - 45) + (199 - 12).
  4. 263. (160 - 45) + (160 - 12).
  5. 386 with the return, 187 without. 154 + 199 + 33.
  6. 284 with the jump, 136 without. 115 + 148 + 21.
  7. SSTF (181), since three requests sit close below the head.
  8. About 5.56 ms. 11.11 ms per rotation, halved.
  9. 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

Interactive quiz loading. The first 10 questions are shown below.

  1. Which disk scheduling algorithm can starve a request that sits far from the head while new nearby requests keep arriving?

    1. FCFS
    2. C-SCAN
    3. SCAN
    4. SSTF
    Show answer

    Answer: D. SSTF

    SSTF always serves the closest pending request. A steady stream of requests near the head keeps winning, so a distant request can wait indefinitely. FCFS, SCAN and C-SCAN all reach every request within a bounded time.

  2. Which algorithm is often called the elevator algorithm?

    1. SSTF
    2. SCAN
    3. FCFS
    4. C-LOOK
    Show answer

    Answer: B. SCAN

    SCAN moves the arm in one direction serving requests until it reaches the end of the disk, then reverses, just as a lift serves floors on the way up and then on the way down.

  3. Why does C-SCAN give a more uniform waiting time than SCAN?

    1. It serves requests in only one direction, so every cylinder is visited at the same interval
    2. It always moves the head to the nearest request
    3. It skips the outermost cylinders entirely
    4. It serves requests in arrival order
    Show answer

    Answer: A. It serves requests in only one direction, so every cylinder is visited at the same interval

    After SCAN reverses, the cylinders it just passed get served again soon while those at the far end have waited longest. C-SCAN returns to the start without serving, so every cylinder waits roughly one full sweep.

  4. How does LOOK differ from SCAN?

    1. LOOK reverses at the last pending request instead of travelling to the end of the disk
    2. LOOK serves requests in both directions while SCAN serves in one
    3. LOOK picks the nearest request at every step
    4. LOOK jumps back to cylinder 0 after each sweep
    Show answer

    Answer: A. LOOK reverses at the last pending request instead of travelling to the end of the disk

    Both sweep back and forth, but LOOK only goes as far as the farthest request in the current direction, saving the wasted travel to the disk edge. C-LOOK is the same refinement applied to C-SCAN.

  5. A disk spins at 7,200 RPM. What is its average rotational latency?

    1. About 8.33 ms
    2. About 0.14 ms
    3. About 4.17 ms
    4. About 7.2 ms
    Show answer

    Answer: C. About 4.17 ms

    One rotation takes 60,000 ms / 7,200 = 8.33 ms. On average the sector is half a rotation away, so average latency is 4.17 ms. 8.33 ms is the full-rotation (worst case) latency.

  6. Disk scheduling algorithms such as SSTF and SCAN mainly try to reduce which component of access time?

    1. Seek time
    2. Rotational latency
    3. Transfer time
    4. Controller overhead
    Show answer

    Answer: A. Seek time

    All of them reorder requests to cut the total distance the arm moves between cylinders, which is seek time. Rotational latency depends on where the sector is on the track, which these algorithms ignore.

  7. Cylinders 0-199, head at 110 moving towards higher numbers. Queue: 45, 181, 12, 150, 98, 63, 126, 190. What is the total head movement under FCFS?

    1. 612
    2. 282
    3. 722
    4. 742
    Show answer

    Answer: C. 722

    Add each jump in arrival order: 65 + 136 + 169 + 138 + 52 + 35 + 63 + 64 = 722 cylinders.

  8. Cylinders 0-199, head at 110 moving towards higher numbers. Queue: 45, 181, 12, 150, 98, 63, 126, 190. What is the total head movement under SSTF?

    1. 258
    2. 722
    3. 282
    4. 270
    Show answer

    Answer: C. 282

    SSTF order: 98, 126, 150, 181, 190, 63, 45, 12. The jumps add up to 282 cylinders. Direction is ignored by SSTF; it always takes the closest request.

  9. Cylinders 0-199, head at 110 moving towards higher numbers. Queue: 45, 181, 12, 150, 98, 63, 126, 190. What is the total head movement under SCAN?

    1. 258
    2. 386
    3. 89
    4. 276
    Show answer

    Answer: D. 276

    Go up serving 126, 150, 181, 190, continue to cylinder 199 (89 cylinders), then reverse down to 12 (187 cylinders). Total = 89 + 187 = 276.

  10. Cylinders 0-199, head at 110 moving towards higher numbers. Queue: 45, 181, 12, 150, 98, 63, 126, 190. What is the total head movement under C-SCAN, counting the return jump from 199 to 0?

    1. 187
    2. 276
    3. 386
    4. 344
    Show answer

    Answer: C. 386

    Up to 199 (89), jump back to 0 (199), then up to the highest request below the start, 98 (98). Total = 89 + 199 + 98 = 386. Without the return jump it would be 187.

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.