Bird
0
0

Using the SCAN disk scheduling algorithm, if the disk head starts at position 60 and the requests are at [15, 25, 55, 75, 85], what is the order of servicing requests when the head moves towards the highest track number first?

medium📝 Analysis Q4 of 15
LLD - Design — Elevator System
Using the SCAN disk scheduling algorithm, if the disk head starts at position 60 and the requests are at [15, 25, 55, 75, 85], what is the order of servicing requests when the head moves towards the highest track number first?
A[60, 75, 85, 55, 25, 15]
B[60, 55, 25, 15, 75, 85]
C[60, 75, 85, 15, 25, 55]
D[60, 85, 75, 55, 25, 15]
Step-by-Step Solution
Solution:
  1. Step 1: Identify head direction and requests

    The head starts at 60 and moves towards the highest track number first.
  2. Step 2: Service requests in ascending order from 60 upwards

    Requests greater than or equal to 60 are 75 and 85, serviced in order: 75, then 85.
  3. Step 3: Reverse direction and service remaining requests

    After reaching the highest request (85), the head reverses and services requests less than 60 in descending order: 55, 25, 15.
  4. Final Answer:

    [60, 75, 85, 55, 25, 15] -> Option A
  5. Quick Check:

    Head moves up first, then down servicing requests accordingly [OK]
Quick Trick: Service requests in head direction first, then reverse [OK]
Common Mistakes:
MISTAKES
  • Servicing requests in ascending order regardless of head direction
  • Not reversing direction after reaching the end
  • Skipping requests on the return path

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes