Consider a disk system having 60 cylinders. Disk requests are received by a disk drive for cylinders 10, 22, 20, 2, 40, 6, and 38, in that order. Assuming the disk head is currently at cylinder 20, what is the time taken to satisfy all the requests if it takes 2 milliseconds to move from one cylinder to an adjacent one and Shortest Seek Time First (SSTF) algorithm is used ?
Consider a disk system having 60 cylinders. Disk requests are received by a disk drive for cylinders 10, 22, 20, 2, 40, 6, and 38, in that order. Assuming the disk head is currently at cylinder 20, what is the time taken to satisfy all the requests if it takes 2 milliseconds to move from one cylinder to an adjacent one and Shortest Seek Time First (SSTF) algorithm is used ? Correct Answer 120 milliseconds
The correct answer is option 3.
Key Points
Shortest Seek Time First (SSTF)
[ alt="F1 Raju Madhuri 20.04.2021 D6" src="//storage.googleapis.com/tb-img/production/21/04/F1_Raju_Madhuri_20.04.2021_D6.png" style="width: 484px; height: 236px;">
SSTF =(22-20+22-10+10-6+6-2+38-2+40-38)
=2+12+4+4+36+2
=60
It takes 2 milliseconds to move from one cylinder to adjacent one = 60x2 =120 milliseconds
∴ Hence the correct answer is 120 milliseconds.