The GATE Grind

GATE 2016 CS – Question 58

Operating System · File Systems and Disk Performance · 2 marks · Numerical answer

Consider a disk queue with requests for I/O to blocks on cylinders 47, 38, 121, 191, 87, 11, 92, 10. The C-LOOK scheduling algorithm is used. The head is initially at cylinder number 63, moving towards larger cylinder numbers on its servicing pass. The cylinders are numbered from 0 to 199. The total head movement (in number of cylinders) incurred while servicing these requests is ________.

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 346

Explanation

Moving up from 63 the head serves 87, 92, 121 and 191, which is $191 - 63 = 128$ cylinders. C-LOOK then jumps back to the lowest request, 10, which is $191 - 10 = 181$ cylinders. It then moves up through 11, 38 and 47, which is $47 - 10 = 37$ cylinders. The total is $128 + 181 + 37 = 346$.