←Back to Subject
Notes
Notes
Study material and explanations
Diagrams
Diagrams
Visualize concepts easily
Mnemonics
Mnemonics
Tricks to remember faster
One Night Prep
One Night Prep
Short and focused revision
Revision
Revision
Quick summary and key points
Important Questions
Important Questions
Practice most relevant questions
Notes

Media Access Control (MAC): CSMA/CD, Token Passing & Polling

Study material and explanations for Unit 3

Media Access Control (MAC): Random Access, Polling, and Token Passing

When multiple computers share the same broadcast wire (like a bus or radio channel), two computers might try to send data at the exact same moment. Their electrical signals will collide and turn into corrupted garbage.

Media Access Control (MAC) protocols define the traffic rules that determine who gets to transmit and what to do if collisions occur.


1. Classification of MAC Protocols

Categories of MAC Protocols
1. Random Access (Contention)
ALOHA, Slotted ALOHA, CSMA, CSMA/CD (Ethernet), CSMA/CA (Wi-Fi)
2. Controlled Access
Reservation, Polling (Primary/Secondary), Token Passing (Token Ring)
3. Channelization
FDMA, TDMA, CDMA (Code Division Multiple Access)

2. The ALOHA Protocol (Pure vs. Slotted)

Invented at the University of Hawaii in 1970 to connect remote islands via radio:

Pure ALOHA vs Slotted ALOHA
🏝️ Pure ALOHA (Transmit Anytime)
  • Stations transmit whenever they have a frame ready.
  • Zero coordination; massive collision rate!
  • Vulnerable period = 2 × Tfr.
  • Max Efficiency: Only 18.4% (S = G · e^-2G where G = 0.5).
⏰ Slotted ALOHA (Synchronized Clocks)
  • Time is divided into discrete equal slots.
  • Stations can only start transmitting at the beginning of a time slot.
  • Vulnerable period is halved = Tfr.
  • Max Efficiency: Doubles to 36.8% (S = G · e^-G where G = 1).

3. CSMA (Carrier Sense Multiple Access) - “Listen Before You Talk!”

Instead of blindly transmitting like ALOHA, CSMA requires a station to listen (sense the carrier) first:

  • If the wire is busy, wait.
  • If the wire is idle, transmit.

The Famous CSMA/CD (Collision Detection - Used in Ethernet):

  1. Listen: Station checks if wire is idle.
  2. Transmit & Continue Listening: While transmitting, the station monitors the wire voltage.
  3. Collision Detected: If voltage spikes (two signals collided), the station aborts transmission immediately, broadcasts a Jamming Signal to notify everyone, and waits for a random time using the Binary Exponential Backoff Algorithm.

4. Controlled Access: Polling vs. Token Passing

In controlled access, stations take turns; zero collisions ever happen!

1. Polling (Master-Slave System)

  • One central primary device acts as the Master.
  • The Master asks each slave device in sequence: “Device 1, do you have data? No? Device 2, do you have data?”
  • If Device 2 responds “Yes”, it transmits. Once finished, Master moves to Device 3.

2. Token Passing (Token Ring)

  • A special bit pattern called a Token continuously circulates around a physical or logical ring.
  • If a computer wants to send data, it must wait until the token arrives, grab the token, attach its data frame, and send it into the ring.
  • No other station can transmit while one station holds the token. Once the frame circulates back, the station releases the token for the next computer.

💡 DAVV Exam Tip

Question (10 Marks): “Explain CSMA/CD working principle with a flowchart. Differentiate between Pure and Slotted ALOHA.”

  • Give the maximum throughput formulas: Pure ALOHA = 18.4%, Slotted ALOHA = 36.8%.
  • Explain CSMA/CD: Sense -> Transmit -> Detect Collision -> Send Jamming Signal -> Backoff.
  • Mention that CSMA/CD is the core MAC protocol of wired Ethernet (IEEE 802.3).