Академический Документы
Профессиональный Документы
Культура Документы
Outline RTT estimation using EWMA Stop and Wait Sliding Window Algorithms
CS 640
Methods of Reliability
Packets can be lost and/or corrupted during transmission
Bit level errors due to noise Loss due to congestion
A timeout is a signal that an ACK to a packet that was sent has not yet been received within a specified timeframe
A timeout triggers a retransmission of the original packet from the sender How are timers set?
CS 640
Receiver
Sender
Fram e
Receiver
Timeout
Timeout
Time
ACK
ACK
Timeout
Fram e
ACK
(a)
(c)
Sender
Fram e
Receiver
Sender
Fram e
ACK
Receiver
Timeout
Timeout
Timeout
Fram e
ACK
Timeout
Fram e
ACK
(b)
(d)
CS 640
Propagation Delay
Propagation delay is defined as the delay between transmission and receipt of packets between hosts Propagation delay can be used to estimate timeout period How can propagation delay be measured? What else must be considered in the measurement?
CS 640
Stop-and-Wait Process
Sender Receiver
Sender doesnt send next packet until hes sure receiver has last packet The packet/Ack sequence enables reliability Sequence numbers help avoid problem of duplicate packets Problem: keeping the pipe full Example
1.5Mbps link x 45ms RTT = 67.5Kb (8KB) 1KB frames imples 1/8th link utilization
CS 640 8
Time
CS 640
Selective repeat
Only send specifically unACKed packets A bit trickier to implement
CS 640 10
SWS
LAR Advance LAR when ACK arrives Buffer up to SWS frames LFS
CS 640
11
RWS
LFR LFA
accept if LFR < SeqNum < = LFA discarded if SeqNum < = LFR or SeqNum > LFA Send cumulative ACKs send ACK for largest frame such that all frames less than this have been
received
CS 640
12
SWS < (MaxSeqNum+1)/2 is correct rule Intuitively, SeqNum slides between two halves of sequence number space
CS 640
13
Receiver
Sender
Receiver
Fram e 0
Sender
Fram e0
0 ACK
Receiver
Timeout
Timeout
0 ACK
Timeout
Timeout
Fram e0
0 ACK
Fram e0
0 ACK
Fram e
1 ACK
Fram e
(c)
(d)
0 ACK
(e)
Simple sequence numbers enable the client to discard duplicate copies of the same frame Stop & wait allows one outstanding frame, requires two distinct sequence numbers
CS 640 15
9 10 11 12 13 14
A3 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 4 5 6 A4 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
9 10 11 12 13 14
9 10 11 12 13 14
9 10 11 12 13 14
CS 640
16