1 / 59

DP-F AIR : A Simple Model for Understanding Optimal Multiprocessor Scheduling

Greg Levin † Shelby Funk ‡ Caitlin Sadowski † Ian Pye † Scott Brandt † † University of California ‡ University of Georgia Santa Cruz Athens. DP-F AIR : A Simple Model for Understanding Optimal Multiprocessor Scheduling.

powa
Download Presentation

DP-F AIR : A Simple Model for Understanding Optimal 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. Greg Levin† Shelby Funk‡ Caitlin Sadowski† Ian Pye† Scott Brandt† †University of California ‡University of Georgia Santa Cruz Athens DP-FAIR: A Simple Model for Understanding Optimal Multiprocessor Scheduling

  2. Backstory DP-Fair SNS by Greg, Caitlin, Ian, and Scott (Rejected from RTSS) NQ-Fair by Shelby Funk (Rejected from RTSS)

  3. Multiprocessors • Most high-end computers today have multiple processors • In a busy computational environment, multiple processes compete for processor time • More processors means more scheduling complexity

  4. Real-Time Multiprocessor Scheduling Real-time tasks have workload deadlines Hard real-time = “Meet all deadlines!” Problem: Scheduling periodic, hard real-time tasks on multiprocessor systems. This is difficult.

  5. Real-Time Multiprocessor Scheduling • Real-time tasks have workload deadlines • Hard real-time = “Meet all deadlines!” • Problem: Scheduling periodic, hard real-time tasks on multiprocessor systems. This is difficult. easy!!

  6. Taxonomy of Multiprocessor Scheduling Algorithms Uniprocessor Algorithms Dedicated Global Algorithms EDF LLF Optimal Algorithms Globalized Uniprocessor Algorithms Partitioned Algorithms EKG pfair LLREF Partitioned EDF Global EDF

  7. Partitioned Schedulers ≠ Optimal Example: 2 processors; 3 tasks, each with 2 units of work required every 3 time units

  8. Global Schedulers Succeed • Example: 2 processors; 3 tasks, each with 2 units of work required every 3 time units • Task 3 migrates between processors

  9. Problem Model n tasks running on m processors A periodic taskT = (p, e)requires a workloade be completed within each periodof length p T's utilizationu = e / p is the fraction of each period that the task must execute job release job release job release job release workloade p time = 0 2p 3p periodp

  10. Fluid Rate Curve work completed fluid rate curve utilizationu= slope = e/p workloade actual work curve slope = 0 or 1 time deadline job release periodp 10

  11. Feasible Work Region work completed work complete CPU rate = 1 workloade zero laxity time deadline job release periodp 11

  12. Assumptions Processor Identity: All processors are equivalent Task Independence: Tasks are independent Task Unity: Tasks run on one processor at a time Task Migration: Tasks may run on different processors at different times No overhead: free context switches and migrations In practice: built into WCET estimates

  13. The Big Goal (Version 1) Design an optimal scheduling algorithm for periodic task sets on multiprocessors A task set is feasibleif there exists a schedule that meets all deadlines A scheduling algorithm is optimal if it can always schedule any feasible task set

  14. Necessary and Sufficient Conditions Any set of tasks needing at most 1 processor for each task ( for all i, ui ≤ 1 ) , and mprocessors for all tasks ( ui ≤ m) is feasible Proof: Small scheduling intervals can approximate a task's fluid rate curve Status: Solved pfair (1996) was the first optimal algorithm

  15. The Big Goal (Version 2) Design an optimal scheduling algorithm with fewer context switches and migrations ( Finding a feasible schedule with fewest migrations is NP-Complete )

  16. The Big Goal (Version 2) Design an optimal scheduling algorithm with fewer context switches and migrations Status: Solved BUT, the solutions are complex and confusing Our Contributions: A simple, unifying theory for optimal global multiprocessor scheduling and a simple optimal algorithm

  17. Greedy Algorithms Fail on Multiprocessors A Greedy Scheduling Algorithmwill regularly select the m “best” jobs and run those Earliest Deadline First (EDF) Least Laxity First (LLF) EDF and LLF are optimal on a single processor ; neither is optimal on a multiprocessor Greedy approaches generally fail on multiprocessors

  18. Example (n = 3 tasks, m = 2 processors) : Why Greedy Algorithms FailOn Multiprocessors

  19. Why Greedy Algorithms FailOn Multiprocessors At time t = 0, Tasks 1 and 2 are the obvious greedy choice

  20. Why Greedy Algorithms FailOn Multiprocessors Even at t = 8, Tasks 1 and 2 are the only “reasonable” greedy choice

  21. Why Greedy Algorithms FailOn Multiprocessors Yet if Task 3 isn’t started by t = 8, the resultant idle time eventually causes a deadline miss

  22. Why Greedy Algorithms FailOn Multiprocessors How can we “see” this critical event at t = 8?

  23. Proportioned AlgorithmsSucceed On Multiprocessors Subdivide Task 3 with a period of 10

  24. Proportioned AlgorithmsSucceed On Multiprocessors Now Task 3 has a zero laxity event at time t = 8 24

  25. Proportional Fairness Insight: Scheduling is easier when all jobs have the same deadline Application: Apply all deadlines to all jobs Assign workloads proportional to utilization Work complete matches fluid rate curve at every system deadline

  26. Proportional Fairness Is the Key All known optimal algorithms enforce proportional fairness at all deadlines: pfair (1996) - Baruah, Cohen, Plaxton, and Varvel ( proportional fairness at all times ) BF (2003) - Zhu, Mossé, and Melhem LLREF (2006) - Cho, Ravindran, Jensen EKG (2006) - Andersson, Tovar Why do they all use proportional fairness?

  27. Scheduling Multiple Tasks is Complicated work completed time 27

  28. Scheduling Multiple Tasks with Same Deadline is Easy work completed time 28

  29. Actual Feasible Regions work completed job deadlines time 29

  30. Restricted Feasible Regions Under Deadline Partitioning work completed all system deadlines time 30

  31. The DP-Fair Scheduling Policy Partition time into slices based on all system deadlines Allocate each job a per-slice workload equal to its utilization times the length of the slice Schedule jobs within each slice in any way that obeys the following three rules: Always run a job with zero local laxity Never run a job with no workload remaining in the slice Do not voluntarily allow more idle processor time than ( m - ui ) x ( length of slice )

  32. DP-Fair Work Allocation work completed Allocated workload slope = utilization time time slice 32

  33. DP-Fair Scheduling Rule #1 When job hits zero local laxity, run to completion work completed zero local laxity line time time slice 33

  34. DP-Fair Scheduling Rule #2 When job finishes local workload, stop running work completed local work complete line time time slice 34

  35. DP-Fair Scheduling Rule #3 Don’t voluntarily allow idle time in excess of this limit idle time slope = m Allowable idle time slope = m -ui time time slice 35

  36. DF-Fair Guarantees Optimality We say that a scheduling algorithm is DP-Fairif it follows these three rules Theorem: Any DP-Fair scheduling algorithm for periodic tasks is optimal

  37. Proof of Theorem

  38. DP-Fair Implications ( Partition time into slices ) + ( Assign proportional workloads ) Optimal scheduling is almost trivial Minimally restrictive rules allow great latitude for algorithm design and adaptability What is the simplest possible algorithm?

  39. All time slices are equivalent (up to linear scaling), so normalize time slice length to 1 Jobs have workload = utilization Schedule by “stacking and slicing” Line up job utilization blocks Slice at integer boundaries The DP-Wrap Algorithm 39

  40. The DP-Wrap Algorithm Example: 3 processors, 7 tasks

  41. The DP-Wrap Algorithm Example: 3 processors, 7 tasks

  42. The DP-Wrap Algorithm Example: 3 processors, 7 tasks

  43. The DP-Wrap Algorithm

  44. DP-Wrap Performance • n−1 context switches and m−1 migrations per time slice • This is about 1/3 as many as LLREF, similar to BF, and somewhat more than EKG • DP-Wrap has very low (O(n)) computational complexity

  45. Extending DP-Fair:Sporadic Arrivals, Arbitrary Deadlines • Sporadic arrivals: jobs from a task arrive at leastp time units apart • Arbitrary deadlines: A job from T = (p, e, D) has a deadline D time units after arrival; D may be smaller or larger than p • DP-Fair and DP-Wrap are easily modified to handle these cases

  46. DP-Fair Easily Extended Extending optimal algorithms to sporadic tasks and arbitrary deadlines has previously been difficult pfair : 10 years LLREF : 3 years DP-Fair & DP-Wrap: 3 weeks

  47. Ongoing Work • Extend to uniform multiprocessors (CPUs running at different speeds) • Extend to random, unrelated job model • Heuristic improvements to DP-Wrap • Work-conserving scheduling • Slice merging

  48. Summary DP-Fair : Simple rules to make optimal real-time multiprocessor scheduling easy!! DP-Wrap : Simplest known optimal multiprocessor scheduling algorithm Extensible : DP-Fair and DP-Wrap easily handle sporadic tasks with arbitrary deadlines We plan to extend DP-Fair and DP-Wrap to more general problem domains

  49. Thanks for Listening Questions?

  50. === EXTRA SLIDES ===1. Sporadic Tasks, Arbitrary Deadlines

More Related