Академический Документы
Профессиональный Документы
Культура Документы
Overview
Parameters DMA EDF LST
Parameters
Release time (or ready time): Time at which the task is ready for processing. Deadline: Time by which execution of the task should be completed, after the task is released. Minimum delay: Minimum amount of time that must elapse before the execution of the task is started, after the task is released. Maximum delay: Maximum permitted amount of time that elapses before the execution of the task is started, after the task is released. Laxity- (deadline execution time)
Aug 01, 2011 3
Contd..
Worst case execution time: Maximum time taken to complete the task, after the task is released. The worst case execution time is also referred to as the worst case response time. Run time: Time taken without interruption to complete the task, after the task is released. Weight (or priority): Relative urgency of the task. Schedulability- property indicating whether real time system will meet its deadline.
Optimal
Both the RM and EDF algorithms are optimal real time scheduling algorithms. An optimal real-time scheduling algorithm is one which may fail to meet a deadline only if no other scheduling algorithm can meet the deadline. The following assumptions are made for both the RM and EDF algorithms.
(a) No task has any non-preemptable section and the cost of pre-emption is negligible. (b) Only processing requirements are significant; memory, I/O, and other resource requirements are negligible. (c) All tasks are independent; there are no precedence constraints. Aug 01, 2011
DMA
RMA is not optimal when task deadlines & periods differ for some tasks in the task set to be scheduled. DMA is more proficient in such conditions. It assigns priority to tasks based on their deadlines. Shorter deadlines means higher priority. When relative deadlines are proportional to period RMA & DMA produce identical solutions. DMA produces feasible schedule even if RMA fails. RMA always fails when DMA fails.
EDF Algorithm
Each time a new ready task arrives It is inserted into a queue of ready tasks sorted by their deadlines. If a newly arrived task is inserted at the head of the queue the currently executing task is prempted. Processes to be sorted according to deadline at each instant. Sorted list maintained as a heap. Each update requires O(log n) steps.
EDF scheduling does not require any priority value to be computed for any task at any time. Tasks are scheduled solely based on proximity of their deadline. Longer a task waits in a ready queue, the higher is the probability of being taken up for scheduling. A virtual priority value associated with a task keeps increasing with time until the task is taken up for scheduling. Scheduler does not perform any priority computation at run time or compile time.
Aug 01, 2011 9
Example
Task arrival Execution time deadline
T1
T2 T3
0
4 5
10
3 10
33
28 29
10
EDF Properties
EDF is optimal for a uniprocessor with pre-emption task being allowed. If a feasible schedule exist then EDF will schedule the tasks. EDF can achieve 100% processor utilisation with periodic preocesses having deadlines equal to periods.
11
12
Implementation of EDF
Simple queue- Insertion O(1) Selection O(n) where n is number of tasks Maintain all ready tasks in a sorted priority queue using heap data structure.
Tasks kept in queue sorted by their deadlines. When tasks arrives it can be inserted in heap in O(log2 n) time. At every scheduling point the next task to be run can be found at the top of the heap. Removal from queue O(1) time.
13
14
RM vs. EDF
Rate Monotonic
Simpler implementation, even in systems without explicit support for timing constraints (periods, deadlines) Predictability for the highest priority tasks
EDF
15
16
LST Algo
A job Ji has deadline di, execution time ei, and was released at time ri At time t < di: Remaining execution time trem = ei - (t - ri) Slack time tslack = di - t - trem Assign priority to jobs based on slack time, tslack
The smaller the slack time, the higher the priority More complex, requires knowledge of execution times and deadlines
Knowing the actual execution time is often difficult a priori, since it depends on the data, need to use worst case estimates ( poor performance)
Aug 01, 2011 17
18
I1; the two jobs are already scheduled on the EDF basis in these intervals.
In second case The release time rk of Jk is before the end of the interval I1 in which Ji executes; we assume that rk is no later than beginning of I1.
I1
Ji Jk
I2
dk di
19
rk
Aug 01, 2011
To transform the given schedule we Swap Ji and Jk (this is always possible, since Jis deadline is later than Jks) specifically if the interval I1 is shorter than I2
I1 Jk Jk I2 Ji
move the entire portion of Ji scheduled in I1 backwards to I2 the result is an EDF schedule
20
Contd..
2. So, if EDF fails to produce a feasible schedule, no feasible schedule exists If a feasible schedule existed it could be transformed into an EDF schedule, contradicting the statement that EDF failed to produce a feasible schedule [Proof for LST is similar]
21
Thank You
Aug 01, 2011 22