LOOK and C-LOOK Disk Scheduling: Worked Examples and Exam Traps
Learn how LOOK reverses and C-LOOK wraps, then calculate both algorithms on two static queues. Includes checked totals and a repeatable solving routine.
KnowledgeGate Team
Exam prep & CS education

LOOK and C-LOOK (Circular LOOK) can produce plausible but different paths from the same request queue. Miss the initial direction, reverse at the wrong place, or mishandle the circular jump, and every later number changes. SCAN and C-SCAN (Circular SCAN) use different endpoint and turn rules. On the main queue, LOOK gives 299 cylinders while C-LOOK gives 322 when circular movement is counted.
1. LOOK and C-LOOK start with the same disk-head model
A pending request names a cylinder, and the disk head begins at a supplied cylinder. For a completed route, total head movement is:
sum of |next cylinder - current cylinder|
This cylinder count is an illustrative distance. It is not automatically seek time, rotational delay or transfer time. Disk Scheduling in Operating Systems: 6 Algorithms with Worked Examples compares all six policies on the main queue. LOOK and C-LOOK need a tighter two-policy trace because reversal, wrap counting and initial direction change the route.
The path depends on the initial head, pending requests and initial direction. Here every request is pending at time zero. Disk endpoints describe geometry, but they are not service requests unless the stated policy visits them.
Policy | Turn or wrap rule |
|---|---|
SCAN | Reach a physical endpoint, then reverse. |
LOOK | Reach the furthest pending request, then reverse. |
C-SCAN | Reach an endpoint, then wrap to the other endpoint. |
C-LOOK | Reach the furthest request, then wrap to the furthest request on the other side. |
2. LOOK serves one sweep, then reverses at the last request
LOOK moves in the stated direction and services requests in sorted cylinder order. At the furthest request in that direction, it reverses and services the other side. It does not visit cylinder 0 or the maximum cylinder merely to turn.
Use this construction: sort the requests, split them below and above the head, traverse the partition matching the initial direction, reverse through the other partition, prepend the head, then calculate each absolute movement. Never infer direction from the queue's written order.
Main example: cylinders 0 to 199, head 53, direction higher, requests 98, 183, 37, 122, 14, 124, 65, 67. The sorted partition is 14, 37 | 53 | 65, 67, 98, 122, 124, 183. The bars only show the split around the head.
3. C-LOOK keeps one service direction and uses a circular jump
C-LOOK services requests only in the stated direction until the furthest pending request on that side. It then jumps to the furthest request on the opposite side and continues in the original service direction.
With the main queue, both policies first visit 65, 67, 98, 122, 124, 183. LOOK reverses to 37, 14. C-LOOK jumps from 183 to 14, then moves upwards to 37.
Count physical circular movement: 183 -> 14 contributes 169 cylinders. If a question explicitly says to ignore the circular return, follow that special instruction and report the changed total separately.
4. Worked example 1: calculate LOOK and C-LOOK step by step
LOOK follows 53 -> 65 -> 67 -> 98 -> 122 -> 124 -> 183 -> 37 -> 14.
Leg | Absolute movement | Running total |
|---|---|---|
| 12 | 12 |
| 2 | 14 |
| 31 | 45 |
| 24 | 69 |
| 2 | 71 |
| 59 | 130 |
| 146 | 276 |
| 23 | 299 |
Thus, 12+2+31+24+2+59+146+23 = 299 cylinders. For eight requests, the illustrative average is 299/8 = 37.375 cylinders per request.
C-LOOK follows 53 -> 65 -> 67 -> 98 -> 122 -> 124 -> 183 -> 14 -> 37.
Leg | Absolute movement | Running total |
|---|---|---|
| 12 | 12 |
| 2 | 14 |
| 31 | 45 |
| 24 | 69 |
| 2 | 71 |
| 59 | 130 |
| 169 | 299 |
| 23 | 322 |
So, 12+2+31+24+2+59+169+23 = 322 cylinders, and 322/8 = 40.25 cylinders per request.
For this workload, C-LOOK moves 322-299 = 23 cylinders more. Its 183 -> 14 wrap is 169; LOOK's 183 -> 37 -> 14 also totals 169, but LOOK finishes at 14. C-LOOK adds the final 14 -> 37 = 23 leg. This does not mean LOOK always has the smaller total.

