GATE / CS ARCHIVE

GATE CSE 2020 / QUESTION 35

GATE CSE 2020 Q35

Operating Systems · I/O & Disk Scheduling · Full GATE CSE 2020 paper

GATE 2020, Q35 2 marks · MCQ
Report issue

I/O & Disk Scheduling

Question 35, GATE 2020: SSTF disk scheduling begins at cylinder 100 with requests P:155,Q:85,R:110,S:30,T:115. Which is false? A T before P; B Q after S but before T; C direction reverses between service of Q and P; D R before P.
Question 35, GATE 2020: SSTF disk scheduling begins at cylinder 100 with requests P:155,Q:85,R:110,S:30,T:115. Which is false? A T before P; B Q after S but before T; C direction reverses between service of Q and P; D R before P.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Worked explanation

Recompute the nearest remaining request after every move. From 100, distances to P,Q,R,S,T are 55,15,10,70,15, so R wins. From 110, T is 5 away; from 115, Q is 30 away versus P at 40 and S at 85, so Q wins. From 85, S is 55 away versus P at 70, so S wins, leaving P. The path is 100→110→115→85→30→155. T and R both precede P, and movement changes from decreasing to increasing at S between Q and P. B reverses the actual relation of Q to both S and T.

Derivation and answer

From100, nearest requests are R110 thenT115 thenQ85 thenS30 thenP155. The head distances for these choices are 10, 5, 30, 55, 125. Thus Q is before S and after T, making B false. The other assertions hold, including reversal at S between servicing Q andP.

Original paper, page 12 · Answer key