1. RTT estimation
You may want to use a spreadsheet or a computer program to calculate the answers to this question.
Recall that the RTT estimation algorithm is:
RTTEstimate = RTTEstimate · (1 − a) + RTTSample · a
Suppose that a TCP connection has experienced a constant RTT of 500ms, so that RTTEstimate is now 500ms. Now suppose the RTT drops to 200ms for the next N measurements, and then returns to 500ms.
(a) Consider the following strategy for setting the timeout:
Timeout = 2 · RTTEstimate
What is the smallest value of N so that a premature timeout will occur when the RTT returns to 500ms? Let a = 0.1 in this case.
(b) Now suppose the timeout is set using a deviation estimate:
DeviationEstimate = DeviationEstimate · (1 − b) + |RTTSample − RTTEstimate| · b
Timeout = RTTEstimate + 4 · DeviationEstimate
with b = 0.25. What will the timeout value be after N measurements of 200ms, using the value of N from the previous question? (Assume that DeviationEstimate is 0 before the RTT drops to 200ms.)