Professional Documents
Culture Documents
Algorithms
requests without
coming in servicing
its path. any
request
then it
turns back
and starts
moving in
that
direction
servicing
the
FCFS SSTF SCAN C-SCAN LOOK
remaining
requests.
Example:
Consider a disk with 200 tracks (0-199) and that the disk request
queue has random requests in it. The following track requests for
I/O to blocks on cylinders:
60, 143, 15, 185, 85, 120, 33, 28, 146
Consider that the read/write head is initially at cylinder 70.
Compute the total head movements for a 200 track disk (0-199)
FCFS SSTF SCAN C-SCAN LOOK
Total Head Total Head Total Head Total Head Total Head
Movement Movement Movement Movement Movement
s = (70-60) s = (70-60) s = (199- s = (199- s = (185-
+ (143-60) + (85-60) + 70) + (199- 70) + (199- 70) + (185-
+ (143-15) (120-85) + 15)= 313 0) + (60-0) 15)= 285
+ (185-15) (143-120) + cylinders. = 388 cylinders
+ (185-85) (146-143) + cylinders
+ (120-85) (185-146) +
+ (120-33) (185-33) +
+ (33-28) + (33-28) +
(146-28) (28-15)
FCFS SSTF SCAN C-SCAN LOOK
= 736 = 305
cylinders cylinders