1. Why LOOK Exists

Before understanding LOOK, let's revisit a limitation of SCAN.

In SCAN, the disk head continues moving all the way to the physical end of the disk before reversing direction, even if there are no pending requests near that end.

Consider a disk with tracks numbered:

0 ------------------------------------ 199

Suppose the farthest request on the right side is:

183

In SCAN, the head still performs:

183 → 199

before reversing.

The Problem

This movement does not service any request.

It is simply extra travel.

As a result:

  • Additional seek time is incurred

  • Overall head movement increases

  • Disk efficiency decreases

What OS Designers Wanted

A scheduling policy that:

  • Retains the fairness of SCAN

  • Eliminates starvation

  • Avoids unnecessary movement to disk ends

  • Improves seek performance

This led to the development of LOOK.

Key Insight

Instead of moving to the physical end of the disk, LOOK reverses direction as soon as it reaches the last pending request in the current direction.


2. What is LOOK?

LOOK is a disk scheduling algorithm in which the disk head moves in one direction, services all requests along the way, and reverses direction at the last request rather than continuing to the end of the disk.

Definition

The disk head "looks ahead" to determine whether any requests remain in the current direction.

If no requests remain, it immediately reverses direction.

Core Principle

Move in one direction
        ↓
Service requests
        ↓
Reach last request
        ↓
Reverse direction
        ↓
Continue servicing

Why the Name "LOOK"?

Because the algorithm checks ("looks") ahead before deciding whether to continue moving.

Key Insight

LOOK is essentially an optimized version of SCAN that avoids unnecessary travel.


3. How LOOK Works Internally

Unlike SCAN:

Move Right
      ↓
Reach Disk End
      ↓
Reverse

LOOK performs:

Move Right
      ↓
Reach Last Request
      ↓
Reverse

Internal Strategy

At any point:

  1. Identify all pending requests.

  2. Continue moving in the current direction.

  3. Service requests in sorted order.

  4. When no further request exists in that direction:

    • Reverse immediately.

  5. Continue servicing requests in the opposite direction.

Key Insight

LOOK uses request locations—not disk boundaries—to determine movement.


4. Numerical Example

Given

Initial Head Position:

53

Initial Direction:

Right

Request Queue:

98, 183, 37, 122, 14, 124, 65, 67

Disk Range:

0 – 199

Step 1: Divide Requests

Requests to the right of 53:

65, 67, 98, 122, 124, 183

Requests to the left of 53:

37, 14

Step 2: Sort Requests

Right Side (Ascending):

65 → 67 → 98 → 122 → 124 → 183

Left Side (Descending after reversal):

37 → 14

Step 3: Determine Service Order

Since the head initially moves right:

53 → 65 → 67 → 98 → 122 → 124 → 183

At this point:

No more requests exist on the right.

Therefore:

Reverse Direction

Continue servicing:

183 → 37 → 14

Final Service Sequence

53 → 65 → 67 → 98 → 122 → 124 → 183 → 37 → 14

Important Observation

Unlike SCAN:

53 → ... → 183 → 199 → ...

LOOK performs:

53 → ... → 183

Reverse Immediately

No unnecessary trip to track 199 occurs.


5. Visualization of LOOK Movement

0 --------------------------------------------------- 199

14      37          53  65 67   98 122 124       183

                Head

Move Right →
53 → 65 → 67 → 98 → 122 → 124 → 183

Reverse ←

183 → 37 → 14

Key Observation

The head only travels where requests exist.


6. Total Head Movement Calculation

Step-by-Step

53 → 65   = 12

65 → 67   = 2

67 → 98   = 31

98 → 122  = 24

122 → 124 = 2

124 → 183 = 59

183 → 37  = 146

37 → 14   = 23

Total Head Movement

12 + 2 + 31 + 24 + 2 + 59 + 146 + 23
= 299 Cylinders

Final Answer

Total Head Movement = 299 Cylinders

7. Why LOOK Performs Better Than SCAN

The primary improvement comes from eliminating unnecessary movement.

In SCAN

After servicing the last request:

183 → 199

The head continues to the disk boundary.

In LOOK

The head stops at:

183

and reverses immediately.

Saved Movement

199 - 183 = 16 cylinders

Since SCAN must travel this extra distance, LOOK achieves lower total movement.

Comparison

SCAN = 331 Cylinders

LOOK = 299 Cylinders

Improvement

331 - 299 = 32 Cylinders Saved

Key Insight

LOOK retains SCAN's behavior while removing waste.


8. Fairness and Starvation Analysis

Does LOOK Cause Starvation?

No

Why?

The head continues sweeping in both directions.

Every pending request eventually lies in its path.

Result

Guaranteed Service

for all requests.

Key Insight

LOOK preserves the fairness of SCAN while improving efficiency.


9. Performance Characteristics

9.1 Seek Time

Lower than SCAN because:

No unnecessary movement to disk ends

9.2 Throughput

Higher than SCAN.

Less movement means:

  • More requests serviced

  • Less wasted time


9.3 Response Time

Generally good and predictable.


9.4 Fairness

High.

Requests are serviced in both directions.

Key Insight

LOOK provides a strong balance between efficiency and fairness.


10. Advantages of LOOK

10.1 Reduced Head Movement

Avoids unnecessary travel to disk boundaries.


10.2 Better Performance

Lower seek time compared to SCAN.


10.3 No Starvation

Every request is eventually serviced.


10.4 Fair Scheduling

Requests on both sides receive service.


10.5 Simple Improvement Over SCAN

Only a small modification is required.

Key Insight

LOOK achieves most of the benefits of SCAN with better efficiency.


11. Disadvantages of LOOK

11.1 Direction-Based Waiting

Requests on the opposite side may still wait until reversal.


11.2 Slight Positional Bias

Requests near the current direction are serviced sooner.


11.3 Not Globally Optimal

Total movement may still exceed SSTF in some cases.

Key Insight

LOOK improves SCAN but does not eliminate all scheduling inefficiencies.


12. Real-World Analogy

Imagine an elevator in a building.

SCAN Behavior

Go to top floor
Even if nobody requested it
Then come down

LOOK Behavior

Go only as high as the highest requested floor
Then reverse

Result

Less travel.

Faster service.

Key Insight

LOOK behaves like an intelligent elevator that avoids unnecessary trips.


13. LOOK vs SCAN

FeatureSCANLOOK
Reaches Disk EndYesNo
Reversal PointDisk BoundaryLast Request
Head MovementHigherLower
Seek TimeHigherLower
FairnessHighHigh
StarvationNoNo
EfficiencyGoodBetter

14. LOOK vs SSTF vs SCAN

FeatureSSTFSCANLOOK
StrategyNearest RequestFull SweepOptimized Sweep
Seek TimeLowest (Usually)ModerateLower than SCAN
FairnessPoorGoodGood
StarvationPossibleNoNo
PredictabilityLowGoodGood
ComplexityModerateModerateModerate

15. LOOK at a Glance

PropertyLOOK
Full FormLook Disk Scheduling
DirectionBoth Directions
Reversal PointLast Pending Request
StarvationNo
FairnessHigh
Seek TimeLower than SCAN
EfficiencyBetter than SCAN
ComplexityModerate
Practical UsageModern Disk Scheduling Variants

Final Insight

LOOK is an optimized version of SCAN that eliminates unnecessary movement to the physical ends of the disk. Instead of sweeping all the way to track 0 or the maximum track number, the head reverses as soon as the last pending request in the current direction is serviced. This reduces seek time, improves throughput, preserves fairness, prevents starvation, and makes LOOK one of the most practical and efficient disk scheduling algorithms.