Home  |  MIT  |  Expressions  |  OS ASSIGNMENTS BIOGRAPHY  |  Friends  |  Photo Gallery  |  Search  |  Write for us  |  Contact Us  |  About Me

 

D I S K   S C H E D U L I N G   A L G O R I T H M

 

Q : Disk requests come into the disk drivers called cylinders 10,22,20,2,40,6 and 38 in that  
     order. A seek takes 6 msec. per cylinder moved. how much seek time is needed for  
     1) FCFS , 2) Closest Cylinder Next , 3) Elevator Algorithm (intially moving upward).  
     In all cases the arm is intialised at the cylinder 20.
Solution :
1)  F i r s t   C o m e   F i r s t   S e r  v e  (FCFS)
Request No. Cylinder No. Seek Time (in mSec.) Total Seek Time
1 10 (20 - 10) * 6

876 mSec.

2 22 (22 - 10) * 6
3 20 (22 - 20) * 6
4 2  (20 - 2)  * 6
5 40  (40 - 2)  * 6
6 6  (40 - 6)  * 6
7 38  (38 - 6)  * 6

2)  C l o s e s t  C y l i n d e r  N e x  t

Request No. Cylinder No. Seek Time (in mSec.) Total Seek Time
1 22 (22 - 20) * 6

360 mSec.

2 10 (22 - 10) * 6
3 6   (10 - 6) * 6
4 2   ( 6 - 2)  * 6
5 20  ( 20 - 2) * 6
6 38  (38 - 20) * 6
7 40  (40 - 38) * 6

3)  E l e v a t o r   A l g o r i t h m

Request No. Cylinder No. Seek Time (in mSec.) Total Seek Time
1 22 (22 - 20) * 6

360 mSec.

2 38 (38 - 22) * 6
3 40   (40 - 38) * 6
4 20   ( 40 - 20)  * 6
5 10  ( 20 - 10) * 6
6 6  (10 - 6) * 6
7 2  (6 - 2) *