in GATE retagged by
742 views
2 votes
2 votes
A disk has $200$ cylinders numbered $0$ to $199$ . The drive is currently serving a request at cylinder $53$, and the previous request was at cylinder $25$. The queue of pending requests, in $FIFO$ order, is –-- $98, 183, 37, 122, 14, 124, 65, 67.$

Starting from the current head position, the total distance the disk arm moves to satisfy all the pending requests for $C-LOOK$ disk-scheduling discipline is _____ cylinders.
in GATE retagged by
by
742 views

4 Comments

Bikram sir 

 Why we are considering the huge jump?

Ans should be 153.

According to the link :- http://www.cs.iit.edu/~cs561/cs450/disksched/disksched.html

Also on wikipedia in C -Look :- The huge jump from one end request to the other is not considered as a head movement as the cylinders are treated as a circular list.

1
1

@kash0611 this link has spoiled life of many gate aspirants :/ this is the only link which says we don't count huge jump, and it looks also that this is an iit website which is not actually.

0
0
I also thought of this link when I decided not to add the count for huge jump  :-(
0
0

1 Answer

2 votes
2 votes
Best answer

14   37     53    65    67      98   122    124         183          199

   For  C-LOOK the order is : 53 , 65 , 67 , 98 , 122 , 124 , 183 , 14 , 37            

                  

The total distance:

​​​​​​(65-53)+(67-65)+(98-67)+(122-98)+(124-122)+(183-124)+(183-14)+(37-14) = 322 Cylinders

selected by

3 Comments

 how its correct sir do 183-14 what it should be 183-37 then 37-14

0
0

Wrong answer , as the question has asked C-look scheduling algorithm. In which we go to last sector on on side and come back to last sector to be serviced on the other side.

correct answer would be:

(65-53)+(67-65)+(98-67)+(122-98)+(124-122)+(183-124)+(183-14) = 299 Cylinders

0
0

@Cultured_Noob You didn’t service 37. Your statement " come back to last sector to be serviced on the other side" is true, but after we come to the last sector of other side we also need to service the remaining ones from that side.

This is different from LOOK algo as in LOOK we don't go to the extreme ends and after servicing one side, we start servicing the other side.

0
0
Answer:

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

64.3k questions

77.9k answers

244k comments

80.0k users