Open In App

Flow Control

Last Updated : 14 Oct, 2025
Comments
Improve
Suggest changes
53 Likes
Like
Report

Flow control is an important design issue in the Data Link Layer (DLL) of the OSI model. It is a technique that ensures proper management of data flow between a sender and receiver, especially when both operate at different speeds or processing powers.

  • Without flow control, a fast sender might overwhelm a slow receiver, causing data loss or inefficient communication.
  • It acts as a speed-matching mechanism that regulates the number of data frames a sender can transmit before waiting for acknowledgement from the receiver.
  • It helps in maintaining the balance between data transmission rate and the receiver’s processing and memory capacity.

Approaches to Flow Control

1. Feedback-Based Flow Control

In this approach, the receiver informs the sender about its ability to receive more data through explicit feedback. It helps the sender adjust its transmission rate based on real-time conditions.

  • Sender waits for acknowledgments or window size updates before sending more data.
  • Commonly used in TCP, allowing dynamic control based on network or receiver status.

Techniques in Computer Architecture

  • Ready-signal handshaking: Used in systems with different clock domains or between components with varying speeds. The receiver sends a "ready" signal to the sender, allowing data transfer only when the receiver is ready to accept it.
  • Credit-based flow control: In protocols like Fiber Channel, the receiver sends "credits" to the sender. Each credit represents an available buffer space. The sender can transmit a frame for each credit it holds, and the receiver replenishes credits as it processes frames. This is more efficient than a simple stop-and-wait mechanism.
client
Credit-based flow control

2. Rate-Based Flow Control

In this approach, the sender transmits data at a fixed or negotiated rate, without relying on feedback from the receiver. It assumes the receiver can handle the incoming data at the set pace.

  • Commonly used in streaming, multimedia, and hardware systems where real-time feedback is impractical.
  • Simple to implement and effective in predictable or time-sensitive environments.

Techniques in computer architecture

  • Leaky bucket algorithm: Enforces a constant output rate, regardless of how bursty the input traffic is.
  • Token bucket algorithm: Allows occasional bursts of data by generating tokens at a fixed rate. A packet can be sent only if it can “take” a token from the bucket, and a larger bucket size allows for bigger bursts.
  • Traffic shaping and policing: Used in networks to regulate packet flow according to a traffic profile. Traffic shaping smooths bursts by delaying packets, while policing drops packets that exceed the set rate.

1. Stop-and-Wait Flow Control

Stop-and-Wait is a simple feedback-based technique where the sender transmits one frame and waits for an acknowledgment before sending the next. If the acknowledgment is not received within a timeout period, the frame is retransmitted to ensure reliability.

  • Easy to implement and guarantees reliable data transmission.
  • Inefficient for high-latency or high-bandwidth networks due to underutilization of the link.

2. Sliding Window Flow Control

Sliding Window is a more efficient feedback-based technique that allows multiple frames to be sent before receiving acknowledgments. The sender keeps track of a “window” of unacknowledged frames, sliding it forward as acknowledgments arrive to send new frames continuously.

  • Improves bandwidth utilization by enabling pipelined transmission.
  • More complex to implement and requires additional memory for managing windows and buffers.
    Importance of Flow Control

The significance of flow control is multifaceted:

  • Prevents Data Loss: By avoiding buffer overflows at the receiving end.
  • Maximizes Throughput: Efficient flow control helps in optimizing network resource utilization without overwhelming any component.
  • Maintains System Stability: Especially in hardware datapaths, flow control ensures that no internal module stalls or crashes due to excessive data input.
  • Enhances Fairness: It ensures fair data transmission across multiple streams or connections, especially in shared environments like switches or routers.

Importance of Flow Control

The significance of flow control is multifaceted:

  • Prevents Data Loss: By avoiding buffer overflows at the receiving end.
  • Maximizes Throughput: Efficient flow control helps in optimizing network resource utilization without overwhelming any component.
  • Maintains System Stability: Especially in hardware datapaths, flow control ensures that no internal module stalls or crashes due to excessive data input.
  • Enhances Fairness: It ensures fair data transmission across multiple streams or connections, especially in shared environments like switches or routers.

Explore