Throughput

advertisement
Wireless Application Protocol
Random
Assignment
Protocols
Random Assignment Protocols

In fixed-assignment schemes, each communicating node is
assigned a frequency band in FDMA systems or a time slot
in TDMA systems. This assignment is static, however,
regardless of whether or not the node has data to transmit.
These schemes may therefore be inefficient if the traffic
source is bursty. In the absence of data to be transmitted, the
node remains idle, thereby resulting in the allocated
bandwidth to be wasted. Random assignment strategies
attempt to address this shortcoming by eliminating
preallocation of bandwidth to communicating nodes.
Random Assignment Protocols





In a random access method, each station has the right to the medium
without being controlled by any other station. However, if more than one
station tries to send, there is an access conflict-collision-and the frames
will be either destroyed or modified. To avoid access conflict or to resolve
it when it happens, each station follows a procedure that answers the
following questions:
o When can the station access the medium?
o What can the station do if the medium is busy?
o How can the station determine the success or failure of the
transmission?
o What can the station do if there is an access conflict?
Random Assignment Protocols




Random assignment strategies do not exercise any
control to determine which communicating node can
access the medium next. Furthermore, these
strategies do not assign any predictable or scheduled
time for any node to transmit. To deal with
collisions,the protocol must include a mechanism to
detect collisions and a scheme to schedule colliding
packets for subsequent retransmissions.
ALOHA
CSMA
CSMA/CD
Random Access

Random Access Methods
–
more efficient way of managing medium access for
communicating short bursty messages




in contrast to fixed-access schemes, each user gains access to
medium only when needed -has some data to send
drawback: users must compete to access the medium (‘random
access’)
collision of contending transmissions
Random Access Methods in Wireless Networks
–
can be divided into two groups:


ALOHA based-no coordination between users
carrier-sense based-indirect coordination -users sense
availability of medium before transmitting
Random Access
Collision Period
User 4
User 3
User 2
rescheduled
User 1
Time
ALOHA-based Random Access

user accesses medium as soon as it has a packet
ready to transmit
–
–

advantages:
–

simple, no synchronization among users required
disadvantages:
–
–

after transmission, user waits a length of time > round-trip
delay in the network, for an ACK from the receiver
if no ACK arrives, user waits a random interval of time (to
avoid repeated collision) and retransmits
low throughput under heavy load conditions
probability of collision increases as number of users
increases
max throughput = 18% of channel capacity
Pure-ALOHA
Pure-ALOHA

A collision involves two or more stations. If all these stations try to resend
their frames after the time-out, the frames will collide again. Pure ALOHA
dictates that when the time-out period passes, each station waits a
random amount of time before resending its frame. The randomness will
help avoid more collisions. We call this time the back-off time TB.

Pure ALOHA has a second method to prevent congesting the channel
with retransmitted frames. After a maximum number of retransmission
attempts Kmax' a station must give up and try later. Figure shows the
procedure for pure ALOHA based on the above strategy.
Pure-ALOHA
Pure-ALOHA

The time-out period is equal to the maximum possible round-trip propagation
delay,which is twice the amount of time required to send a frame between the two
most widely separated stations (2 x Tp)' The back-off time TB is a random value
that normally depends on K (the number of attempted unsuccessful transmissions).

The formula for TB depends on the implementation. One common formula is the
binary exponential back-method,

In this method for each retransmission, a multiplier in the range 0 to 2powK - 1 is
randomly chosen and multiplied by Tp (maximum propagation time) the average
time required to send out a frame to find TB' Note that in this procedure, the range
of the random numbers increases after each collision. The value of Kmax is usually
chosen as 15.off. In this
Example
The stations on a wireless ALOHA network are a maximum of 600
km apart. If we assume that signals propagate at 3 × 108 m/s, we
find
Tp = (600 × 105 ) / (3 × 108 ) = 2 ms.
Now we can find the value of TB for different values of
K.
a. For K = 1, the range is {0, 1}. The station needs to|
generate a random number with a value of 0 or 1. This
means that TB is either 0 ms (0 × 2) or 2 ms (1 × 2),
based on the outcome of the random variable.
Example cont…
b. For K = 2, the range is {0, 1, 2, 3}. This means that TB
can be 0, 2, 4, or 6 ms, based on the outcome of the
random variable.
c. For K = 3, the range is {0, 1, 2, 3, 4, 5, 6, 7}. This
means that TB can be 0, 2, 4, . . . , 14 ms, based on the
outcome of the random variable.
d. We need to mention that if K > 10, it is normally set to
10.
Pure-ALOHA

