Medium access: ALOHA, CSMA and CSMA/CD
How stations that share one channel decide who may transmit: random access with ALOHA (pure and slotted, throughput G e^(-2G) and G e^(-G) with maxima 1/(2e) and 1/e), carrier sensing (the persistence variants of CSMA), collision detection and binary exponential backoff, the minimum frame length 2 d R / v that makes collision detection work, and the efficiency of CSMA/CD; formulas are checked by simulation and exact enumeration.
Why it exists
On a shared cable (or a radio channel) only one station may transmit at a time; two simultaneous transmissions collide and both are destroyed. A multiple access protocol is the rule by which stations take turns without a central controller. This is the medium access control (MAC) sublayer of the data link layer. GATE asks for the throughput of ALOHA, the working of CSMA/CD and the minimum frame size.
Prerequisites
You need transmission and propagation delay (performance metrics).
Precise definitions
Multiple access protocols fall into three families (quoted classification): random access (ALOHA, CSMA, CSMA/CD, CSMA/CA: stations transmit when they have data and handle collisions), controlled access (polling, token passing, reservation: stations take turns) and channelisation (TDMA, FDMA, CDMA: the channel is divided in advance). This page treats random access.
Let the frame time be the time to transmit one frame. Let be the offered load: the average number of frame transmission attempts (new frames plus retransmissions) per frame time; let be the throughput: the average number of frames per frame time that are transmitted successfully. , and would mean the channel is always busy with good frames.
Pure ALOHA. A station sends whenever it has a frame; if no acknowledgement comes, it waits a random time and resends. A frame is received correctly only if no other frame overlaps it. Another frame starting within before or after its start overlaps it: the vulnerable period is .
Slotted ALOHA. Time is divided into slots of length and stations may start only at the beginning of a slot. Frames either collide completely or do not overlap at all; the vulnerable period is .
(These formulas assume that attempts form a Poisson process with per frame time.)
Carrier sense multiple access (CSMA). A station listens before it transmits and does not start if the channel is busy. This reduces collisions but cannot remove them: two stations can start within the propagation delay of each other. Variants decide what to do when the channel is busy (quoted): 1-persistent (keep listening and send immediately when it becomes idle; collisions are certain if two stations are waiting), non-persistent (wait a random time and listen again), -persistent (slotted channel: send in the idle slot with probability , else wait for the next slot).
CSMA/CD (collision detection). A station also listens while it transmits. If it detects another signal, it stops, sends a short jam signal so everybody notices, and waits a random time before trying again (binary exponential backoff). Used in classic Ethernet (Ethernet). For the station to detect a collision it must still be transmitting when the collision reaches it, which gives the minimum frame length below.
How it works
ALOHA
Throughput of ALOHA against the offered load: start
Computed by a script, not typed| offered load | pure ALOHA S | slotted ALOHA S |
|---|---|---|
| G = 0.1 | ||
| G = 0.25 | ||
| G = 0.5 | ||
| G = 1.0 | ||
| G = 1.5 | ||
| G = 2.0 | ||
| G = 3.0 |
Step 0
Maximum of pure ALOHA 0.1839 = 1/(2e) at G = 0.5; maximum of slotted ALOHA 0.3679 = 1/e at G = 1. Frame arrivals are a Poisson process (the standard model); a Monte Carlo simulation agrees to within 0.01.
Pure ALOHA tops out at percent of the channel; slotted ALOHA doubles that to percent by halving the vulnerable period. Beyond the optimum more offered load reduces throughput (more collisions). With stations each transmitting in a slot with probability the chance that exactly one transmits is , maximal at :
Slotted ALOHA with n stations, each transmitting with probability 1/n: start
Computed by a script, not typed| stations | P(a slot is used successfully) |
|---|---|
| 1 station | |
| 2 stations | |
| 3 stations | |
| 5 stations | |
| 10 stations | |
| 50 stations | |
| 100 stations |
Step 0
A slot is successful when exactly one station transmits.
and it tends to as grows.
Binary exponential backoff
After the -th collision of the same frame the station chooses at random from and waits slot times; after failed attempts it gives up (the Ethernet constants, quoted). The range doubles after each collision, so the stations spread out quickly:
Binary exponential backoff: start
Computed by a script, not typed| event | range of K | values | mean wait (slots) | P(two stations collide again) | P(still colliding after this round) |
|---|---|---|---|---|---|
| after collision 1 | |||||
| after collision 2 | |||||
| after collision 3 | |||||
| after collision 4 | |||||
| after collision 5 | |||||
| after collision 6 | |||||
| after collision 7 | |||||
| after collision 8 |
Step 0
K is chosen uniformly from 0 … 2^min(i, 10) - 1 after the i-th collision; after 16 attempts the frame is dropped (values from the standard, quoted; the table shows i up to 8).
Two stations that have just collided choose from after the first collision and collide again with probability ; after the second, from , probability ; the probability that they are still colliding after rounds is .
Minimum frame length
Station A starts at time on a cable with one-way propagation delay . The worst case: station B starts just before A's first bit reaches it, at . B notices at once; A notices when B's signal reaches it, at . A must still be transmitting then (otherwise A believes its frame was sent successfully). Hence the transmission time of a frame must be at least :
Minimum frame length for collision detection: start
Computed by a script, not typed| network | round-trip time 2d/v | minimum frame (bits) | minimum frame (bytes) |
|---|---|---|---|
| 10 Mbps, 1 km | |||
| 10 Mbps, 2.5 km | |||
| 100 Mbps, 200 m | |||
| 1 Gbps, 200 m | |||
| 10 Mbps, 2 km, v = 2.5 × 10^8 m/s |
Step 0
A sender must still be sending when the news of a collision, at worst after twice the end-to-end propagation delay, arrives. Signal speed as stated. The standard's 512-bit minimum (64 bytes, 51.2 µs at 10 Mbps) includes margins for repeaters and is larger than the bare value for 2.5 km.
For Mbps and km at m/s: µs, bits. The standard Ethernet minimum is bits ( bytes, µs at Mbps) to allow for repeaters and the jam signal. The faster the network the shorter the cable must be, or the longer the minimum frame.
Efficiency of CSMA/CD
Consider a busy network: each successful frame is preceded by a contention interval made of slots of length . If each of ready stations transmits in a slot with probability , a slot is successful with probability :
Contention slots in CSMA/CD: start
Computed by a script, not typed| stations | P(contention slot succeeds) | mean contention slots |
|---|---|---|
| 2 stations ready | ||
| 5 stations ready | ||
| 10 stations ready | ||
| 100 stations ready | ||
| 1000 stations ready |
Step 0
Each contention slot has the length 2τ (round-trip time); the mean number of slots before a success tends to e.
which tends to , so the mean number of contention slots is about and
The efficiency falls as (propagation delay compared with frame time) grows, which is why long, fast networks need big frames. Other textbooks give slightly different constants (see the verification notes); questions state the formula to use.
Worked examples
EX 1ALOHA throughput
Easy: pure ALOHA ; slotted . At : pure , slotted . If the channel rate is Mbps and frames are bits ( ms), pure ALOHA at its best delivers frames per ms, that is kbps.
EX 2Minimum frame size
MediumMbps, cable km, signal speed m/s: µs, bits ( bytes). With Gbps over m: µs, bits ( bytes).
EX 3Backoff probabilities
MediumTwo stations collide for the first time. Both pick from : they collide again with probability (both or both ), succeed in the next slot... with probability (one picks and the other ). After a second collision they pick from : collide again with probability . Probability that three rounds of collision happen in a row: .
EX 4Typical questions
GATE level(a) "Maximum efficiency of pure ALOHA / slotted ALOHA?" percent, percent. (b) "Vulnerable time of pure ALOHA with frame time ?" . (c) "Why is a minimum frame size needed in CSMA/CD?" So the sender is still transmitting when a collision signal returns. (d) "Bandwidth Mbps, propagation µs: minimum frame?" µs Mbps bits. (e) "After the 3rd collision, the range of ?" to .
Cheat box
Cheat box
- Pure ALOHA , max at ; slotted , max at .
- Vulnerable period: pure , slotted .
- CSMA: listen first; CSMA/CD: listen while sending, jam, backoff.
- Backoff after the -th collision: slots; give up after .
- (transmission time ); Ethernet: bits.
- Efficiency about with (formula varies by book).
Traps and GATE patterns
Connections
Across subjects
No cross-subject links yet.
Ethernet is CSMA/CD with these parameters (Ethernet); modern switched Ethernet has no collisions at all. A detected-bad frame is dropped using the CRC (error detection). The factor is the same quantity that governs the utilisation of stop-and-wait (performance metrics).
PYQs
9 previous year questions from your book. I re-solved each one myself (7 by running or simulating, 2 by reasoning only); the book's key is shown next to my answer. All PYQs
Consider an Ethernet segment with a transmission speed of 108 bits/sec and a maximum segment length of 500 meters. If the maximum speed of propagation of the signal in the medium is 2×108 meters/sec, then the minimum frame size (in bits) required for collision detection is __________.
Consider a network using the pure ALOHA medium access control protocol, where each frame is of length 1,000 bits. The channel transmission rate is 1Mbps(= 106 bits per second). The aggregate number of transmissions across all the nodes (including new frame transmissions and retransmitted frames due to collisions) is modelled as a Poisson process with a rate of 1,000 frames per second. Throughput is defined as the average number of frames successfully transmitted per second. The throughput of the network (rounded to the nearest integer) is ____________
Consider a simple communication system where multiple nodes are connected by a shared broadcast medium (like Ethernet or wireless). The nodes in the system use the following carrier- sense based medium access protocol. A node that receives a packet to transmit will carrier- sense the medium for 5 units of time. COMPUTER NETWORK If the node does not detect any other transmission in this duration, it starts transmitting its packet in the next time unit. If the node detects another transmission, it waits until this other transmission finishes and then begins to carrier-sense for 5 time units again. Once they start to transmit, nodes do not perform any collision detection and continue transmission even if a collision occurs. All transmissions last for 20 units of time. Assume that the transmission signal travels at the speed of 10 meters per unit time in the medium. Assume that the system has two nodes P and Q, located at a distance d meter from each other. P starts transmitting a packet at time t=0 after successfully completing its carrier-sense phase. Node Q has a packet to transmit at time t=0 and begins to carrier-sense the medium. The maximum distance d (in meters, rounded to the closest integer) that allows Q to avoid a collision between its proposed transmission and P's ongoing transmission is _______.
A network has a data transmission bandwidth of 20×106 bits per second. It uses CSMA/CD in the MAC layer. The maximum signal propagation time from one node to another node is 40 microseconds. The minimum size of a frame in the network is ______ bytes.
In an Ethernet local area network, which one of the following statements is TRUE?
- (a)A station stops to sense the channel once it starts transmitting a frame.
- (b)The purpose of the jamming signal is to pad the frames that are smaller than the minimum frame size.
- (c)A station continues to transmit the packet even after the collision is detected.
- (d)The exponential backoff mechanism reduces the probability of collision on retransmissions
Consider a LAN with four nodes S1,S2,S3,S4. Time is divided into fixed-size slots, and a node can begin its transmission only at the beginning of a slot. A collision is said to have occurred if more than one node transmits in the same slot. The probabilities of generation of a frame in a time slot by S1,S2,S3 and S4 are 0.1, 0.2, 0.3, and 0.4, respectively. The probability of sending a frame in the first slot without any collision by any of these four stations is __________.
In a token ring network, the transmission speed is 107 bps and the propagation speed is 200 metres/μs. The 1-bit delay in this network is equivalent to:
- (a)500 metres of cable
- (b)200 metres of cable
- (c)20 metres of cable
- (d)50 metres of cable
There are n stations in a slotted LAN. Each station attempts to transmit with a probability p in each time slot. What is the probability that ONLY one station transmits in a given time slot?
- (a)np(1 - p)n-1
- (b)(1 - p)n-1
- (c)p(1 - p)n-1
- (d)1 - (1 - p)n-1
Suppose the round trip propagation delay for a 10 Mbps Ethernet having 48-bit jamming signal is 46.4 μs. The minimum frame size is:
- (a)94
- (b)416
- (c)464
- (d)512
Self-check
Question 1
Slotted ALOHA, . What is the throughput?
Show answerHide
.
Question 2
A CSMA/CD network at Mbps has minimum frame bits and signal speed m/s. Maximum cable length by the formula?
Show answerHide
m.
Question 3
Why does the backoff range double?
Show answerHide
A collision suggests many stations are competing; choosing from a larger range makes a repeated collision less likely.
Revision card
One-screen revision
- Pure ALOHA (max 18.4 percent), slotted (max 36.8 percent).
- CSMA/CD: listen, jam, binary exponential backoff.
- ; Ethernet bits.
- Collisions possible within one propagation delay.
References
- ·Kurose, Ross, Computer Networking: A Top-Down Approach (8th edition), Chapter 6, Section 6.3 (Multiple access links and protocols)
- ·Tanenbaum, Wetherall, Computer Networks (5th edition), Chapter 4 (The medium access control sublayer), Sections 4.1 and 4.2
- ·Forouzan, Data Communications and Networking (5th edition), Chapter 12 (Multiple access)
Verification
scripts/enum-checks/cn_net_check.py: the throughput formulas S = G e^(-2G) (pure ALOHA) and S = G e^(-G) (slotted) agree with a Monte Carlo simulation of Poisson arrivals (200000 frames per load, tolerance 0.01) at G = 0.25, 0.5, 1, 1.5, their maxima were located by scanning (G = 0.5 and G = 1); the slotted success probability n p (1-p)^(n-1) is maximal at p = 1/n for n = 2..19 and agrees with simulation; after the i-th collision two stations choose from the same range of 2^min(i,10) values and collide again with probability 2^-min(i,10), confirmed by simulation for i = 1..5; the mean number of contention slots 1/(1-1/k)^(k-1) increases towards e from below (2.0 at k = 2, 2.7169 at k = 1000); the minimum frame length L = 2dR/v is the exact condition of the timing model in which the second station starts just before the first bit reaches it. THE CSMA/CD EFFICIENCY FORMULA: the page derives 1/(1 + 2 a e) from the contention-slot model (a = tau / frame time); textbooks give different versions (for example 1/(1 + 5a) as an approximation, 1/(1 + 6.44a) in other books): these are QUOTED/NEEDS VERIFICATION and exam questions state which to use. The persistence variants, the parameters of Ethernet backoff (cap 10, 16 attempts, 51.2 microsecond slot) and CSMA/CA are QUOTED from the textbooks. Textbook chapter references are from memory. SECOND PASS (2026-11-02, done by the assistant, not a human check): every Self-check question was solved before the printed answer was read and all agreed; the definitions, worked examples, cheat box and traps were read claim by claim and the numbers re-derived by hand or by a small script (CRC remainders, binomial tail, checksums); long C programs were not re-read line by line (they are compiled and compared by npm run verify:c, and their printed outputs were checked against the prose). No defect found. Status raised to self-checked; verified needs a textbook or human check.
last verified: never
My notes (saved in this browser)