a new task model for streaming applications and its schedulability analysis

22
A New Task Model for Streaming Applications and its Schedulability Analysis Samarjit Chakraborty Lothar Thiele National University of Singapore ETH Zurich

Upload: lamar

Post on 10-Jan-2016

29 views

Category:

Documents


2 download

DESCRIPTION

A New Task Model for Streaming Applications and its Schedulability Analysis. Samarjit Chakraborty Lothar Thiele. National University of Singapore. ETH Zurich. Background. Stream Processing Applications Process a potentially infinite stream of data Data items/events are typed - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: A New Task Model for Streaming Applications and its Schedulability Analysis

A New Task Model for Streaming Applications and its Schedulability Analysis

Samarjit Chakraborty Lothar Thiele

National University of Singapore ETH Zurich

Page 2: A New Task Model for Streaming Applications and its Schedulability Analysis

2

Background• Stream Processing Applications

• Process a potentially infinite stream of data

• Data items/events are typed

• Part of the code executed depends on the type of the data/event

• Deadline constraints associated with the different event types

• Examples• Network packet processing applications (e.g.

software-based router)

• Multimedia applications

Page 3: A New Task Model for Streaming Applications and its Schedulability Analysis

3

Example• Packet Processing Application

• Two Packet Types• Type is not known at arrival

• VoIP packets have deadlines

• d1 determined by• line speed, or

• min packet interarrival time

• d2 is determined• independently of d1

• by QoS requirements

header parsing & classification

receive packet

VoIP processingtasks

route lookup

d1

d2

Page 4: A New Task Model for Streaming Applications and its Schedulability Analysis

4

Problem: Schedulability Analysis

d1

d2

stream ofevents

stream ofevents

stream ofevents

shared resource (processor)

Page 5: A New Task Model for Streaming Applications and its Schedulability Analysis

5

Contributions• A New Task Model

• Conditional branches (branch taken is determined at runtime)

• Deadlines are associated with paths in the task graph

• Event Model• Specifies bounds on the burstiness over

different time scales (more general than periodic, sporadic, etc.)

• Schedulability Analysis• Main Challenge: Composing the event model

with the task model to compute the resource demand

Page 6: A New Task Model for Streaming Applications and its Schedulability Analysis

6

Outline• Task Model for Streaming Applications

• Schedulability Analysis• Computing demand and resource bound

functions

• Composite demand and resource bound functions

• Conditions for schedulability

• Bounding the Analysis Interval

• Concluding Remarks

Page 7: A New Task Model for Streaming Applications and its Schedulability Analysis

7

Task Model• Set of task graphs triggered independently of

each other by event streams

• Task graph• Directed acyclic graph with a unique source

node v0

• Edges represent precedence constraints

• Each node/task v is annotated with c(v), d(v)

• c(v) is the computational/resource demand of v

• d(v) is the deadline of v w.r.t. the source node v0

Page 8: A New Task Model for Streaming Applications and its Schedulability Analysis

8

Task Model - Semantics• v0 is triggered at time t0

• vi+1 is triggered when vi finishes

• Deadline of v is t0 + d(v)

• Concurrent instantiation of the task graph is possible

• i.e. v0 might be triggered before the previous event is completely processed

v1

v2 v3

v4

v5

v0

(6,∞)

(3,∞)

(15,6) (14,10)

(9,12)

(3,∞)

Page 9: A New Task Model for Streaming Applications and its Schedulability Analysis

9

Event Model• Event Arrival Function

• () is the maximum number of events that can arrive with any time interval [t, t+) for all t ¸ 0

• Upper bound on the number of events that can arrive within any time interval of length

• Specified using a finite arrival sequence• hh1, 1i, h2, 2i, … , hn, nii• Example: hh20, 2i, h25, 5ii

• Given arrival sequence can be extended and tightened using sub-additivity property of arrival functions i.e. (s+t) · (s) + (t)

Page 10: A New Task Model for Streaming Applications and its Schedulability Analysis

10

Event Model - Example• Specified

• hh20, 2i, h25, 5ii

• Extended• hh20, 2i, h40, 4i, h25, 5i, h60, 6i, h45, 7i, h80,

8i, h65,9i, … i

• Remove redundant tuples• remove ha, di if there exist another tuple hi,

