Flow Control and Error Control·Lesson 1 of 7
Flow Control and Error Control
Two Jobs on Every Link
Imagine two devices sending data to each other over a single connection — say your laptop talking to the Wi-Fi router. Two things can go wrong. First, the sender might push data out faster than the receiver can handle, and some of it gets dropped. Second, the data itself might get scrambled or lost somewhere along the way. Flow control is the set of rules that fixes the first problem (pacing), and error control is the set of rules that fixes the second (correctness). This lesson is the map for the whole topic — we'll meet both ideas at a high level, then dig into each protocol in its own lesson.
The one-line difference
Flow control is about speed — don't send faster than the receiver can take. Error control is about correctness — make sure every piece of data arrives, intact and in order. A good link needs both.
Throughout this topic, the chunk of data being sent is called a . You don't need to know exactly how a frame is built yet — just picture it as one labelled envelope of data that travels from the sender to the receiver.
A teacher dictating notes
A teacher reads a passage aloud while a student writes it down. Flow control is the teacher pausing after each sentence so the student can catch up — no point racing ahead if the student can only write so fast. Error control is the student saying 'sorry, can you repeat that line?' when a word was missed or misheard. One keeps the pace right; the other keeps the notes correct.
Flow Control: Matching Speeds
Every receiver has a small holding area in memory called a where incoming data waits to be processed. That buffer is not infinite. If the sender fires data faster than the receiver can empty its buffer, the buffer fills up and any further data is simply dropped — wasted effort that has to be sent all over again. Flow control gives the receiver a way to say 'slow down' or 'okay, send more,' so the two sides stay in step.
Error Control: Keeping Data Correct
Even when the pace is right, data can still go wrong in three ways: a frame can arrive (some bits flipped by electrical noise), it can be lost entirely (never arrives), or it can be duplicated (the same frame arrives twice). Error control catches these problems and repairs them. The usual fix is simple: the receiver confirms what it got, and anything missing or broken gets sent again.
The whole 'confirm and re-send' idea has a name: . The receiver sends back a short message called an (ACK) to say 'got it.' The sender starts a each time it sends; if the acknowledgment doesn't come back before the timer runs out, the sender assumes the frame was lost and re-sends it. To tell frames apart — and to spot duplicates — each frame carries a .
These four tools show up again and again across every protocol in this topic, so it's worth getting comfortable with them now:
Acknowledgment (ACK)
A short 'got it' reply from the receiver. Its absence is a clue that something went missing.
Sequence Number
A label on each frame so both sides can order frames and spot duplicates or gaps.
Timeout Timer
A countdown that, when it expires without an ACK, tells the sender to re-send.
Retransmission
Simply sending a lost or corrupted frame again — the core repair action of every ARQ protocol.
Where This Happens
Flow control and error control aren't done in just one place. They run at the — between two devices connected by a single hop, such as your laptop and the router — where the data unit is the frame. The very same ideas run again at the , where a protocol called TCP (Transmission Control Protocol) provides flow control and error control from end to end, all the way across the internet. Same concepts, different scale.
The Protocols You'll Meet
The rest of this topic walks through three protocols that combine flow control and error control. They differ mainly in one thing: how many frames the sender is allowed to send before it has to stop and wait for a confirmation. Here they are at a glance — we'll unpack each one in its own lesson:
| Protocol | Frames allowed out at once | Core idea |
|---|---|---|
| Stop-and-Wait | Exactly one | Send one frame, then wait for its acknowledgment before sending the next |
| Go-Back-N (sliding window) | A whole window | If one frame is lost, re-send that frame and every frame after it |
| Selective Repeat (sliding window) | A whole window | If one frame is lost, re-send only that single frame |
“"Flow control and error control are just two names for the same thing."”
Q:In one sentence each, what do flow control and error control do?
A: Flow control stops a fast sender from overwhelming a slow receiver by pacing the transmission to the receiver's capacity. Error control ensures every frame arrives correct, complete, and in order by acknowledging good frames and re-sending lost or corrupted ones. They often work together in the same protocol but address different failures — pacing versus correctness.
Quick Revision Cheat Sheet
Flow control: Pace the sender so it never overruns the receiver's buffer
Error control: Detect and fix corrupted, lost, or duplicated frames
Frame: One labelled unit of data sent between two devices
ACK: A 'got it' reply confirming a frame was received
ARQ: Automatic Repeat reQuest — acknowledge good frames, re-send bad ones
Three protocols: Stop-and-Wait, Go-Back-N, Selective Repeat