Suppose that a disk drive has 4,000 cylinders, numbered 0 to 3999. The drive is currently serving a request at cylinder 2250, and the previous request was at cylinder 1205. The queue of pending requests, in FIFO order, is:
2169, 1212,2800, 524, 3625
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 each of the following disk-scheduling algorithms (show your working steps)?
SCAN and CSCAN algorithm move the disk arm in one of the directions and service for all coming requests.
LOOK and CLOOK algorithm is similar to the SCAN and CSCAN in which the disk head doesn't move up to the end of the disk but it move till the last request at the end.
The list of the pending request is:
2169, 1212,2800, 524, 3625
The current position is = 2250
SSTF:
Total distance = (2250 - 2169) + (2800 - 2169) + (3625 - 2800) + (3625 - 1212) + (1212 - 524)
= 81 + 631 + 825 + 2413 + 688
= 4638
LOOK:
Total distance = (3625 - 2250) + (3625 - 524)
= 1375 + 3101
= 4476
C-SCAN:
Total distance = (3999 - 2250) + (3999 - 0) + (2169 - 0)
= 1749 + 3999 + 2169
= 7917
Get Answers For Free
Most questions answered within 1 hours.