You are on page 1of 26

Pure ALOHA (2)

In pure ALOHA, frames are transmitted at completely arbitrary times.


The throughput of ALOHA systems is maximized by having a uniform frame
size rather than by allowing variable length frames.
1
Pure ALOHA
The basic idea of an ALOHA system is simple: let users transmit
whenever they have data to be sent. There will be collisions, of
course, and the colliding frames will be damaged. If the frame was
destroyed, the sender just waits a random amount of time and
sends it again.
How the channel know that there is a collision:
- Due to the feedback property of broadcasting, a sender can always
find out whether its frame was destroyed by listening to the
channel, the same way other users do. With a LAN, the feedback is
immediate; with a satellite, there is a delay of 270 msec before the
sender knows if the transmission was successful.
- If listening while transmitting is not possible for some reason,
acknowledgements are needed.
2
Figure 13.3 ALOHA network

3
Procedure for ALOHA protocol

4
Figure 12.3 Frames in a pure ALOHA network

12.5
Figure 12.6 Frames in a slotted ALOHA network

12.6
Pure ALOHA (3)
Throughput versus offered traffic for ALOHA systems.

Aloha : 0.184 Slotted Aloha: 0.368


ALOHA
• It has been derived from a compound of the Hawaiian words:
ALO means “share”. HA means “essence of life”

ALOHA: A family of Contention Protocols


Contention is a media access method that is used to share a
broadcast medium.
• In contention, any computer in the network can transmit data
at any time (first come-first served).
• The ALOHAnet solution was to allow each client to send its data
without controlling when it was sent, with an
acknowledgment/retransmission scheme used to deal with
collisions.
ALOHA – Basic Idea
• Use of two distinct frequencies in a hub/star configuration.
• The hub machine broadcasting packets to everyone on the
"outbound" channel.
• Various client machines sending data packets to the hub on the
"inbound" channel.
• If data was received correctly at the hub, a short
acknowledgment packet was sent to the client.
• If an acknowledgment was not received by a client machine after
a short wait time, it would automatically retransmit the data
packet after waiting a randomly selected time interval.
• This acknowledgment mechanism was used to detect and correct
for "collisions" created when two client machines both attempted
to send a packet at the same time.
Basic Idea Behind
ALOHA

Outbound channel

Medium
Downstream channel
Hub

Use of two distinct frequencies in a


hub/star configuration.
Versions Of ALOHA
Protocol Original
version of
ALOHA.

Pure ALOHA

ALOHA

Slotted ALOHA

• Modified version.
• Division in time slots.
PURE ALOHA
• Whenever a station has a data, it transmits i.e. frames
are transmitted at completely arbitrary times.
• Sender finds out whether transmission was successful
or experienced a collision by listening to the broadcast
from the destination station.
• Sender retransmits after some random time if there is
a collision.
Analysis of PURE ALOHA
• Since S represents the number of “good” or
“succeed” transmissions per frame time, and G
represents the total number of attempted
transmissions per frame time, then we have:
S = G * (Probability of good transmission)
• The throughput for pure ALOHA is
S = G × e −2G .
• The maximum throughput
Smax = 0.184 when G= (1/2).
Pure ALOHA Offered Load vs.
Throughput

 Max at G = 0.5, S = 1/2e, only about 0.184 (18%)!


Slotted ALOHA
• Slotted ALOHA was invented to improve the efficiency of pure
ALOHA as chances of collision in pure ALOHA are very high.
• In slotted ALOHA, there is still a possibility of collision if two
stations try to send at the beginning of the same time slot
• Slotted ALOHA still has an edge over pure ALOHA as chances
of collision are reduced to one-half.
Assumptions Made
• All frames consist of exactly L bits.
• Time is divided into slots of size L/R seconds (i.e., a slot
equals the time to transmit one frame).
• Nodes start to transmit frames only at the beginnings of slots.
Slotted ALOHA
• The nodes are synchronized so that each node knows when the
slots begin.
• If two or more frames collide in a slot, then all the nodes detect
the collision event before the slot ends.
Procedure for slotted ALOHA
• While there is a new frame A to send do
1. Send frame A at a slot boundary and wait for ACK
2. If after “some” time ACK is received, successful transmission
of frame.
3. If there is a collision, the node detects the collision before
the end of the slot.
4. wait a random amount of time and go to 1
• The node retransmits its frame in each subsequent slot with
probability p until the frame is transmitted without a collision
Figure Frames in a slotted ALOHA network
Throughput of Slotted
ALOHA
• The probability of no collision is given by
P 0  e G

• The throughput S is
S  G  P 0  G  e G

• The Maximum throughput of slotted ALOHA is


