TCP accommodates varying internet delays by using an
adaptive retransmission algorithm which monitors the
connection performance and revises timers accordingly.
Sample Round Trip Time:
Computed from the elapsed time between sending a
segment and receiving it's ACK.
Estimated Round Trip Time. (RTT):
Stored as a weighted average, which is slowly changed
based on sample trip times.
Since ACKs refer to the data (not datagrams) received, it is
possible a delayed original piece of data will be considered
the ACK for a retransmission of it.
This situation is known as acknowledgment ambiguity.
Picking either ACK will throw off the established RTT.
Karn's Algorithm:
Avoids the problem of ambiguous ACKs by only adjusting
the estimated RTT for unambiguous ACKs.
It ensures that segments are only transmitted once.
Before sending an updated window advertisement after
advertising a zero window, wait for space to become
available that is either:
At least 50% of the total buffer size or
Equal to a maximum sized segment.
Two approaches:
TCP adds each segment but does not advertise a window size
increase until the available buffer space (window at the
receiver) reaches the limit specified by the silly window
avoidance heuristic.
TCP delays sending an ACK when the silly window avoidance
algorithm specifies that the window is not sufficiently
large enough to advertise.
Delayed ACKs can cause communication problems (for
obvious reasons).
Sender-side Silly Window Avoidance:
The sender delays sending segments until it can accumulate a
reasonable amount of data in it's output buffer (known as
clumping).
Sufficient data usually constitutes a maximum-sized
segment.
The sending node buffers until:
A segment is filled
Or if it is still waiting to send data when an ACK
arrives, it sends all available buffered data.