GATE / CS ARCHIVE

GATE CSE 2016 SET 1 / QUESTION 48

GATE CSE 2016 Set 1 Q48

Operating Systems · I/O & Disk Scheduling · Full GATE CSE 2016 Set 1 paper

GATE 2016 Set 1, Q48 2 marks · NAT
Report issue

I/O & Disk Scheduling

Question 48, GATE 2016: A disk has cylinders 0–199 and pending requests 47,38,121,191,87,11,92,10. Its head starts at 63 moving upward. Using C-LOOK, find the total cylinder movement to service all requests, including the wrap movement.
Tap to enlarge
Answer & solution

Official answer: 346.0 : 346.0

Our answer: 346

Step through it (10 steps)

C-LOOK services 87, 92,121,191 on the upward pass, wraps directly to 10, then services 11, 38, 47. Movement is(191−63)+(191−10)+(47−10)=128+181+37=346 cylinders. The wrap is physical head movement and counts; the head does not visit unrequested endpoints 0 or 199.

Sort upward requests as 87,92,121,191 and below-head requests as 10,11,38,47. C-LOOK wraps from the highest pending request directly to the lowest pending request and resumes upward service, unlike C-SCAN which visits physical endpoints. The individual moves are 24,5,29,70,181,1,27,9; their sum 346 matches the compact span calculation. The large jump services no intermediate request but is still physical head travel, so excluding it would undercount.

Original paper, page 18 · Answer key