Vulnerable time Let us find the length of time,
the vulnerable time, in which there is a
possibility of collision. We assume that the
stations send fixed-length frames with each
frame taking TfrS to send. Figure shows the
vulnerable time for station A.
Figure Vulnerable time for pure ALOHA protocol
Example
A pure ALOHA network transmits 200-bit frames on a shared
channel of 200 kbps. What is the requirement to make this frame
collision-free?
Solution
Average frame transmission time Tfr is 200 bits/200 kbps or 1 ms. The
vulnerable time is 2 × 1 ms = 2 ms. This means no station should send
later than 1 ms before this station starts transmission and no station
should start sending during the one 1-ms period that this station is
sending.
Throughput





To assess Pure ALOHA, we need to predict its throughput, the rate of
(successful) transmission of frames. First, let's make a few simplifying
assumptions:
All frames have the same length.
Stations cannot generate a frame while transmitting or trying to transmit.
(That is, if a station keeps trying to send a frame, it cannot be allowed to
generate more frames to send.)
The population of stations attempts to transmit (both new frames and old
frames that collided) according to a Poisson distribution.
Let "T" refer to the time needed to transmit one frame on the channel, and
let's define "frame-time" as a unit of time equal to T. Let "G" refer to the
mean used in the Poisson distribution over transmission-attempt
amounts: that is, on average, there are G transmission-attempts per
frame-time.
Throughput




Consider what needs to happen for a frame to be transmitted
successfully. Let "t" refer to the time at which we want to send a frame.
We want to use the channel for one frame-time beginning at t, and so we
need all other stations to refrain from transmitting during this time.
Moreover, we need the other stations to refrain from transmitting
between t-T and t as well, because a frame sent during this interval would
overlap with our frame.
For any frame-time, the probability of there being k transmission-attempts
during that frame-time is:
Throughput


The average amount of transmission-attempts
for 2 consecutive frame-times is 2G. Hence, for
any pair of consecutive frame-times, the
probability of there being k transmissionattempts during those two frame-times is:
Throughput

Therefore, the probability () of there being zero
transmission-attempts between t- and t+T (and
thus of a successful transmission for us) is:
Throughput

The throughput can be calculated as the rate of
transmission-attempts multiplied by the
probability of success, and so we can conclude
that the throughput () is:
Throughput

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 × e −2G
The maximum throughput
Smax = 0.184 when G= (1/2)
Throughput
Note
The throughput for pure ALOHA is
S = G × e −2G .
The maximum throughput
Smax = 0.184 when G= (1/2).
Example
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.
Example(continued)
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,
percentage wise.
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.
Slotted ALOHA

time is divided into equal time slots –when a user
has a packet to transmit, the packet is buffered
and transmitted at the start of the next time slot
–

advantages:
–

partial packet collision avoided
Disadvantages
–
–

BS transmits a beacon signal for timing, all users must
synchronize their clocks
throughput still quite low!
there is either no collision or a complete collision
max throughput = 36% of channel capacity
Slotted ALOHA
Slotted ALOHA: Throughput

The throughput for Slotted ALOHA is
S = G × e−G

where G is the average number of frames
requested per frame-time
The maximum throughput
–
Smax = 0.368 when G= 1
Example
A slotted 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−G or S = 0.368 (36.8 percent). This means
that the throughput is 1000 × 0.0368 = 368 frames.
Only 386 frames out of 1000 will probably survive.
Example (continued)
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−G or S = 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. 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 −G or S = 0.195 (19.5 percent). This means
that the throughput is 250 × 0.195 = 49. Only 49
frames out of 250 will probably survive.
Reservation ALOHA

Time slots are divided into reservation and transmission slots
/ periods
–
–
–

advantages:
–
–


higher throughput under heavy loads
max throughput up to 80% of channel capacity
disadvantages:
–

during reservation period, stations can reserve future slots in
transmission period
reservation slot size << transmission slot size
collisions occur only in reservation slots
more demanding on users as they have to obtain / keep ‘reservation
list’ up-to-date
R-Aloha is most commonly used in satellite systems
satellite collects requests, complies ‘reservation list’ and finally
sends the list back to users
R-ALOHA
Carrier Sense Multiple Access with Collision
Detect (CSMA/CD)

With CSMA/CD, when an Ethernet device attempts to
access the network to send data, the network interface on the
workstation or server checks to see if the network is quiet.
When the network is clear, the network interface knows that
transmission can begin. If it does not sense a carrier, the
interface waits a random amount of time before retrying. If
the network is quiet and two devices try sending data at the
same time, their signals collide. When this collision is
detected, both devices back off and wait a random amount of
time before retrying,
CSMA/CD Operation