ii with i ¸ d and i · a• hh20, 2i, h40, 4i, h25, 5i, h60, 6i, h45, 7i, h80,

8i, h65,9i, h50,10i, … i

Page 11: A New Task Model for Streaming Applications and its Schedulability Analysis

11

Event Model - Example

2 4 6 8 10 12 14

102030

405060

70

2 4 6 8 10

20

40

60

80

finite arrival sequence

continuous arrival function

Page 12: A New Task Model for Streaming Applications and its Schedulability Analysis

12

Event Model• Given a set of task graphs, each graph is

triggered by its own event stream (characterized by the corresponding arrival function ())

• Event models traditionally studied in the real-time systems literature

• Periodic, sporadic, etc.

• () is more expressive and is a generalization of these event models

Page 13: A New Task Model for Streaming Applications and its Schedulability Analysis

13

Outline• Task Model for Streaming Applications

• Schedulability Analysis• Computing demand and resource bound

functions

• Composite demand and resource bound functions

• Conditions for schedulability

• Bounding the Analysis Interval

• Concluding Remarks

Page 14: A New Task Model for Streaming Applications and its Schedulability Analysis

14

Schedulability Analysis• Demand Bound Function dbf()

• Minimum computational demand that must be satisfied within any time interval of length if all the deadlines are to be met

v1

v2 v3

v4

v5

v0

(6,∞)

(3,∞)

(15,6) (14,10)

(9,12)

(3,∞)dbf = hh24, 6i, h23, 10i, h36, 12ii

Page 15: A New Task Model for Streaming Applications and its Schedulability Analysis

15

Schedulability Analysis• Resource Bound Function rbf()

• Maximum load that can be imposed within any time interval of length

v1

v2 v3

v4

v5

v0

(6,∞)

(3,∞)

(15,6) (14,10)

(9,12)

(3,∞)rbf = hh36, ii

Page 16: A New Task Model for Streaming Applications and its Schedulability Analysis

16

Schedulability Analysis• Resource/Processor Availability

• Within any time interval [t, t+), () resource units (e.g. processor cycles) are available, for all t ¸ 0

• Lower bound on the service available within any time interval of length

• Preemptive Dynamic Priority Schedulability Analysis

• Only one event triggers the task graph

• 0for )()(1

N

kkdbf

Page 17: A New Task Model for Streaming Applications and its Schedulability Analysis

17

Schedulability Analysis• Static Priority Schedulability Analysis

• Task graph gk has higher priority than gk+1

• Only one event triggers each task graph

• gk is schedulable if and only if

1

10 0for )}()({sup)(

k

jjk rbfdbf

Page 18: A New Task Model for Streaming Applications and its Schedulability Analysis

18

Schedulability Analysis• An event stream triggers each task graph

• Composite Demand Bound Function• Given a demand bound sequence

dbf = hhdbf1, 1i, … , hdbfm, mii and an arrival function ()

where dfb0=0

• Proof is based on induction on the number of tuples in the demand bound sequence

m

iiii

c dbfdbfdbf1

1 )()()(

Page 19: A New Task Model for Streaming Applications and its Schedulability Analysis

19

Schedulability Analysis• Composite Resource Bound Function is

similarly computed

• Conditions for schedulability

0for )()(1

N

k

ckdbf

1

10 0for )}()({sup)(

k

j

cj

ck rbfdbf

Page 20: A New Task Model for Streaming Applications and its Schedulability Analysis

20

Bounding the Analysis Interval • Bound each k by a linear function

• Bound k by a linear function•

• dbfk = hhCk, dkii • Ck is the maximum weight on any path in the task

graph and dk is the minimum deadline in the task graph

• Bound on the analysis interval is obtained by plugging in these values into the condition for schedulability

Page 21: A New Task Model for Streaming Applications and its Schedulability Analysis

21

Example

5 10 15 20

500

1000

15002000

2500

3000

3500

5 10 15 20

1000

2000

3000

4000

5000

rbf C()

dbf C()

5 10 15 20

1000

2000

3000

4000

β()dbf C()

• () = 195 • max = 38.4

Page 22: A New Task Model for Streaming Applications and its Schedulability Analysis

22

Concluding Remarks• Task model naturally captures some

essential properties of stream processing applications

• For realistic problems, small number of deadline constraints and small arrival sequences (burst and long-term rate)

• Future work: model variable task execution times