GATE 2020 CS – Question 45
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)
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?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (B) Q is serviced after S, but before T.
Explanation
Head starts at 100. Requests: P=155, Q=85, R=110, S=30, T=115. SSTF always serves the closest pending cylinder.
| Head at | Distances | Served |
|---|---|---|
| 100 | R 10, Q 15, T 15, P 55, S 70 | **R (110)** |
| 110 | T 5, Q 25, P 45, S 80 | **T (115)** |
| 115 | Q 30, P 40, S 85 | **Q (85)** |
| 85 | S 55, P 70 | **S (30)** |
| 30 | P 125 | **P (155)** |
Order served: R, T, Q, S, P.
- (A) T before P: true.
- (B) "Q is serviced after S, but before T": false, because Q is served after T and before S.
- (C) The head moves down from 115 to 85 to 30 and then up to 155, so it reverses direction between servicing Q and P: true.
- (D) R before P: true.
The FALSE statement is (B).