1 / 13

Conditional scheduling with varying deadlines

Conditional scheduling with varying deadlines. Ben Horowitz bhorowit@cs.berkeley.edu. d: A. 2 ms. A. r: A , B. B. A. 2 ms. d: B. B. 2 ms. Which output: A or B ?. A , B each require 3 milliseconds to compute. In 4 milliseconds, one will need to be output.

fisherhenry
Download Presentation

Conditional scheduling with varying deadlines

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Conditional scheduling with varying deadlines Ben Horowitzbhorowit@cs.berkeley.edu

  2. d: A 2 ms A r: A, B B A 2 ms d: B B 2 ms Which output: A or B? • A, B each require 3 milliseconds to compute. • In 4 milliseconds, one will need to be output. • Decision about which to output in 2 milliseconds. • Speculatively start to compute both! A “due” here A, B “released” here B“due” here

  3. Varying deadlines in Giotto • I first saw this problem when working on precedence-constrained Giotto scheduling. • A task is invoked; when the task’s actual deadline is depends on future mode changes. • Following one set of mode changes, the task may have a 5ms deadline, say.Following another, the task may have a 10ms deadline.

  4. Varying deadlines in Giotto actuator sensor input port output port task 1 task 2 mode 1 mode 1 mode 1 mode 1 mode 2 mode 1 mode 3

  5. Conditional scheduling problem Finite state machine: • Set Vertices of vertices. • Set Edges of edges. • For each edge e a number duration(e). • Initial vertex v0. Workload: • Set Tasks of tasks. • For each tTasks,a number time(t). • For each vVertices, release(v)  Tasks. • For each vVertices, due(v)  Tasks.

  6. v1 v2 v3 v4 v5 v6 Game: scheduler vs. environment v0 • Let Runs = set of paths of length ≥ 2. • Strategy is a function: σ: Runs × Tasks  ∑tTasks σ((…,vi ,vi+1), t ) ≤ duration(vi , vi+1 )

  7. v0 d: t Is + ≥ time(t) ? v1 v2 v3 v4 v5 v6 When is a strategy winning? r: t • Consider arbitrary run, position vi . • Consider arbitrary task t in release(vi ). • Find first subsequent vj at which t is due. • Let n = # of times t is released at/after vi , before vj . • Strategy must allocate n × time(t) between vi and vj .

  8. Related models • [Baruah 1998a, 1998b]: Introduced conditional scheduling model. • Tasks have fixed deadlines. • EDF is optimal. • Question is: how to determine if demand exceeds processing time? • [Chakraborty, Erlebach, and Thiele, 2001]: Hardness results and approximation algorithm to answer above question. • Our model generalizes these: • Deadlines of tasks vary. • Extends to include precedence constraints.

  9. d: A 3 2 ms r: A, B 1 2 2 ms d: B 2 ms 4 Algorithm for strategy synthesis • Construct linear constraints on strategy. • Solve using linear programming. • A feasible sol’n is a winning strategy. • No feasible sol’n: no winning strategy. • Interval constraints: • σ((1, 2), A) + σ((1, 2), B) ≤ 2 • σ((1, 2, 3), A) + σ((1, 2, 3), B) ≤ 2 • ((1, 2, 4), A) + σ((1, 2, 4), B) ≤ 2 • Task constraints: • σ((1, 2), A)+ σ((1, 2, 3), A) ≥ 3 • σ((1, 2), B)+ σ((1, 2, 4), B) ≥ 3

  10. Discrete-time conditional scheduling • What if the scheduler can make decisions only at a restricted set of points? Switching triggered by, e.g., a timer interrupt. • For simplicity suppose this set is the integers. • Theorem. Deciding whether a discrete-time problem has a winning strategy is NP-hard. • Under a reasonable definition of lateness, there is no 2-approximation algorithm unless P=NP.

  11. Tree scheduling vs. DAG scheduling • Our linear programming algorithm is polynomial-time only if (Vertices, Edges) is a tree. • What if the graph is a directed acyclic graph (DAG)? • Theorem. Determining whether a DAG problem has a winning strategy is coNP-hard. • I believe this problem is inapproximable also…

  12. Conclusion • Introduced a novel model, conditional scheduling with varying deadlines. • Developed polynomial-time schedule synthesis algorithm for tree-shaped problems. • Discussed computational hardness of discrete-time and DAG problems.

  13. References • [Baruah 1998a]S.K. Baruah. “Feasibility analysis of recurring branching tasks.” EUROMICRO 1998. • [Baruah1998b]S.K. Baruah. “A general model for recurring real-time tasks.” RTSS 1998. • [Chakraborty, Erlebach, and Thiele 2001]S. Chakraborty, T. Erlebach, L. Thiele. “On the complexity of scheduling conditional real-time code.” WADS 2001.

More Related