170 likes | 292 Views
Communication Networks. Recitation 4. Scheduling & Drop Policies. Queueing Basics. A queue consists of a scheduling discipline and a drop policy. input. scheduling discipline: what packet gets sent next. drop policy: what is dropped upon overflow. queued packets.
E N D
Communication Networks Recitation 4 Netcomm 2005
Scheduling & Drop Policies Netcomm 2005
Queueing Basics • A queue consists of a scheduling discipline and a drop policy input scheduling discipline: what packet gets sent next drop policy: what is dropped upon overflow queued packets Netcomm 2005
Generalized Processor Sharing • The ideal max-min fair scheduling scheme • Visit each non-empty queue in turn • Serve infinitesimal from each • GPS is not implementable; we can serve only packets Netcomm 2005
Weighted Fair Queueing Problem: We need to serve a whole packet at a time. Solution: • Determine what time a packet, p, would complete if we served flows by GPS. Call this the packet’s finish time, F(p). • Serve packets in the order of increasing finish time. Netcomm 2005
WFQ Round -- Virtual Time • Round number is a real-valued variable that increases at a rate inversely proportional to the number/weight of active connections • Updating the number of connections: • A connection becomes active when a packet arrives to an empty queue • A connection becomes inactive when R(t) > F(p), where p is the last packet served Netcomm 2005
fA A r= 1 fB B fC C fA = fB = fC = 1 A F1=1 L=1 F2=3.5 L=2 B F1=2 L=2 C F1=2 L=2 Virtual time Example 1 1/3 1/2 1/3 Netcomm 2005
6 5 4 3 2 1 0 Time A1 = 4 1 1 1 1 1 1 1 1 1 1 1 1 B1 = 3 C2 = 1 C1 = 1 D1 = 1 D2 = 2 Weights : 1:1:1:1 6 5 4 3 2 1 0 D1, C1 Depart at R=1 Time A2, C3 arrive A2 = 2 A1 = 4 D1 C1 B1 A1 B1 = 3 C3 = 2 C2 = 1 C1 = 1 Round 1 D1 = 1 D2 = 2 Weights : 1:1:1:1 6 5 4 3 2 1 0 Time C2 Departs at R=2 A2 = 2 A1 = 4 D2 C2 B1 A1 D1 C1 B1 A1 B1 = 3 C3 = 2 C2 = 1 C1 = 1 Round 2 Round 1 D1 = 1 D2 = 2 Weights : 1:1:1:1 Understanding bit by bit WFQ 4 queues, sharing 4 bits/sec of bandwidth Netcomm 2005
Time 6 5 4 3 2 1 0 D2, B1 Depart at R=3 A2 = 2 A1 = 4 1 1 1 1 1 1 1 1 1 1 1 1 D2 C2 B1 A1 D2 C3 B1 A1 D1 C1 B1 A1 B1 = 3 C3 = 2 C2 = 1 C1 = 1 D1 = 1 D2 = 2 6 5 4 3 2 1 0 Weights : 1:1:1:1 A2 Departs at R=6 C3, A1 Depart at R=4 Time A2 = 2 A1 = 4 D2 C2 B1 A1 A2 A2 C3 A1 D2 C3 B1 A1 D1 C1 B1 A1 B1 = 3 C3 = 2 C2 = 1 C1 = 1 6 5 Round 4 Round 3 D1 = 1 D2 = 2 Sort packets Weights : 1:1:1:1 Time 6 5 4 3 2 1 0 Departure order for packet by packet WFQ: Sort by finish round of packets A2 = 2 A1 = 4 A2 A2 C3 C3 A 1 A 1 A1 A 1 D2 D2 B1 B1 B1 C2 D1 C1 B1 = 3 Round 2 Round 1 Round 2 Round 1 C3 = 2 C2 = 1 C1 = 1 D1 = 1 D2 = 2 Weights : 1:1:1:1 Understanding bit by bit WFQ 4 queues, sharing 4 bits/sec of bandwidth Round 3 Netcomm 2005
WF²Q • Packet approximation algorithm of GPS. • Choosing the packet with the smallest finish time among all the packets that have already started service in the corresponding GPS emulation. • Almost identical to that of GPS, differing by no more than one maximum size packet. Netcomm 2005
Drop-tail • Signals congestion only when the queue is already saturated • Likely to drop more packets from the same flow • Unfair with bursty flows Netcomm 2005
Random Early Detection (RED) Netcomm 2005
RED Details • Two queue length thresholds: if AvgLen <= MinThreshold then enqueue the packet if MinThreshold < AvgLen < MaxThreshold then calculate probability P drop arriving packet with probability P if Maxhreshold <= AvgLen then drop arriving packet Netcomm 2005
The Advantages of RED • No bias against bursty traffic • No global synchronization • Packet marking probability proportional to connection’s share of bandwidth • Scalable: no per-connection state Netcomm 2005
Explicit Congestion Notification (ECN) Netcomm 2005
ECN Details • Packets have a special Early Congestion Notification (ECN) bit • The ECN bit is set to 1 • Receivers forward ECN bit state back to sender in acknowledgments • Sender can adjust rate accordingly Netcomm 2005