CSMA stands for “Carrier-Sense Multiple Access”. It is a MAC “Media Access Control” Protocol which means that it does not require the internet to work. CSMA only needs a medium through which all the nodes can be connected to each other.
If a node wants to send the signal to another node it first senses the medium through the “Carrier-Sense” mechanism. If the node senses traffic then it waits for the current transmission in progress to end. Once it senses that no transmission is in progress then it starts its transmission. When a node transmits a signal, all the nodes connected to the same medium will receive the signal. Basically, the signal is broadcasted over the medium. There are some variations on basic CSMA with the addition of “Collision-Avoidance”, and “Collision-Detection”.
There are some “Access Modes” in CMSA. Basically, these are the algorithms CSMA uses to detect the traffic of the medium and to send data as well. In simple words, these are the methods of how it senses the “Carrier” to send the data.
It is an aggressive algorithm of CSMA. In this algorithm, when a node is ready to transmit the message to another node, it senses the medium and if the carrier is idle then it immediately sends a message but if it senses traffic, it continuously checks until the medium is idle. there are high chances of collision of the data in this algorithm. CSMA basically waits for a random amount of time to detect if any collision has occurred or not. If it senses the collision then it repeats the whole process again. CSMA/CD systems use 1-Persistent algorithms.
It is an unaggressive algorithm of CSMA. When it wants to send a frame to any node over the network, it senses the carrier. If the Carrier is idle then it transmits the frame immediately, but if the carrier is busy it wants for a random amount of time and repeats the same algorithm again. The major benefit of this algorithm is that it has a very less chance of data collision as compared to the 1-Persistent Algorithm. But the flaw in this algorithm is that it is too slow because it does not sense the carrier until it waits.
This means that if it selects that it will wait for 5 seconds and the transmission of the current node ends the other second then it will wait for no reason. and if some other node decides to send the frame then it will sense the carrier empty and immediately transmit its signals. The node which was waiting for the carrier to be idle comes back and senses that the carrier is still busy and again waits for a random amount of time. This is why it is a very slow method of CSMA but it has very less chances of collision.
The “P” in this algorithm’s name represents the probability value. This algorithm can be called the mixture of “1-Persistent” and “Non-Persistent”. If the value of Probability is 0 then it acts like a “Non-Persistent” algorithm and if the value is 1 then it acts like a “1-Persistent” algorithm. In this algorithm, if the node wants to send the data it senses the carrier. If it senses that the carrier is idle it starts its transmission immediately. If it finds the carrier busy it continuously checks until the carrier is idle.
It then sends a frame with the probability, if the probability is 1-P then it waits for a random amount of time else it starts the transmission. This is a very effective algorithm because it has fewer chances of collision as compared to the “1-Persistent” algorithm and the channel utilization is much better as compared to the “Non-Persistent” algorithm. In simple words, we can say that the lower the value of P, the Higher the throughput but the channel utilization is lower and vice-versa.
This algorithm of CSMA is straightforward. In this algorithm, there is a monitoring node that monitors the carrier. Each node is assigned a sequence number, the node has to wait for its turn to transmit its data. The node with sequence number one starts its transmission immediately and the node with sequence number two should wait for one slot of time and so on.
There are some modifications in CSMA in order to sort the wired and wireless communications over a network.
Carrier-Sense Multiple Access with Collision Detection (CSMA/CD)
This is often referred to as CSMA/CD. It is an algorithm of CSMA in which when a node transmits its data to the other node. It waits for some time to determine whether any collision has occurred or not. The node can only Identify its collision while it is transmission once it finishes its transmission then it will not be able to detect the collision.
When a node transmits a signal over the network, if that signal collides with other signals then it will come back and the node which is currently transmitting the signal will receive a signal, since there cannot be multiple transmissions at one time this is how the node will come to know that his data collided with someone’s signal. CSMA/CD can only be applied over wired networks. If the network is operated wirelessly then there is another algorithm used which is called “Carrier-Sense Multiple Access with Collision Avoidance” or CSMA/CA.
Carrier-Sense Multiple Access with Collision Avoidance (CSMA/CA)
CSAM/CA is an algorithm that operates over wireless networks. A node cannot sense whether there is traffic or not wirelessly. An “Access Point” is used to create the network wirelessly. This algorithm uses “RTS/CTS” flags to communicate with the Access Point and ask whether they are allowed to transmit their data or they should wait. RTS Stands for “Request To Send” and CTS Stands for “Clear To Send”. When a node wants to send the data it asks the Access Point if the carrier is busy or not.
If the medium is busy then it waits for a random amount of time and asks again if the medium is busy or not. If the medium is idle, it sends an RTS signal to the Access Point to let him know that he wants to send the data. Then it waits for the Access Point to respond with a CTS signal. After it receives a CTS it starts its transmission. After the transmission is completed the node then waits for the Access Point to respond with the “ACK” flag. It waits for some time and if the node does not receive ACK, it will think that its signal has collided with some other transmission. It will wait for a random amount of time before repeating the whole process and transmitting its data again.
Thank you for visiting our website! You can tackle more about this category here. You can read more topics regarding Computer science on our home page.
Disclaimer: I don’t own the Featured Image. The image is taken from Pexels.com.