26 april 20041 a compositional framework for real-time guarantees insik shin and insup lee real-time...

29
26 April 2004 1 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of Computer and Information Science University of Pennsylvania

Post on 20-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 1

A Compositional Framework for Real-Time Guarantees

Insik Shin and Insup Lee

Real-time Systems GroupSystems Design Research Lab

Dept. of Computer and Information Science

University of Pennsylvania

Page 2: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 2

SDRL & RTGDepart. Of Computer and

Information Science

Scheduling Framework Example

CPU

OS Scheduler

Digital Controller Multimedia

Periodic Task T(p,e)

T1(25, 5)

Periodic Task T(p,e)

T2(33, 10)

Page 3: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 3

SDRL & RTGDepart. Of Computer and

Information Science

Motivating Example

CPU

OS Scheduler

Java Virtual Machine

J1(25,4) J2(40,5)

VM Scheduler

Multimedia

T2(33,10)

Digital Controller

T1(25,5)

Page 4: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 4

SDRL & RTGDepart. Of Computer and

Information Science

VM Scheduler’s Viewpoint

CPU

OS Scheduler

Multimedia

T2(33,10)

Digital Controller

T1(25,5)

Java Virtual Machine

J1(25,4) J2(40,5)

VM Scheduler

CPU Share

Real-Time Guarantee on CPU Supply

Page 5: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 5

SDRL & RTGDepart. Of Computer and

Information Science

Problems & Approach I

• Resource supply modeling– Characterize temporal property of resource

allocations

• we propose a periodic resource model

– Analyze schedulabilitywith the new resource model

Java Virtual Machine

J1(25,4) J2(40,5)

VM Scheduler

Periodic CPU Share

Page 6: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 6

SDRL & RTGDepart. Of Computer and

Information Science

OS Scheduler’s Viewpoint

CPU

OS Scheduler

Java Virtual Machine

J1(25,4) J2(40,5)

VM Scheduler

Multimedia

T2(33,10)

Digital Controller

T1(25,5) Real-Time Task

Real-Time Demand

Page 7: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 7

SDRL & RTGDepart. Of Computer and

Information Science

Problem II

• Real-Time Composition– Combine multiple real-time requirements into a

single real-time requirement guaranteeing schedulability

– Example: periodic task model T(p,e)

Real-Time Constraint

Real-Time Constraint

Real-Time Constraint

EDF/RM

T1 (3, 1) T2 (4, 1) T (?, ?)

Page 8: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 8

SDRL & RTGDepart. Of Computer and

Information Science

Approach II

• Simple approach : T(p,e)– p = LCM (T1, T2) LCM (T1, T2) = T1xN1 =

T2xN2

– e = p x (U1+ U2), Ui= ei/pi

EDF

T1 (3, 1) T2 (4, 1) T (12, 7)T (?, ?)

(12,7)T

5 10 15120 3

Deadline Miss !

Page 9: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 9

SDRL & RTGDepart. Of Computer and

Information Science

Approach II

• Our approach : periodic task model T(p,e)

EDF

T1 (3, 1) T2 (4, 1) T (2, 4/3)

(12,7)T

5 10 15120 3

(12,7)T

10 15120 32 4 6 8

Page 10: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 10

SDRL & RTGDepart. Of Computer and

Information Science

Outline

1. Scheduling component modeling• Periodic resource model

2. Scheduling component schedulability analysis3. Scheduling component composition

• Combine the real-time guarantees of multiple components into the real-time guarantee of a single component

Page 11: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 11

SDRL & RTGDepart. Of Computer and

Information Science

Scheduling Component Modeling

• Scheduling– assigns resources to workloads by algorithms

• Scheduling Component Model : M(W,R,A)– W : workload model– R : resource model– A : scheduling algorithm

Resource

Scheduler

WorkloadPeriodic Task WorkloadPeriodic Task

EDF / RM

???

Page 12: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 12

SDRL & RTGDepart. Of Computer and

Information Science

Resource Modeling

• Dedicated resource– Available all the time at its full capacity

0 time

Page 13: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 13

SDRL & RTGDepart. Of Computer and

Information Science

Resource Modeling

• Dedicated resource– Available all the time at its full capacity

• Fractional resource (slow resource) – Available all the time at its fractional capacity

0 time

Page 14: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 14

SDRL & RTGDepart. Of Computer and

Information Science

Resource Modeling

• Dedicated resource– Available all the time at its full capacity

• Fractional resource (slow resource)– Available all the time at its fractional capacity

• Partitioned resource [FeMo ’02]– Available all some times at its full capacity

0 time

Page 15: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 15

SDRL & RTGDepart. Of Computer and

Information Science

Resource Modeling

• Dedicated resource– Available all the time at its full capacity

• Fractional resource (slow resource)– Available all the time at its fractional capacity

• Partitioned resource– Available all some times at its full capacity

• Periodic resource R(period, allocation time) (ex. R(3,2))

– Available periodically at its full capacity

0 time

Page 16: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 16

SDRL & RTGDepart. Of Computer and

Information Science

T2(20,4)T1(10,2)

Scheduling Component Analysis

• Schedulability conditions– Exact conditions for EDF/RM

• Schedulability bounds– Utilization bounds for periodic workload under

EDF/RM– Capacity bounds for periodic resource under

EDF/RM

Periodic Resource

