210 likes | 304 Views
6.033 Lecture 11 Congestion Control. slides: http://mit.edu/6.033/www/assignments/ lec11.pdf http://mit.edu /6.033/www/assignments/lec11. pptx. March 10, 2010. Key Ideas : Sliding window protocol Congestion control. Recap: At Least Once Delivery. Sender. Receiver. pkt(seqno , …).
E N D
6.033 Lecture 11Congestion Control slides: http://mit.edu/6.033/www/assignments/lec11.pdf http://mit.edu/6.033/www/assignments/lec11.pptx March 10, 2010 • Key Ideas: • Sliding window protocol • Congestion control
Recap: At Least Once Delivery Sender Receiver pkt(seqno, …) How long to set timeout? Too long: net underutilized Too short: rexmit all the time Proper setting depends on packet round trip time (RTT) Can measure ack(seqno, …) pkt(seqno+1, …) Timeout Interval RTT pkt(seqno+1, …)
Exponentially Weighted Moving Average (EWMA) measure = new RTT measurement rtt = α(measure) + (1-α)(rtt) ; α = 1/8 timeout = β * rtt ; β = 2
6 a2 p2 Sliding Window in Action window = 1-5 window = 2-6 4 3 2 1 5 Sndr a1 Rcvr p1
6 7 a3 a2 p2 p3 Sliding Window in Action window = 2-6 window = 3-7 4 3 2 1 5 Sndr a1 Rcvr p1 Send next packet as acks arrive, rather than waiting for all acks in window
7 6 a4 a3 a5 a2 p5 p4 p2 p3 Still may wait idle idle idle window = 2-3 window = 1-2 window = 3-4 4 3 2 1 5 Sndr a1 Rcvr p1
Reordering head : sno of last delivered packet size: length of reordering queue slot: position to insert new packet recv(p): slot = p.sno – head if (slot > head + size): drop else: new = isempty(slot) if (new) add p to slot ackp if (slot == head and new) deliver prefix to app head = head+ len(prefix) Application head= 1 PREFIX head+ size head= 3 P2 P4 P5 size = 5 P1 Reordering Buffer P6?
Reordering head : sno of last delivered packet size: length of reordering queue slot: position to insert new packet recv(p): slot = p.sno – head if (slot > head + size): drop else: new = isempty(slot) if (new) add p to slot ackp if (slot == head and new) deliver prefix to app head = head+ len(prefix) head= 3 head+ size P4 P5 size = 5 Reordering Buffer
T=0-1 Router Queue Sender Head Window
T=1-2 Router Queue Sender Head Window
T=1-2 Router Queue Sender Head Window
T=1-2 Router Queue Sender Head Window
T=1-2 Router Queue Sender Head Window
T=2-3 Router Queue Sender Head Window
T=2-3 Router Queue Sender Head Window
T=3-4 Router Queue Sender Head Window
T=3-4 Router Queue Sender Head Window
Sender is spending all of its time retransmitting Queue is filling with duplicate packets No new transmissions are getting through! Congestion collapse T=3-4 Router Queue Sender Head Window
T=4-5 Router Queue Sender Head Window
T=5-6 Router Queue Sender Head Window
T=6-7 Router Queue Sender Head Window