The Shared-Medium Problem

CS176C — Advanced Topics in Internet Computing

Arpit Gupta

2026-04-14

Where We Are and Where We’re Going

Lectures 1–4: You built the four-invariant framework on systems you already knew — TCP, DHCP, DNS, routing, BGP, SDN.

Today: A new domain where the framework meets physics.

  • Sharing a medium is the oldest problem in networking — older than the Internet
  • We trace the solution from nothing (ALOHA, 1970) through carrier sensing (CSMA, 1975) to collision detection (Ethernet, 1976)
  • Each step adds one piece of shared state — and each breaks under new conditions

By the end of this lecture: You will understand the assumption cascade that drives medium access evolution — and why it hits a physics wall when you move from wires to radio.

Part 1: Foundations

ALOHA to CSMA/CA: The Assumption Cascade

The Shared-Medium Problem

The physics you cannot engineer away:

  • A finite radio channel must carry transmissions from many devices
  • Transmission is broadcast — every station in range hears every signal
  • A transmitter cannot hear its own collision (40–50 dB self-interference)
  • Carrier sensing is location-dependent — what you hear depends on where you are
    A's view         B's view         Reality
   ┌────────┐      ┌────────┐      ┌────────┐
   │ "idle" │      │ A + C  │      │ A + C  │
   │        │      │COLLIDE │      │COLLIDE │
   └────────┘      └────────┘      └────────┘
   A transmits     B receives       Both frames
   can't hear C    both signals     destroyed

        Environment is global.
        Measurement is local.

This gap between environment and measurement is where every medium access failure lives.

Why Radio Behaves This Way

Path loss — signal decays with distance AND frequency:

  • Friis equation: \(L \propto f^2 \cdot d^2\)
  • Doubling distance = 6 dB more loss
  • Doubling frequency = 6 dB more loss (at same distance)
  • Indoors worse: walls, floors, multipath add \(1/d^3\) to \(1/d^4\)

Why low frequency propagates farther:

  • Less free-space loss (lower \(f\) in \(f^2 d^2\))
  • Low-freq waves diffract around obstacles (wavelength \(\approx\) object size)
  • High-freq waves are blocked (wavelength \(\ll\) object size)
  • Concrete: a hand blocks 28 GHz; a wall blocks 5 GHz; 900 MHz passes through both

Why high frequency offers more capacity:

  • Bandwidth \(\propto\) carrier: 10% of 900 MHz = 90 MHz; 10% of 28 GHz = 2.8 GHz
  • More unallocated spectrum at higher bands
  • Smaller antenna (\(\propto\) wavelength) → more elements in same space → beamforming, massive MIMO

The tradeoff in practice:

Band Range Bandwidth Antenna Used by
900 MHz km Narrow 16 cm Early cellular
2.4 GHz ~50 m 85 MHz 6 cm WiFi b/g/n
5 GHz ~30 m 500 MHz 3 cm WiFi a/ac/ax
6 GHz ~25 m 1.2 GHz 2.5 cm WiFi 6E
28 GHz ~200 m LOS GHz+ 5 mm 5G mmWave

SNR determines what you can do:

  • Received power = TX power \(-\) path loss
  • Noise floor \(\approx -90\) dBm
  • Need SNR \(>\) 10 dB (BPSK) to \(>\) 25 dB (256-QAM)
  • WiFi “slows down” as you walk away: rate adaptation drops modulation as SNR falls

Spectrum licensing drives protocol design:

  • Unlicensed (2.4/5/6 GHz): anyone transmits → contention (WiFi)
  • Licensed (cellular bands): exclusive access → scheduling

Spectrum availability drives design:

  • 2.4 GHz: unlicensed → anyone can use → must handle interference → contention protocols (WiFi)
  • Cellular bands: licensed → exclusive access → scheduling protocols :::

:::

Hawaii, 1969: You Are Norman Abramson

The setup:

  • University of Hawaii has campuses on four islands
  • One shared radio channel connects them all
  • No wires between islands — radio is the only option
  • You need to let any campus send data to any other

The constraints:

  • No central controller (who would run it?)
  • No way to “listen” for collisions mid-transmission
  • Signals propagate at the speed of light — no time to react

graph TD
    A["Oahu"] ---|radio| S["Shared Channel"]
    B["Maui"] ---|radio| S
    C["Big Island"] ---|radio| S
    D["Kauai"] ---|radio| S
    style S fill:#e74c3c,stroke:#c0392b,color:white

Turn to your neighbor: design a protocol. How do you decide when to transmit?

Pure ALOHA (Abramson, 1970)

What did your group propose? Most of you said some version of “just send it.”

That’s exactly what Abramson did.

Protocol: Transmit whenever you have data. If collision, wait random time, retry.

Time ──────────────────────────────────►

       t-T        t        t+T
        │          │▓▓▓▓▓▓▓▓│
        │          │ YOUR   │
        │          │ FRAME  │
        │◄──────── 2T ─────►│
        │ VULNERABLE WINDOW │
        │                   │
  ▲ overlap            ▲ overlap       ▲ safe
  (they finish late)   (they start early)

