in Operating System edited by
19,312 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__________.
in Operating System edited by
19.3k views

4 Comments

Its mentioned in the question that we have to move towards larger value
2
2
edited by

deleted

0
0

Total number of head movements $= (191-63)+(191-10)+(47-10)=128+181+37=346$

0
0

5 Answers

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

4 Comments

@Sourajit25 @Hirak
"The head is initially at cylinder number 63, moving towards larger cylinder numbers on its servicing pass. "

hope that helps

3
3
In CSCAN head traverses the disk and till the final end of the disk and without reversing back(R/W) (just like in SCAN)the head goes to the beginning of the disk without servicing requests in the return round.Thats how it works.
0
0
12.2 (e) C-SCAN answer should be 9985.(And not given 9813)

143 → 4999 = 4856

4999 → 0 = 4999

0 → 130 = 130

so, 4858 + 4999 + 130 = 9985.

Anyone please check and confirm.
0
0
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

1 comment

much needed.. support..
6
6
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
by

4 Comments

Why? that is not considered?? and i think you have implemented LOOK and not CLOOK..
0
0
@abhilash

Sorry. I was wrong. I had modified my answer with CLOOK algorithm.
2
2
191->199

199->0

why these two are eliminated?
0
0
Because this is c-Look not C-scan
3
3
5 votes
5 votes

We can use this method 

edited by
Answer:

Related questions