Guaranteed delivery

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Guaranteed delivery

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. What does guaranteed delivery promise about the packets of a message?
A Every packet arrives as fast as possible, even if some are lost
B Every packet is confirmed as received, so no data is lost
2. How does the sender find out that a packet arrived safely?
A The sender assumes it arrived if no error message appears
B The receiver sends back an acknowledgement (ACK)
3. A packet goes missing and no acknowledgement arrives. What happens under guaranteed delivery?
A The sender resends the packet
B The receiver skips it and carries on without it
4. Which cost comes with guaranteed delivery?
A Extra delay from waiting for acknowledgements and resending packets
B Packets are shortened so some data is removed
5. Which situation needs guaranteed delivery most?
A Downloading a assignment file where every byte must be correct
B Watching a live video call where a late frame is not worth waiting for

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1ACK 1042 Aif no ACK before timeout: resend(packet)
2resend(packet 7) BThe receiver confirms that packet 1042 arrived safely, so the sender can move on
3Guaranteed delivery: the sender waits for an acknowledgement and resends the packet if none arrives in time CA received ACK means the packet arrived safely, so it should not be resent. Resending should happen when NO ACK arrives.
4The cost of guaranteed delivery is extra delay, because the sender must wait for confirmations and resend packets DThe sender sends packet 7 again because it was lost or damaged on the way
5if ACK received: resend(packet) EtotalTime = sendTime + waitForACK + resendTime
6Guaranteed delivery = fastest possible transfer, no waiting FGuaranteed delivery is not faster. Waiting for acknowledgements and resending packets adds extra delay.

Definitions

guaranteed delivery

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
SEND packet WAIT FOR ___ IF ackReceived THEN SEND nextPacket
2.
IF ___ ackReceived THEN RESEND packet ENDIF
3.
IF timer > timeout THEN ______ packet ENDIF
4.
_____ ackReceived = FALSE SEND packet ENDWHILE
5.
resends = 3 extraDelay = resends _ roundTrip

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A SEND packet 1
B SKIP waiting for ACK
C IF ACK received THEN
D SEND packet 2
E ENDIF
Question 2
A SEND packet 5 then forget it
B WAIT for ACK up to 2 secs
C IF no ACK THEN
D RESEND packet 5
E ENDIF
Question 3
A acked ← TRUE
B WHILE acked = FALSE
C SEND packet 3
D acked ← ACK received
E ENDWHILE
Question 4
A RECEIVE packet 4
B CHECK checksum
C IF checksum differs THEN
D SEND ACK 4
E ELSE SEND resend request
Question 5
A SEND packets 1 to 3
B RECEIVE ACK 1, 2 and 3
C ACK 2 is missing
D RESEND packet 2

Answer Key

Guaranteed delivery
Section A: Quick Questions
Q1
B — Every packet is confirmed as received, so no data is lost
Q2
B — The receiver sends back an acknowledgement (ACK)
Q3
A — The sender resends the packet
Q4
A — Extra delay from waiting for acknowledgements and resending packets
Q5
A — Downloading a assignment file where every byte must be correct
Section B: Match the Pairs
Q1
ACK 1042 → The receiver confirms that packet 1042 arrived safely, so the sender can move on
Q2
resend(packet 7) → The sender sends packet 7 again because it was lost or damaged on the way
Q3
Guaranteed delivery: the sender waits for an acknowledgement and resends the packet if none arrives in time → if no ACK before timeout: resend(packet)
Q4
The cost of guaranteed delivery is extra delay, because the sender must wait for confirmations and resend packets → totalTime = sendTime + waitForACK + resendTime
Q5
if ACK received: resend(packet) → A received ACK means the packet arrived safely, so it should not be resent. Resending should happen when NO ACK arrives.
Q6
Guaranteed delivery = fastest possible transfer, no waiting → Guaranteed delivery is not faster. Waiting for acknowledgements and resending packets adds extra delay.
Section C: Definitions
Q1
guaranteed delivery — Every packet is confirmed as received (acknowledged). Missing or damaged packets are resent so no data is lost, but waiting and resending adds extra delay.
Section D: Fill in the Blanks
Q1
SEND packet WAIT FOR ACK IF ackReceived THEN SEND nextPacket
Q2
IF NOT ackReceived THEN RESEND packet ENDIF
Q3
IF timer > timeout THEN RESEND packet ENDIF
Q4
WHILE ackReceived = FALSE SEND packet ENDWHILE
Q5
resends = 3 extraDelay = resends * roundTrip
Section E: Spot the Error
Q1
B — Guaranteed delivery needs the sender to wait for an acknowledgement (ACK) before moving on. Line 2 should be WAIT for ACK.
Q2
A — With guaranteed delivery the sender cannot forget the packet. It must keep it, wait for an ACK and resend if needed. Line 1 should be SEND packet 5.
Q3
A — Starting with acked as TRUE means the loop never runs, so the packet is never sent or confirmed. It should start as FALSE until an ACK arrives.
Q4
C — The receiver should only send an ACK when the checksum matches, meaning the packet is undamaged. Line 3 should be IF checksum matches THEN.
Q5
B — ACK 2 is missing, so only ACK 1 and ACK 3 arrived. Line 2 should be RECEIVE ACK 1 and ACK 3, which is why packet 2 is resent.