0% found this document useful (0 votes)
2 views

Lecture 5

The document discusses flow control techniques, specifically Stop and Wait and Sliding Window mechanisms, which aim to synchronize the sender's transmission pace with the receiver's capacity. It also covers error control methods, including Automatic Repeat Request (ARQ) protocols such as Stop-and-Wait, Go-back N, and Selective Repeat, focusing on how to handle lost or damaged frames. The document highlights the limitations of these techniques, particularly the low utilization of the channel in Stop-and-Wait ARQ.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lecture 5

The document discusses flow control techniques, specifically Stop and Wait and Sliding Window mechanisms, which aim to synchronize the sender's transmission pace with the receiver's capacity. It also covers error control methods, including Automatic Repeat Request (ARQ) protocols such as Stop-and-Wait, Go-back N, and Selective Repeat, focusing on how to handle lost or damaged frames. The document highlights the limitations of these techniques, particularly the low utilization of the channel in Stop-and-Wait ARQ.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Chap.

3: Error Detection, Flow Control,


and Error Control – Part 3

3. Flow control techniques


Goal: make the sender send at the pace of receiver.

3.1 Stop and Wait

• Sender transmits one frame.


• Receiver receives frame and replies with ACK.
• Sender waits for ACK before sending next frame.
• Destination can stop flow by not send ACK

A B

Message

OK

Message

OK

Drawback:
Very low utilization of the medium.
Sender refrains from sending until it gets the ACK.
(See next diagram)

1
3.2 Sliding Window Mechanism

• Fix the previous drawback and allow multiple frames to


be in transit
• Receiver has buffer for N frames (or packets or messages).
Can receive up to N frames.
• Each frame is numbered
• Sender can send up to N frames without ACK
• ACK indicates the number of next frame expected
• Sequence number bounded by size of field (k). Frames are
numbered modulo 2k

Relation between N and K ? à N = 2k –1 in general,


but 2k –1 could be higher than N …
In other words, N is less or equal to 2k –1

In the sliding window mechanism, at any instant of time, the


sender maintains a list of consecutive sequence numbers
corresponding to frames it is permitted to send. These frames fall
within the sending window. Similarly, the receiver maintains a
window corresponding to frames it is permitted to accept.

The sending window and the receiving window do not need to be


of the same size.

2
3
Each ACK or RR (Receive Ready) acknowledges reception of
frames and gives permission (to Sender) to send more.

Sometimes, Receiver can acknowledge frames without permitting


further transmission (RNR or Receive Not Ready) … Receiver
may be getting overwhelmed and asks the sender not to sender
anymore until further notice.

4
4. Error Control
Error Control deals with

• Detection of errors
• Lost frames and Damaged frames
• Automatic repeat request (ARQ)
o Positive acknowledgment
o Retransmission after timeout
o Negative acknowledgment and retransmission

ARQ : When to ACKnowledge what? When to REJect what?


When to retransmit what?

The sender is sending frames to the receiver.


Receiver can receive up to N frames.
Each frame contains a sequence number, ranging from 0 to N.

We will consider three ARQ protocols:

1. Stop-and-Wait
2. Go-back N
3. Selective Repeat (or reject)

5
4.1 Stop-and-Wait ARQ

For Stop-and-Wait, N = 1
The sender windows size is 1
The receiver window size is 1

à restricting the sequence number to 0 and 1


k = 1 and N = 21 – 1 = 1

6
Drawback
Again, channel utilization is very low.
The sender is idle most of the time waiting for ACKs.

4.2 Go-back N ARQ

A may send a series of frames to B determined by window size N


(e.g., 2k - 1), using the sliding window flow control technique.

So far, we have used


• RR : stands for ACK and willingness to receive more
• RNR: stands for ACK and unwillingness to receive more

We now will introduce REJ that stands for a negative ACK.

What can be damaged or lost?

7
The Go-back-N technique can be described as follows:

Frames need to be received in the right order of their sequence


numbers.

1. Damaged/lost frame: There are 3 cases:

(a) A transmit frame I. B detects an error and has previously


successfully received frame (I – 1). B sends a REJ I,
indicating that frame I is rejected. When A receives this REJ
I, it must retransmit frame I and all subsequent frames that it
may have transmitted.

(b) Frame I is lost in transit. A subsequently sends frame I+1.


B receives frame I+1 out of order (without receiving I
previously); B sends a REJ I. A has to proceed accordingly.

(c) Frame I is lost in transit and A is not sending additional


frames. B receives nothing and returns neither a RR or a
REJ. A will time out and retransmit frame I.

2. Damaged ACKs. There are two cases:

(a) B receives frame I and sends RR I+1, which is lost in


transit. Since RRs (ACKs) are cumulative (e.g. RR 4
means that all frames through 3 are acknowledged),
it may be that A will receive a subsequent RR to a
subsequent frame that will replace the lost RR before
the associated timer expires.

(b) If A 's timer expires, A retransmits frame I and all


subsequent frames.

3. Damaged/lost REJ, A will eventually time out on the associated


frame and retransmit that frame and all subsequent frames.

8
Let us consider the example below with k = 3 and N = 7.

9
More examples developed in class ….

Window Size requirement:

When number frames with k bits,

The maximum window size for Go-Back-N is 2k – 1.

Why ? (Try to answer the question ….)

k = 3 and N should not exceed 7

Let’s try N = 8 …

10

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy