Disk Problem
Disk Problem
the drive is
currently serving a request at cylinder 53 , and the previous request was at
cylinder 25. The queue of pending requests , in FIFO order is
Starting from the current head position, show the total distance ( in cylinders) that
the disk arm moves to satisfy all the pending requests for each of the following
disk-scheduling disciplines?
I. FCFS
II. SSTF
III. LOOK
IV. C-LOOK
V. Scan
VI. C-Scan
ANSWER
I. FCFS
53 98
183
37
122
14
65 124
67
The total distance:
(98-53)+(183-98)+(183-37)+(122-37)+(122-14)+(124-14)+(124-
65)+(67-65)= 640 Cylinders
In another way:
ii. SSTF
65
37 67
14
98
122
124
183
(65-53)+(67-65)+(67-37)+(37-14)+(98-14)+(122-98)+(124-122)+(183-
124)= 236 Cylinders
In another way:
iii. Scan
65
67
98
122
124
183
199
37
14
In another way:
65
67
98
122
124
183
37
14
In another way
65
67
98
122 124
183 199
0 14
37
In another way:
In another way