# Aloha | Pure Aloha | Slotted Aloha

## Access Control in Networking-

Before you go through this article, make sure that you have gone through the previous article on Access Control.

We have discussed-

• Access Control is a mechanism that controls the access of stations to the transmission link.
• There are various access control methods-

## Aloha-

There are two different versions of Aloha-

1. Pure Aloha
2. Slotted Aloha

## 1. Pure Aloha-

• It allows the stations to transmit data at any time whenever they want.
• After transmitting the data packet, station waits for some time.

Then, following 2 cases are possible-

## Case-01:

• Transmitting station receives an acknowledgement from the receiving station.
• In this case, transmitting station assumes that the transmission is successful.

## Case-02:

• Transmitting station does not receive any acknowledgement within specified time from the receiving station.
• In this case, transmitting station assumes that the transmission is unsuccessful.

Then,

• Transmitting station uses a Back Off Strategy and waits for some random amount of time.
• After back off time, it transmits the data packet again.
• It keeps trying until the back off limit is reached after which it aborts the transmission.

## Efficiency-

 Efficiency of Pure Aloha (η) = G x e-2G

where G = Number of stations willing to transmit data

## Maximum Efficiency-

For maximum efficiency,

• We put dη / dG = 0
• Maximum value of η occurs at G = 1/2
• Substituting G = 1/2 in the above expression, we get-

Maximum efficiency of Pure Aloha

= 1/2 x e-2 x 1/2

= 1 / 2e

= 0.184

= 18.4%

Thus,

 Maximum Efficiency of Pure Aloha (η) = 18.4%

The maximum efficiency of Pure Aloha is very less due to large number of collisions.

## 2. Slotted Aloha-

• Slotted Aloha divides the time of shared channel into discrete intervals called as time slots.
• Any station can transmit its data in any time slot.
• The only condition is that station must start its transmission from the beginning of the time slot.
• If the beginning of the slot is missed, then station has to wait until the beginning of the next time slot.
• A collision may occur if two or more stations try to transmit data at the beginning of the same time slot.

## Efficiency-

 Efficiency of Slotted Aloha (η) = G x e-G

where G = Number of stations willing to transmit data at the beginning of the same time slot

### Maximum Efficiency-

For maximum efficiency,

• We put dη / dG = 0
• Maximum value of η occurs at G = 1
• Substituting G = 1 in the above expression, we get-

Maximum efficiency of Slotted Aloha

= 1 x e-1

= 1 / e

= 0.368

= 36.8%

Thus,

 Maximum Efficiency of Slotted Aloha (η) = 36.8%

The maximum efficiency of Slotted Aloha is high due to less number of collisions.

## Difference Between Pure Aloha And Slotted Aloha-

 Pure Aloha Slotted Aloha Any station can transmit the data at any time. Any station can transmit the data at the beginning of any time slot. The time is continuous and not globally synchronized. The time is discrete and globally synchronized. Vulnerable time in which collision may occur = 2 x Tt Vulnerable time in which collision may occur = Tt Probability of successful transmission of data packet = G x e-2G Probability of successful transmission of data packet = G x e-G Maximum efficiency = 18.4% (Occurs at G = 1/2) Maximum efficiency = 36.8% ( Occurs at G = 1) The main advantage of pure aloha is its simplicity in implementation. The main advantage of slotted aloha is that it reduces the number of collisions to half and doubles the efficiency of pure aloha.

## Problem-

A group of N stations share 100 Kbps slotted ALOHA channel. Each station output a 500 bits frame on an average of 5000 ms even if previous one has not been sent. What is the required value of N?

## Solution-

### Throughput Of One Station-

Throughput of each station

= Number of bits sent per second

= 500 bits / 5000 ms

= 500 bits / (5000 x 10-3 sec)

= 100 bits/sec

### Throughput Of Slotted Aloha-

Throughput of slotted aloha

= Efficiency x Bandwidth

= 0.368 x 100 Kbps

= 36.8 Kbps

### Total Number Of Stations-

Throughput of slotted aloha = Total number of stations x Throughput of each station

Substituting the values, we get-

36.8 Kbps = N x 100 bits/sec

∴ N = 368

Thus, required value of N = 368.

To gain better understanding about Aloha,

Watch this Video Lecture

Next Article- Ethernet | Ethernet Frame Format

Get more notes and other study material of Computer Networks.

Watch video lectures by visiting our YouTube channel LearnVidFun.

Summary
Article Name
Aloha | Pure Aloha | Slotted Aloha
Description
Aloha in computer networks is an access control protocol. Versions of Aloha Protocol- Pure Aloha and Slotted Aloha. Pure Aloha in networking allows the stations to transmit the data at anytime. Slotted Aloha Protocol allows the stations to transmit data only at the beginning of the time slot. Difference between Pure Aloha and Slotted Aloha.
Author
Publisher Name
Gate Vidyalay
Publisher Logo