1 / 27

Multiprocessor scheduling

Multiprocessor scheduling. Multiprocessor task scheduling:. T 1 / 2. T 2 / 3. T 3 / 1. T 4 / 2. T 5 / 4. T 6 / 1. T 7 /2. T 8 / 6. T 10 / 1. T 9 / 2. An example of a task set. T 1 / 2. T 2 / 3. T 3 / 1. T 4 / 2. T 5 / 4. T 6 / 1. T 7 /2. T 8 / 6. T 10 / 1.

jam
Download Presentation

Multiprocessor scheduling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Multiprocessor scheduling

  2. Multiprocessor task scheduling: T1 / 2 T2 / 3 T3 / 1 T4 / 2 T5 / 4 T6 / 1 T7 /2 T8 / 6 T10 / 1 T9 / 2 An example of a task set

  3. T1 / 2 T2 / 3 T3 / 1 T4 / 2 T5 / 4 T6 / 1 T7 /2 T8 / 6 T10 / 1 T9 / 2 Aperiodic task scheduling: An example of a task set

  4. 2 4 8 10 12 0 6 On three processors T1 T10 T5 P1 T2 T6 T8 P2 T3 T4 T7 T9 P3 A possible schedule for the task set

  5. T1 T10 T5 P1 T2 T6 T8 P2 T3 T4 T7 T9 P3 2 4 8 10 12 0 6 T1 T10 T5 P1 T2 T6 T8 T7 T9 P2 T3 T4 P3 14 2 4 8 10 12 0 6 A(I) OPT(I) RA(I) = RA(I) = OPT(I) A(I) RA(I) = 14/11

  6. We consider a simple multiprocessor scheduling problem: • P || Cmax • -- nonpreemptive scheduling • -- independent tasks • -- identical processors • -- minimizing schedule length

  7. Thm: P2 || Cmax is NP-hard Partition problem A={ 2, 3, 5, 7, 11, 19, 23, 28, …..,101 } A= B + C and åB = åC P1 A’ A-A’ P2 t 0

  8. If preemption is allowed : P3 | pmpt | Cmax n C*max = max{ max{ pj}, 1/måPj } j=1 P1 P2 P3 T1 T2 T3 T4 T5 P1 T1 T2 P2 T3 T4 P3 T4 T5 T5 (If ther is a big task)

  9. T1 / 3 T2 / 2 T3 / 2 T4 / 2 T9 / 9 T5 / 4 T6 / 4 T7 / 4 T8 / 4 List scheduling -- The difficulty for doing multiprocessor scheduling A task set, m=3, L=(T1,T2,T3,T4,T5,T6,T7,T8,T9)

  10. T1 / 3 T2 / 2 T3 / 2 T4 / 2 T9 / 9 T5 / 4 T6 / 4 T7 / 4 T8 / 4 An optimal schedule when m=3, L=(T1,T2,T3,T4,T5,T6,T7,T8,T9) T1 T9 P1 P2 T2 T4 T5 T7 P3 T3 T6 T8 0 2 12

  11. T1 / 3 T2 / 2 T3 / 2 T4 / 2 T5 / 4 T6 / 4 T7 / 4 T9 / 9 T8 / 4 A new Priority list L’ = (T1,T2,T4,T5,T6,T3 ,T9,T7,T8) T1 T3 T9 P1 P2 T2 T5 T7 T4 T6 T8 P3 0 2 14

  12. T1 / 3 T2 / 2 T3 / 2 T4 / 2 T9 / 9 T5 / 4 T6 / 4 T7 / 4 T8 / 4 Number of processors increased : m’=4 T1 T8 P1 T9 P2 T2 T5 T3 T6 P3 T7 T4 P4 0 2 15

  13. T1 / 3 T2 / 2 T3 / 2 T4 / 2 T9 / 9 T5 / 4 T6 / 4 T7 / 4 T8 / 4 Processing times decreased : pj’= pj-1 ,j=1,2,3,4,5,6…n P1 T1 T5 T8 T6 P2 T2 T4 T9 T7 P3 T3 0 2 13

  14. T1 / 3 T2 / 2 T3 / 2 T4 / 2 Precedence constrains weakened T9 / 9 T5 / 4 T6 / 4 T7 / 4 T8 / 4 T1 T6 T9 P1 P2 T2 T4 T7 T3 T5 T8 P3 0 2 16

  15. P3 P4 Thm. For an arbitrary list scheduling algorithms Ls, for P || Cmax RLs = 2- 1/m a) b) P1 T13 P1 T1 T5 T9 T13 P2 T1 T4 T7 T10 P2 T2 T6 T10 T2 T5 T8 T11 T3 T7 T11 P3 P4 T3 T6 T9 T12 T4 T8 T12 0 0 3 4 1 1 2 2 7 3 An approximate schedule An optimal schedule

  16. P3 P3 P4 P4 Case 1. If there is a task with large processing time RLs = 2- 1/m a) b) P1 T13 P1 T1 T5 T9 T13 P2 T1 T4 T7 T10 P2 T2 T6 T10 T2 T5 T8 T11 T3 T7 T11 T3 T6 T9 T12 T4 T8 T12 0 0 3 4 1 1 2 2 7 3 An approximate schedule An optimal schedule

  17. Case 2: no big task RLs = 2- 1/m a) b) P1 T13 P1 T1 T5 T9 T13 P2 T1 T4 T7 T10 P2 T2 T6 T10 T2 T5 T8 T11 T3 T7 T11 P3 P3 P4 T3 T6 T9 T12 P4 T4 T8 T12 0 0 3 4 1 1 2 2 7 3 An approximate schedule An optimal schedule

  18. 2 4 8 10 12 2 4 8 10 12 0 6 0 6 If “LPT (longest processing time) rule” is applied. Thm. RLPT = 4/3 -1/3m a) b) P1 T1 T5 P1 T1 T7 T9 P2 P2 T2 T6 T2 T8 T3 T4 P3 P3 T5 T3 P4 P4 T6 T4 T7 T8 T9 t t 14 An optimal schedule An approximate schedule

  19. 2 4 8 10 12 2 4 8 10 12 0 6 0 6 If no enough tasks RLPT = 4/3 -1/3m a) b) P1 T1 P1 T1 P2 P2 T2 T2 T3 P3 P3 T3 P4 P4 T7 T4 T4 T7 t t 14 An optimal schedule An approximate schedule

  20. 2 4 8 10 12 2 4 8 10 12 0 6 0 6 At least one processor assigned more than two tasks RLPT = 4/3 -1/3m = 4/3 -1/12 = 15/12 P1 T1 T5 P1 T1 T7 T9 P2 P2 T2 T6 T2 T8 T3 T4 P3 P3 T5 T3 P4 P4 T6 T4 T7 T8 T9 t t 14 An optimal schedule An approximate schedule

  21. Other multiprocessor scheduling examples: P | in-tree, pj=1 | Cmax 4 T1 T2 T3 T4 T5 3 T6 T7 T8 T9 2 T10 T11 1 T12

  22. 4 T1 T2 T3 T4 T5 3 T6 T7 T8 T9 2 T10 T11 1 (level) T12 T10 T1 T12 T4 T7 P1 P2 T11 T2 T5 T8 P3 T6 T3 T9 t 0 1 2 3 4 5

  23. T2 / 2 T1 / 2 T3 / 1 T9 / 1 T5 / 1 T6 / 1 T7 / 1 T8 / 1 P2 | pmpt, prec | Cmax and T4 / 2

  24. T9 / 1 T5 / 1 T6 / 1 T7 / 1 T8 / 1 P2 | pmpt, prec | Cmax and T2 / 2 T1 / 2 T4 / 2 T3 / 1

  25. t 1 2 4 5 6 0 3 t 1 2 4 5 6 0 3 T1 T1 b=2/3 T3 T5 b=2/5 T6 b=2/5 T2 b=2/3 T7 b=2/5 T2 T4 T8 b=2/5 T4 b=2/3 T9 b=2/5 T1 T1 T2 T3 T5 T6 T7 T2 T2 T4 T4 T7 T8 T9

  26. 9 7.5 4.5 10 4 3.75 4.5 10 3 Q | pmpt | Cmax , n=4, m=2, p= [35, 26, 14, 10], b=[3.1]; T1 T1, T2 T1,T2,T3 T1, T2, T3, T4 P1 P2 T2 t 0 21.25 4.5 8.25 11.25

  27. Q | pmpt | Cmax T1 T1, T2 T1,T2,T3 T1, T2, T3, T4 P1 P2 T2 t 0 21.25 4.5 8.25 11.25 T2 T4 T1 T1 T2 T1 T2 T3 T1 T3 P1 T4 T2 T1 T3 P2 T3 T1 T1 T2 T2 T2 t 0 21.25 4.5 8.25 11.25

More Related