Download presentation
Presentation is loading. Please wait.
1
Computer Science Surplus Fair Scheduling: A Proportional-Share Scheduling Algorithm for Symmetric Multiprocessors Abhishek Chandra Micah Adler Pawan Goyal † Prashant Shenoy UMASS Amherst and † Ensim Corporation http://lass.cs.umass.edu/software/gms
2
Computer Science Motivation Diverse web and multimedia applications popular HTTP, Streaming, e-commerce, games, etc. Applications hosted on large servers (typically multiprocessors) Key Challenge: Design OS mechanisms for Resource Management End-stations Network Server Streaming E-commerce Web
3
Computer Science Requirements for OS Resource Management Fair, Proportionate Allocation Eg: 20% for http, 30% for streaming, etc. Application Isolation Misbehaving/overloaded applications should not affect other applications Efficiency OS mechanisms should have low overheads Focus: Achieving these objectives for CPU scheduling on multiprocessor machines
4
Computer Science Outline Motivation Proportional-Share Scheduling Weight Readjustment Surplus Fair Scheduling Experimental Evaluation Concluding Remarks
5
Computer Science Proportional-Share Scheduling Associate a weight with each application and allocate CPU bandwidth proportional to weight Existing Algorithms Ideal algorithm: Generalized Processor Sharing E.g.: WFQ, SFQ, SMART, BVT, etc. Question: Are the existing algorithms adequate for multiprocessor systems? Wt=2 Wt=1 2/31/3 CPU bandwidth Applications
6
Computer Science Starvation Problem SFQ : Start tag of a thread ( Service / weight ) Schedules the thread with minimum start tag CPU 1 CPU 2 01001000 1100 C arrives B starves Time A (Wt=100) B (Wt=1) C (Wt=1) S1=10 S1=11 S1=0 S1=1 S2=0 S2=100S2=1000 S3=10S3=110 CPU 2...
7
Computer Science Weight Readjustment Reason for starvation: Infeasible Weight Assignment (eg: 1:100 for 2 CPUs) Accounting is different from actual allocation Observation: A thread can’t consume more than 1 CPU bandwidth A thread can be assigned at most (1/p) of total CPU bandwidth Feasibility Constraint:
8
Computer Science Weight Readjustment (contd.)... CPU 1CPU 2CPU 3 CPU p Decreasing Order of weights Efficient: Algorithm is O(p) Can be combined with existing algorithms Goal: Convert given weights to feasible weights
9
Computer Science Effect of Readjustment 0 5 10 15 20 25 30 01020304050 SFQ without Readjustment Number of iterations (10 5 ) Time (s) 01020304050 SFQ with Readjustment Time (s) Weight Readjustment gets rid of starvation problem A (wt=10) B (wt=1) C (wt=1) A (wt=10) B (wt=1) C (wt=1)
10
Computer Science Short Jobs Problem 0510152025303540 SFQ J1, wt=20 J2-J21, wt=1x20 J_short, wt=5 Time (s) 0 5 10 15 20 0510152025303540 Ideal J1, wt=20 J2-J21, wt=1x20 J_short, wt=5 Time (s) Frequent arrivals and departures of short jobs SFQ does unfair allocation! Number of iterations (10 5 )
11
Computer Science Surplus Fair Scheduling Service received by thread i Ideal Actual Time Surplus t Scheduler picks the threads with least surplus values Lagging threads get closer to their due Threads that are ahead are restrained Surplus = Service Actual - Service Ideal
12
Computer Science Surplus Fair Scheduling (contd.) Start tag (S i ) : Weighted Service of thread i S i = Service i / w i Virtual time (v) : Minimum start tag of all runnable threads Surplus (α i ) : α i = Service i - Service lagging = w i S i - w i v Scheduler selects threads in increasing order of surplus
13
Computer Science Surplus Fair Sched with Short Jobs 0510152025303540 Surplus Fair Sched Time (s) 0 0510152025303540 Ideal Time (s) 5 10 15 20 Number of iterations (10 5 ) Surplus Fair Scheduling does proportionate allocation J1, wt=20 J2-J21, wt=1x20 J_short, wt=5 J1, wt=20 J2-J21, wt=1x20 J_short, wt=5
14
Computer Science Outline Motivation Proportional-Share Scheduling Weight Readjustment Surplus Fair Scheduling Experimental Evaluation Concluding Remarks
15
Computer Science Requirements for OS Resource Management Fair, Proportionate Allocation Eg: 20% for web, 30% for streaming, etc. Application Isolation Misbehaving/overloaded applications should not affect other applications Efficiency OS mechanisms should have low overheads
16
Computer Science Proportionate Allocation 0 1 2 3 4 5 6 7 1:11:21:41:7 Processor Shares received by two web servers Processor Allocation (Normalized) Weight Assignment
17
Computer Science Application Isolation MPEG decoder with background compilations 0 10 20 30 40 50 0246810 Frame Rate (frames/sec) Number of background compilations Surplus Fair Time-sharing
18
Computer Science Scheduling Overhead 0 2 4 6 8 10 0 20304050 Surplus Fair Time-sharing Context switch time (microsec) Number of processes Context-switch time(~10μ s) vs. Quantum size (~100ms)
19
Computer Science Related Work CPU Reservations [Jones99] Uniprocessor proportional-share: Hierarchical Scheduling [Goyal96] BVT [Duda99], SMART [Nieh97] Lottery Scheduling [Waldspurger94]
20
Computer Science Summary Existing proportional-share algorithms inadequate for multiprocessors Readjustment Algorithm can reduce unfairness Surplus Fair Scheduling practical for multiprocessors Achieves proportional fairness, isolation Has low overhead Heuristics for incorporating processor affinity Source code available at: http://lass.cs.umass.edu/software/gms
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.