online scheduling
play

Online Scheduling Susanne Albers University of Freiburg Germany - PowerPoint PPT Presentation

Online Scheduling Susanne Albers University of Freiburg Germany Motivation Decision making with incomplete information. Jobs arrive as a sequence, maybe even over time. Future jobs unknown. Processing times are unknown. Processor


  1. Online Scheduling Susanne Albers University of Freiburg Germany

  2. Motivation Decision making with incomplete information. • Jobs arrive as a sequence, maybe even over time. Future jobs unknown. • Processing times are unknown. • Processor breakdowns or maintenance intervals are unknown. Compute schedules that represent good approximate solutions.

  3. Competitive analysis Online setting: jobs sequence A : OPT: Online Offline algorithm algorithm A ( σ ) OPT ( σ ) A is c -competitive if for all job sequences σ A ( σ ) ≤ c · OPT ( σ ) .

  4. Problems settings m processors/machines n jobs J 1 , . . . , J n p ij = processing time J i on machine j • Machine environments: identical: p ij = p i related: p ij = p i /s j for some processing time p i and machine speed s j unrelated: p ij may take arbitrary values • Online models: jobs arrive as a sequence/list jobs arrive over time • Job duration: permanent or temporary. • Objective functions: sum of completion times � � Makespan C max i c i i w i c i � � Flow time f i = c i − a i i f i i w i f i s i = f i /p i � i s i � i w i s i Stretch

  5. Graham’s problem Graham 1966 m identical parallel machines. Jobs J 1 , J 2 , . . . , J n with processing times p 1 , p 2 , . . . , p n . Jobs arrive one by one. Preemption not allowed. Minimize makespan. 1 2 m time

  6. Graham’s problem List: Schedule any new job on least loaded machine. Thm: List is (2 − 1 m ) -competitive. 1 2 m time

  7. Analysis 1 2 m T List time n � mT List ≤ p i + ( m − 1) max 1 ≤ i ≤ n p i i =1 n 1 p i + (1 − 1 T OP T + (1 − 1 � T List ≤ m ) max 1 ≤ i ≤ n p i ≤ m ) T OP T m i =1

  8. Analysis 1 2 m T List time n � mT List ≤ p i + ( m − 1) max 1 ≤ i ≤ n p i i =1 n 1 p i + (1 − 1 1 ≤ i ≤ n p i ≤ T OP T + (1 − 1 � T List ≤ m ) max m ) T OP T m i =1

  9. Lower bound Thm: List is not better than (2 − 1 m ) -competitive. m ( m − 1) jobs of size 1 1 job of size m 1 1 2 2 m m OPT List T List = ( m − 1) + m = 2 m − 1 T List = m

  10. Improvements List best possible for m = 2 , 3 Upper bounds • 1.986 Bartal, Fiat, Karloff, Vohra STOC 92 • 1.945 Karger, Phillips, Torng SODA 94 • 1.923 Albers STOC 97 • 1.9201 Fleischer, Wahl ESA 00 Lower bounds • 1.701 Faige, Kern, Turan 89 • 1.837 Bartal, Karloff, Rabani 94 • 1.852 Albers 97 • 1.853 Gormey, Reingold, Torng, Westbrook 00 • 1.88 Rudin 01

  11. Imbalanced schedules 1 2 m Makespan higher than necessary at this point in time

  12. Algorithm Imbal Sort machines in order of non-decreasing load Load = processing times of jobs assigned to it l i = load of i -th smallest machine 1 λ k k + 1 2 k + 1 m k = ⌈ 0 . 36 m ⌉ � k λ = 1 i =1 l i average load on the k smallest machines k

  13. Algorithm Imbal 1 λ k k + 1 2 k + 1 k = ⌈ 0 . 36 m ⌉ m Try to maintain λ ≤ α · l 2 k +1 α = 0 . 456

  14. Algorithm Imbal 1 λ k ≤ c L k + 1 m ? 2 k + 1 k = ⌈ 0 . 36 m ⌉ m Algorithm: c = 1 . 9201 L = � i l i Schedule new job on machine k + 1 if resulting load ≤ c · L • λ > α · l 2 k +1 and m Otherwise schedule job on machine 1.

  15. Room for improvement? OPT is at least n 1 � (a) p i m i =1 (b) max 1 ≤ i ≤ n p i (c) 2 × proc. time of ( m + 1) -st largest job m + 1

  16. Room for improvement? m + 1 Thm : Impossible to prove competitive ratio smaller than 1.919 using n 1 � (1) p i m i =1 (2) Set of m + 1 largest proc. times

  17. Room for improvement? 2 m + 1 3 m + 1 m + 1 (3) ( im + 1) -st to ( im − i + 1) -st largest jobs, i = 1 . . . , ⌊ ( n − 1) ⌋ m Thm : Impossible to prove competitive ratio smaller than 1.917 using (1–3).

  18. Randomization • m = 2 : 4/3-competitive algorithm. This is optimal. Bartal, Fiat, Karloff, Vohra STOC 92 • Lower bound of e/ ( e − 1) ≈ 1 . 58 , for any m . Chen, van Vliet, Woeginger IPL 94; Sgall IPL 97 • BIT algorithm that is 1.916-competitive, for any m . Albers STOC 02

  19. 2 machines 1 3 L 2 3 L Discrepancy = load difference on the two machines L = total proc. times of all jobs arrived so far. Algorithm: Maintain set of all schedules generated so far, together with their probabilities. When a new job arrives: • E 1 = discrepancy if job is put on short machine in each schedule. E 2 = discrepancy if job is put on tall machine in each schedule. • Determine p , 0 ≤ p ≤ 1 , such that pE 1 + (1 − p ) E 2 = 1 3 L . • If p exists, with prob. p schedule on short machine and with prob. 1 − p on the tall machine in each schedule. • If such p does not exist, schedule on short machine.

  20. BIT algorithm 1 . 832 L 2 L A 1 A 2 m m prob = 1 prob = 1 2 2 E [ BIT ( σ )] ≤ 1 2 (1 . 832 + 2) L m = 1 . 916 L m

  21. Algorithm A 1 1 λ k ≤ c L k + 1 m ? 2 k + 1 k = ⌈ 0 . 36 m ⌉ m Algorithm: c = 1 . 832 k = ⌈ 0 . 36 m ⌉ α = 0 . 56 Schedule new job on machine k + 1 if resulting load ≤ c · L • λ > α · l 2 k +1 and m Otherwise schedule job on machine 1.

  22. Problem 1 . 832 L 2 L A 1 A 2 m m prob = 1 prob = 1 2 2 A 1 ’s schedule is nearly balanced/flat.

  23. Algorithm A 2 1 λ k ≤ c L k + 1 m ? 2 k + 1 m k = ⌈ 0 . 375 m ⌉ Algorithm: k = ⌈ 0 . 375 m ⌉ α = 0 . 45 Keep track of A 1 ’s schedule. If A 1 not flat then c = 2 else c = 1 . 885 . Schedule new job on machine k + 1 if resulting load ≤ c · L • λ > α · l 2 k +1 and m Otherwise schedule job on machine 1.

  24. Extensions Preemption allowed: Tight upper and lower bounds of e/ ( e − 1) . l p norm: Minimize ( � m i =1 l p i ) 1 /p , where l i is the load of i -th machine. Motivation: Balance load among the machines. Line breaks in LaTeX are computed based on l 2 and l 3 norms. p = ∞ : Makespan � p = 2 : List is 4 / 3 -competitive.

  25. Open problems Develop improved deterministic algorithms. Develop randomized algorithms that beat the deterministic lower bound, for all m .

  26. Jobs arrive over time Job sequence J 1 , J 2 , . . . , J n J i : arrival time a i processing time p i possible weight w i preemption may be allowed • Clearvoyant scheduling: When J i arrives, p i is known. Classical manufacturing; Web server delivering static Web pages. • Non-clearvoyant scheduling: When J i arrives, p i is unknown and becomes known only when job finishes. Scheduling in operating systems.

  27. Algorithms Clearvoyant • SRPT: Shortest Remaining Processing Time Run job with least remaining work. • SJF: Shortest Job First Run job with least initial work. • HDF: Highest Density First Run job with highest ratio w i /p i

  28. Algorithms Non-clearvoyant • FIFO: First In First Out or First Come First Served. Run job with earliest arrival time. • RR: Round Robin or Processor Sharing or Equi-Partition Devote an equal amount of processing resources to all jobs. Multi-processor environment: Assign J i to processor i mod m . • SETF: Shortest Elapsed Time First Run the job that has been processed the least. Amounts to RR when there are ties. • MLF: Multi-Level Feedback Mimick SETF while keeping the number of preeemptions per job logarithmic. Queues Q 0 , Q 1 , . . . with target processing times T j = 2 j . J i is processed for T j − T j − 1 time units while in Q j and before being promoted to Q j +1 . Always run job in the front of lowest non-empty queue.

  29. Clearvoyant scheduling Job sequence J 1 , J 2 , . . . , J n J i : arrival time a i processing time p i preemption allowed Total flow time: � n i =1 f i • 1 machine: SRPT is 1-competitive. • m machines: SRPT is O (min { log P, log n/m } ) -competitive, where P = p max /p min . This ratio is best possible. Resource augmentation: SPRT is 1 /s -competitive using speed s ≥ 2 − 1 m . No migration: O (min { log P, log n/m } ) -competitive algorithm.

  30. Clearvoyant scheduling Total stretch: � n i =1 f i /p i • 1 machine: SRPT is 2-competitive. Any algorithm has competitiveness c ≥ 1 . 036 . • m machines: SRPT is 14-competitive. Any algorithm has competitivess 1 . 093 ≤ c ≤ 9 . 82 . No migration: 17 . 32 -competitive algorithm.

  31. 1 machine SRPT is optimal. Consider optimal schedule. Suppose that it violates SRPT first at time t . J i J j time t J i J j time t Use slots where J i or J j are scheduled to first process J i and then J j . Swap can only decrease the total flow time.

  32. m machines Thm: SRPT is O (log P ) -competitive where P = p max /p min For any scheduler S let F S be the total flow time on given job instance. N S ( t ) = # active jobs in S at time t M S ( t ) = # active machines in S at time t � F S = N S ( t ) dt t Observation 1: F S ≥ � i p i Observation 2: � t M S ( t ) dt = � i p i

  33. Analysis SRPT T = times when all m machines are active. Main Lemma: t ∈ T N SRP T ( t ) ≤ m (2 + ln P ) + N OP T ( t ) � � � F SRP T = N SRP T ( t ) dt = N SRP T ( t ) dt + N SRP T ( t ) dt t t/ ∈ T t ∈ T � � ≤ M SRP T ( t ) dt + ((2 + ln P ) M SRP T ( t ) + N OP T ( t )) dt t/ ∈ T t ∈ T � � ≤ (2 + log P ) M SRP T ( t ) dt + F OP T ≤ (2 + ln P ) p i + F OP T t i

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend