Chap 4 Multiaccess Communication (Part 2)
description
Transcript of Chap 4 Multiaccess Communication (Part 2)
![Page 1: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/1.jpg)
Chap 4 Multiaccess Communication(Part 2)
Ling-Jyh Chen
![Page 2: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/2.jpg)
2
Classification of Multiple Access Protocols
Multiple access protocols
Contention-based Conflict-free
Random access Collision resolution
FDMA,
TDMA,
CDMA,
Token Bus,
etc
ALOHA,
CSMA,
BTMA,
etc
TREE,
WINDOW, etc
BTMA: Busy Tone Multiple Access
![Page 3: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/3.jpg)
3
Contention Protocols
ALOHA Developed in the 1970s for a packet radio network
by Hawaii University. Whenever a station has a data, it transmits.
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.
Slotted ALOHA Improvement: Time is slotted and a packet can
only be transmitted at the beginning of one slot. Thus, it can reduce the collision duration.
![Page 4: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/4.jpg)
4
Slotted ALOHA
1 2&3 2Time
Collision
Retransmission Retransmission
3
Slot
Node 1 Packet
Nodes 2 & 3 Packets
![Page 5: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/5.jpg)
5
Slotted ALOHA (cont.)
1),,1(),0(0)],,1(1)[,0(),0(),1(1)],,0(1)[,1(
)(2),,(
,
inQnQinQnQnQnQinQnQ
nminiQ
P
ra
rara
ra
a
inn
),1(),0(),0(),1( nQnQnQnQP rarasucc
![Page 6: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/6.jpg)
6
Throughput of Slotted ALOHA
GeP 0
• The probability of no collision is given by
GeGPGS 0
• The throughput S is
368.01max
eS
• The Maximum throughput of slotted ALOHA is
![Page 7: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/7.jpg)
7
ALOHA
1 2 3 3 2Time
Collision
Retransmission Retransmission
Node 1 Packet Waiting a random time
Node 2 Packet
Node 3 Packet
![Page 8: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/8.jpg)
8
Throughput of ALOHA
n
!n
(2G)nP
e 2G
• The probability that n packets arrive in two packets time is given by
where G is traffic load.
GeP 20
• The probability P(0) that a packet is successfully received without collision is calculated by letting n=0 in the above equation. We get
GeGPGS 20
• We can calculate throughput S with a traffic load G as follows:
184.021
max e
S
• The Maximum throughput of ALOHA is
![Page 9: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/9.jpg)
9
Comparison of Aloha and S-Aloha
G 86420
0.5
0.4
0.3
0.2
0.1
0
Slotted Aloha
Aloha
0.368
0.184
G
S
![Page 10: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/10.jpg)
10
CSMA: Carrier Sense Multiple Access
![Page 11: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/11.jpg)
11
Contention Protocols
CSMA (Carrier Sense Multiple Access) Improvement: Start transmission only if no
transmission is ongoing
CSMA/CD (CSMA with Collision Detection) Improvement: Stop ongoing transmission if a
collision is detected
CSMA/CA (CSMA with Collision Avoidance) Improvement: Wait a random time and try again
when carrier is quiet. If still quiet, then transmit
![Page 12: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/12.jpg)
12
Carrier Sense Multiple Access In many multiaccess systems--e.g., LANs--ready
station can determine if medium is idle before transmitting if medium is sensed as busy, ready station defers until
it becomes idle collisions are still possible if two (or more) ready
stations sense idle at same time
1 2 3TimeCollision
4
Node 4 sense
Delay
5
Node 5 sense
Delay
Node 1 PacketNode 2 Packet
Node 3 Packet
![Page 13: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/13.jpg)
13
CSMA
![Page 14: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/14.jpg)
14
CSMA Slotted Aloha The major difference between CSMA Slotted Aloha
and ordinary slotted Aloha is that idle slots in CSMA have a duration β.
If a packet arrives at a node while a transmission is in progress, the packet is regarded as backlogged and begins transmission with probability qr after each subsequent idle slot.
Packets arriving during an idle slot are transmitted in the next slot as usual.
a.k.a. nonpersistent CSMA
![Page 15: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/15.jpg)
15
nonpersistent CSMA
Idle Period
Busy Period
Collision!!
Time
![Page 16: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/16.jpg)
16
CSMA Slotted Aloha Variations persistent CSMA
frames arriving during an idle slot β are transmitted at end of the minislot
arrivals during busy period are transmitted as soon as medium is sensed as idle (after β)
backlogged stations (holding collided frames) retransmit at end of each idle minislot with probability qr
P-Persistent CSMA frames arriving during an idle minislot are transmitted at end
of the minislot arrivals during busy period are transmitted at end of each
idle minislot with probability p backlogged stations retransmit at end of each idle minislot
with probability qr < p
![Page 17: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/17.jpg)
17
Mathematical analysis of nonpersistent
Markov chain model (discrete time) state is number n of backlogged stations
each busy (success or collision) slot has unit length
each busy slot is followed by one (idle) minislot
each time step in the MC corresponds to a real time interval of either if no station transmits) or 1+ if at least one station transmits)
![Page 18: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/18.jpg)
18
CSMA Slotted Aloha Analysis
At a transition into state n (i.e., at the end of an idle slot), the prob. of no transmissions in the following slot is e-λβ(1-qr)n. The first term is the prob of no arrivals in the
previous idle slot The second term is the prob of no
transmissions by the backlogged nodes
![Page 19: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/19.jpg)
19
CSMA Slotted Aloha Analysis (cont.)
The expected time (T) between state transitions in the state n is β+(1-e-λβ(1-qr)n).
Clearly, β T ≦ ≦ β+1
Using Little’s Theorem, the expected number of arrivals between state transitions is:
E{arrival} = λ (β+1-e-λβ(1-qr)n)
![Page 20: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/20.jpg)
20
CSMA Slotted Aloha Analysis (cont.)
The expected number of departure between state transitions in state n is simply the probability of a successful transmission, that is given by:
The drift in state n is defined as the expected number of arrivals less the expected number of departures between state transitions.
nr
r
rnrn qe
qnqqeD )1(
1)1(1
nr
r
r
rn
rn
r
succ
qeqnq
qqneqe
PPP
)1(1
)1(!0)()1(
!1)(
]retx one arrival, no[]retx no arrival, one[
101
![Page 21: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/21.jpg)
21
CSMA Slotted Aloha Analysis (cont.)
For small qr, (1- qr)n-1 (1- q≒ r)n e≒ -qrn
Therefore,
where g(n) = λβ+ qrn is the expected number of attempted transmissions following a transition to state n
The drift is negative if
The numerator is the expected number of departures per state transition, and the denominator is the expected duration of a state transition period; thus the ratio can be interpreted as departure rate.
)()( )()1( ngngn engeD
)(
)(
1)(
ng
ng
eeng
![Page 22: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/22.jpg)
22
Departure Rate (i.e., throughput)
g
g
ege
121
1
2g
λ Arrival rate
Departure rate:
Equilibrium
large backlog
![Page 23: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/23.jpg)
23
Throughput vs β
Using GNUPlot
4.4.2: skip
![Page 24: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/24.jpg)
24
CSMA unslotted Aloha When a packet arrives, the transmission starts
immediately if the channel is sensed to be idle.
If the channel is sensed to be busy, or if the transmission results in a collision, the packet is regarded as backlogged.
Each backlogged packet repeatedly attempts to retransmit at randomly selected times separated by independent, exponentially distributed random delays τ, with prob density xe-xτ
![Page 25: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/25.jpg)
25
CSMA unslotted Aloha (cont.) We assume a propagation and detection delay of β,
so that if one transmission starts at time t, another node will not detect that the channel is busy until t+β, thus causing the possibility of collisions.
Consider an idle period that starts with a backlog of n. The time until the first transmission starts is an exponentially distributed R.V. with rate G(n)=λ+nx
G(n) is the attempt rate in packets per unit time.
![Page 26: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/26.jpg)
26
CSMA unslotted Aloha (cont.) A collision occurs if the next sensing is done
within time β. Thus, the prob that this busy period is a collision is 1-e-βG(n)
The prob of a transmission following an idle period is e-βG(n)
The expected time from the beginning of one idle period until the next is 1/G(n) + (1+ β) The first term is the expected time until the first
transmission starts The second term is the time until the first
transmission ends and the channel is detected as being idle again.
![Page 27: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/27.jpg)
27
CSMA unslotted Aloha (cont.) The departure rate when the backlog is n is given by:
For small β, the maximum value occurs when G(n)≒β-1/2, and the value is
The MAX value is slightly smaller than the MAX value of CSMA slotted Aloha. The reason is when CSMA is not being used, collisions are somewhat more likely fit a given attempt rate in an unslotted system than a slotted system.
)1()(/1
)(
nGe nG
211
![Page 28: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/28.jpg)
28
CSMA unslotted Aloha (cont.)
However, in a slotted system, β would have to be larger than in an unslotted system to compensate for synchronization inaccuracies and worst-case propagation delay.
Thus, unslotted Aloha appears to be the natural choice for CSMA.
4.4.4: skip
![Page 29: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/29.jpg)
29
CSMA/CD: CSMA + Collision detection
![Page 30: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/30.jpg)
30
CSMA/CD In CSMA protocols
If two stations begin transmitting at the same time, each will transmit its complete packet, thus wasting the channel for an entire packet time
In CSMA/CD protocols The transmission is terminated immediately upon the
detection of a collision CD = Collision Detect
![Page 31: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/31.jpg)
31
CSMA/CD
![Page 32: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/32.jpg)
32
CSMA/CD (cont’d) Sense the channel
If idle, transmit immediately If busy, wait until the channel becomes idle
Collision detection Abort a transmission immediately if a collision is
detected Try again later after waiting a random amount of time
![Page 33: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/33.jpg)
33
CSMA/CD (cont’d) Carrier sense
reduces the number of collisions
Collision detection reduces the effect of collisions, making the
channel ready to use sooner
![Page 34: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/34.jpg)
34
Slotted CSMA/CD We visualize S-CSMA/CD in terms of slots and
minislots.
The minislots are of duration β, which denotes the time required for a signal to propagate from one end of the cable to the other and to be detected.
If the nodes are all synchronized into minislots of this duration, and if one node transmits in a minislot, all the other nodes will detect the transmission and not use subsequent minislots until the entire packet is completed.
![Page 35: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/35.jpg)
35
Slotted CSMA/CD (cont.)
If more than one node transmits in a minislot, each transmitting node will detect the condition by the end of the minislot and cease transmitting.
Thus, the minislots are used in a contention mode, and when a successful transmission occurs in a minislot, it effectively reserves the channel for the completion of the packet.
![Page 36: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/36.jpg)
36
Slotted CSMA/CD (cont.) We assume each backlogged node transmits
after each idle slot with prob qr
The node transmitting rate after an idle slot is Poisson with parameter g(n)=λβ+ qrn
Consider state transitions at the ends of idle slots: if no transmissions occur, the next idle slot ends after time β; if one transmission occurs, the next idle slot ends after 1+ β
![Page 37: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/37.jpg)
37
Slotted CSMA/CD (cont.) Variable-length packets are allowed here, but
the packet durations should be multiples of the idle slot durations.
For simplicity, we assume the expected packet duration is 1.
Finally, if a collision occurs, the next idle slot ends after 2β, i.e. nodes must hear an idle slot after the collision to know that it is safe to transmit.
![Page 38: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/38.jpg)
38
Slotted CSMA/CD (cont.)
The expected length of the interval between state transitions is: E{interval}=β+g(n)e-g(n)+β[1-(1+g(n)) e-g(n)] The second term is 1 times the success prob The third term is the additional β times the
collision prob
The prob of success is g(n)e-g(n)
The drift in state n is λE{interval} - Psucc
![Page 39: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/39.jpg)
39
Slotted CSMA/CD (cont.) The departure rate in state n is
This quantity is maximized over g(n) at g(n)=0.77, and the resulting value is 1/(1+3.31β)
The constant (i.e. 3.31) is dependent on the detailed assumptions of the system. However, if β is very small, this constant is not very important.
Unslotted CSMA/CS makes more sense due to the difficulty of perfect synchronizing on short minislots.
)()(
)(
))(1(1)()(
ngng
ng
engengeng
![Page 40: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/40.jpg)
40
Unslotted CSMA/CD Suppose a node at one end starts to transmit, and
then, almost β time units later, a node at the other end starts. The 2nd node ceases its transmission almost immediately upon hearing the 1st node, but nonetheless causes errors in the first packet and forces the 1st node to stop transmission another β time units later.
Node 1 starts
Node 2 starts Node 1 heardNode 2 stops
Node 2 heardNode 1 stops
TimePropagation
delay
![Page 41: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/41.jpg)
41
Unslotted CSMA/CD (cont.) Nodes closer together on the cable detect collisions
faster than those more spread apart.
As a result, the MAX throughput achievable with Ethernet depends on the arrangement of nodes on the cable and is very complex to calculate exactly.
Goal: to find bounds on all the relevant parameters from the end of one transmission to the end of the next in order to get a conservative bound on max throughput!
![Page 42: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/42.jpg)
42
Unslotted CSMA/CD (cont.) Assume that each node initiates transmissions according to an
independent Poisson process whenever it senses the channel idle, and the overall rate is G.
All nodes sense the beginning of an idle period at most β after the end of a transmission.
The expected time to the beginning of the next transmission is at most 1/G.
The next packet will collide with some later starting packet with prob at most 1-e-βg
The colliding packet will cease transmission after at most 2β
The packet will be successful with prob at least e-βg and will occupy 1 time unit.
![Page 43: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/43.jpg)
43
Unslotted CSMA/CD (cont.) The departure rate S for a given G is the success
prob divided by the expected time of a success or collision; so
The MAX occurs at
The corresponding MAX value is
This analysis is very conservative, but if β is very small, throughputs very close to 1 can be achieved.
GG
G
eeGeS
)1(2/1
43.06
113
G
2.611
S
![Page 44: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/44.jpg)
44
Unslotted CSMA/CD (cont.) The MAX stable throughput approaches 1 with decreasing
β; whereas the approach is as a constant times β1/2 for CSMA.
The reason for the difference is that collisions are not very costly with CSMA/CD, and thus much higher attempt rates can be used.
CSMA/CD (and CSMA) becomes increasingly inefficient with increasing bus length (i.e. β), with increasing data rate (i.e. C), and with decreasing data packet size (i.e. L). ps:
LC
![Page 45: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/45.jpg)
45
IEEE 802 LANs LAN: Local Area Network What is a local area network?
A LAN is a network that resides in a geographically restricted area
LANs usually span a building or a campus
![Page 46: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/46.jpg)
46
Characteristics of LANs Short propagation delays
Small number of users
Single shared medium (usually)
Inexpensive
![Page 47: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/47.jpg)
47
Common LANs Bus-based LANs
Ethernet (*) Token Bus (*)
Ring-based LANs Token Ring (*)
Switch-based LANs Switched Ethernet ATM LANs
(*) IEEE 802 LANs
![Page 48: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/48.jpg)
48
OSI Layers and IEEE 802
802.2 Logical Link Control
802.3 802.4 802.5Medium Access Control
Data Link Layer
Physical Layer
Higher Layers
OSI layers IEEE 802 LAN standards
Higher Layers
CSMA/CD Token-passing Token-passing bus bus ring
![Page 49: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/49.jpg)
49
IEEE 802 Standards802.1: Introduction802.2: Logical Link Control (LLC)802.3: CSMA/CD (Ethernet)802.4: Token Bus802.5: Token Ring802.6: DQDB 802.11: CSMA/CA (Wireless LAN)
![Page 50: Chap 4 Multiaccess Communication (Part 2)](https://reader036.fdocuments.in/reader036/viewer/2022062323/56815c2d550346895dca0a16/html5/thumbnails/50.jpg)
50
Summary
4.5.1, 4.5.3, 4.5.4, 4.5.5, 4.5.6, 4.6: skip