📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!

  • google app store apple app store
  • ✖

      Question

      Which I/O scheduling algorithm prevents starvation of

      requests?
      A FCFS Correct Answer Incorrect Answer
      B SSTF Correct Answer Incorrect Answer
      C SCAN Correct Answer Incorrect Answer
      D LOOK Correct Answer Incorrect Answer
      E CLOOK Correct Answer Incorrect Answer

      Solution

      The SCAN scheduling algorithm, also called the Elevator Algorithm , prevents starvation by servicing requests in one direction until it reaches the end, then reversing direction. This ensures that every request, regardless of its position, gets serviced within a predictable timeframe.

      1. How SCAN Works: Requests are arranged based on their positions. The disk arm moves in a single direction, servicing requests, and reverses once it reaches the last request in that direction.
      2. Prevents Starvation: Since SCAN covers all requests in its path, even those far from the initial direction of the disk arm are eventually served.
      Example:
      • Requests: 98, 183, 37, 122, 14, 124, 65, 67 (Initial Head: 53)
      • SCAN Movement: 53 → 37 → 14 → Reverse → 65 → 67 → 98 → 122 → 124 → 183
      • This ensures fairness in servicing requests.
      Why Other Options Are Incorrect 1.    FCFS:
        • While fair, FCFS can lead to high seek times due to requests being served in the order of arrival without considering their proximity.
      2.    SSTF:
        • SSTF selects the closest request but may cause starvation for distant requests.
      3.    LOOK:
        • LOOK is similar to SCAN but does not traverse to the end of the disk; however, it also prevents starvation.
      4.    CLOOK:
        • CLOOK further optimizes LOOK but may still involve longer wait times for requests on the other side of the disk.

      Practice Next
      ask-question