Presentation is loading. Please wait.

Presentation is loading. Please wait.

The End Of The Line For Static Cyclic Scheduling?

Similar presentations


Presentation on theme: "The End Of The Line For Static Cyclic Scheduling?"— Presentation transcript:

1 The End Of The Line For Static Cyclic Scheduling?
N. Audsley K. Tindell A. Burns 03/25/2006 Shadab Ambat

2 Section Overview Introduction Computational Model
Motivation for Offsets Optimal Priority Ordering The Offset Test Static Priority vs. Static Cyclic Scheduling Summary and Conclusions 03/25/2006 Shadab Ambat

3 Introduction The schedulability analysis for the classic static priority was based on the assumption of a ‘critical instant’ – the instant when all tasks in the system are released simultaneously. However, for cases when hard real-time tasks have mandatory offset constraints this leads to an over-conservative or pessimistic scheduling. Critical instants may not occur, rendering the rate or deadline monotonic algorithms to be non-optimal and calling for a different approach. Previously this was done using static cyclic scheduling. The following is a description of an optimal offset model based on the static priority scheduling that might replace static cyclic scheduling 03/25/2006 Shadab Ambat

4 Computational Model The model is based on the following assumptions:-
A processor is assigned a fixed no. of transactions. A transaction consists of a fixed no. of tasks (quantum of the model). A transaction arrives with a minimum time – the period, between subsequent arrivals, periodically or sporadically. Tasks are placed at fixed offsets with respect to arrival time of transaction. All tasks in a transaction must share the same period. 03/25/2006 Shadab Ambat

5 Computational Model (contd.)
Temporarily assume semaphores absent. Tasks have arbitrary deadlines, unique static priority and are pre-emptive. Arrival time (At)– time a task wants to run Release time (Rt) – time a task is placed in priority-ordered run-queue Release Jitter – Rt - At 03/25/2006 Shadab Ambat

6 Motivation for Offsets
Offsets especially useful in multi-processor systems where the inter-processor message communication delay can be modeled as an offset. Note – no synchronization is done through the message and task 2 will have a fixed released time irrespective of whether it arrives early or not. 03/25/2006 Shadab Ambat

7 Motivation for Offsets (contd.)
For cases when jitter is large due to large (irregular) computation times, task can be split up into a computation and output phase task with the latter being assigned a higher priority. Offsets if properly used, remove the need for controlling access to shared resources (mutexes). e.g. A sporadic transaction for controlling a disk drive can be implemented using 2 tasks. Task a sends a request to the drive and Task b reads the buffer and replies to the initiator of the transaction. Also suppose b has an offset of at least 12 ms from the end of a. The entire transaction must be completed before deadline D. So Ob + rb ≤ D and Ob - Oa + ra ≥ 12 (Note: r is not the release time but the response time) 03/25/2006 Shadab Ambat

8 Optimal Priority Ordering
The optimal bottom up priority ordering algorithm is as follows: Consists of 2 parts – a sorted part of lower n priority tasks and remaining higher priority tasks. Initially all tasks unsorted, priority ordering arbitrary Tasks placed one by one at top of sorted partition (lowest unassigned priority) and tested for schedulability. (N-1) – lowest priority, 0 – highest priority If schedulable, task is assigned that priority. Sorted partition advanced by one If not schedulable, task returned to original priority. Continued till all tasks checked and found unschedulable, or an optimal ordering achieved. 03/25/2006 Shadab Ambat

9 Optimal Priority Ordering (contd.)
Sorted partition is independent of unsorted one and always schedulable. 03/25/2006 Shadab Ambat

10 Static Priority vs. Static Cyclic Scheduling
Periodic tasks that have the same period and are unrelated can be put in the same transaction with offsets. Tasks having similar but different periods can be put in the same transaction with a period shorter than the original one – at the cost of some schedulability loss. Tasks with periods that divide a larger period are incorporated by having multiple instances of them in a transaction with offsets Precedence constraints can be modeled by using: Priority: If task B is required to run only after task A is complete, B can be assigned a lower priority and released at the same time as A. B will be pre-empted by A and will only run when A finishes Offsets: B can have any priority as long as its offset is larger than that of A + w.c.r.t of A . 03/25/2006 Shadab Ambat

11 Static Priority vs. Static Cyclic Scheduling (contd.)
To ensure proper constraint implementation, A must not be re-released until B has finished. This can be done by keeping B short or slicing A into two tasks with the second one having lower priority than B. The following shows an e.g. that cannot be scheduled using fixed or dynamic priority but can be scheduled using the offset model. Five tasks A – E share the same period B precedes D and A excludes B and D C – w.c.e.t., d – absolute deadline, rXu – min. absolute release time 03/25/2006 Shadab Ambat

12 Static Priority vs. Static Cyclic Scheduling (contd.)
Now consider the above modified table. Here O – task offset (must be greater than rXu) D – relative deadline = d - O. r – w.c.r.t. measured relative to O rold - old scheduling analysis applied to the current problem The ticks ( ) indicate schedulability requirement of r ≤ D is met. 03/25/2006 Shadab Ambat


Download ppt "The End Of The Line For Static Cyclic Scheduling?"

Similar presentations


Ads by Google