Handbook of Computer Science(cs) and IT

Flow Control

One important aspect of data link layer is flow control. Flow control refers to a set of procedures used to restrict the amount of data the sender can send before waiting for acknowledgement.

 

 

Stop and Wait

In this method, the sender waits for an acknowledgement after every frame
it sends. Only when a acknowledgment has been received is the next frame

sent. This process continues until the sender transmits an End of Transmission (EOT) frame.

  • We can have two ways to manage data transmission, when a fast sender

wants to transmit data to a low speed receiver.

  • The receiver sends information back to sender giving it permission to

send more data i.e., feedback or acknowledgment based flow control.

 

  • Limit the rate at which senders may transmit data without using feedback

from receiver i.e., Rate based-flow control.

 

Advantages of Stop and Wait

It’s simple and each frame is checked and acknowledged well, Disadvantages of Stop and Wait

  • It is inefficient, if the distance between devices is long.
  • The time spent for waiting ACKs between each frame can add significant amount to the total transmission time.

Sliding Window

In this method, the sender can transmit several frames before needing an acknowledgement. The sliding window refers imaginary boxes at both the sender and the receiver. This window can hold frames at either end and provides the upper limit on the number of frames that can be transmitted before requiring an acknowledgement.

Key Points…………………………………………………………………………………………………

  • The frames in the window are numbered modulo-n, which means they are numbered from 0 to n – 1. For example, if n = 8, the frames are numbered 0,1, 2, 3, 4, 5, 6, 7, 0,1, 2, 3, 4, 5, 6, 7, 0,1.. _ so on. The size of the window is (n -1) in this case size of window = 7.
  • In other words, the window can’t cover the whole module (8 frames) it covers one frame less that is 7.

 

 

When the receiver sends an ACK, it includes the number  of  next frame it expect   to receive. When the receiver sends an ACK containing the number 5 , it means all frames upto number 4 have been received.

 

 

 

 

 

 

 

 

 

 

 

 

Key Points

  • As each ACK  is sent  out , the receiving window expands to include as many acknowledged frames. The window expands to new placeholders as newly acknowledged frame. The winow expands to include.
  • A number of new frame spaces = The number of most recently acknowledged frame – The number of previously acknowledged frame e.g., In a seven frame window.
  • if the prior ACK was for frame 2 and the current ACK is for frame The window expands by three (5 — 2). If the prior ACK was for frame 3 and the

current  ACK is for frame 1, the window expands by six (1 + 8 — 3).

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95

Leave a Reply

Your email address will not be published. Required fields are marked *