An Average-Case Analysis for Rate-Monotonic Multiprocessor Real-time Scheduling Andreas Karrenbauer & Thomas Rothvoß Institute of Mathematics EPFL, Lausanne ESA 2009 Real-time Scheduling Given: synchronous tasks τ1 , . . . , τn where task τi ◮ is periodic with period p(τi ) ◮ has running time c(τi ) ◮ has implicit deadline W.l.o.g.: Task τi releases job of length c(τi ) at 0, p(τi ), 2p(τi ), . . . Scheduling policy: ◮ multiprocessor ◮ fixed priority ◮ pre-emptive Example c(τ1 ) = 1 p(τ1 ) = 2 b 0 1 2 3 4 5 6 7 8 9 10 c(τ2 ) = 2 p(τ2 ) = 5 b b time Example Theorem (Liu & Layland ’73) Optimal priorities: 1 p(τi ) for τi (Rate-monotonic Schedule) c(τ1 ) = 1 p(τ1 ) = 2 b 0 1 2 3 4 5 6 7 8 9 10 c(τ2 ) = 2 p(τ2 ) = 5 b b time Example Theorem (Liu & Layland ’73) Optimal priorities: 1 p(τi ) for τi (Rate-monotonic Schedule) c(τ1 ) = 1 p(τ1 ) = 2 b 0 1 2 3 4 5 6 7 8 9 10 c(τ2 ) = 2 p(τ2 ) = 5 b b time Example Theorem (Liu & Layland ’73) Optimal priorities: 1 p(τi ) for τi (Rate-monotonic Schedule) c(τ1 ) = 1 p(τ1 ) = 2 b 0 1 2 3 4 5 6 7 8 9 10 c(τ2 ) = 2 p(τ2 ) = 5 b b time Example Theorem (Liu & Layland ’73) Optimal priorities: 1 p(τi ) for τi (Rate-monotonic Schedule) c(τ1 ) = 1 p(τ1 ) = 2 b 0 1 2 3 4 5 6 7 8 9 10 c(τ2 ) = 2 p(τ2 ) = 5 Definition u(τ ) = c(τ ) p(τ ) = utilization of task τ b b time Feasibility test Theorem (Lehoczky et al. ’89) If p(τ1 ) ≤ . . . ≤ p(τn ) then the response time r(τi ) in a RM-schedule is the smallestvalue s.t. X r(τi ) c(τi ) + c(τj ) ≤ r(τi ) p(τj ) j<i 1 machine suffices ⇔ ∀i : r(τi ) ≤ p(τi ). Feasibility test Theorem (Lehoczky et al. ’89) If p(τ1 ) ≤ . . . ≤ p(τn ) then the response time r(τi ) in a RM-schedule is the smallestvalue s.t. X r(τi ) c(τi ) + c(τj ) ≤ r(τi ) p(τj ) j<i 1 machine suffices ⇔ ∀i : r(τi ) ≤ p(τi ). Theorem (Eisenbrand & R. ’08) Computing a response time r(τi ) is NP-hard. Feasibility test Theorem (Lehoczky et al. ’89) If p(τ1 ) ≤ . . . ≤ p(τn ) then the response time r(τi ) in a RM-schedule is the smallestvalue s.t. X r(τi ) c(τi ) + c(τj ) ≤ r(τi ) p(τj ) j<i 1 machine suffices ⇔ ∀i : r(τi ) ≤ p(τi ). Theorem (Eisenbrand & R. ’08) Computing a response time r(τi ) is NP-hard. Theorem (Liu & Layland ’73) u(S) = P τ ∈S u(τ ) ≤ ln(2) ≈ 69% ⇒ 1 machine suffices Feasibility test Theorem (Lehoczky et al. ’89) If p(τ1 ) ≤ . . . ≤ p(τn ) then the response time r(τi ) in a RM-schedule is the smallestvalue s.t. X r(τi ) c(τi ) + c(τj ) ≤ r(τi ) p(τj ) j<i 1 machine suffices ⇔ ∀i : r(τi ) ≤ p(τi ). Theorem (Eisenbrand & R. ’08) Computing a response time r(τi ) is NP-hard. Theorem (Liu & Layland ’73) u(S) = P τ ∈S u(τ ) ≤ ln(2) ≈ 69% ⇒ 1 machine suffices Observation If p(τ1 ) | p(τ2 ) | . . . | p(τn ): 1 machine suffices ⇔ u(S) ≤ 1 Feasibility test (2) Lemma (Burchard et al. ’95) For tasks S = {τ1 , . . . , τn } define Feasibility test (2) Lemma (Burchard et al. ’95) For tasks S = {τ1 , . . . , τn } define α(τi ) := log2 p(τi ) − ⌊log2 p(τi )⌋ Feasibility test (2) Lemma (Burchard et al. ’95) For tasks S = {τ1 , . . . , τn } define α(τi ) := log2 p(τi ) − ⌊log2 p(τi )⌋ 1 2 4 8 periods Feasibility test (2) Lemma (Burchard et al. ’95) For tasks S = {τ1 , . . . , τn } define α(τi ) := log2 p(τi ) − ⌊log2 p(τi )⌋ 1 p(τ1 ) 2 p(τ2 ) 4 p(τ3 ) 8 periods Feasibility test (2) Lemma (Burchard et al. ’95) For tasks S = {τ1 , . . . , τn } define α(τi ) := log2 p(τi ) − ⌊log2 p(τi )⌋ 1 p(τ1 ) 0 2 p(τ2 ) 4 p(τ3 ) 1 8 periods Feasibility test (2) Lemma (Burchard et al. ’95) For tasks S = {τ1 , . . . , τn } define α(τi ) := log2 p(τi ) − ⌊log2 p(τi )⌋ 1 p(τ1 ) 2 p(τ2 ) 4 p(τ3 ) α(τ1 ) 0 1 8 periods Feasibility test (2) Lemma (Burchard et al. ’95) For tasks S = {τ1 , . . . , τn } define α(τi ) := log2 p(τi ) − ⌊log2 p(τi )⌋ 1 p(τ1 ) 2 p(τ2 ) 4 p(τ3 ) α(τ2 ) α(τ1 ) 0 1 8 periods Feasibility test (2) Lemma (Burchard et al. ’95) For tasks S = {τ1 , . . . , τn } define α(τi ) := log2 p(τi ) − ⌊log2 p(τi )⌋ 1 p(τ1 ) 2 p(τ2 ) 4 p(τ3 ) α(τ2 ) α(τ1 ) α(τ3 ) 0 1 8 periods Feasibility test (2) Lemma (Burchard et al. ’95) For tasks S = {τ1 , . . . , τn } define α(τi ) := log2 p(τi ) − ⌊log2 p(τi )⌋ and β(S) := max |α(τi ) − α(τj )| i,j 1 p(τ1 ) 2 p(τ2 ) 4 p(τ3 ) α(τ2 ) α(τ1 ) α(τ3 ) 0 β 1 8 periods Feasibility test (2) Lemma (Burchard et al. ’95) For tasks S = {τ1 , . . . , τn } define α(τi ) := log2 p(τi ) − ⌊log2 p(τi )⌋ and β(S) := max |α(τi ) − α(τj )| i,j One machine suffices if u(S) ≤ 1 − β(S). 1 p(τ1 ) 2 p(τ2 ) 4 p(τ3 ) α(τ2 ) α(τ1 ) α(τ3 ) 0 β 1 8 periods Algorithms for Multiprocessor Scheduling Algorithms for Multiprocessor Scheduling Known results: ◮ NP-hard (generalization of Bin Packing) Algorithms for Multiprocessor Scheduling Known results: ◮ ◮ NP-hard (generalization of Bin Packing) asymp. 1.75-apx [Burchard et al. ’95] Algorithms for Multiprocessor Scheduling Known results: ◮ ◮ ◮ NP-hard (generalization of Bin Packing) asymp. 1.75-apx [Burchard et al. ’95] asymp. (1 + ε)-apx (with resource augmentation) in O(1) [Eisenbrand & R. ’08] Oε (1) · n(1/ε) Algorithms for Multiprocessor Scheduling Known results: ◮ ◮ ◮ NP-hard (generalization of Bin Packing) asymp. 1.75-apx [Burchard et al. ’95] asymp. (1 + ε)-apx (with resource augmentation) in O(1) [Eisenbrand & R. ’08] Oε (1) · n(1/ε) Some papers: 1. Sort tasks w.r.t. some criteria (e.g. p(τi ), u(τi ), α(τi )) Algorithms for Multiprocessor Scheduling Known results: ◮ ◮ ◮ NP-hard (generalization of Bin Packing) asymp. 1.75-apx [Burchard et al. ’95] asymp. (1 + ε)-apx (with resource augmentation) in O(1) [Eisenbrand & R. ’08] Oε (1) · n(1/ε) Some papers: 1. Sort tasks w.r.t. some criteria (e.g. p(τi ), u(τi ), α(τi )) 2. Distribute tasks in a First Fit/Next Fit way using a sufficient feasibility criterion Algorithms for Multiprocessor Scheduling Known results: ◮ ◮ ◮ NP-hard (generalization of Bin Packing) asymp. 1.75-apx [Burchard et al. ’95] asymp. (1 + ε)-apx (with resource augmentation) in O(1) [Eisenbrand & R. ’08] Oε (1) · n(1/ε) Some papers: 1. Sort tasks w.r.t. some criteria (e.g. p(τi ), u(τi ), α(τi )) 2. Distribute tasks in a First Fit/Next Fit way using a sufficient feasibility criterion 3. Perform experiments with randomly chosen tasks Algorithms for Multiprocessor Scheduling Known results: ◮ ◮ ◮ NP-hard (generalization of Bin Packing) asymp. 1.75-apx [Burchard et al. ’95] asymp. (1 + ε)-apx (with resource augmentation) in O(1) [Eisenbrand & R. ’08] Oε (1) · n(1/ε) Some papers: 1. Sort tasks w.r.t. some criteria (e.g. p(τi ), u(τi ), α(τi )) 2. Distribute tasks in a First Fit/Next Fit way using a sufficient feasibility criterion 3. Perform experiments with randomly chosen tasks Definition Probability distribution: ◮ Adversary gives p(τi ) ◮ u(τi ) ∈ [0, 1] uniformly at random Waste Definition Waste of a solution: #machines − u(S). Waste Definition Waste of a solution: #machines − u(S). 1 0 M1 M2 M3 Waste Definition Waste of a solution: #machines − u(S). 1 τ 0 M1 M2 M3 Waste Definition Waste of a solution: #machines − u(S). 1 u(τ ) τ 0 M1 M2 M3 Waste Definition Waste of a solution: #machines − u(S). waste 1 u(τ ) τ 0 M1 M2 M3 Our algorithm First Fit Matching Periods (FFMP): 1. Sort: 0 ≤ α(τ1 ) ≤ α(τ2 ) ≤ . . . ≤ α(τn ) < 1 2. First Fit: FOR i = 1, . . . , n DO ◮ Assign τi to first machine P with u(P + τi ) ≤ 1 − β(P + τi ) Our algorithm First Fit Matching Periods (FFMP): 1. Sort: 0 ≤ α(τ1 ) ≤ α(τ2 ) ≤ . . . ≤ α(τn ) < 1 2. First Fit: FOR i = 1, . . . , n DO ◮ Assign τi to first machine P with u(P + τi ) ≤ 1 − β(P + τi ) M1 M2 M3 u(τ ) input α≈1 α≈0 Our algorithm First Fit Matching Periods (FFMP): 1. Sort: 0 ≤ α(τ1 ) ≤ α(τ2 ) ≤ . . . ≤ α(τn ) < 1 2. First Fit: FOR i = 1, . . . , n DO ◮ Assign τi to first machine P with u(P + τi ) ≤ 1 − β(P + τi ) M1 M2 M3 u(τ ) input Our algorithm First Fit Matching Periods (FFMP): 1. Sort: 0 ≤ α(τ1 ) ≤ α(τ2 ) ≤ . . . ≤ α(τn ) < 1 2. First Fit: FOR i = 1, . . . , n DO ◮ Assign τi to first machine P with u(P + τi ) ≤ 1 − β(P + τi ) M1 M2 M3 u(τ ) input Our algorithm First Fit Matching Periods (FFMP): 1. Sort: 0 ≤ α(τ1 ) ≤ α(τ2 ) ≤ . . . ≤ α(τn ) < 1 2. First Fit: FOR i = 1, . . . , n DO ◮ Assign τi to first machine P with u(P + τi ) ≤ 1 − β(P + τi ) M1 M2 M3 u(τ ) input Our algorithm First Fit Matching Periods (FFMP): 1. Sort: 0 ≤ α(τ1 ) ≤ α(τ2 ) ≤ . . . ≤ α(τn ) < 1 2. First Fit: FOR i = 1, . . . , n DO ◮ Assign τi to first machine P with u(P + τi ) ≤ 1 − β(P + τi ) M1 M2 M3 u(τ ) input Our algorithm First Fit Matching Periods (FFMP): 1. Sort: 0 ≤ α(τ1 ) ≤ α(τ2 ) ≤ . . . ≤ α(τn ) < 1 2. First Fit: FOR i = 1, . . . , n DO ◮ Assign τi to first machine P with u(P + τi ) ≤ 1 − β(P + τi ) M1 M2 M3 u(τ ) input Our algorithm First Fit Matching Periods (FFMP): 1. Sort: 0 ≤ α(τ1 ) ≤ α(τ2 ) ≤ . . . ≤ α(τn ) < 1 2. First Fit: FOR i = 1, . . . , n DO ◮ Assign τi to first machine P with u(P + τi ) ≤ 1 − β(P + τi ) M1 M2 M3 u(τ ) input Our algorithm First Fit Matching Periods (FFMP): 1. Sort: 0 ≤ α(τ1 ) ≤ α(τ2 ) ≤ . . . ≤ α(τn ) < 1 2. First Fit: FOR i = 1, . . . , n DO ◮ Assign τi to first machine P with u(P + τi ) ≤ 1 − β(P + τi ) M1 M2 M3 u(τ ) input Our algorithm First Fit Matching Periods (FFMP): 1. Sort: 0 ≤ α(τ1 ) ≤ α(τ2 ) ≤ . . . ≤ α(τn ) < 1 2. First Fit: FOR i = 1, . . . , n DO ◮ Assign τi to first machine P with u(P + τi ) ≤ 1 − β(P + τi ) Running time: O(n log n) Theorem For n tasks with u(τi ) ∈ [0, 1] uniformly at random E[waste of FFMP] ≤ O(n3/4 (log n)3/8 ) (average utilization → 100%) Bin Packing Given: n items with sizes ai ∈ [0, 1] Find: Assignment to minimum number of bins of size ≤ 1 Bin Packing Given: n items with sizes ai ∈ [0, 1] Find: Assignment to minimum number of bins of size ≤ 1 (Restricted) First Fit: ◮ FOR i = 1, . . . , n DO: Assign i to first bin B with ◮ ◮ B is empty or B contains exactly 1 item of size ≥ 1/2 and size(B) + ai ≤ 1 Bin Packing Given: n items with sizes ai ∈ [0, 1] Find: Assignment to minimum number of bins of size ≤ 1 (Restricted) First Fit: ◮ FOR i = 1, . . . , n DO: Assign i to first bin B with ◮ ◮ B is empty or B contains exactly 1 item of size ≥ 1/2 and size(B) + ai ≤ 1 1 0.5 0 bin 1 bin 2 bin 3 ai input Bin Packing Given: n items with sizes ai ∈ [0, 1] Find: Assignment to minimum number of bins of size ≤ 1 (Restricted) First Fit: ◮ FOR i = 1, . . . , n DO: Assign i to first bin B with ◮ ◮ B is empty or B contains exactly 1 item of size ≥ 1/2 and size(B) + ai ≤ 1 1 0.5 0 bin 1 bin 2 bin 3 ai input Bin Packing Given: n items with sizes ai ∈ [0, 1] Find: Assignment to minimum number of bins of size ≤ 1 (Restricted) First Fit: ◮ FOR i = 1, . . . , n DO: Assign i to first bin B with ◮ ◮ B is empty or B contains exactly 1 item of size ≥ 1/2 and size(B) + ai ≤ 1 1 0.5 0 bin 1 bin 2 bin 3 ai input Bin Packing Given: n items with sizes ai ∈ [0, 1] Find: Assignment to minimum number of bins of size ≤ 1 (Restricted) First Fit: ◮ FOR i = 1, . . . , n DO: Assign i to first bin B with ◮ ◮ B is empty or B contains exactly 1 item of size ≥ 1/2 and size(B) + ai ≤ 1 1 0.5 0 bin 1 bin 2 bin 3 ai input Bin Packing Given: n items with sizes ai ∈ [0, 1] Find: Assignment to minimum number of bins of size ≤ 1 (Restricted) First Fit: ◮ FOR i = 1, . . . , n DO: Assign i to first bin B with ◮ ◮ B is empty or B contains exactly 1 item of size ≥ 1/2 and size(B) + ai ≤ 1 1 0.5 0 bin 1 bin 2 bin 3 ai input Bin Packing Given: n items with sizes ai ∈ [0, 1] Find: Assignment to minimum number of bins of size ≤ 1 (Restricted) First Fit: ◮ FOR i = 1, . . . , n DO: Assign i to first bin B with ◮ ◮ B is empty or B contains exactly 1 item of size ≥ 1/2 and size(B) + ai ≤ 1 Theorem (Shor ’84) Given n items with ai ∈ [0, 1] uniformly at random p E[waste of First Fit] ≤ O(n2/3 log n). Bin Packing Given: n items with sizes ai ∈ [0, 1] Find: Assignment to minimum number of bins of size ≤ 1 (Restricted) First Fit: ◮ FOR i = 1, . . . , n DO: Assign i to first bin B with ◮ ◮ B is empty or B contains exactly 1 item of size ≥ 1/2 and size(B) + ai ≤ 1 Theorem (Shor ’84) Given n items with ai ∈ [0, 1] uniformly at random p E[waste of First Fit] ≤ O(n2/3 log n). Theorem (Shor ’84) First Fit is monotone. An auxiliary algorithm: FFMP* 1. Sort: 0 ≤ α(τ1 ) ≤ α(τ2 ) ≤ . . . ≤ α(τn ) < 1 2. Partition: Sj = {τi | j−1 γ ≤ α(τi ) < γj } → groups 3. First Fit: FOR i = 1, . . . , n DO ◮ Assign τi to first machine P that’s empty or ◮ ◮ ◮ P contains exactly one task τj and τj is from the same group & u(τj ) ≥ 21 (1 − γ1 ) and u(P + τi ) ≤ 1 − γ1 An auxiliary algorithm: FFMP* 1. Sort: 0 ≤ α(τ1 ) ≤ α(τ2 ) ≤ . . . ≤ α(τn ) < 1 2. Partition: Sj = {τi | j−1 γ ≤ α(τi ) < γj } → groups 3. First Fit: FOR i = 1, . . . , n DO ◮ Assign τi to first machine P that’s empty or ◮ ◮ ◮ P contains exactly one task τj and τj is from the same group & u(τj ) ≥ 21 (1 − γ1 ) and u(P + τi ) ≤ 1 − γ1 1− 1 2 (1 1 γ − γ1 ) 0 M1 M2 M3 M4 M5 u(τ ) input An auxiliary algorithm: FFMP* 1. Sort: 0 ≤ α(τ1 ) ≤ α(τ2 ) ≤ . . . ≤ α(τn ) < 1 2. Partition: Sj = {τi | j−1 γ ≤ α(τi ) < γj } → groups 3. First Fit: FOR i = 1, . . . , n DO ◮ Assign τi to first machine P that’s empty or ◮ ◮ ◮ P contains exactly one task τj and τj is from the same group & u(τj ) ≥ 21 (1 − γ1 ) and u(P + τi ) ≤ 1 − γ1 1− 1 2 (1 1 γ − γ1 ) 0 M1 M2 M3 M4 M5 u(τ ) input An auxiliary algorithm: FFMP* 1. Sort: 0 ≤ α(τ1 ) ≤ α(τ2 ) ≤ . . . ≤ α(τn ) < 1 2. Partition: Sj = {τi | j−1 γ ≤ α(τi ) < γj } → groups 3. First Fit: FOR i = 1, . . . , n DO ◮ Assign τi to first machine P that’s empty or ◮ ◮ ◮ P contains exactly one task τj and τj is from the same group & u(τj ) ≥ 21 (1 − γ1 ) and u(P + τi ) ≤ 1 − γ1 1− 1 2 (1 1 γ − γ1 ) 0 M1 u(τ ) M2 S1 M3 M4 M5 S2 input An auxiliary algorithm: FFMP* 1. Sort: 0 ≤ α(τ1 ) ≤ α(τ2 ) ≤ . . . ≤ α(τn ) < 1 2. Partition: Sj = {τi | j−1 γ ≤ α(τi ) < γj } → groups 3. First Fit: FOR i = 1, . . . , n DO ◮ Assign τi to first machine P that’s empty or ◮ ◮ ◮ P contains exactly one task τj and τj is from the same group & u(τj ) ≥ 21 (1 − γ1 ) and u(P + τi ) ≤ 1 − γ1 1− 1 2 (1 1 γ − γ1 ) 0 M1 u(τ ) M2 S1 M3 M4 M5 S2 input An auxiliary algorithm: FFMP* 1. Sort: 0 ≤ α(τ1 ) ≤ α(τ2 ) ≤ . . . ≤ α(τn ) < 1 2. Partition: Sj = {τi | j−1 γ ≤ α(τi ) < γj } → groups 3. First Fit: FOR i = 1, . . . , n DO ◮ Assign τi to first machine P that’s empty or ◮ ◮ ◮ P contains exactly one task τj and τj is from the same group & u(τj ) ≥ 21 (1 − γ1 ) and u(P + τi ) ≤ 1 − γ1 1− 1 2 (1 1 γ − γ1 ) 0 M1 u(τ ) M2 S1 M3 M4 M5 S2 input An auxiliary algorithm: FFMP* 1. Sort: 0 ≤ α(τ1 ) ≤ α(τ2 ) ≤ . . . ≤ α(τn ) < 1 2. Partition: Sj = {τi | j−1 γ ≤ α(τi ) < γj } → groups 3. First Fit: FOR i = 1, . . . , n DO ◮ Assign τi to first machine P that’s empty or ◮ ◮ ◮ P contains exactly one task τj and τj is from the same group & u(τj ) ≥ 21 (1 − γ1 ) and u(P + τi ) ≤ 1 − γ1 1− 1 2 (1 1 γ − γ1 ) 0 M1 u(τ ) M2 S1 M3 M4 M5 S2 input An auxiliary algorithm: FFMP* 1. Sort: 0 ≤ α(τ1 ) ≤ α(τ2 ) ≤ . . . ≤ α(τn ) < 1 2. Partition: Sj = {τi | j−1 γ ≤ α(τi ) < γj } → groups 3. First Fit: FOR i = 1, . . . , n DO ◮ Assign τi to first machine P that’s empty or ◮ ◮ ◮ P contains exactly one task τj and τj is from the same group & u(τj ) ≥ 21 (1 − γ1 ) and u(P + τi ) ≤ 1 − γ1 1− 1 2 (1 1 γ − γ1 ) 0 M1 u(τ ) M2 S1 M3 M4 M5 S2 input An auxiliary algorithm: FFMP* 1. Sort: 0 ≤ α(τ1 ) ≤ α(τ2 ) ≤ . . . ≤ α(τn ) < 1 2. Partition: Sj = {τi | j−1 γ ≤ α(τi ) < γj } → groups 3. First Fit: FOR i = 1, . . . , n DO ◮ Assign τi to first machine P that’s empty or ◮ ◮ ◮ P contains exactly one task τj and τj is from the same group & u(τj ) ≥ 21 (1 − γ1 ) and u(P + τi ) ≤ 1 − γ1 1− 1 2 (1 1 γ − γ1 ) 0 M1 u(τ ) M2 S1 M3 M4 M5 S2 input An auxiliary algorithm: FFMP* 1. Sort: 0 ≤ α(τ1 ) ≤ α(τ2 ) ≤ . . . ≤ α(τn ) < 1 2. Partition: Sj = {τi | j−1 γ ≤ α(τi ) < γj } → groups 3. First Fit: FOR i = 1, . . . , n DO ◮ Assign τi to first machine P that’s empty or ◮ ◮ ◮ P contains exactly one task τj and τj is from the same group & u(τj ) ≥ 21 (1 − γ1 ) and u(P + τi ) ≤ 1 − γ1 1− 1 2 (1 1 γ − γ1 ) 0 M1 u(τ ) M2 S1 M3 M4 M5 S2 input FFMP* vs. First Fit τi from the same group & u(τi ) ≤ 1 − γ1 1− 1 2 (1 items ai := u(τi )/(1 − γ1 ) 1 1 γ 1 2 − γ1 ) 0 0 M1 M2 M3 bin 1 bin 2 bin 3 FFMP* vs. First Fit τi from the same group & u(τi ) ≤ 1 − γ1 1− 1 2 (1 items ai := u(τi )/(1 − γ1 ) 1 1 γ 1 2 − γ1 ) 0 0 M1 ◮ M2 M3 FFMP∗ = First Fit bin 1 bin 2 bin 3 FFMP* vs. First Fit τi from the same group & u(τi ) ≤ 1 − γ1 1− 1 2 (1 items ai := u(τi )/(1 − γ1 ) 1 1 γ 1 2 − γ1 ) 0 0 M1 ◮ M2 M3 FFMP∗ = First Fit Corollary FFMP∗ is monotone. bin 1 bin 2 bin 3 Consequences Lemma For any task set S : FFMP(S) ≤ FFMP∗ (S) Consequences Lemma For any task set S : FFMP(S) ≤ FFMP∗ (S) ◮ Consider schedule of S w.r.t. FFMP. M1 M2 M3 M4 Consequences Lemma For any task set S : FFMP(S) ≤ FFMP∗ (S) ◮ ◮ Consider schedule of S w.r.t. FFMP. Delete tasks that FFMP∗ would have scheduled differently 1− 1 2 (1 1 γ − γ1 ) 0 M1 M2 M3 M4 Consequences Lemma For any task set S : FFMP(S) ≤ FFMP∗ (S) ◮ ◮ Consider schedule of S w.r.t. FFMP. Delete tasks that FFMP∗ would have scheduled differently 1− 1 2 (1 1 γ − γ1 ) 0 M1 M2 M3 M4 Consequences Lemma For any task set S : FFMP(S) ≤ FFMP∗ (S) ◮ ◮ Consider schedule of S w.r.t. FFMP. Delete tasks that FFMP∗ would have scheduled differently 1− 1 2 (1 1 γ − γ1 ) 0 M1 M2 M3 M4 Consequences Lemma For any task set S : FFMP(S) ≤ FFMP∗ (S) ◮ ◮ Consider schedule of S w.r.t. FFMP. Delete tasks that FFMP∗ would have scheduled differently 1− 1 2 (1 1 γ − γ1 ) 0 M1 M2 M3 M4 Consequences Lemma For any task set S : FFMP(S) ≤ FFMP∗ (S) ◮ ◮ Consider schedule of S w.r.t. FFMP. Delete tasks that FFMP∗ would have scheduled differently → S′ ⊆ S 1− 1 2 (1 1 γ − γ1 ) 0 M1 M2 M3 M4 Consequences Lemma For any task set S : FFMP(S) ≤ FFMP∗ (S) ◮ ◮ Consider schedule of S w.r.t. FFMP. Delete tasks that FFMP∗ would have scheduled differently → S′ ⊆ S FFMP(S) = FFMP∗ (S ′ ) 1− 1 2 (1 1 γ − γ1 ) 0 M1 M2 M3 M4 Consequences Lemma For any task set S : FFMP(S) ≤ FFMP∗ (S) ◮ ◮ Consider schedule of S w.r.t. FFMP. Delete tasks that FFMP∗ would have scheduled differently → S′ ⊆ S FFMP(S) = FFMP∗ (S ′ ) 1− 1 2 (1 monotonicity ≤ 1 γ − γ1 ) 0 M1 M2 M3 M4 FFMP∗ (S) Main result Theorem E[waste of FFMP∗ ] ≤ O(n3/4 (log n)3/8 ) Main result Theorem E[waste of FFMP∗ ] ≤ O(n3/4 (log n)3/8 ) ◮ √ f (m) := O(m2/3 log m) expected waste of First Fit Main result Theorem E[waste of FFMP∗ ] ≤ O(n3/4 (log n)3/8 ) ◮ ◮ √ f (m) := O(m2/3 log m) expected waste of First Fit Sj′ := {τi ∈ Sj | u(τi ) ≤ 1 − γ1 } not too big tasks Main result Theorem E[waste of FFMP∗ ] ≤ O(n3/4 (log n)3/8 ) ◮ ◮ ◮ √ f (m) := O(m2/3 log m) expected waste of First Fit Sj′ := {τi ∈ Sj | u(τi ) ≤ 1 − γ1 } not too big tasks Ij := {ai := u(τi )/(1 − γ1 ) | τi ∈ Sj′ } Main result Theorem E[waste of FFMP∗ ] ≤ O(n3/4 (log n)3/8 ) ◮ ◮ ◮ ◮ √ f (m) := O(m2/3 log m) expected waste of First Fit Sj′ := {τi ∈ Sj | u(τi ) ≤ 1 − γ1 } not too big tasks Ij := {ai := u(τi )/(1 − γ1 ) | τi ∈ Sj′ } ∀τi ∈ Sj′ : u(τi ) ∈ [0, 1 − γ1 ] uniform ⇒ ai ∈ [0, 1] uniform Main result Theorem E[waste of FFMP∗ ] ≤ O(n3/4 (log n)3/8 ) ◮ ◮ ◮ ◮ √ f (m) := O(m2/3 log m) expected waste of First Fit Sj′ := {τi ∈ Sj | u(τi ) ≤ 1 − γ1 } not too big tasks Ij := {ai := u(τi )/(1 − γ1 ) | τi ∈ Sj′ } ∀τi ∈ Sj′ : u(τi ) ∈ [0, 1 − γ1 ] uniform ⇒ ai ∈ [0, 1] uniform E[waste of FFMP∗ (Sj )] Main result Theorem E[waste of FFMP∗ ] ≤ O(n3/4 (log n)3/8 ) √ f (m) := O(m2/3 log m) expected waste of First Fit ◮ S ′ := {τi ∈ Sj | u(τi ) ≤ 1 − 1 } not too big tasks j γ ◮ Ij := {ai := u(τi )/(1 − 1 ) | τi ∈ S ′ } j γ ◮ ∀τi ∈ S ′ : u(τi ) ∈ [0, 1 − 1 ] uniform ⇒ ai ∈ [0, 1] uniform j γ 1 ∗ E[waste of FFMP (Sj )] ≤ |Sj | · + E[waste of FirstFit(Ij )] γ ◮ Main result Theorem E[waste of FFMP∗ ] ≤ O(n3/4 (log n)3/8 ) √ f (m) := O(m2/3 log m) expected waste of First Fit ◮ S ′ := {τi ∈ Sj | u(τi ) ≤ 1 − 1 } not too big tasks j γ ◮ Ij := {ai := u(τi )/(1 − 1 ) | τi ∈ S ′ } j γ ◮ ∀τi ∈ S ′ : u(τi ) ∈ [0, 1 − 1 ] uniform ⇒ ai ∈ [0, 1] uniform j γ 1 ∗ E[waste of FFMP (Sj )] ≤ |Sj | · + E[waste of FirstFit(Ij )] γ |Sj | + f (|Ij |) ≤ γ ◮ Main result Theorem E[waste of FFMP∗ ] ≤ O(n3/4 (log n)3/8 ) √ f (m) := O(m2/3 log m) expected waste of First Fit ◮ S ′ := {τi ∈ Sj | u(τi ) ≤ 1 − 1 } not too big tasks j γ ◮ Ij := {ai := u(τi )/(1 − 1 ) | τi ∈ S ′ } j γ ◮ ∀τi ∈ S ′ : u(τi ) ∈ [0, 1 − 1 ] uniform ⇒ ai ∈ [0, 1] uniform j γ 1 ∗ E[waste of FFMP (Sj )] ≤ |Sj | · + E[waste of FirstFit(Ij )] γ |Sj | |Sj | + f (|Ij |) ≤ + f (|Sj |) ≤ γ γ ◮ Main result Theorem E[waste of FFMP∗ ] ≤ O(n3/4 (log n)3/8 ) √ f (m) := O(m2/3 log m) expected waste of First Fit ◮ S ′ := {τi ∈ Sj | u(τi ) ≤ 1 − 1 } not too big tasks j γ ◮ Ij := {ai := u(τi )/(1 − 1 ) | τi ∈ S ′ } j γ ◮ ∀τi ∈ S ′ : u(τi ) ∈ [0, 1 − 1 ] uniform ⇒ ai ∈ [0, 1] uniform j γ 1 ∗ E[waste of FFMP (Sj )] ≤ |Sj | · + E[waste of FirstFit(Ij )] γ |Sj | |Sj | + f (|Ij |) ≤ + f (|Sj |) ≤ γ γ ◮ E[waste of FFMP∗ (S)] Main result Theorem E[waste of FFMP∗ ] ≤ O(n3/4 (log n)3/8 ) √ f (m) := O(m2/3 log m) expected waste of First Fit ◮ S ′ := {τi ∈ Sj | u(τi ) ≤ 1 − 1 } not too big tasks j γ ◮ Ij := {ai := u(τi )/(1 − 1 ) | τi ∈ S ′ } j γ ◮ ∀τi ∈ S ′ : u(τi ) ∈ [0, 1 − 1 ] uniform ⇒ ai ∈ [0, 1] uniform j γ 1 ∗ E[waste of FFMP (Sj )] ≤ |Sj | · + E[waste of FirstFit(Ij )] γ |Sj | |Sj | + f (|Ij |) ≤ + f (|Sj |) ≤ γ γ γ X |Sj | ∗ E[waste of FFMP (S)] ≤ + f (|Sj |) γ ◮ j=1 Main result Theorem E[waste of FFMP∗ ] ≤ O(n3/4 (log n)3/8 ) √ f (m) := O(m2/3 log m) expected waste of First Fit ◮ S ′ := {τi ∈ Sj | u(τi ) ≤ 1 − 1 } not too big tasks j γ ◮ Ij := {ai := u(τi )/(1 − 1 ) | τi ∈ S ′ } j γ ◮ ∀τi ∈ S ′ : u(τi ) ∈ [0, 1 − 1 ] uniform ⇒ ai ∈ [0, 1] uniform j γ 1 ∗ E[waste of FFMP (Sj )] ≤ |Sj | · + E[waste of FirstFit(Ij )] γ |Sj | |Sj | + f (|Ij |) ≤ + f (|Sj |) ≤ γ γ γ X |Sj | ∗ E[waste of FFMP (S)] ≤ + f (|Sj |) γ ◮ j=1 Jensen ≤ n + γ · f (n/γ) γ Main result Theorem E[waste of FFMP∗ ] ≤ O(n3/4 (log n)3/8 ) √ f (m) := O(m2/3 log m) expected waste of First Fit ◮ S ′ := {τi ∈ Sj | u(τi ) ≤ 1 − 1 } not too big tasks j γ ◮ Ij := {ai := u(τi )/(1 − 1 ) | τi ∈ S ′ } j γ ◮ ∀τi ∈ S ′ : u(τi ) ∈ [0, 1 − 1 ] uniform ⇒ ai ∈ [0, 1] uniform j γ 1 ∗ E[waste of FFMP (Sj )] ≤ |Sj | · + E[waste of FirstFit(Ij )] γ |Sj | |Sj | + f (|Ij |) ≤ + f (|Sj |) ≤ γ γ γ X |Sj | ∗ E[waste of FFMP (S)] ≤ + f (|Sj |) γ ◮ j=1 Jensen ≤ n + γ · f (n/γ) γ γ:=n1/4 /(log n)3/8 ≤ O(n3/4 (log n)3/8 ) Open problems ◮ Problem: Is there an asymptotic PTAS for Multiprocessor Real-time scheduling? Open problems ◮ Problem: Is there an asymptotic PTAS for Multiprocessor Real-time scheduling? Thanks for your attention