Loading content...
We've explored two extreme strategies for CSMA behavior:
Each has clear disadvantages. 1-persistent causes guaranteed collisions among waiting stations. Non-persistent wastes channel capacity with unnecessary idle time.
p-Persistent CSMA offers an elegant middle ground: when sensing an idle channel, transmit with probability p < 1, and defer to the next slot with probability 1-p. This introduces controlled randomization that spreads transmissions over time, reducing collisions without abandoning the channel entirely.
By the end of this page, you will understand: (1) The p-persistent CSMA algorithm and its slotted structure, (2) Why probabilistic transmission reduces collisions, (3) How to choose the optimal value of p, (4) Mathematical throughput analysis, and (5) How p-persistent relates to 1-persistent and non-persistent as special cases.
The key insight behind p-persistent CSMA is this: even when the channel appears idle, multiple stations may be ready to transmit simultaneously. If all of them transmit immediately (as in 1-persistent), they collide.
What if, instead of everyone transmitting, each station flips a biased coin to decide whether to transmit?
If p = 0.3 and three stations are ready:
By choosing p appropriately, we can dramatically reduce collision probability!
| N Stations | p = 1.0 | p = 0.5 | p = 0.3 | p = 0.1 |
|---|---|---|---|---|
| 2 | 100% | 25% | 9% | 1% |
| 3 | 100% | 12.5% | 2.7% | 0.1% |
| 5 | 100% | 3.1% | 0.24% | 0.001% |
| 10 | 100% | 0.1% | 0.0006% | ~0% |
Randomization is a powerful technique for breaking symmetry. When multiple identical processes (stations) face the same situation (idle channel), deterministic behavior leads to identical actions (collision). Random decisions create diversity, allowing one to succeed while others wait.
p-persistent CSMA operates in a slotted time structure. Time is divided into slots, where each slot duration typically equals the maximum propagation delay (τ). This slotting is crucial for synchronizing station behavior.
Note: Unlike slotted ALOHA where slots equal frame transmission time, p-persistent CSMA uses slots equal to propagation delay—much shorter.
Key characteristics:
Let's trace through p-persistent behavior with p = 0.5 (50% transmission probability per idle slot).
Scenario: Three waiting stations
Station X finishes transmitting. Stations A, B, C are all waiting with frames to send. Time is slotted with slot duration = τ.
Slot 1: Channel becomes idle
| Station | Random r | Action |
|---|---|---|
| A | 0.23 | r < 0.5 → TRANSMIT |
| B | 0.71 | r > 0.5 → Wait |
| C | 0.45 | r < 0.5 → TRANSMIT |
Collision! Both A and C transmitted.
After collision resolution (both back off)...
Stations A and C enter collision backoff. Station B still has its original frame.
Alternative scenario (same setup, different random values):
Slot 1:
| Station | Random r | Action |
|---|---|---|
| A | 0.82 | r > 0.5 → Wait |
| B | 0.91 | r > 0.5 → Wait |
| C | 0.67 | r > 0.5 → Wait |
No transmission! All three deferred.
Slot 2:
| Station | Random r | Action |
|---|---|---|
| A | 0.31 | r < 0.5 → TRANSMIT |
| B | 0.55 | r > 0.5 → Wait |
| C | 0.88 | r > 0.5 → Wait |
Success! Only A transmitted. B and C will try in subsequent slots.
Slot 2 + Transmission time: A is transmitting. B and C sense busy, monitor.
After A finishes:
Slot 1 (after A):
| Station | Random r | Action |
|---|---|---|
| B | 0.42 | r < 0.5 → TRANSMIT |
| C | 0.78 | r > 0.5 → Wait |
Success! B transmits. C defers again.
Eventually, C transmits successfully.
In the alternative scenario, all three stations succeeded without any collision! The random coin flips naturally spread transmissions across slots. While collisions are still possible, they're probabilistically reduced.
The performance of p-persistent CSMA depends critically on the choice of p. But what's the optimal value?
The tradeoff:
Optimal p depends on the number of competing stations (N):
If N stations are waiting, we want exactly ONE to transmit on average. This suggests:
$$p_{optimal} \approx \frac{1}{N}$$
With this choice:
| N Stations | Optimal p | P(exactly 1 transmits) | P(collision) |
|---|---|---|---|
| 2 | 0.50 | 50% | 25% |
| 3 | 0.33 | 45% | 26% |
| 5 | 0.20 | 41% | 26% |
| 10 | 0.10 | 39% | 26% |
| 20 | 0.05 | 38% | 26% |
| ∞ | 1/N → 0 | ~37% (1/e) | ~26% |
The estimation problem:
The optimal p depends on N, the number of competing stations. But how can a station know N at any given moment? This is a fundamental challenge:
Solutions in practice:
The IEEE 802.11 approach: WiFi doesn't use pure p-persistent CSMA but uses a contention window that effectively adapts p. The window doubles after each collision (lowering effective p) and resets after success.
As N → ∞ with p = 1/N, the probability that exactly one station transmits approaches 1/e ≈ 36.8%. This is the same limit we saw in slotted ALOHA! The connection isn't coincidental—both systems use the 'optimal' strategy of one expected transmission per opportunity.
Let's analyze the throughput of p-persistent CSMA mathematically.
Model:
Simplified throughput derivation:
The analysis is complex due to the slotted structure and persistent monitoring. For the case when a << 1 (small slots relative to frame time), the throughput can be approximated as:
$$S \approx \frac{G \cdot e^{-G} \cdot (1 + a)}{1 + e^{-G}(1 - p^{-1})}$$
For the special case when p = 1 (1-persistent): $$S = \frac{G \cdot e^{-G} \cdot (1 + G + aG(1 + G + aG/2))}{\text{complex denominator}}$$
Throughput behavior:
| p Value | Behavior | Best For |
|---|---|---|
| p → 0 | Very low throughput (too much deferral) | Never optimal |
| p small | Low collisions but high idle time | High N scenarios |
| p optimal | Maximum throughput | Matching N |
| p large | High collisions | Low N scenarios |
| p = 1 | Reduces to 1-persistent | Very light load |
| p | Throughput S | Collision Rate | Idle Ratio |
|---|---|---|---|
| 0.05 | 0.51 | Low | High |
| 0.1 | 0.56 | Low-Medium | Medium-High |
| 0.2 | 0.52 | Medium | Medium |
| 0.3 | 0.48 | Medium-High | Low-Medium |
| 0.5 | 0.41 | High | Low |
| 1.0 | 0.35 | Very High | Zero |
Notice that throughput varies significantly with p. Choosing wrong p can reduce throughput by 20-30% compared to optimal. This sensitivity is why adaptive mechanisms (like 802.11's contention window) are preferred in practice over static p values.
The p-persistent framework provides a unifying view of CSMA variants. By adjusting p and channel-busy behavior, we can derive other protocols as special cases.
p-persistent generalizes CSMA:
| Protocol | Transmission Probability | When Busy | Effect |
|---|---|---|---|
| 1-Persistent | p = 1 | Monitor continuously | Maximum urgency, high collisions at load |
| Non-Persistent | p = 1 when idle | Random backoff (no monitoring) | Breaks synchronization but wastes idle time |
| p-Persistent | 0 < p < 1 | Monitor continuously | Tunable tradeoff |
| Slotted ALOHA | p per slot | No sensing | No carrier sensing; base case |
The spectrum of aggressiveness:
We can order CSMA variants by how 'aggressively' they attempt transmission:
← More Conservative More Aggressive →
Non-Persistent → p-Persistent (p small) → p-Persistent (p large) → 1-Persistent
Since optimal p depends on current load (unknown at transmission time), the best practical approach is adaptive: start aggressive, become more conservative after collisions. This is essentially what exponential backoff achieves—dynamically adjusting the effective transmission probability based on observed congestion.
Implementing p-persistent CSMA requires careful attention to several practical considerations.
Slotting requirements:
Random number generation:
Each decision requires a uniform random number in [0, 1]:
Collision handling:
p-persistent reduces but doesn't eliminate collisions. When collisions occur:
Pure p-persistent CSMA is rarely used in practice because: (1) Slot synchronization adds complexity, (2) Static p is suboptimal for varying loads, (3) Adaptive mechanisms like exponential backoff perform better. However, p-persistent concepts influence modern protocols—the slot time and contention window in 802.11 reflect p-persistent ideas.
p-persistent CSMA introduces controlled randomization to the transmission decision. When sensing an idle channel, stations transmit with probability p (not certainty), spreading transmissions over time and reducing collisions.
What's next:
We've now covered the three major persistence strategies:
The final page of this module brings these together in a comprehensive efficiency analysis. We'll derive and compare throughput formulas, plot efficiency curves, and understand when each protocol excels. This completes our understanding of CSMA protocols.
You now understand p-persistent CSMA: its probabilistic algorithm, how to choose p optimally, its relationship to other CSMA variants, and practical implementation considerations. Next, we'll complete the module with a comprehensive efficiency comparison of all CSMA protocols.