Unit 3 - Ch12-Multiple Access
Unit 3 - Ch12-Multiple Access
Unit 3 - Ch12-Multiple Access
Multiple Access
K. Sujatha
Associate Professor
Dept of ECE, BMSCE
12.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Introduction
12.3
Figure 12.2 Taxonomy of multiple-access protocols discussed in this chapter
12.4
12-1 RANDOM ACCESS
In random access or contention methods, no station is
superior to another station & none is assigned the control
over another
No station permits, or does not permit, another station
to send
At each instance, a station that has data to send uses a
procedure defined by the protocol to make a decision on
whether or not to send
Topics discussed in this section:
ALOHA
Carrier Sense Multiple Access
Carrier Sense Multiple Access with Collision Detection
Carrier Sense Multiple Access with Collision Avoidance
12.5
Random Access
Two features give this method its name
First, there is no scheduled time for a station to
transmit
Transmission is random among the stations- that is why
these methods are called random access
Second, no rules specify which station should send next.
Stations compete with one another to access the medium
- that is why these methods are also called contention
methods
Random access methods have evolved from a very
interesting protocol known as ALOHA, which used a
very simple procedure called Multiple Access (MA)
12.6
ALOHA
ALOHA, the earliest random access method, was
developed at the University of Hawaii in early 1970
12.7
PURE ALOHA
Original ALOHA protocol is called pure ALOHA
Simple, but elegant protocol
Idea is that each station sends a frame whenever it has a
frame to send
However, since there is only one channel to share, there
is the possibility of collision between frames from
different stations
Pure ALOHA protocol relies on acknowledgments from
the receiver
If the acknowledgment does not arrive after a time-out
period, the station assumes that the frame (or the
acknowledgment) has been destroyed & resends the
frame
12.8
Figure 12.3 Frames in a pure ALOHA network
There are four stations that contend with one another for access to the shared
channel
Some of these frames collide because multiple frames are in contention for the
shared channel
12.9
Figure 13.3 ALOHA network
Figure 13.4 Procedure for Pure ALOHA protocol
Example 1
The stations on a wireless ALOHA network are a maximum of 600
km apart. If we assume that signals propagate at 3 x 108 ms,
we find Tp = (600 x 105) / (3 x 108) = 2 ms. Find the value of TB
for different values of K.
a. For K = 1, the range is {O, 1}. The station needs to generate a random
number with a value of 0 or 1. This means that TB is either 0ms (0 x 2)
or 2 ms (l x 2), based on the outcome of the random variable.
b. For K =2, the range is {O, 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.
12.14
Example 12.2
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.
12.15
Pure ALOHA – Throughput
G ->average number of frames generated by the system during
one frame transmission time
Can be proved that the average number of successful
transmissions for pure ALOHA is S = G x e-2G
Maximum throughput Smax is 0.184, for G = 1/2
i.e if one-half a frame is generated during one frame
transmission time, then 18.4 percent of these frames reach their
destination successfully
This is an expected result because the vulnerable time is 2 times
the frame transmission time
Therefore, if a station generates only one frame in this
vulnerable time (& no other stations generate a frame during this
time), the frame will reach its destination successfully
12.16
Pure ALOHA – Throughput
12.17
Example 12.3
12.18
Example 12.3
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
12.19
Example 12.3
b. If the system creates 500 frames per second, this is (1/2) frame
per millisecond
The load is (1/2)
This means that the throughput is 500 x 0.184 =92 and that only
92 frames out of 500 will probably survive
12.20
Example 12.3
c. If the system creates 250 frames per second, this is (1/4) frame
per millisecond
12.21
Slotted ALOHA
12.22
Figure 12.6 Frames in a slotted ALOHA network
In slotted ALOHA we divide the time into slots of Tfr s and force the station to
send only at the beginning of the time slot.
12.23
Figure 12.7 Vulnerable time for slotted ALOHA protocol
12.24
Slotted ALOHA
12.25
Example 12.4
12.26
Example 12.4
Solution
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.
12.27
Example 12.4
Solution
b. Here G is ½
12.28
Example 12.4
Solution
c. Now G is ¼
12.29
Carrier Sense Multiple Access (CSMA)
12.30
Carrier Sense Multiple Access (CSMA)
In other words, a station may sense the medium & find it
idle, only because the first bit sent by another station has
not yet been received
12.31
Figure 12.8 Space/time model of the collision in CSMA
At time t1 station B senses the medium and finds it idle, so it sends a frame. At time t2
(t2> t1) station C senses the medium and finds it idle because, at this time, the first bits
from station B have not reached station C. Station C also sends a frame. The two signals
collide and both frames are destroyed.
12.32
Figure 12.9 Vulnerable time in CSMA
Vulnerable time for CSMA is the propagation time Tp
When a station sends a frame, & any other station tries to send a frame
during this time, a collision will result
But if the first bit of the frame reaches the end of the medium, every
station will already have heard the bit and will refrain from sending.
Fig shows the worst case.
12.33
Persistence Methods
12.34
Persistence Methods
(i)1-persistent method : simple & straightforward
After the station finds the line idle, it sends its frame
immediately (with probability 1)
Highest chance of collision because two or more stations may
find the line idle & send their frames immediately
(ii)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 & then senses the line again
Reduces the chance of collision because it is unlikely that two
or more stations will wait the same amount of time & retry to
send simultaneously
Reduces the efficiency of the network because the medium
remains idle when there may be stations with frames to send
12.35
Persistence Methods
(iii)P-persistent:
This method used if the channel has time slots with a slot duration
equal to or greater than the maximum propagation time
This approach combines the advantages of the other two strategies
Reduces the chance of collision & 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 & 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 &
uses the backoff procedure
12.36
Figure 12.10 Behavior of three persistence methods
12.37
Figure 12.11 Flow diagram for three persistence methods
12.38
Carrier Sense Multiple Access with Collision Detection
(CSMA/CD)
12.39
Figure 12.12 Collision of the first bit in CSMA/CD
12.40
Figure 12.13 Collision and abortion in CSMA/CD
12.41
Collision of the first bit in CSMA/CD
At time t1, station A has executed its persistence procedure & starts
sending the bits of its frame
At time t2, station C has not yet sensed the first bit sent by A &
executes its persistence procedure & starts sending the bits in its frame,
which propagate both to the left & to the right
Collision occurs sometime after time t2 -Station C detects a collision at
time t3 when it receives the first bit of A's frame. Station C immediately
(or after a short time, but we assume immediately) aborts transmission
Station A detects collision at time t4 when it receives the first bit of C's
frame; it also immediately aborts transmission
Looking at the figure, we see that A transmits for the duration t4 - tl; C
transmits for the duration t3 - t2‘
Later we show that, for the protocol to work, the length of any frame
divided by the bit rate in this protocol must be more than either of these
durations.
At time t4, the transmission of A’s frame, though incomplete, is
aborted; at time t3, the transmission of C's frame, though incomplete, is
aborted.
12.42
Minimum Frame Size
For CSMA/CD to work, we need a restriction on the frame size
Before sending the last bit of the frame, sending station must detect
a collision, if any, & abort the transmission
This is so because the station, once the entire frame is sent, does
not keep a copy of the frame & does not monitor the line for collision
detection
Therefore, the frame transmission time Tfr must be at least two
times the maximum propagation time Tp
To understand the reason, let us think about the worst-case
scenario. If the two stations involved in a collision are the maximum
distance apart, the signal from the first takes time Tp to reach the
second, & the effect of the collision takes another time Tp to reach
the first
So the requirement is that the first station must still be transmitting
after 2Tp
12.43
Example 12.5
12.45
Figure 12.15 Energy level during transmission, idleness, or collision
12.46
Throughput
12.47
Carrier Sense Multiple Access with collision Avoidance
(CSMA/CA)
12.48
Carrier Sense Multiple Access with collision CSMA/CA
(ii)Contention Window :
Contention window is an amount of time divided into slots
A station ready to send chooses a random number of slots as its
wait time
number of slots in window changes according to binary
exponential back-off strategy - set to one slot first time &then
doubles each time station cannot detect an idle channel after
IFS time - similar to p-persistent method except that a
random outcome defines number of slots taken by waiting
station
Station needs to sense channel after each time slot- if station
finds the channel busy, it does not restart the process; it just
stops the timer & restarts it when the channel is sensed as idle-
gives priority to station with longest waiting time
12.50
Carrier Sense Multiple Access with collision CSMA/CA
(iii) Acknowledgment :
12.51
Figure 12.16 Timing in CSMA/CA
12.52
Note
12.53
Note
12.54
Figure 12.17 Flow diagram for CSMA/CA
12.55
Exercise problem
In Figure 12.12, the data rate is 10 Mbps, the distance between station A and C
is 2000 m, and the propagation speed is 2 x 108 m/s. Station A starts sending a
long frame at time t1 =0; station C starts sending a long frame at time t2 =3µs.
The size of the frame is long enough to guarantee the detection of collision by
both stations. Find:
a. The time when station C hears the collision (t3)'
b. The time when station A hears the collision (t4)'
c. The number of bits station A has sent before detecting the collision.
d. The number of bits station C has sent before detecting the collision.
12.56
12-2 CONTROLLED ACCESS
12.58
Figure 12.18 Reservation access method
12.59
Control Access 2) Polling
Polling works with topologies in which one device is designated as
a primary station & other devices are secondary stations
12.60
Control Access 2) Polling - Select function
Select function is used whenever primary device has
something to send
12.63
Control Access 3) Token Passing
Token-passing: stations in a n/w are organized in a logical
ring
For each station, there is a predecessor & a successor
12.65
Control Access 3) Token Passing
Logical Ring:
In token-passing network, stations do not have to be physically
connected in a ring; ring can be a logical one
High-speed Token Ring networks called FDDI (Fiber Distributed
Data Interface) & CDDI (Copper Distributed Data Interface) use dual
ring topology
Token Bus LAN, standardized by IEEE, uses bus ring topology
In a star ring topology, physical topology is a star- hub, however,
that acts as the connector - wiring inside the hub makes the ring;
This topology makes the network less prone to failure because if a
link goes down, it will be bypassed by hub & rest of stations can
operate. This topology is still used in the Token Ring LAN designed
by IBM
1
Figure 12.20 Logical ring and physical topology in token-passing access method
12.67
12-3 CHANNELIZATION
12.68
Channelization- 1)FDMA
Frequency-Division Multiple Access (FDMA):
12.69
Figure 12.21 Frequency-division multiple access (FDMA)
12.70
Note
12.71
Channelization- 2)TDMA
In time-division multiple access (TDMA), stations share bandwidth
of channel in time
Each station is allocated a time slot during which it can send data
Each station transmits its data in is assigned time slot.
main problem with TDMA lies in achieving synchronization between
the different stations
Each station needs to know beginning of its slot & location of its
slot- difficult because of propagation delays introduced in system if
stations are spread over a large area
compensate for delays, we can insert guard times
Synchronization is normally accomplished by having some
synchronization bits at the beginning of each slot
data link layer in each station tells its physical layer to use allocated
time slot-no physical multiplexer at the physical layer
12.72
Figure 12.22 Time-division multiple access (TDMA)
12.73
Note
12.74
Channelization- 3)CDMA
12.75
Note
12.76
Figure 12.23 Simple idea of communication with code
Assume we have four stations 1, 2, 3, & 4 connected to the same channel. Data from
station 1 are d1 … Code assigned to the first station is c1... We assume that the assigned
codes have two properties.
1. If we multiply each code by another, we get O.
2. If we multiply each code by itself, we get 4 (no. of stations).
Station 1 multiplies (a special kind of multiplication) its data by its code to get d1.c1
Data that go on the channel are the sum of all these terms
12.77
Figure 12.23 Simple idea of communication with code
Any station that wants to receive data from one of the other three , multiplies
the data on the channel by the code of the sender.
suppose stations 1 & 2 are talking to each other. Station 2 wants to hear
what station 1 is saying. It multiplies the data on the channel by c1 the code
of station 1.
Because (c1 . c1) is 4, but (c2 . c1), (c3 . c1), and (c4 . c1) are all 0s, station 2
divides the result by 4 to get the data from station 1.
data =(d1. c1 + d2.c2 +d3.c3 + d4.c4) . c1
=d1.c1 . c1+ d2. c2 . c1 + d3 . c3 . c1 + d4 . C4. c1 =4 X d1
12.78
Figure 12.24 Chip sequences
CDMA is based on coding theory.
Each station is assigned a code, which is a sequence of
numbers called chips, as shown - codes are for the previous
example.
Later we show how we chose these sequences.
For now, we need to know that we did not choose the
sequences randomly; they were carefully selected.
They are called orthogonal sequences and have the specific
properties:
12.79
Figure 12.24 Chip sequences
Orthogonal sequences have the following properties:
1. Each sequence is made of N elements, where N is the number
of stations.
2. If we multiply a sequence by a number, every element in the
sequence is multiplied by that element- multiplication of a
sequence by a scalar. Eg 2.[+1 +1-1-1]=[+2+2-2-2]
3. If we multiply two equal sequences, element by element, and
add the results, we get N, where N is the number of elements in
the each sequence- called the inner product of two equal
sequences. eg [+1 +1 -1 -1]· [+1 +1 -1 -1] = 1 + 1 + 1 + 1 = 4
4. If we multiply two different sequences, element by element,
and add the results,we get 0- inner product of two different
sequences.[+1 +1 -1 -1] . [+1 +1 +1 +1] = 1 + 1 - 1 - 1 = 0
5. Adding two sequences means adding the corresponding
elements. The result is another sequence. For example,
[+1+1-1-1]+[+1+1+1+1]=[+2+2 00]
12.80
Figure 12.25 Data representation in CDMA
12.81
Figure 12.26 Sharing channel in CDMA-simple example
12.83
Figure 12.27 Digital signal created by four stations in CDMA
Signal Level
The process can be better understood if we show the digital signal produced by each
station and the data recovered at the destination. fig shows the corresponding signals
for each station (using NRZ-L for simplicity) and the signal that is on the common
channel.
12.84
Figure 12.28 Decoding of the composite signal for one in CDMA
Fig shows how station 3 can detect the data sent by station 2 by using the
code for station 2. The total data on the channel are multiplied (inner product operation)
by the signal representing station 2 chip code to get a new signal. The station then
integrates and adds the area under the signal, to get the value -4, which is divided by 4
and interpreted as bit O.
12.85
Figure 12.29 General rule and examples of creating Walsh tables
Sequence Generation
To generate chip sequences, we use a Walsh table -a two-dimensional table with an
equal number of rows and columns, as shown
In the Walsh table, each row is a sequence of chips. W1 for a one-chip sequence has
one row and one column. We can choose -1 or +1 for the chip for this trivial table.
According to Walsh, if we know the table for N sequences WN we can create
the table for 2N sequences W2N. The WN with the overbar WN stands for the
complement of WN' where each +1 is changed to -1 and vice versa.
Figure 12.29 also shows how we can create W2 and W4 from WI' After we select WI,
W2
12.86
Note
12.87
Example 12.6
Solution
We can use the rows of W2 and W4 in Figure 12.29:
a. For a two-station network, we have
[+1 +1] and [+1 −1].
12.88
Example 12.7
Solution
The number of sequences needs to be 2m. We need to
choose m = 7 and N = 27 or 128. We can then use 90
of the sequences as the chips.
12.89
Example 12.8
Solution
Let us prove this for the first station, using our previous
four-station example. We can say that the data on the
channel
D = (d1 ⋅ c1 + d2 ⋅ c2 + d3 ⋅ c3 + d4 ⋅ c4).
The receiver which wants to get the data sent by station 1
multiplies these data by c1.
12.90
Example 12.8 (continued)
12.91
Exercise problem
12.92