Sub topic 14
Efficiency of CSMA/CD
This chapter assumes you know transmission delay (Tt = frame bits / bandwidth), propagation delay (Tp = distance / signal speed), the slot time from the minimum-frame-size chapter, and basic probability. Efficiency is the fraction of channel time spent carrying successful frames. The rest is lost to collisions, backoff, and waiting.
The parameter a
The ratio of propagation delay to transmission delay controls CSMA/CD efficiency:
a = Tp / Tt
- A small a means the frame is long compared with the cable. A collision is detected quickly and little time is wasted.
- A large a means a station can finish sending before the signal reaches the far end. Stations then fail to hear each other, and collisions waste more time.
Three things raise a: higher bandwidth (shorter Tt), longer cable (longer Tp), and shorter frames (shorter Tt). Because a valid frame must last at least one slot time, Tt ≥ 2Tp, so a ≤ 0.5 whenever frames are at the minimum size or larger.
Where the formula comes from
Under heavy load the channel alternates between contention intervals and successful transmissions. The derivation has three steps.
- Probability that a contention slot succeeds. Suppose n stations each transmit in a slot with probability p. A slot succeeds when exactly one station transmits, so A = n·p·(1 − p)^(n−1). This is largest at p = 1/n, which gives A = (1 − 1/n)^(n−1). For large n, A approaches 1/e ≈ 0.368.
- Mean length of contention. A contention slot lasts 2Tp, the time needed to be sure no collision is coming. The number of slots until the first success is geometric. Its mean is 1/A = e ≈ 2.718 slots, so the mean contention interval is 2Tp·e.
- Efficiency. Useful time is Tt per frame. Overhead is the contention interval.
Efficiency = Tt / (Tt + 2e·Tp) = 1 / (1 + 2e·a) = 1 / (1 + 5.44a)
Many GATE solutions also add one more Tp for the final frame to reach the receiver:
Efficiency = Tt / (Tt + Tp + 2e·Tp) = 1 / (1 + 6.44a)
Worked example
A 10 Mbps Ethernet segment has a one-way propagation delay of 25.6 µs, which gives a slot time of 51.2 µs. Compute the efficiency for a 1000-byte frame and for a 64-byte frame.
For 1000 bytes:
- Tt = 8000 bits / 10^7 bps = 800 µs.
- a = 25.6 / 800 = 0.032.
- Efficiency = 1 / (1 + 6.44 × 0.032) = 1 / 1.20608 ≈ 0.829.
For 64 bytes:
- Tt = 512 bits / 10^7 bps = 51.2 µs.
- a = 25.6 / 51.2 = 0.5.
- Efficiency = 1 / (1 + 6.44 × 0.5) = 1 / 4.22 ≈ 0.237.
Short frames use the channel poorly. Efficiency drops from about 83% to about 24%.
Checking the numbers in code
def csma_cd_efficiency(frame_bits, bandwidth_bps, prop_delay_s, constant=6.44):
"""Efficiency = 1 / (1 + constant * a), where a = Tp / Tt."""
tt = frame_bits / bandwidth_bps
a = prop_delay_s / tt
return 1 / (1 + constant * a)
for bits in (8000, 512):
e644 = csma_cd_efficiency(bits, 10_000_000, 25.6e-6)
e544 = csma_cd_efficiency(bits, 10_000_000, 25.6e-6, constant=5.44)
print(bits, round(e644, 3), round(e544, 3))
# 8000 0.829 0.852
# 512 0.237 0.269Comparing with controlled access
Polling and token passing never collide, so their losses come from waiting for the token or the poll. Take a ring of N stations with total ring propagation delay Tp. Let a = Tp/Tt, and assume every station always has a frame to send.
| Protocol | Cycle time per frame sent | Efficiency |
|---|---|---|
| Token ring, early release (token passed right after sending) | Tt + Tp/N | 1 / (1 + a/N) |
| Token ring, delayed release (token passed after the frame returns) | Tt + Tp + Tp/N | 1 / (1 + a(N + 1)/N) |
| CSMA/CD, heavy load | Tt + Tp + 2e·Tp | 1 / (1 + 6.44a) |
Early-release token passing keeps efficiency high even when a is large, as long as N is large. CSMA/CD degrades as a grows. CSMA/CD wins at light load because a station can send at once, with no waiting for a token.
Edge cases and common errors
- Using a = Tt/Tp. The CSMA/CD parameter is Tp over Tt. Inverting it gives efficiencies above 1 or far too small.
- Using round-trip time for Tp. Tp is one-way. The slot time 2Tp already contains the factor of two.
- Applying the formula at light load. The 1/e success probability assumes many stations always ready to send. With one active station there is no contention, and efficiency approaches 100%, apart from interframe gaps and preamble.
- Forgetting the payload. Efficiency here counts all frame bits as useful. Effective throughput for application data is lower, because the header, the CRC, and the preamble are overhead.
- Ignoring bandwidth scaling. At a fixed frame size and cable length, multiplying bandwidth by 10 multiplies a by 10. This is why Gigabit Ethernet needed carrier extension, which pads short frames to a 512-byte slot, instead of simply keeping the 64-byte minimum.
Reading the formula
Efficiency depends on a alone, so the formula answers design questions directly.
- To reach a target efficiency E, solve a = (1/E − 1)/6.44. For E = 0.9, a ≈ 0.0173.
- For a fixed a, the maximum cable length scales with frame length and inversely with bandwidth.
- Halving the frame length at the same speed and distance doubles a. Efficiency then falls, but not by half, because of the 1 + 6.44a form.
Exercise
A CSMA/CD LAN runs at 100 Mbps. The one-way propagation delay is 5 µs, and frames are 1250 bytes. Using efficiency = 1/(1 + 6.44a), what is the efficiency?
Show answer
Tt = 10000 bits / 10^8 bps = 100 µs. a = 5/100 = 0.05. Efficiency = 1/(1 + 6.44 × 0.05) = 1/1.322 ≈ 0.756, or about 75.6%.
Exercise
A token ring has N = 10 stations and a = 0.5 (total ring Tp over Tt). Compare the efficiency under early release and delayed release.
Show answer
Early release: 1/(1 + a/N) = 1/(1 + 0.05) ≈ 0.952. Delayed release: 1/(1 + a(N + 1)/N) = 1/(1 + 0.5 × 1.1) = 1/1.55 ≈ 0.645. Early release is about 31 percentage points better at this a.
Exercise
Why does the efficiency of CSMA/CD fall when a link's bandwidth is increased from 10 Mbps to 100 Mbps and the frame size and cable length stay fixed?
Show answer
Tt is the frame size divided by bandwidth, so it drops by a factor of 10. Tp stays the same, so a = Tp/Tt rises by a factor of 10. The overhead term 6.44a grows, and efficiency falls.