new policies

61
Creating New Real-Time Scheduling Policies : Why and How ? Nicolas NAVET Mathieu GRENIER LORIA - INRIA Real-Time and Interoperability Group (TRIO) Nancy, France Email: [email protected] web: http://www.loria.fr/~nnavet 03/23/2005 Nicolas NAVET New Real-Time Scheduling Policies

Upload: nicolas-navet

Post on 19-Jan-2015

104 views

Category:

Technology


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: New policies

Creating New Real-Time Scheduling Policies :Why and How ?

Nicolas NAVET Mathieu GRENIER

LORIA - INRIAReal-Time and Interoperability Group (TRIO)

Nancy, FranceEmail: [email protected]

web: http://www.loria.fr/~nnavet

03/23/2005

Nicolas NAVET New Real-Time Scheduling Policies

Page 2: New policies

Introduction

Real-Time Systems

Temporal correctness is mandatory

Scheduling : ordering the execution of activities - tasks or messages -is crucial and has been extensively studied since the70s

Scheduling policies : Earliest Deadline First, Least-Laxity first,Fixed-Priority Preemptive, ...

Open question

Can we devise other scheduling policies of interest for real-timecomputing ?

Nicolas NAVET New Real-Time Scheduling Policies

Page 3: New policies

Introduction

Real-Time Systems

Temporal correctness is mandatory

Scheduling : ordering the execution of activities - tasks or messages -is crucial and has been extensively studied since the70s

Scheduling policies : Earliest Deadline First, Least-Laxity first,Fixed-Priority Preemptive, ...

Open question

Can we devise other scheduling policies of interest for real-timecomputing ?

Nicolas NAVET New Real-Time Scheduling Policies

Page 4: New policies

Description of the scheduling

Characteristics of the tasks

τk ,n: nth instance of τk

Ak ,n: release date

Ck ,n: computation time

Dk ,n: absolute deadline

Dk : relative deadline, i.e.Dk ,n = Ak ,n +Dk

Results of the scheduling

Wk ,n(t): remaining work for τk ,n attime t

Ek ,n: end of execution time

Bk ,n: beginning of execution

Rk ,n = Ek ,n−Ak ,n: response time

Wk ,n(t)

Rk ,n

Tk ,n

Ak ,n+1Dk ,nEk ,nBk ,nAk ,n

Ck ,n Ck ,n+1

t

Wk ,n+1(t)

Nicolas NAVET New Real-Time Scheduling Policies

Page 5: New policies

Description of the scheduling

Characteristics of the tasks

τk ,n: nth instance of τk

Ak ,n: release date

Ck ,n: computation time

Dk ,n: absolute deadline

Dk : relative deadline, i.e.Dk ,n = Ak ,n +Dk

Results of the scheduling

Wk ,n(t): remaining work for τk ,n attime t

Ek ,n: end of execution time

Bk ,n: beginning of execution

Rk ,n = Ek ,n−Ak ,n: response time

Wk ,n(t)

Rk ,n

Tk ,n

Ak ,n+1Dk ,nEk ,nBk ,nAk ,n

Ck ,n Ck ,n+1

t

Wk ,n+1(t)

Nicolas NAVET New Real-Time Scheduling Policies

Page 6: New policies

Scheduling performance criteria

Mandatory : “feasibility” or “schedulability” of the system

Feasible iff ∀k Rk = maxn∈N Rk ,n 6 Dk

Techniques : simulation, feasibility test or bound on responsetimes

Feasibility has been a major research field since the 70s ..

Increasingly important criteria (e.g. for Networked Control Systems)

Average response times (NCS: control delays)

Variability (“jitter”) in successive Bk ,n (NCS: sampling times)

Variability in successive Ek ,n (NCS: actuation times)

Fault-tolerance: behaviour in overload condition or with transientfaults

Nicolas NAVET New Real-Time Scheduling Policies

Page 7: New policies

Scheduling performance criteria

Mandatory : “feasibility” or “schedulability” of the system

Feasible iff ∀k Rk = maxn∈N Rk ,n 6 Dk

Techniques : simulation, feasibility test or bound on responsetimes

Feasibility has been a major research field since the 70s ..

Increasingly important criteria (e.g. for Networked Control Systems)

Average response times (NCS: control delays)

Variability (“jitter”) in successive Bk ,n (NCS: sampling times)

Variability in successive Ek ,n (NCS: actuation times)

Fault-tolerance: behaviour in overload condition or with transientfaults

Nicolas NAVET New Real-Time Scheduling Policies

Page 8: New policies

Scheduling performance criteria

Mandatory : “feasibility” or “schedulability” of the system

Feasible iff ∀k Rk = maxn∈N Rk ,n 6 Dk

Techniques : simulation, feasibility test or bound on responsetimes

Feasibility has been a major research field since the 70s ..

Increasingly important criteria (e.g. for Networked Control Systems)

Average response times (NCS: control delays)

Variability (“jitter”) in successive Bk ,n (NCS: sampling times)

