0
1.4kviews
Apply the following disk scheduling algorithm starting track at 90. i) FCFS ii) SSTF iii) C-SCAN

Subject: Operating System

Topic: File Management

Difficulty: High

The requested tracks in the order received are - 54, 57, 40, 20, 80, 120, 150, 45, 180. Apply the following ##disk scheduling algorithm starting track at 90.

i) FCFS

ii) SSTF

iii) C-SCAN

1 Answer
0
10views

First Come First Serve (FCFS) Disk Scheduling

FCFS

Total Head Movements

= (90 - 54) + (57 - 54) + (57 - 40) + (40 - 20) + (80 - 20) + (120 - 80) + (150 - 120) + (150 - 45) + (180 - 45)

= 36 + 3 + 17 + 20 + 60 + 40 + 30 + 105 + 135

= 446 Cylinders

Average Seek Length = 466/9 = 51.78 ms

Shortest Seek Time First (SSTF) Disk Scheduling

SSTF

Total Head Movements

= (90 - 80) + (80 - 57) + (57 - 54) + (54 - 45) + (45 - 40) + (40 - 20) + (120 - 20) + (150 - 120) + (180 - 150)

= 10 + 23 + 3 + 9 + 5 + 20 + 100 + 30 + 30

= 230 Cylinders

Average Seek Length = 230/9 = 25.56 ms

C-SCAN (Circular SCAN) Disk Scheduling

C-SCAN

Total Head Movements

= (120 - 90) + (150 - 120) + (180 - 150) + (199 - 180) + (199 - 0) + (20 - 0) + (40 - 20) + (45 - 40) + (54 - 45) + (57 - 54) + (80 - 57)

= 30 + 30 + 30 + 19 + 199 + 20 + 20 + 5 + 9 + 3 + 23

= 388 Cylinders

OR

Total Head Movements = (199 - 90) + (199 - 0) + (80 - 0) = 109 + 199 + 80 = 388 Cylinders

Average Seek Length = 388/11 = 35.27 ms

Please log in to add an answer.