Coursify

Network Theory

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

  1. 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

  2. COMPUTER NETWORKS - CS-204 Lecture Notes, Banaras Hindu University - Lecture notes covering ALOHA vulnerable periods, throughput derivations, and comparative MAC protocol behavior. 2 3

  3. Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods. 2 3

  4. 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

  1. Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods.

  2. 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:

  1. A shared medium is available to all stations.
  2. Stations act independently, without central scheduling.
  3. Collisions can occur and must be tolerated or mitigated.2
  4. Retransmission after failure is part of normal operation.

A useful performance variable is the offered load, denoted by GG. Successful throughput is denoted by SS.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 SS while keeping delay and collision rate acceptable. This is why vulnerable time and persistence behavior are central concepts.2

Footnotes

  1. 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

  2. Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods. 2 3 4

  3. Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA. 2 3

  4. 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 1

A station transmits whenever a frame is ready, with no prior sensing or slot synchronization."

Footnotes

  1. Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA.

Slotted ALOHA

Stage 2

Time is divided into synchronized slots, and transmissions may begin only at slot boundaries, halving the vulnerable period.2"

Footnotes

  1. Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA.

  2. COMPUTER NETWORKS - CS-204 Lecture Notes, Banaras Hindu University - Lecture notes covering ALOHA vulnerable periods, throughput derivations, and comparative MAC protocol behavior.

CSMA

Stage 3

Stations sense the channel before transmission, reducing collisions compared with ALOHA by avoiding obviously busy periods.2"

Footnotes

  1. Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods.

  2. Carrier Sense Multiple Access (CSMA) - GeeksforGeeks - Describes CSMA operation and key persistence strategies in accessible protocol terms.

CSMA Persistence Variants

Stage 4

Different persistence rules determine how aggressively a station behaves after finding the channel idle or busy.2"

Footnotes

  1. Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods.

  2. 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 TfrT_{fr}, 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:

Vulnerable time for Pure ALOHA=2Tfr\text{Vulnerable time for Pure ALOHA} = 2T_{fr}

This leads to the classical throughput relation:

S=Ge2GS = G e^{-2G}

where:

  • GG is the offered load in frames per frame time,
  • SS is the successful throughput in frames per frame time.2

The maximum throughput is obtained by differentiating:

dSdG=ddG(Ge2G)=e2G(12G)\frac{dS}{dG} = \frac{d}{dG}\left(Ge^{-2G}\right) = e^{-2G}(1 - 2G)

Setting dSdG=0\frac{dS}{dG}=0 gives:

12G=0G=121 - 2G = 0 \Rightarrow G = \frac{1}{2}

Substituting into SS:

Smax=12e1=12e0.184S_{\max} = \frac{1}{2}e^{-1} = \frac{1}{2e} \approx 0.184

So the maximum channel utilization of Pure ALOHA is:

18.4%18.4\%

This is low, but it establishes the baseline for random-access contention analysis.2

Footnotes

  1. Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA. 2 3 4

  2. CSCI 460 Medium Access Control Notes, Vancouver Island University - Provides context for the MAC sublayer, channel allocation problem, and why contention methods are needed.

  3. 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: 2Tfr2T_{fr}. This directly causes the low maximum throughput of only 18.4%18.4\%.2

Footnotes

  1. Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA.

  2. 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 TfrT_{fr} 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:

Vulnerable time for Slotted ALOHA=Tfr\text{Vulnerable time for Slotted ALOHA} = T_{fr}

The throughput becomes:

S=GeGS = G e^{-G}

To find the maximum:

dSdG=ddG(GeG)=eG(1G)\frac{dS}{dG} = \frac{d}{dG}\left(Ge^{-G}\right) = e^{-G}(1-G)

Setting dSdG=0\frac{dS}{dG}=0 yields:

1G=0G=11-G=0 \Rightarrow G=1

Thus:

Smax=1e1=1e0.368S_{\max} = 1 \cdot e^{-1} = \frac{1}{e} \approx 0.368

So the maximum throughput is:

36.8%36.8\%

This is exactly double the maximum throughput of Pure ALOHA because slotting halves the vulnerable period.2

A compact comparison is shown below.

PropertyPure ALOHASlotted ALOHA
Transmission start timeAnytimeOnly at slot boundary
Synchronization requiredNoYes
Vulnerable time2Tfr2T_{fr}TfrT_{fr}
Throughput formulaS=Ge2GS = Ge^{-2G}S=GeGS = Ge^{-G}
Load at maximum throughputG=12G=\frac{1}{2}G=1G=1
Maximum throughput18.4%18.4\%36.8%36.8\%

2