Variability in successive Ek ,n (NCS: actuation times)

Fault-tolerance: behaviour in overload condition or with transientfaults

Nicolas NAVET New Real-Time Scheduling Policies

Page 9: New policies

Networked Control systems

Figure: from [MaViFuFo:05]

Examples of NCS: plant control, building automation, in-vehiclesystems , ..

Usual assumptions in control theory: sampling times and actuationtimes are strictly periodic

Nicolas NAVET New Real-Time Scheduling Policies

Page 10: New policies

Improving control : existing work

1 Control theory : control laws robust to delays or integration of thedelays as a parameter of the control law [ArCeEk:00]

2 Adapt task model : subdivide tasks in sampling - computation -actuation [BaRiViCr:04] or maximize frequency

3 Optimize parameters of well-known scheduling policies :FPP [GoRi:04], EDF [BaBuGoLi:99] or RR+FPP(Posix1003.1b) [NaMi:03]

4 Synthesize static schedules (off-line) : stored in timetables orusing automata [AlGoSi:02]

Our proposal : find new on-line scheduling algorithms optimized for aparticular system or a class of systems

Can be used with 1) and 2)

Better performance than 3)

Better suited to industrial requirements than 4) : problem sizes,incremental design process, evolutivity, efficient use of resources,use of COTS...

Nicolas NAVET New Real-Time Scheduling Policies

Page 11: New policies

Improving control : existing work

1 Control theory : control laws robust to delays or integration of thedelays as a parameter of the control law [ArCeEk:00]

2 Adapt task model : subdivide tasks in sampling - computation -actuation [BaRiViCr:04] or maximize frequency

3 Optimize parameters of well-known scheduling policies :FPP [GoRi:04], EDF [BaBuGoLi:99] or RR+FPP(Posix1003.1b) [NaMi:03]

4 Synthesize static schedules (off-line) : stored in timetables orusing automata [AlGoSi:02]

Our proposal : find new on-line scheduling algorithms optimized for aparticular system or a class of systems

Can be used with 1) and 2)

Better performance than 3)

Better suited to industrial requirements than 4) : problem sizes,incremental design process, evolutivity, efficient use of resources,use of COTS...

Nicolas NAVET New Real-Time Scheduling Policies

Page 12: New policies

Class of scheduling policies under study

Page 13: New policies

Formally defining scheduling policies

Why ?

Non-ambiguous description and implementation

Identify distinct “classes” of policies for which generic results hold(e.g. feasibility) =⇒ unify existing work

How ? Priority functions [Mig99]

Γk ,n(t) is the priority of instance τk ,n at time t - the resource isgranted by the Highest Priority First rule

Γk ,n(t) ∈ P with P = {(p1, . . . ,pn) ∈ Rn |n ∈ N}

A total order is defined on P (leximin ordering)Γk ,n(t) = (3,4,6) 4 Γi,j(t) = (3,4,5) (τi,j has a lower prioritythan τk ,n at time t)

Nicolas NAVET New Real-Time Scheduling Policies

Page 14: New policies

Formally defining scheduling policies

Why ?

Non-ambiguous description and implementation

Identify distinct “classes” of policies for which generic results hold(e.g. feasibility) =⇒ unify existing work

How ? Priority functions [Mig99]

Γk ,n(t) is the priority of instance τk ,n at time t - the resource isgranted by the Highest Priority First rule

Γk ,n(t) ∈ P with P = {(p1, . . . ,pn) ∈ Rn |n ∈ N}

A total order is defined on P (leximin ordering)Γk ,n(t) = (3,4,6) 4 Γi,j(t) = (3,4,5) (τi,j has a lower prioritythan τk ,n at time t)

Nicolas NAVET New Real-Time Scheduling Policies

Page 15: New policies

Formally defining scheduling policies

Why ?

Non-ambiguous description and implementation

Identify distinct “classes” of policies for which generic results hold(e.g. feasibility) =⇒ unify existing work

How ? Priority functions [Mig99]

Γk ,n(t) is the priority of instance τk ,n at time t - the resource isgranted by the Highest Priority First rule

Γk ,n(t) ∈ P with P = {(p1, . . . ,pn) ∈ Rn |n ∈ N}

A total order is defined on P (leximin ordering)Γk ,n(t) = (3,4,6) 4 Γi,j(t) = (3,4,5) (τi,j has a lower prioritythan τk ,n at time t)

Nicolas NAVET New Real-Time Scheduling Policies

Page 16: New policies

Formally defining scheduling policies

Why ?

Non-ambiguous description and implementation

Identify distinct “classes” of policies for which generic results hold(e.g. feasibility) =⇒ unify existing work

How ? Priority functions [Mig99]

Γk ,n(t) is the priority of instance τk ,n at time t - the resource isgranted by the Highest Priority First rule

Γk ,n(t) ∈ P with P = {(p1, . . . ,pn) ∈ Rn |n ∈ N}

