Subscribe by Email


Saturday, July 13, 2013

Sliding Window Protocols? - Part 3

In the third part of this article we shall discuss about the types of sliding window protocols and how these protocols can be extended?

1. Stop and Wait: 
- This one is the simplest type among all the sliding window protocols. 
- Under this type, we have the stop–and–wait ARQ protocol as the simplest implementation.
- Both the transmit window and the receive window is 1 packet and the number of possible sequence numbers required is 2 i.e., 1+1 = 2. 
- The packets sent by the transmitter are marked alternatively as odd and even. 
- Therefore, the ACK packets are in the series of odd, even, odd, even and so on. 
- Now, suppose the transmitter sends an odd packet and immediately without waiting for an odd ACK sends the next even packet. 
- In such a case, it would receive an ACK saying that an odd packet is expected. 
- This leaves the transmitter in a state of ambiguity i.e., whether the receiver got both the packets or none of them.

2. Go-Back-N ARQ: 
- This sliding window protocol has a fixed w(fixed at 1) and wr  which is always greater than one. 
- Here, the receiver will not accept any packet other than the expected one from the sequence. 
- If the packet gets damaged or lost during the transmission, then the packets following the lost ne will not be accepted by the receiver until and unless it receives the lost one after re-transmission. 
- This ensures minimum loss of 1 RTT (round trip time). 
- This is why it results in inefficiency in using this protocol on the links where the packet loss is quite frequent. 
- Suppose a 3 bit sequence number is being used as in typical HDLC. 
- This means number of sequence numbers is 8 starting from 0 to 7. 
- This also means we have 8 possibilities. 
- Enough ACK information is required by the transmitter for distinguishing between those packets. 
- If 8 packets are sent back to back by the transmitter without stopping for ACK, then it will find itself in the same doubt as in the stop-and-wait case.

3. Selective repeat ARQ: 
- This one is the most general case of the sliding window protocols. 
- It works with a receiver that is more capable of accepting packets having the sequence numbers greater than what the current nr is and storing them till the gap is filled. 
- The advantage is that discarding data before re-transmission is not necessary.

Ways to extend these protocols

  1. The above types of the sliding window protocols don’t talk about reordering the packets after receiving them all. This will ensure that they don’t appear in wrong order. If the long distance can be bounded, the protocols can be extended to support this feature. The maximum mis- ordering distance can be used to expand the sequence number modulus N.
  2. Not acknowledging every packet is also possible after the sending an ACK up on not receiving packets. For example, every 2nd packet is acknowledged in TCP.
  3. Informing the transmitter immediately about the presence of gap in the packet sequence is quite common and so HDLC uses a packet called REJ packet for this purpose.
  4. During the communication, the window sizes may change if their sum remains in the limit defined by N. usually the transmit window size is reduced for slowing down the transmission in order to keep with the speed of the links and preventing congestion or saturation. 


No comments:

Facebook activity