5. Direction and endpoint rules explain the LOOK, C-LOOK, SCAN and C-SCAN differences
Keep the same head, queue and higher direction. Count every wrap:
Policy | Distinguishing route | Total |
|---|---|---|
LOOK | Reverse at request |
|
C-LOOK | Wrap |
|
SCAN | Visit endpoint |
|
C-SCAN | Visit |
|
Now change only the direction to lower cylinders. LOOK becomes 53 -> 37 -> 14 -> 65 -> 67 -> 98 -> 122 -> 124 -> 183, totalling 16+23+51+2+31+24+2+59 = 208. C-LOOK becomes 53 -> 37 -> 14 -> 183 -> 124 -> 122 -> 98 -> 67 -> 65, totalling 16+23+169+59+2+24+31+2 = 326.
There is one convention trap. On the higher-direction C-LOOK route, ignoring only the wrap changes the total to 322-169 = 153. The service order stays unchanged. Use that result only when the question explicitly excludes circular return movement.

6. Worked example 2: use the partition method on a fresh queue
Take cylinders 0 to 199, head 50, direction higher, and requests 176, 79, 34, 60, 92, 11, 41, 114. Sorting gives 11, 34, 41 | 50 | 60, 79, 92, 114, 176.
LOOK follows 50 -> 60 -> 79 -> 92 -> 114 -> 176 -> 41 -> 34 -> 11. Its movements are 10, 19, 13, 22, 62, 135, 7, 23, so 10+19+13+22+62+135+7+23 = 291 cylinders.
C-LOOK follows 50 -> 60 -> 79 -> 92 -> 114 -> 176 -> 11 -> 34 -> 41. Its movements are 10, 19, 13, 22, 62, 165, 23, 7, totalling 321 cylinders.
Use three checks: eight requests need eight movement terms, every request must appear once, and the initial head is not a serviced request.
7. How exam-style questions test LOOK and C-LOOK, and the traps to catch
Common forms ask you to derive the service order, calculate total or average movement, recognise an algorithm from a route, change the initial direction, decide whether endpoints are visited, or apply an explicit circular-return convention. For the wider Graduate Aptitude Test in Engineering (GATE) subject map, use Operating Systems for GATE.
Follow seven steps: mark the head; sort requests; split below and above; write the direction; choose reverse or wrap; write the complete route; sum absolute consecutive differences. Then try multiple choice questions (MCQs) on First Come First Served (FCFS), Shortest Seek Time First (SSTF), and SCAN in Disk Scheduling MCQs: FCFS, SSTF, SCAN.
Wrong move | Correction |
|---|---|
Follow the original queue order | Sort by cylinder for the directional sweep. |
Make LOOK visit | Turn at the last pending request. |
Reverse C-LOOK after its jump | Continue in the original direction. |
Assume one answer without a direction | Compute both directions or request the missing input. |
Add cylinder labels | Add absolute consecutive movements. |
Ignore the wrap by habit | Follow the stated counting convention. |
8. LOOK and C-LOOK: the short version and next step
Remember: LOOK reverses at the furthest request; C-LOOK wraps between furthest requests and keeps the same service direction. With head 53, higher direction and the eight supplied requests, the checked totals are 299 for LOOK and 322 for C-LOOK when the wrap is counted.
If a route touches 199 although its highest request is 183, it is not LOOK here. If it then wraps to 0, it is C-SCAN, not C-LOOK. Redo example 2 without looking, then compare your answers with 291 and 321.
For broader structured preparation, use GATE Guidance by Sanchit Sir and the GATE CS Exam Preparation category. The first organises a study route; the second collects related Computer Science courses.
Keep learning
SCAN and C-SCAN Disk Scheduling MCQs: 12 Solved Questions with Head-Movement Traces
Practise 12 SCAN and C-SCAN disk scheduling questions, then check each path against worked explanations covering endpoints, reversals and circular wraps.
LOOK and C-LOOK Algorithm MCQs: 10 Solved Questions with Explanations
Solve 10 LOOK and C-LOOK MCQs, from core definitions to complete service-order and seek-distance calculations, with a fresh explanation for every answer.
SCAN and C-SCAN Algorithms: Worked Example, Differences and Exam Traps
Solve the same eight-request queue with SCAN and C-SCAN, then learn how endpoints, direction, circular return, and service order change the answer.
FCFS and SSTF Disk Scheduling: Worked Examples and Exam Traps
Trace FCFS and SSTF on the same queue, compare 640 with 236 cylinders, and learn how to handle ties, arrivals, starvation and common traps.





