insup lee precise center department of computer and information science university of pennsylvania

40
Simulation Relations, Interface Complexity, and Resource Optimality for Real-Time Hierarchical Systems Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania November 15, 2009 RePP Workshop, ESWeek 2009 Join work with M. Anand, A. Easwaran, L. Phan, A. Philippou, O. Sokolsky

Upload: trella

Post on 04-Feb-2016

29 views

Category:

Documents


0 download

DESCRIPTION

Simulation Relations, Interface Complexity, and Resource Optimality for Real-Time Hierarchical Systems. Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania November 15, 2009 RePP Workshop, ESWeek 2009 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

Simulation Relations, Interface Complexity, and Resource Optimality for Real-Time Hierarchical Systems

Insup LeePRECISE Center

Department of Computer and Information ScienceUniversity of Pennsylvania

November 15, 2009RePP Workshop, ESWeek 2009

Join work with M. Anand, A. Easwaran, L. Phan, A. Philippou, O. Sokolsky

Page 2: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

Hierarchical scheduling framework

Global scheduler

Subsystem 1

Localscheduler

Subsystem 2

Localscheduler

Subsystem n

Localscheduler

R1

Localscheduler

Interface 1 Interface 2 Interface n

HRTiHRT2HRT1

R2 Rm

[Behnam]

2009.10.15 2RePP Workshop

Page 3: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

Abstraction and Composition

• Abstraction Problem: Abstract resource demand of real-time component into an interface

• Minimize resource usage: Identify minimum amount of resource required to guarantee schedulability of real-time component

2009.10.15 RePP Workshop 3

Sporadic (10,2,10)

EDF

Sporadic (15,2,15)

Component interface

Page 4: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

Resource Satisfiability Analysis

• Given a component and a resource model, resource satisfiability analysis is to determine if, for every time interval,

2009.10.15 RePP Workshop 4

(maximum possible)resource demand

that the component’s task set needs under its scheduling

algorithm

(minimum possible) resource supplythat resource model

provides

Page 5: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

2009.10.15 RePP Workshop 5

Motivation

Resource optimality

Periodic resource model

Conclusions

EDP resource model

Incremental analysis

Multiprocessor clustering

Compositional schedulability analysis• Resource model based analysis• Periodic resource models

Page 6: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

2009.10.15 RePP Workshop 6

Resource Demand Bound• Resource demand bound during an interval of length t

– dbf(W,A,t) computes the maximum possible resource demand that W requires under algorithm A during a time interval of length t

• Periodic task model T(p,e) [Liu & Layland, ’73]– characterizes the periodic behavior of resource demand with

period p and execution time e– Ex: T(3,2)

0 1 2 3 4 5 6 7 8 9 10

t dem

and

Page 7: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

2009.10.15 RePP Workshop 7

• For a periodic workload set W = {Ti(pi,ei)}, – dbf (W,A,t) for EDF algorithm [Baruah et al.,‘90]

Demand Bound - EDF

dbf (W, EDF, t) = tpi

⎢ ⎣ ⎢

⎥ ⎦ ⎥

Ti∈W∑ ⋅ei

0 1 2 3 4 5 6 7 8 9 10

t dem

and

Page 8: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

2009.10.15 RePP Workshop 8

Task (resource demand) representations

Page 9: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

2009.10.15 RePP Workshop 9

Resource Supply Bound• Resource supply during an interval of length t

– sbfR(t) : the minimum possible resource supply by resource R over all intervals of length t

• For a single periodic resource model, i.e., Γ(3,2)– we can identify the worst-case resource allocation

0 1 2 3 4 5 6 7 8 9 10

t supp

ly

Page 10: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

2009.10.15 RePP Workshop

Demand-based Schedulability Analysis

• A periodic task set is schedulable under EDF if and only if dbf(t) ≤ t ≤

∀t > 0

over the periodic resource model Γ(P,Q)

[Baruah, et. al., ‘90]

t

reso

urce

t

dbf(t)

lsbf(t)[Shin and Lee, 2003]

lsbf(t)

10

Page 11: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

Resource Models as Interfaces• Characterization of resource supply

– Underlying component’s perspective: Virtualizes scheduling hierarchy represented by all higher-level components

– Parent component’s perspective: Characterizes resource supply to underlying component

• Fractional resource model– b.t units of resource in every t time units (0 < b <= 1) – Not realizable (processor cannot be shared fractionally)

2009.10.15 RePP Workshop 11

