![]() ![]() ![]() |
||||||||
|
Stop & Wait Flow Control |
||||||||
|
Stop-and-wait flow control is the simplest form of flow control. What it needs is source and receiver. A source entity will get a packet from the network layer. Then it add frame header, send the frame to the physical. The receiver (destination) entity will get a frame from the physical layer and strip the header. Then pass the packet to the network layer. The receiver indicates its willingness to accept another frame by sending back an acknowledgement to the frame just received. The source must wait until it receives the acknowledgement before sending the next frame. The receiver can thus stop the flow of data by simply withholding acknowledgement. This procedure works fine and indeed, can hardly be improve upon when a message is sent in a few large frames. However, it is often the case that a source will break up a large block of data into smaller blocks and transmit the data in many frames. This is done for the following reasons: · The buffer size of the receiver maybe limited. · The longer the transmission, the more likely that there will be an error, necessitating retransmission of the entire frame. With smaller frames, errors are detected sooner, and a smaller amount of data needs to be retransmitted. · On
a shared medium, such as a LAN, it is usually desirable not to permit
one station to occupy the medium for an extended period, as this
causes long delays at the other sending station. With
the use of multiple frames for a single message, the stop-and-wait
procedure may be inadequate. The essence of the problem is that
only one frame at a time can be in transit. In situation where the
bit length of the link is greater than the frame length, serious
inefficiencies result. The transmission time (the time it takes
for a station to transmit a frame) is normalized to one, and the
propagation delay (the time it takes for a bit to travel from sender
to receiver) is expressed as the variable a. In other words,
when a is less then 1 (a <1), the propagation time
is less than the transmission time. In this case, the frame is sufficiently
long that the first bits of the frame have arrived at the destination
before the source has completed the transmission of the frame. When
a is greater than 1 (a >1), the propagation time
is greater than then transmission time. In this case, the sender
completes transmission of the entire frame before the leading bits
of that frame arrive at the receiver. Put another way, larger values
of a are consistent with higher data rates and/or longer
distances between stations. Both parts of the figure (a and b) consist of a sequence of snapshots of the transmission process over time. In both cases, the first four snapshots show the process of transmitting a frame containing data, and the last snapshot shows the return of a small acknowledgement frame. Note that for a > 1, the line is always underutilized, and, even for a <1,the line is inefficiently utilized. In essence, for very high data rates, or for very long distances between sender and receiver, stop-and-wait flow control provides inefficient line utilization.
(a)
a > 1
(b)
a < 1 FIGURE 7: Stop-and-wait link utilization (transmission time = 1; propagation time = a) Although
stop-and-wait flow control is the simplest form of flow control,
it also has its disadvantages. The problems of the stop-and-wait
flow control are loss of a data or acknowledgement frame, and duplicated
frames. Since the transmission link is not error-free, a data or
acknowledgement frame may be lost, causing the sender to wait indefinitely
for an acknowledgement. The solution is the sender uses a timer
to retransmit data frames when an acknowledgement has not arrived.
For the duplicated frames, if the acknowledgement frame for a certain
is lost, the sender will retransmit the same frame after a time-out
period, and the receiver will then have two copies of the same frame.
The solution is the sender includes a sequence number in each frame
to distinguish one frame from another. This way, the receiver knows
when it has received duplicate frames. Stop-and-wait is an effective form of flow control, but it is not very efficient. The reasons are only one data frames can be in transit on the link at a time. Moreover, when waiting for an acknowledgement, the sender cannot transmit any frames. The better solution is using the sliding window. |
||||||||