Random Access Protocols (ALOHA & CSMA)
When multiple devices share a single communication channel, MAC protocols prevent chaotic collisions. ALOHA allows immediate or slot-bound transmissions, leading to frequent collisions under heavy traffic. CSMA improves on this by forcing nodes to sense the carrier's state (busy or idle) before attempting to send data.
Learning Goals
- Multi-access environment and the need for MAC sublayer protocols.
- Pure ALOHA vs. Slotted ALOHA: Working mechanics, vulnerable time, and throughput comparison.
- CSMA (Carrier Sense Multiple Access): "Listen before talk" philosophy.
- CSMA Persistence strategies: 1-persistent, Non-persistent, and p-persistent.
- Calculate the maximum throughput of Pure ALOHA ($18.4\%$) versus Slotted ALOHA ($36.8\%$).
- Explain how persistence strategies dictate a node's behavior when it finds the channel busy or idle.
In the MAC sublayer of the data link layer, multiple nodes may compete for the same broadcast channel. In such a multi-access environment, uncoordinated transmissions can overlap, causing collisions. Random access protocols were developed to manage this contention without centralized control, making them especially useful when traffic is bursty and the set of active senders changes dynamically.2
Two foundational families are ALOHA and CSMA. ALOHA transmits first and resolves collisions afterward, whereas CSMA follows the “listen before talk” principle by sensing the channel before sending.2 This distinction has major consequences for collision probability, vulnerable time, and achievable throughput.2
At a high level, the progression is:
- Pure ALOHA: transmit whenever ready.
- Slotted ALOHA: transmit only at slot boundaries to reduce collisions.2
- CSMA: sense the medium first to reduce unnecessary overlap.2
Within Network Theory, these protocols illustrate how protocol rules alter contention behavior mathematically and operationally.2
Footnotes
-
Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA. ↩ ↩2 ↩3 ↩4 ↩5 ↩6
-
COMPUTER NETWORKS - CS-204 Lecture Notes, Banaras Hindu University - Lecture notes covering ALOHA vulnerable periods, throughput derivations, and comparative MAC protocol behavior. ↩ ↩2 ↩3
-
Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods. ↩ ↩2 ↩3
-
Carrier Sense Multiple Access (CSMA) - GeeksforGeeks - Describes CSMA operation and key persistence strategies in accessible protocol terms. ↩
ALOHA and CSMA Protocols Overview
Why the MAC Sublayer Matters
On a shared link, successful communication depends not only on framing and addressing but also on deciding who may transmit next. Random access protocols solve this coordination problem in a distributed way.2
Footnotes
-
Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods. ↩
-
CSCI 460 Medium Access Control Notes, Vancouver Island University - Provides context for the MAC sublayer, channel allocation problem, and why contention methods are needed. ↩
Why Random Access Is Needed
Static channel allocation methods such as fixed time or frequency partitioning work well when the number of users and traffic demands are predictable. In practical networks, however, traffic is often bursty: many nodes may be idle for long periods and then suddenly attempt transmission together. In this setting, dynamic contention-based access can be more efficient than rigid pre-allocation.
Random access protocols therefore assume:
- A shared medium is available to all stations.
- Stations act independently, without central scheduling.
- Collisions can occur and must be tolerated or mitigated.2
- Retransmission after failure is part of normal operation.
A useful performance variable is the offered load, denoted by . Successful throughput is denoted by .2 In ALOHA analysis, transmissions are commonly modeled using a Poisson attempt process, which leads to compact expressions for success probability and throughput.
The design goal is to maximize while keeping delay and collision rate acceptable. This is why vulnerable time and persistence behavior are central concepts.2
Footnotes
-
CSCI 460 Medium Access Control Notes, Vancouver Island University - Provides context for the MAC sublayer, channel allocation problem, and why contention methods are needed. ↩ ↩2
-
Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods. ↩ ↩2 ↩3 ↩4
-
Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA. ↩ ↩2 ↩3
-
COMPUTER NETWORKS - CS-204 Lecture Notes, Banaras Hindu University - Lecture notes covering ALOHA vulnerable periods, throughput derivations, and comparative MAC protocol behavior. ↩ ↩2
Conceptual Evolution of Random Access Protocols
Pure ALOHA
Stage 1A station transmits whenever a frame is ready, with no prior sensing or slot synchronization."
Footnotes
-
Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA. ↩
Slotted ALOHA
Stage 2Time is divided into synchronized slots, and transmissions may begin only at slot boundaries, halving the vulnerable period.2"
Footnotes
-
Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA. ↩
-
COMPUTER NETWORKS - CS-204 Lecture Notes, Banaras Hindu University - Lecture notes covering ALOHA vulnerable periods, throughput derivations, and comparative MAC protocol behavior. ↩
CSMA
Stage 3Stations sense the channel before transmission, reducing collisions compared with ALOHA by avoiding obviously busy periods.2"
Footnotes
-
Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods. ↩
-
Carrier Sense Multiple Access (CSMA) - GeeksforGeeks - Describes CSMA operation and key persistence strategies in accessible protocol terms. ↩
CSMA Persistence Variants
Stage 4Different persistence rules determine how aggressively a station behaves after finding the channel idle or busy.2"
Footnotes
-
Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods. ↩
-
Carrier Sense Multiple Access (CSMA) - GeeksforGeeks - Describes CSMA operation and key persistence strategies in accessible protocol terms. ↩
Pure ALOHA
In Pure ALOHA, a station sends as soon as it has a frame. There is no carrier sensing and no slot synchronization. This simplicity is attractive, but collisions are common because any overlapping transmissions corrupt each other.2
If each frame requires transmission time , then a frame is vulnerable to collision from transmissions that begin up to one frame time before its start and up to one frame time after its start. Thus, the vulnerable period is:
This leads to the classical throughput relation:
where:
- is the offered load in frames per frame time,
- is the successful throughput in frames per frame time.2
The maximum throughput is obtained by differentiating:
Setting gives:
Substituting into :
So the maximum channel utilization of Pure ALOHA is:
This is low, but it establishes the baseline for random-access contention analysis.2
Footnotes
-
Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA. ↩ ↩2 ↩3 ↩4
-
CSCI 460 Medium Access Control Notes, Vancouver Island University - Provides context for the MAC sublayer, channel allocation problem, and why contention methods are needed. ↩
-
COMPUTER NETWORKS - CS-204 Lecture Notes, Banaras Hindu University - Lecture notes covering ALOHA vulnerable periods, throughput derivations, and comparative MAC protocol behavior. ↩ ↩2
Core Limitation of Pure ALOHA
Because transmission can begin at any instant, the vulnerable interval is large: . This directly causes the low maximum throughput of only .2
Footnotes
-
Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA. ↩
-
COMPUTER NETWORKS - CS-204 Lecture Notes, Banaras Hindu University - Lecture notes covering ALOHA vulnerable periods, throughput derivations, and comparative MAC protocol behavior. ↩
Slotted ALOHA
Slotted ALOHA improves Pure ALOHA by dividing time into slots of length and allowing transmission only at the beginning of a slot.2 This requires global time synchronization, but it sharply reduces the collision window.
Because frames can begin only at slot boundaries, a frame is threatened only by other frames transmitted in the same slot. Therefore:
The throughput becomes:
To find the maximum:
Setting yields:
Thus:
So the maximum throughput is:
This is exactly double the maximum throughput of Pure ALOHA because slotting halves the vulnerable period.2
A compact comparison is shown below.
| Property | Pure ALOHA | Slotted ALOHA |
|---|---|---|
| Transmission start time | Anytime | Only at slot boundary |
| Synchronization required | No | Yes |
| Vulnerable time | ||
| Throughput formula | ||
| Load at maximum throughput | ||
| Maximum throughput |
Footnotes
-
Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA. ↩ ↩2 ↩3
-
COMPUTER NETWORKS - CS-204 Lecture Notes, Banaras Hindu University - Lecture notes covering ALOHA vulnerable periods, throughput derivations, and comparative MAC protocol behavior. ↩ ↩2 ↩3
Maximum Throughput Comparison
Theoretical peak throughput of ALOHA variants
How to Compute ALOHA Maximum Throughput
- 1Step 1
For Pure ALOHA use . For Slotted ALOHA use .2
Footnotes
-
Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA. ↩
-
COMPUTER NETWORKS - CS-204 Lecture Notes, Banaras Hindu University - Lecture notes covering ALOHA vulnerable periods, throughput derivations, and comparative MAC protocol behavior. ↩
-
- 2Step 2
Apply standard differentiation to find where throughput stops increasing. This gives for Pure ALOHA and for Slotted ALOHA.
Footnotes
-
COMPUTER NETWORKS - CS-204 Lecture Notes, Banaras Hindu University - Lecture notes covering ALOHA vulnerable periods, throughput derivations, and comparative MAC protocol behavior. ↩
-
- 3Step 3
Solve for Pure ALOHA and for Slotted ALOHA, obtaining and respectively.
Footnotes
-
COMPUTER NETWORKS - CS-204 Lecture Notes, Banaras Hindu University - Lecture notes covering ALOHA vulnerable periods, throughput derivations, and comparative MAC protocol behavior. ↩
-
- 4Step 4
For Pure ALOHA, . For Slotted ALOHA, .2
Footnotes
-
Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA. ↩
-
COMPUTER NETWORKS - CS-204 Lecture Notes, Banaras Hindu University - Lecture notes covering ALOHA vulnerable periods, throughput derivations, and comparative MAC protocol behavior. ↩
-
- 5Step 5
Slotted ALOHA doubles the peak throughput because slotting cuts the vulnerable interval from to .2
Footnotes
-
Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA. ↩
-
COMPUTER NETWORKS - CS-204 Lecture Notes, Banaras Hindu University - Lecture notes covering ALOHA vulnerable periods, throughput derivations, and comparative MAC protocol behavior. ↩
-
CSMA: The “Listen Before Talk” Philosophy
Carrier Sense Multiple Access improves on ALOHA by having each station listen to the channel before sending.2 If the medium is busy, a sensible sender should defer rather than knowingly collide with an ongoing frame. This idea is often described as “listen before talk.”
However, CSMA does not eliminate collisions completely. Because of propagation delay, two distant stations may both sense the channel as idle and begin transmission nearly simultaneously.2 Thus, the vulnerable interval in CSMA is tied not to frame time but to propagation effects, often approximated as up to twice the end-to-end propagation delay in classical analysis.
As a result, the relative performance trend is:
in terms of efficiency under comparable assumptions.
Key insight:
- ALOHA ignores channel state.
- CSMA exploits channel state.
- Better information generally reduces collisions, but cannot fully overcome propagation delay.2
Footnotes
-
Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7
-
Carrier Sense Multiple Access (CSMA) - GeeksforGeeks - Describes CSMA operation and key persistence strategies in accessible protocol terms. ↩
-
Lecture 8: Carrier Sense Multiple Access, UC San Diego - Discusses propagation delay, collision persistence in CSMA, and tradeoffs among CSMA variants. ↩ ↩2
-
Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA. ↩
CSMA Persistence Strategies
A persistence strategy tells a node what to do when the medium is found idle or busy.2 This choice strongly affects delay, aggressiveness, and collision probability.
1-Persistent CSMA
In 1-persistent CSMA, a station:
- transmits immediately if the channel is idle,
- keeps listening if the channel is busy,
- transmits at once when the medium becomes idle.2
This strategy is aggressive. Under heavy contention, many waiting nodes may all transmit as soon as the channel becomes free, producing collisions.2
Non-persistent CSMA
In non-persistent CSMA, a station:
- transmits immediately if the channel is idle,
- if busy, waits a random time before sensing again.2
This reduces the chance that many blocked stations attack the channel simultaneously, so it usually lowers collision probability compared with 1-persistent CSMA, though it may increase delay.2
p-Persistent CSMA
In p-persistent CSMA, the channel is slotted. When a node senses the channel idle at a slot boundary, it:
- transmits with probability ,
- defers to the next slot with probability .2
This probabilistic behavior balances aggressiveness and caution. Small lowers collisions but increases waiting; large lowers waiting but raises collision probability.2
| Strategy | If idle | If busy | Main tradeoff |
|---|---|---|---|
| 1-persistent | Send immediately | Keep sensing continuously | Low delay, high collision risk under load |
| Non-persistent | Send immediately | Wait random time, then sense again | Fewer collisions, more delay |
| p-persistent | Send with probability | In slotted form, retry in later slots | Tunable balance via |
Footnotes
-
Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7
-
Carrier Sense Multiple Access (CSMA) - GeeksforGeeks - Describes CSMA operation and key persistence strategies in accessible protocol terms. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7
-
Lecture 8: Carrier Sense Multiple Access, UC San Diego - Discusses propagation delay, collision persistence in CSMA, and tradeoffs among CSMA variants. ↩ ↩2 ↩3
A node senses the channel and transmits immediately when it becomes idle. This minimizes waiting but can create synchronized collisions when many nodes are waiting.2
Footnotes
-
Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods. ↩
-
Lecture 8: Carrier Sense Multiple Access, UC San Diego - Discusses propagation delay, collision persistence in CSMA, and tradeoffs among CSMA variants. ↩
Persistence Is About Behavior, Not Just Formula
When studying CSMA, focus on the decision rule after sensing. Persistence strategies define whether a node is aggressive, cautious, or probabilistic when the channel changes state.2
Footnotes
-
Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods. ↩
-
Carrier Sense Multiple Access (CSMA) - GeeksforGeeks - Describes CSMA operation and key persistence strategies in accessible protocol terms. ↩
Operational Walkthrough of CSMA Persistence
- 1Step 1
A station first checks whether the shared channel is idle or busy before attempting transmission.2
Footnotes
-
Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods. ↩
-
Carrier Sense Multiple Access (CSMA) - GeeksforGeeks - Describes CSMA operation and key persistence strategies in accessible protocol terms. ↩
-
- 2Step 2
In 1-persistent and non-persistent CSMA, the node transmits immediately. In p-persistent CSMA, it transmits with probability and defers with probability .2
Footnotes
-
Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods. ↩
-
Carrier Sense Multiple Access (CSMA) - GeeksforGeeks - Describes CSMA operation and key persistence strategies in accessible protocol terms. ↩
-
- 3Step 3
A 1-persistent node keeps listening continuously. A non-persistent node waits a random time before checking again. A p-persistent node follows its slotted retry rule.2
Footnotes
-
Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods. ↩
-
Carrier Sense Multiple Access (CSMA) - GeeksforGeeks - Describes CSMA operation and key persistence strategies in accessible protocol terms. ↩
-
- 4Step 4
Because propagation delay can make two distant stations misjudge the channel simultaneously, collisions may still happen. The station then waits and retries according to protocol rules.2
Footnotes
-
Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods. ↩
-
Lecture 8: Carrier Sense Multiple Access, UC San Diego - Discusses propagation delay, collision persistence in CSMA, and tradeoffs among CSMA variants. ↩
-
- 5Step 5
The node cycles through sensing, waiting, and retransmission until the frame is delivered successfully or retry limits are reached in a practical system.
Footnotes
-
Carrier Sense Multiple Access (CSMA) - GeeksforGeeks - Describes CSMA operation and key persistence strategies in accessible protocol terms. ↩
-
Frequently Asked Questions and Edge Cases
Synthesis: ALOHA Versus CSMA
From a design perspective, these protocols differ in how much channel-state information they exploit.
- Pure ALOHA uses no sensing and no synchronization.
- Slotted ALOHA uses synchronization but still no carrier sensing.2
- CSMA uses sensing and can also use persistence rules to regulate contention behavior.2
This yields a clear hierarchy of sophistication and usually of performance:
| Protocol | Channel sensing | Synchronization | Collision reduction method | Peak theoretical throughput |
|---|---|---|---|---|
| Pure ALOHA | No | No | None beyond retransmission | 2 |
| Slotted ALOHA | No | Yes | Slot boundaries reduce overlap | 2 |
| CSMA | Yes | Sometimes depends on variant | Avoid transmitting on busy channel | Higher than ALOHA, depends on delay and persistence |
The central lesson for the MAC sublayer is that protocol rules shape contention outcomes. Reducing uncertainty about when others may transmit, either by synchronization or sensing, increases efficiency.2
Footnotes
-
Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA. ↩ ↩2 ↩3 ↩4 ↩5
-
COMPUTER NETWORKS - CS-204 Lecture Notes, Banaras Hindu University - Lecture notes covering ALOHA vulnerable periods, throughput derivations, and comparative MAC protocol behavior. ↩ ↩2 ↩3
-
Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods. ↩ ↩2 ↩3
-
Carrier Sense Multiple Access (CSMA) - GeeksforGeeks - Describes CSMA operation and key persistence strategies in accessible protocol terms. ↩
Do Not Confuse Throughput with Offered Load
measures attempted traffic, while measures successful traffic. Increasing beyond the optimal point causes more collisions, so throughput can actually decrease.2
Footnotes
-
Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA. ↩
-
COMPUTER NETWORKS - CS-204 Lecture Notes, Banaras Hindu University - Lecture notes covering ALOHA vulnerable periods, throughput derivations, and comparative MAC protocol behavior. ↩
Knowledge Check
What is the vulnerable time in Pure ALOHA when each frame takes to transmit?