← IGCSE Computer Science Paper 1

Timeout

The set time a sender waits for an acknowledgement after sending data. If none arrives in time, it assumes the data was lost and resends it.

Understanding Timeout in IGCSE Computer Science Paper 1

What it does: The timeout is measured from when the data is sent, so the timer is started straight after sending the packet. Without a limit the sender could resend forever, so the timeout process can end after a set number of tries. No reply in time means the sender assumes the data was lost, so it sends it again. A timeout is the set length of time the sender waits for an acknowledgement before resending. A reply within the timeout shows the data was received, so there is no need to resend.

Common mistakes: The sender only resends when the timer runs out with no acknowledgement. Resending after an ACK arrived is wrong. It should be IF timer expired THEN RESEND. A timeout limits how long the sender waits. Waiting forever means the sender would never decide the data was lost. It should be WAIT up to timeout seconds.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 179–188) and word search (Modules 168–188).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
In ARQ, when does the sender start the timeout timer?
When it sends the dataWhen it receives an acknowledgement
Matches
The sender resends the data as soon as it has sent it, without waiting for the timeout
↓
The sender must wait for the whole timeout period first. It only resends if no acknowledgement arrives in that time.
Applying
Meanings
Term
timeout
Meaning
The set time a sender waits for an acknowledgement after sending data. If none arrives in time, it assumes the data was lost and resends it.
Practice
tries ← 0
Testing
Gaps
START
Check Answer
Spots
3WAIT for acknowledgement
4IF ack arrived THEN RESEND

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Seahorse' badge — Range Rider, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. In ARQ, when does the sender start the timeout timer?
A. When it sends the data ✓
B. When it receives an acknowledgement
The timer starts as soon as the data is sent. The sender then waits for an acknowledgement until the timeout ends.
2. The timeout ends and no acknowledgement has arrived. What does the sender do?
A. Resends the data ✓
B. Assumes the data arrived safely
No reply in time means the sender assumes the data was lost, so it sends it again.
3. Which best describes a timeout?
A. The time taken to type a message
B. The set time a sender waits for an acknowledgement ✓
A timeout is the set length of time the sender waits for an acknowledgement before resending.
4. The data arrives safely, but the acknowledgement is lost on the way back. What happens when the timeout ends?
A. The sender resends the data ✓
B. The sender knows the data arrived and does nothing
The sender cannot tell whether the data or the acknowledgement was lost. If no reply arrives in time, it resends.
5. An acknowledgement arrives before the timeout ends. What does the sender do?
A. Waits for the timeout to end, then resends
B. Stops waiting and does not resend ✓
A reply within the timeout shows the data was received, so there is no need to resend.

Match the Pairs

timeout = 5 → The sender will wait 5 seconds for an acknowledgement before it assumes the data was lost
IF no ACK within timeout THEN resend → If no reply arrives in time, the sender sends the data again
The timer starts at the moment the data is sent → send(packet) start_timer()
The sender can stop resending after a set number of tries → IF tries = 3 THEN stop
The sender resends the data as soon as it has sent it, without waiting for the timeout → The sender must wait for the whole timeout period first. It only resends if no acknowledgement arrives in that time.
A timeout only happens when the data is lost, never when an acknowledgement is lost → A timeout also happens when the acknowledgement is lost. The sender cannot tell the difference, so it resends.

Key Term

timeout
The set time a sender waits for an acknowledgement after sending data. If none arrives in time, it assumes the data was lost and resends it.

Fill in the Blanks

1. SEND packet START timer
Hint: Type the name of what is started to count the waiting time as soon as the data is sent.
2. IF timer > timeout THEN RESEND packet ENDIF
Hint: Type the action the sender takes when the waiting time runs out with no reply.
3. IF ack = FALSE AND timer > timeout THEN RESEND packet ENDIF
Hint: Type the logical operator that makes both conditions true before the resend happens.
4. tries ← tries + 1 IF tries = max_tries THEN STOP
Hint: Type the variable that counts how many times the data has been sent, so the sender can give up.
5. WAIT timeout seconds IF ack = FALSE THEN RESEND packet
Hint: Type the variable holding the set length of time the sender waits for an acknowledgement.

Spot the Error

Question 1
A SEND packet
B START timer
C WAIT for acknowledgement
D IF ack arrived THEN RESEND
Line D — The sender only resends when the timer runs out with no acknowledgement. Resending after an ACK arrived is wrong. It should be IF timer expired THEN RESEND.
Question 2
A timeout ← 5
B SEND packet
C WAIT forever for ACK
D IF no ACK THEN RESEND packet
Line C — A timeout limits how long the sender waits. Waiting forever means the sender would never decide the data was lost. It should be WAIT up to timeout seconds.
Question 3
A tries ← 0
B SEND packet
C tries ← tries - 1
D IF no ACK AND tries<3 RESEND
Line C — The sender counts each attempt so it can stop after a set number of tries. Subtracting means tries never reaches the limit. It should be tries ← tries + 1.
Question 4
A Sender sends packet 7
B Receiver gets it, sends ACK
C The ACK is lost on the way
D Timeout ends, sender sends ACK
Line D — The receiver sends the ACK, not the sender. When the ACK is lost, the timeout ends and the sender resends the packet. It should be Timeout ends, sender resends.
Question 5
A SEND packet AND STOP timer
B WAIT for ACK
C IF timer ends with no ACK
D RESEND packet
Line A — The timeout timer must start at the moment the data is sent. Stopping it means no waiting time is measured. It should be SEND packet AND START timer.

Student with a class code? Join your class →