Stop and Wait ARQ | Go back N | SR Protocol

Spread the love

Flow Control Protocols-

 

In computer networking, there are various flow control protocols-

 

 

Sliding Window Protocol-

 

  • Sliding window protocol allows the sender to send multiple frames before needing the acknowledgements.
  • It is more efficient.

 

Read More- Sliding Window Protocol

 

Implementations-

 

Various implementations of sliding window protocol are-

  1. Stop and Wait ARQ
  2. Go back N
  3. Selective Repeat

 

In this article, we will compare these sliding window protocols.

 

Comparison Table-

 

Stop and Wait ARQ Go back N Selective Repeat Remarks
Efficiency 1 / (1+2a) N / (1+2a) N / (1+2a) Go back N and Selective Repeat gives better efficiency than Stop and Wait ARQ.
Window Size Sender Window Size = 1

Receiver Window Size = 1

Sender Window Size = N

Receiver Window Size = 1

Sender Window Size = N

Receiver Window Size = N

Buffer requirement in Selective Repeat is very large.

If the system does not have lots of memory, then it is better to choose Go back N.

Minimum number of sequence numbers required 2 N+1 2 x N Selective Repeat requires large number of bits in sequence number field.
Retransmissions required if a packet is lost Only the lost packet is retransmitted The entire window is retransmitted Only the lost packet is retransmitted Selective Repeat is far better than Go back N in terms of retransmissions required.
Bandwidth Requirement Bandwidth requirement is Low Bandwidth requirement is high because even if a single packet is lost, entire window has to be retransmitted.

Thus, if error rate is high, it wastes a lot of bandwidth.

Bandwidth requirement is moderate Selective Repeat is better than Go back N in terms of bandwidth requirement.
CPU usage Low Moderate High due to searching and sorting required at sender and receiver side Go back N is better than Selective Repeat in terms of CPU usage.
Level of difficulty in Implementation Low Moderate Complex as it requires extra logic and sorting and searching Go back N is better than Selective Repeat in terms of implementation difficulty.
Acknowledgements Uses independent acknowledgement for each packet Uses cumulative acknowledgements (but may use independent acknowledgements as well) Uses independent acknowledgement for each packet Sending cumulative acknowledgements reduces the traffic in the network but if it is lost, then the ACKs for all the corresponding packets are lost.
Type of Transmission Half duplex Full duplex Full duplex Go back N and Selective Repeat are better in terms of channel usage.

 

Conclusions-

 

  • Go back N is more often used than other protocols.
  • SR protocol is less used because of its complexity.
  • Stop and Wait ARQ is less used because of its low efficiency.
  • Depending on the context and resources availability, Go back N or Selective Repeat is employed.
  • Selective Repeat and Stop and Wait ARQ are similar in terms of retransmissions.
  • Go back N and Selective Repeat are similar in terms of efficiency if sender window sizes are same.
  • SR protocol may be considered as a combination of advantages of Stop and Wait ARQ and Go back N.
  • SR protocol is superior to other protocols but because of its complexity, it is less used.

 

Important Notes-

 

Note-01:

 

Protocols at data link layer like HDLC (Low level protocols) use Go back N.

This is because-

  1. Bandwidth is high
  2. CPU is very busy doing routing job
  3. Error rate is low since out of order packets are not possible in wired medium

 

Note-02:

 

Protocols at transport layer like TCP (High level protocols) use selective repeat.

 

PRACTICE PROBLEMS BASED ON SLIDING WINDOW PROTOCOLS-

 

Problem-01:

 

If the bandwidth between the sender and receiver is sufficient, CPU and buffers are moderate, then which flow control protocol would you suggest to use?

 

Solution-

 

The suggested protocol would be Go back N.

 

Problem-02:

 

If the bandwidth between the sender and receiver is moderate, CPU and buffers are sufficient, then which flow control protocol would you suggest to use?

 

Solution-

 

The suggested protocol would be Selective Repeat.

 

To gain better understanding about sliding window protocols comparison,

Watch this Video Lecture

 

Next Article- Miscellaneous Problems On Flow Control Protocols

 

Get more notes and other study material of Computer Networks.

Watch video lectures by visiting our YouTube channel LearnVidFun.

Summary
Stop and Wait ARQ | Go back N | SR Protocol
Article Name
Stop and Wait ARQ | Go back N | SR Protocol
Description
Sliding window protocols are- Stop and Wait ARQ, Go back N & Selective Repeat. The comparison is performed. SR Protocol is superior to Go back N and Stop and Wait ARQ but because of its complexity, it is less used.
Author
Publisher Name
Gate Vidyalay
Publisher Logo

Spread the love