retagged by
5,643 views
2 votes
2 votes
Suppose that a disk drive has 5,000 cylinders, numbered 0 to 4999. The
drive is currently serving a request at cylinder 143, and the previous
request was at cylinder 125. The queue of pending requests, in FIFO
order, is:

86,1470, 913, 1774, 948, 1509, 1022,1750,130

Starting from the current head position, what is the total distance (in
cylinders) that the disk arm moves to satisfy all the pending requests
for C-SCAN?
retagged by

2 Answers

0 votes
0 votes

The requests in sorted order are:

83, 130, 913, 948, 942, 1022, 1470, 1509, 1750, 1771

The head is currently position at 143 and previous head position was 125. So, its moving to right extreme.

So, it moves to 4999. That counts to 4999 - 143 = 4856

Then it jumps to 0 and starts serving in same direction as before.

So, 130 seeks after jumping.

So, total head movements = 4856 + 130 = 4986

REF: http://www.cs.iit.edu/~cs561/cs450/disksched/disksched.html

Related questions

0 votes
0 votes
1 answer
2
air1ankit asked Dec 9, 2017
621 views
any shortcut method for this??
0 votes
0 votes
0 answers
4
Na462 asked Jul 12, 2018
435 views
I solved this question correctly. I have a slight doubt though if say in question it says that Disk address is of K bits then what it represents 2^k Sectors or 2^k blocks...