ETFA 2013 Limited preemptive scheduling of mixed time-triggered and event-triggered tasks Martijn van den Heuvel Reinder J. Bril Xiaodi Zhang Syed Md Jakaria Abdullah Damir Isovic
Complexity of industrial applications? Efficient resource usage vs complex constraints / Mathematics and computer science 9-9-2013 PAGE 1
Time-triggered task model • Job • Absolute deadline = end of interval I 0 I 1 I 2 I 4 I 0 I 3 ... 0 4 6 9 14 20 • Execute jobs in the slots captured in a scheduling table • Resolve complex task constraints offline / Mathematics and computer science 9-9-2013 PAGE 2
Offline scheduling • Offline reservation of time-triggered tasks into intervals I 0 I 1 P 1 P 2 P 1 P 3 P 2 P 3 0 1 2 3 4 5 6 7 8 9 10 11 12 • Each interval is divided into • spare capacity and • reserved capacity length of the interval reserved capacity spare capacity Time-triggered tasks / Mathematics and computer science 9-9-2013 PAGE 3
Time-triggered task model • Job • Absolute deadline = end of interval I 0 I 1 I 2 I 4 I 0 I 3 ... 0 4 6 9 14 20 • Execute jobs according to a scheduling table • Resolve complex task constraints offline What to do with the free capacity? Polling is expensive → efficient event handling? How to extend system functionality? / Mathematics and computer science 9-9-2013 PAGE 4
Mixed time- and event-triggered Task model I 0 I 1 I 2 I 3 I 4 I 0 ... Time-triggered (TT): 0 4 6 9 14 20 Sporadic task ( S i ) Event-triggered (ET): A-periodic task ( A i ) • Use the free time slots for ET jobs: D i • Relative deadline = D i job • Absolute deadline = arrival time + D i Arrival time d i,k Preemptive EDF scheduling: based on absolute deadline / Mathematics and computer science 9-9-2013 PAGE 5
How (fully preemptive) slotshifting works? [Isovic and Fohler 2009] / Mathematics and computer science 9-9-2013 PAGE 6
How (fully preemptive) slotshifting works? [Isovic and Fohler 2009] / Mathematics and computer science 9-9-2013 PAGE 7
How (fully preemptive) slotshifting works? [Isovic and Fohler 2009] / Mathematics and computer science 9-9-2013 PAGE 8
Slotshifting versus static offline schedules • Advantages of slotshifting: • Online reclaiming of spare capacity • Same worst-case offline analysis as static schedules • Disadvantages of slotshifting: • Shifting of slots must allow for arbitrary preemptions • No support for allocating subsequent slots Non-preemptive shifts How to overcome these disadvantages? / Mathematics and computer science 9-9-2013 PAGE 9
Slotshifting versus static offline schedules • Advantages of slotshifting: • Online reclaiming of spare capacity • Same worst-case offline analysis as static schedules • Disadvantages of slotshifting: • Shifting of slots must allow for arbitrary preemptions • No support for allocating subsequent slots Non-preemptive shifts Restricted shifting of TT tasks! See paper… / Mathematics and computer science 9-9-2013 PAGE 10
Problem description • What already exists? • Slotshifting of preemptive tasks [Isovic and Fohler 2009] • What is new? • Extended task analysis for non-preemptive execution Local system Global system Time-triggered Offline scheduling New offline analysis+ New online scheduling Event-triggered Standard (SRP +) EDF mechanism scheduling / Mathematics and computer science 9-9-2013 PAGE 11
Problem description • What already exists? • Slotshifting of preemptive tasks [Isovic and Fohler 2009] • What is new? • Extended task analysis for non-preemptive execution Local system Global system Time-triggered Offline scheduling New offline analysis+ New online scheduling Event-triggered Standard (SRP +) EDF mechanism scheduling / Mathematics and computer science 9-9-2013 PAGE 12
Problem: how to disable preemptions? Global system Local TT task system Local ET task system Globally Time-triggered tasks Event-triggered tasks Non-preemptive Preemption Locally Locally Non-preemptive Non-preemptive Currently: fully preemptive EDF of the global system Our contributions: 3 limited-preemptive extensions / Mathematics and computer science 9-9-2013 PAGE 13
Problem: how to disable preemptions? Global system Local TT task system Local ET task system Globally Time-triggered tasks Event-triggered tasks Non-preemptive Preemption Locally Locally Non-preemptive Non-preemptive 1. Restricted shifting of TT tasks! See paper… / Mathematics and computer science 9-9-2013 PAGE 14
Global non-preemptive execution of ET tasks Global system Local TT task system Local ET task system Globally Time-triggered tasks Non-preemptive Event-triggered tasks Locally Locally Non-preemptive Non-preemptive New offline analysis + Our main New online scheduling mechanism contribution: / Mathematics and computer science 9-9-2013 PAGE 15
Problem: how to disable preemptions? Global system Local TT task system Local ET task system Globally Time-triggered tasks Event-triggered tasks Non-preemptive Preemption Locally Locally Non-preemptive Non-preemptive 2. Intermediate step: Incorporate EDF+SRP analysis of [Baruah, RTSS 2006] / Mathematics and computer science 9-9-2013 PAGE 16
Offline analysis of ET tasks (Recap) [Isovic and Fohler 2009] / Mathematics and computer science 9-9-2013 PAGE 17
Slotshifting: a fully preemptive system (Recap) Global system Local TT task system Local ET task system Admission? Time-triggered tasks Event-triggered tasks I 0 I 1 I 2 I 4 I 3 I 0 ... 0 4 6 9 14 20 / Mathematics and computer science 9-9-2013 PAGE 18
Offline analysis of ET tasks (Recap) Schedulability test of sporadic tasks • Classical demand-based analysis • Supply based on static offline schedule Demand ≤ L [Baruah 2006] during an interval of length L Supply based on offline schedule Supply Demand ≤ during an interval of length L during an interval of length L / Mathematics and computer science 9-9-2013 PAGE 19
Calculation of supply bound ( t 2 − t 1 ) − overlapping reserved capacities in d intervals L I 0 I 1 I 2 I 3 t 2 t 1 L I 0 I 1 I 2 I 3 t 2 t 1 L I 0 I 1 I 2 I 3 t 2 t 1 / Mathematics and computer science 9-9-2013 PAGE 20
Calculation of supply bound L = ( t 2 − t 1 ) L I 0 I 1 I 2 I 3 t 2 t 1 L I 0 I 1 I 2 I 3 t 2 t 1 L I 0 I 1 I 2 I 3 t 2 t 1 / Mathematics and computer science 9-9-2013 PAGE 21
Schedulability of ET tasks • A sporadic task set T s is can be scheduled under EDF together with an offline schedule, iff where − Demand bound function, dbf [Baruah, RTSS 2006] − New Supply bound function, sbf Calculation of sbf: ( t 2 − t 1 ) − overlapping reserved capacities in d intervals / Mathematics and computer science 9-9-2013 PAGE 22
Disable local preemptions of ET tasks Global system Local TT task system Local ET task system Time-triggered task Event-triggered task Preemption Locally Locally Non-preemptive Non-preemptive Intermediate step: Incorporate EDF+SRP analysis of [Baruah, RTSS 2006] / Mathematics and computer science 9-9-2013 PAGE 23
Scheduling rules for local ET system Rule • If an ET task starts executing its critical section − Case 1: Preemptions from any other ET tasks are disabled − Case 2: Preemptions from TT task with higher priority are allowed / Mathematics and computer science 9-9-2013 PAGE 24
Non-preemptive sections of local ET tasks • Local blocking: Reserved capacity of interval Sporadic task Critical section of sporadic task Blocking I 0 I 1 S 1 S 2 rc ℓ / Mathematics and computer science 9-9-2013 PAGE 25
Non-preemptive sections of local ET tasks • Schedulability test • Blocking function [Baruah, RTSS 2006] If h j denotes length of critical sections B( L ) maximum h j needed by a lower priority task / Mathematics and computer science 9-9-2013 PAGE 26
Global non-preemptive execution of ET tasks Global system Local TT task system Local ET task system Globally Time-triggered tasks Non-preemptive Event-triggered tasks Locally Locally Non-preemptive Non-preemptive New offline analysis + Our main New online scheduling mechanism contribution: / Mathematics and computer science 9-9-2013 PAGE 27
Scheduling rules for Global System • Rule 1 • Case 1: spare capacity > critical section length ET task executes globally non-preemptively • Case 2: spare capacity < critical section length ET task blocks it-self and other ET tasks / Mathematics and computer science 9-9-2013 PAGE 28
Scheduling rules for Global System • Rule 1 • Case 1: spare capacity > critical section length ET task executes globally non-preemptively • Case 2: spare capacity < critical section length ET task blocks it-self and other ET tasks • Rule 2 • Case 1: another ET task wants to execute during self-blocking ET task is not allowed to execute • Case 2: a TT task wants to execute during self-blocking TT task is allowed to execute / Mathematics and computer science 9-9-2013 PAGE 29
Global non-preemptive execution of ET tasks • Self-blocking mechanism Reserved self-blocking slot Reserved capacity of interval Sporadic task Global critical section Miss Miss I 0 I 1 I 2 I 3 S 1 rc ℓ 1 6 9 16 / Mathematics and computer science 9-9-2013 PAGE 30
Recommend
More recommend