About topic
Know About topic
Disk Scheduling Algorithms
First Come First Serve (FCFS)
First Come First Serve (FCFS)
Advantages
Every request will get its chance and there is no indefinite postponement.
Disadvantages
Seek time (time taken by the disk arm locate the specified track to read/write data) is not optimized. Non preemptive, so the algorithm cannot be stopped in between and short processes at the back should wait for long processes to finish.
Shortest Seek Time First (SSTF)
Shortest Seek Time First (SSTF)
-
The seek times of every request are calculated first and the requests having the shortest seek time is executed first so that the requests nearer to the disk arm are executed first. THe head movement for the same example is shown.
Advantages
Lower average response time and higher throughput.
Disadvantages
Seek times need to be calculated in advance. May cause starvation if seek time for a process is high. High variance of response time. Frequent switching of head slows down the algorithm.
SCAN
SCAN
-
Disk arm moves in the direction of the first request whose position is not the same as the read/write head and services the request on the way until it reaches the end of the disk, where it reverses its direction and services requests on the way until all requests are serviced. Head movement is shown for the same example.
Advantages
High throughput, average response time with low variance.
Disadvantages
Long waiting time for request locations just visited by arm.
C-SCAN
C-SCAN
-
It is similar to SCAN except that after one direction has been scanned, the disk arm goes to the other end of the disk and services requests from there until all requests are serviced. THe figure shows the movement of the head for the same exapmle.
Advantages
More uniform wait time compared to SCAN
Disadvantages
More seek movements.
F.A.Q
Frequently Asked Questions
We will be updating the rest of the questions soon
-
What is meant by Disk Scheduling?
Disk scheduling algorithms is a function of operating systems that schedules I/O requests arriving for the disk.
-
Why do we need disk scheduling algorithms ?
Since only one I/O request can be served at a time by the disk controller, it is necessary to have algorithms in order to serve the I/O requests one by one.
-
What should be the aim of these algorithms?
These algorithms need to ensure that the disk arm movement need to be minimal as hard drives being mechanical, are one of the slowest parts of the computer system.