event-triggered tasks Martijn van den Heuvel Reinder J. Bril - - PowerPoint PPT Presentation

event triggered tasks
SMART_READER_LITE
LIVE PREVIEW

event-triggered tasks Martijn van den Heuvel Reinder J. Bril - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

Limited preemptive scheduling

  • f mixed time-triggered and

event-triggered tasks

Martijn van den Heuvel Reinder J. Bril Xiaodi Zhang Syed Md Jakaria Abdullah Damir Isovic

ETFA 2013

slide-2
SLIDE 2

Complexity of industrial applications?

/ Mathematics and computer science PAGE 1 9-9-2013

Efficient resource usage vs complex constraints

slide-3
SLIDE 3

Time-triggered task model

/ Mathematics and computer science PAGE 2 9-9-2013

  • Job
  • Absolute deadline = end of interval

I0 I1 I2 I3 I4 I0 4 6 9 14 20 ...

  • Execute jobs in the slots captured in a scheduling table
  • Resolve complex task constraints offline
slide-4
SLIDE 4

/ Mathematics and computer science PAGE 3 9-9-2013

Offline scheduling

  • Offline reservation of time-triggered tasks into intervals
  • Each interval is divided into
  • spare capacity and
  • reserved capacity

P1 P3 P2

Time-triggered tasks

spare capacity reserved capacity length of the interval

1 2 4 5 6 7 8 9 10 11 3

P3

12

P1 P2

I0 I1

slide-5
SLIDE 5

Time-triggered task model

/ Mathematics and computer science PAGE 4 9-9-2013

  • Job
  • Absolute deadline = end of interval

I0 I1 I2 I3 I4 I0 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?

slide-6
SLIDE 6

Mixed time- and event-triggered Task model

/ Mathematics and computer science PAGE 5 9-9-2013

Sporadic task ( Si ) A-periodic task ( Ai )

  • Use the free time slots for ET jobs:
  • Relative deadline = Di
  • Absolute deadline = arrival time + Di

Preemptive EDF scheduling: based on absolute deadline

Arrival time di,k job Di

Event-triggered (ET): Time-triggered (TT):

I0 I1 I2 I3 I4 I0 4 6 9 14 20 ...

slide-7
SLIDE 7

How (fully preemptive) slotshifting works?

/ Mathematics and computer science PAGE 6 9-9-2013

[Isovic and Fohler 2009]

slide-8
SLIDE 8

How (fully preemptive) slotshifting works?

/ Mathematics and computer science PAGE 7 9-9-2013

[Isovic and Fohler 2009]

slide-9
SLIDE 9

How (fully preemptive) slotshifting works?

/ Mathematics and computer science PAGE 8 9-9-2013

[Isovic and Fohler 2009]

slide-10
SLIDE 10

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

/ Mathematics and computer science PAGE 9 9-9-2013

Non-preemptive shifts

How to overcome these disadvantages?

slide-11
SLIDE 11

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

/ Mathematics and computer science PAGE 10 9-9-2013

Restricted shifting of TT tasks! See paper…

Non-preemptive shifts

slide-12
SLIDE 12

Problem description

/ Mathematics and computer science PAGE 11 9-9-2013

  • What already exists?

Local system Global system

Time-triggered Offline scheduling

New offline analysis+ New online scheduling mechanism

Event-triggered

Standard (SRP +) EDF scheduling

  • Slotshifting of preemptive tasks [Isovic and Fohler 2009]
  • What is new?
  • Extended task analysis for non-preemptive execution
slide-13
SLIDE 13

Problem description

/ Mathematics and computer science PAGE 12 9-9-2013

  • What already exists?

Local system Global system

Time-triggered Offline scheduling

New offline analysis+ New online scheduling mechanism

Event-triggered

Standard (SRP +) EDF scheduling

  • Slotshifting of preemptive tasks [Isovic and Fohler 2009]
  • What is new?
  • Extended task analysis for non-preemptive execution
slide-14
SLIDE 14

Problem: how to disable preemptions?

/ Mathematics and computer science PAGE 13 9-9-2013

Global system Locally Non-preemptive Locally Non-preemptive Local TT task system Local ET task system Time-triggered tasks Event-triggered tasks Globally Non-preemptive Preemption

