Data Link Layer and Medium Access Sub Layer · Computer Networks

Multiple Access Protocols — Pure ALOHA, Slotted ALOHA, CSMA/CD, CDMA/CA

Watch lectures

Multiple Access Protocols: Pure ALOHA, Slotted ALOHA, CSMA/CD, and CSMA/CA


1. Overview of Contention-Based Multiple Access

When multiple devices share a broadcast channel, protocols are required to mediate access and resolve contention. The four foundational random access protocols are:

                            MULTIPLE ACCESS PROTOCOLS
                                        |
       +--------------------+-----------+-----------+--------------------+
       |                    |                       |                    |
  Pure ALOHA           Slotted ALOHA             CSMA/CD              CSMA/CA
 (Asynchronous)      (Slot-Synchronized)      (Wired Ethernet)     (Wireless Wi-Fi)

2. Pure ALOHA

  • Principle: A station transmits immediately whenever it has a frame ready ("talk before listening").
  • Vulnerable Time: Two full frame durations:
Vt=2×TfrV_t = 2 \times T_{fr}
  • Throughput Formula: Poisson arrival distribution with average rate GG:
S=G⋅e−2GS = G \cdot e^{-2G}
  • Maximum Throughput: Achieved at traffic load G=0.5G = 0.5:
Smax⁡=12e≈0.184(18.4%)S_{\max} = \frac{1}{2e} \approx \mathbf{0.184 \quad (18.4\%)}
                t0 - Tfr           t0              t0 + Tfr
  Frame A:          |                [======= Tfr =====]
  Vulnerable Zone:  |<----------------- 2 * Tfr ----------------->|

3. Slotted ALOHA

  • Principle: Time is sliced into discrete synchronous slots of duration TfrT_{fr}. Stations can only begin transmission at the start of a time slot.
  • Vulnerable Time: Exactly one frame duration:
Vt=1×TfrV_t = 1 \times T_{fr}
  • Throughput Formula:
S=G⋅e−GS = G \cdot e^{-G}
  • Maximum Throughput: Achieved at traffic load G=1.0G = 1.0:
Smax⁡=1e≈0.368(36.8%)S_{\max} = \frac{1}{e} \approx \mathbf{0.368 \quad (36.8\%)}

(Enforcing slot synchronization exactly doubles throughput compared to Pure ALOHA!)


4. CSMA/CD (Carrier Sense Multiple Access with Collision Detection)

Applied in wired broadcast networks (IEEE 802.3 Ethernet):

  1. Carrier Sensing ("Listen Before Talk"):
    • Station senses line before transmitting. Persistence strategies:
      • 1-Persistent: Transmit immediately when idle; if busy, listen continuously.
      • Non-Persistent: Wait random backoff if busy.
      • p-Persistent: Transmit with probability pp when idle.
  2. Collision Detection ("Listen While Talking"):
    • The station monitors line voltage while transmitting. If voltage spikes (collision), it aborts transmission immediately and broadcasts a Jam Signal (32–48 bits).
  3. Minimum Frame Size Constraint:
    • The sender must remain transmitting long enough to detect a collision from the furthest cable segment:
Ttx≥2⋅Tp  ⟺  Lmin⁡≥2⋅Tp⋅BT_{tx} \geq 2 \cdot T_p \iff L_{\min} \geq 2 \cdot T_p \cdot B
  • In classic 10 Mbps10\text{ Mbps} Ethernet, Lmin⁡=64 bytes (512 bits)L_{\min} = 64\text{ bytes (512 bits)}.
  1. Truncated Binary Exponential Backoff (BEB):
    • Wait TB=R×Slot TimeT_B = R \times \text{Slot Time}, where 0≤R≤2min⁡(k,10)−10 \leq R \leq 2^{\min(k, 10)} - 1 (kk is collision attempt count; aborts after 16 failed attempts).

5. CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance)

Applied in wireless networks (IEEE 802.11 Wi-Fi) where physical collision detection is impossible due to transmitter power overpower and hidden nodes:

  1. Interframe Spaces (IFS):
    • High-priority frames wait SIFS (Short IFS).
    • Normal data frames wait DIFS (DCF IFS).
SIFS<PIFS<DIFS<EIFS\text{SIFS} < \text{PIFS} < \text{DIFS} < \text{EIFS}
  1. Contention Window & Random Backoff:
    • After channel remains idle for DIFS, station counts down a random backoff timer R∈[0,CW−1]R \in [0, CW - 1]. The timer freezes whenever the medium becomes busy and resumes when free.
  2. Virtual Carrier Sensing (RTS/CTS & NAV):
    • Sender transmits RTS (Request to Send) with declared duration.
    • Access Point replies with CTS (Clear to Send).
    • Hidden nodes overhear the CTS and set an internal NAV (Network Allocation Vector) timer, muting themselves and eliminating the Hidden Terminal Problem!
  3. Explicit Acknowledgments (ACK): Every unicast frame requires an immediate link-layer ACK.

6. Comprehensive Multi-Protocol Comparison Table

Feature Pure ALOHA Slotted ALOHA CSMA/CD CSMA/CA
Physical Medium Wireless / Radio Wireless / Radio Wired Copper / Coax Wireless RF (Wi-Fi)
Listening Principle None (blind send) None (slot sync) Listen before & while talk Listen before & avoid
Vulnerable Time 2⋅Tfr2 \cdot T_{fr} 1⋅Tfr1 \cdot T_{fr} 2⋅Tp2 \cdot T_p (round-trip) DIFS + Contention window
Maximum Throughput 18.4%18.4\% (G=0.5G = 0.5) 36.8%36.8\% (G=1.0G = 1.0) High (>85−90%> 85 - 90\%) Moderate (60−75%60 - 75\%)
Collision Action Retransmit after backoff Retransmit next slot Send Jam signal & abort Exponential backoff CW
Frame Constraint None Fixed slot duration Minimum frame size (64 B64\text{ B}) Fragment size / RTS threshold
Link-Layer ACK Optional Optional None (CD confirms delivery) Mandatory ACK
Primary Standard Historical UHF Satellite links IEEE 802.3 Ethernet IEEE 802.11 Wi-Fi

7. Key Exam Questions & Takeaways

  1. Why is the vulnerable time of Slotted ALOHA half that of Pure ALOHA?
    • By constraining transmissions to discrete slot boundaries, partial frame overlaps are eliminated entirely. A frame can only collide with other frames generated during the preceding single slot (Vt=TfrV_t = T_{fr} instead of 2Tfr2 T_{fr}).
  2. State the mathematical condition for collision detection in CSMA/CD.
    • Ttx≥2⋅TpT_{tx} \geq 2 \cdot T_p, meaning transmission duration must be at least twice the propagation delay across the maximum network span.
  3. How does the RTS/CTS handshake solve the Hidden Terminal Problem in CSMA/CA?
    • The CTS frame sent by the receiver reaches all hidden nodes within its coverage area. The hidden nodes read the duration field and set their NAV timers to silence their own transmitters during the data exchange.
Free AppAndroid App

Coursify Android App

Generate AI courses, take quick quizzes between classes, and master complex engineering concepts on the go.

← All Computer Networks modules