34
Real-Time Scheduling II: Compositional Scheduling Framework Insik Shin Dept. of Computer Science KAIST

Real- Time Scheduling II : Compositional Scheduling Framework

  • Upload
    ansel

  • View
    33

  • Download
    1

Embed Size (px)

DESCRIPTION

Real- Time Scheduling II : Compositional Scheduling Framework. Insik Shin Dept. of Computer Science KAIST. Timing Composition. What is a problem? How to compose two or more timing properties into a single timing property. T 1. T 2. T 3. Timing Composition. What is a problem? - PowerPoint PPT Presentation

Citation preview

Page 1: Real- Time Scheduling II : Compositional Scheduling Framework

Real-Time Scheduling II:Compositional Scheduling Framework

Insik ShinDept. of Computer Science

KAIST

Page 2: Real- Time Scheduling II : Compositional Scheduling Framework

Timing Composition What is a problem?

How to compose two or more timing properties into a single timing property

T1 T2 T3

Page 3: Real- Time Scheduling II : Compositional Scheduling Framework

Timing Composition What is a problem?

How to compose two or more timing properties into a sin-gle timing property

How useful is it? It serves as a basis for the design and analysis of compo-

nent-based real-time systems i.e., for real-time component interfaces that abstract the collec-

tive timing requirements of individual workloads within compo-nents

T1 T2 T3

Page 4: Real- Time Scheduling II : Compositional Scheduling Framework

Hierarchical Scheduling

4

CPU

TaskTask

Scheduler

S

TaskTask

SApplication 1(component)

Application 2(component)

EDF

RM EDF

Page 5: Real- Time Scheduling II : Compositional Scheduling Framework

Hierarchical Scheduling - Issues

5

System-level scheduler’s viewpoint

CPU

TaskTask

Scheduler

S

TaskTask

S

What is the real-time requirements of each applica-

tion ?

Application 1 Application 2

Page 6: Real- Time Scheduling II : Compositional Scheduling Framework

Hierarchical Scheduling - Issues

6

CPU

Application-level scheduler’s view-point

Scheduler

TaskTask

S

TaskTask

S

CPU ShareReal-time guaran-tees from CPU

supply?

How can we achieve schedu-lability analysis with this CPU

share?

Page 7: Real- Time Scheduling II : Compositional Scheduling Framework

Proposed Framework - Overview

7

Interface-based hierarchical scheduling framework

CPUScheduler

TaskTask

S

TaskTask

Sinter-face

inter-face

Page 8: Real- Time Scheduling II : Compositional Scheduling Framework

8

Proposed Framework - Approaches Interface-based hierarchical scheduling

framework Approach

Propose a new real-time resource model (periodic) Extend real-time scheduling theories with the new

resource model Develop interfaces with these results Use interfaces for component-based schedulabililty

analysis

Page 9: Real- Time Scheduling II : Compositional Scheduling Framework

9

Proposed Framework - Assumptions Tasks

periodic independent fully preemptable synchronously released

Uni-processor scheduling Scheduling algorithms : EDF / RM

scheduler

task

re-source

task

Page 10: Real- Time Scheduling II : Compositional Scheduling Framework

11

Real-Time Resource Modeling Real-time virtual resource model

Characterize the timing property of re-source allocations provided to a sin-gle task (application/component)

Previous approaches rate-based resource model

Our approach temporally partitioned resource model task

2task

1

scheduler

re-source

Page 11: Real- Time Scheduling II : Compositional Scheduling Framework

Resource Modeling Dedicated resource

available at all times at full capacity

Rate-based shared resource available at fractional capacity at all times

Time-shared resource availabe at full capacity at some times

time

task

re-source

task

scheduler

time

time

task

Page 12: Real- Time Scheduling II : Compositional Scheduling Framework

13

Periodic Resource Model Periodic resource model Γ(P,Q)

a time-shared resource, characterizes periodic resource allocations period P and allocation time Q Resource utilization UΓ= Q/P Example, P = 3, Q = 2

