Characters are defined or represented by binary character codes for the purpose c
digital data transfer. Alphanumeric (printable characters) and formatting character
(tabs, carriage returns, line feeds etc.) determine how actual messages appear on the
terminal screen or printed page. Data link characters are used to establish the
beginning and the end of messages, set attributes applied to the message, acknowledge
ments of transmissions, error responses, and station identification.
Data link layer is concerned with the transfer of digital data over a link. The link
can be either a point-to-point physical circuit (twisted-pair wire, coaxial cable or optical
fibre), or a radio-based channel such as a satellite link or a physical or logical link
through a switched network.
For effective digital data communication much more is needed to control an
manage the exchange. Communication requires at least two devices working together
one to send, and one to receive. Even such a basic arrangement requires a great deal
of coordination for an intelligible exchange to occur. This chapter discusses two
important functions necessary to establish and maintain effective communication;
error control and flow control. Error control defines how a station checks frames for
errors and what it does if it finds errors. Flow control defines the way in which man
frames are sent and tracked and how the stations do error control.
In general, protocol is a set of rules that governs the operation of functional unit
to achieve communication. The type of protocol used to establish a link between two
stations in accordance with the second layer of OSI model is known as data-link protocol
Data-link protocols can be divided into two subgroups: asynchronous protocols an
synchronous protocols.
Asynchronous protocols treat each character in a bit stream independently. Synch
ronous protocols take the whole bit stream and chop it into characters of equal size
FLOW CONTROL
Flow control is the technique which implies on the data link layer that tells the sender
how much data it can transmit before it must wait for an acknowledgement from the receiver. Any receiving device has a limited speed at which it can process incoming data and a limited amount of memory in which to store incoming data. So the sending station must not send frames at a rate faster than the receiving station can absorb them.
Two techniques have been developed to control the flow of data across communication links: stop-and-wait flow control and sliding window flow control.
Stop-and-Wait Flow Control
The simplest form of flow control, known as stop-and-wait flow control, works as follows:
The sender waits for an acknowledgement from the receiver after every frame, which is transmitted by the source. It indicates the willingness of the receiver to accept another frame by sending back an acknowledgement to the sender. The source must wait until it receives the acknowledgement before sending the next frame. The destination can thus stop the flow of data simply by withholding acknowledgement.

The advantage of stop-and-wait is simplicity: each frame is checked and acknowledged before the next frame is sent. The disadvantage is inefficiency: stop-and-wait is slow. Each frame must travel all the way to the receiver and an acknowledgement must travel all the way back before the next frame can be sent.
Sliding Window Flow Control
In the previous case, only one frame at a time can be in transit and the sender waits for an acknowledgement from the receiver after every frame.In sliding window, multiple frames can be in transit at a time. Efficiency of flow can be greatly improved by allowing multiple frames.
Suppose two Stations A and B are connected via a full-duplex link. Station B allocates buffer space for F frames. Thus, Station B can accept F frames, and Station A is allowed to send F frames without waiting for any acknowledgement. To keep track of which frames have been acknowledged, each is labeled with a sequence number. Station B acknowledges a frame by sending an acknowledgement that includes the sequence number of the next frame expected. This acknowledgement also implicitly announces that Station B is prepared to receive the next F frames, beginning with the number specified. This scheme can also be used to acknowledge multiple frames.
For example, B could receive Frames 2, 3 and 4 but withhold acknowledgement until Frame 4 has arrived; by then, returning an acknowledgement with sequence number 5. Station B acknowledges Frames 2, 3 and 4 at one time. Station A maintains
a list of sequence numbers that it is allowed to send, and Station B maintains a list of sequence numbers that it is prepared to receive. Each of these lists can be thought of as a window of frames. The operation is referred to as sliding window flow control.
The frames are numbered modulo-n, which means they are numbered from 0 to n - 1. For example, if n = S, the frames are numbered 0, l; 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, ... . Figure 5.2 illustrates sender sliding window. The size of the window is n - 1 (in this case 7).

The sliding window of the sender shrinks from the left when frames of data are sent. The sliding window of the sender expands to the right when acknowledgements are received. The sliding window of the receiver shrinks from the left when frames of data are received. The sliding window of the receiver expands to the right when acknowledgements are sent.
Figure shows a sample transmission that uses sliding window flow control with a window of seven frames. In this example, all frames arrive undamaged. There are two steps as given below for implementation.


Step 1: When data 0 and data 1 are sent by the sender, sliding window of the sender shrank from the left. The receiver received the data 0 and data 1 and then the sliding window of the receiver shrank from the left.
Step 2: When acknowledgement is sent by the receiver for data 0 and data l, the sliding window of the receiver is expanded to the right. The sender received the acknowledgement for data 0 and data 1 and then the sliding window of the sender extended from the right.
Similarly, we repeat Step 1 and Step 2 for transmitting data 2 from the sender to we receiver and transmitting acknowledgement from the receiver to the sender. Again e will repeat the same process for data 3, data 4 and data 5 as well as for acknowledgement 6.
BACK |