Download presentation
Presentation is loading. Please wait.
1
Non-clairvoyant Precedence Constrained Scheduling
July 9th, 2019 Sahil singla Princeton University and Institute for Advanced Study Joint work with naveen Garg, Anupam gupta, And Amit Kumar
2
What is Scheduling? 𝐦 identical machines: Each processes 1 unit per time 𝐧 jobs: (Release time r j , Processing time p j , Weight w j ) Goal: Execute jobs to minimize: Total completion time: j C j Total time in system (flow time): j ( C j − r j ) Time of last job (makespan): ma x j C j 𝒓 𝟏 time 𝒓 𝟐 Weighted versions: j w j C j & j w j ( C j − r j ) At any moment execute at most 1 job per machine at most 1 machine per job m machines n jobs Preemption & Migration allowed
3
Non-Clairvoyant Scheduling
What if (r j , p j , w j ) not known? (non-clairvoyant) Don’t know existence of job before r j Don’t know size p j until executed p j Compare to offline optimum solution Single machine do shortest job first, but in general NP hard Cannot achieve offline optimum E.g, two jobs on a single machine (Weighted) Round-robin gives O(1) approx p 1 =1 p 2 =2 Preemption & Migration allowed
4
Precedence Constraints
j Some jobs can only start after finishing another: i≺j Directed acyclic dependency-graph (DAG) Wtd. Completion time captures Makespan 1 job with weight >0 depending on all others Applications to parallel/distributed systems Multi-processing modeled as DAGs Non-homogenous jobs Big data systems Graham’66 Grandl et al.’16 Apache Tez and Apache Spark
5
can we do online with precedence?
What is Known with Precedence? Offline: Wtd Completion: Constant factor algorithms Hall-Schulz-Shmoys-Wein’97 Wtd Flow: Speedup necessary & constant factor with constant speedup Kulkarni-Li’18 Online/Non-clairvoyant: Not much is known Some works assume each DAG is a “hyper-job”: Greedy works Same release date Only one value for the entire “hyper-job” Agrawal-Li-Lu-Moseley’16 Robert-Schabanel’08 can we do online with precedence?
6
Main results Thm [GGKS'19]: For Wtd Completion Time and DAG Preced: 𝟏𝟎 approximation All jobs in a DAG released together Thm [GGKS'19]: For Wtd Flow Time and DAG with No-Surprise Preced: 𝐎(𝟏) approximation with a small “speedup” Remark: The assumptions are necessary and we give a scalable algorithm, i.e. O(1/ ϵ 2 ) approx even with (1+ϵ)-speedup.
7
OUTLINE Introduction: Precedence Constrained Scheduling
Our Algorithm: Independence Graph & Nash Social Welfare Primal-Dual Analysis Other Results and Open Problems
8
Weighted Round-Robin Algorithm
What if no-precedence? Run proportional to weights All job rates ≤1 and total rate ≤𝑚 What if only chains or trees? Cannot be uniform over all chains Weight according to subtree weight For inverted stars, who should get j’s weight? 𝑤 𝑗 =∞ Easy Chains Medium Trees j Who should j blame?
9
How to Distribute Speeds?
Use a dependency Graph i How to Distribute Speeds? Cannot arbitrarily distribute: Want some kind of “fair” algorithm For every t imagine a Dependency Graph G t Indep jobs I t and All jobs J t Edge (i,j) if i≺j or i=j Inverted star j Indep jobs 𝐈 𝐭 All jobs 𝐉 𝐭 i j Machines
10
Maximize Nash Social Welfare (NSW)
Want a “Fair” Solution NSW used previously by Munagala et al. (without precedence) Convex Program max j∈ J t w j ⋅log R j t L i t := j z ij t ∀i∈ I t R j t := i z ij t ∀j∈ J t L i t ≤ ∀i∈ I t i L i t ≤m 0≤z ij t ≤1 Machines i Real Rate i Virtual Rate j 𝐈 𝐭 𝐉 𝐭 Generalizes round-robin Similar to Eisenberg-Gale for Fisher markets Combinatorial Water-Filling algo
11
OUTLINE Introduction: Precedence Constrained Scheduling
Our Algorithm: Independence Graph & Nash Social Welfare Primal-Dual Analysis Other Results and Open Problems
12
Proof approach Assume our machines at twice speed
Thm: Weighted Compl time with DAG Preced has 𝟏𝟎 approx Assume our machines at twice speed Two lower bounds on OPT : Show ALG is comparable to I + II ALG ≤ j w j ⋅ chai n j +2⋅ r j +2⋅LP Chain Lower Bound C j ≥chai n j the length of max chain to j C j ≥ r j the release date LP Lower Bound Write an LP lower bounding OPT Any feasible solution to the dual j
13
Primal-Dual LP Thm: Weighted Compl time with DAG Preced has 𝟏𝟎 approx
x jt denotes processing j gets at t min j,t w j ⋅t⋅ x j,t p j t≥ r j x j,t p j ≥1 ∀j j x j,t ≤m ∀t s≤t x i,s p i ≥ s≤t x j,s p j ∀t, i≺j max j α j −m⋅ t β t α j , β t ≥ ∀j,t α j − w j ⋅t+ s≥t γ s,j out − γ s,j in ≤ p j ⋅ β t ∀j,t≥ r j Jobs finished Bounded Speed Precedence
14
Setting Duals and LP Feasibility
Use the CP solution to set LP duals Only active jobs count at t Feasibility: Waiting jobs: getting money from I t Running jobs: rate proportional to total weight Dual objective comparable: ALG ≤2⋅LP+ j w j ⋅(chai n j + 2⋅r j ) max j α j −m⋅ t β t α j , β t ≥ ∀j,t α j − w j ⋅t+ s≥t γ s,j out − γ s,j in ≤ p j ⋅ β t ∀j,t≥ r j Jobs that help Thm: Weighted Compl time with DAG Preced has 𝟏𝟎 approx
15
OUTLINE Introduction: Precedence Constrained Scheduling
Our Algorithm: Independence Graph & Nash Social Welfare Primal-Dual Analysis Other Results and Open Problems
16
Weighted Flow Time All jobs in a DAG released together Thm [GGKS'19]: For Wtd Flow Time and DAG with No-Surprise Preced: 𝐎(𝟏) approximation with a small “speedup” Remark: We give a scalable algorithm, i.e., 𝐎(𝟏) approx even with (1+𝜖)-speedup No surprise assump necessary (even with speedup & single machine) At t=0, release n indep jobs of size 1. At t=1, release n 3 new jobs of size 0 depending on a random j. Assumption allows to define a Total Order: Different DAGs w.r.t. r j and within DAG w.r.t. C j Slightly change the LP and CP objectives Set duals using CP solution
17
Conclusion Questions? Scheduling with Precedence
No “hyper-job” assump: 10 approx for Wtd Compl. Nash-Social Welfare Primal-Dual analysis: Set LP duals using the CP solution O 1/ ϵ 2 approx for Wtd Flow Time with (1+ϵ) speedup No-Surprise Assump Open Problems Improve approximation factors For related machines can we get O(k⋅ log n )? Questions?
18
Further SLIDES
19
Relationship to Fisher Markets
max j∈ J t w j ⋅log R j t L j t := j ′ z j j ′ t ∀j∈ I t R j t := j ′ z j j ′ t ∀j∈ J t L j t ≤ ∀j∈ I t j L j t ≤m z j j ′ t ≥0 Fisher Markets m divisible goods and n buyers Buyer j has budget B j and utility u ij for item i Find equilibrium item prices p i s.t. market clears Comparison to Eisenberg-Gale Convex Program Difficult: Additional constraint overall speed ≤m Simpler: Unit-weights, i.e, u ij =1 Combinatorial algorithms Complicated for Fisher-Markets Simple Water-Filling for our convex program max j∈Buyers B j ⋅log U j L i := j z ij ∀i∈Items U j := i u ij ⋅ z ij ∀j∈Buyers L i ≤ ∀i∈Items z ij ≥0
20
Primal-Dual LP Thm: Wtd Compl time with DAG Preced has 𝟏𝟎 approx.
min j,t w j ⋅t⋅ x j,t p j t≥ r j x j,t p j ≥1 ∀j j x j,t ≤m ∀t s≤t x j,s p j ≥ s≤t x j ′ ,s p j ′ ∀t, j≺j′ max j α j −m⋅ t β t α j , β t ≥ ∀j,t α j − w j ⋅t+ s≥t j≺j′ γ s,j→ j ′ − j′≺j γ s, j ′ →j ≤ p j ⋅ β t ∀j,t≥ r j Jobs finished Bounded Speed Precedence Alternately, max j α j −m⋅ t β t α j , β t ≥ ∀j,t α j − w j ⋅t+ s≥t γ s,j out − γ s,j in ≤ p j ⋅ β t ∀j,t≥ r j x jt is processing j gets at t
21
Dual Feasibility (Idea)
max j α j −m⋅ t β t α j , β t ≥ ∀j,t α j − w j ⋅t+ s≥t γ s,j out − γ s,j in ≤ p j ⋅ β t ∀j,t≥ r j Waiting Jobs J t ∖ I t Getting money from 𝐼 𝑡 Running Jobs I t Running rate proportional to how many jobs depend on it Careful but simple case analysis Thm [GGKS'19]: For Wtd Completion Time and DAG Preced: 𝟏𝟎 approximation
22
Related Machines Machines of k speed classes:
n i machines of speed s i Cannot do better than factor k: Minimize makespan: Suppose s 1 ≫ s 2 ≫…≫ s k Let n 1 s 1 ≪ n 2 s 2 ≪…≪ n k s k with n i jobs of size s i Cannot do better than factor log n loglog n =: 1 ϵ Objective: Makespan for 1/ϵ-ary tree of depth 1/ϵ Machines: One fast & many slow: s 1 =1= n 1 & s 2 =ϵ, n 2 =∞ Sizes: P is random root-leaf path. Jobs incident to P size 1, otherwise 0 OPT is 1 ϵ but any ALG is 1 ϵ 2 Can we get O(1) approx? 1
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.