Priority Based Scheduling
Priority Based Scheduling
Earliest-Deadline-First Scheduling
Earliest Deadline First (EDF) is one of the best known algorithms for real
time processing. It is an optimal dynamic algorithm. In dynamic priority
algorithms, the priority of a task can change during its execution. It produces a
valid schedule whenever one exists.
EDF is a preemptive scheduling algorithm that dispatches the process with
the earliest deadline. If an arriving process has an earlier deadline than the running
process, the system preempts the running process and dispatches the arriving
process.
A task with a shorter deadline has a higher priority. It executes a job with
the earliest deadline. Tasks cannot be scheduled by rate monotonic algorithm.
EDF is optimal among all scheduling algorithms not keeping the processor
idle at certain times. Upper bound of process utilization is 100 %.
Whenever a new task arrive, sort the ready queue so that the task closest to
the end of its period assigned the highest priority. System preempt the running
task if it is not placed in the first of the queue in the last sorting.
If two tasks have the same absolute deadlines, choose one of the two at
random (ties can be broken arbitrarily). The priority is dynamic since it changes
for different jobs of the same task.
EDF can also be applied to aperiodic task sets. Its optimality guarantees
that the maximal lateness is minimized when EDF is applied.
Many real time systems do not provide hardware preemption, so other
algorithm must be employed.
In scheduling theory, a real-time system comprises a set of real-time tasks;
each task consists of an infinite or finite stream of jobs. The task set can be
scheduled by a number of policies including fixed priority or dynamic priority
algorithms.
The success of a real-time system depends on whether all the jobs of all the
tasks can be guaranteed to complete their executions before their deadlines. If
they can, then we say the task set is schedulable.
The schedulability condition is that the total utilization of the task set must
be less than or equal to 1.
Implementation of earliest deadline first : Is it really not feasible to
implement EDF scheduling ?