1
S max   0.368
e
Throughput of Slotted
• Best (G = 1):
ALOHA
• 37% empty
• 37% success
• 26% collisions
• Raising G, reduces empties but increases collisions exponentially
• Expected transmissions (includes original)
E = eG
• G=0, then 1 transmission; G=1 then 2*X transmissions.
• Small increase in load, big decrease in performance.
• The throughput for slotted ALOHA is
S = G × e−G .
• The maximum throughput
Smax = 0.368 when G = 1.
Slotted ALOHA
Pros
• single active node can continuously transmit at full rate of
channel
• highly decentralized: only slots in nodes need to be in sync
• Simple protocol
Cons
• collisions, wasting slots
• idle slots
• nodes may be able to detect collision in less than time to
transmit packet
• clock synchronization
Throughput versus offered traffic for ALOHA systems.

0.5

0.4 0.368

0.3
 S

Slotted Aloha
0.184
0.2

Aloha
0.1

00 2 4 6 8
G
G 
PURE ALOHA Example
Q:- A pure ALOHA network transmits 200-bit frames on a shared channel of 200 kbps. What
is the throughput if the system (all stations together) produces
a. 1000 frames per second
b. 500 frames per second
c. 250 frames per second.
Solution
• The frame transmission time is 200/200 kbps or 1 ms.
a. If the system creates 1000 frames per second, this is 1
frame per millisecond. The load is 1. In this case
S = G× e−2 G or S = 0.135 (13.5 percent). This means
that the throughput is 1000 × 0.135 = 135 frames. Only
135 frames out of 1000 will probably survive.
( note…. e= 2.71828……………………………… 2.71−2 = 0.135)
PURE ALOHA Example
b. If the system creates 500 frames per second, this is
(1/2) frame per millisecond. The load is (1/2). In this
case S = G × e −2G or S = 0.184 (18.4 percent). This
means that the throughput is 500 × 0.184 = 92 and that
only 92 frames out of 500 will probably survive. Note
that this is the maximum throughput case,
percentagewise…………… (note 0.5 * 2.718 −2 *0.5 = 0.1839)
c. If the system creates 250 frames per second, this is (1/4)
frame per millisecond. The load is (1/4). In this case
S = G × e -2G or S = 0.152 (15.2 percent). This means
that the throughput is 250 × 0.152 = 38. Only 38
frames out of 250 will probably survive.
A slotted ALOHA network transmits 200-bit frames using a shared channel with a 200-kbps bandwidth. Find the throughput
if the system (all stations together) produces
a. 1000 frames per second.
b. 500 frames per second.
c. 250 frames per second.

Answer-

This situation is similar to the previous exercise except that the network is using slotted ALOHA instead of pure ALOHA. The
frame transmission time is 200/200 kbps or 1 ms.

a.In this case G is 1. So S = G × e−G = 0.368 (36.8 percent). This means that the throughput is 1000 × 0.0368 = 368 frames.
Only 368 out of 1000 frames will probably survive. Note that this is the maximum throughput case, percentagewise.

b. Here G is 1/2. In this case S = G × e−G = 0.303 (30.3 percent). This means that the throughput is 500 × 0.0303 = 151. Only
151 frames out of 500 will probably survive.

c. Now G is 1/4. In this case S = G × e−G = 0.195 (19.5 percent). This means that the throughput is 250 × 0.195 = 49. Only 49
frames out of 250 will probably survive.
Measurements of slotted aloha channel with an infinite number of user. Show that 10 % of the slots are idle.
1. What is channel load?
2. What is throughput?
3. Is the channel overloaded or underloaded?
Solution---
4. Channel load-
For slotted ALOHA    e G
P 0 …………………(note- formula)
P is given 10 % i.e. 0.1
0.1 = e –G
ln(0.1)=-2.3025……………………(note-natural log)
ln(e-G)=ln(0.1).
-G=-2.30259. G=2.30259.
The channel load is 2.30259.
2. Throughput-
   e G
 G  P 0  Gformula)
S……………………..(note-
S=Ge-G =2.30259*e-2.30259=0.230258. The throughput is 23.0258%,
3.
Since G is beyond 1 the channel is overloaded
Measurements of slotted aloha channel with an infinite number of user. Show that 20 % of the slots are
idle.
1. What is channel load?
2. What is throughput?
3. Is the channel overloaded or underloaded?
Solution---
4. Channel load-
For slotted ALOHA   0  e  G formula)
P …………………(note-
P is given 10 % i.e. 0.1
0.1 = e –G
ln(0.2)=-1.6094……………………(note-natural log)
ln(e-G)=ln(0.2).
-G=- 1.6094. G= 1.6094.
The channel load is 1.6094.
2. Throughput-
   e G
 G  P 0  Gformula)
S……………………..(note-
S=Ge-G =1.6094*e-1.6094 =0.3218. (….or S= P(0)G= 0.2 * 1.6094)
3.
Since G is beyond 1 the channel is overloaded

You might also like