220 likes | 346 Views
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
E N D
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 • 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
receive packet d1 header parsing & classification VoIP processing tasks d2 route lookup 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
Problem: Schedulability Analysis stream of events stream of events stream of events d1 d2 shared resource (processor)
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
Outline • Task Model for Streaming Applications • Schedulability Analysis • Computing demand and resource boundfunctions • Composite demand and resource bound functions • Conditions for schedulability • Bounding the Analysis Interval • Concluding Remarks
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
v0 (3,∞) v1 (6,∞) v2 v3 (15,6) (14,10) v4 (3,∞) v5 (9,12) 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
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)
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
Event Model - Example finite arrival sequence continuous arrival function
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
Outline • Task Model for Streaming Applications • Schedulability Analysis • Computing demand and resource boundfunctions • Composite demand and resource bound functions • Conditions for schedulability • Bounding the Analysis Interval • Concluding Remarks
v0 (3,∞) v1 (6,∞) v2 v3 (15,6) (14,10) v4 (3,∞) v5 (9,12) 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 dbf =hh24, 6i, h23, 10i, h36, 12ii
Schedulability Analysis • Resource Bound Function rbf() • Maximum load that can be imposed within any time interval of length v0 (3,∞) v1 (6,∞) v2 v3 (15,6) (14,10) rbf =hh36, ii v4 (3,∞) v5 (9,12)
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
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
Schedulability Analysis • An event stream triggers each task graph • Composite Demand Bound Function • Given a demand bound sequence dbf =hhdbf1, 1i, … , hdbfm, miiand an arrival function () where dfb0=0 • Proof is based on induction on the number of tuples in the demand bound sequence
Schedulability Analysis • Composite Resource Bound Function is similarly computed • Conditions for schedulability
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
dbf C(D) β(D) D Example dbf C(D) rbf C(D) D D • () = 195 • max = 38.4
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