Consider a disk system with 100 cylinders. The request to access the cylinders occur in the following sequences 4, 37, 10, 7, 19, 73, 2, 15, 6, 20 Assuming the head is currently at cylinder 50, what is the time taken to satisfy all requests if it takes 1 ms to move from one cylinder to adjacent one and shortest seek time first algorithm is used
Consider a disk system with 100 cylinders. The request to access the cylinders occur in the following sequences 4, 37, 10, 7, 19, 73, 2, 15, 6, 20 Assuming the head is currently at cylinder 50, what is the time taken to satisfy all requests if it takes 1 ms to move from one cylinder to adjacent one and shortest seek time first algorithm is used Correct Answer 119 ms
Disk scheduling algorithm: shortest seek time first
Order of request access: 4, 37, 10, 7, 19, 73, 2, 15, 6, 20
[ alt="F1 R.S. N.J. 17.09.2019 D1" src="//storage.googleapis.com/tb-img/production/19/09/F1_R.S._N.J._17.09.2019_D1.png" style="width: 308px; height: 161px;">
As shortest seek time algorithm has used the order followed is:
37,20,19,15,10,7,6,4,2,73
Total head movement: 13+17+1+4+5+3+1+2+2+71 =119
1 head movement = 1 ms
∴ total time to satisfy all request = 119 × 1ms = 119 ms
Tips and Tricks:
From the diagram, it can be seen that direction is not switched unless it reaches the lowest cylinder
Total head movement = (50 - 2) + (73 - 2) = 48 + 71 = 119
∴ Total time = 119ms.