Carrier sense— Each computer on the LAN is always listening for traffic
on the wire to determine when gaps between frame transmissions occur.
Multiple access— Any computer can begin sending data whenever it
detects that the network is quiet. (There is no traffic.)
Collision detect— If two or more computers in the same CSMA/CD
network collision domain begin sending at the same time, the bit streams
from each sending computer interfere, or collide, with each other,
making each transmission unreadable. If this collision occurs, each
sending computer must be able to detect that a collision has occurred
before it has finished sending its frame.
Each computer must stop sending its traffic as soon as it has detected the
collision and then wait some random length of time, called the back-off
algorithm, before attempting to retransmit the frame.
CSMA/CD: Flow Diagram
Example
A network using CSMA/CD has a bandwidth of 10 Mbps. If the
maximum propagation time (including the delays in the devices and
ignoring the time needed to send a jamming signal, as we see later) is
25.6 μs, what is the minimum size of the frame?
Solution
The frame transmission time is Tfr = 2 × Tp = 51.2 μs. This means, in
the worst case, a station needs to transmit for a period of 51.2 μs to
detect the collision. The minimum size of the frame is 10 Mbps ×
51.2 μs = 512 bits or 64 bytes. This is actually the minimum size of
the frame for Standard Ethernet.
Carrier Sense Multiple Access
(CSMA)

Disadvantages of ALOHA
–
–

users do not listen to the channel before (and while)
transmitting
suitable for networks with long propagation delays
Carrier Sense Multiple Access
–
–
polite version of ALOHA
Listen to the channel before transmitting


if sensed channel busy, back-off (defer transmission), and sense
channel again after a random amount of time
if channel idle, transmit entire frame
Versions of CSMA

Employs different node behaviour when
channel found busy
–
–
–
–
non-persistent CSMA
persistent CSMA
1-persistent CSMA
p-persistent CSMA
Persistence Methods

What should a station do if the channel is busy? What should
a station do if the channel is idle? 4 methods have been
devised to answer these questions: the I-persistent method,
the nonpersistent method, and the p-persistent method.
Figure shows the behavior of three persistence methods
when a station finds a channel busy.

Persistent:- station sense the channel, if channel is ideal it transmits
data. if there is already some traffic going on that it does not transmit the
data. Keep sensing.
CSMA: Persistence Methods

Behavior of 1-persistent, Nonpersistent, p-persistent method
Persistence Methods


I-Persistent The I-persistent method is simple and straightforward. In
this method,after the station finds the line idle, it sends its frame
immediately (with probability I).This method has the highest chance of
collision because two or more stations may find the line idle and send
their frames immediately.
Nonpersistent:- In the nonpersistent method, a station that has a frame
to send senses the line. If the line is idle, it sends immediately. If the line
is not idle, it waits a random amount of time and then senses the line
again. The nonpersistent approach reduces the chance of collision
because it is unlikely that two or more stations will wait the same amount
of time and retry to send simultaneously. However, this method reduces
the efficiency of the network because the medium remains idle when
there may be stations with frames to send.
Persistence Methods





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 this method, after the station finds the line idle it follows
these steps:
1. With probability p, the station sends its frame.
2. With probability q = 1 - p, the station waits for the beginning of the
next time slot and checks the line again.
a. If the line is idle, it goes to step 1.
b. If the line is busy, it acts as though a collision has occurred and uses
the backoff procedure
Flow diagram for 1-persistent, Nonpersistent, p-persistent method
CSMA/CA (Collision Avoidance)


Invented for wireless network where we cannot detect collisions
Collision are avoided through the use of CSMA/CA’s three strategies:
the interframe space, the contention windows, and acknowledgement
IFS can also be used to define the priority of a station or a frame If the
station finds the channel busy, it does not restart the timer of the
contention window; it stops the timer and restarts it when the channel
becomes idle
CSMA / Collision Avoidance

Used where CSMA/CD cannot be used
–
–
e.g. in wireless medium collision cannot be easily detected
as power of transmitting overwhelms receiving antenna
CSMA/CA is designed to reduce collision probability at points
where collisions would most likely occur

–
when medium has become idle after a busy state, as several
users could have been waiting for medium to become available
key elements of CSMA/CA:



IFS –interframe spacing –priority mechanism–the shorter the
IFS the higher the priority for transmission
CW intervals –contention window –intervals used for contention
and transmission of packet frames
Backoff counter–used only if two or more stations compete for
transmission
CSMA/CA Algorithm
Frame to
transmit
Medium
Idle?
No
Yes
Wait IFS
Wait IFS
Still
Idle?
Wait until
Trans ends
No
Yes
Transmit frame
Still
Idle?
Yes
Exp b/o while
Medium idle
No If medium becomes busy during the backoff
time, the backoff timer is halted and
resumes when the medium becomes idle.
Transmit frame
Example
Download