Answers for Homework 8
Next Track |
Distance |
13 |
13 |
115 |
102 |
74 |
41 |
136 |
62 |
116 |
20 |
38 |
78 |
95 |
57 |
186 |
91 |
53 |
133 |
77 |
24 |
125 |
48 |
87 |
38 |
194 |
107 |
Average Distance: 62.62
Total Distance: 814
Next Track |
Distance |
13 |
13 |
38 |
25 |
53 |
15 |
74 |
21 |
77 |
3 |
87 |
10 |
95 |
8 |
115 |
20 |
116 |
1 |
125 |
9 |
136 |
11 |
186 |
50 |
194 |
8 |
Average Distance: 14.92
Total Distance: 194
Next Track |
Distance |
13 |
13 |
38 |
25 |
53 |
15 |
74 |
21 |
77 |
3 |
87 |
10 |
95 |
8 |
115 |
20 |
116 |
1 |
125 |
9 |
136 |
11 |
186 |
50 |
194 |
8 |
Average Distance: 14.92
Total Distance: 194
In LOOK algorithm, the arm goes as far as the final request in each direction. Then it reverse direction immediately without first going all the way to the end of the disk.
In SCAN algorithm, disk arm will go in one direction until it gets to the end of the disk. Then it reverses to another direction.