3.1 Random Access Protocols: Pure ALOHA & Slotted ALOHA
💡 Core Intuition: The Unmoderated Dinner Table
🍳 The Everyday Analogy: Talking in a Loud Group
Imagine a dinner party where 10 friends sit around a single table without any moderator:
- Pure ALOHA: Anyone speaks immediately whenever a thought crosses their mind. If Alice begins speaking at 7:00:00 and Bob blurts out a word at 7:00:01 while Alice is still speaking, their voices overlap. Neither message is understood by anyone at the table—both utterances turn into garbled noise (Collision). Because there is zero coordination, the chances of two speeches overlapping are extremely high.
- Slotted ALOHA: A grandfather clock in the dining room chimes every minute on the dot (7:01:00, 7:02:00, 7:03:00). A strict house rule is instituted: guests can only start speaking at the exact chime of a clock tick. If Alice has an idea mid-minute, she must bite her tongue and wait for the chime. If only Alice speaks when the bell rings, she enjoys the entire minute uninterrupted. Collisions can now only happen if two guests decide to speak at the exact same chime, cutting the vulnerable collision window in half!
💻 Bridging to Computer Science
When multiple computing nodes share a single broadcast transmission medium (such as a shared wireless radio frequency or a single coaxial wire), multiple simultaneous electrical or radio emissions interfere destructively.
The Media Access Control (MAC) sublayer provides protocols to coordinate channel access. In Random Access protocols, there is no centralized master station and no scheduled turn-taking. Stations compete (contend) for the channel freely, using mathematical backoff strategies to recover from collisions.
📑Table of Contents
- 🔀 The Two Sublayers of the Data Link Layer (LLC vs MAC)
- ❓ Random Access Foundations: The 4 Core Questions
- 📡 Pure ALOHA: Mechanics, Vulnerable Time & Throughput
- ⏱️ Slotted ALOHA: Synchronization & Efficiency Doubling
- ⚖️ Pure vs Slotted ALOHA: Architectural Comparison
- 📐 Rigorous Mathematical Throughput Derivations
- 🏭 Real-World Production Context: Satellite Networks & IoT Uplinks
- 📐 Numerical Applications & Worked Examples
- 🎯 Exam & Interview Pitfall Check
🔀 The Two Sublayers of the Data Link Layer (LLC vs MAC)
In point-to-point links (like a dedicated fiber connecting two core routers), only two nodes exist on the cable; there is no competition for transmission rights. However, in broadcast networks (Ethernet bus, Wi-Fi radio, satellite channels), the medium is shared among tens or hundreds of stations.
To handle both link-layer framing and channel arbitration cleanly, the IEEE 802 committee split the Data Link Layer into two distinct sublayers:
Separation of logical framing from physical channel contention
Logical Link Control (LLC - IEEE 802.2)
- •Provides Service Access Points (SAPs) to interface with the Network Layer.
- •Manages software flow control, packet sequencing, and error management.
- •Completely agnostic to physical wiring, antenna design, or modulation.
- •Presents a unified link interface regardless of underlying LAN hardware.
Media Access Control (MAC - IEEE 802.3 / 802.11)
- •Directly interfaces with the Physical Layer transmission medium.
- •Embeds unique physical hardware addresses (48-bit MAC addresses).
- •Determines which station transmits next on a shared collision domain.
- •Implements collision detection, collision avoidance, and backoff timers.
❓ Random Access Foundations: The 4 Core Questions
In random access (contention-based) protocols:
- No Master / Slave Hierarchy: No station is superior to another; no central controller grants transmission tokens.
- No Predetermined Scheduling: Stations do not have fixed time slots reserved in advance.
- Open Contention: Stations compete with one another. If two or more stations transmit simultaneously, an access conflict (collision) occurs, destroying all overlapping frames.
Every random access protocol must answer four fundamental operational questions:
| Question | Operational Concern | Protocol Mechanism |
|---|---|---|
| 1. When can a station access? | Can the station transmit immediately or wait for an idle line? | Immediate transmission in ALOHA; Carrier sensing in CSMA. |
| 2. What if the medium is busy? | How does the station respond if another frame is in flight? | Persistence algorithms (1-persistent, non-persistent, -persistent). |
| 3. How to detect success/failure? | Does the station listen while talking or rely on receiver ACKs? | Transceiver energy sensing (CSMA/CD) vs timeout-based ACKs (ALOHA). |
| 4. What if a collision occurs? | How to prevent colliding stations from re-colliding immediately? | Randomized Backoff Time () with exponential contention windows. |
📡 Pure ALOHA: Mechanics, Vulnerable Time & Throughput
Developed by Norman Abramson at the University of Hawaii in 1970 to connect remote island campuses via ground radio transceivers, ALOHA is the pioneering foundation of all random access networks.
Protocol Rule
A station transmits a frame whenever it has data ready to send.
After transmitting, the station starts a retransmission timer. If an acknowledgment (ACK) is received before the timer expires, the transmission succeeded. If no ACK arrives within the timeout window, the station concludes a collision occurred.
Why Collisions Occur
Because stations have no clocks synchronizing their start times, frames can overlap partially or completely. Even if the trailing bit of Frame collides with the leading bit of Frame , the receiver's CRC check will fail on both frames, forcing both to be discarded entirely.
Derivation of Vulnerable Time ()
Let all frames have a constant transmission time , where is frame length in bits and is bandwidth in bps.
Suppose Station begins transmitting a frame at time . Its transmission completes at time .
Medium Access Contention Timeline
Frames can overlap asynchronously at any instant, creating a vulnerable interval of 2 × Tt
Station B transmits at t0 - 0.6·Tt. The trailing bits of Frame B collide with the leading bits of Frame A.
- Prior Overlap: If any Station began transmitting between and , the tail of 's frame collides with the head of 's frame.
- Subsequent Overlap: If any Station begins transmitting between and , the head of 's frame collides with the tail of 's frame.
Therefore, for Station 's frame to survive without collision, no other station must generate or transmit a frame during the entire window of length :
⏱️ Slotted ALOHA: Synchronization & Efficiency Doubling
Introduced by Lawrence Roberts in 1972, Slotted ALOHA introduces a global discrete clock to eliminate partial frame overlaps.
Protocol Rule
- Time on the shared channel is segmented into uniform discrete slots of duration equal to the frame transmission time:
- A station is strictly forbidden from transmitting mid-slot.
- If a station generates a frame at time , it must buffer the frame and wait until the exact start boundary of the next time slot.
Medium Access Contention Timeline
Transmissions forced to discrete slot boundaries, cutting vulnerable time to exactly 1 × Tt
Station A transmits at Slot 1 boundary. Station B also transmits at Slot 1, causing a synchronized collision in Slot 1.
Reduction of Vulnerable Time
Because every transmission is aligned to slot boundaries, frames can no longer collide partially. If Station begins transmitting at the boundary of Slot ():
- Any station that generated a frame during Slot transmitted at and has already finished completely.
- Any station that generates a frame during Slot must wait until .
Hence, a collision can only occur if another station transmits at the exact same start boundary (). The vulnerable window is reduced to exactly one slot:
⚖️ Pure vs Slotted ALOHA: Architectural Comparison
Examining the engineering tradeoff between simplicity and slot synchronization
Pure ALOHA Protocol
- •Vulnerable collision time: 2 * Tt (double the frame time).
- •Transmission policy: Transmit immediately whenever data is generated.
- •Synchronization: Completely asynchronous; zero clock coordination required.
- •Maximum Channel Throughput (S_max): 18.4% (occurs at G = 0.5 frames/Tt).
- •Overhead: Extremely simple transmitter hardware, zero synchronization beacons.
Slotted ALOHA Protocol
- •Vulnerable collision time: 1 * Tt (exactly one frame slot duration).
- •Transmission policy: Wait and transmit strictly at next slot boundary.
- •Synchronization: Requires global clock synchronization across all stations.
- •Maximum Channel Throughput (S_max): 36.8% (occurs at G = 1.0 frame/Tt).
- •Overhead: Master station beaconing or GPS receiver sync required on each node.
📐 Rigorous Mathematical Throughput Derivations
Definitions & Parameters
- : Offered Channel Load — the average number of total frame transmission attempts (both newly generated frames and retransmitted collision frames) per frame time .
- : Throughput — the average number of successfully delivered frames per frame time ().
- By definition:
The Poisson Arrival Model
In large networks with many independent stations, frame arrivals follow a Poisson distribution with mean arrival rate frames per second. The probability that exactly frames are generated in a time window of duration is:
Let represent the normalized arrival rate per frame transmission time. For a vulnerable window duration :
The probability of zero collisions is the probability of zero frame arrivals in ():
Derivation for Pure ALOHA
For Pure ALOHA, , so :
Finding Maximum Throughput
To find the load that maximizes throughput , take the first derivative with respect to and set it to zero:
Since , we have:
Substitute into the throughput formula:
Derivation for Slotted ALOHA
For Slotted ALOHA, , so :
Finding Maximum Throughput
Take the first derivative with respect to and set it to zero:
Substitute into the throughput formula:
Key Takeaway: Synchronizing transmissions to discrete time slots eliminates partial overlaps, exactly doubling maximum channel efficiency from () to ().
🏭 Real-World Production Context: Satellite Networks & IoT Uplinks
Why study ALOHA if modern Ethernet and Wi-Fi use CSMA/CD and CSMA/CA?
- Satellite Ground Terminals (VSAT Uplinks): A geostationary satellite orbits above the equator. The propagation delay () to the satellite and back is approximately –. If a ground station attempts to "sense" the channel before transmitting (carrier sensing), the channel status it hears is already out of date! Carrier sensing is completely ineffective over high-latency satellite links. Satellites use Slotted ALOHA for initial terminal registration and bursty reservation requests.
- Cellular Control Channels (LTE / 5G PRACH): When your smartphone transitions from idle sleep mode to active data transfer, it does not yet have a dedicated radio resource block allocated. It transmits a small random preamble over the Physical Random Access Channel (PRACH), which operates on Slotted ALOHA.
- IoT Sensor Networks (LoRaWAN Uplink): Battery-powered smart water meters and agricultural sensors wake up once an hour to transmit a 50-byte reading. Keeping a GPS or receiver powered on to coordinate slots would deplete their 10-year battery. Instead, LoRaWAN devices transmit via Pure ALOHA, keeping circuitry in ultra-low-power sleep 99.9% of the time.
📐 Numerical Applications & Worked Examples
Example 1: Collision-Free Requirement on Pure ALOHA
Problem Statement: A pure ALOHA network transmits frames over a shared wireless channel with a transmission bandwidth of . What is the time requirement between any two consecutive frame generation events to guarantee collision-free transmission?
Step-by-Step Solution:
- Calculate Transmission Time ():
- Determine Vulnerable Window (): In Pure ALOHA, a frame can collide with transmissions initiated in the prior or subsequent :
- Conclusion: To guarantee collision-free operation, no other station must initiate a transmission within before or after the current frame. The arrival gap between distinct frame starts must be strictly greater than .
Example 2: Slotted LAN Transmission Probabilities
Problem Statement: Consider a local area network with four nodes: . Time is divided into synchronized slots of length . In any given slot, each node independently generates a frame with probabilities: Calculate the probability that exactly one station successfully transmits a frame in the first slot without collision.
Step-by-Step Solution:
- Let denote the event that station transmits, and denote the event that station stays silent:
- A successful transmission occurs if and only if one station transmits while all other three remain silent. Because station choices are mutually independent, the total success probability is the sum of four disjoint scenarios:
where:
- Sum the four probabilities:
Example 3: Symmetric -Station Slotted ALOHA
Problem Statement: In a slotted broadcast channel with active stations, each station independently attempts transmission in any given slot with probability .
- Derive the mathematical expression for the probability that exactly one station successfully transmits in a given slot.
- Determine the optimal value of that maximizes system efficiency.
- Show the limiting throughput as .
Step-by-Step Solution:
- Derivation of Success Probability : For a specific station to succeed, must transmit (probability ) and all remaining stations must remain silent (probability ). Since any of the stations can be the successful transmitter:
- Finding the Optimal Attempt Probability :
To maximize , differentiate with respect to and set to 0:
Intuition: To maximize success, the expected number of transmissions per slot () should be exactly equal to .
- Limiting Throughput as : Substitute into : As , recall the fundamental calculus identity : This confirms that Slotted ALOHA achieves a universal asymptotic bound of even when scaled to thousands of contending stations.
Example 4: Channel Capacity & Usable Bit Rate
Problem Statement: A pure ALOHA network operates on a shared channel with a transmission bandwidth of . If each frame is long:
- What is the maximum throughput in frames per second?
- What is the maximum usable data rate of the channel?
Step-by-Step Solution:
- Frame Transmission Time ():
- Channel Capacity in Frames/Second:
- Maximum Throughput ():
- Maximum Usable Data Rate:
🎯 Exam & Interview Pitfall Check
- Why is Pure ALOHA's vulnerable period while Slotted ALOHA's is ? In Pure ALOHA, stations transmit without synchronization. A transmission started at collides with any frame started between and (tail collision) OR between and (head collision), spanning a continuous interval of . In Slotted ALOHA, discrete slot boundaries eliminate all partial overlaps; frames can only collide if stations transmit at the exact same slot boundary, reducing the vulnerable period to .
- At what offered load does Slotted ALOHA achieve maximum throughput? At (meaning an average of 1 transmission attempt per time slot), yielding . For Pure ALOHA, the optimum occurs at , yielding .
- Trap: Assuming equals . is the total offered channel traffic (new frames + retransmitted colliding frames), while is the successful throughput. For any non-zero collision probability, . In heavily congested channels (), throughput drops towards zero as almost all transmissions collide ().
- Trap: Forgetting that Carrier Sensing fails over long-delay satellite links. Interviewers often ask: "Why not use CSMA/CD on satellite links instead of Slotted ALOHA?" Because is . By the time a station senses an idle carrier, another station hundreds of kilometers away transmitted hundreds of milliseconds ago. The carrier sense signal is stale, making CSMA/CD useless on satellite links.