0 1 2 3 4 5 6 7 8 9 10Fraction b

Page 12: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

2009.10.15 RePP Workshop 12

Component Abstraction

T11(25,4)

T12(40,5)

T21(25,4)

T22(40,5)

R(?, ?)

EDF

EDF RM

R2(?, ?)R1(?, ?)R1(10, 3.01) R2(10, 4.34)

Page 13: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

2009.10.15 RePP Workshop 13

Compositional Real-Time Guarantees

T11(25,4)

T12(40,5)

T21(25,4)

T22(40,5)

R(?, ?)

EDF

EDF RM

R2(?, ?)R1(?, ?)R1(10, 3.1) R2(10, 4.4)

T1(10, 3.1) T2(10, 4.4)

R(5, 4.4)

Page 14: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

2009.10.15 RePP Workshop 14

Resource Supply Models

Tree schedule

Periodic model

EDP model

Recurring branching resource supply model

ACSR+

Bounded-delayResource model

Cyclic Executive

Page 15: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

EDP Resource Model• Explicit Deadline Periodic resource model: = (,,)

resource units in time units– Repeat supply every time units

• Properties– Time-partitioned, periodic resource allocation behavior

• Benefits of realizability and implementability– Blackout interval in EDP depends on and , for fixed

• Interval can be controlled using without changing bandwidth– Smaller bandwidth required to schedule the same

component, when compared to periodic resource models

2009.10.15 RePP Workshop 15

0 1 2 3 4 5 6 7 8 9 10 (5,3,4)

Page 16: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

2009.10.15 RePP Workshop 16

Motivation

Resource optimality

Periodic resource model

Conclusions

Characterization of optimality in compositional schedulability analysis

EDP resource model

Incremental analysis

Multiprocessor clustering

Page 17: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

What is the Problem?

• Existing models (periodic and EDP) have resource overheads– At least in comparison to total

demand of elementary components

• Is total elementary workload a good measure?– What about overhead of DM?

• How to account for DM overhead in component C5– Depends on interfaces of C4 and C3

• Do we really need resource models for this analysis?– Final goal is to abstract

components into tasks and jobs

2009.10.15 RePP Workshop 17

C1

EDFC2

DM

C4

EDFC3

EDF

C5

DM

Sporadic tasks Sporadic tasks

Sporadic tasks

Page 18: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

Assumptions and Notations

• Assumptions– Workload comprised of constrained deadline periodic

tasks• W = {i = (Ti,Ci,Di)i=1…n}, with Di ≤ Ti for all i

– Ignore preemption related overheads

• Notations– Schedulability load of component C = {W, EDF}

• LOADC = maxt>0 {dbfC(t)/t}– Schedulability load of component C = {W, DM}

• LOADC = maxi mint≤Di {rbfC,i(t)/t}

– Feasibility load of workload W• LOADW = LOADC, where C = {W, EDF}

2009.10.15 RePP Workshop 18

Page 19: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

Load Optimal Interfaces

• Match feasibility load of interface C with schedulability load of component C C = (1,LOADC,1) is a periodic task– Release of first job in C is synchronized with release of first job

in

2009.10.15 RePP Workshop 19

CS

C

Interface set

t × LOADC

dbfC

dbf of periodic task C

Slope of lineLOADC = LOAD{,S}

Page 20: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

Significance of Load Optimality• Proportionate fair scheduling of components

• Comparison to resource model based interfaces– Periodic model =(,) is load optimal only when =0– EDP model =(,,) is load optimal when

= and is GCD of deadlines and periods of all tasks in the system

2009.10.15 RePP Workshop 20

dbfC

sbf

+ - (+-)

-+- (-+-)

Page 21: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

Are Load Optimal Interfaces Really Optimal?

• Consider– C1 has workload {(6,1,6),(12,1,12)} and uses EDF– C2 has workload {(5,1,3),(10,1,7)} and uses EDF– C3 has workload {C1,C2} and uses EDF

• argmaxt dbfC1(t)/t ≠ argmaxt dbfC2

(t)/t

2009.10.15 RePP Workshop 21

dbfC1+ dbfC2

t × (LOADC1 + LOADC2

)

76

4

21

5 6 10 12 15

Page 22: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

Example (1)

• Zero slack assumption in open systems– Let 1=(7,1,7), 2=(9,1,9), C1={(1,2), DM}, C3={(C1,C2), EDF} for

