LOOK Disk Scheduling

 

LOOK Disk Scheduling

🔷 What is LOOK?

LOOK is an improved version of SCAN.

👉 Key idea:

  • The disk head does NOT go to the end of the disk

  • It only goes as far as the last request in that direction, then reverses


1. How LOOK Works

🔷 Steps

  1. Start at current head position

  2. Move in a chosen direction

  3. Service all requests in that direction

  4. Stop at the last request (not disk end)

  5. Reverse direction

  6. Continue servicing remaining requests


2. Example 

🔹 Given:

  • Request queue:

    98, 183, 37, 122, 14, 124, 65, 67
  • Initial head position:

    53
  • Direction:
    👉 Moving toward 0 (same as SCAN example)


🔷 Step-by-Step Execution

Step 1: Move Left (toward 0)

Requests less than 53:

37, 14

Service in descending order:

53 → 37 → 14

👉 Stop at 14 (last request in this direction)
❌ Do NOT go to 0


Step 2: Reverse Direction

Now move right and service remaining requests:

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

🔷 Final Order of Service

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

 3. Total Head Movement

53→37 = 16 37→14 = 23 14→65 = 51 65→67 = 2 67→98 = 31 98→122 = 24 122→124 = 2 124→183 = 59

👉 Total = 208 cylinders


4. Advantages

✅ 1. Less Movement than SCAN

  • Avoids unnecessary travel to disk ends


✅ 2. Better Performance

  • Reduces seek time


✅ 3. Fairness

  • No starvation (like SCAN)


 5. Disadvantages

🔴 1. Slight Waiting Issues

  • Requests just behind head may wait longer


6. Key Insight

👉 Difference from SCAN:

  • SCAN → goes to disk end (0 or max)

  • LOOK → stops at last request

👉 Result:

  • Saves time

  • Improves efficiency


7. Comparison Snapshot

Algorithm        Total Movement
FCFS                640
SSTF            236
SCAN            (higher than LOOK)
LOOK            208

8. Simple Analogy

  • SCAN → Elevator goes to top floor even if no one is there

  • LOOK → Elevator stops at highest requested floor and turns back


9. Key Takeaways

  • LOOK = optimized SCAN

  • Avoids unnecessary movement

  • Improves efficiency

  • Widely used in practice

Comments

Popular posts from this blog

Operating Systems OS PCCST403 Semester 4 BTech KTU CS 2024 Scheme

Introduction to Operating System -Virtualization, Concurrency, and Persistence

Operating Systems PCCST403 Scheme and Syllabus