CSC263 Computer Networks

Computer NetworksTU Board 2078

What is flow control? Explain Stop and Wait ARQ with suitable example. How is it different from G Back N ARQ?

10

Answer

Flow control is a data link layer technique that stops a fast sender from overwhelming a slow receiver. The sender may only send as much data as the receiver can accept, and waits for acknowledgements (ACKs) before sending more.

ARQ (Automatic Repeat reQuest) adds error control: frames that are lost or damaged are sent again automatically.

Stop-and-Wait ARQ

  1. The sender sends one frame and keeps a copy of it. It starts a timer.
  2. It waits for an ACK before sending the next frame.
  3. The receiver sends an ACK when the frame arrives correctly. A damaged frame is discarded without an ACK.
  4. If the timer expires before the ACK arrives, the sender retransmits the frame.
  5. Frames and ACKs are numbered 0 and 1 (a 1-bit sequence number) so the receiver can spot a duplicate frame when an ACK was lost.

Example: the sender sends Frame 0 and receives ACK 1, then sends Frame 1. Frame 1 is lost, so the timer expires and Frame 1 is sent again. ACK 0 arrives, and the sender sends the next Frame 0.

It is simple, but the link is idle while the sender waits, so efficiency is poor on long or fast links.

Stop-and-Wait vs Go-Back-N ARQ

Stop-and-Wait ARQ Go-Back-N ARQ
Sends one frame and waits for its ACK. Sends up to N frames (a window) before waiting.
Sender window size = 1. Sender window size up to 2ᵐ − 1 (m = sequence bits).
Sequence numbers 0 and 1. Sequence numbers 0 to 2ᵐ − 1.
On error, only the one frame is resent. On error, the lost frame and all frames after it are resent.
Low link utilisation. Much better utilisation (pipelining).
Very simple; no buffering. Needs a sender buffer; the receiver accepts frames only in order.

Discussion

Loading…

More Computer Networks questions

All Computer Networks old questions