Random Access Protocol
In this tutorial, we will be covering the Random access protocols in the data link layer in Computer Networks.
In Random Access methods, there is no station that is superior to another station and none is assigned control over the other. It simply means that there is no station that permits another station to send.
-
A station that has the data to send mainly makes the use of a procedure that is defined by the protocol in order to make a decision whether to send or not to send the data.
-
And the decision mainly depends upon the state of the medium as a medium can either be idle or it can be busy.
-
There is no time scheduled for any station in order to transmit the data, the transmission is random among all stations; that is why these methods are called random access.
-
There are no rules regarding which station should send the data next, all stations compete with one another in order to access the medium. Thus these methods are also referred to as Contention methods.
-
In case if there are two or more stations that try to send the data, there occurs a conflict in the access and it is referred to as Collision.
Given below are the protocols that lie under the category of Random Access Protocols:
-
ALOHA(Pure ALOHA and slotted ALOHA)
-
CSMA
-
CSMA/CD
-
CSMA/CA
ALOHA
The earliest method used for random access was ALOHA and it was developed at the University of Hawaii in early 1970.ALOHA was mainly designed for radio/Wireless LAN but it can also be used for shared mediums.
As the medium is shared between the stations, when a station sends the data then the other station may attempt to do so at the same time. Thus the data from the two stations collide.
Original ALOHA is simply termed as "Pure ALOHA".
Pure ALOHA
-
This protocol is very simple but elegant at the same time.
-
The main idea behind this protocol is that each station sends a frame whenever it has a frame to send.
-
As we have already told you that the medium is shared among different stations, thus there is a possibility of collision between frames from the different stations.
Let us now take a look at the frames in a pure ALOHA network:
The above figure shows that there are 4 stations and each station sends two frames, thus there is a total of 8 frames on the shared medium. Among these 8 frames, there are some frames that collide with each other.
Thus there is the only frame that is frame 1.1 from station 1 that survives.
We need to resend those frames that have been destroyed during the transmission. The pure ALOHA method depends upon the acknowledgment from the receiver, whenever any station sends a frame, then it expects the receiver to send an acknowledgment. If there is no arrival of acknowledgment after the time-out period then the station assumes that the frame or the acknowledgment gets destroyed and in this way, it resends the frame.
In the collision there is mainly the involvement of two or more stations, in case if all the stations try to resend the frames after the time-out period passes then all the frames will collide again.
Thus in Pure ALOHA, when the time-out period passes then each station waits for a random amount of time before resending its frame and this randomness helps to avoid more collisions and this time is referred to as back-off time (TB).
Given below is the procedure used for Pure ALOHA protocol:
Efficiency
The efficiency of the Pure ALOHA is as given below:
where G denotes the number of stations that are willing to transmit the data.
The maximum efficiency of the Pure ALOHA is very less because of the large number of collisions. And the maximum efficiency comes out as 18.4% on putting G=(1/2).
Vulnerable time
It is the time when there is the possibility of collision.
And the Vulnerable time in the case of Pure ALOHA is: 2 x T fr
Slotted ALOHA
As the name suggests, in the slotted ALOHA the time of the shared channel is simply divided into discrete intervals that are commonly known as Time Slots.
-
In Slotted ALOHA it is imposed on each station to send the data only at the beginning of the time slot.
-
As a station is allowed to send the data only at the beginning of the time slot, in case if any station misses this moment then it must have to wait until the beginning of the next time slot.
-
In case if two stations try to send at the beginning of the same time slot then there are chances for the occurrence of the collision
Efficiency
The efficiency of the slotted ALOHA is as given below:
where G indicates the Number of the stations that are willing to transmit the data at the beginning of the same time slot.
For the maximum efficiency of Slotted ALOHA put the value of G as 1 and then the efficiency comes out to be 36.8%.
Thus the maximum efficiency of the slotted ALOHA is high due to the reason that there is a fewer number of collisions.
Let us now take a look at the difference between the Pure ALOHA and Slotted ALOHA:
Pure ALOHA vs Slotted ALOHA
Pure ALOHA |
Slotted ALOHA |
In the Pure ALOHA, the station can transmit the data frame whenever the station has data to send. |
In this, the station can transmit the data only at the beginning of the time slot. |
In the case of Pure ALOHA, the time is continuous |
In the case of Slotted ALOHA, the time is discrete and is in the form of time slots. |
One of the main advantages of using Pure ALOHA is that the implementation of this method is simple. |
One of the main advantages of using the slotted ALOHA is that there is a reduction in the number of collisions and there is an increase in efficiency as compared to Pure ALOHA. In simple terms, collisions are reduced to half while the efficiency increases to double. |
The efficiency offered by the Pure ALOHA is 18.4%. |
The Efficiency offered by the slotted ALOHA is 36.8% |
The probability of the successful transmission of the data packet is equals to G x e-2G |
The probability of the successful transmission of the data packet is equals to G x e-G |
The Vulnerable time offered by the Pure ALOHA is 2 x T fr |
The Vulnerable time offered by the slotted ALOHA is T fr |