You are on page 1of 50

EEL 5718

Computer Communications

Medium Access Control


(MAC)

12:35 AM
Outline
• Duplexing
• Channelization
• MAC protocols
– Deterministic
– Random
– Hybrid

12:35 AM
Multiple Access Control (MAC)
• Data link layer = Logical Link Control + MAC
• Logical link control (e.g., ARQ) hides the
physical connection from higher layers, while
MAC is the part interacting with physical
characteristics
• If link is dedicated, MAC may not be necessary
• What if a link is broadcast in nature? E.g., daily
conversation
• Need coordination---MAC

12:35 AM
MAC
• WLAN

12:35 AM
MAC
• MAC: Medium Access Control or Multiaccess
Control or Multiple Access Control
• MAC: protocols coordinating the use of shared
resource (“channel”)
• Classification
– centralized vs distributed
– deterministic vs random
– static vs dynamic
– reservation-based vs demand-based
– QoS-based or fair sharing

12:35 AM
Duplexing
• Control transmissions in both directions
– Forward (downlink)
– Reverse (uplink)
• Time Division Duplexing (TDD)
– forward and reserse use the same channel but at
different time assignment
– time slots in a frame divided into uplink and downlink
• Frequency Division Duplexing (FDD)
– forward and reverse transmissions use different
frequency channels

12:35 AM
Channelization
(Deterministic MAC)
• Resource available in the network will be shared
– time
– space
– frequency
– code
• Classification
– Frequency Division Multiple Access (FDMA)
– Time Division Multiple Access (TDMA)
– Code Division Multiple Access (CDMA)
– Space Division Multiple Access (SDMA)

12:35 AM
FDMA
• Assigns individual channels to individual users
– each assigned channel is exclusively used by that
user only
Frequency

1 Guard bands
2

M-1
M
Time

12:35 AM
TDMA
• Divide the radio spectrum into time slots, in
each slot, only one user is allowed to either
transmit or receive (guard times and preambles
will be used)
Frequency
Synchronization intervals

W 1 2 3 … M 1

Time
1 Frame

12:35 AM
TDMA
• Transmission will use “frame” (do not be
confused with frame in DLC)

12:35 AM
CDMA
• Instead of slicing time or frequency, different
orthogonal codes can be used, e.g., different
languages are used in a party
• Use all the spectrum: transmitting power is
spread over the whole frequency band
• Hide the transmitted signal behind the noise
floor
• Developed in military applications

12:35 AM
CDMA
• Each user will use a unique code (orthogonal to
other users) for communications (pseudo-
random sequence is used to generate codes)

12:35 AM
Transmitter from one user

Binary Radio
Information X X
R >> R1bps Antenna
R1 bps W >> W1 Hz
W1 Hz
Unique User Digital
Binary Modulation
Random
Sequence Signal plus residual
interference

Signals
X X Binary
from all
Information
transmitters

Correlate to
Digital
User Binary
Demodulation
Random Sequence
CDMA
• Rough mathematical illustration:
• Transmitted signal: si(t) for user i, obtained from
PN code ci(t) orthogonal
• At receiver (BS)
s(t) = s1(t)+s2(t)+…+ sk(t)
BS can recovered the signal from user i using
correlation: s(t)ci(t) due to  ci(t)sj(t) dt -> 0

12:35 AM
CDMA
• However, it has near-far problem: a user near a
BS may overtake a far user
• Power control must be done: transmitting
powers are controlled in such a way that all
received power at a BS will be the same
• Simple interpretation: draw a comparison
between the modulated signal by cos(fct) and a
spread signal by a PN signal c(t), all signal
magnitudes are decreased over a wider band!
c(t) can be regarded as a signal with rich
components

12:35 AM
SDMA
• Control the radiated power/energy for each user
in space using spot beams (using the same
frequency in different space)
• Adaptive antennas

12:35 AM
Random Access (Distributed)
• Coordination of the same shared medium
(channel)
• Easy to implement and does not need a central
controller (distributed in nature)
• Major random MACs
– Pure Aloha
– Slotted Aloha
– CSMA, CSMA/CD, CSMA/CA
– Tree splitting algorithm

