GATE / CS ARCHIVE

GATE CSE 2009 / QUESTION 31

SSTF total disk movement

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

GATE 2009, Q31 2 marks · MCQ
Report issue

I/O & Disk Scheduling

Question 31, GATE 2009: A disk has 100 cylinders, head initially 50, all requests pending in listed order 4, 34, 10, 7, 19, 73, 2, 15, 6, 20. SSTF costs 1 ms per cylinder moved. Total seek time? A 95; B 119; C 233; D 276 ms.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Step through it (12 steps)

With all listed requests pending, SSTF visits 50→34→20→19→15→10→7→6→4→2→73. The decreasing leg costs 48 cylinders and the final increasing leg 71, totaling 119. At 1 ms per adjacent cylinder the seek time is 119 ms, B, excluding unspecified transfer/rotation costs.

At 50, the nearest pending request is 34 (distance 16), not 73 (distance 23). From 34 choose 20, then 19, 15, 10, 7, 6, 4, 2, always the nearest remaining cylinder. This monotone descent costs 50−2=48 in total. Only 73 then remains, costing 73−2=71. Total movement 119 times 1 ms gives 119 ms. Initial request order is irrelevant after all are pending under SSTF; FCFS would follow that order and produce a different answer.

Original paper, page 7