Consider a disk with the 100 tracks numbered from 0 to 99 rotating at 3000 rpm. The number of sectors per track is 100 and the time to move the head between two successive tracks is 0.2 millisecond.
- Consider a set of disk requests to read data from tracks 32, 7, 45, 5 and 10. Assuming that the elevator algorithm is used to schedule disk requests, and the head is initially at track 25 moving up (towards larger track numbers), what is the total seek time for servicing the requests?
- Consider an initial set of 100 arbitrary disk requests and assume that no new disk requests arrive while servicing these requests. If the head is initially at track 0 and the elevator algorithm is used to schedule disk requests, what is the worse case time to complete all the requests?
Following are my answers after solving
a) I get the answer $[161*.2 ]= 32.2ms $
$disk seeks using elevator (25\rightarrow 32\rightarrow 45\rightarrow 99\rightarrow 10\rightarrow 7\rightarrow 5) =161 seeks$ .
b) Worst case means all disk requests are in different tracks
$(0\rightarrow 1\rightarrow 2\rightarrow 2\cdot \cdot \cdot \cdot \cdot \rightarrow 98\rightarrow 99)$
$worst case time = 100(.2 +Rotational Latency)= 100(.2 +10)=1020ms$
IS this the correct way of solving this problem or am I missing something?
Please help