Currently: fully preemptive EDF of the global system Our contributions: 3 limited-preemptive extensions

slide-15
SLIDE 15

Problem: how to disable preemptions?

/ Mathematics and computer science PAGE 14 9-9-2013

Global system Locally Non-preemptive Locally Non-preemptive Local TT task system Local ET task system Time-triggered tasks Event-triggered tasks Globally Non-preemptive Preemption

  • 1. Restricted shifting of TT tasks!

See paper…

slide-16
SLIDE 16

Global system Locally Non-preemptive Locally Non-preemptive Local TT task system Local ET task system Time-triggered tasks Event-triggered tasks Globally Non-preemptive

Global non-preemptive execution of ET tasks

/ Mathematics and computer science PAGE 15 9-9-2013

New offline analysis + New online scheduling mechanism

Our main contribution:

slide-17
SLIDE 17

Problem: how to disable preemptions?

/ Mathematics and computer science PAGE 16 9-9-2013

Global system Locally Non-preemptive Locally Non-preemptive Local TT task system Local ET task system Time-triggered tasks Event-triggered tasks Globally Non-preemptive Preemption

  • 2. Intermediate step:

Incorporate EDF+SRP analysis of [Baruah, RTSS 2006]

slide-18
SLIDE 18

Offline analysis of ET tasks (Recap)

/ Mathematics and computer science PAGE 17 9-9-2013

[Isovic and Fohler 2009]

slide-19
SLIDE 19

Slotshifting: a fully preemptive system (Recap)

/ Mathematics and computer science PAGE 18 9-9-2013

Global system Local TT task system Local ET task system Time-triggered tasks Event-triggered tasks I0 I1 I2 I3 I4 I0 4 6 9 14 20 ...

Admission?

slide-20
SLIDE 20

/ Mathematics and computer science PAGE 19 9-9-2013

Offline analysis of ET tasks (Recap)

Schedulability test of sporadic tasks

  • Classical demand-based analysis
  • Supply based on static offline schedule

Demand during an interval of length L

L

[Baruah 2006]

Demand during an interval of length L

Supply based on offline schedule Supply during an interval of length L

slide-21
SLIDE 21

Calculation of supply bound

(t2 − t1)

/ Mathematics and computer science PAGE 20 9-9-2013

L

t1 I0 I1 I2 t2 I3

L

t1 I0 I1 I2 t2 I3

L

t1 I0 I1 I2 t2 I3

− overlapping reserved capacities in d intervals

slide-22
SLIDE 22

Calculation of supply bound

/ Mathematics and computer science PAGE 21 9-9-2013

L

t1 I0 I1 I2 t2 I3

L

t1 I0 I1 I2 t2 I3

L

t1 I0 I1 I2 t2 I3

L = (t2 − t1)

slide-23
SLIDE 23

Schedulability of ET tasks

/ Mathematics and computer science PAGE 22 9-9-2013

  • A sporadic task set Ts 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: (t2 − t1) − overlapping reserved capacities in d intervals

slide-24
SLIDE 24

Disable local preemptions of ET tasks

/ Mathematics and computer science PAGE 23 9-9-2013

Preemption Global system Locally Non-preemptive Locally Non-preemptive Local TT task system Local ET task system Time-triggered task Event-triggered task

Intermediate step: Incorporate EDF+SRP analysis of [Baruah, RTSS 2006]

slide-25
SLIDE 25

Scheduling rules for local ET system

/ Mathematics and computer science PAGE 24 9-9-2013

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

slide-26
SLIDE 26

Non-preemptive sections of local ET tasks

/ Mathematics and computer science PAGE 25 9-9-2013

  • Local blocking:

S1 S2 I0 I1 rcℓ Blocking Critical section of sporadic task Reserved capacity of interval Sporadic task

slide-27
SLIDE 27

Non-preemptive sections of local ET tasks

/ Mathematics and computer science PAGE 26 9-9-2013

  • Blocking function [Baruah, RTSS 2006]

If hj denotes length of critical sections B(L)  maximum hj needed by a lower priority task

  • Schedulability test
slide-28
SLIDE 28

