Skip to content
Home » Random Access: ALOHA

Random Access: ALOHA

ALOHA is a Random Access protocol used in the MAC (Medium Access Control) sub-layer of the Data Link Layer.

It was developed at the University of Hawaii to allow multiple computers to share a common communication channel.

The basic idea is very simple:

Any station can transmit whenever it has data to send.

Because multiple stations may transmit at the same time, collisions can occur.


1. Why Do We Need ALOHA?

Suppose four computers share one communication channel:

Computer A ──┐
Computer B ──┤
Computer C ──┼── Shared Channel
Computer D ──┘

If Computer A wants to send data, it sends it.

If Computer B also sends at the same time:

A ──────────►
       ◄────────── B

        COLLISION

Both frames may be damaged.

ALOHA provides a simple mechanism to handle such collisions.


2. Basic Working of ALOHA

The working of ALOHA can be understood in four steps:

Step 1: A station gets data

A computer has a frame that needs to be transmitted.

Step 2: It transmits immediately

The station does not first check whether the channel is free.

Data available
      ↓
Transmit immediately

Step 3: Collision may occur

If another station transmits at the same time, a collision occurs.

A ───────►
B ───────►
      ↓
  Collision

Step 4: Retransmission

The station waits for a random amount of time and then retransmits the frame.

Collision
    ↓
Wait random time
    ↓
Retransmit

This process continues until the frame is successfully transmitted or a maximum number of attempts is reached.


3. Types of ALOHA

There are two main types:

  1. Pure ALOHA
  2. Slotted ALOHA

4. Pure ALOHA

In Pure ALOHA, a station can transmit at any time.

There are no fixed time slots.

Working

Frame ready
     ↓
Transmit immediately
     ↓
Collision?
  ↙       ↘
No         Yes
↓           ↓
Success   Wait random time
            ↓
        Retransmit

Example

Suppose A sends a frame at time 2.

B sends a frame at time 2.5.

Their transmissions overlap:

Time →
0    1    2    3    4    5

          A───────────
             B───────────
                ↑
             Collision

Both frames are lost.

The stations wait for random periods and retransmit.


5. Vulnerable Period in Pure ALOHA

The vulnerable period is the period during which another transmission can cause a collision with the current frame.

For Pure ALOHA:

Vulnerable Period = 2T

where T = time required to transmit one frame.

For example, if a frame takes 1 ms to transmit:

Vulnerable Period = 2 × 1 ms
                  = 2 ms

So, another frame arriving within this vulnerable period can cause a collision.


6. Efficiency of Pure ALOHA

The maximum throughput of Pure ALOHA is approximately:

18.4%

The theoretical maximum throughput is:\[ S = Ge^{-2G} \]

where:

  • S = throughput
  • G = offered load

Maximum throughput occurs when:\[ G = 0.5 \]

Therefore:\[ S_{max} = \frac{1}{2e} \]\[ S_{max} \approx 0.184 \]

or

18.4%

Important for exam

Maximum efficiency of Pure ALOHA = 18.4%


7. Slotted ALOHA

Slotted ALOHA improves Pure ALOHA by dividing time into equal-sized slots.

A station can transmit only at the beginning of a time slot.

Time →

| Slot 1 | Slot 2 | Slot 3 | Slot 4 | Slot 5 |
|--------|--------|--------|--------|--------|
    A        B        C       A+B       D
                         ↑
                    Collision

All stations must be synchronized.


8. Working of Slotted ALOHA

Suppose a station has a frame.

Step 1

Wait until the beginning of the next time slot.

Step 2

Transmit the frame.

Step 3

If only one station transmits:

Success

Step 4

If two or more stations transmit:

Collision

Step 5

Stations wait for a random number of slots and retransmit.


9. Vulnerable Period in Slotted ALOHA

In Slotted ALOHA:

Vulnerable Period = T

where T is the frame transmission time.

This is half the vulnerable period of Pure ALOHA.

Therefore, the probability of collision is reduced.


10. Efficiency of Slotted ALOHA

The throughput equation is:\[ S = Ge^{-G} \]

Maximum throughput occurs at:\[ G = 1 \]

Therefore:\[ S_{max} = \frac{1}{e} \]\[ S_{max} \approx 0.368 \]

or

36.8%

Important for exam

Maximum efficiency of Slotted ALOHA = 36.8%


11. Pure ALOHA vs Slotted ALOHA

FeaturePure ALOHASlotted ALOHA
TransmissionAnytimeOnly at slot beginning
SynchronizationNot requiredRequired
Time slotsNoYes
Vulnerable period2TT
Maximum efficiency18.4%36.8%
Collision probabilityHigherLower
ComplexitySimpleSlightly more complex

12. Simple Real-Life Example

Imagine students entering a classroom to ask the teacher questions.

Pure ALOHA

Any student can start speaking at any time.

Student A: "Sir..."
Student B: "Sir..."
Student C: "Sir..."

Everyone speaks together → collision/confusion.

Slotted ALOHA

The teacher gives students fixed opportunities:

Slot 1 → Student A
Slot 2 → Student B
Slot 3 → Student C
Slot 4 → Student D

Students speak only at the beginning of their assigned opportunity.

This reduces collisions.


13. Advantages of ALOHA

  • Very simple protocol.
  • Easy to implement.
  • No central controller is required.
  • Suitable for systems where traffic is unpredictable.
  • Provides a basic method for multiple users to share a common channel.

14. Disadvantages of ALOHA

  • Collisions can occur frequently.
  • Pure ALOHA has low efficiency.
  • Retransmission wastes bandwidth.
  • Performance decreases when traffic becomes heavy.
  • Slotted ALOHA requires synchronization.

⭐ Exam Summary

Remember these four points:

ALOHA → Random Access

Pure ALOHA → Transmit anytime → 18.4% efficiency

Slotted ALOHA → Transmit at slot boundaries → 36.8% efficiency

Slotted ALOHA is more efficient because its vulnerable period is reduced from 2T to T.

One-line definition

ALOHA is a random-access MAC protocol in which stations transmit frames over a shared channel and retransmit them after a random delay if a collision occurs.