Skip to content
Official PYQ · 2020

GATE CS 2020 Q35 — I/O Scheduling

Explain with AI

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 100100. The scheduler follows Shortest Seek Time First scheduling to service the requests.

Which one of the following statements is FALSE?

Choose one option
View worked solution

Answer: B

To find the order of service under the Shortest Seek Time First (SSTF) scheduling algorithm, we calculate the absolute distance from the current head position to all pending requests and choose the closest one at each step.

The initial head position is 100100. The pending requests are P(155)P(155), Q(85)Q(85), R(110)R(110), S(30)S(30), and T(115)T(115).

  1. From 100: Distances are P(55)P(55), Q(15)Q(15), R(10)R(10), S(70)S(70), T(15)T(15). The closest is R(110)R(110).
    Head moves to 110110.
  2. From 110: Distances are P(45)P(45), Q(25)Q(25), S(80)S(80), T(5)T(5). The closest is T(115)T(115).
    Head moves to 115115.
  3. From 115: Distances are P(40)P(40), Q(30)Q(30), S(85)S(85). The closest is Q(85)Q(85).
    Head moves to 8585.
  4. From 85: Distances are P(70)P(70), S(55)S(55). The closest is S(30)S(30).
    Head moves to 3030.
  5. From 30: Only P(155)P(155) remains.
    Head moves to 155155.

The servicing sequence is: RoToQoSoPR o T o Q o S o P.

Let's evaluate the options:

  • A: TT is serviced before PP. (True, TT is 2nd and PP is 5th)
  • B: QQ is serviced after SS, but before TT. (False, QQ is serviced before SS and after TT)
  • C: The head reverses direction between servicing QQ and PP. (True, head moves left from Q(85)oS(30)Q(85) o S(30), then reverses right to P(155)P(155))
  • D: RR is serviced before PP. (True, RR is 1st and PP is 5th)

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore I/O Scheduling questions