Global system Locally Non-preemptive Locally Non-preemptive Local TT task system Local ET task system Time-triggered tasks Event-triggered tasks Globally Non-preemptive

Global non-preemptive execution of ET tasks

/ Mathematics and computer science PAGE 27 9-9-2013

New offline analysis + New online scheduling mechanism

Our main contribution:

slide-29
SLIDE 29

Scheduling rules for Global System

/ Mathematics and computer science PAGE 28 9-9-2013

  • 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

slide-30
SLIDE 30

Scheduling rules for Global System

/ Mathematics and computer science PAGE 29 9-9-2013

  • 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

slide-31
SLIDE 31

S1 rcℓ Miss I0 I1 I2 I3 Miss Global critical section Reserved capacity of interval Sporadic task Reserved self-blocking slot 1 6 9 16

Global non-preemptive execution of ET tasks

/ Mathematics and computer science PAGE 30 9-9-2013

  • Self-blocking mechanism
slide-32
SLIDE 32

S1 rcℓ Miss I0 I1 I2 I3 Miss Blocking Global critical section Reserved capacity of interval Sporadic task Reserved self-blocking slot 1 6 9 16 S1 rcℓ I0 I1 I2 I3

Global non-preemptive execution of ET tasks

/ Mathematics and computer science PAGE 31 9-9-2013

  • Self-blocking mechanism
slide-33
SLIDE 33

Self-blocking mechanism

/ Mathematics and computer science PAGE 32 9-9-2013

  • idle bound function ibf(hi):
  • Calculate idled away time units in self-blocking.
  • ibf(hi) has no relation to any task property;

it reflects the delay of executing a global critical section with length hi

τ1 τ2 rcℓ I0 I1 I2 I3 I4 4 6 9 14 20 Non-preemptive region of sporadic task Reserved capacity of interval Sporadic task Reserved self-blocking slot

slide-34
SLIDE 34

Idle bound function calculation

/ Mathematics and computer science PAGE 33 9-9-2013

τ2 rcℓ I0 I1 I2 I3 I4 I0 4 6 9 14 20 Self-blocking Non-preemptive region of sporadic task Reserved capacity of interval Sporadic task Reserved self-blocking slot ...

  • Example(cont’d)
  • Interval I0 has enough spare capacity larger or equal to critical section
  • Assume the critical section starts just too late.
slide-35
SLIDE 35

Idle bound function calculation

/ Mathematics and computer science PAGE 34 9-9-2013

τ2 rcℓ I0 I1 I2 I3 I4 I0 4 6 9 14 20 Self-blocking ...

  • Example(cont’d)
  • Interval I3 has enough spare capacity larger or equal to critical section
slide-36
SLIDE 36

Idle bound function calculation

/ Mathematics and computer science PAGE 35 9-9-2013

τ2 rcℓ I0 I1 I2 I3 I4 I0 4 6 9 14 20 Self-blocking ...

  • Example(cont’d)
  • Interval I4 has enough spare capacity larger or equal to critical section

The maximum idled away time units:

slide-37
SLIDE 37

New ET schedulability test

/ Mathematics and computer science PAGE 36 9-9-2013

hi ibf(hi) 2 3 3 6

Self-blocking from lower priorities Add self-blocking to WCET of jobs

Compute inserted idle times for non-preemptive sections:

slide-38
SLIDE 38

Problem: how to disable preemptions?

/ Mathematics and computer science PAGE 37 9-9-2013

Global system Locally Non-preemptive Locally Non-preemptive Local TT task system Local ET task system Time-triggered tasks Event-triggered tasks Globally Non-preemptive Preemption

Restricted shifting of TT tasks; Use local SRP [Baruah 2006]; Self-blocking of ET tasks.

slide-39
SLIDE 39

Conclusion

/ Mathematics and computer science PAGE 38 9-9-2013

New schedulability analysis for slotshifting: Non-preemptive scheduling of tasks:

  • Extended analysis with

− Time-triggered tasks: by construction − Event-triggered tasks: blocking function

  • Extended scheduling mechanisms:

− A self-blocking mechanism for event-triggered tasks

Demand during an interval of length L

supply based on offline schedule Supply during an interval of length L