Disadvantages of SCAN-EDF Algorithm
- Additional computations are required which may affect seek time.
- Works the same as the EDF algorithm in case there are no same deadlines.
- Deadlines may not always be the same in real-time systems.
SCAN – EDF Scheduling in OS
SCAN-EDF is a disk scheduling algorithm that is the same as the EDF algorithm but utilizes the seek optimization technique of the ‘SCAN’ algorithm when similar deadlines occur.
It is a hybrid algorithm. To understand the importance of this algorithm, let us first look at the drawbacks of strictly following the Earliest Deadline First (EDF) algorithm.
Consider the following situation where we have a few tasks with similar deadlines.
Task |
Deadline |
Cylinder |
---|---|---|
T1 |
200 |
183 |
T2 |
200 |
25 |
T3 |
200 |
150 |
T4 |
300 |
190 |
Let us apply only the EDF algorithm.
The starting position of the read-write head is ’50.
Tie between the tasks with the same deadline can be broken by making any random selection. Thus the order of execution can be
T1 → T2 → T3 → T4
The total number of head movements = (183-50) + (183-25) + (150-25) + (190-150) = 456
Strictly following the EDF algorithm can cause wild to and fro motion of the disk head, resulting in huge seek time values.
We can see that there can be a better approach to handling situations where tasks with similar deadlines are released. Thus some modification is needed in the EDF algorithm.