1,861 views
1 votes
1 votes

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.

  1. 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?
  2. 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  crying

1 Answer

Best answer
0 votes
0 votes
a) 25-----32------45------99------10------7-------5

no of movements=168

so seek time=168*0.2=33.6 ms

B) worst case:

0--------99-------1--------98--------2.............. and so on

no of movements=99+98+97+.....1

=99*100/2

=4050

Related questions

1 votes
1 votes
0 answers
4
jatin khachane 1 asked Dec 11, 2018
1,124 views
Suppose a disk has 100 cylinders, numbered from 0 to 99. At some time the disk arm is at cylinder 20, and there is a queue of disk access requests for cylinders 10, 22, 6...