![]() |
VOOZH | about |
Sliding Window Protocol allows sending multiple packets before receiving acknowledgments.
1. Transmission Delay (Tt): Time to transmit the packet from the host to the outgoing link. If B is the Bandwidth of the link and D is the Data Size to transmit
2. Propagation Delay (Tp): It is the time taken by the first bit transferred by the host onto the outgoing link to reach the destination. It depends on the distance d and the wave propagation speed s (depends on the characteristics of the medium).
3. Efficiency: It is defined as the ratio of total useful time to the total cycle time of a packet. For stop and wait protocol,
Total time(TT) = Tt(data) + Tp(data) +
Tt(acknowledgement) + Tp(acknowledgement)
= Tt(data) + Tp(data) + Tp(acknowledgement)
= Tt + 2*Tp
Since acknowledgements are very less in size, their transmission delay can be neglected.
4. Effective Bandwidth(EB) or Throughput - Number of bits sent per second.
EB = Data Size(D) / Total Cycle time(Tt + 2*Tp)
Multiplying and dividing by Bandwidth (B),
= (1/(1+2a)) * B [ Using a = Tp/Tt ]
= Efficiency * Bandwidth
5. Capacity of link - If a channel is Full Duplex, then bits can be transferred in both the directions and without any collisions. Number of bits a channel/Link can hold at maximum is its capacity.
Capacity = Bandwidth(B) * Propagation(Tp)
For Full Duplex channels,
Capacity = 2*Bandwidth(B) * Propagation(Tp)
In Stop and Wait protocol, only 1 packet is transmitted at a time. After sending a packet, the sender must wait for an acknowledgement from the receiver before transmitting the next one.
The problem with this setup is low efficiency - the communication channel remains underutilized because only one packet is in transit, even though more packets could fit into the channel during the waiting time.
The total cycle time is:
Now, let’s calculate how many packets could ideally be transmitted during one cycle time:
If we use the notation
Maximum packets that can be transmitted in a total cycle time: After we have received the Ack for packet 0, window slides and the next packet can be assigned sequence number 0. We reuse the sequence numbers which we have acknowledged so that header size can be kept minimum as shown in the diagram given below.
Maximum packets that can be transmitted in a total cycle time = 1+2a
Example: Let Tt=1 ms (transmission time per packet) and Tp=1.5 ms (propagation time).
In Stop-and-Wait, only 1 packet is transferred in:
With Sliding Window, a window of packets is maintained packets that have been sent but not yet acknowledged—allowing multiple packets to be transmitted efficiently.
As we have seen above,
Maximum window size = 1 + 2*a where a = Tp/Tt
Minimum sequence numbers required = 1 + 2*a.
Each packet in the current window is assigned a sequence number.
This discussion covers sending windows only. Receiving windows, implemented using Go-Back-N or Selective Repeat for pipelining, will be discussed separately.
There are two types of Sliding Window Protocol which include Go-Back-N ARQ and Selective Repeat ARQ: