2076 3

CSC263 ยท 2076 ยท 10 marks

Define flow control. Explain Go-Back-N ARQ with suitable example. How is it different from Stop-and-Wait ARQ?

Define flow control. Explain Go-Back-N ARQ with suitable example. How is it different from Stop-and-Wait ARQ?[10]

Computer NetworksChapter 3: Data Link LayerFraming and Flow Control Mechanisms

Quick answer

Flow control is a set of procedures that tells the sender how much data or how many frames it can transmit before it must wait for an acknowledgement from the receiver. It is a technique that allows two stations working and processing at different speeds to communicate with each other without data loss or corruption.

Flow Control and Go-Back-N ARQ


1. Definition of Flow Control (2 marks)

: "Flow control is basically a technique that gives permission to two stations that are working and processing at different speeds to just communicate with another. It is a set of procedures that explains how much data or frames it can transfer before data overwhelms the receiver."

Why it is needed:

  • The sender may be faster than the receiver.
  • Without flow control, the receiver's buffer can overflow, causing frames to be lost or corrupted.
  • It ensures smooth, reliable, and orderly data transmission between sender and receiver.

2. Go-Back-N ARQ (5 marks)

2.1 Concept

Go-Back-N ARQ (Automatic Repeat reQuest) is a sliding window protocol used for error control and flow control at the data link layer. Key characteristics are:

  • The sender can transmit multiple frames before receiving an acknowledgement, up to a maximum window size of 2^n - 1 frames (where n is the number of bits in the sequence number field).
  • The receiver accepts frames only in order. If a frame is received out of order or is corrupted, it is discarded.
  • If an error is detected in frame i, the receiver discards frame i and all subsequent frames already received. The sender must go back and retransmit frame i and all frames that followed it.
  • The receiver sends a Negative Acknowledgement (NAK) for the erroneous frame, or the sender uses a timeout mechanism.

2.2 Window Size

ParameterValue
Sequence number bitsn
Sender window size2^n - 1
Receiver window size1 (only one frame accepted at a time)

2.3 Working Mechanism

Step-by-step process:

  1. Sender transmits frames 0, 1, 2, 3, ... up to the window size without waiting for individual ACKs.
  2. Receiver checks each incoming frame for errors.
  3. If a frame is received correctly and in order, the receiver sends ACK (next expected frame number).
  4. If a frame is corrupted or lost, the receiver sends a NAK or simply discards it.
  5. The sender, upon receiving NAK or on timeout, retransmits the erroneous frame and all frames sent after it.

2.4 Example

Assume:

  • Sequence number bits = 3, so sequence numbers = 0, 1, 2, 3, 4, 5, 6, 7
  • Window size = 2^3 - 1 = 7 frames
  • Frames 0 through 6 are to be sent
Sender                              Receiver
  |--- Frame 0 ------------------>  |  ACK 1
  |--- Frame 1 ------------------>  |  ACK 2
  |--- Frame 2 ------------------>  |  ACK 3
  |--- Frame 3 (LOST/ERROR) ---X    |
  |--- Frame 4 ------------------>  |  (Discarded - out of order)
  |--- Frame 5 ------------------>  |  (Discarded - out of order)
  |--- Frame 6 ------------------>  |  (Discarded - out of order)
  |<-- NAK 3 (or Timeout) --------|
  |--- Frame 3 (Retransmit) ----->  |  ACK 4
  |--- Frame 4 (Retransmit) ----->  |  ACK 5
  |--- Frame 5 (Retransmit) ----->  |  ACK 6
  |--- Frame 6 (Retransmit) ----->  |  ACK 7

Explanation of the example:

  • Frames 0, 1, 2 are received correctly and acknowledged.
  • Frame 3 is lost in transmission.
  • Frames 4, 5, 6 arrive at the receiver but are discarded because the receiver is waiting for Frame 3 (receiver window size = 1, strictly in-order).
  • The sender receives NAK 3 (or the timer expires), and it goes back to Frame 3 and retransmits Frames 3, 4, 5, and 6.

2.5 Efficiency of Go-Back-N

  • If no error: Efficiency = W / (1 + 2a) where W = window size, a = propagation delay / transmission time
  • If error occurs: Efficiency is reduced because multiple frames are retransmitted unnecessarily.

3. Difference Between Go-Back-N ARQ and Stop-and-Wait ARQ (3 marks)

FeatureStop-and-Wait ARQGo-Back-N ARQ
WorkingSender sends one frame and waits for ACK before sending the nextSender sends multiple frames (up to window size) without waiting for individual ACKs
Window SizeSender window = 1, Receiver window = 1Sender window = 2^n - 1, Receiver window = 1
EfficiencyVery low -- channel is idle while waiting for ACKHigher than Stop-and-Wait as multiple frames are in transit
Retransmission on ErrorOnly the single erroneous frame is retransmittedThe erroneous frame and all subsequent frames are retransmitted
ComplexitySimple to implementMore complex than Stop-and-Wait
Sequence NumbersMinimum 2 sequence numbers (0 and 1)Minimum 2^n - 1 sequence numbers
Bandwidth UtilizationPoor -- wastes bandwidth during waitGood, the channel stays filled while acknowledgements travel back
DelayOne full round trip per frameOne round trip amortised over a whole window of frames
Buffers neededOne at each endUp to 2^n - 1 at the sender, one at the receiver
Best suited forShort links or very low error rates where simplicity mattersLong or high bandwidth links, where keeping the pipe full matters

Stop-and-Wait is in fact the special case of Go-Back-N with a sender window of one, which is why both use the same acknowledgement and timeout machinery and differ only in how many frames may be outstanding at once.


4. Conclusion

Flow control is the set of procedures that stops a fast sender from overwhelming a slow receiver by limiting how much unacknowledged data may be in transit, and when it is combined with error control through acknowledgements, timers and retransmission the result is an ARQ protocol. Stop-and-Wait ARQ allows a single outstanding frame, which makes it simple but leaves the channel idle for a whole round trip after every frame. Go-Back-N raises the sender window to 2^n - 1 frames while keeping the receiver window at one, so the channel stays busy, at the price of retransmitting the lost frame together with every frame that followed it. Where that penalty is too high, Selective Repeat ARQ enlarges the receiver window as well and retransmits only the damaged frame, at the cost of buffering and reordering at the receiver.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.