CAP7001 · Unit 3: Data link layer
Flow and error control
10 practice questions · in the MTE and ETE syllabus
Key points
- Flow control protects the receiver's buffer
- Error control = detection + retransmission
- Piggybacking combines ACK with data
- Stop-and-Wait utilisation = 1 / (1 + 2a)
Flow control stops a fast sender from overwhelming a slow receiver; the receiver's buffer is the limited resource. Error control detects damaged or lost frames and gets them retransmitted (ARQ).
The data link layer uses acknowledgements (ACK), sequence numbers and timers. Piggybacking carries an ACK inside a data frame heading the other way to save bandwidth.
For Stop-and-Wait, utilisation is U = 1 / (1 + 2a), where a = Tp / Tf (propagation time over frame time), ignoring ACK size.
Worked example: Tf = 1 ms and Tp = 20 ms gives a = 20, so U = 1/41, about 2.4%. If a sender emits 100 frames/s and the receiver handles 40 frames/s with a 30-frame buffer, the buffer fills at 60 frames/s and overflows after 0.5 s without flow control.
Exam pitfall: if an ACK (say ACK 1, meaning "expecting frame 1") is lost, the sender resends frame 0. The receiver must recognise the duplicate by its sequence number, discard it and resend ACK 1; it must not deliver the data twice.
Try two questions
In Stop-and-Wait, a frame takes 1 ms to transmit and the one-way propagation delay is 5 ms. Ignoring ACK transmission time and processing, what is the link utilisation?
- About 9.1%
- About 16.7%
- About 50%
- About 4.8%
Show the answer
A. Utilisation is 1 / (1 + 2a) with a = 5, which gives 1/11, about 9.1%. The 16.7% figure uses 1 / (1 + a) and forgets that the ACK also travels for 5 ms.
Why not B: That uses 1/(1+a) and ignores the return trip of the ACK.
Why not C: That would hold only if propagation delay were zero for the ACK as well.
Why not D: That corresponds to a 10 ms one-way delay, not 5 ms.
A sliding-window sender transmits frames that each take 2 ms. The one-way propagation delay is 15 ms and ACK transmission time is ignored. What is the smallest window, in frames, that keeps the sender transmitting continuously?
- 15 frames
- 8 frames
- 31 frames
- 16 frames
Show the answer
D. The window must cover one frame time plus the round trip: 1 + 2 x 15 / 2 = 16 frames. Using the delay value directly, or the 1 ms frame-time version, gives the wrong sizes.
Why not A: That uses the one-way delay as the frame count and ignores the frame time.
Why not B: That covers only the one-way delay and not the whole round trip.
Why not C: That uses 1 ms frames, so it is the answer for a different problem.