0 1 2 3 4 5 6 7 8 9 time

Page 13: Real- Time Scheduling II : Compositional Scheduling Framework

14

Outline Compositional Real-time Scheduling Frame-

work Motivation Real-time Resource Modeling Schedulability Analysis Component Timing Abstraction

Schedulability Analysis

Page 14: Real- Time Scheduling II : Compositional Scheduling Framework

15

Traditional Schedulability Analysis Demand-based analysis with dedicated re-

source

≤resource demandduring an interval of

length t

TaskTask

Scheduler

t

Page 15: Real- Time Scheduling II : Compositional Scheduling Framework

16

Schedulability Analysis Demand- and supply-based analysis with peri-

odic (time-shared) resource

≤ resource sup-ply,

during an inter-val of length t

resource demandduring an interval of

length t

TaskTask

Scheduler Peri-odicRe-

source

Page 16: Real- Time Scheduling II : Compositional Scheduling Framework

17

Resource Demand Bound Resource demand bound function

dbf(W,A,t) : the maximum possible resource de-mand of a task set W under algorithm A during an interval of length t

Page 17: Real- Time Scheduling II : Compositional Scheduling Framework

Demand Bound Functions For a periodic task set W = {Ti(pi,ei)},

dbf (W,A,t) for EDF [Baruah et al.,‘90]

dbf (W,A,t,i) for RM [Lehoczky et al., ‘89]

i

WT ie

pt

i

