The University of Melbourne · FACULTY OF COMPUTER SCIENCE

COMP90007 Chap.3 Framing, Errors and Reliable Delivery

- one subject, every graph, every model, every mark
9 Chapters4-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 3 of 4 · COMP90007

Framing, Errors and Reliable Delivery

The data-link layer needs to decide where a frame begins and ends, whether its bits are plausible, and what to do when delivery is incomplete. Character count uses a length field but can lose synchronisation if that field is corrupted. Flag bytes and byte stuffing reserve a boundary value while escaping it inside data. Bit stuffing performs the same logical separation at the bit level. Error control then adds redundancy.

A parity bit catches any odd number of flips but cannot locate the error. An Internet checksum sums fixed-width words with end-around carry and complements the result. CRC uses a generator polynomial and modulo-two division so the transmitted polynomial is divisible by the generator.

Hamming distance provides the general guarantee: distance must exceed the error count for detection and exceed twice the error count for correction. Reliable delivery adds acknowledgements, timeouts and sequence numbers. Stop-and-Wait is simple but leaves a long-delay path idle. Go-Back-N and Selective Repeat pipeline frames, trading retransmission volume against receiver buffering.

In this chapter

What this chapter covers

  • 01

    Byte stuffing

  • 02

    Automatic Repeat reQuest

  • 03

    Selective Repeat

  • 04

    Character counts, flag bytes and byte stuffing

  • 05

    Bit flags and bit stuffing

  • 06

    Parity, checksum and CRC

  • 07

    Hamming distance and correction capacity

  • 08

    Acknowledgements, timeouts and sequence numbers

  • 09

    Stop-and-Wait, Go-Back-N and Selective Repeat

Worked example · free

Read a Hamming-distance guarantee

Q [4 marks]. A code has minimum Hamming distance five. State the maximum number of bit errors it guarantees to detect and the maximum it guarantees to correct. The displayed mark allocation is an editorial practice aid and is not an official University marking scheme.
  • 1For guaranteed detection of d errors, the minimum distance must be at least d plus one.
  • 1Distance five therefore guarantees detection of up to four bit errors.
  • 1For guaranteed correction of d errors, the minimum distance must be at least two d plus one.
  • 1Five is two times two plus one, so the code guarantees correction of up to two bit errors.
The code guarantees detection of four errors and correction of two errors in a codeword.
Sia tip — Use separate inequalities for detection and correction; never turn distance five into five detectable or five correctable errors.
Glossary

Key terms

Byte stuffing
Escaping a reserved flag value when it appears in payload bytes so the receiver does not treat it as a boundary.
Automatic Repeat reQuest
A reliability pattern using feedback and retransmission when acknowledgement or timing indicates unsuccessful delivery.
Selective Repeat
A window protocol that buffers acceptable out-of-order frames and retransmits missing frames selectively.
FAQ

Framing, Errors and Reliable Delivery FAQ

Why is a checksum different from a CRC?

A checksum uses arithmetic over fixed-width words and complements the sum. A CRC interprets the message algebraically and divides by a generator polynomial using modulo-two operations. Both detect corruption, but their structures and error-pattern guarantees differ.

When is Selective Repeat preferable to Go-Back-N?

It is attractive when retransmitting many already-correct frames is costly and the receiver can afford out-of-order buffering. Go-Back-N keeps receiver state simpler. The choice depends on delay, error rate, frame size and memory rather than protocol name alone.

Study strategy

Exam move

Classify the problem before choosing a mechanism. Boundary ambiguity calls for framing; corrupted bits call for a detection or correction code; missing feedback calls for a timeout; duplicates call for sequence numbers; and an idle long-delay link calls for a window. Then draw one sender-receiver timeline to test the answer. Practise framing by encoding and decoding the same short payload under three boundary schemes.

With a character count, corrupt the length field and follow the loss of synchronisation. With flag bytes, insert the escape convention into payload data and reverse it at the receiver. With bit stuffing, mark every inserted zero and verify that removal restores the original bits without deleting genuine data. This side-by-side trace turns a definition into an observable boundary mechanism.

Build a second ledger for error control. For parity, checksum and CRC, name the redundancy added, the receiver operation and the error patterns the method can or cannot guarantee to detect. Perform modulo-two division explicitly for one CRC example, and use Hamming distance to separate detection claims from correction claims rather than transferring a bound between them.

Then model reliable delivery as sender and receiver state. Place frame number, acknowledgement, timer and buffered data on a timeline; remove an acknowledgement, delay a frame or duplicate a transmission and follow the mechanism that restores progress. Compare Stop-and-Wait, Go-Back-N and Selective Repeat using link delay, window size, retransmission volume, sequence-number space and receiver memory.

A protocol name is not a conclusion: state which cost dominates the scenario. After every trace, identify the earliest divergence between expected and observed state. Check whether corruption detection, frame recovery and flow of outstanding frames have been treated as separate responsibilities.

Finish by changing one assumption—error rate, round-trip time or buffer capacity—and revising the preferred protocol without rewriting unrelated parts of the analysis. Keep detected corruption, discarded frames and recovered delivery as separate events in the ledger. This prevents an error-detection result from being reported as proof that the original data reached the application.

Working through Framing, Errors and Reliable Delivery in COMP90007? Sia is AskSia’s AI Computer Science tutor — ask any COMP90007 Framing, Errors and Reliable Delivery question and get a clear, step-by-step explanation grounded in how COMP90007 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 56 of your The University of Melbourne subjects - and 1,000+ Bibles across every Australian university.
Sia - your COMP90007 tutor, unlimited, worked the way the exam marks it
The full 4-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works
Unlock the full COMP90007 Bible + 56 The University of Melbourne subjects
$0.99 Trial