12:35 AM
Pure Aloha
• In 1970s, Norm Abramson at Univ. of Hawaii
devised random access scheme for packet radio:
link library among a few islands via radio
• Coordination rule: no coordination! Whenever
there is data, transmit at will, hope for the best,
if collide, delay for random length of time,
retransmit

12:35 AM
Throughput
• Throughput: the percentage of successful
transmissions among all transmission attempts
• Basic assumptions
– Frame size is constant with transmission time t
– Merged traffic (new attempts+retransmits) is
Poisson with parameter G
– G: frame arrivals per frame-time t
 traffic load or offered traffic
– Collision is assumed as long as there are overlaps
between transmitted frames

12:35 AM
Aloha Transmissions

12:35 AM
Time Diagram

First transmission Retransmission

t
t0-X t0 t0+X t0+X+2tprop t0+X+2tprop

Vulnerable Time-out Backoff Retransmission


period period if necessary

12:35 AM
Vulnerable Period

12:35 AM
Formula

12:35 AM
Slotted Aloha
• Coordination rule: a little bit coordination, “let’s
transmit only at certain time instants”
• In 1972, Roberts proposed a simple scheme to
double the throughput: divide time into fixed
time interval (time slot), each user transmits
only at the beginning of each slot; if collide,
delay fixed number of slots, retransmits
• Vulnerable period is reduced to one frame-time:
as long as there is no arrival in a frame period,
there is no collision

12:35 AM
Time Diagram for S-Aloha

t
kX (k+1)X t0 +X+2tprop t0 +X+2tprop

Vulnerable Time-out Backoff Retransmission


period period if necessary

12:35 AM
Throughput
• Aloha: Smax=18.4%
• Slotted Aloha: Smax=36.8%

12:35 AM
Aloha vs Slotted Aloha
• Maximum throughput for Aloha is 18.4%, while
maximum throughput for slotted Aloha is
36.8%, slotted Aloha doubles the throughput of
pure aloha
• Catch: slotted Aloha needs synchronization of all
users, a global clock!

12:35 AM
Carrier Sense Multiple Access
• CSMA
• Coordination rule: sense before transmit, or
listen before you speak
• How to sense: detect whether there is any
transmission in the channel
• Many operating modes
– non-persistent
– 1-persistent
– p-persistent

12:35 AM
Non-persistent CSMA
• A station senses the channel
• If the channel is busy, it will not continue
sensing the channel, instead, it delays a random
period of time, repeats the same procedure
• If channel is idle, it transmits
• If a collision occurs, it will delay a random
period of time, starts all over again

12:35 AM
1-persistent CSMA
• A station (a user, a transmitter) senses the
channel
• If the channel is busy, it will wait until the
channel is idle (sensing all the time)
• Whenever it senses the channel is idle, it will
transmit
• If a collision occurs, it will delay a random
period of time, start it all over again

12:35 AM
p-persistent CSMA
• Observation: if you sense idle, others too,
collision is surely occur
• p-persist CSMA applies to slotted channels
• A station senses the channel
• If it senses idle channel, it transmits with
probability p, with probability q=1-p, it defers to
next slot, repeats the same procedure
• If it senses busy channel, it delays a random
number of slots, starts all over

12:35 AM
Comparison

12:35 AM
CSMA with Collision Detection
• CSMA/CD, widely used in LAN (IEEE 802.3)
• If we know there is a collision, why continue?
New improvement: stop transmission if collision
is detected
• Efficient when frame is long
• How collision detection is made? Detect power
increase at the receiver
• How soon (late) a collision is detected?
2t - double of the propagation time between
two farthest stations

12:35 AM
CSMA/CD Time Diagram
• Time consists of idle period, contention period
and transmission period

12:35 AM
Performance
• Throughput
frame contention frame

