Unit3 - Part 4 - ALOHA & CSMA
Unit3 - Part 4 - ALOHA & CSMA
Unit3 - Part 4 - ALOHA & CSMA
Data link layer: Error Detection and Correction, Framing, flow and error control, Protocols - Noiseless channels (Simplest, Stop and Wait)
and Noisy channels (Stop and Wait and Piggy Backing).
Vulnerable time, during which a collision may occur in pure ALOHA, is 2 times the frame
transmission time.
Pure ALOHA vulnerable time= 2 x Tfr
Throughput Let us call G the average number of frames generated by the system during
one frame transmission time. Then it can be proved that the average number of successful
transmissions for pure ALOHA is S = G x e-2G. The maximum throughput Smax is 0.184, for
G = 1. In other words, if one-half a frame is generated during one 2 frame transmission time
(in other words, one frame during two frame transmission times), then 18.4 percent ofthese
frames reach their destination successfully. This is an expected result because the vulnerable
time is 2 times the frame transmission time. Therefore, if a station generates only one frame
in this vulnerable time (and no other stations generate a frame during this time), the frame
will reach its destination successfully.
SlottedALOHA
Pure ALOHA has a vulnerable time of 2 x Tfr. This is so because there is no rule that defines
when the station can send. A station may send soon after another station has started or soon
before another station has finished. Slotted ALOHA was invented to improve the efficiency
of pure ALOHA. In slotted ALOHA we divide the time into slots of Tfr s and force the
station to send only at the beginning of the time slot. Figure shows an example of frame
collisions in slotted ALOHA.
CSMA.
The chance of collision can be reduced if a station senses the medium before trying to use it. Carrier
sense multiple access (CSMA) requires that each station first listen to the medium (or check the state
of the medium) before sending. In other words, CSMA is based on the principle "sense before
transmit" or "listen before talk."
Carrier-sense multiple access (CSMA) is a media access control (MAC) protocol in which a node
verifies the absence of other traffic before transmitting on a shared transmission medium, such as
an electrical bus or a band of the electromagnetic spectrum.
A transmitter attempts to determine whether another transmission is in progress before initiating a
transmission using a carrier-sense mechanism. That is, it tries to detect the presence of a carrier
signal from another node before attempting to transmit. If a carrier is sensed, the node waits for the
transmission in progress to end before initiating its own transmission. Using CSMA, multiple nodes
may, in turn, send and receive on the same medium. Transmissions by one node are generally
received by all other nodes connected to the medium.
Variations on basic CSMA include addition of collision-avoidance, collision-detection and collision-
resolution techniques.
Persistence Methods
Variations of CSMA use different algorithms to determine when to initiate transmission onto
the shared medium. A key distinguishing feature of these algorithms is how aggressive or
persistent they are in initiating transmission. A more aggressive algorithm may begin
transmission more quickly and utilize a greater percentage of available bandwidth of the
medium. This is typically at the expense of increased likelihood of collision with other
transmitters.
Three methods have been devised for the stations to follow when it finds the channel is buzy
or idle.
the 1-persistent method,
the nonpersistent method, and
the p-persistent method.
1-Persistent
1-persistent CSMA is an aggressive transmission algorithm. When the transmitting node is
ready to transmit, it senses the transmission medium for idle or busy. If idle(channel is free
because no other station is transmitting), then it transmits immediately. If busy, then it senses
the transmission medium continuously until it becomes idle, then transmits the message
(a frame) unconditionally (i.e. with probability=1). In case of a collision, the sender waits for
a random period of time and attempts the same procedure again. 1-persistent CSMA is used
in CSMA/CD systems including Ethernet. This method has the highest chance of collision
because two or more stations may find the line idle and send their frames immediately.
Department of Computer Applications, NSS College Rajakumari 5
Nonpersistent
Non persistent CSMA is a non-aggressive transmission algorithm. When the transmitting
node is ready to transmit data, it senses the transmission medium for idle or busy. If idle, then
it transmits immediately. If busy, then it waits for a random period of time (during which it
does not sense the transmission medium) before repeating the whole logic cycle (which
started with sensing the transmission medium for idle or busy) again. This approach reduces
collision, results in overall higher medium throughput but with a penalty of longer initial
delay compared to 1–persistent. Thus this method reduces the efficiency of the network
because the medium remains idle(since stations are not sensing the medium during the
waiting period) when there may be stations with frames to send .
p-Persistent
The p-persistent method is used if the channel has time slots with a slot duration equal to or
greater than the maximum propagation time.
The p-persistent approach combines the advantages of the other two strategies. It reduces the
chance of collision and improves efficiency.
In p-persistent CSMA, the letter “p” refers to the probability that a node having
communications traffic to send will start transmitting in a specific period of time following
the end of a received prior transmission. This is also referred to as the transmission
probability, with values ranging from 0 to 1. A system in which a node having traffic to send
always starts transmitting immediately once the prior transmission ends is an instance of 1-
persistent CSMA, indicating there is a 100% chance that an immediate transmission will take
place when a channel becomes idle. Waiting a random time before transmitting represents p-
persistent CSMA, which is intended to reduce the probability of transmission collisions by
giving different nodes different times at which they are permitted to start transmitting based
on the transmission probability “p”. Each node with traffic to send waits a random or pseudo-
random time before starting to transmit. The statistical distribution of the wait times is
determined by the value of the transmission probability, 'p'. As each node waits, it monitors
the channel. If it detects the start of another node's transmission before its own transmission
time arrives, it cancels or reschedules its own transmission so as to prevent the collision of
multiple transmissions on the shared medium that would otherwise occur.
Contention Window
Acknowledgment
With all these precautions, there still may be a collision resulting in destroyed data. In
addition, the data may be corrupted during the transmission. The positive acknowledgment
can guarantee that the receiver has received the frame.