Disk Scheduling Algorithms
Disk Scheduling Algorithms
Scheduling
Algorithms
Disk Scheduling
Disk scheduling is done by operating systems to schedule
I/O requests arriving for the disk. Disk scheduling is also
known as I/O Scheduling.
Types Of Disk Scheduling
algorithms
Ex:-
Suppose the order of request is- (82,170,43,140,24,16,190)
And current position of Read/Write head is: 50
So, total overhead movement is
(82-50)+(170-82)+(170-43)+(140-43)+(140-24)+(24-
16)+(190-16) = 642
Advantages of FCFS :-
1.Every request gets a fair
chance
2.No indefinite
postponement
Disadvantages of FCFS
1.Does not try to optimize seek
time
EX:-
(50-43)+(43-24)+(24-16)+(82-16)+(140-82)+(170-
140)+(190-170) =208
Advantages of Shortest Seek Time First
1.The average Response Time decreases
2.Throughput increases
In the SCAN Algorithm the disk arm moves in a particular direction and
services the requests coming in its path and after reaching the end of the
disk, it reverses its direction and again services the request arriving in its
path. So, this algorithm works as an elevator and is hence also known as
an elevator algorithm. As a result, the requests at the midrange are
serviced more and those arriving behind the disk arm will have to wait.
Ex:-
1.High throughput.
2.Low variance of response.
3.time Average response time.
Disadvantages of SCAN
Suppose the requests to be addressed are-82,170,43,140,24,16,190. And the Read/Write arm is at 50,
and it is also given that the disk arm should move “towards the larger value”.
So, the total overhead movement (total distance covered by the disk arm)
is calculated as:
(199-50) + (199-0) + (43-0) = 391