Disk Scheduling Problem
Disk Scheduling Problem
Suppose that a disk drive has 200 cylinders numbered from 0 to 199.the drive is currently
serving a request at cylinder 100 and the previous request was at the cylinder 125. The queue
of pending requests, in FIFO order is
27, 129, 110, 186, 147, 41, 10, 64 and 120.
What is the total distance that the disk arm moves to satisfy all the pending requests for each
of the following disk-scheduling algorithms?
FCFS Scheduling
The sequence of head movement is
100 - >27- >129- > 110- > 186- > 147- > 41- > 10- > 64 - > 120
SSTF Scheduling
The sequence of head movement is
100 ->110 ->120 ->129 ->147 ->186 ->64 ->41 ->27 ->10
Total head movement = 10 + 10 + 9 + 18 + 39 + 122 + 23 + 14 + 17 = 262
SCAN Scheduling
The sequence of head movement is
100 ->64 ->41 ->27 ->10 ->0->110 ->120 ->129 ->147 ->186
After the head services the request at cylinder 10, it travels to cylinder 0 and from there reverses the
scan direction moving outwards. So the next request serviced is at cylinder 110.
Total head movement = 36 + 23 + 14 + 17 + (10 + 110) + 10 + 9 + 18 + 39 = 286
C-SCAN Scheduling
The sequence of head movement is
100 ->64->41->27->10->0->199->186->147->129->120->110
After the head services the request at cylinder 10, it will move till cylinder 0 and then returns to the
last cylinder 199 and from their moves to cylinder 186.
Total head movement = 36 + 23 + 14 + 17 + (10 + 199 + 13) + 41 + 18 + 9 + 10 = 390
LOOK Scheduling
The sequence of head movement is
100 ->100 ->64 ->41 ->27 ->10 ->110 ->120 ->129 ->147 ->186
After the head services the request at cylinder 10, instead of moving till cylinder 0, it reverses its
direction to service the request ay cylinder 110.
Total head movement = 36 + 23 + 14 + 17 + 100 + 10 + 9 + 18 + 39 = 266
C-LOOK Scheduling
The sequence of head movement is
100 ->64->41->27->10->186->147->129->120->110
After the head services the request at cylinder 10, it will move till cylinder 0 and then returns to the
last cylinder 199 and from their moves to cylinder 186.
Total head movement = 36 + 23 + 14 + 17 + 176 + 41 + 18 + 9 + 10 = 344