Footnotes

  1. Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA. 2 3

  2. 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

  1. 1
    Step 1

    For Pure ALOHA use S=Ge2GS = Ge^{-2G}. For Slotted ALOHA use S=GeGS = Ge^{-G}.2

    Footnotes

    1. Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA.

    2. COMPUTER NETWORKS - CS-204 Lecture Notes, Banaras Hindu University - Lecture notes covering ALOHA vulnerable periods, throughput derivations, and comparative MAC protocol behavior.

  2. 2
    Step 2

    Apply standard differentiation to find where throughput stops increasing. This gives e2G(12G)e^{-2G}(1-2G) for Pure ALOHA and eG(1G)e^{-G}(1-G) for Slotted ALOHA.

    Footnotes

    1. COMPUTER NETWORKS - CS-204 Lecture Notes, Banaras Hindu University - Lecture notes covering ALOHA vulnerable periods, throughput derivations, and comparative MAC protocol behavior.

  3. 3
    Step 3

    Solve 12G=01-2G=0 for Pure ALOHA and 1G=01-G=0 for Slotted ALOHA, obtaining G=12G=\frac{1}{2} and G=1G=1 respectively.

    Footnotes

    1. COMPUTER NETWORKS - CS-204 Lecture Notes, Banaras Hindu University - Lecture notes covering ALOHA vulnerable periods, throughput derivations, and comparative MAC protocol behavior.

  4. 4
    Step 4

    For Pure ALOHA, Smax=12e0.184S_{\max}=\frac{1}{2e}\approx0.184. For Slotted ALOHA, Smax=1e0.368S_{\max}=\frac{1}{e}\approx0.368.2

    Footnotes

    1. Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA.

    2. COMPUTER NETWORKS - CS-204 Lecture Notes, Banaras Hindu University - Lecture notes covering ALOHA vulnerable periods, throughput derivations, and comparative MAC protocol behavior.

  5. 5
    Step 5

    Slotted ALOHA doubles the peak throughput because slotting cuts the vulnerable interval from 2Tfr2T_{fr} to TfrT_{fr}.2

    Footnotes

    1. Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA.

    2. 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:

CSMA>Slotted ALOHA>Pure ALOHA\text{CSMA} > \text{Slotted ALOHA} > \text{Pure ALOHA}

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

  1. 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

  2. Carrier Sense Multiple Access (CSMA) - GeeksforGeeks - Describes CSMA operation and key persistence strategies in accessible protocol terms.

  3. Lecture 8: Carrier Sense Multiple Access, UC San Diego - Discusses propagation delay, collision persistence in CSMA, and tradeoffs among CSMA variants. 2

  4. 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 pp,
  • defers to the next slot with probability 1p1-p.2

This probabilistic behavior balances aggressiveness and caution. Small pp lowers collisions but increases waiting; large pp lowers waiting but raises collision probability.2

StrategyIf idleIf busyMain tradeoff
1-persistentSend immediatelyKeep sensing continuouslyLow delay, high collision risk under load
Non-persistentSend immediatelyWait random time, then sense againFewer collisions, more delay
p-persistentSend with probability ppIn slotted form, retry in later slotsTunable balance via pp

3

Footnotes

  1. 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

  2. Carrier Sense Multiple Access (CSMA) - GeeksforGeeks - Describes CSMA operation and key persistence strategies in accessible protocol terms. 2 3 4 5 6 7

  3. 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

  1. Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods.

  2. 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

  1. Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods.

  2. Carrier Sense Multiple Access (CSMA) - GeeksforGeeks - Describes CSMA operation and key persistence strategies in accessible protocol terms.

Operational Walkthrough of CSMA Persistence

  1. 1
    Step 1

    A station first checks whether the shared channel is idle or busy before attempting transmission.2

    Footnotes

    1. Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods.

    2. Carrier Sense Multiple Access (CSMA) - GeeksforGeeks - Describes CSMA operation and key persistence strategies in accessible protocol terms.

  2. 2
    Step 2

    In 1-persistent and non-persistent CSMA, the node transmits immediately. In p-persistent CSMA, it transmits with probability pp and defers with probability 1p1-p.2

    Footnotes

    1. Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods.

    2. Carrier Sense Multiple Access (CSMA) - GeeksforGeeks - Describes CSMA operation and key persistence strategies in accessible protocol terms.

  3. 3
    Step 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

    1. Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods.

    2. Carrier Sense Multiple Access (CSMA) - GeeksforGeeks - Describes CSMA operation and key persistence strategies in accessible protocol terms.

  4. 4
    Step 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

    1. Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods.

    2. Lecture 8: Carrier Sense Multiple Access, UC San Diego - Discusses propagation delay, collision persistence in CSMA, and tradeoffs among CSMA variants.

  5. 5
    Step 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

    1. 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:

ProtocolChannel sensingSynchronizationCollision reduction methodPeak theoretical throughput
Pure ALOHANoNoNone beyond retransmission18.4%18.4\%2
Slotted ALOHANoYesSlot boundaries reduce overlap36.8%36.8\%2
CSMAYesSometimes depends on variantAvoid transmitting on busy channelHigher 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

  1. 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

  2. COMPUTER NETWORKS - CS-204 Lecture Notes, Banaras Hindu University - Lecture notes covering ALOHA vulnerable periods, throughput derivations, and comparative MAC protocol behavior. 2 3

  3. Medium Access Sublayer Lecture Notes, King Saud University - Explains MAC contention access, CSMA philosophy, persistence variants, and comparative vulnerable periods. 2 3

  4. Carrier Sense Multiple Access (CSMA) - GeeksforGeeks - Describes CSMA operation and key persistence strategies in accessible protocol terms.

Do Not Confuse Throughput with Offered Load

GG measures attempted traffic, while SS measures successful traffic. Increasing GG beyond the optimal point causes more collisions, so throughput can actually decrease.2

Footnotes

  1. Differences between Pure and Slotted Aloha - GeeksforGeeks - Summarizes working, vulnerable time, throughput formulas, and maximum efficiency of Pure and Slotted ALOHA.

  2. COMPUTER NETWORKS - CS-204 Lecture Notes, Banaras Hindu University - Lecture notes covering ALOHA vulnerable periods, throughput derivations, and comparative MAC protocol behavior.

Knowledge Check

Question 1 of 5
Q1Single choice

What is the vulnerable time in Pure ALOHA when each frame takes TfrT_{fr} to transmit?

Random Access Protocols (ALOHA & CSMA) | Network Theory | Coursify