Correct option is A
We need to calculate the total head movement for each disk scheduling algorithm and then arrange them in ascending order.
Given:
· Tracks: 0 to 49
· Initial head position: 15
· Request queue:
4, 40, 11, 35, 7, 14
· Movement cost:
1 ms per track
· When direction matters, the head moves toward higher-numbered tracks first.
A. FCFS: In FCFS, requests are serviced in their arrival order:
15 → 4 → 40 → 11 → 35 → 7 → 14
Head movement:
∣15 − 4∣ = 11
∣4 − 40∣ = 36
∣40 − 11∣ = 29
∣11 − 35∣ = 24
∣35 − 7∣ = 28
∣7 − 14∣ = 7
Total = 11 + 36 + 29 + 24 + 28 + 7 = 135 ms
So, A = 135
B. LOOK: LOOK moves in the specified direction until the last request in that direction, then reverses. It does not necessarily go to the physical end of the disk.
Starting at 15 and moving toward higher-numbered requests first:
15 → 35 → 40
Then reverse: 40 → 14 → 11 → 7 → 4
Movement:
∣15 − 35∣ = 20
∣35 − 40∣ = 5
∣40 − 14∣ = 26
∣14 − 11∣ = 3
∣11 − 7∣ = 4
∣7 − 4∣ = 3
Total = 20 + 5 + 26 + 3 + 4 + 3 = 61 ms
C. SSTF: SSTF (Shortest Seek Time First) always services the request closest to the current head position.
Starting at 15:
From 15: Closest request is 14.
15 → 14 = 1
From 14: Closest is 11.
14 → 11 = 3
From 11: Closest is 7.
11 → 7 = 4
From 7: Closest is 4.
7 → 4 = 3
From 4: Remaining requests are 35 and 40. Closest is 35.
4 → 35 = 31
From 35: Remaining request is 40.
35 → 40 = 5
Total = 1 + 3 + 4 + 3 + 31 + 5 = 47 ms
D. SCAN: For SCAN, the head moves in one direction until it reaches the end of the disk, then reverses. The question specifies movement toward higher-numbered tracks first.
Starting at 15:
15 → 35 → 40 → 49
Then reverse toward the lower-numbered tracks:
49 → 4
Movement:
∣15 − 35∣ = 20
∣35 − 40∣ = 5
∣40 − 49∣ = 9
∣49 − 4∣ = 45
Total = 20 + 5 + 9 + 45 = 79 ms
Ascending order:
47 < 61 < 79 < 135