- In previous post we learnt about simple disk scheduling policy called first-come first-serve.
- In this post we are about to explain one another disk scheduling algorithm which is widely accepted i.e. Shortest Seek Time First (SSTF) Scheduling.
Shortest Seek Time First (SSTF) Scheduling
- It is reasonable to service all request close to the current head position, before moving the head far away to service other request.
- This is the concept implemented for shortest seek time first algorithm.
- This algorithm selects the request with minimum seek time from the current head position that means the closest request will be serviced first.
- Seek time increases with the no. of cylinder traversed by the head.
- It selects the pending request closest to the current head position.
- It provides improvement in performance over FCFS policy.
- It is the derived form of SJF scheduling algorithm that works on the same policy.
- The main disadvantage of SSTF is that it may cause starvation of some request that are far away from the head position.
- If new request arrives at the nearest head position continuously, then those requests which are far away will never serviced and it has to stay in a waiting state.
- 14 and 186 are the two requests, while servicing this request supposes 14 a new request near 14 arrives.
- This new request will be serviced next making the request at 186 to be waiting.
- This scenario likely to increase if the pending request queue goes long.
- It is an improvement over the First Come First Serve but it is not optimal.