In a sliding window protocol, if we use the maximum possible capacity of the channel as the size of the sliding window, efficiency will be theoretically 100%. What is the logic behind not doing this?
My guess is that this is done for throttling. Are there any other reasons?
EDIT: After reading the answer by bakuriu, I come to the conclusion that using the capacity as the sliding window size can make the system unreliable:
- The receiver buffer may fill up and the increased transfer rate at the sender side will become useless.
- Congestion and packet loss may increase. Reasons are pointed out in the linked answer.
But what if it is an Ethernet (preferably a LAN) using the Selective Repeat
protocol for the data flow and CSMA/CD
for choosing the sending station.
- The receiver window would be of the same size as the sender window. So, filling up the receiver buffer should not be a concern.
- There wouldn't be multiple stations competing for data transfer once the transfer has started (because of how CSMA/CD is defined).
- In a wired connection (and preferably being a LAN), packet loss would be less.
- Sender doesn't have to resend the whole window in case of packet loss or corrupted packet (because of Selective Repeat).
Do we usually try to use the channel capacity
as the sliding window size
in such (highly customized) cases?