The throughput formula:

  • \(G\) = offered load (frames per frame-time)
  • Many independent, rare transmitters → aggregate arrivals are Poisson (like raindrops on a window)
  • Success = zero other arrivals in vulnerable window
  • General form: \(S = G \cdot e^{-G \cdot (\text{window}/T)}\)

For Pure ALOHA: window = \(2T\)

\[S = G \cdot e^{-2G}, \quad \text{peak at } G=0.5: \textbf{18.4\%}\]

Over 80% wasted. With zero shared state, this is a hard ceiling.

Slotted ALOHA (Roberts, 1975)

ALOHA wastes 80% of capacity. The vulnerable window is \(2T\). How would you shrink it?

15 seconds — think about it.

Roberts’ idea: Synchronize all transmitters to a common slot boundary.

Pure ALOHA:     vulnerable window = 2T
                ├──────── 2T ────────┤

Slotted ALOHA:  frames align to slot edges → vulnerable window = T
                ├────── T ──────┤
  • Frames can only begin at slot edges → no more partial overlaps
  • Collision = two frames in same slot; otherwise clean
  • Vulnerable window halves: \(2T \rightarrow T\)

Same formula, smaller window:

\[S = G \cdot e^{-G \cdot (T/T)} = G \cdot e^{-G}, \quad \text{peak at } G=1.0: \textbf{36.8\%}\]

Halving the window doubled throughput. \(G\) didn’t change meaning — only the window did.

Cost: You need a shared clock — one bit of global state (the slot boundary).

The pattern: Halving the vulnerable window doubled throughput. What if you could shrink it further?

Slotted ALOHA’s Problem: Blind Transmission

Kleinrock and Lam (1975) observed two fatal flaws:

  1. Instability under load. As traffic increases, collisions increase → retransmissions increase → more collisions. Positive feedback collapses throughput to zero. The channel has a bistable equilibrium — it randomly flips between working and collapsed states.

  2. Stations ignore available information. In a local network, propagation delay \(\tau\) is tiny (\(\sim 5\) µs). A station can hear other transmissions almost instantly — but ALOHA doesn’t bother to listen.

. . .

The waste: stations transmit into a channel they could have known was busy, if only they had checked.

Slotted ALOHA: "just transmit"

A: [──── TRANSMIT ────]
B:    [──── TRANSMIT ────]  ← collision!
       ↑
       B could have HEARD A
       (τ ≈ 5 µs, T ≈ 1 ms)
       but the protocol doesn't
       ask B to listen first.

       Free information, thrown away.

“What If You Could Listen First?”

Student exercise: Given what Kleinrock observed — that stations can hear each other almost instantly — redesign the protocol. How does it change?

30 seconds — discuss with your neighbor.

CSMA — Carrier Sense Multiple Access (Kleinrock & Tobagi, 1975):

Carrier sensing = detecting energy on the medium. If your receiver picks up a signal above the noise floor, someone is transmitting — the “carrier” is present. Sense the carrier before you transmit.

  • Listen before transmitting — if carrier detected (busy), defer
  • If no carrier (idle), transmit immediately (1-persistent) or with probability \(p\) (\(p\)-persistent)
  • Vulnerable window shrinks from \(T\) (slot time) to \(\tau\) (propagation delay)
  • On a LAN: \(\tau \ll T\), so throughput jumps to ~80–90% (vs. 36.8% for Slotted ALOHA)
  • New shared state: channel busy/idle

. . .

But the assumption can fail:

“If I hear idle, it’s idle everywhere” — wrong.

       ◄──── transmission time T ────►
       ◄τ►  (propagation delay, tiny)

A: idle ├═══════ TRANSMIT ═══════════╡
        ↑ A starts
        │
        ├─τ─┤ A's signal traveling to B
             ↓
