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

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

Jan 29, 2016

Download

Documents

Jasmin Lyons
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Real-Time Scheduling II: Compositional Scheduling Framework Insik Shin Dept. of Computer Science KAIST.

Real-Time Scheduling II:Compositional Scheduling Framework

Insik Shin

Dept. of Computer Science

KAIST

Page 2: 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

T1 T2 T3

Page 3: 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

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

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

collective timing requirements of individual workloads within components

T1 T2 T3

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

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 Insik Shin Dept. of Computer Science KAIST.

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 Insik Shin Dept. of Computer Science KAIST.

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 Insik Shin Dept. of Computer Science KAIST.

Proposed Framework - Overview

7

Interface-based hierarchical scheduling framework

CPU

Scheduler

TaskTask

S

TaskTask

S

inter-face

inter-face

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

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 Insik Shin Dept. of Computer Science KAIST.

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 Insik Shin Dept. of Computer Science KAIST.

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 Insik Shin Dept. of Computer Science KAIST.

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 Insik Shin Dept. of Computer Science KAIST.

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 Insik Shin Dept. of Computer Science KAIST.

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 Insik Shin Dept. of Computer Science KAIST.

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 Insik Shin Dept. of Computer Science KAIST.

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 Insik Shin Dept. of Computer Science KAIST.

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 Insik Shin Dept. of Computer Science KAIST.

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

p

t

i

t)EDF,(W, dbf

k

THPT ki e

p

te

ik

)(

i) t,RM,(W, dbf

18

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

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 Insik Shin Dept. of Computer Science KAIST.

Periodic Resource Model

Supply bound function sbfΓ(t)

otherwise

)1(,2)1( if

)1(

))(1()t(sbf

QPkQPkt

Pk

QPkt

20

0 1 2 3 4 5 6 7 8 9 10

t su

pp

ly

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

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 Insik Shin Dept. of Computer Science KAIST.

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 Insik Shin Dept. of Computer Science KAIST.

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 Insik Shin Dept. of Computer Science KAIST.

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 Insik Shin Dept. of Computer Science KAIST.

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 Insik Shin Dept. of Computer Science KAIST.

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 Insik Shin Dept. of Computer Science KAIST.

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

res

ou

rce

uti

liza

tio

n

27

Γ(P,Q)

Peri-odic

(50,7)

EDF

Peri-odic

(70,9)

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

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

res

ou

rce

ca

pa

cit

y

28

Γ(P,Q)

Peri-odic

(50,7)

EDF

Peri-odic

(70,9)

Γ(29, 9.86)

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

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 Insik Shin Dept. of Computer Science KAIST.

Abstraction Overhead

Abstraction overhead (OΓ) is

30

1-U

U

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 Insik Shin Dept. of Computer Science KAIST.

Abstraction Overhead Bound

Abstraction overhead (OΓ) is

A = EDF

A = RM

W

W

Uk

U

2

)1(2O EDF,

1

12122

log

1O RM,

W

W

UkUk

31

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

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 Insik Shin Dept. of Computer Science KAIST.

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 Insik Shin Dept. of Computer Science KAIST.

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 Insik Shin Dept. of Computer Science KAIST.

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