Scheduler

Periodic Task Periodic Task

EDF / RM

Page 17: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 17

SDRL & RTGDepart. Of Computer and

Information Science

Schedulability Conditions (EDF)

• Scheduling component M(W,R,EDF) is schedulable iff for all interval length t, demandw(EDF,t) ≤ supplyR(t) [RTSS03]

– demandw(EDF,t) : the maximum resource demand of workload W for an interval length t

– supplyR(t) : the minimum resource supply by resource R for an interval length t

i

ni ie

p

t

1

demand(EDF,t) =

Page 18: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 18

SDRL & RTGDepart. Of Computer and

Information Science

• supply =

• supply =

• supplyR(3) = 1

0 time

0 time

3

1

R(3,2)

R(3,2)

t

Page 19: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 19

SDRL & RTGDepart. Of Computer and

Information Science

Schedulability Conditions (RM)

• Scheduling component M(W,R,RM) is schedulable iff

for all task Ti(pi,ei),

ri(R) ≤ pi [RTSS03]

– ri(R): the maximum response time of task Ti

over R. the smallest time t s.t.

demand(RM,i,t) ≤ supplyR(t) k

THPT ki e

p

te

ik

)(

demand(RM,i,t) =

Page 20: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 20

SDRL & RTGDepart. Of Computer and

Information Science

Schedulability Conditions (RM)

• Scheduling component M(W,R,RM) is schedulable iff for all task Ti(pi,ei),

ri(R) ≤ pi [RTSS03]

– Example of finding the maximum response time ri(R)

time

resource demand

ri(R)

demand(RM,i,t)

supplyR(t)

Page 21: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 21

SDRL & RTGDepart. Of Computer and

Information Science

Motivating Example for Capacity Bound

• Given a task group G such that – Scheduling algorithm : EDF

– A set of periodic tasks : { T1(3,1), T2(7,1) },

model the timing requirements of the task group with a periodic task model

• G (3, 1.43) based on utilization does not work !!

10 432 65 987

Deadline miss for T2

Page 22: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 22

SDRL & RTGDepart. Of Computer and

Information Science

Motivating Example (2)

• Given a task group G such that – Scheduling algorithm : EDF

– A set of periodic tasks : { T1(3,1), T2(7,1) },

model the timing requirements of the task group with a periodic task model

• G (3, 2.01) works !!

10 432 65 987

Page 23: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 23

SDRL & RTGDepart. Of Computer and

Information Science

Capacity Bounds

• Resource capacity– For a periodic resource R(p,e), its capacity is e/p.

• Capacity bound of a component C(W, R(p,e), A) : CB(C)– C is schedulable if CB(C) ≤ e/p

• How to get the capacity bounds of C(W,R(p,e),A)

– assumption: the period p of R is given. – using the exact schedulability conditions, we can

get the minimum capacity of R satisfying the condition.

T1(25,4)

T2(40,5)EDF

R(10, ? )R(10, 3.1)CB(C) = 3.1/10

Page 24: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 24

SDRL & RTGDepart. Of Computer and

Information Science

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.34)

Page 25: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 25

SDRL & RTGDepart. Of Computer and

Information Science

Compositional Real-Time Guarantees

T21(25,4)

T22(40,5)

R(?, ?)

EDF

RM

R(5, 4.4)

R2(10, 4.4)

T2(10, 4.4)

T11(25,4)

T12(40,5)EDF

R1(10, 3.1)

T1(10, 3.1)

Page 26: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 26

Conclusion

• Summary– Periodic resource model– Scheduling component modeling and anaylsis– Scheduling component composition

• Future work– To evaluate the composition overhead in current

framework– To extend our framework with other resource models for

• Efficient composition w.r.t utilization and complexity• Ensure composition properties, i.e.,

– C1 || (C2 || C3) = (C1 || C2 ) || C3

– || (C1, C2, C3) = || (||(C1, C2), C3)

Page 27: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 27

SDRL & RTGDepart. Of Computer and

Information Science

THE

THE END

END

ENDTHE

THANK YOU

Page 28: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 28

SDRL & RTGDepart. Of Computer and

Information Science

Schedulability Conditions (EDF)

• Scheduling component M(W,R,EDF) is schedulable iff for all interval length t,

demandw(t) ≤ t [BHR90]

demandw(t) ≤ supplyR(t)

– demandw(t) : the maximum resource demand of

workload W over all intervals of length t

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

Resource demand in an interval

Resource supply during the interval

(from a dedicated resource)

Page 29: 26 April 20041 A Compositional Framework for Real-Time Guarantees Insik Shin and Insup Lee Real-time Systems Group Systems Design Research Lab Dept. of

26 April 2004 29

SDRL & RTGDepart. Of Computer and

Information Science

• Scheduling component M(W,R,RM) is schedulable iff for all task Ti(pi,ei),

ri ≤ pi [AB+93]

durationR(ri) ≤ pi

– ri : the maximum response time of task Ti

: the maximum resource demand of W to finish Ti

– durationR(t) : the maximum time that resource R takes to supply a t-time-unit resource

Schedulability Conditions (RM)

Duration to receive ri-time-unit

resource allocation

Deadlineto receive ri-time-unit

resource allocation

Max. Duration to receive ri-time-unit

resource allocation

Deadlineto receive ri-time-unit

resource allocation