A total order is defined on P (leximin ordering)Γk ,n(t) = (3,4,6) 4 Γi,j(t) = (3,4,5) (τi,j has a lower prioritythan τk ,n at time t)

Nicolas NAVET New Real-Time Scheduling Policies

Page 17: New policies

Formally defining scheduling policies

Why ?

Non-ambiguous description and implementation

Identify distinct “classes” of policies for which generic results hold(e.g. feasibility) =⇒ unify existing work

How ? Priority functions [Mig99]

Γk ,n(t) is the priority of instance τk ,n at time t - the resource isgranted by the Highest Priority First rule

Γk ,n(t) ∈ P with P = {(p1, . . . ,pn) ∈ Rn |n ∈ N}

A total order is defined on P (leximin ordering)Γk ,n(t) = (3,4,6) 4 Γi,j(t) = (3,4,5) (τi,j has a lower prioritythan τk ,n at time t)

Nicolas NAVET New Real-Time Scheduling Policies

Page 18: New policies

Formally defining scheduling policies

Why ?

Non-ambiguous description and implementation

Identify distinct “classes” of policies for which generic results hold(e.g. feasibility) =⇒ unify existing work

How ? Priority functions [Mig99]

Γk ,n(t) is the priority of instance τk ,n at time t - the resource isgranted by the Highest Priority First rule

Γk ,n(t) ∈ P with P = {(p1, . . . ,pn) ∈ Rn |n ∈ N}

A total order is defined on P (leximin ordering)Γk ,n(t) = (3,4,6) 4 Γi,j(t) = (3,4,5) (τi,j has a lower prioritythan τk ,n at time t)

Nicolas NAVET New Real-Time Scheduling Policies

Page 19: New policies

Formally defining scheduling policies

Why ?

Non-ambiguous description and implementation

Identify distinct “classes” of policies for which generic results hold(e.g. feasibility) =⇒ unify existing work

How ? Priority functions [Mig99]

Γk ,n(t) is the priority of instance τk ,n at time t - the resource isgranted by the Highest Priority First rule

Γk ,n(t) ∈ P with P = {(p1, . . . ,pn) ∈ Rn |n ∈ N}

A total order is defined on P (leximin ordering)Γk ,n(t) = (3,4,6) 4 Γi,j(t) = (3,4,5) (τi,j has a lower prioritythan τk ,n at time t)

Nicolas NAVET New Real-Time Scheduling Policies

Page 20: New policies

Defining policies through priority functions

Examples

First-In First-Out : ΓFIFOk ,n = (Ak ,n, k , n)

Last-In First-Out : ΓLIFOk ,n = (−Ak ,n, k ,−n)

Shortest Job First : ΓSJFk ,n = (Ck ,n, k , n)

Earliest Deadline First : ΓEDFk ,n = (Ak ,n +Dk , k , n)

Γk ,n = (Ak ,n + sin(Dk ,n)+ 110 ·Ck ,n, k , n) ??

Issues

Priority functions can be difficult to devise (e.g. Round Robin)

Not all priority functions define “valid” scheduling policies !!

Nicolas NAVET New Real-Time Scheduling Policies

Page 21: New policies

Defining policies through priority functions

Examples

First-In First-Out : ΓFIFOk ,n = (Ak ,n, k , n)

Last-In First-Out : ΓLIFOk ,n = (−Ak ,n, k ,−n)

Shortest Job First : ΓSJFk ,n = (Ck ,n, k , n)

Earliest Deadline First : ΓEDFk ,n = (Ak ,n +Dk , k , n)

Γk ,n = (Ak ,n + sin(Dk ,n)+ 110 ·Ck ,n, k , n) ??

Issues

Priority functions can be difficult to devise (e.g. Round Robin)

Not all priority functions define “valid” scheduling policies !!

Nicolas NAVET New Real-Time Scheduling Policies

Page 22: New policies

Defining policies through priority functions

Examples

First-In First-Out : ΓFIFOk ,n = (Ak ,n, k , n)

Last-In First-Out : ΓLIFOk ,n = (−Ak ,n, k ,−n)

Shortest Job First : ΓSJFk ,n = (Ck ,n, k , n)

Earliest Deadline First : ΓEDFk ,n = (Ak ,n +Dk , k , n)

Γk ,n = (Ak ,n + sin(Dk ,n)+ 110 ·Ck ,n, k , n) ??

Issues

Priority functions can be difficult to devise (e.g. Round Robin)

Not all priority functions define “valid” scheduling policies !!

Nicolas NAVET New Real-Time Scheduling Policies

Page 23: New policies

Defining policies through priority functions

Examples

First-In First-Out : ΓFIFOk ,n = (Ak ,n, k , n)

Last-In First-Out : ΓLIFOk ,n = (−Ak ,n, k ,−n)

Shortest Job First : ΓSJFk ,n = (Ck ,n, k , n)

Earliest Deadline First : ΓEDFk ,n = (Ak ,n +Dk , k , n)

