A.1 Calculating Adaptive Acknowledgment Time-Out

We still must decide how much time to allow for acknowledgments to return. If we set the time-out too high, we end up unnecessarily waiting for dropped packets. If the time-out is too short, we end up timing out just before the acknowledgment arrives. The acknowledgment time-out should also be reasonable and responsive to changing network congestion.

The suggested adaptive algorithm detailed below is based on the TCP 1989 implementation and is explained in Richard Stevens's book TCP/IP Illustrated, Volume 1 (page 300). 'n' means this iteration of the calculation, and 'n-1' refers to values from the last calculation.

DIFF represents the error in the last estimated round-trip time. DIFF is calculated on each iteration.

RTT is the estimated round-trip time of an average packet. RTT is calculated on each iteration and stored for use in the next iteration.

DEV is the estimated mean deviation. This approximates the standard deviation. DEV is calculated on each iteration and stored for use in the next iteration.

ATO is the adaptive time-out for the next transmitted packet. ATO is calculated on each iteration.

Alpha (a) is the gain for the average and is typically 1/8 (0.125).

Beta (b) is the gain for the deviation and is typically 1/4 (0.250).

Chi (c) is the gain for the time-out and is typically set to 4.

To eliminate division operations for fractional gain elements, the entire set of equations can be scaled. With the suggested gain constants, they should be scaled by 8 to eliminate all division. To simplify calculations, all gain values are kept to powers of two so that shift operations can be used in place of multiplication or division.

The final calculation of ATO should use a MIN function to ensure that the time-out does not exceed the maximum time-out.