Generalized fixed-priority scheduling with limited preemptions - - PowerPoint PPT Presentation

generalized fixed priority scheduling with limited
SMART_READER_LITE
LIVE PREVIEW

Generalized fixed-priority scheduling with limited preemptions - - PowerPoint PPT Presentation

Generalized fixed-priority scheduling with limited preemptions Reinder J. Bril, Martijn M.H.P. van den Heuvel, Ugur Keskin, and Johan J. Lukkien Dep. of Mathematics and Computer Science Group System Architecture and Networking ECRTS-2012


slide-1
SLIDE 1

Generalized fixed-priority scheduling with limited preemptions

Reinder J. Bril, Martijn M.H.P. van den Heuvel, Ugur Keskin, and Johan J. Lukkien

  • Dep. of Mathematics and Computer Science

Group System Architecture and Networking ECRTS-2012 (Pisa, Italy)

slide-2
SLIDE 2

Motivation

PAGE 2

ECRTS-2012 (Pisa, Italy)

  • Drawbacks of arbitrary preemptions (FPPS):
  • worst-case memory requirements;
  • cost of context switching (e.g. cache).
  • Non-preemptive scheduling (FPNS):
  • resolved by FPNS,
  • at the cost of lower schedulability.
  • Alternative refinements of FPPS (FPTS & FPDS):
  • reduced memory costs (compared to FPPS);
  • improved schedulability (compared to FPPS);
  • orthogonal approaches !
slide-3
SLIDE 3

Motivation

PAGE 3

ECRTS-2012 (Pisa, Italy)

  • Goal:
  • combine strength of FPTS and FPDS

in a single scheme: FPGS,

  • with the aim to improve efficiency,
  • focus on improvement of the feasibility.
slide-4
SLIDE 4

Overview

  • Motivation
  • Introduction fixed-priority scheduling (FPS)*
  • model
  • FPPS and FPNS
  • Existing limited-preemptive algorithms*
  • preemption thresholds (FPTS)
  • deferred preemption (FPDS)
  • Novel hybrid algorithms
  • Conclusion

PAGE 4

ECRTS-2012 (Pisa, Italy)

* Buttazzo, Bertogna, and Yao, IEEE TII, 2012.

slide-5
SLIDE 5

Introduction FPS – model

  • Events: implicit
  • Tasks ():
  • independent, no self-suspension
  • characteristics (R+):

− minimal inter-arrival time (T); − computation time (C); − deadline (D);

  • Scheduling algorithm:
  • fixed-priority () & non-idling;
  • [non-] preemptive
  • Platform: single CPU

PAGE 5

ECRTS-2012 (Pisa, Italy)

slide-6
SLIDE 6

Introduction FPS – FPPS and FPNS

  • FPPS:
  • highest priority task with work pending executes;
  • a task experiences interference from higher priority

tasks (due to delays and preemptions).

  • FPNS:
  • tasks run to completion;
  • the highest priority task is selected to run next;
  • a task experiences:

− interference from higher priority tasks (only delays); − blocking from lower priority tasks.

PAGE 6

ECRTS-2012 (Pisa, Italy)

slide-7
SLIDE 7

Introduction FPS – FPPS and FPNS

  • FPNS:
  • blocking:
  • Blocking tolerance (i) [1]:
  • the maximum amount of time that a task (i) can be

blocked without missing its deadline (Di);

  • depends on scheduling algorithm.
  • Neither FPPS dominates FPNS nor vice versa.