some C2– Since C2 is unknown to C1, assume max. interference for 1 and 2

from C2

2009.10.15 RePP Workshop 22

Release Deadline Release Deadline

0 7 0 9

7 2 9 9

14 4 18 9

21 6 27 8

28 7 36 9

35 7 45 9

42 3 54 9

49 5

56 7

Task 1 Task 2

Page 23: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

Example (2)

2009.10.15 RePP Workshop 23

Page 24: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

Questions• Hardness of achieving demand optimal interfaces

– Can we classify the hardness?• Classification may lead us to some approximation schemes

• Load optimal interfaces and resource model based techniques offer one extreme solution– Abstract component into a single periodic task

• Can we trade interface size for resource utilization?– What about logarithmically or polynomially large interfaces?

2009.10.15 RePP Workshop 24

Page 25: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

2009.10.15 RePP Workshop 25

Task (resource demand) representations

Page 26: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

2009.10.15 RePP Workshop 26

Non-composable periodic models?

• What are right abstraction levels for real-time components?

(period, execution time)

• P1 = (p1,e1); e.g., (3,1)• P2 = (p2,e2); e.g., (7,1)• What is P1 || P2?

– (LCM(p1,p2), e1*n1 + e2*n2); e.g., (21,10) where n1*p1 = n2*p2 = LCM(p1,p2)

• What is the problem?– beh(P1) || beh(P2) = beh(P1||P2)?

• Compositionality– (P1 || P2) || P3 = P || P3, where P = P1 || P2

Page 27: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

2009.10.15 RePP Workshop 27

ACSR

Page 28: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

2009.10.15 RePP Workshop 28

ACSR+ for supply partition specification

Notion of “schedulable under”(1) T_1 is schedulable under S_1(2) T_2 is schedulable under S_2(3) T_1 is not schedulable under S_2

Page 29: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

Current work

• Simulation and schedulability Relations (preliminary results with Anna Philippou)– Between demand and supply– Between demand processes– Between supplies

• Semantic characterization of demand-supply based schedulability analysis

2009.10.15 RePP Workshop 29

Page 30: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

July 23, 2008 AFOSR PI Meeting

Motivation

Resource optimality

Periodic resource model

CARTS

EDP resource model

Incremental analysis

Multiprocessor clustering

Virtual processor cluster-based scheduling on multiprocessors

• Need for virtual clustering • MPR model based scheduling• Optimal virtual clustering for

implicit deadline task systems

302009.10.15 RePP Workshop 30

Page 31: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

July 23, 2008 AFOSR PI Meeting 31

Multicore Processor Virtualization

Scheduler

CPU

1. Compositional analysis of hierarchical multiprocessor real-time systems, through component interfaces

2. Using virtualization to develop new component interface for multiprocessor platforms

TaskTask

S

interface

TaskTask

S

interface

TaskTask

S

interface

CPU CPUVirtual CPU

2009.10.15 RePP Workshop 31

Page 32: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

Virtual Clusters

• Use platform virtualization to provide a trade-off between resource utilization and scheduling complexity

– Cluster interface: (,m)• is the resource model, m is the maximum number

of physical processors available– Inter-cluster scheduling is optimal

partitionedscheduling:

low utilization,easy to compute

globalscheduling:

high utilization,hard to compute

cluster-basedscheduling:

small clusters => partitioned,large clusters => global

2009.10.15 RePP Workshop 32

Page 33: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

33

Virtual Clustering Interface

For each i, mi (<= m) is maximum number of physical processors that can be assigned to i at any instant

1(m1) 2(m2) k(mk). . .

1

x1

2 m. . . Physical processors

x2xk. . . Task clusters

Virtual processors

2009.10.15 RePP Workshop 33

Page 34: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

Virtual Clustering• Task set and number of processors

====(3,2,3), =(6,4,6), and =(6,3,6), m=4

• Schedule under clustered scheduling 1, 2, 3 scheduled on processors 1 and 2

4, 5, 6 scheduled on processors 3 and 4

2009.10.15 RePP Workshop

0 1 2 3 4 5 6

Processor 1

Processor 2

Processor 3

Processor 4

11

5 5

2

2

3 3

4 4

1 1

2

2

33

4 4

55

6

6 6

34

Page 35: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

Multiprocessor Periodic Resource (MPR) model

= (, ,,m’) units of resource supply guaranteed in every time units, with

concurrency at most m’ in any time instant

• Consider = (5, 12, 3)

