Conditional scheduling with varying deadlines Ben Horowitz

Slides:



Advertisements
Similar presentations
On the Complexity of Scheduling
Advertisements

Graphs and Finding your way in the wilderness
JAYASRI JETTI CHINMAYA KRISHNA SURYADEVARA
GRAPH BALANCING. Scheduling on Unrelated Machines J1 J2 J3 J4 J5 M1 M2 M3.
1 NP-completeness Lecture 2: Jan P The class of problems that can be solved in polynomial time. e.g. gcd, shortest path, prime, etc. There are many.
The class NP Section 7.3 Giorgi Japaridze Theory of Computability.
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Approximation Algorithms Chapter 5: k-center. Overview n Main issue: Parametric pruning –Technique for approximation algorithms n 2-approx. algorithm.
Parallel Scheduling of Complex DAGs under Uncertainty Grzegorz Malewicz.
CS774. Markov Random Field : Theory and Application Lecture 17 Kyomin Jung KAIST Nov
Precedence Constrained Scheduling Abhiram Ranade Dept. of CSE IIT Bombay.
Complexity 16-1 Complexity Andrei Bulatov Non-Approximability.
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
1 L is in NP means: There is a language L’ in P and a polynomial p so that L 1 · L 2 means: For some polynomial time computable map r : 8 x: x 2 L 1 iff.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
Computational problems, algorithms, runtime, hardness
1 Pseudo-polynomial time algorithm (The concept and the terminology are important) Partition Problem: Input: Finite set A=(a 1, a 2, …, a n } and a size.
Linear Programming and Approximation
1 Single Machine Deterministic Models Jobs: J 1, J 2,..., J n Assumptions: The machine is always available throughout the scheduling period. The machine.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
Scheduling Using Timed Automata Borzoo Bonakdarpour Wednesday, April 13, 2005 Selected Topics in Algorithms and Complexity (CSE960)
Analysis of Algorithms CS 477/677
NP-Completeness NP-Completeness Graphs 4/17/2017 4:10 AM x x x x x x x
Backtracking Reading Material: Chapter 13, Sections 1, 2, 4, and 5.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 22 Instructor: Paul Beame.
NP-complete and NP-hard problems. Decision problems vs. optimization problems The problems we are trying to solve are basically of two kinds. In decision.
Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.
Hardness Results for Problems
Embedded System Design Framework for Minimizing Code Size and Guaranteeing Real-Time Requirements Insik Shin, Insup Lee, & Sang Lyul Min CIS, Penn, USACSE,
Embedded System Design Framework for Minimizing Code Size and Guaranteeing Real-Time Requirements Insik Shin, Insup Lee, & Sang Lyul Min CIS, Penn, USACSE,
Computational Complexity Polynomial time O(n k ) input size n, k constant Tractable problems solvable in polynomial time(Opposite Intractable) Ex: sorting,
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Introduction to Job Shop Scheduling Problem Qianjun Xu Oct. 30, 2001.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
TECH Computer Science NP-Complete Problems Problems  Abstract Problems  Decision Problem, Optimal value, Optimal solution  Encodings  //Data Structure.
CSC 413/513: Intro to Algorithms NP Completeness.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
V Spanning Trees Spanning Trees v Minimum Spanning Trees Minimum Spanning Trees v Kruskal’s Algorithm v Example Example v Planar Graphs Planar Graphs v.
© 2004 Goodrich, Tamasia Recall: Digraphs A digraph is a graph whose edges are all directed Short for “directed graph” Applications one-way streets flights.
1 Chapter 34: NP-Completeness. 2 About this Tutorial What is NP ? How to check if a problem is in NP ? Cook-Levin Theorem Showing one of the most difficult.
Computer Science & Engineering, ASU1/17 Pfair Scheduling of Periodic Tasks with Allocation Constraints on Multiple Processors Deming Liu and Yann-Hang.
1 How to establish NP-hardness Lemma: If L 1 is NP-hard and L 1 ≤ L 2 then L 2 is NP-hard.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
Network Flows. Menger ’ s Theorem Theorem 7.1. (Menger [1927] ) Let G be a graph (directed or undirected), let s and t be two vertices, and k  N. Then.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
CPS Computational problems, algorithms, runtime, hardness (a ridiculously brief introduction to theoretical computer science) Vincent Conitzer.
Introduction to Real-Time Systems
NP-completeness NP-complete problems. Homework Vertex Cover Instance. A graph G and an integer k. Question. Is there a vertex cover of cardinality k?
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
Algorithms for hard problems Introduction Juris Viksna, 2015.
ICS 353: Design and Analysis of Algorithms Backtracking King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Lecture. Today Problem set 9 out (due next Thursday) Topics: –Complexity Theory –Optimization versus Decision Problems –P and NP –Efficient Verification.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
1 P and NP. 2 Introduction The Traveling Salesperson problem and thousands of other problems are equally hard in the sense that if we had an efficient.
1 SAT SAT: Given a Boolean function in CNF representation, is there a way to assign truth values to the variables so that the function evaluates to true?
Scheduling with Constraint Programming
P & NP.
Computational Complexity Theory
Some Topics in OR.
Abstract Major Cloud computing companies have started to integrate frameworks for parallel data processing in their product portfolio, making it easy for.
Lecture 22 Complexity and Reductions
Computability and Complexity
Richard Anderson Autumn 2016 Lecture 7
CPS 173 Computational problems, algorithms, runtime, hardness
Richard Anderson Winter 2019 Lecture 7
Richard Anderson Lecture 5 Graph Theory
Presentation transcript:

Conditional scheduling with varying deadlines Ben Horowitz

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! 2 ms r: A, B d: A d: B A B A B A, B “released” here A “due” here B “due” here

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.

Varying deadlines in Giotto task 1 task 2 mode 1 mode 2 mode 3 mode 1 sensor input portoutput port actuator

Conditional scheduling problem Finite state machine: Set Vertices of vertices. Set Edges of edges. For each edge e a number duration(e). Initial vertex v 0.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.

Game: scheduler vs. environment v0v0 v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 Let Runs = set of paths of length ≥ 2. Strategy is a function: σ: Runs × Tasks   ∑ t  Tasks σ((…,v i,v i+1 ), t ) ≤ duration(v i, v i+1 )

r: t When is a strategy winning? Consider arbitrary run, position v i. Consider arbitrary task t in release(v i ). Find first subsequent v j at which t is due. Let n = # of times t is released at/after v i, before v j. Strategy must allocate n × time(t) between v i and v j. v0v0 v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 d: t +Is≥ time(t) ?

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.

Algorithm for strategy synthesis 1) Construct linear constraints on strategy. 2) Solve using linear programming. A feasible sol’n is a winning strategy. No feasible sol’n: no winning strategy ms r: A, B d: A d: B 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

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.

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…

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.

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