The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+31 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__________.
asked in Operating System by Loyal (7.1k points)
edited by | 7.2k views
why you reopened this question.
I dnt know in what way he/she asked so i reopened

If not close that question

but in clook it will go to the end .why we are not conisdering 199 at last point
for c scan/ scan it will go till last track ...

 sid1221 yes u r right .thnq



How to determine the direction?

Why it can't be :




Total head movement=338 ??

7 Answers

+55 votes
Best answer
$63 \rightarrow 191 = 128$
$191 \rightarrow 10 = 181$
$10 \rightarrow 47 = 37$
Total $= 346$
answered by Loyal (9.6k points)
edited by
Here that jump is considered
here too its considered
this is from IITB.
This one is from IISC prof's course.. here in problem 5.3 see the answer. if you calculate, youll find here also the long jump is considered.. i dont know why in the link you posted it is said not to consider the long jump..
Logically when the head is at 191.. it has to be moved to 10.. so head has to be moved over 181 tracks..and that should be considered for head movements...

and even in WIlliam Stalings, they have given an example for CSCAN(with look) in that they have considered it has head movement..

I really dont know why its given there like that.. Also it is not a IIT link, it is some Illunosis Institute of Technology..
More proof from Solutions to Galvin 7th edition..

pic 1

pic 2

See the f-bonus part.. try to calculate yourself.. youll see the long jump is considered.. PERIOD

plz provide the link of solution of gelvin 7th edition......

I have one confusion.

In the question 12.2. we have disk cylinders from 0-4999. Head in C-SCAn goes from 143 to 4999. But after Jump it starts from 86. It does not start from 0.

So what is C-SCAN excatly?
Thank you sir. I also read it from the pdfs and various links which are there on Internet but later when I read your comment I directly jumped to the standard book william stalng and found that jump time is included. I don't know why people give video lectures on youtube or upload pdfs when they don't have their concepts clear. Feeling irritated.
nearly everyone gives as reference for  disk scheduling algorithms and it's given wrong there.
someone please clear this query
I think for C SCAN it shall start from 0 again
please clear!
C-SCAN should be 9855.

someone plz check?
yes u r right. Solution is given wrong.
it means we will always consider movement in both csan and clook

Even the method given in this wikipedia link is wrong 

How to determine the direction?

Why it can't be :

$63 - 10 = 53$

$191 - 10 = 181$

$191 - 87 = 104$

Total head movement$ = 338$ ??
I have the same doubt..
+27 votes

Answer is 346 as already calculated in answers here.Those having some doubt regarding long jump ,check this image, Now in 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 purpose of disk scheduling algorithms is to reduce such Head movements by finding an Optimal algorithm.If you ignore the move which is actually happening in disk,that doesn't serve the purpose of analyzing the algorithms.

answered by Loyal (8.1k points)
much needed.. support..
+19 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
answered by (155 points)
edited by
Why? that is not considered?? and i think you have implemented LOOK and not CLOOK..

Sorry. I was wrong. I had modified my answer with CLOOK algorithm.


why these two are eliminated?
Because this is c-Look not C-scan
+2 votes

Answer is 346.

In CSCAN, we have a longer jump, from one end of disk to the other.

answered by Loyal (9.2k points)
but in gate key i guess answer is 165(u can check geeksforgeeks)
Thats wrong. Answer cannot be 165 in any way.
thanks for the confirmation :)
+1 vote

We can use this method 

answered by Active (4.1k points)
–3 votes

Ans is 165 that huge jump in C-LOOK and C-SCAN doesn't count. That's why it's circular-LOOK and Circular-SCAN.


answered by (455 points)
–3 votes
Refer bootstrapper youtube videos on youtube all doubts will be cleared
answered by (441 points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,588 questions
54,197 answers
71,152 users