Which disk scheduling algorithm looks for the track closest to the current head position?
Explanation
Right Answer:
Shortest Seek Time First (SSTF)
Solution:
SSTF algorithm hamesha us disk track ko select karta hai jo current head position ke sabse kareeb (closest) hota hai taaki seek time kam ho sake.
Mathematical Logic:
Maan lijiye current head position H hai aur pending requests ka set {R1,R2,…,Rn} hai. SSTF us request Ri ko pick karega jiske liye distance minimum ho:
Next Request=imin∣H−Ri∣
Key Comparison:
-
FCFS: Jo request pehle aayi (R1,R2,…).
-
SSTF: Jo head ke sabse paas hai (min∣H−Ri∣).