160 likes | 297 Views
SRR: The Smoothed Round Robin Scheduler. Paul Southerington ECE 742 5 May 2005. Overview. Design Goals Why is it significant? How does it work?. General Goals of Scheduler. Conflicting Design Goals Fairness SRR Attempts to provide long-term and short-term fairness Bounded Delay
E N D
SRR: The Smoothed Round Robin Scheduler Paul Southerington ECE 742 5 May 2005
Overview • Design Goals • Why is it significant? • How does it work?
General Goals of Scheduler • Conflicting Design Goals • Fairness • SRR Attempts to provide long-term and short-term fairness • Bounded Delay • Scalability • Complexity • SRR Claims O(1) Complexity • Formal Proofs in original paper
Overview • So how does it work? • Weight Spread Sequences • Weight Matrix • Scheduler Operation
The Weight Spread Sequence • Spreads flow service time across entire round • Values map to columns of matrix • k is the order of the WSS • Chosen based on flow weights • Defined recursively: • Sk = Sk-1, k, Sk-1 • S1 = 1
The Weight Spread Sequence (2) • Length = 2k - 1 • Sample: k=1 through k=4 • S1 = 1 • S2 = 1 2 1 • S3 = 1 2 1 3 1 2 1 • S4 = 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1
The Weight Matrix • One row for each traffic flow • Number of Columns = k= log2(wmax) • Same as order of WSS • Each row is a Weight Vector • Series of binary coefficients • Represent each flow weight in binary • Each bit comprises one element of matrix
Sample Weight Matrix • Weights: w1=5, w2=2, w3=2, w4=3, w5=1
Scheduler Operation • Scan WSS from left-to-right • For each entry in WSS: • Serve traffic from flows in matching column • Flows served sequentially (top-to-bottom) • Move to next entry in WSS • Start Over
Sample Weight Matrix • Weights: w1=5, w2=2, w3=2, w4=3, w5=1 • WSS = S3 = 1 2 1 3 1 2 1 • Service order: f1, f2, f3, f4, f1, f1, f4, f5, f1, f2, f3, f4, f1
SRR Implementation (1) • Weight Matrix and WSS • Size may be fixed • WSS may be precomputed • Can tradeoff granularity for max speed • With 32nd-order WSS: • 4 Tbps with 1 kbps resolution • 8 Tbps with 2 kbps resolution
SRR Implementation (2) • Three Functions • Add_flow() • Executed whenever a new flow arrives • Adds new entry to bottom of doubly-linked list (column) • Worst-case O(k) operation, not O(1)! • Del_flow() • Executed when a flow is no longer backlogged • Basically Add_flow() in reverse
SRR Implementation (3) • Three Functions (contd.) • Schedule() • Operates as described in previous example • Also handles deficit value • Add_flow and Del_flow called from here
Future Improvements • Improvements to Add_flow and Del_flow • Try to improve worst-case O(k) performance • Parallel operation • WSS Compression • Remove WSS elements for empty columns • May not be possible to implement efficiently
Conclusions • Elegant solution to conflicting design goals • May not really perform at O(1) • Still some room for improvement