CS Atlas GATE 2027
Computer Networks course
0 / 90 complete

Computer Networks/Phase 2 · Data Link Layer

Lesson 2.3.3 · Item 33 of 90

CSMA and its persistence variants; CSMA/CD; minimum frame size = 2·Tp·B

Read at your own pace. Try the questions before opening the answers.

On this page

Recall warm-up

  1. Vulnerable time of slotted ALOHA?
    Stuck? Peek at 2.3.2 Pure and slotted ALOHA: vulnerable time, throughput, maximum efficiency
    • T = frame time; G = attempts per T.
    • Pure: vulnerable 2T, S = G·e⁻²ᴳ, max 1/(2e) ≈ 0.184 at G = 0.5.
    • Slotted: vulnerable T, S = G·e⁻ᴳ, max 1/e ≈ 0.368 at G = 1.
    • Finite N: P(success) = N·p·(1 − p)ᴺ⁻¹.

    Read lesson 2.3.2

  2. Why does TDMA waste capacity?
    Stuck? Peek at 2.3.1 The multiple access problem; collisions; channel partitioning
    • Collision: overlapping transmissions on a shared link; all involved frames lost.
    • MAC families: partitioning (TDMA/FDMA), random access (send freely, recover from collisions), taking turns (an orderly schedule).
    • TDMA/FDMA: R/N per station, no collisions, idle shares wasted, wait up to (N − 1) slots.

    Read lesson 2.3.1

  3. RTT for a tiny signal on a link with propagation delay T_p?
    Stuck? Peek at 1.3.3 RTT, bandwidth-delay product, utilisation and a = Tp/Tt
    • RTT = 2·Tp for tiny signals (add Tt / queuing if stated).
    • BDP = B × Tp bits in flight; B × RTT before any reply.
    • a = Tp / Tt.
    • Send-and-wait: U = Tt/(Tt + 2Tp) = 1/(1 + 2a); throughput = U·B.
    • To keep the link busy: about 1 + 2a units in flight.

    Read lesson 1.3.3

The Hook

Polite people at a meeting listen before speaking, and if two start at once, both stop mid-sentence and try again later. Networks copy both habits: carrier sense (listen first) and collision detection (stop as soon as a clash is heard). But a speaker far away is heard only after a delay — and that delay sets a rule on how long every frame must be.

Predict First

Station A starts sending. Station B at the far end of a cable cannot hear A until A's first bit arrives, Tp later. If B starts just before that, how long after A started can A first hear the collision?

,

Up to 2·Tp: A's signal takes Tp to reach B, and B's colliding signal takes another Tp to come back. If A finished sending before then, it would never know its frame was destroyed. So A must still be transmitting at 2·Tp: the frame must last at least 2·Tp.

Core Concept

CSMA: listen before talking

CSMA (carrier sense multiple access): a station senses the channel before transmitting and does not start while it hears another transmission.

Collisions still happen because of propagation delay: two stations may both sense "idle" before each other's signal arrives. The vulnerable time shrinks to about Tp.

AB (far end)senses idle, startssenses idle (A not heard yet), startssignals meet → collision
Carrier sense cannot prevent collisions within one propagation delay.

Persistence: what to do when the channel is busy

VariantIf busyIf idleTrade-off
1-persistentkeep sensing; send the instant it becomes idlesend at oncelow delay, many collisions when several wait
Non-persistentwait a random time, then sense againsend at oncefewer collisions, more idle time
p-persistent (slotted)keep sensing until idlesend with probability p, else wait one slot and repeatbetween the two
Three answers to "the channel is busy — now what?"

CSMA/CD: stop on collision

CSMA/CD (collision detection): while transmitting, the station also listens. On detecting a collision it stops immediately, sends a short jam signal so everyone notices, then waits a random time (the rule for choosing it is Lesson 2.3.4) and retries.

Collision detection works only on links where a station can hear while it sends (classic wired shared cables), i.e. it is a half-duplex scheme.

sense
idle?
transmit + listen
collision?
jam, stop
wait randomly, retry
CSMA/CD loop.

Minimum frame size L ≥ 2·T_p·B

To detect a collision, the sender must still be transmitting when the collision news returns, which can take up to the round trip 2·Tp across the longest path:

Tt ≥ 2·Tp ⇔ Lmin = 2·Tp·B (bits).

Equivalently, for a given minimum frame size, the cable can be at most dmax = Lmin·v / (2B) long. A classic 10 Mbps shared LAN fixes Lmin at 512 bits = 64 bytes, its slot time.

A transmits
T_t must cover the whole 2·T_p
A→B travel
T_p
collision news back
T_p
012345678910
Worst case: B starts just before A's first bit arrives; the news returns at 2·T_p.

CSMA/CA (Foundation)

Wireless stations cannot hear collisions while transmitting, so Wi-Fi uses collision avoidance instead: wait a random time even when the channel is idle, optionally reserve the channel with short request/clear messages, and treat a missing confirmation from the receiver as a collision.
CSMA/CD
wired · detect and abort
CSMA/CA
wireless · avoid and confirm
Detect on cables, avoid in the air.

Putting it together

  • CSMA listens first; CSMA/CD also listens while sending and aborts on collision.
  • Persistence variants trade delay against collisions.
  • Collision detection needs frames lasting at least 2·T_p: L_min = 2·T_p·B.

