200 likes | 338 Views
Deadline Fair Scheduling: Bridging the Theory and Practice of Proportionate-Fair Scheduling in Multiprocessor Servers. Abhishek Chandra Micah Adler Prashant Shenoy University of Massachusetts Amherst, USA. Applications hosted on Commodity (OTS) OS’s
E N D
Deadline Fair Scheduling:Bridging the Theory and Practice of Proportionate-Fair Scheduling in Multiprocessor Servers Abhishek Chandra Micah Adler Prashant Shenoy University of Massachusetts Amherst, USA
Applications hosted on Commodity (OTS) OS’s Key Challenge: Design OS mechanisms for predictable Resource Management Diverse multimedia applications popular Streaming, games, etc. Applications require delay/bandwidth guarantees Motivation Server Virtual Worlds Games Streaming
Requirements for OS Resource Management • Fair, Proportionate Allocation • Divide resource among applications based on requirement • Predictable Execution • Provide soft real-time guarantees (delay, response, etc.) • Application Isolation • Overloaded application should not affect others • Efficiency • Utilize system resources, low overhead Focus: Achieving these objectives for CPU scheduling on multiprocessor machines
Outline • Motivation • Proportionate-Fairness • Deadline Fair Scheduling • Behavior in Commodity OS • Practical Enhancements • Experimental Evaluation • Concluding Remarks
P-fair Upper bound Lower bound Proportionate-Fairness [Baruah et al.96] • Periodic Task needs e units of service every p units • Ideal service in duration t, • P-fairness: e=1, p=2 4 3 Ideal CPU Service 2 1 0 1 2 3 4 5 6 time
DFS Eligible Deadline Eligible Deadline Ineligible Deadline Fair Scheduling • Eligibility: Task not allowed to run more than its due • Deadlines: Task finishes each run on time e=1, p=2 4 3 Ideal CPU Service 2 1 0 1 2 3 4 5 6 time
Deadline Fair Scheduling: Relative Allocation • Weight: For relative shares in a k-CPU system • Start tag: Service received by a task so far • Virtual time: Average service of all tasks in the system
Deadline Fair Scheduling:Online Schedule • Eligibility criteria: • Comparison of start tag and virtual time • Deadlines: • In order of start tags
I E I E D I E E Deadline Fair Scheduling:Proportionate Allocation 1 CPU, 3 Tasks with weights 2, 1, 1 4 3 Task 1 (w1=2 => e=1, p=2) 2 CPU Service Task 2 (wt=1 => e=1, p=4) 1 Task 3 (wt=1 => e=1, p=4) time 0 1 2 3 4 5 6 Task 1 E D E : Eligible I : Ineligible D : Deadline Task 2 E D Task 3 E D
Properties of DFS • System Model: • Multiprocessor system with k symmetric CPUs • A fixed set of n tasks • No arrivals and departures • All CPUs are synchronized • Lemma 1: DFS generates P-fair schedule • Lemma 2: DFS is work-conserving (no CPU is idle if runnable tasks in the system)
Outline • Motivation • Proportionate-Fairness • Deadline Fair Scheduling • Behavior in Commodity OS • Practical Enhancements • Experimental Evaluation • Concluding Remarks
Issues in Commodity OS • Quantum durations are not fixed length • Due to blocking/pre-emption • CPUs are not synchronized: • Quanta on various CPUs are out of phase • Each CPU calls scheduler independently • Tasks can arrive and depart Question: How does this affect the work-conserving behavior of DFS?
Non-Work Conserving Behavior • DFS becomes non-work conserving
Ordered by deadlines DFS Enhancement 1: Fair Airport Scheduling [Goyal et al.97] • Goal: Utilize available bandwidth if runnable tasks Eligibility Criteria Rate Controller Guaranteed Service Queue Eligible Queue Auxiliary Service Queue Ineligible Queue
Enhancement 2: Incorporating Processor Affinities • Problem: How to utilize processor caches? • Solution: Give priority to tasks with affinity • New deadline D: • If task has affinity: D = d • If task has no affinity: D = d + α Here, d is the deadline of task, α is the affinity weight • Tasks scheduled in order of D • Trades fairness for performance
Outline • Motivation • Proportionate-Fairness • Deadline Fair Scheduling • Behavior in Commodity OS • Practical Enhancements • Experimental Evaluation • Concluding Remarks
Related Work • P-fairness [Baruah96]: • PF Algorithm [Baruah-Gehrke96], Pfair Priorities [Anderson99] • Deadline-based scheduler [West99] • Generalized Processor Scheduling [Parekh92] • WFQ [Demers89], SFQ [Goyal96], BVT [Duda99] • Multiprocessor Scheduling: • Spring [Ramamritham84] • CPU Reservations [Jones99], SFS [Chandra00]
Summary • P-fairness notion of proportionate scheduling • DFS can provide p-fairness in ideal system model • Two practical enhancements: • Fair Airport Scheduling • Incorporating processor affinities • Source code available at: http://lass.cs.umass.edu/software/gms