Scalably Scheduling Processes with Arbitrary Speedup Curves (Better Scheduling in the Dark) Jeff Edmonds York University Kirk Pruhs University of Pittsburgh MAPSP 2009 The Scheduling Problem • Allocate p processors to a stream of n jobs: Shortest Remaining Processing Time (SRPT) Shortest Elapsed Time First (SETF) Sublinear Nondecreasing Speedup JFunctions = f J ;:::;J g • A set of jobs: • Each job has phases: • Each phase: – Work: – Speedup function: • Nondecreasing • Sublinear • Examples: 1 Ji = Jq = i Wq ¡ i q i n J 1 ; : : : ; J qi i i hW q ; ¡ q i i i ® The Scheduling Problem • Allocate p processors to a stream of n jobs: • Measure of Quality:P F (A(I )) = n (c i= 1 i • Competitive Ratio:F ( A ( I ) ) max I F ( O pt ( I ) ) ¡ ri ) = R t n t dt Sublinear Nondecreasing Speedup Functions Online Nonclairvoyant: Optimal: Not Competitive: Future All Knowing All Powerful ? Nonclairvoyant I nput Opt F ( SE T F ) F ( O pt ) SE T F = (n) I nput E qui Opt F ( E qu i ) F ( O pt ) F ( N on cl ai r voy an t ) F ( O pt ) = = ( n ln n ) p ( n) [MPT] Performance vs Load Average Performance F (A(I )) Load maxI F (Opt(I )) I F (A(I )) F ( O pt ( I ) ) = (n) Performance vs Load Average Performance F (A(I )) F (Opt(I )) s c Load maxI I F (A(I )) F ( O pt ( I ) ) = O(1) Performance vs Load Average Performance F (Opt(I )) F (A s (I )) c Load maxI I F (A s (I )) F ( O pt ( I ) ) = O(c) Resource Augmentation Nonclairvoyant: Future Extra Speed Optimal: Competitive: All Knowing All Powerful ? Resource Augmentation 1+ 2² I nput Opt F ( SE T F 1 + ² ) F ( O pt 1 ) SE T F = £ ( 1) ² I nput E qui 2+ ² Opt F ( E qu i 2 + ² ) F ( O pt 1 ) = £ ( 1) Required ² Fully Parallelizable Jobs [KP] [E] Sublinear Nondecreasing Speedup Functions Arrives over time Currently Alive Opt gives all its resources to the parallelizable job and hence Opt competes them as they arrive. The sequential jobs complete with no resources. Sublinear Nondecreasing Speedup Functions Arrives over time Currently Alive Shortest Elapsed Time First (SETF) gives all its resources to a sequential job, wasting it. The parallelizable jobs, getting no resources never complete. SE T F s F ( SE T F s ) F ( O pt 1 ) = (n) Sublinear Nondecreasing Speedup Functions Arrives over time Currently Alive ` ² jobs Equi spreads its resources fairly. Most are wasted on the sequential jobs. The parallelizable jobs don’t get enough and fall behind. ` jobs EQUI wastes є resources, has є extra. E qui 1+but ² F ( E qu i 1 + ² ) F ( O pt 1 ) = ` =² + ` ` = 1 ² Sublinear Nondecreasing Speedup Functions I nput E qui 2+ ² Opt F ( E qu i 2 + ² ) F ( O pt 1 ) = £ ( 1) Required ² [E] nt jobs currently alive sorted by arrival time. Latest Arrival Processor Sharing Opt SE T F 1 job But may be sequential. L AP S ¯n t E qui New result [EP] F ( L A P Sh¯ ; 1 + ¯ + F ( O pt 1 ) ² ;i ) nt jobs = £( Speed Compromise Too thin & needs 2+speed ² jobs 1 ¯² ) nt jobs currently alive sorted by arrival time. Latest Arrival Processor Sharing Opt SE T F 1 job L AP S ¯n t nt E qui F ( SE T F 1+ ² ) F ( O pt 1 ) New result [EP] = £( 1 0² ¯ ¼0 Compromise jobs ¯= 1 jobs ) F ( L A P Sh¯ ; 1 + ¯ + ² ; i ) = F ( O pt 1 ) F ( E qu i 2+ ² ) = £ ( 1 ) F ( O pt 1 ) 1² £( 1 ¯² ) Backwards Quantifies Desired result: Obtained: New result [E STOC09?] New result [EP] 9Alg 8² F ( A l g1+ ² ) F ( O pt 1 ) = 8² 9Alg F ( A l g1+ ² ) F ( O pt 1 ) = £( F ( A l g1+ ² ) F ( O pt 1 ) = ! (1) ¯= 1² 2 8Alg 9² ²= 1¯ 2 F ( L A P Sh¯ ; 1 + ¯ + F ( O pt 1 ) ²i ’ ) = £( 1 ² O ( 1) 1 ¯² ) ’ 1 ²2 ) Performance vs LLoad Threshold 2 [0; 1] F (Opt L (I )) = 1 Defn: A set of jobs has load if i.e. can be optimally handled with speed L. Defn: F ¯ (L ) = max wit h load I L F (L AP Sh¯ ;1i (I )) Equi (β=1) has the best performance, but it only can handle half load. L= 1 2 Small β can handleL = 1¡ ¯ almost full load but its performance 1. degrades with ¯ L Proof Sketch F ( L A P Sh¯ ; 1 + ¯ + F ( O pt 1 ) ² ;i ) = £( 1 ¯² ) Proof Sketch • In the worst cast inputs, each phase is either sequential or parallelizable. LAPS LAPS Proof Sketch Potential Function • • • • • Define a potential function Φt. It says how much debt Laps has in the bank. Φ0 = Φfinal = 0. Φt does not increase as jobs arrive or complete. At other dF times, ( L A P S) dF ( O pt ) d© dt + dt · c • Result follows by integrating dt F (L AP S) + ©f i n al ¡ ©0 · cF (Opt) Potential Function nt jobs currently alive sorted by arrival time. Coefficient: Parallelizable work done by Opt not by LAPS: 1 2 3 … x 1x 2x 3 … ©= ° xnnt n0t+1 t P Job arrives: i 2 [n t ] d© dt i ¢max(x i ; 0) = 0 Potential Function n jobs currently alive sorted by arrival time. Coefficient: Parallelizable work done by Opt not by LAPS: x11x22x33 … … ©= ° P xnnt nt-1 i i+1i 0 i 2 [n t ] d© Job completes: dt t i ¢max(x i ; 0) · 0 Potential Function n jobs currently alive sorted by arrival time. Coefficient: Parallelizable work done by Opt not by LAPS: x11x22x33 … xnnt … ©= ° Opt works: P i 2 [n t ] d© dt i ¢max(x i ; 0) · ° ¢n t ¢1 t Opt Potential Function n jobs currently alive sorted by arrival time. Coefficient: Parallelizable work done by Opt not by LAPS: LAPS works: d© dt (1 ¡ ¯)n t x ( 1¡ ¯ ) n x11x22x33 … … ©= ° · ° xnnt t P i 2 [n t ] t L AP S i ¢max(x i ; 0) P i 2 [( 1¡ ¯ ) n t ;n t ¡ `bt ] `bt = i ¢¡ ( 1+ ¯ + ² ) ¯nt # of jobs • sequential under LAPS xi · 0 • LAPS is a head, i.e. Function dF (Potential L A P S) + d© · c dF ( O pt ) dt dt dt nt · £( # jobs alive under Laps 1 ¯² ) b̀ · N t # jobs alive under Opt resulting competitive ratio A page of math later, and the proof is done. Opt works: LAPS works: d© dt · ° ¢n t ¢1 P +° i 2 [( 1¡ ¯ ) n t ;n t ¡ `bt ] `bt = i ¢¡ ( 1+ ¯ + ² ) ¯nt # of jobs • sequential under LAPS xi · 0 • LAPS is a head, i.e. Conclusions nt jobs currently alive sorted by arrival time. Latest Arrival Processor Sharing L AP S ¯n t [EP] Resource F ( LAugmentation: APS ) h¯ ; 1 + ¯ + ² ; i F ( O pt 1 ) [ Work in Progress jobs = £( 1 ¯² ) ]: Suboptimal Load Threashold F ( A l g ) = ! (1) 8Alg 9² 1+ ² F ( O pt 1 ) Other Models Same Techniques •Broadcast: Many page requests serviced simultaneously [EP:SODA02, EP:SODA03] •TCP: Add Incr & Mult Decr ~ EQUI [EDD:PAA03, E:Latin 04] •Speed Scaling: Each algorithm can dynamically choose its speed s, but it must pay for it with energy P(s) = sα [CELLSP:STACS09,CEP:STACS09] Thank you
© Copyright 2025 Paperzz