Skip to main content

GATE CSE 2020Operating System › I/O, Disk Scheduling & File SystemsVerified

GATE CSE 2020 PYQ: Consider the following five disk access requests of the form (request id, cylinder number) that are present…

Consider the following five disk access requests of the form (request id, cylinder number) that are present in the disk scheduler queue at a given time.

(P,155),(Q,85),(R,110),(S,30),(T,115)(P, 155), (Q,85), (R,110),(S, 30), (T,115)

Assume the head is positioned at cylinder 100. The scheduler follows Shortest Seek Time First scheduling to service the requests.

Which one of the following statements is FALSE?

  1. A
    TT is serviced before PP.
  2. B
    QQ is serviced after SS,but before TT.
    Correct answer
  3. C
    The head reverses its direction of movement between servicing of QQ and PP.
  4. D
    RR is serviced before PP.

Answer

(B) Q Q Q is serviced after S S S ,but before T T T .

Approach

Under SSTF, the next request serviced is always the one with the minimum absolute cylinder distance from the current head position. Simulate the head movement step by step; then check each option against the obtained service order.

The SSTF service order is R, T, Q, S, P. The statement in option B says Q is serviced after S, but in the actual order Q is serviced before S; hence option B is FALSE.

Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.