written 5.9 years ago by | modified 3.0 years ago by |
Calculate average seek length using FIFO ,SSTF, SCAN , C-SCAN. Give which disk scheduling is best for this scenario.
written 5.9 years ago by | modified 3.0 years ago by |
Calculate average seek length using FIFO ,SSTF, SCAN , C-SCAN. Give which disk scheduling is best for this scenario.
written 3.0 years ago by |
Total Head Movements
= (100 - 55) + (58 - 55) + (58 - 39) + (39 - 18) + (90 - 18) + (160 - 90) + (160 - 150) + (150 - 38) + (184 - 38)
= 45 + 3 + 19 + 21 + 72 + 70 + 10 + 112 + 146
= 498 Cylinders
Average Seek Length = 498/9 = 55.34 ms
Total Head Movements
= (100 - 90) + (90 - 58) + (58 - 55) + (55 - 39) + (39 - 38) + (38 - 18) + (150 - 18) + (160 - 150) + (184 - 160)
= 10 + 32 + 3 + 16 + 1 + 20 + 132 + 10 + 24
= 248 Cylinders
Average Seek Length = 248/9 = 27.56 ms
Total Head Movements
= (150 - 100) + (160 - 150) + (184 - 160) + (199 - 184) + (199 - 90) + (90 - 58) + (58 - 55) + (55 - 39) + (39 - 38) + (38 - 18)
= 50 + 10 + 24 + 15 + 109 + 32 + 3 + 16 + 1 + 20
= 280 Cylinders
OR
Total Head Movements = (199 - 100) + (199 - 18) = 99 + 181 = 280 Cylinders
Average Seek Length = 280/10 = 28 ms
Total Head Movements
= (150 - 100) + (160 - 150) + (184 - 160) + (199 - 184) + (199 - 0) + (18 - 0) + (38 - 18) + (39 - 38) + (55 - 39) + (58 - 55) + (90 - 58)
= 50 +10 + 24 + 15 + 199 + 18 + 20 + 1 + 16 + 3 + 32
= 388 Cylinders
OR
Total Head Movements = (199 - 100) + (199 - 0) + (90 - 0) = 99 + 199 + 90 = 388 Cylinders
Average Seek Length = 388/11 = 35.28 ms
All the above findings of total head movements and average seek lengths indicate Shortest Seek Time First (SSTF) Disk Scheduling Algorithm is best for this scenario because it has a low number of total head movements as well as a low average length as compared to the other three disk scheduling algorithms.