• Why MPR model?– Periodicity enables transformation of MPR model to periodic tasks

which can be scheduled using standard algorithms

0 1 2 3 4 5 6 7 8 9 10

Processor 2

Processor 3

Processor 4

2009.10.15 RePP Workshop 35

Page 36: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

Virtual Cluster-based Scheduling

1. Split task set into clusters x1, …, xk

2. Abstract xi into MPR interface i (for cluster VCi)

3. Transform each i into periodic tasks1. Enables inter-cluster scheduler to schedule i

2009.10.15 RePP Workshop 36

Page 37: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

Resource Satisfiability Condition

2009.10.15 RePP Workshop

)()ˆ(ˆarg1

llliestlm

jjj DAsbfCmIIIi

ij

Workload upper bound for Type (1) intervalsliCm

Workload upper bound for Type(2) intervalsassuming no carry-in demand at tidle

[BCL05]j

jI

ˆ

mi-1 largest carry-in demand values at tidle

(at most mi-1 tasks are active at tidle) [Baruah07]

estlm

jji

IIarg1

)ˆ(

Pseudo-polynomial upper bound for Al [Thm. 2 in SEL08]

ll DA

37

Page 38: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

Inter-cluster Scheduling

• Suppose. i (=) is GCD of periods/deadlines of all tasks in W2. Each model i=(, i, mi) is transformed to some periodic

tasks all having period and deadline 3. McNaughton’s algorithm is used for inter-cluster scheduling

2009.10.15 RePP Workshop

• Inter-cluster scheduling is optimal

• Successive jobs of the same task are scheduled in identical intervals

0 2

Processor 1

Processor 2

Processor 3

1 2

3

4

42

1

3

4

42

2

38

Page 39: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

Questions

• Open issues– Efficient clustering techniques for constrained and arbitrary

deadline task systems– Interface optimality for multiprocessor systems

• Hierarchical/compositional multi-mode systems with resource constraints

2009.10.15 RePP Workshop 39

Page 40: Insup Lee PRECISE Center Department of Computer and Information Science University of Pennsylvania

References• A Compositional Scheduling Framework for Digital Avionics Systems, Arvind Easwaran, Insup Lee, Oleg Sokolsky, Steve

Vestal, IEEE RTCSA 2009.• Optimal Virtual Cluster-based Multiprocessor Scheduling, Arvind Easwaran, Insik Shin, and Insup Lee, to be published in Real-

Time Systems Journal (RTSJ).• On the complexity of generating optimal interfaces for hierarchical systems, Arvind Easwaran, Madhukar Anand, Insup Lee,

Oleg Sokolsky, Workshop on Compositional Theory and Technology for Real-Time Embedded Systems (CRTS 2008).• Hierarchical Scheduling Framework for Virtual Clustering of Multiprocessors, Insik Shin, Arvind Easwaran, Insup Lee, ECRTS,

Prague, Czech Republic, July 2-4, 2008 (Runner-up in the best paper award)• Robust and Sustainable Schedulability Analysis of Embedded Software, Madhukar Anand and Insup Lee, LCTES, Tucson, AZ,

Jun 12-13, 2008 • Compositional Feasibility Analysis for Conditional Task Models, Madhukar Anand, Arvind Easwaran, Sebastian Fischmeister,

and Insup Lee, ISORC, Orlando, Florida, May 5-7, 2008• Compositional Real-Time Scheduling Framework with Periodic Model, Insik Shin and Insup Lee, ACM Transactions on

Embedded Computing Systems (TECS), vol 7, no 3, April 2008• Interface Algebra for Analysis of Hierarchical Real-Time Systems, Arvind Easwaran, Insup Lee, Oleg Sokolsky, Foundations of

Interface Technologies (FIT) workshop, Budapest, Hungary, April 5, 2008• Compositional Analysis Framework using EDP Resource Models, Arvind Easwaran, Madhukar Anand, and Insup Lee, Tucson,

Arizona, Dec 3-6, 2007 • Resources in process algebra, Insup Lee, Anna Philippou, Oleg Sokolsky, Journal of Logic and Algebraic Programming, Vol.

72, pp. 98-122,2007 • Incremental Schedulability Analysis of Hierarchical Real-Time Components, Arvind Easwaran, Insik Shin, Oleg Sokolsky, Insup

Lee, ACM EMSOFT 2006.

2009.10.15 RePP Workshop 40

This work was supported in part by AFOSR and NSF.