15 Feb 2020

  • February 15, 2020
  • Amitraj
Data Link Controls


-> Data Link Control is the service provided by the Data Link Layer to provide reliable data transfer over the physical medium.

-> Data-link layer is responsible for implementation of point-to-point flow and error control mechanism.

-> The Data link layer provides the coordination among the devices so that no collision occurs.



Flow Control


-> It is a set of procedures that tells the sender how much data it can transmit before the data overwhelms the receiver.

-> The receiving device has limited speed and limited memory to store the data. Therefore, the receiving device must be able to inform the sending device to stop the transmission temporarily before the limits are reached.

-> It requires a buffer, a block of memory for storing the information until they are processed.


Two types of mechanisms have been developed to control the flow of data -


1. Stop-and-wait

2. Sliding window




1. Stop-and-wait -

-> In the Stop-and-wait method, the sender waits for an acknowledgement after every frame it sends.

-> When acknowledgement is received, then only next frame is sent. The process of alternately sending and waiting of a frame continues until the sender transmits the EOT (End of transmission) frame.




Advantage of Stop-and-wait

The Stop-and-wait method is simple as each frame is checked and acknowledged before the next frame is sent.


Disadvantage of Stop-and-wait


Stop-and-wait technique is inefficient to use as each frame must travel across all the way to the receiver, and an acknowledgement travels all the way before the next frame is sent. Each frame sent and received uses the entire time needed to traverse the link.




2. Sliding Window -

-> The Sliding Window is a method of flow control in which a sender can transmit the several frames before getting an acknowledgement.

-> In Sliding Window Control, multiple frames can be sent one after the another due to which capacity of the communication channel can be utilized efficiently.

-> A single ACK acknowledge multiple frames.

-> Sliding Window refers to imaginary boxes at both the sender and receiver end.

-> The window has a specific size in which they are numbered as modulo-n means that they are numbered from 0 to n-1. For example, if n = 8, the frames are numbered from 0,1,2,3,4,5,6,7,0,1,2,3,4,5,6,7,0,1........


-> The size of the window is represented as n-1. Therefore, maximum n-1 frames can be sent before acknowledgement.





Sender Window

-> At the beginning of a transmission, the sender window contains n-1 frames, and when they are sent out, the left boundary moves inward shrinking the size of the window.

-> For example, the size of the window is 7, and if frames 0 through 4 have been sent out and no acknowledgement has arrived, then the sender window contains only two frames, i.e., 5 and 6. Now, if ACK has arrived with a number 4 which means that 0 through 3 frames have arrived undamaged and the sender window is expanded to include the next four frames. Therefore, the sender window contains six frames (5,6,7,0,1,2).


Receiver Window

-> At the beginning of transmission, the receiver window does not contain n frames, but it contains n-1 spaces for frames.

-> When the new frame arrives, the size of the window shrinks.

-> Suppose the size of the window is 7 means that the receiver window contains seven spaces for seven frames. If the one frame is received, then the receiver window shrinks and moving the boundary from 0 to 1. In this way, window shrinks one by one, so window now contains the six spaces. If frames from 0 through 4 have sent, then the window contains two spaces before an acknowledgement is sent.





Translate

Popular Posts