CSMA is a set of rules in which the devices attached to a network first determines whether the channel or carrier is in use or free and then act accordingly. As in this MAC protocol,the network devices or nodes before transmission senses the channel,therefore, this protocol is known as carrier sense multiple access protocol.
Multiple Access indicates that many devices can connect to and share the same network and if a node transmits anything, it is heard by all the stations on the network.
TYPES OF CSMA :
The different types of the CSMA are as under :
- Persistent CSMA
- Non-persistent CSMA
- P-persistent CSMA
1. Persistent CSMA:
In 1-persistent carrier sense protocol,the sender or station first listens to the channel and if the channel is not busy,it transmits the data with a probability of 1.If a station finds the channel busy,it waits until the channel gets free or becomes idle. If a collision occurs, the station waits a random amount of time and attempts the same procedure again. The propagation delay has an important effect on the performance of the protocol. Consider a situation in which a station begins sending,and another station also senses an idle channel. If the first station's signal has not yet reached the second one, the latter station will sense an idle channel and will also begin sending, resulting in a collision. The longer the propagation delay,the worse is the performance of the protocol.
Assume that the propagation delay is zero, there will still be collisions because if two stations become ready while anther's station transmission, both will wait until the transmission ends and then both will begin transmitting exactly simultaneously, resulting in a collision. This protocol will lead to higher efficiency than the pure ore slotted ALOHA.
2. Non-persistent CSMA :
The main difference between 1-persistent and non persistent carrier sense protocol is that in non-persistent if a station finds the channel busy,it waits random amount of time and starts retransmission again.Consequently, this algorithm leads to better channel utilization and reduces the chance of collisions but longer delays than 1-persistent CSMA.
p-persistent CSMA :
In this protocol, when the sender is ready to transmit data,it senses the channel and if it senses an idle channel,it starts sending the frame with a probability of P i.e the probability of not sending the frame till the next time slot is q=1-P.If the station finds the channel busy, it waits until the beginning of the next time slot to repeat the same procedure.
COMPARISON OF CSMA AND ALOHA PROTOCOLS :
|← Multiple Access Protocols - Pure Aloha vs Slotted Aloha & Throughput||CSMA with Collision Detection (CSMA/CD) →|