Carrier Sense Multiple Access (CSMA)
Carrier Sense Multiple Access (CSMA)
Carrier Sense Multiple Access (CSMA) is a random-access protocol designed to reduce collisions when multiple stations share a common communication channel.
It is based on the principle:
“Sense before transmit” or “Listen before talk.”
In Pure ALOHA, a station transmits whenever it has a frame to send. In CSMA, a station first checks whether the channel is busy or idle before transmitting.
1. How does CSMA work?
When a station has a frame to send, it follows these steps:
Frame ready to send
Sense the medium
Medium idle
Transmit the frame
Medium busy
Do not transmit immediately; follow the protocol's waiting rule
The exact action taken when the medium is busy depends on the particular CSMA variant.
Example
Suppose three stations, A, B and C, share a channel.
Station A has a frame ready and senses the channel.
If the channel is idle, A begins transmitting.
Station B senses the channel while A's signal is already present. B detects that the channel is busy and refrains from transmitting.
This reduces the possibility of collision compared with Pure ALOHA.
However, CSMA cannot eliminate collisions completely.
2. Why can collisions still occur in CSMA?
The reason is propagation delay.
When a station starts transmitting, its signal does not reach every other station instantaneously. The first bit takes some time to travel through the medium.
During this delay, another station may sense the channel and incorrectly conclude that it is idle.
Collision between Stations B and C
Illustration of the sequence of events
Station B
At time \(t_1\), senses idle and transmits.
Station C
At time \(t_2\), where \(t_2>t_1\), B's first bit has not arrived. C senses idle and transmits.
Collision occurs
The two frames overlap and both are destroyed.
The important point is that both stations correctly sensed the medium as idle at the time they checked it. The collision occurs because B's signal had not yet propagated to C.
Thus, CSMA reduces collisions by sensing the channel, but propagation delay means that two stations may still begin transmitting before either detects the other's signal.
3. Vulnerable time in CSMA
The vulnerable time is the period during which another station can begin transmitting and cause a collision with a frame that has already started.
The vulnerable time for CSMA is:
where \(T_p\) is the maximum propagation time—the time required for a signal to travel from one end of the medium to the other.
Why is vulnerable time equal to \(T_p\)?
Suppose Station A, at the left end of the medium, begins transmitting at time \(t_1\).
The first bit of its frame reaches the rightmost Station D at:
Until that first bit has propagated across the medium, a distant station might still sense the channel as idle and start transmitting.
Once the first bit reaches the farthest station, the signal has propagated across the medium. All stations have had the opportunity to sense the transmission and refrain from starting a new one.
Therefore, the vulnerable period is \(T_p\), not \(2T_{fr}\) as in Pure ALOHA.
4. Comparison of vulnerable times
Protocol | Vulnerable time | Reason |
|---|---|---|
Pure ALOHA | \(2T_{fr}\) | A station can start transmitting at any time. |
Slotted ALOHA | \(T_{fr}\) | Transmission starts only at slot boundaries. |
CSMA | \(T_p\) | Stations sense the medium, but propagation delay allows collisions. |
Here, \(T_{fr}\) is the frame transmission time, while \(T_p\) is the propagation time. They represent different quantities.
Key points
CSMA means Carrier Sense Multiple Access.
It follows the principle “sense before transmit.”
A station checks whether the shared medium is idle or busy before transmitting.
CSMA reduces collisions but cannot eliminate them because of propagation delay.
The vulnerable time is the maximum propagation time, \(T_p\).
A collision may occur if another station begins transmitting before the first station's signal has propagated to it.
In one sentence: CSMA improves on ALOHA by checking the channel before transmission, but a collision is still possible during the time it takes the signal to propagate across the shared medium.


Comments
Post a Comment