Lect 9
Lect 9
Lect 9
Lecture-09
Node 3
Node 4
Node 2 Shared Multiple
Access Control
Channel to BS
Node 1 …
Node N
Introduction
• Multiple access issues
– If more than one node transmit at a time on the control channel
to BS, a collision occurs
– How to determine which node can transmit to BS?
Static
Channelization
Channel Sharing
Techniques
Scheduling
Dynamic Medium
Access Control
Random Access
Classification of Multiple Access Protocols
Goals of MACs
Round Robin Working
1. Pooling
2. Token Passing
Random Access 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.
Random Access Protocols (Cont’d)
• 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
• CSMA/CA with ACK
• CSMA/CA with RTS/CTS
ALOHA
Node 2 Packet
Retransmission Retransmission
1 2 3 3 2
Time
Collision
Node 3 Packet
Node 1 Packet
1 2&3 2 3
Time
Slot Collision
• The throughput S is
0.368
Slotted Aloha
S
0.184
Aloha
G
CSMA (Carrier Sense Multiple Access)
Node 1 Packet
Node 5 sense
Node 2 Packet
Node 3 Packet Delay
1 2 3 4 5
Time
Delay Collision
Node 4 sense
Kinds of CSMA
Nonpersistent CSMA
CSMA
Persistent CSMA
1-persistent CSMA
p-persistent CSMA
Non Persistent/Persistent CSMA Protocols
Step 1: If the medium is idle, transmit with probability p, and delay for worst case
propagation delay for one packet with probability
0 1 2 3 4 5 6 7 8 9
G
CSMA/CD (CSMA with Collision Detection)
• In CSMA, if 2 terminals begin sending packet
at the same time, each will transmit its
complete packet (although collision is taking
place).
• Wasting medium for an entire packet time.
• CSMA/CD
Step 1:If the medium is idle, transmit
Step 2:If the medium is busy, continue to
listen until the channel is idle then
transmit
Step 3:If a collision is detected during
transmission, cease transmitting
Step 4:Wait a random amount of time and
repeat the same algorithm
CSMA/CD (Cont’d)
T0 A begins transmission
A B
T0 + α B detects collision
A B
Delay: B
Delay: C Time
Nodes B & C sense
the medium
Nodes C starts
Nodes B resenses the medium transmitting.
and transmits its frame.
Node C freezes its counter.
DIFS Time
Data
Source
SIFS
ACK
Destination
DIFS Contention window
Next Frame
Other
Defer access Backoff after defer
Node A Node B
Propagation delay
RTS
CTS
Data
ACK
Non Persistent CSMA
• What if busy? What if idle?
• Nonpersistent CSMA rules:
1. If channel idle, transmit;
2. If channel busy, wait random (probability distribution)
amount of time (retransmission delay) & retry
• Behavior & flow diagram
• CSMA/CA rules:
1. Continue sense channel until idle, not send immediately, wait for
interframe space (IFS) time to defer transmission
2. After IFS, if channel busy, repeat step 1; if channel still idle, use counter of
contention window (CW, binary exponential num of time slots) to wait
3. After each time slot in CW, sense channel, if busy, stop CW counter until
channel idle again, then resume counter
4. After CW counter expires, transmit frame and wait for ACK
5. If no ACK, double CW size (binary exponential back-off), repeat step 1
Flow Diagram of CSMA/CA
• Even if channel sensed idle, distant
station may start sending
• IFS allows sent signal to reach
• IFS can also use to set priority
– Station with shorter IFS, higher priority
• collision detection:
– easy in wired LANs: measure signal strengths, compare transmitted,
received signals
– difficult in wireless LANs: receiver shut off while transmitting