Data Communication · Lecture 13
Many stations, one medium: ALOHA, CSMA/CD, CSMA/CA, controlled access and channelization
Md Mahbub E Noor · Assistant Professor, Department of CSE, University of Barishal
Course: Data Communication · 2nd Year, 2nd Semester
Lecture 12 gave us
reliable delivery between two nodes on one link.
Today
rules for many stations sharing one link: who may send, and what happens when two send at once.
Reading: Forouzan (5th ed.), Chapter 12
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
2 / 37
No station is in charge; anyone may send, collisions are possible
· ALOHA (pure, slotted)
· CSMA
· CSMA/CD (wired Ethernet)
· CSMA/CA (Wi-Fi)
Stations take turns; a station sends only when authorised
· Reservation
· Polling
· Token passing
The channel is split in frequency, time or code
· FDMA
· TDMA
· CDMA
Why needed: on a broadcast link every station hears every frame. If two transmit at once, their signals add and both frames are destroyed: a collision. The MAC sublayer decides who may send.
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
3 / 37
Stn A
Stn B
Stn C
Stn D
time (one box = one frame time Tfr)
success
collision
This run
9 frames sent
3 survive
No ACK in time?
time-out = 2 × Tp
back off, resend
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
4 / 37
| After attempt K | R chosen from | TB = R × Tp (Tp = 2 ms) |
|---|---|---|
| 1 | 0, 1 | 0 or 2 ms |
| 2 | 0, 1, 2, 3 | 0, 2, 4 or 6 ms |
| 3 | 0 … 7 | 0 … 14 ms |
| K | 0 … 2K − 1 | up to (2K − 1) × 2 ms |
Ex. 12.1: Tp
600 km / (3 × 10⁸ m/s)
2 ms
K = 2
R ∈ {0, 1, 2, 3}
TB = 0, 2, 4, 6 ms
The range doubles after every collision, so a repeat collision becomes less and less likely.
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
5 / 37
Interactive
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
6 / 37
B's frame
A ends late
C starts early
t − Tfr
t
t + Tfr
vulnerable 2 Tfr
Ex. 12.2: Tfr
200 bits / 200 kbps
1 ms
Vulnerable time
2 × 1 ms
2 ms
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
7 / 37
Stn A
Stn B
Stn C
Stn D
time (one box = one frame time Tfr) · grid = slots
success
collision
Same 9 frames, slotted
each start moved to the next slot
7 survive
Vulnerable time
only frames in the same slot collide
1 × Tfr
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
8 / 37
18.4% at G = 0.5
36.8% at G = 1
0
1
2
3
G →
0%
10%
20%
30%
40%
S (throughput)
Pure: max 1/(2e)
S = G e−2G
18.4%
Slotted: max 1/e
S = G e−G
36.8%
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
9 / 37
200-bit frames on a shared 200 kbps channel → Tfr = 1 ms, so G = (frames per second) × 1 ms
| Offered load | Pure ALOHA: S = G e−2G | Slotted ALOHA: S = G e−G |
|---|---|---|
| 1,000 frames/s · G = 1 | 13.5% → 135 frames/s | 36.8% → 368 frames/s |
| 500 frames/s · G = ½ | 18.4% → 92 | 30.3% → 152 (book: 151) |
| 250 frames/s · G = ¼ | 15.2% → 38 | 19.5% → 49 |
Textbook typo (Example 12.4): it writes 1000 × 0.0368 = 368 and 500 × 0.0303 = 151. The factors are 0.368 and 0.303 (500 × 0.3033 = 151.6 ≈ 152).
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
10 / 37
Interactive
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
11 / 37
Checkpoint 1 · 3 minutes
Pure ALOHA, 1 Mbps channel, 1,000-bit frames. What is the vulnerable time?
Slotted ALOHA on the same channel; all stations together send 500 frames per second. How many survive per second?
In one sentence: why does slotting double ALOHA's best throughput?
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
12 / 37
A
B
C
D
B starts (t1)
C starts (t2)
B's signal reaches C (too late)
where bands overlap: collision
time ↓
Vulnerable time
end-to-end propagation
Tp
2 km cable, 2 × 10⁸ m/s
2,000 / (2 × 10⁸)
Tp = 10 µs
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
13 / 37
| Method | Channel idle | Channel busy | Trade-off |
|---|---|---|---|
| 1-persistent | send at once | keep sensing; send the moment it is idle | many collisions (all waiters jump in) |
| Non-persistent | send at once | wait a random time, sense again | fewer collisions, idle gaps |
| p-persistent | send with probability p; else wait a slot | keep sensing until idle | balance; needs time slots |
p = 0.2: send in 1st slot
probability p
20%
Still waiting after 3 slots
(1 − p)³ = 0.8³
51.2%
Average wait
1 / p
5 slots
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
14 / 37
Interactive
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
15 / 37
A
B
C
D
A starts t1
C starts t2
C detects t3
A detects t4
collision
time ↓
sense (persistence)
send + listen
collision? jam
backoff, retry
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
16 / 37
Tfr ≥ 2 × Tp
Lmin = R × 2Tp
Ex. 12.5: 2 Tp
2 × 25.6 µs
51.2 µs
Minimum frame
10 Mbps × 51.2 µs
512 bits = 64 B
| Rate, 64-byte frame | Tfr | Max Tp | Max cable (2 × 10⁸ m/s) |
|---|---|---|---|
| 10 Mbps | 51.2 µs | 25.6 µs | 5.12 km* |
| 100 Mbps | 5.12 µs | 2.56 µs | 512 m |
| 1 Gbps | 0.512 µs | 0.256 µs | 51.2 m |
* Tp in Ex. 12.5 includes repeater and device delays, so real 10 Mbps networks were limited to 2.5 km.
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
17 / 37
Interactive
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
18 / 37
Checkpoint 2 · 3 minutes
CSMA/CD at 100 Mbps; maximum propagation time (with device delays) is 10 µs. What is the minimum frame size?
Ethernet slot time is 51.2 µs. After the 3rd collision, what range does R come from, and what is the longest wait?
Why can't a Wi-Fi station simply use CSMA/CD?
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
19 / 37
busy
IFS
contention window: R slots
send
| Tool | How it avoids collisions |
|---|---|
| IFS (interframe space) | wait a little even when idle: a distant station's signal may still be on its way; a shorter IFS = higher priority |
| Contention window | wait a random number of slots (binary exponential); the timer pauses while the channel is busy |
| ACK + timer | no collision detection, so the receiver must confirm every frame |
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
20 / 37
RTS
CTS
Data
ACK
DIFS
SIFS
SIFS
SIFS
A (source)
B (destination)
C (other)
NAV
hears CTS
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
21 / 37
Interactive
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
23 / 37
5
4
3
2
1
0
1
1
0
1
Data 1
Data 3
Data 4
5
4
3
2
1
0
0
0
0
1
Data 1
5
4
3
2
1
0
0
0
0
0
Interval 1: minislots 1, 3, 4 set → those stations send · interval 2: only station 1 · then nobody
A primary asks each secondary in turn: poll (have you data?) or select (are you ready to receive?)
A special frame, the token, circulates on a logical ring; only its holder may send
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
24 / 37
1
2
3
4
token
| Physical layout | Note |
|---|---|
| Ring | one broken link stops all |
| Dual ring | spare ring (FDDI) |
| Bus ring | token bus: next address in token |
| Star ring | hub bypasses failures (IBM Token Ring) |
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
25 / 37
time →
f
own band all the time; guard bands between
time →
f
whole band, own time slot; guard times
Example: GSM uses both
124 carriers × 8 time slots
992 channels
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
26 / 37
| Rule | Example (N = 4) |
|---|---|
| Bit 1 → +1, bit 0 → −1, silent → 0 | data di ∈ {+1, −1, 0} |
| Send di × ci (each chip × data) | −1 × [+1 −1 +1 −1] = [−1 +1 −1 +1] |
| Channel = sum of all stations | add chip by chip |
| Same code: c · c = N | [+1 +1 −1 −1] · [+1 +1 −1 −1] = 4 |
| Different codes: ci · cj = 0 | [+1 +1 −1 −1] · [+1 +1 +1 +1] = 0 |
| Decode: (channel · ci) / N | gives di: +1, −1 or 0 |
Analogy: in one room, pairs talk in different languages; each listener filters out everything not in its own language.
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
27 / 37
| Stn | Data | Code c | d × c |
|---|---|---|---|
| 1 | bit 0 → −1 | [+1 +1 +1 +1] | [−1 −1 −1 −1] |
| 2 | bit 0 → −1 | [+1 −1 +1 −1] | [−1 +1 −1 +1] |
| 3 | silent → 0 | [+1 +1 −1 −1] | [0 0 0 0] |
| 4 | bit 1 → +1 | [+1 −1 −1 +1] | [+1 −1 −1 +1] |
| channel | [−1 −1 −3 +1] |
Station 3 listens to station 2
[−1 −1 −3 +1] · [+1 −1 +1 −1] = −1 +1 −3 −1
-4 / 4 = −1 → bit 0
Textbook typos: Fig. 12.26 labels C2 as [+1 +1 +1 −1] and d2·c2 as [−1 −1 −1 +1]; correct: [+1 −1 +1 −1] and [−1 +1 −1 +1]. The text then says “→ bit 1”: −1 means bit 0.
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
28 / 37
| Stn | Data | Code c | d × c |
|---|---|---|---|
| 1 | bit 1 → +1 | [+1 +1 +1 +1] | [+1 +1 +1 +1] |
| 2 | bit 1 → +1 | [+1 −1 +1 −1] | [+1 −1 +1 −1] |
| 3 | bit 0 → −1 | [+1 +1 −1 −1] | [−1 −1 +1 +1] |
| 4 | silent → 0 | [+1 −1 −1 +1] | [0 0 0 0] |
| channel | [+1 −1 +3 +1] |
| Stn | channel · code | Sum | ÷ 4 | Result |
|---|---|---|---|---|
| 1 | +1×+1 −1×+1 +3×+1 +1×+1 | +4 | +1 | bit 1 |
| 2 | +1×+1 −1×−1 +3×+1 +1×−1 | +4 | +1 | bit 1 |
| 3 | +1×+1 −1×+1 +3×−1 +1×−1 | −4 | −1 | bit 0 |
| 4 | +1×+1 −1×−1 +3×−1 +1×+1 | 0 | 0 | silent |
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
29 / 37
W1
+1
W2
+1
+1
+1
−1
W4
+1
+1
+1
+1
+1
−1
+1
−1
+1
+1
−1
−1
+1
−1
−1
+1
W2N = [ WN WN ; WN −WN ]
copy, copy, copy, complement
Ex. 12.6: two stations
[+1 +1] and [+1 −1]
rows of W2
Ex. 12.7: 90 stations
2m ≥ 90 → m = 7
N = 128
W8 (blue +1, orange −1)
+1
+1
+1
+1
+1
+1
+1
+1
+1
−1
+1
−1
+1
−1
+1
−1
+1
+1
−1
−1
+1
+1
−1
−1
+1
−1
−1
+1
+1
−1
−1
+1
+1
+1
+1
+1
−1
−1
−1
−1
+1
−1
+1
−1
−1
+1
−1
+1
+1
+1
−1
−1
−1
−1
+1
+1
+1
−1
−1
+1
−1
+1
+1
−1
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
30 / 37
Interactive
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
31 / 37
| Method | Family | Collisions | Efficiency | Where used |
|---|---|---|---|---|
| Pure ALOHA | random | yes | 18.4% | first radio LAN |
| Slotted ALOHA | random | yes | 36.8% | random-access requests (satellite, cellular) |
| CSMA/CD | random | detected, aborted | high on short LANs | classic shared Ethernet |
| CSMA/CA | random | avoided (IFS, backoff, RTS/CTS) | good | Wi-Fi (802.11) |
| Reservation / polling / token | controlled | none | high, with overhead | token ring, FDDI, Bluetooth polling |
| FDMA / TDMA / CDMA | channelization | none | fixed share | 1G / 2G (GSM) / 3G cellular |
Random access suits bursty traffic and many idle stations; controlled access and channelization suit steady traffic and guaranteed delay.
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
32 / 37
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
33 / 37
Click the video to play or pause · Press → for full screen
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
34 / 37
Checkpoint 3 · 3 minutes
CDMA with W4: station 1 sends 1, station 2 is silent, station 3 sends 1, station 4 sends 0. What is on the channel? Decode station 3.
How many chips per bit does a CDMA network of 20 stations need?
In a token ring, the station holding the token crashes. What goes wrong, and what fixes it?
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
36 / 37
Next lecture
Radio propagation, antennas, path loss and fading, Wi-Fi and cellular concepts: where CSMA/CA and channelization are used.
Reading: Forouzan, Chapters 15 and 16 · Practise in the Multiple Access Lab
Md Mahbub E Noor
Lecture 13: Multiple Access
University of Barishal
37 / 37