ch 12. multiple access
DESCRIPTION
Ch 12. Multiple Access. Multiple Access for Shared Link. Dedicated link Point-to-point connection is sufficient Shared link Link is not dedicated – Wireless medium, Ethernet Controlling the access to the medium Who will use the medium? . Taxonomy of Multiple Access. 12.1 Random Access. - PowerPoint PPT PresentationTRANSCRIPT
Multiple Access for Shared Link
• Dedicated link– Point-to-point connection is sufficient
• Shared link– Link is not dedicated – Wireless medium, Ethernet– Controlling the access to the medium• Who will use the medium?
12.1 Random Access
• Random access (or contention)– No station is superior to another station (no
centralized authority)– No scheduled time for transmission – transmission
is random– No rules specify which station would send next –
stations compete with each other (contention)
Pure (Original) ALOHA• Earliest random access, developed at the University
of Hawaii in early 1970s• Basic procedure– If a station has a frame to send, then it sends a frame
immediately (hoping that none transmits simultaneously)– Then, check whether the transmission is successful (by
receiving an ACK)• Collision: two or more users’ transmissions overlap
resulting in packet loss
t
Collision occurs
Station 1 decides to Xmit
Station 2 Xmits
Reliable Transmission• Retransmission
– The sender checks whether a transmission is successful by receiving an ACK from the receiver
– If unsuccessful, the sender retransmits the frame• Binary Exponential Back-off
– Before retransmission, wait for random amount of time– If it is the first retransmission, random within [0,T], where T is a time
unit (often, max round-trip propagation delay)– If it is the second retransmission, random within [0, 2T]– If it is the third retransmission, random within [0, 4T]– …– If it is the k-th retransmission, random within [0, 2kT]
Example 12.1
• The stations on a wireless ALOHA network are a maximum 600km apart. If we assume that signals propagate at 3x108 m/s, we find T = (600x103)/(3x108) = 2ms. Now we can find the value of backoff time TB for different Ks. – For K = 1, TB = 0 or 2ms
– For K = 2, TB = 0, 2, 4, or 6ms
– For K = 3, TB = 0, 2, 4, 6, 8, 10, 12, or 14ms– In many cases, there are maximum K. For example,
if K > 10, the range is set to [0, …, 210-1] TB
Vulnerable Time• Vulnerable time is a time interval, in which
there is a possibility of collisionAssume that all stations send fixed-length frames
Throughput Analysis : Pure Aloha
mm
N S
sec / packets 1sec / packets N
rateion transmisschannel Max.
packets new ing transmittof Rate (S)t throughpuNormalized
N stations Each station transmits λ (new)
packets/ sec Arrival from each station is Poisson Fixed Packet lengths Time to transmit a packet m=Tfr
Throughput Analysis : Pure Aloha
• Due to collisions : Total rate of packets attempting transmission = λ′
λ > ′ λ• G = Actual traffic intensity or utilization
G = N λ m′
Throughput Analysis : Pure Aloha
• Any transmissions by any station between times t-m and t+m will cause a collisionPr {Successful transmission}= Pr {No arrivals occur in time [t-m, t+m] | An arrival occurs at time t}= Pr {No arrivals occurring in time (t-m,t+m)}= Pr {No arrivals occur in time 2m}
= e-N λ (2m)′
• Hence, Ps = Pr {Successful transmission} = e-2G (Because G = N λ m)′
vulnerable time
Throughput Analysis : Pure Aloha (Throughput with new packets) (Throughput with all packets)
# of successfully transmitted packetssec
# of totally transmitted packetssec
# of successfully transmitted packets# of totally tran
sSPG
S
G
smitted packets
2
2
/
/S
G
G
P S G
S G e
S Ge
Throughput Analysis : Pure Aloha
• S = G e-2G : Pure Aloha throughput equationdS/dG = e-2G - 2G e-2G
At the peak of S, e-2G (1 - 2G) = 0G* = 1 / 2 = 0.5Smax = 0.5e-1 = 1 / (2e)Smax ≈ 0.18
• For Pure ALOHA the max. throughput is 18% of channel capacity.
Suitable for highly bursty traffic (computer traffic)
Throughput Analysis : Pure Aloha
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.015…
0.03125
0.0625
0.125
0.25 0.5 1 2 4 8
Ge-G
Ge-2G
G
S0.184
G*
Smax
Slotted ALOHA• Time-slotted system• Slotted ALOHA: stations must send a frame
only at the beginning of the time slot
Vulnerable Time of Slotted ALOHA• Improves the efficiency– Vulnerable time is Tfr
(Recall that pure ALOHA has vulnerable time of 2Tfr)
– When a data arrives, it waits until the next slot
Throughput Analysis: Slotted Aloha Pr {Success} = e-G
Similar to pure Aloha: S = G e-G , dS/dG = 0G* = 1 Smax = 1/e ≈ 0.36 Slotted Aloha improves throughput by a factor of 2!!! However, maintaining slots consistently in a distributed
system is difficult
Throughput Analysis: Slotted Aloha
0
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.015…
0.03125
0.0625
0.125
0.25 0.5 1 2 4 8
Ge-G
Ge-2G
G
S0.184
0.368
G*
Smax
Simulating Slotted-ALOHA Network• nonAttempt = 0; collision = 0• for i=0 to 9 do
– throughput(i) = 0– variable p(i) is given within [0, 1]
• for t=1 to 1000 do /* simulate for 1000 time slots */– for i=0 to 9 do /* simulate with 10 stations */
• X(i) = 0– for i=0 to 9 do
• X(i) = 1 with probability p(i) /* station i transmits at this time slot */– Y = X(0) + X(1) + … + X(9)– case Y
• == 0: nonAttempt = nonAttempt + 1• == 1: throughput(i) = throughput(i) + 1• >= 2: collision = collision + 1
• endfor• print nonAttempt, collision, throughput(0), throughput(1),…, throughput(9)
Carrier Sense Multiple Access (CSMA)
• Intended to reduce collision– A station senses the medium before trying to use
it (i.e., listen to the medium before sending)– If a station finds that there is an ongoing
transmission in the medium, it should not send
Persistence: CSMA• 1-persistent
– If the medium is busy, sense continuously
– If the medium is idle, send a frame
• non-persistent – If busy, wait for a random
amount of time– If idle, send a frame
• p-persistent– If busy, sense continuously– If idle, send a frame with
prob. p, and wait for a time slot with prob. 1-p
High chance of collision
Low efficiency
CSMA/CD• CSMA with Collision Detection • Station monitors the medium after it sends a frame
– If it detects a collision, it stops transmitting immediately– Before sending the last bit of the frame, the sending station
must detect the collision restriction on the frame size
CSMA/CA• CSMA with Collision Avoidance– Signal attenuation makes it hard to detect a collision (usual in
wireless environments)– Inter-Frame Space (IFS): a station defers transmission for an IFS
time, even if the channel is found idle– Contention windows: a station randomly picks a time slot of
contention window as its wait time– Acknowledgement: data still can be corrupted
• Cautions in CSMA/CA– IFS can be used to prioritize stations: stations with
a higher priority will have a shorter IFS– Fairness: when a station finds that the channel is
busy while it waits in the contention window, it freezes the timer, which will restart when the channel becomes idle
12.2 Controlled Access
• Reservation access– A station needs to make a reservation before
sending data
time
Controlled Access (2)• Polling
– Primary station (central entity) manages other secondary stations– Select: check whether the primary station can send a frame to a
secondary station– Poll: check whether a secondary station has a frame to send to
the primary station
Controlled Access (3)
• Token passing– Stations in a network are organized in a logical ring– A special packet called token (there is only one token in
the network) is circulated in the network– A station should wait for the token before sending data– The station who holds the token can send data – Once the station finishes its transmission, it passes the
token to the next station– Token management: the token has to be monitored to
ensure that it has not been lost or destroyed
• Chip sequence of CDMA– Orthogonal sequences: ci * cj = 0 if i ≠ j
– Each station j has its sequence cj, and sends cj for to send 1 or –cj for to send 0
CDMA (Cont)
• At sender– di = 0 or 1
• At receiver of Station 3:– Result = c3 * (d1* c1 + d2 * c2 + d3 * c3 + d4 * c4)
= 0 + 0 + d3 * (c3 * c3) + 0
Homework
• Exercise in Chap. 12– 11, 12, 13, 14, 15, 23
• Additional problem– Simulate Slotted-ALOHA networks (see Slide 22)– 1) Draw nonAttempt when p(i) = p for all i, changing
p = 0.04, 0.06, 0.08, 0.1, 0.12, 0.14, 0.16, 0.18, 0.2– 2) Repeat 1) with collision– 3) Repeat 1) with i throughput(i)– 4) Obtain throughput(i)’s when p(i) = 0.02 x i, AND
compare with the results when p(i) = 0.1 for all i