2010-09-11 Real-time Systems Fixed-Priority Multiprocessor Scheduling [RTAS 2010] N periodic tasks (of different rates/periods) Joint work with T T T i i i Nan Guan, Martin Stigge and Yu Ge C i C C J i1 J i2 J i3 i i r i1 r i2 r i3 r i4 Northeastern University, China Utilization/workload: Uppsala University, Sweden How to schedule the jobs to avoid deadline miss? On Single-processors Rate Monotonic Scheduling Liu and Layland’s Utilization Bound [1973] Priority assignment: shorter period higher prio. (the 19 th most cited paper in computer science) Run-time schedule: the highest priority first high priority … … mediate priority number of … … tasks … … low priority Scheduled by RMS (Rate Monotonic Scheduling) Run-time schedule How to check whether all deadlines are met? Liu and Layland’s Utilization Bound Liu and Layland’s Utilization Bound Schedulability Analysis Schedulability Analysis P CPU Schedulable? 100% 100% U i 1 1 2 3 Yes, schedulable! 77.9% 77.9% 2 3 U i = C i / T i Liu and Layland’s bound: Liu and Layland’s bound: 1
2010-09-11 Multiprocessor (multicore) Scheduling Open Problem (since 1973) Significantly more difficult: Find a multiprocessor scheduling algorithm that can achieve Liu and Layland ’ s utilization bound Timing anomalies ? Hard to identify the worst-case scenario Bin-packing/NP-hard problems number of Multiple resources e.g. caches, bandwidth processors … … Multiprocessor Scheduling Best Known Results (before 2010) Partitioned Scheduling Global Scheduling Partitioned Scheduling with Task Splitting new task 4 waiting queue 2 3 4 2 2 2 2 2 3 2 5 5 8 9 5 3 7 1 6 7 1 6 4 8 1 6 cpu 2 cpu 3 cpu 2 cpu 3 cpu 2 cpu 3 cpu 1 cpu 1 cpu 1 Best Known Results (before 2010) Best Known Results Our New Result % 80 Liu and Layland ’ s RTAS 2010 Utilization Bound 70 RTSS 2010_submitted 60 69.3 50 40 65 66 30 50 50 50 [ RTCSA’ 06] 20 38 [ TPDS’ 05] [ ECRTS’ 03] [ RTSS’ 04] [ OPODIS’ 08] 10 Fixed Dynamic Fixed Dynamic Fixed Dynamic Priority Priority Priority Priority Priority Priority Task Splitting Global Partitioned Lehoczky et al. CMU ECRTS 2009 Multiprocessor Scheduling 2
2010-09-11 Multiprocessor Scheduling Multiprocessor Scheduling Global Scheduling Global Scheduling Would fixed-priority scheduling Would fixed-priority scheduling e.g. “RMS” work? e.g. “RMS” work? new task new task 4 4 Unfortunately “RMS” suffers waiting queue waiting queue from the Dhall’s anomali 2 5 2 5 Utilization may be “0%” 8 8 1 6 1 6 cpu 2 cpu 3 cpu 2 cpu 3 cpu 1 cpu 1 Dhall’s anomali Dhall’s anomali Task 1 CPU1 1 1 1 1 Task 2 CPU2 2 2 2 3 3 2 Deadline miss Task 3 3 ε 1 1+ ε ε 1 1+ ε 0 0 Schedule the 3 tasks on 2 CPUs using “RMS Dhall’s anomali Multiprocessor Scheduling (M+1 tasks and M processors) Partitioned Scheduling 1/( ε +1) ε /1 ε /1 ε /1 #M+1 2 3 4 #1 #2 … … #M 5 8 9 P 1 P 2 P M 1 6 7 M* ε + 1/(1+ ε ) U 0 M … … cpu 1 cpu 2 cpu 3 3
2010-09-11 Multiprocessor Scheduling Partitioned Scheduling The Partitioning Problem is similar to Bin-packing Problem (NP-hard) Partitioned Scheduling Resource utilization may Limited Resource Usage, 50% necessary condition to be limited to 50% guarantee schedulability 2 3 4 #1 #2 … … #M #M+1 50%+ ε 5 8 9 1 6 7 P 1 P 2 P M … … cpu 2 cpu 3 cpu 1 Partitioned Scheduling Partitioned Scheduling The Partitioning Problem is similar to The Partitioning Problem is similar to Bin-packing Problem (NP-hard) Bin-packing Problem (NP-hard) Limited Resource Usage Limited Resource Usage necessary condition to necessary condition to guarantee schedulability guarantee schedulability #M+1,1 … … #M+1 50%+ ε … … 50%+ ε #M+1,2 P 1 P 2 P M P 1 P 2 P M … … … … #1 #2 #M #1 #2 #M Partitioned Scheduling Multiprocessor Scheduling The Partitioning Problem is similar to Bin-packing Problem (NP-hard) Partitioned Scheduling with Task Splitting Limited Resource Usage necessary condition to guarantee schedulability 2 2 2 2 2 3 … … 50%+ ε 5 3 7 1 6 4 P 1 P 2 P M #M+1,1 #M+1,2 … … cpu 1 cpu 2 cpu 3 #1 #2 #M 4
2010-09-11 Partitioned Scheduling Bin-Packing with Item Splitting Partitioning Resource can be “fully” (better) utilized 2 1 1 1 3 6 4 5 9 7 8 P1 P2 P3 Bin1 Bin2 Bin3 8 1 1 1 6 5 2 7 4 3 8 2 1 2 Previous Algorithms Lakshmanan ’s Algorithm [ECRTS’09] [Kato et al. IPDPS’08] [Kato et al. RTAS’09] [ Lakshmanan et al. ECRTS’09] Sort the tasks in some order e.g. utilization or priority order Sort all tasks in decreasing order of utilization Select a processor, and assign as many tasks as possible P1 8 8 highest util. 7 7 6 6 5 5 4 4 3 3 2 2 1 1 lowest util. Lakshmanan ’s Algorithm [ECRTS’09] Lakshmanan ’s Algorithm [ECRTS’09] Pick up one processor, and assign as many Pick up one processor, and assign as many tasks as possible tasks as possible P1 P1 8 highest util. highest util. 7 7 6 6 8 5 5 4 4 3 3 2 2 1 1 lowest util. lowest util. 5
2010-09-11 Lakshmanan ’s Algorithm [ECRTS’09] Lakshmanan ’s Algorithm [ECRTS’09] Pick up one processor, and assign as many Pick up one processor, and assign as many tasks as possible tasks as possible P1 P1 highest util. highest util. 6 1 7 7 6 8 8 6 2 5 5 4 4 3 3 2 2 1 1 lowest util. lowest util. Lakshmanan ’s Algorithm [ECRTS’09] Lakshmanan ’s Algorithm [ECRTS’09] Pick up one processor, and assign as many Pick up one processor, and assign as many tasks as possible tasks as possible P1 P2 P1 P2 highest util. highest util. 6 1 6 1 7 7 8 8 6 2 6 2 5 5 4 4 3 3 2 2 1 1 lowest util. lowest util. Lakshmanan ’s Algorithm [ECRTS’09] Lakshmanan ’s Algorithm [ECRTS’09] Pick up one processor, and assign as many Pick up one processor, and assign as many tasks as possible tasks as possible P1 P2 P1 P2 highest util. highest util. 6 1 6 1 7 7 4 5 5 8 8 6 2 6 2 4 3 3 2 2 1 1 lowest util. lowest util. 6
2010-09-11 Lakshmanan ’s Algorithm [ECRTS’09] Lakshmanan ’s Algorithm [ECRTS’09] Pick up one processor, and assign as many Pick up one processor, and assign as many tasks as possible tasks as possible P1 P2 P1 P2 highest util. highest util. 2 1 6 1 6 1 3 3 7 7 4 4 5 5 8 8 6 2 6 2 2 2 2 1 1 lowest util. lowest util. Lakshmanan ’s Algorithm [ECRTS’09] Lakshmanan ’s Algorithm [ECRTS’09] Pick up one processor, and assign as many Pick up one processor, and assign as many tasks as possible tasks as possible P1 P2 P3 P1 P2 P3 highest util. highest util. 2 1 2 1 6 1 6 1 3 3 7 7 4 4 1 5 5 8 8 2 2 2 2 6 2 6 2 1 lowest util. lowest util. Lakshmanan ’s Algorithm [ECRTS’09] Lakshmanan ’s Algorithm [ECRTS’09] Pick up one processor, and assign as many Pick up one processor, and assign as many tasks as possible tasks as possible P1 P2 P3 P1 P2 P3 highest util. highest util. 2 1 2 1 6 1 6 1 3 3 7 7 4 4 1 1 5 5 8 8 2 2 2 2 6 2 6 2 key feature: Utilization Bound: “depth - first” partitioning with decreasing utilization order 65% lowest util. lowest util. 7
2010-09-11 Our Algorithm Our Algorithm Sort all tasks in increasing priority order [RTAS10] 7 lowest priority “width - first” partitioning 6 with increasing priority order 5 4 3 2 1 highest priority Our Algorithm Our Algorithm Select the processor on which the assigned Select the processor on which the assigned utilization is the lowest utilization is the lowest 7 lowest priority lowest priority 6 6 5 5 P1 P2 P3 P1 P2 P3 4 4 3 3 7 2 2 1 1 highest priority highest priority Our Algorithm Our Algorithm Select the processor on which the assigned Select the processor on which the assigned utilization is the lowest utilization is the lowest lowest priority lowest priority 5 P1 P2 P3 P1 P2 P3 4 4 3 3 7 7 5 6 6 2 2 1 1 highest priority highest priority 8
2010-09-11 Our Algorithm Our Algorithm Select the processor on which the assigned Select the processor on which the assigned utilization is the lowest utilization is the lowest lowest priority lowest priority P1 P2 P3 P1 P2 P3 3 3 4 4 7 7 5 5 6 6 2 2 1 1 highest priority highest priority Our Algorithm Our Algorithm Select the processor on which the assigned Select the processor on which the assigned utilization is the lowest utilization is the lowest lowest priority lowest priority P1 P2 P3 P1 P2 P3 2 1 2 1 2 2 3 3 4 4 7 7 5 5 6 6 2 2 1 1 highest priority highest priority Our Algorithm Our Algorithm Select the processor on which the assigned Select the processor on which the assigned utilization is the lowest utilization is the lowest lowest priority P1 P2 P3 P1 P2 P3 1 2 1 1 1 1 2 1 2 1 2 2 3 2 2 3 4 4 7 7 5 5 6 6 highest priority 1 2 9
Recommend
More recommend