In: Other
Suppose that a disk drive has 6,000 cylinders, numbered 0 to 5999. The drive is currently serving a request at cylinder 3150, and the previous request was at cylinder 1805 (Hint: this indicates the reading head's moving direction). The queue of pending requests, in FIFO order, is:
3511, 2332, 2800, 3192, 658, 1296, 1918, 1356, 5936, 2527
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?
a. FCFS
b. SSTF
c. SCAN
d. LOOK
e. C-SCAN
f. c-LOOK
Disk arm is currently at: 3150
a. FCFS:
Using FCFS scheduling , arm movements are in following order:
3150,3511,2332,2800,3192,658,1296,1918,1356,5936,2527.
Total number of distance covered by disk arm= 361+1179+468+392+2534+638+622+562+4580+3409=14745
b. SSTF:
Using SSTF arm movements are in following order:
3150,3192,3511,2800,2527,2332,1918,1356,1296,658,5936.
Total number of distance covered by disk arm= 42+319+711+273+195+414+562+60+638+5278=8492
c.SCAN:
Using SCAN arm movements are in following order:
3150,3192,3511,5936,5999,2800,2527,2332,1918,1356,1356,1296,658.
Total number of distance covered by disk arm=42+319+2425+63+3199+273+195+414+562+60+638=8190
d.LOOK:
Using LOOK arm movements are in following order:
3150,3192,3511,5936,2800,2527,2332,1918,1356,1296,658
Total number of distance covered by disk arm=42+319+2425+3136+273+195+414+562+60+638=8064
e. C-SCAN:
Using C-SCAN arm movements are in following order:
3150,3192,3511,5936,5999,0,658,1296,1356,1918,2332,2527,2800.
Total number of distance covered by disk arm=42+319+2425+63+6000+658+638+60+562+414+195+273=11649
f. C-LOOK:
Using C-LOOK arm movements are in following order:
3150,3192,3511,5936,658,1296,1356,1918,2332,2527,2800.
Total number of distance covered by disk arm= 42+319+2425+5278+638+60+562+414+195+273=10206