Professional Documents
Culture Documents
Suppose a job J i has deadline d i, execution time e i, and was released at time r i
then at time t < d
i:
In this approach, priority to jobs be assigned based on slack time .The smaller the
slack time jobs gets higher the priority then next higher slack time and so on. It is
more complex for implementation and requires knowledge of execution times and
deadlines properly. Knowing the actual execution time is often difficult a priori, since
it depends on the data, need to use worst case estimate. For example
Job J1 of example is released at time 0 and has its deadline at time 6 and execution
time 3. Hence its slack is 3 at time 0. The job starts to execute at time 0. As long as it
executes its slack remains 3 because at any time before its completion its slack is 6 -
t - (3 – t).
These algorithms are optimal only when they always produce a feasible schedule if
one exists.
Theorem: When preemption is allowed and jobs do not contend for resources, the
EDF algorithm can produce a feasible schedule of a set J of jobs with arbitrary
release times and deadlines on a processor if and only if J has feasible schedules
Proof:
To show the optimality of EDF, we have to require to show any feasible schedule
can be transformed into another an EDF schedule
If J i is scheduled to execute before J k, but J i’s deadline is later than J k’s such that
there exist two conditions:
The release time of J k is after the J i completes that means they’re already in
EDF order.
The release time of J k is before the end of the interval in which J i executes
This is always possible to swap J i and J k since J i’s deadline is later than J k’s such
that
We can move any jobs following idle periods forward into the idle period then
When deadline of J i’s is earlier than J k’s there is no possibility to generate the other
feasible schedule and EDF failed to produce a feasible schedule. Hence the
optimality of EDF is verified.
In the following example, the number next to the job is the execution time and the
feasible interval follows it.
“When preemption is allowed and jobs do not contend for resources, the LRT
algorithm can produce a feasible schedule of a set J of jobs with arbitrary release
times and deadlines on a processor if and only if feasible schedules of J exist”.