Difference Between CSMA and ALOHA

Aloha is a simple communication scheme originally developed by the University of Hawaii to be used for satellite communication. In the Aloha method, each source in a communication network transmits data every time there is a frame to be transmitted. If the frame successfully reaches the destination, the next frame is transmitted. If the frame is not received at the destination, it will be transmitted again. CSMA (Carrier Sense Multiple Access) is a Media Access Control (MAC) protocol, where a node transmits data on a shared transmission media only after verifying the absence of other traffic.

Aloha Protocol

As mentioned earlier, Aloha is a simple communication protocol where each source in the network transmits data whenever it has a frame to be transmitted. If the frame is transmitted successfully, the next frame will be transmitted. If the transmission is failed, the source will send the same frame again. Aloha works well with wireless broadcast systems or half-duplex two-way links. But when the network becomes more complex, such as an Ethernet with multiple sources and destinations that uses a common data path, problems occur due to colliding of data frames. When the communication volume increases, the collision problem becomes worse. This can reduce the efficiency of a network since colliding frames will cause loss of data in both the frames. Slotted Aloha is an improvement to the original Aloha protocol, where discrete time slots were introduced to increase the maximum throughput while reducing collisions. This is achieved by allowing sources to transmit only at the beginning of a timeslot.

CSMA Protocol

CSMA protocol is a probabilistic MAC protocol in which a node verifies that the channel is free before transmitting on a shared channel such as an electrical bus. Before transmitting, the transmitter tries to detect whether there is a signal from another station in the channel. If a signal is detected, the transmitter waits until the ongoing transmission is finished before it starts to transmit again. This is the “Carrier Sense” part of the protocol. “Multiple Access” defines that multiple stations send and receive signals on the channel and a transmission by a single node is generally received by all the other stations using the channel. Carrier Sense Multiple Access with Collision Detection (CSMA/CD) and Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) are two modifications of the CSMA protocol. CSMA/CD improves performance of CSMA by stopping a transmission as soon as a collision is detected and CSMA/CA improves the performance of CSMA by delaying the transmission by a random interval if the channel is sensed busy.

Difference between CSMA and ALOHA

Main difference between Aloha and CSMA is that Aloha protocol does not try to detect whether the channel is free before transmitting but the CSMA protocol verifies that the channel is free before transmitting data. Thus CSMA protocol avoids clashes before they happen while Aloha protocol detects that a channel is busy only after a clash happens. Due to this, CSMA is more suitable for networks such as Ethernet where multiple sources and destinations use the same channel.