Visual

QuantityFormula
Minimum frame sizeL_min = 2·T_p·B
Maximum length for a given L_mind_max = L_min · v / (2B)
ConditionT_t ≥ 2·T_p (i.e. a ≤ 1/2)
One rule, three forms.

Worked Examples

Easy

A CSMA/CD network: cable 1 km, signal speed 2 × 10⁸ m/s, rate 1 Gbps. Minimum frame size?

Show the full solution

Tp = 1000 / 2×10⁸ = 5 µs. Lmin = 2 × 5 µs × 10⁹ = 10,000 bits = 1250 bytes.

Medium

10 Mbps, 2500 m, v = 2 × 10⁸ m/s. Minimum frame size in bits?

Show the full solution

Tp = 12.5 µs. Lmin = 2 × 12.5 × 10⁻⁶ × 10⁷ = 250 bits. (Real 10 Mbps LANs use 512 bits to allow for repeaters and safety margins.)

GATE

A CSMA/CD network runs at 100 Mbps with a minimum frame of 512 bits. Signal speed 2 × 10⁸ m/s. Maximum distance between two stations?

Show the full solution

Tt(512 bits) = 5.12 µs ≥ 2Tp → Tp ≤ 2.56 µs → d ≤ 2.56 × 10⁻⁶ × 2 × 10⁸ = 512 m.

GATE Traps

  • Use the round trip 2·T_p, not T_p, in the minimum frame size.
  • CSMA reduces but cannot eliminate collisions — propagation delay leaves a window.
  • 1-persistent sends immediately when the channel frees, so waiting stations collide with each other.
  • CSMA/CD needs to hear while sending: half-duplex shared wires, not wireless.

Memory Hook

"You must still be talking when the echo of a clash comes back": T_t ≥ 2·T_p.

Connect the Dots

After a collision, both stations must retry — but if they retry at the same moment they collide again. Next (2.3.4): how do they pick random waiting times, and how likely is each to win the next round?

Self-Test

  1. NAT

    CSMA/CD: rate 10 Mbps, longest path 2 km, v = 2 × 10⁸ m/s. Minimum frame size in bits?

    Write your answer before opening the key.

  2. NAT

    Minimum frame 1000 bits at 1 Gbps, v = 2 × 10⁸ m/s. Maximum cable length in metres?

    Write your answer before opening the key.

  3. MCQ

    A station that waits a random time whenever it finds the channel busy is:

    1. 1-persistent
    2. non-persistent
    3. p-persistent
    4. TDMA
  4. MSQ

    Which are true of CSMA/CD?

    1. A station stops sending when it detects a collision.
    2. Collisions are impossible.
    3. Frames must last at least 2·T_p.
    4. A jam signal announces the collision.
  5. MCQ

    Doubling the bit rate of a CSMA/CD network while keeping the minimum frame size requires the maximum length to:

    1. double
    2. halve
    3. stay the same
    4. quadruple

Rule Card

  • CSMA: sense before sending; collisions still possible within T_p.
  • 1-persistent / non-persistent / p-persistent: what to do when busy.
  • CSMA/CD: listen while sending; on collision jam, stop, back off.
  • L_min = 2·T_p·B; d_max = L_min·v/(2B); i.e. T_t ≥ 2T_p.
  • CSMA/CA (Foundation): wireless avoids collisions instead of detecting them.

Concept Ledger

  • carrier sense, CSMA
  • 1-persistent / non-persistent / p-persistent
  • collision detection, CSMA/CD
  • jam signal
  • minimum frame size L_min = 2·T_p·B
  • CSMA/CA (Foundation)

Answer Vault

Try the questions first. Open when you are ready to check.

Warm-up answers

  1. T (one frame time).
  2. Idle stations' slots go unused.
  3. 2·T_p.

Self-test answers

  1. 200 — T_p = 10 µs; 2 × 10 µs × 10⁷ = 200 bits.
  2. 100 — T_t = 1 µs → T_p ≤ 0.5 µs → 100 m.
  3. B — Non-persistent backs off randomly instead of watching continuously.
    • A: Watches and sends immediately on idle.
    • C: Watches and sends with probability p.
    • D: Not carrier sensing.
  4. ACD — Abort, minimum length, jam.
    • B: Propagation delay still allows collisions.
  5. B — d_max = L_min·v/(2B): inversely proportional to B.
    • A: Opposite direction.
    • C: B appears in the formula.
    • D: Not quadratic.

Flashcards

  1. Minimum frame size for CSMA/CD?
    Reveal answerL_min = 2·T_p·B.
  2. Why can CSMA still collide?
    Reveal answerPropagation delay: a station may sense idle before another's signal arrives.
  3. Non-persistent behaviour when busy?
    Reveal answerWait a random time, then sense again.

Exam shortcuts

  • L_min = 2·T_p·B; d_max = L_min·v/(2B). — CSMA/CD on a shared medium; T_p over the longest station-to-station path.
  • Raising the rate B (same L_min) shrinks the allowed length proportionally. — fixed minimum frame size, same signal speed.

Ready for the next idea?

Mark this item complete when you’ve finished reading and working through it.