t)EDF,(W, dbf

k

THPT ki e

pte

ik

)(

i) t,RM,(W, dbf

18

Page 18: Real- Time Scheduling II : Compositional Scheduling Framework

19

Resource Supply Resource supply bound function

sbf Γ (t) : the minimum resource supply by resource Γ over all intervals of length t

Periodic resource Γ(3,2)

0 time

Γ(3,2)

t=1t=2t=3 t=5t=4t=1

Page 19: Real- Time Scheduling II : Compositional Scheduling Framework

Periodic Resource Model Supply bound function sbfΓ(t)

otherwise

)1(,2)1( if)1(

))(1()t(sbf

QPkQPktPkQPkt

20

0 1 2 3 4 5 6 7 8 9 10

t supp

ly

Page 20: Real- Time Scheduling II : Compositional Scheduling Framework

Schedulability Condition - EDF A periodic task set W is schedulable under EDF if and only if

[Baruah et al. ’90]

t t)EDF,dbf(W, 0t

)t(sbf t)EDF,dbf(W, 0t

21

over the worst-case resource supply of periodic resource model Γ(P,Q)

[Shin & Lee, ’03]

Page 21: Real- Time Scheduling II : Compositional Scheduling Framework

22

Schedulability Condition - RM A periodic task set W is schedulable under

RM over the worst-case resource supply of periodic resource model Γ(P,Q)

if and only if [Shin & Lee, ’03]

)t(sbf i) t,RM,dbf(W,W T pt0 ii

Page 22: Real- Time Scheduling II : Compositional Scheduling Framework

23

Schedulability Analysis Demand- and supply-based analysis

≤ resource sup-ply,

P. TaskP. Task

EDF/RM Peri-odicRe-

source

resource demand

naturally extensible with other scheduler, task models,

and/or resource models, as long as they can provide

resource demand and supply bounds.

Page 23: Real- Time Scheduling II : Compositional Scheduling Framework

24

Outline Compositional Real-time Scheduling Frame-

work Motivation Resource Modeling Schedulability Analysis Component Timing Abstraction

Component Timing Abstraction

Page 24: Real- Time Scheduling II : Compositional Scheduling Framework

Component Timing Abstraction Abstracting the collective real-time re-

quirements of a component as a single real-time requirement (real-time compo-nent interface)

25

Peri-odic

(50,7)

EDF

Peri-odic

(70,9)

real-time compo-

nentinterface

Peri-odic

(50,7)

Peri-odic

(70,9)

Real-Time Requirement

EDF

Page 25: Real- Time Scheduling II : Compositional Scheduling Framework

Component Timing Abstraction Finding a periodic resource model Γ(P,Q)

that guarantees the schedulability of a component

26

Peri-odic

(50,7)

EDF

Peri-odic

(70,9)

real-time compo-

nentinterface

periodic re-sourceΓ(P,Q)

periodic interface

Γ(P,Q)

Page 26: Real- Time Scheduling II : Compositional Scheduling Framework

Abstraction - Example In this example, a solution space of a peri-

odic resource Γ(P,Q) is

Solution Space under EDF

0

0.2

0.4

0.6

0.8

1

1 10 19 28 37 46 55 64 73

resource period

reso

urce

util

izat

ion

27

Γ(P,Q)

Peri-odic

(50,7)

EDF

Peri-odic

(70,9)

Page 27: Real- Time Scheduling II : Compositional Scheduling Framework

Abstraction - Example An approach to pick one out of solution

space Given a range of P, we can pick Γ(P,Q) such

that UΓ is minimized. (for example, 28 ≤ P ≤ 46)

(a) Solution Space under EDF

0

0.2

0.4

0.6

0.8

1

1 10 19 28 37 46 55 64 73

resource period

reso

urce

cap

acity

28

Γ(P,Q)

Peri-odic

(50,7)

EDF

Peri-odic

(70,9)

Γ(29, 9.86)

Page 28: Real- Time Scheduling II : Compositional Scheduling Framework

Abstraction

29

periodic interface

Γ(29, 9.86)

UW=0.27 UΓ=0.34

Peri-odic

(50,7)

EDF

Peri-odic

(70,9)

Page 29: Real- Time Scheduling II : Compositional Scheduling Framework

Abstraction Overhead Abstraction overhead (OΓ) is

30

1-UU

W

periodic interface

Γ(29, 9.86)

UW=0.27 UΓ=0.34

0.34/0.27 – 1 = 0.26

Peri-odic

(50,7)

EDF

Peri-odic

(70,9)

Page 30: Real- Time Scheduling II : Compositional Scheduling Framework

Abstraction Overhead Bound Abstraction overhead (OΓ) is

A = EDF

A = RM

W

W

UkU

2

)1(2O EDF,

1

12122log

1O RM,

W

W

UkUk

31

Page 31: Real- Time Scheduling II : Compositional Scheduling Framework

32

Abstraction Overhead Simulation Results

with periodic tasks and periodic resource under EDF/RM

the number of tasks n : 2, 4, 8, 16, 32, 64 the workload utilization U(W) : 0.2~0.7 ratio between the resource period and minimum

task period : represented by k

Page 32: Real- Time Scheduling II : Compositional Scheduling Framework

33

Abstraction Overhead

0

0.2

0.4

0.6

0.8

1 2 4 8 16 32 64

k

Analytical Bound - RM Analytical Bound - EDF

Simulation Result - RM Simulation Result - EDF

k ≈ Pmin /P, UW = 0.4, n = 8

Page 33: Real- Time Scheduling II : Compositional Scheduling Framework

Conclusion Compositional scheduling framework

Allows composition of multiple timing properties into one

Provides key techniques for component-based de-sign over real-time systems

Naturally applicable to many domains, including some systems areas such as Hypervisor + guest OS Distributed systems

Page 34: Real- Time Scheduling II : Compositional Scheduling Framework

35

Key References Compositional real-time scheduling framework

Periodic, independent tasks over uniprocessor RTSS ’03 (Best Paper), ’04, EMSOFT ’06 ACM TECS (Trans. on Embedded Computing Sys-

tems)’08 Synchronization

RTSS ’08 (Best Paper Runner-Up), EMSOFT ’07 IEEE TII (Transactions on Industrial Informatics) ’09

Multiprocessors ECRTS ’08 (Best Paper Runner-Up) Real-Time Systems Journal ’09