edited by
19,162 views
45 votes
45 votes
Cylinder 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__________.
edited by

5 Answers

Best answer
75 votes
75 votes
$63 \rightarrow 191 = 128$
$191 \rightarrow 10 = 181$
$10 \rightarrow 47 = 37$
Total $= 346$
edited by
34 votes
34 votes

Answer is 346 as already calculated in answers here. Those having some doubt regarding long jump can check this image.

In the question Total Head Movements are asked. When Head reaches any End, there is no mechanism for head to jump directly to some arbitrary track. It has to Move. So it has to move along the tracks to reach Track Request on other side. Therefore head will move and we must count it.

Since the purpose of disk scheduling algorithms is to reduce such Head movements by finding an Optimal algorithm. If we ignore the move which is actually happening in disk, that doesn't serve the purpose of analyzing the algorithms.

edited by
23 votes
23 votes
Answer is 346.

63 -> 87 = 24

87 -> 92 = 5

92 -> 121 = 29

121 -> 191 = 70

191 -> 10 = 181

10 -> 11 = 1

11 -> 38 = 27

38 -> 47 = 9

Total: 24+5+29+70+181+1+27+9 = 346
edited by
Answer:

Related questions

85 votes
85 votes
18 answers
4
Sandeep Singh asked Feb 12, 2016
35,080 views
Let $G$ be a complete undirected graph on $4$ vertices, having $6$ edges with weights being $1, 2, 3, 4, 5,$ and $6$. The maximum possible weight that a minimum weight s...