PAGE 7

) max , max(

π π : l l i

C B

l i 

[1] V.B. Lortz and K.G. Shin, IEEE TSE, 1995.

ECRTS-2012 (Pisa, Italy)

slide-8
SLIDE 8

Existing limited-preemptive algorithms

  • Two orthogonal approaches: FPTS [2, 3] and FPDS
  • FPTS: preemption threshold (i  i)

− interference: (reduce preemptions) − tasks h with h > i can preempt i; − blocking:

  • Special cases of FPTS:

− FPPS: i = i; − FPNS: i = 1.

PAGE 8

) max , max(

π π θ : l l i

C B

l i l

 

[2] Y. Wang and M. Saksena, RTCSA, 1999. [3] J. Regehr, RTSS, 2002.

ECRTS-2012 (Pisa, Italy)

slide-9
SLIDE 9

FPTS – preemption thresholds

PAGE 9

Not schedulable with FPPS Not schedulable with FPNS Ti Di Ci i WRi

P

WRi

N

1 70 50 20 3 20 55 2 80 80 20 2 40 75 3 200 100 35 1 115 75 Ti Di Ci i WRi

P

1 70 50 20 3 20 2 80 80 20 2 40 3 200 100 35 1 115 Ti Di Ci i 1 70 50 20 3 2 80 80 20 2 3 200 100 35 1 Blocking tolerance 1:

  • 1 = 30, C2 < 1 < C3.

Blocking tolerance 2:

  • FPPS: 2

P = 30 < C3;

  • FPNS: 2

N = 40 > C3.

ECRTS-2012 (Pisa, Italy)

slide-10
SLIDE 10

Ti Di Ci i WRi

P

WRi

N

i WRi

T

1 70 50 20 3 20 55 3 40 2 80 80 20 2 40 75 3 75 3 200 100 35 1 115 75 2 95

FPTS – preemption thresholds

PAGE 10

Ti Di Ci i WRi

P

WRi

N

i 1 70 50 20 3 20 55 3 2 80 80 20 2 40 75 3 3 200 100 35 1 115 75 2 Ti Di Ci i WRi

P

WRi

N

1 70 50 20 3 20 55 2 80 80 20 2 40 75 3 200 100 35 1 115 75 Schedulable with FPTS Blocking tolerance 1:

  • 1 = 30, C2 < 1 < C3.

Blocking tolerance 2:

  • FPPS: 2

P = 30 < C3;

  • FPNS: 2

N = 40 > C3.

ECRTS-2012 (Pisa, Italy)

slide-11
SLIDE 11

[4] A. Burns, in Advances in Real-Time Systems, 1994 [5] R. Bril, J. Lukkien, and W. Verhaegh, ECRTS, 2007.

Existing limited-preemptive algorithms

  • Two orthogonal approaches: FPTS and FPDS [4, 5]
  • FPDS: deferred preemption

− a task is a sequence of mi non-preemptive sub-tasks; − characteristic subtask i,k: computation time Ci,k; − tasks h with h > i can only preempt i at preemption points (between subtasks); − blocking:

  • Special case of FPDS:

− FPNS: mi = 1.

PAGE 11

) max max , max(

, 1 π π : k l m k l i

C B

l l i

  

ECRTS-2012 (Pisa, Italy)

slide-12
SLIDE 12

FPDS – deferred preemption

PAGE 12

Schedulable with FPDS Ti = Di Ci i WRi

P WRi N

1 5 2 2 2 6 2 7 2+2 1 8 6 Ti = Di Ci i WRi

P WRi N

WRi

D

1 5 2 2 2 6 4 2 7 2+2 1 8 6 7 Blocking tolerance 1:

  • 1 = 3 < C3.

ECRTS-2012 (Pisa, Italy)

slide-13
SLIDE 13

FPDS – deferred preemption

PAGE 13

Ti = Di Ci i WRi

P WRi N

1 5 2 2 2 6 2 7 2+2 1 8 6 Ti = Di Ci i WRi

P WRi N

WRi

D

1 5 2 2 2 6 4 2 7 2+2 1 8 6 7

  • FPTS:
  • 2 = 2: FPPS
  • 2 = 1: FPNS
  • Conclusion:
  • Not schedulable with FPTS, hence
  • FPTS does not dominate FPDS

Blocking tolerance 1:

  • 1 = 3 < C3.

ECRTS-2012 (Pisa, Italy)

slide-14
SLIDE 14

FPDS does not dominate FPTS

PAGE 14

ECRTS-2012 (Pisa, Italy)

  • Previous slide:
  • FPTS does not dominate FPDS;
  • Without example (space & time reasons):
  • FPDS does not dominate FPTS
  • Conclusion:
  • neither FPDS dominates FPTS nor vice versa
slide-15
SLIDE 15

mi = 1 mi  1 i,k = i i,k = 1

Novel hybrid algorithms

PAGE 15

Generalization graph for FPS algorithms FPPS FPTS FPNS FPDS FPTS+ FPPS+

ECRTS-2012 (Pisa, Italy)

slide-16
SLIDE 16

Novel hybrid algorithms – model

  • FPTS+ [6, 7]
  • a task is a sequence of mi sub-tasks;
  • each subtask i,k has a preemption threshold i,k;
  • a task has no (longer a) preemption threshold;
  • blocking:
  • Special cases for FPPS+:
  • mi = 1: FPTS;
  • i,k = i: FPPS+;
  • i,k = 1: FPDS.

PAGE 16

[6] U. Keskin, R.J. Bril, J.J. Lukkien, ETFA, 2010. [7] G. Yao and G. Buttazzo, EMSOFT, 2010.

) max max , max(

, π θ : 1 π π :

,

k l m k l i

C B

i k l l l i

   

ECRTS-2012 (Pisa, Italy)

slide-17
SLIDE 17

FPTS+ – preemption thresholds

PAGE 17

Ti Di Ci i WRi

P

WRi

N

1 7 2 1 3 1 9 2 15 15 7+1 2 10 15 3 26 17 1+5 1 26 16 Blocking tolerance 1 = 1  Not schedulable with FPDS. Blocking tolerance 1:

  • 1 = 1, C3 > 1, C2 > 1.

ECRTS-2012 (Pisa, Italy)

slide-18
SLIDE 18

FPTS+ – preemption thresholds

PAGE 18

Ti Di Ci i WRi

P

WRi

N

1 7 2 1 3 1 9 2 15 15 7+1 2 10 15 3 26 17 1+5 1 26 16 Blocking tolerance 2 < C3  Not schedulable with FPTS. Blocking tolerance 2:

  • FPPS: 2

P = 4 < C3;

Blocking tolerance 1:

  • 1 = 1, C3 > 1, C2 > 1.

ECRTS-2012 (Pisa, Italy)

slide-19
SLIDE 19

Ti Di Ci i WRi

P

WRi

N

i,1 i,2 WRi

T+

1 7 2 1 3 1 9 3

  • 2

2 15 15 7+1 2 10 15 2 3 15 3 26 17 1+5 1 26 16 1 2 17

FPTS+ – preemption thresholds

PAGE 19

Ti Di Ci i WRi

P

WRi

N

i,1 i,2 1 7 2 1 3 1 9 3

  • 2

15 15 7+1 2 10 15 2 3 3 26 17 1+5 1 26 16 1 2 Ti Di Ci i WRi

P

WRi

N

1 7 2 1 3 1 9 2 15 15 7+1 2 10 15 3 26 17 1+5 1 26 16

ECRTS-2012 (Pisa, Italy)

Blocking tolerance 2:

  • FPPS: 2

P = 4 < C3;

  • FPTS+: 2

T+ = 5

Blocking tolerance 1:

  • 1 = 1, C3 > 1, C2 > 1.
slide-20
SLIDE 20

Ti Di Ci i WRi

P

WRi

N

i,1 i,2 WRi

T+

1 7 2 1 3 1 9 3

  • 2

2 15 15 7+1 2 10 15 2 3 15 3 26 17 1+5 1 26 16 1 2 17

FPTS+ – preemption thresholds

PAGE 20

ECRTS-2012 (Pisa, Italy)

Blocking tolerance 2:

  • FPPS: 2

P = 4 < C3;

  • FPTS+: 2

T+ = 5

Blocking tolerance 1:

  • 1 = 1, C3 > 1, C2 > 1.
slide-21
SLIDE 21

mi = 1 mi  1 mi > 1  i = i i,k = i i,k = 1

Novel hybrid algorithms

PAGE 21

Generalization graph for FPS algorithms FPPS FPTS FPNS FPDS FPTS+ FPPS+ FPGS FPDS

ECRTS-2012 (Pisa, Italy)

slide-22
SLIDE 22

Novel hybrid algorithms – results

  • 1. Novel scheduling algorithms: FPGS
  • subtasks (similar to FPDS);
  • preemption thresholds for tasks (FPTS) and subtasks;
  • generalizes existing FPS algs.
  • 2. Schedulability analysis for FPGS
  • specializes to all existing FPS algs;
  • 3. Algorithm to maximize schedulability under FPS:
  • given: Ti, Di, Ci, and i;
  • determine: Ci,mi, i, i,mi (inspired by [8]).
  • 4. Evaluation: FPGS dominates existing FPS algs.

PAGE 22

[8] M. Bertogna, G.C. Buttazzo, G, Yao, RTSS, 2011.

ECRTS-2012 (Pisa, Italy)

slide-23
SLIDE 23

Novel hybrid algorithms – evaluation

PAGE 23

10 tasks, 10.000 task sets, Ti  [100, 10.000] (uniform), Ui by UUnifast ( Ci), Di  [0.5(Ti + Ci), Ti] (uniform);

ECRTS-2012 (Pisa, Italy)

slide-24
SLIDE 24

Conclusion

  • FPGS and existing FPS algorithms:
  • FPGS generalizes all others;
  • analysis of FPGS specializes to all others;
  • FPGS dominates all others.
  • Future work:
  • further improvements of schedulability:

− preemption thresholds for preemption points;

  • context switching cost;
  • ...

PAGE 24

ECRTS-2012 (Pisa, Italy)