Flow control is a
technique that a transmitting entity does not conquer a receiving entity with
data. Two fundamental mechanisms are acknowledgement and timeouts.
Ø
After
getting each frame the receiver will send ACK to sender.
Ø
If
the sender does not receive ACK up to reasonable amount of time then it
retransmit the original frame waiting for reasonable amount of time is called
timeout.
The two flow control mechanisms
are
Ø
Stop
and wait Flow Control
Ø
Sliding
Window Flow Control
Stop
and Wait Algorithm
Ø
After
transmitting one frame, the sender waits for an acknowledgment before
transmitting the next frame.
Ø
If the acknowledgment does not arrive after a
certain period of time, the sender times out and retransmit the original frame.
a) The ACK is received before
the timer expires
b) The original frame is lost
c) The ACK is lost
d)The timeout fires too
soon
Fig: illustrates four different
scenarios that result from this basic algorithm. The sending side is
represented on the left, the receiving side is depicted on the right, and time
flows from top to bottom.
Ø
In
Fig (a) ACK is received before the timer expires, (b) and (c) show the
situation in which the original frame and the ACK, respectively, are lost, and
(d) shows the situation in which the timeout fires too soon..
Ø
Suppose
the sender sends a frame and the receiver acknowledges it, but the
acknowledgment is either lost or delayed in arriving. This situation is in (c)
and (d). In both cases, the sender times out and retransmit the original frame,
but the receiver will think that it is the next frame, since it correctly
received and acknowledged the first frame.
Ø
This
makes the receiver to receive the duplicate copies. To avoid this two sequence
numbers (0 and 1) must be used alternatively.
Ø
The
main drawback of the stop-and-wait algorithm is that it allows the sender have
only one outstanding frame on the link at a time.