B: idle ·····╠═══ TRANSMIT ══════════╡
             ↑ B senses idle (A's signal
               hasn't arrived yet!)
             COLLISION at receiver

  ALOHA vulnerable window:  ◄── 2T ──►
  CSMA  vulnerable window:  ◄τ►
                             ↑ tiny!

On a LAN: \(T \approx 1\) ms, \(\tau \approx 5\) µs → vulnerable window shrinks 200×. Throughput jumps from 36.8% to ~80–90%.

CSMA/CD: Collision Detection on the Wire (Metcalfe & Boggs, 1976)

On a wire, signals combine at every point. You can hear the medium while transmitting.

Student question: If you could detect a collision during transmission, what would you do differently than CSMA?

Metcalfe’s answer:

  1. Sense channel — if idle, start transmitting
  2. Monitor the wire while sending — compare what you sent vs. what you hear back
  3. Mismatch? → collision detected → abort immediately
  4. Send 48-bit jam signal so all parties detect the collision
  5. Binary exponential backoff: after \(m\)-th collision, pick \(K \in \{0,\ldots,2^m-1\}\), wait \(K \times 512\) bit-times
  6. Retry from step 1
Time ──────────────────────────────►

A: [sense idle][TRANSMIT───✕ abort!][jam][ backoff ]
                           ↑ collision detected
                           │ in ~51.2 µs

B: [sense idle][TRANSMIT───✕ abort!][jam][ backoff ]

   Both detect within 51.2 µs (round-trip
   for max-length Ethernet segment).
   Only a few bytes wasted.

Key numbers: At 10 Mbps, 512 bit-times = 51.2 µs. Collision detected and resolved in microseconds. Utilization: ~95%+.

Why it works: On a wire, all signals combine at every point — a transmitter can hear other signals while transmitting. The wire is a shared bus where interference is directly observable.

But Wireless Cannot Detect Collisions

CSMA/CD works beautifully on a wire. Can we do the same on radio?

10 seconds — what’s different about wireless that might break this?

The root cause is transmission power, which is dictated by the medium:

Guided medium (wire):

  • Signal confined to conductor → minimal loss
  • TX power: ~1 mW (0 dBm) suffices
  • Other stations’ signals on the bus: comparable power
  • → Can observe combined signal while transmitting
  • Collision detection works
TX signal:     ████ (0 dBm)
Other signal:  ███  (-3 dBm)
Ratio: ~2×  → easily distinguishable

Unguided medium (radio):

  • Signal radiates in all directions → \(1/d^2\) to \(1/d^4\) loss
  • TX power: ~100 mW (20 dBm) needed to reach 50m
  • Own signal at antenna: -10 dBm
  • Incoming signal from 50m away: -60 dBm
  • → Own signal is 100,000× stronger (50 dB gap)
  • → Receiver saturated — deaf while transmitting
TX signal:     ████████████████ (-10 dBm)
Other signal:  ▪                (-60 dBm)
Ratio: 100,000× → invisible

The chain: unguided medium → high TX power needed → own signal drowns incoming → cannot sense while transmitting → collision detection impossible → must avoid, not detect.

Framework Checkpoint: The Assumption Cascade

Each generation broke the previous generation’s binding assumption:

Generation Shared State Added Throughput Key Assumption Broken
Pure ALOHA Nothing 18.4% “Transmit whenever”
Slotted ALOHA Slot boundary 36.8% “Align to slots”
CSMA Channel busy/idle ~80-90% “If idle here, idle everywhere”
CSMA/CD (wired) Collision signal ~95%+ “Can hear own collision”

Wireless can’t do CSMA/CD. The assumption cascade hits a physics wall.

How does wireless close the feedback loop? That’s where we pick up next lecture.

Generative Exercise

What Happens When Physics Changes?

Exercise: When Carrier Sensing Breaks

CSMA works because \(\tau \ll T\) — you hear others almost instantly.

What happens when that breaks?

Step 1: Compute the Ratio

Geostationary satellite: \(\tau = 125\) ms, \(T \approx 5\) ms.

What is \(\tau / T\)? Is carrier sensing useful?

\(\tau / T = 25\). You sense signals that are 25 frame-times old. By the time you hear “busy,” 25 frames could have started and finished. Carrier sensing is useless — you’re back to ALOHA.

Step 2: Design a Protocol

You’re the satellite network engineer. Ground stations can’t hear each other. CSMA is useless.

2 minutes — design a MAC. Discuss with your neighbor.

Guiding questions (reveal one at a time):

  • Can any distributed protocol beat ALOHA here? Why or why not?
  • What if the satellite could talk back — what role could it play?
  • What does this remind you of from cellular networks?

Step 3: The Answer and the Deeper Insight

The natural solution: centralized scheduling. The satellite allocates time slots (TDMA). This is exactly what real satellite systems do (DVB-RCS).

Now the hard question: What if there’s no central controller?

Underwater acoustic network: sound at 1,500 m/s, sensors 1 km apart → \(\tau = 670\) ms, \(T = 100\) ms. \(\tau / T = 6.7\). No infrastructure underwater.

You’re stuck near ALOHA. This is an open research problem.

The insight: The choice between contention and scheduling is not ideological — it is driven by \(\tau / T\). When \(\tau \ll T\), sensing works. When \(\tau \gg T\), centralization becomes necessary. Same physics, same framework.

Preview: Lecture 6

Wireless can’t detect collisions. So what does it do instead?

  • CSMA/CA: sense + randomize + ACK — how 802.11 closes the loop
  • 802.11 DCF: the protocol that ran WiFi for 20 years
  • Hidden terminals: when carrier sensing fails entirely
  • WiFi evolution: why CSMA/CA eventually broke under density
  • Cellular: the path that was centralized from day one

Reading: Book Ch 3, §Act 2 (CSMA) through §Act 5 (Cellular Alternative)

Framework Summary: ALOHA to CSMA/CD

Anchor: Shared-medium physics — broadcast, location-dependent sensing

The assumption cascade: each generation adds shared state, shrinks the vulnerable window

Invariant ALOHA CSMA CSMA/CD
State None Channel busy/idle Collision signal on wire
Time Continuous (Pure) / Slotted Propagation-delay limited Microsecond detection
Coordination Random retransmit Listen-before-talk Detect + abort + jam
Interface Best-effort broadcast Improved by sensing Near-perfect with BEB

The wireless fork: unguided medium → high TX power → can’t sense while transmitting → CSMA/CD impossible.

Next: How does wireless close the loop without collision detection?