Γk ,n = (Ak ,n + sin(Dk ,n)+ 110 ·Ck ,n, k , n) ??

Issues

Priority functions can be difficult to devise (e.g. Round Robin)

Not all priority functions define “valid” scheduling policies !!

Nicolas NAVET New Real-Time Scheduling Policies

Page 24: New policies

Defining policies through priority functions

Examples

First-In First-Out : ΓFIFOk ,n = (Ak ,n, k , n)

Last-In First-Out : ΓLIFOk ,n = (−Ak ,n, k ,−n)

Shortest Job First : ΓSJFk ,n = (Ck ,n, k , n)

Earliest Deadline First : ΓEDFk ,n = (Ak ,n +Dk , k , n)

Γk ,n = (Ak ,n + sin(Dk ,n)+ 110 ·Ck ,n, k , n) ??

Issues

Priority functions can be difficult to devise (e.g. Round Robin)

Not all priority functions define “valid” scheduling policies !!

Nicolas NAVET New Real-Time Scheduling Policies

Page 25: New policies

Defining policies through priority functions

Examples

First-In First-Out : ΓFIFOk ,n = (Ak ,n, k , n)

Last-In First-Out : ΓLIFOk ,n = (−Ak ,n, k ,−n)

Shortest Job First : ΓSJFk ,n = (Ck ,n, k , n)

Earliest Deadline First : ΓEDFk ,n = (Ak ,n +Dk , k , n)

Γk ,n = (Ak ,n + sin(Dk ,n)+ 110 ·Ck ,n, k , n) ??

Issues

Priority functions can be difficult to devise (e.g. Round Robin)

Not all priority functions define “valid” scheduling policies !!

Nicolas NAVET New Real-Time Scheduling Policies

Page 26: New policies

“Good” Real-time scheduling policies

A "good" scheduling policy (i.e. suited to real-time) shall be :

Decidable [Mig99]: at any time t there is exactly one instance (withpending work) of maximal priority

Implementable :

“piecewise order preserving” [Mig99] : during an interval of finitelength, the number of changes of the highest priority instance isfinite

coordinates of the priority functions must be representable withmachine numbers

“Shift temporal invariant” : the relative priority between any twoinstances does not depend on the numerical value of the clock

Nicolas NAVET New Real-Time Scheduling Policies

Page 27: New policies

“Good” Real-time scheduling policies

A "good" scheduling policy (i.e. suited to real-time) shall be :

Decidable [Mig99]: at any time t there is exactly one instance (withpending work) of maximal priority

Implementable :

“piecewise order preserving” [Mig99] : during an interval of finitelength, the number of changes of the highest priority instance isfinite

coordinates of the priority functions must be representable withmachine numbers

“Shift temporal invariant” : the relative priority between any twoinstances does not depend on the numerical value of the clock

Nicolas NAVET New Real-Time Scheduling Policies

Page 28: New policies

“Good” Real-time scheduling policies

A "good" scheduling policy (i.e. suited to real-time) shall be :

Decidable [Mig99]: at any time t there is exactly one instance (withpending work) of maximal priority

Implementable :

“piecewise order preserving” [Mig99] : during an interval of finitelength, the number of changes of the highest priority instance isfinite

coordinates of the priority functions must be representable withmachine numbers

“Shift temporal invariant” : the relative priority between any twoinstances does not depend on the numerical value of the clock

Nicolas NAVET New Real-Time Scheduling Policies

Page 29: New policies

“Good” Real-time scheduling policies

A "good" scheduling policy (i.e. suited to real-time) shall be :

Decidable [Mig99]: at any time t there is exactly one instance (withpending work) of maximal priority

Implementable :

“piecewise order preserving” [Mig99] : during an interval of finitelength, the number of changes of the highest priority instance isfinite

coordinates of the priority functions must be representable withmachine numbers

“Shift temporal invariant” : the relative priority between any twoinstances does not depend on the numerical value of the clock

Nicolas NAVET New Real-Time Scheduling Policies

Page 30: New policies

Domain of study (1/2)

“Time independent scheduling policies” =⇒ Preemptive except FIFO

A policy A is time independent iff ΓAk ,n(t) = ΓA

k ,n(0) ∀t

FIFO, LIFO, EDF, FPP, .. are time independent.

“Priority Promotion at Execution beginning” (PPEB) =⇒ Non-Preemptive

A is a PPEB policy iff its priority function can be written as.

ΓAk ,n(t) =

