FLOW CONTROL PROTOCOLS

Flow Control

Theory

Flow Control is a set of procedures for the Data Link Layer that controls the flow of data between the sender and the receiver. It allows two stations working at different speeds to communicate with each other. It is a set of measures taken to regulate the data that the Sender sends to receiver , so that no problem is faced if the Sender sends data at higher rate and receiver is too slow to support that data rate.To solve the above problem , FLOW CONTROL is introduced in Data Link Layer. It tells the sender how much data should be sent to the receiver so that the data is not lost.The main concept of Flow Control is to introduce EFFICIENCY in Computer Networks.To help in it , the three protocols designed are :-

  • Stop-and-Wait Protocol
  • Go Back N Protocol (Under Sliding Window Protocol)
  • Selective Repeat Protocol (Under Sliding Window Protocol)

Stop and Wait

It is a special case of the general sliding window protocol with transmit and receive window sizes equal to one in both cases. This protocol involves the following transitions −

  • The sender sends one frame at a time and waits for the acknowledgment.
  • Once the receiver receives a valid frame, it sends an acknowledgment frame back to the sender.
  • On receiving the acknowledgment frame, the sender understands that the receiver is ready to accept the next frame. So it sender the next frame in queue.
  • If the ACK does not reach the sender before a certain time, known as the timeout, the sender sends the same frame again.The timeout countdown is reset after each frame transmission.

Go Back N Protocol

It is a specific instance of the automatic repeat request (ARQ) protocol. The sender sends a specific number of frames called “Window Size”.For the given window size, the sending procedure continues without receiving an acknowledgement .It can transmit N frames to peers before requiring an acknowledgement(ACK).The transmit window size in N and the receive window size is 1. This protocol involves the following transitions −

  • A sender sends multiple frames as allowed by the window size.
  • Receiver sends ACK for every valid frame received.
  • Once the sender receives the acknowledgement of one frame, the next frame in the queue is sent.
  • If the ACK does not reach the sender before a certain time, known as the timeout, the sender sends N frames, from the frame for which the acknowledgement is lost. The timeout countdown is reset after each frame transmission.

Selective Repeat Protocol

Selective Repeat is part of the automatic repeat request (ARQ). With selective repeat, the sender sends a number of frames specified by a window size even without the need to wait for individual ACK from the receiver as in Go-Back-N ARQ. The receiver accepts out-of-order frames and buffers them. The sender individually retransmits frames that have timed out. This protocol involves the following transitions −

  • A sender can send multiple frames as allowed by the window size.
  • The receiver sends the acknowledgement for each frame.
  • If the acknowledgement for a particular frame is not received, then the sender resends that frame again without disturbing the flow of others.
  • The receiver side, if the frame received is corrupted, then the receiver can send a negative acknowledgement.
  • When negative acknowledgement is received by the sender, then that particular frame is re-sent similarly.