Flow Control
Flow control coordinates the amount of data that can be sent before receiving an acknowledgment and is one of the most important duties of the data link layer. In most protocols,
flow control is a set of procedures that tells the sender how much data it can transmit
before it must wait for an acknowledgment from the receiver
Error Control.
Error control is both error detection and error correction. It allows the receiver to inform the sender of any frames lost or damaged in transmission and coordinates the re-transmission of those frames by the sender.In the data link layer, the term error control refers primarily to methods of error detection and re-transmission
Flow Control
Stop-and-wait Protocol-
If data frames arrive at the receiver site faster than they can be processed, the frames must be stored until their use. Normally, the receiver does not have enough storage space, especially if it is receiving data from many sources. This may result in either the discarding of frames or denial of service. To prevent the receiver from becoming over-whelmed with frames,we somehow need to tell the sender to slow down. There must be feedback from the receiver to the sender
It is still very simple. The sender sends one frame and waits for feedback from
the receiver. When the ACK arrives, the sender sends the next frame
It is Stop-and-Wait Protocol because the sender sends one frame, stops until it
receives confirmation from the receiver (okay to go ahead), and then sends
the next frame. We still have unidirectional communication for data frames,
but auxiliary ACK frames (simple tokens of acknowledgment) travel from the
other direction.
Stop-and-Wait Automatic Repeat RequestTo detect and correct corrupted frames, we need to add redundancy bits to our data frame. When the frame arrives at the receiver site, it is checked and if it is corrupted, it is silently discarded. The detection of errors in this protocol is manifested by the silence of the receiver. Lost frames are more difficult to handle than corrupted ones. In our previous protocols, there was no way to identify a frame. The received frame could be the correct one, or a duplicate, or a frame out of order. The solution is to number the frames. When the receiver receives a data frame that is out of order, this means that frames were either lost or duplicated
The lost frames need to be resent in this protocol. If the receiver does not respond when there is an error, how can the sender know which frame to resend? To remedy this problem, the sender keeps a copy of the sent frame. At the same time, it starts a timer. If the timer expires and there is no ACK for the sent frame, the frame is resent, the copy is held, and the timer is restarted. Since the protocol uses the stop-and-wait mechanism, there is only one specific frame that needs an ACK Error correction in Stop-and-Wait ARQ is done by keeping a copy of the sent frame and re-transmitting of the frame when the timer expires
In Stop-and-Wait ARQ, we use sequence numbers to number the frames. The sequence numbers are based on modulo-2 arithmetic. In Stop-and-Wait ARQ, the acknowledgement number always announces in modulo-2 arithmetic the sequence number of the next frame expected.
Comments
Post a Comment