Q12.Marks: +2.0UGC NET Paper 2: Computer Science17th June 2023
Consider a disk system with cylinders. The request to access the cylinders occurs in the following sequence:
4, 34, 10, 7, 19, 73, 2, 15, 6, 20
Assuming that 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 policy is used?
1.119 ms✓ Correct
2.120 ms
3.142 ms
4.146 ms
Solution
The correct answer is 119 ms
Key PointsThe Shortest Seek Time First (SSTF) Algorithm operates on the principle of servicing all requests in proximity to the current head location before moving further away. This strategy centralizes on serving requests that are nearest to the present location of the head, with the rationale being that the distance traversed by the head increases with the number of cylinders, so the SSTF algorithm prioritizes pending requests that are closest to the current position of the head.
=> 50 - 2 = 48
=> 73 - 2 = 71
=> time taken to satisfy all requests = 48 + 71 = 119