Chap 4, Multiaccess Communication
Download
Report
Transcript Chap 4, Multiaccess Communication
Chap 4
Multiaccess Communication
(Part 1)
Ling-Jyh Chen
Overview
Ethernet and Wi-Fi are both “multi-access”
technologies
Broadcast medium, shared by many hosts
Simultaneous transmissions will result in collisions
Media Access Control (MAC) protocol
required
Rules on how to share medium
Media Access Control Protocols
Channel partitioning
Divide channel into smaller “pieces” (e.g., time slots,
frequency)
Allocate a piece to node for exclusive use
E.g. Time-Division-Multi-Access (TDMA) cellular network
Taking-turns
Tightly coordinate shared access to avoid collisions
E.g. Token ring network
Contention
Allow collisions
“recover” from collisions
E.g. Ethernet, Wi-Fi
Contention Media Access Control Goals
Share medium
If two users send at the same time, collision results in no
packet being received (interference)
If no users send, channel goes idle
Thus, want to have only one user send at a time
Want high network utilization
TDMA doesn’t give high utilization
Want simple distributed algorithm
no fancy token-passing schemes that avoid collisions
Evolution of Contention Protocols
Aloha
Developed in the 1970s for a packet
radio network
Slotted
Aloha
Improvement: Start transmission only at
fixed times (slots)
CSMA
CSMA = Carrier Sense Multiple Access
Improvement: Start transmission only if no
transmission is ongoing
CSMA/CD
CD = Collision Detection
Improvement: Stop ongoing transmission if
a collision is detected (e.g. Ethernet)
4.2 Idealized slotted multiaccess
model
m transmitting nodes and one receiver
1. Slotted system
a)
b)
c)
packets are of the same length
each packet requires one time unit for
transmission
the reception of each packet starts at an
integer time and ends before the next integer
time
2. Poisson Arrivals
overall arrival rate of the system: λ
individual rate of each node: λ/m
3. Collision or Perfect Reception
a) If just one node sends a packet in a given
slot, the packet is correctly received.
b) If two or more nodes send a packet in a
given time slot, then there is a collision and
the receiver obtains no information about the
contents or the source of the transmitted
packets.
4. 0,1,e Immediate Feedback
Assuming each node obtains feedback from
the receiver at the end of each slot
5. Retransmission of Collisions
Assuming each packet involved in a collision
must be retransmitted in some later slot.
A node with a packet that must be
retransmitted is said to be backlogged.
6. Two addition assumptions
a.
No buffering
b.
If one packet at a node is currently waiting for
transmission or colliding with another packet
during transmission, new arrivals at that node
are discarded and never transmitted.
This assumption provides the lower bound to
the delay for systems with buffering and flow
control!
Infinite set of nodes (m=∞):
This assumption provides the upper bound!
Slotted ALOHA
The basic idea:
Each unbacklogged node simply transmit a
newly arriving packet in the first slot after
packet arrival.
Slotted ALOHA risks occasional collisions but
achieves very small delay if collisions are rare.
Contrast to TDM systems, which avoids
collisions at the expense of large delays.
Collisions in S-ALOHA
Station 1
1.1
1.3
1.2
Transmission
Delay
2.1
2.2
Station 2
3.2
3.1
Station 3
Complete
Collision
Broadcast
channel
Slotted ALOHA (cont.)
When a collision occurs, each node sending
one of the colliding packets discovers the
collision at the end of the slot and becomes
backlogged.
Such nodes wait for some random number of
slots before retransmitting.
Slotted ALOHA (cont.)
Using infinite-node assumption, the total
number of retx and tx in a given slot is a
Poisson random variable with parameter G,
where G> λ.
The prob. of a successful transmission in a
slot is
1 G
Ge
P[n 1]
1!
Ge
G
In equilibrium, the arrival rate, λ, should be the
same as the departure rate, Ge-G.
Slotted ALOHA (cont.)
Using GNUPlot
set xr [0:5]
plot x*exp(-x)
Slotted ALOHA (cont.)
The MAX departure rate occurs at G=1 and is
1/e ≈ 0.368.
If G<1, too many idle slots are generated.
If G>1, too many collisions are generated.
Slotted ALOHA (cont.)
Markov Chain for Slotted ALOHA
State: the number of backlogged packets
Increases by the number of new arrivals
transmitted by unbacklogged nodes
Decreases by one each time if a packet is
transmitted successfully.
Slotted ALOHA (cont.)
qr: the prob. of a backlogged node retx in the
next slot
i.e., the number of slots from a collision until a
given node involved in the collision retx is a
geometric R.V. having value i>1 with prob.
qr(1-qr)i-1
qa: the prob. of an unbacklogged node
transmits a packet in the given slot
i.e. qa=1-e-λ/m
Slotted ALOHA (cont.)
Qa(i, n): the prob. that i unbacklogged nodes transmit
packets in a given slot
Qr(i, n): the prob. that i backlogged nodes transmit.
m n
(1 qa ) m n i qa i
Q a (i, n)
i
n
i
Q r (i, n) (1 qr ) n i qr
i
Slotted ALOHA (cont.)
Pn ,n i
Qa (i, n),
Q (1, n)[1 Q (0, n)],
r
a
Qa (1, n)Qr (0, n) Qa (0, n)[1 Qr (1, n)],
Qa (0, n)Qr (1, n),
2 i ( m n)
i 1
i0
i 1
P succ Qa (1, n)Qr (0, n) Qa (0, n)Qr (1, n)
Slotted ALOHA (cont.)
Dn: “drift” in state n, i.e. the expected change in
backlog over one slot time
G(n): the expected number of attempted
transmissions in a slot
If qa and qr are small, Psucc G(n)eG(n)
Slotted ALOHA (cont.)
The “drift” is the difference between the throughput
curve (Ge-G) and the straight line:
Slotted ALOHA (cont.)
Using infinite-node assumption:
G(n) nqr
Using no-buffering assumption:
G(n) (m n)qa nqr
4.2.3 (optional)
Unslotted ALOHA
Unslotted ALOHA (a.k.a. Pure ALOHA) was
the precursor to slotted ALOHA.
In Pure ALOHA, each node transmits a new
packet immediately upon receiving, rather
than waiting for a slot boundary.
If a packet is involved in a collision, it is
retransmitted after a random delay.
Collisions in (Pure) ALOHA
Station 1
1.1
1.2
1.3
Transmission
Time
(F)
2.1
2.2
Station 2
3.1
3.2
Station 3
Complete
Collision
Broadcast
channel
Partial
Collision
Unslotted ALOHA (cont.)
Frame which collides
with start of red frame
Frame which collides
with end of red frame
Frame
t0-F
t0
Vulnerable
Period of red frame
t0+F
Time
A frame (red frame) will be in a collision if and only if another
transmission begins in the vulnerable period of the frame
Vulnerable period has the length of 2 frame times
Unslotted ALOHA (cont.)
Since arrivals are independent, Psucc=e-2G
Since attempted transmissions occur at rate G(n), the
throughput = Ge-2G
The MAX throughput of a Pure ALOHA system =
1/(2e), achieved when G=0.5.
If
λ is very small and the mean retx time is very large,
the system can be expected to run for long periods
w/o major backlog buildup.
The main adv. of pure ALOHA is that it can be used
with variable-length packets.
Comparison of ALOHA and S-ALOHA
0.5
Throughput (ALOHA)
Ideal (no collisions): R
0.4
Slotted ALOHA: Re -R
0.3
0.2
Pure ALOHA: Re-2R
0.1
0
0
0.5
1
1.5
R
2
2.5
3