1 / 20

Surplus Fair Scheduling: A Proportional-Share Scheduling Algorithm for Symmetric Multiprocessors

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. Motivation. Server. Web. End-stations. Network.

orien
Download Presentation

Surplus Fair Scheduling: A Proportional-Share Scheduling Algorithm for Symmetric Multiprocessors

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. 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. Motivation Server Web End-stations Network Streaming E-commerce • 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

  3. 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. Outline • Motivation • Proportional-Share Scheduling • Weight Readjustment • Surplus Fair Scheduling • Experimental Evaluation • Concluding Remarks

  5. 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? Proportional-Share Scheduling Wt=2 Wt=1 Applications 2/3 1/3 CPU bandwidth

  6. Starvation Problem • SFQ : Start tag of a thread ( Service / weight ) • Schedules the thread with minimum start tag . . . S1=0 S1=10 S1=1 . . . S1=11 CPU 1 A (Wt=100) S2=0 S2=100 . . . S2=1000 B (Wt=1) CPU 2 B starves C (Wt=1) . . . CPU 2 S3=10 S3=110 0 100 1000 1100 Time C arrives

  7. 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. Weight Readjustment (contd.) • Goal: Convert given weights to feasible weights • Efficient: Algorithm is O(p) • Can be combined with existing algorithms Decreasing Order of weights . . . . . . CPU p CPU 1 CPU 2 CPU 3

  9. Effect of Readjustment SFQ with Readjustment SFQ without Readjustment 30 25 A (wt=10) A (wt=10) 20 B (wt=1) 15 Number of iterations (105) B (wt=1) 10 C (wt=1) 5 C (wt=1) 0 0 10 20 30 40 50 0 10 20 30 40 50 Time (s) Time (s) • Weight Readjustment gets rid of starvation problem

  10. SFQ J1, wt=20 J2-J21, wt=1x20 J_short, wt=5 0 5 10 15 20 25 30 35 40 Time (s) Short Jobs Problem • Frequent arrivals and departures of short jobs Ideal 20 J1, wt=20 J2-J21, wt=1x20 15 J_short, wt=5 Number of iterations (105) 10 5 0 0 5 10 15 20 25 30 35 40 Time (s) SFQ does unfair allocation!

  11. Surplus Fair Scheduling Surplus = ServiceActual- ServiceIdeal • Scheduler picks the threads with least surplus values • Lagging threads get closer to their due • Threads that are ahead are restrained Service received by thread i Actual Ideal Surplus t Time

  12. Surplus Fair Scheduling (contd.) • Start tag (Si) : Weighted Service of thread i Si = Servicei / wi • Virtual time (v) : Minimum start tag of all runnable threads • Surplus (α i ) : α i =Servicei- Servicelagging = wi Si - wi v • Scheduler selects threads in increasing order of surplus

  13. Surplus Fair Sched with Short Jobs Ideal Surplus Fair Sched • Surplus Fair Scheduling does proportionate allocation 20 J1, wt=20 J1, wt=20 J2-J21, wt=1x20 J2-J21, wt=1x20 15 J_short, wt=5 J_short, wt=5 Number of iterations (105) 10 5 0 0 5 10 15 20 25 30 35 40 0 5 10 15 20 25 30 35 40 Time (s) Time (s)

  14. Outline • Motivation • Proportional-Share Scheduling • Weight Readjustment • Surplus Fair Scheduling • Experimental Evaluation • Concluding Remarks

  15. 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. Proportionate Allocation Processor Shares received by two web servers 7 6 5 Processor Allocation 4 (Normalized) 3 2 1 0 1:1 1:2 1:4 1:7 Weight Assignment

  17. Application Isolation MPEG decoder with background compilations 50 Surplus Fair 40 Time-sharing Frame Rate (frames/sec) 30 20 10 0 0 2 4 6 8 10 Number of background compilations

  18. Scheduling Overhead 10 • Context-switch time(~10μ s) vs. Quantum size (~100ms) Surplus Fair Time-sharing 8 6 Context switch time (microsec) 4 2 0 0 10 20 30 40 50 Number of processes

  19. Related Work • CPU Reservations [Jones99] • Uniprocessor proportional-share: • Hierarchical Scheduling [Goyal96] • BVT [Duda99], SMART [Nieh97] • Lottery Scheduling [Waldspurger94]

  20. 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

More Related