Ps u c c e s s  n p (1 - p )n -1 Pmax 0.6
0.5
0.4
0.3
Psuccess is maximized at p=1/n: 0.2
0.1
1 n -1 1 0
Psmax
uc ce s s  n(1 - )  2 4 6 8 10 12 14 16
n e
12:35 AM
n
Performance
• Compute contention interval: the average
number of minislots that elapsed until a station
capture the channel: J is the random number

12:35 AM
Binary Exponential Backoff
• Algorithm for delayed transmission: random
period of time
• Binary exponential backoff algorithm:
– first time collision, delay either 0 or 1 slot
with probability 1/2
– i-th time collision, delay either 0, 1, 2,…, or 2^i-1
slots with equal probability
• Usually, when i=16, i.e., after 16 consecutive
collisions, the controller will throw the towel or
wave the white flag

12:35 AM
CSMA/CA
• CSMA/CD does not work in wireless channel
– difficult to detect collisions in a radio environment
– difficult to control the wireless channel
– hidden and exposed terminal problems
• CSMA/CA is used in wireless environments
– sense before transmit
– gain the access right via contention (slotted Aloha)
– wait for channel grant of usage
– busy-tone may be used
– IEEE 802.11 standard

12:35 AM
Tree Splitting Algorithm
• Capetanakis (1979) developed a tree splitting
algorithm, which can improve throughput to
43%
• Idea: when a collision occurs, say in the k-th
slot, all nodes not involved in the collision go
into a waiting mode, and all those involved in
the collision split into two groups. In the next
slot, only one group is allowed to transmit, if
collision continues, further splitting is done until
no collision occurs, then the second group will
allowed to transmit in the similar manner, etc.

12:35 AM
Tree Splitting Algorithm
• Splitting methods
– flip a coin, or 50/50 at each node
– splitting time of arrivals into half
• How to handle new arrivals
– delay all new arrivals until collision is resolved
– allow new arrivals at end of each collision
resolution period
• Refer to Bertsekas and Gallager’s Data Networks

12:35 AM
Centralized MAC
• Scheduling approach, a type of central
coordinator has to make a decision on channel
access
• Classification
– deterministic
 TDMA, TDMA, CDMA
– reservation systems
– polling
– token-passing protocols

12:35 AM
Reservation-based MAC
• Any transmission must make reservation
– A reservation interval is divided into M minislots,
stations use their corresponding minislots to
announce their intention to transmit and make
reservation accordingly
– By listening the reservation interval, stations can
determine the order of transmissions
– Variable-length packets can be handled if the
reservation message packet-length information

12:35 AM
Reservation-based MAC
• Operations

Reservation Data
interval Transmissions

r d d d r d d d
time
1 frame 1 frame

r = 3 M Each station has own


1 2
minislot for making
reservations

12:35 AM
Variations
• A station can reserve more than one slot per
packet transmission per minislot
• Random access-reservation based protocol
– Instead of assigning minislots to stations, using
random access such as slotted Aloha to contend for
access right on each minislots, then whoever wins at
the minislot will transmit accordingly

12:35 AM
Polling
• Used in wired fixed networks
• Nodes take turns for transmission
• A central node is the coordinator
• Operations
– the central node sends a poll message to node asking
whether there is anything to transmit
– if yes, transmit in response to the poll
– if no, the central node polls the next node

12:35 AM
(a) Shared inbound line

Outbound line
Central
Controller

(b) (c)

Central
Controller
Token Passing Protocols
(Distributed Polling)
• Used in ring architecture
• Tokens (a short packet) is circling around the
ring
• Operations
– whoever seizes the token has the sole right to
transmit
– when a node finishes its transmission, it will
regenerate the token and reinsert it on the ring

12:35 AM
Token-Passing Ring

listen mode transmit mode

input output
from delay to delay
ring ring

to device from device


12:35 AM
Hybrid MAC
• Some kinds of combinations of random access
and reservation MACs can create new classed of
MAC protocols
– contention + contention-free
– random access + reservation
– MAC + channel condition
– MAC + QoS
– more

12:35 AM
Further Reading
• Textbook: Chapter 6
• Tanenbaum’s book: Chapter 4

12:35 AM

You might also like