{ −→P A if t < Bk ,n

(−∞,k ,n) if t ≥ Bk ,n

where−→P A defines a time independent policy.

Property : there is one and only one change in the priority value -at the execution begin

E.g. : Non-Preemptive EDF with−−−→P EDF = (Ak ,n +Dk , k , n)

Nicolas NAVET New Real-Time Scheduling Policies

Page 31: New policies

Domain of study (1/2)

“Time independent scheduling policies” =⇒ Preemptive except FIFO

A policy A is time independent iff ΓAk ,n(t) = ΓA

k ,n(0) ∀t

FIFO, LIFO, EDF, FPP, .. are time independent.

“Priority Promotion at Execution beginning” (PPEB) =⇒ Non-Preemptive

A is a PPEB policy iff its priority function can be written as.

ΓAk ,n(t) =

{ −→P A if t < Bk ,n

(−∞,k ,n) if t ≥ Bk ,n

where−→P A defines a time independent policy.

Property : there is one and only one change in the priority value -at the execution begin

E.g. : Non-Preemptive EDF with−−−→P EDF = (Ak ,n +Dk , k , n)

Nicolas NAVET New Real-Time Scheduling Policies

Page 32: New policies

Domain of study (1/2)

“Time independent scheduling policies” =⇒ Preemptive except FIFO

A policy A is time independent iff ΓAk ,n(t) = ΓA

k ,n(0) ∀t

FIFO, LIFO, EDF, FPP, .. are time independent.

“Priority Promotion at Execution beginning” (PPEB) =⇒ Non-Preemptive

A is a PPEB policy iff its priority function can be written as.

ΓAk ,n(t) =

{ −→P A if t < Bk ,n

(−∞,k ,n) if t ≥ Bk ,n

where−→P A defines a time independent policy.

Property : there is one and only one change in the priority value -at the execution begin

E.g. : Non-Preemptive EDF with−−−→P EDF = (Ak ,n +Dk , k , n)

Nicolas NAVET New Real-Time Scheduling Policies

Page 33: New policies

Domain of study (1/2)

“Time independent scheduling policies” =⇒ Preemptive except FIFO

A policy A is time independent iff ΓAk ,n(t) = ΓA

k ,n(0) ∀t

FIFO, LIFO, EDF, FPP, .. are time independent.

“Priority Promotion at Execution beginning” (PPEB) =⇒ Non-Preemptive

A is a PPEB policy iff its priority function can be written as.

ΓAk ,n(t) =

{ −→P A if t < Bk ,n

(−∞,k ,n) if t ≥ Bk ,n

where−→P A defines a time independent policy.

Property : there is one and only one change in the priority value -at the execution begin

E.g. : Non-Preemptive EDF with−−−→P EDF = (Ak ,n +Dk , k , n)

Nicolas NAVET New Real-Time Scheduling Policies

Page 34: New policies

Domain of study (1/2)

“Time independent scheduling policies” =⇒ Preemptive except FIFO

A policy A is time independent iff ΓAk ,n(t) = ΓA

k ,n(0) ∀t

FIFO, LIFO, EDF, FPP, .. are time independent.

“Priority Promotion at Execution beginning” (PPEB) =⇒ Non-Preemptive

A is a PPEB policy iff its priority function can be written as.

ΓAk ,n(t) =

{ −→P A if t < Bk ,n

(−∞,k ,n) if t ≥ Bk ,n

where−→P A defines a time independent policy.

Property : there is one and only one change in the priority value -at the execution begin

E.g. : Non-Preemptive EDF with−−−→P EDF = (Ak ,n +Dk , k , n)

Nicolas NAVET New Real-Time Scheduling Policies

Page 35: New policies

Domain of study (2/2)

Why are PPEB important in practice ?

“Good” scheduling policies easily implementable on low-costCOTS hardware : Controller Area Network or Ethernet

Important expressiveness ! All widely used non-preemptivescheduling policies belong to that class

Sub-class of PPEB: Arrival Time Dependent (ATD) policies−−→PATD = (Ak ,n +pk , k , n) where pk depends from τk - in thefollowing pk : Dk ×Ck 7→ IR

Why ? good tradeoff can be found between

EDF is “optimal” for schedulability -−−−−→P EDF = (Ak ,n +Dk , k , n)

JSF is “optimal” for response times -−−−→P J SF = (Ck , k , n)

Nicolas NAVET New Real-Time Scheduling Policies

Page 36: New policies

Domain of study (2/2)

Why are PPEB important in practice ?

“Good” scheduling policies easily implementable on low-costCOTS hardware : Controller Area Network or Ethernet

Important expressiveness ! All widely used non-preemptivescheduling policies belong to that class

Sub-class of PPEB: Arrival Time Dependent (ATD) policies−−→PATD = (Ak ,n +pk , k , n) where pk depends from τk - in thefollowing pk : Dk ×Ck 7→ IR

Why ? good tradeoff can be found between

EDF is “optimal” for schedulability -−−−−→P EDF = (Ak ,n +Dk , k , n)

JSF is “optimal” for response times -−−−→P J SF = (Ck , k , n)

Nicolas NAVET New Real-Time Scheduling Policies

Page 37: New policies

Domain of study (2/2)

Why are PPEB important in practice ?

“Good” scheduling policies easily implementable on low-costCOTS hardware : Controller Area Network or Ethernet

Important expressiveness ! All widely used non-preemptivescheduling policies belong to that class

Sub-class of PPEB: Arrival Time Dependent (ATD) policies−−→PATD = (Ak ,n +pk , k , n) where pk depends from τk - in thefollowing pk : Dk ×Ck 7→ IR

Why ? good tradeoff can be found between

EDF is “optimal” for schedulability -−−−−→P EDF = (Ak ,n +Dk , k , n)

JSF is “optimal” for response times -−−−→P J SF = (Ck , k , n)

Nicolas NAVET New Real-Time Scheduling Policies

Page 38: New policies

Domain of study (2/2)

Why are PPEB important in practice ?

“Good” scheduling policies easily implementable on low-costCOTS hardware : Controller Area Network or Ethernet

Important expressiveness ! All widely used non-preemptivescheduling policies belong to that class

Sub-class of PPEB: Arrival Time Dependent (ATD) policies−−→PATD = (Ak ,n +pk , k , n) where pk depends from τk - in thefollowing pk : Dk ×Ck 7→ IR

Why ? good tradeoff can be found between

EDF is “optimal” for schedulability -−−−−→P EDF = (Ak ,n +Dk , k , n)

JSF is “optimal” for response times -−−−→P J SF = (Ck , k , n)

Nicolas NAVET New Real-Time Scheduling Policies

Page 39: New policies

Overview of the approach

Input of the problem

Search space : class of ATD policies

Description of the application:

set of tasksperformance criteria

Steps

1 Select one candidate policy A among ATD policies withΓA

k ,n = (Ak ,n+?, k , n)

7→ “search” technique (random, GA,GP, ..)

1 Test feasibility : ΓAk ,n× taskset 7→ {feasible, non− feasible}

7→ generic feasibility analysis

1 If feasible evaluate other criteria : simulation or monitoring

7→ experiment platform

Nicolas NAVET New Real-Time Scheduling Policies

Page 40: New policies

Overview of the approach

Input of the problem

Search space : class of ATD policies

Description of the application:

set of tasksperformance criteria

Steps

1 Select one candidate policy A among ATD policies withΓA

k ,n = (Ak ,n+?, k , n)

7→ “search” technique (random, GA,GP, ..)

1 Test feasibility : ΓAk ,n× taskset 7→ {feasible, non− feasible}

7→ generic feasibility analysis

1 If feasible evaluate other criteria : simulation or monitoring

7→ experiment platform

Nicolas NAVET New Real-Time Scheduling Policies

Page 41: New policies

Overview of the approach

Input of the problem

Search space : class of ATD policies

Description of the application:

set of tasksperformance criteria

Steps

1 Select one candidate policy A among ATD policies withΓA

k ,n = (Ak ,n+?, k , n)

7→ “search” technique (random, GA,GP, ..)

1 Test feasibility : ΓAk ,n× taskset 7→ {feasible, non− feasible}

7→ generic feasibility analysis

1 If feasible evaluate other criteria : simulation or monitoring

7→ experiment platform

Nicolas NAVET New Real-Time Scheduling Policies

Page 42: New policies

Overview of the approach

Input of the problem

Search space : class of ATD policies

Description of the application:

set of tasksperformance criteria

Steps

1 Select one candidate policy A among ATD policies withΓA

k ,n = (Ak ,n+?, k , n)

7→ “search” technique (random, GA,GP, ..)

1 Test feasibility : ΓAk ,n× taskset 7→ {feasible, non− feasible}

7→ generic feasibility analysis

1 If feasible evaluate other criteria : simulation or monitoring

7→ experiment platform

Nicolas NAVET New Real-Time Scheduling Policies

Page 43: New policies

“Generic” schedulability analysis

Page 44: New policies

Response time basics

SIk ,n(t1, t2): amount of work of priority higher or equal to τk ,n

released between t1 and t2 (Work Arrival Function)

Uk ,n: largest date before Ak ,n such that no higher priority workis pending

0

SIk,n(Uk,n,Uk,n + x)

Uk,n Ak,n Ek,n t

0 x

Figure: Ek ,n = Uk ,n +min{x > 0 | SIk ,n(Uk ,n,Uk ,n + x) = x }

Nicolas NAVET New Real-Time Scheduling Policies

Page 45: New policies

Response time basics

SIk ,n(t1, t2): amount of work of priority higher or equal to τk ,n

released between t1 and t2 (Work Arrival Function)

Uk ,n: largest date before Ak ,n such that no higher priority workis pending

0

SIk,n(Uk,n,Uk,n + x)

Uk,n Ak,n Ek,n t

0 x

Figure: Ek ,n = Uk ,n +min{x > 0 | SIk ,n(Uk ,n,Uk ,n + x) = x }

Nicolas NAVET New Real-Time Scheduling Policies

Page 46: New policies

Bound on response times (1/2)

Problem: one cannot evaluate all Rk ,n’s !A solution: bound the amount of higher priority work - Majorizing

WAF: SIk ,n(u,u + t) 6 SIk ,n(t)∀u > 0, t > 0

tAk ,nUk ,n Ek ,n

x0

SIk ,n (Uk ,n,Uk ,n + x)

SIk ,n (x)

Ek ,n

Nicolas NAVET New Real-Time Scheduling Policies

Page 47: New policies

Bound on response times (1/2)

Problem: one cannot evaluate all Rk ,n’s !A solution: bound the amount of higher priority work - Majorizing

WAF: SIk ,n(u,u + t) 6 SIk ,n(t)∀u > 0, t > 0

tAk ,nUk ,n Ek ,n

x0

SIk ,n (Uk ,n,Uk ,n + x)

SIk ,n (x)

Ek ,n

Nicolas NAVET New Real-Time Scheduling Policies

Page 48: New policies

Bound on response times (2/2)

Issues

The bound SIk ,n(t) depends on Ak ,n

Lemma 4 in [Mig99]: a bound can be found by analysing allpossible arrival times in the longest CPU busy period =⇒ notusable as is

In practice: determine ”by hand” for a particular policy the set ofarrival times that lead to changes in SIk ,n(t) =⇒ not an algorithm

Our contribution: “generic” schedulability analysis

An algorithm that determines from the priority function

the set of arrival timesthe functions SIk ,n(t) for which to compute the first fixed-point

Nicolas NAVET New Real-Time Scheduling Policies

Page 49: New policies

Bound on response times (2/2)

Issues

The bound SIk ,n(t) depends on Ak ,n

Lemma 4 in [Mig99]: a bound can be found by analysing allpossible arrival times in the longest CPU busy period =⇒ notusable as is

In practice: determine ”by hand” for a particular policy the set ofarrival times that lead to changes in SIk ,n(t) =⇒ not an algorithm

Our contribution: “generic” schedulability analysis

An algorithm that determines from the priority function

the set of arrival timesthe functions SIk ,n(t) for which to compute the first fixed-point

Nicolas NAVET New Real-Time Scheduling Policies

Page 50: New policies

Search techniques and Experiments

Page 51: New policies

Exploration of the solution space

Issues

Size of the search space is infinite

Schedulability analysis can be time-consuming if the system ishighly loaded

Evaluation of other criteria through simulation or measurementsis time-consuming

Tested :

Exhaustive search with a chosen “granularity”

Iterated hill-climbing with tabu list (neighborhood method)

Possible : all optimization techniques

Genetic Algorithm, Genetic Programming, Simulated Annealing...

Page 52: New policies

Exploration of the solution space

Issues

Size of the search space is infinite

Schedulability analysis can be time-consuming if the system ishighly loaded

Evaluation of other criteria through simulation or measurementsis time-consuming

Tested :

Exhaustive search with a chosen “granularity”

Iterated hill-climbing with tabu list (neighborhood method)

Possible : all optimization techniques

Genetic Algorithm, Genetic Programming, Simulated Annealing...

Page 53: New policies

Exploration of the solution space

Issues

Size of the search space is infinite

Schedulability analysis can be time-consuming if the system ishighly loaded

Evaluation of other criteria through simulation or measurementsis time-consuming

Tested :

Exhaustive search with a chosen “granularity”

Iterated hill-climbing with tabu list (neighborhood method)

Possible : all optimization techniques

Genetic Algorithm, Genetic Programming, Simulated Annealing...

Page 54: New policies

Experiments (1/2)

0

2

4

6

8

10

12

14

16

18

20

0 20 40 60 80 100 0

20

40

60

80

100Re

spon

se ti

me

impr

ovem

ent o

ver E

DF (i

n %

)

Feas

ible

task

set

s (in

%)

Value of parameter ’c’ in priority function

FeasibilityAverage response time

Figure: Performance of ATD policies defined by−→P = (Ak ,n + c · Ck ,n +

Dk , k , n) when the value of c increases - Each point = 1500 random experi-

ments with 20 tasks - < 1% of task sets feasible with SJF.Nicolas NAVET New Real-Time Scheduling Policies

Page 55: New policies

Experiments (2/2)

0

2

4

6

8

10

12

14

16

18

20

0 20 40 60 80 100 0

20

40

60

80

100

Resp

onse

tim

e im

prov

emen

t ove

r EDF

(in

%)

Feas

ible

task

set

s (in

%)

Value of parameter ’c’ in priority function

Feasibility - 1DkAverage response time - 1Dk

Average response time - 0.1DkFeasibility - 0.1Dk

Figure: Same as before + policies defined by−→P = (Ak ,n + c · Ck ,n +

110 Dk , k , n)

Much better improvements (> 25%) for a particular task set !

Nicolas NAVET New Real-Time Scheduling Policies

Page 56: New policies

Experiments (2/2)

0

2

4

6

8

10

12

14

16

18

20

0 20 40 60 80 100 0

20

40

60

80

100

Resp

onse

tim

e im

prov

emen

t ove

r EDF

(in

%)

Feas

ible

task

set

s (in

%)

Value of parameter ’c’ in priority function

Feasibility - 1DkAverage response time - 1Dk

Average response time - 0.1DkFeasibility - 0.1Dk

Figure: Same as before + policies defined by−→P = (Ak ,n + c · Ck ,n +

110 Dk , k , n)

Much better improvements (> 25%) for a particular task set !

Nicolas NAVET New Real-Time Scheduling Policies

Page 57: New policies

Summary

There are “other” on-line policies of interest for real-time computing:

feasibility can be analyzed (sometimes better thanEDF!)optimized for one or several criteriaeasily implementable on COTS O.S. or Networkthe choice of the policy can be automatized in thedevelopment process

Perspective : Time sharing policies and multi-policy systems

Software tools : downloadable at http://www.loria.fr/~nnavet

Simulator for time-independent policies : Java applet withchronogram

Software layer for scheduling with time independent policies ontop of Posix1003.1b systems

Nicolas NAVET New Real-Time Scheduling Policies

Page 58: New policies

Summary

There are “other” on-line policies of interest for real-time computing:

feasibility can be analyzed (sometimes better thanEDF!)optimized for one or several criteriaeasily implementable on COTS O.S. or Networkthe choice of the policy can be automatized in thedevelopment process

Perspective : Time sharing policies and multi-policy systems

Software tools : downloadable at http://www.loria.fr/~nnavet

Simulator for time-independent policies : Java applet withchronogram

Software layer for scheduling with time independent policies ontop of Posix1003.1b systems

Nicolas NAVET New Real-Time Scheduling Policies

Page 59: New policies

Summary

There are “other” on-line policies of interest for real-time computing:

feasibility can be analyzed (sometimes better thanEDF!)optimized for one or several criteriaeasily implementable on COTS O.S. or Networkthe choice of the policy can be automatized in thedevelopment process

Perspective : Time sharing policies and multi-policy systems

Software tools : downloadable at http://www.loria.fr/~nnavet

Simulator for time-independent policies : Java applet withchronogram

Software layer for scheduling with time independent policies ontop of Posix1003.1b systems

Nicolas NAVET New Real-Time Scheduling Policies

Page 60: New policies

Bibliography

The results presented in this talk can be found in [GrNa:05].[Mig:99] J. Migge, Scheduling of recurrent tasks on one processor: A trajectory based Model, PhD Thesis, University of

Nice Sophia-Antipolis, 1999.

[GrNa:05] M. Grenier and N. Navet, Non-Preemptive Real-Time Scheduling with Arrival Time Dependent Policies,

submitted to IEEE ETFA’05, to appear as INRIA Research Report, Avril 2005.

[NaMi:03] N. Navet, J. Migge, Fine Tuning the Scheduling of Tasks through a Genetic Algorithm: Application to

Posix1003.1b Compliant Systems, IEE Proceedings Software, 150(1):13-24, 2003.

[BaBuGoLi:99] S. Baruah, G. Buttazzo, S. Gorinsky and G. Lipari, Scheduling Periodic Task Systems to Minimize Output

Jitter, International Conference on Real-Time Computing Systems and Applications, pp 62-69, 1999.

[BaRiViCr:04] P. Balbastre, I. Ripoll, J. Vidal, A. Crespo, A Task Model to Reduce Control Delays, Real-Time Systems,

27:215-236, 2004.

[GoRi:04] J. Goossens, P. Richard, Performance Optimization for Hard Real-Time Fixed Priority Tasks, International

Conference on Real-Time Systems, Paris, Avril, 2004.

[MaViFuFo:05] P. Marti, R. Villà, J. Fuertes and G. Fohler, Networked Control Systems Overview, The industrial

Information Technology Handbook, CRC Press, 2005.

[AlGoSi:02] K. Altisen, G. Gössler, J. Sifakis, Scheduler Modeling based on the Controller Synthesis Paradigm,

Real-Time Systems, 23:55-84, 2002.

[ArCeEk00] K.E. Arzen, A. Cervin, J. Ecker, An Introduction to Control and Scheduling Co-Design, Conference on

Control and Decision, Sydney, Australia, 2000.

Nicolas NAVET New Real-Time Scheduling Policies

Page 61: New policies

Appendix : computation of response time bounds forperiodic tasks scheduled under ATD policies

Set of significant arrival dates for ATD policies(pk = Γk ,n[1]−Ak ,n)

a ∈ {t = dn×Tk +pk −pie | t > 0, t < L −Ck , i = 1..m, n ∈ N}.

∀a compute first fixed-point of

Workload of higher priority tasks:

Wi(a, t) = ∑k 6=i

(min

(⌊t

Tk

⌋+1,

⌊a+pi −pk

Tk

⌋+1

))+

︸ ︷︷ ︸maximum number of instances in intervalt

.Ck ,

+ Bi(a) the blocking factor (lower priority task already in executionat time a)

Bi(a) = maxi=1..m

{Ci | pi > a+pk}

Nicolas NAVET New Real-Time Scheduling Policies