Carrier Sense Multiple Access (CSMA)

The basic principle of CSMA,

“Sense the medium before transmit” or “Listen before talk.” Through this Principle, the chance of collision is reduced, and performance becomes high.

Important: Sensing the medium does not mean sensing the entire medium. It simply means to sense the medium at just the transmission point.

When multiple channels are connected through a common medium and want to communicate with others, then the chances of collisions are very high. To reduce this collision, CSMA comes into the picture.

According to CSMA, every channel senses the medium (busy or idle) before transmission. If the medium is idle, then the station can send data to the medium. Otherwise, it must wait until the medium becomes idle. So, it reduces the chances of a collision.

Collision in CSMA

The possibility of collision still exists because of propagation delay. The case when station X has transmitted a frame, which has not yet reached another station Y due to propagation delay. Then, Station Y assumes that the channel is idle and transmits its frame. Thus, a collision occurs.

When two frames move on the same channel but in opposite directions then they may collide. The following figure shows all.

After the collision, CSMA uses an Acknowledgment signal for the retransmission of the collided frame.

Note: The higher the propagation delays, the lowest the performance.

CSMA Modes

There are four major modes of CSMA as

1. 1-Persistent

After sensing the medium in 1-persistent, if the channel is idle, then the station starts transmission immediately. Otherwise, it senses the transmission medium continuously until it becomes idle.

Wait for transmission is minimal because of continuous sensing of the medium. So, the probability of frame transmissions is always 1.

2. Non-Persistent

After sensing the medium in non-persistent, if the channel is idle, then the station starts transmission immediately. Otherwise, it does not sense the medium continuously. It senses the medium for a random period of time.

Transmission of data is non-persistent, having a longer delay than 1-persistent.

3. P-Persistent

 P-persistent is applied in slotted channels. It is the combination of 1-persistent and Non-persistent modes. It transmission probability (p) is in-between 1 and 0.

In P-persistent, transmission only occurs when it satisfies the following conditions.

  • Medium is idle
  • The beginning of the slot is also available for the sensing station.

If the above conditions are satisfied, then the probability of frame transmission is P. Otherwise, it waits for a random time (q = 1-p probability) for its retransmission in the next slot.

Note: Generally Wi-Fi use P-persistent

A descriptive Diagram of 1-persistent, Non-persistent, and P-persistent is given below

4. Zero- Persistent

  • Each station in 0-persistent is assigned a transmission order (superiority).
  • When the medium is idle, the stations transmit data according to their order numbers.

Suppose Station A, B, and C are assigned numbers 1, 2, and 3 respectively. When the transmission medium becomes idle, station A starts transmission first. Station C has to wait for 2-time slots after the medium becomes idle.

Comparison of Throughputs

The throughput is the number of successful transmissions per frame time. The following diagram compares the throughput of various medium access protocols.