c program for this quesion
- by sashi
suppose that a disk drive has 5000 cylinders, numbered 0 to 4999. the drive is currently serving a request at cylinder 143 and the previous request was at cylinder 125. the ueue of pending requests in the given order is 86,1470,913,17774,948,1509,1022,1750,130.
write a 'c' program for finding the total distance in cylinders that the disk arm moves to satisfy all the pending reuests from the current heads position, using SSTF scheduling algorith.
seek time is the time for the disk arm to move the head to the cylider containing the desired sector.
sstf algorithm selects the minimum seek time from the current head position.