91.1k views
3 votes
Consider the TCP procedure for estimating RTT. Suppose that α= 0.1. Let SampleRTT 1 be the most recent sample RTT, let SampleRTT 2 be the next most recent sample RTT, and so on. (a) For a given TCP connection, suppose four acknowledgments have been returned with corresponding sample RTTs: SampleRTT 4 , SampleRTT 3 , SampleRTT 2 , and SampleRTT 1 . Express EstimatedRTT in terms of the four sample RTTs. (b) Generalize your formula for n sample RTTs. (c) For the formula in part (b) let n approach infinity. Comment on why this averaging procedure is called an exponential moving average.

1 Answer

5 votes

Final answer:

The EstimatedRTT is calculated using a formula that considers the previous sample RTTs. When n approaches infinity, the averaging procedure is called an exponential moving average.

Step-by-step explanation:

(a) The EstimatedRTT is calculated using the following formula:

EstimatedRTT = (1 - α) * EstimatedRTT + α * SampleRTT

In this case, since α = 0.1, the formula becomes:

EstimatedRTT = 0.9 * EstimatedRTT + 0.1 * SampleRTT

So, EstimatedRTT can be expressed in terms of the four sample RTTs as follows:

EstimatedRTT = 0.9^3 * SampleRTT4 + 0.9^2 * SampleRTT3 + 0.9^1 * SampleRTT2 + 0.9^0 * SampleRTT1

(b) The formula for n sample RTTs can be generalized as:

EstimatedRTT = 0.9^(n-1) * SampleRTTn + 0.9^(n-2) * SampleRTT(n-1) + ... + 0.9^1 * SampleRTT2 + 0.9^0 * SampleRTT1

(c) When n approaches infinity, the terms 0.9^(n-1), 0.9^(n-2), ... become smaller and smaller. This means that the older sample RTTs have less influence on the EstimatedRTT. The averaging procedure is called an exponential moving average because it gives more weight to recent sample RTTs, resulting in a smoothed and updated estimation of the RTT.