L5. Compare go-back-N vs selective repeat mechanisms. Which one is used in TCP? Flashcards

1
Q

What are GBN and SR?

A

Go-Back-N (GBN) and Selective Repeat (SR) are two common Automatic Repeat reQuest (ARQ) protocols used for reliable data transmission over networks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do GBN and SR differ?

A

They handle the retransmission of lost or corrupted packets differently.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is ARQ?

A

Automatic Repeat reQuest (ARQ) is an error-control method for data transmission that uses acknowledgements (messages sent by the receiver indicating that it has correctly received a message) and timeouts (specified periods of time allowed to elapse before an acknowledgment is to be received) to achieve reliable data transmission over an unreliable communication channel.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does GBN work?

A

GBN uses a sliding window protocol where the sender can send multiple frames before needing an acknowledgment for the first one, but the number of frames is limited by the window size.

The receiver sends a cumulative acknowledgment (ACK) for the last correctly received, in-order packet.

If a packet is lost or corrupted, the receiver discards all subsequent packets until the lost packet is retransmitted and correctly received. The sender must go back and retransmit the lost packet and all subsequent packets.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are advantages and disadvantages of GBN?

A

Advantages: simplicity, memory use.

GBN is simple to implement because it requires little buffering at the receiver end. The receiver only needs to store one acknowledgment and can discard out-of-order packets.

Disadvantages: inefficiency in high error rates, throughput.

If a packet is lost or corrupted, all subsequent packets are retransmitted, leading to potentially significant redundant transmissions. Throughput can be significantly reduced in case of packet loss, especially with large windows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How does SR work?

A

Similar to GBN, but both sender and receiver maintain a window of acceptable packets.

The receiver sends individual ACKs for each correctly received packet, even if they arrive out of order.

Only the lost or corrupted packets are retransmitted. The receiver stores out-of-order packets until the missing packet(s) are received, then reassembles the message in the correct order.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are advantages and disadvantages of SR?

A

Advantages: efficiency, better throughput.

SR is more efficient than GBN because only the erroneous packets are retransmitted. This results in higher throughput in networks with higher error rates due to selective retransmissions.

Disadvantages: complexity, memory use.

SR is more complex to implement because it requires more storage at the receiver for out-of-order packets and additional logic to manage the buffer and windows.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do ACKs work in GBN vs SR?

A

In GBN, the receiver sends a cumulative ACK for the last correctly received, in-order packet. In SR, an ACK is sent for each correctly received packet, even if it’s out of order.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How does retransmission work in GBN vs SR?

A

In GBN, if a packet is lost or corrupted, the receiver discards all subsequent packets until the lost packet is retransmitted and correctly received. The sender must go back and retransmit the lost packet and all subsequent packets.

In SR, only the lost or corrupted packets are retransmitted. The receiver stores out-of-order packets until the missing packet(s) are received, then reassembles the message in the correct order.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Does TCP use GBN or SR?

A

TCP uses a mechanism that is more similar to Selective Repeat, although it incorporates elements from both GBN and SR

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do ACKs work in TCP?

A

TCP traditionally uses cumulative acknowledgments like GBN. The acknowledgment number represents the next expected byte, which means all previous bytes have been received correctly.

TCP can also employ SACK, which allows the receiver to inform the sender about all segments that have been received successfully, thus enabling selective retransmission.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How does retransmission work in TCP?

A

If a packet is lost, TCP retransmits only that specific packet after a timeout, not the entire sequence, aligning more closely with the SR concept.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly