You are on page 1of 52

Mobile and Wireless

Networks

1
Disclaimer Statement
In preparation of these slides, materials have been taken from
different online sources in the shape of books, websites,
research papers and presentations etc. However, the author
does not have any intention to take any benefit of these in
her/his own name. This lecture (audio, video, slides etc) is
prepared and delivered only for educational purposes and is not
intended to infringe upon the copyrighted material. Sources
have been acknowledged where applicable. The views
expressed are presenter’s alone and do not necessarily
represent actual author(s) or the institution.
3
Channel Access
Schemes
Channel Access Schemes

Which node will access the network and when?


Channel Management
• Two types of channel management schemes:

– Control based access


• Any advantage or disadvantage … ?

– Random access
• Any advantage or disadvantage … ?
Control Based Access
• Controlling entity
– Responsible for fair distribution of channel among nodes
• Network nodes
– No (or little) responsibility to control access to channel
– Have more resources available to manage their own data
• Major constraint
– Each node must maintain a reliable connection with the
central entity
– Very difficult to employ in a multi-hop network!
Random Access Schemes
• No concept of central entity
– Independent nodes compete for channel when needed
– Each node decides itself how and when to transmit
• Two or more transmitting nodes -> collision
– When node has pkt to send, transmit at channel rate R
– No a priori coordination among nodes
• Main challenge is to avoid or minimize collisions
– Random access MAC protocol specifies how to detect
collisions, and then how to recover from collisions
(delayed retransmissions?)
Ideal Multiple Access Protocol
Broadcast channel of rate R bps
1. When one node wants to transmit, it can send at
rate R.
2. When M nodes want to transmit, each can send at
average rate R/M
3. Fully decentralized:
– no special node to coordinate transmissions
– no synchronization of clocks, slots
4. Simple
Some Terminologies
• Contention systems
– Systems in which multiple users share a common channel
in a way that can lead to conflicts
• Throughput
– The maximum continuous traffic rate that a device can
handle without dropping a single packet.
– Measured in terms of the number of frames per second at
a given frame size
• Frame Time
– Time used to transmit a frame (frame_size/data rate)
Channel Access
• Three main key words for design of multiple
access schemes:
– Flexibility
– Quality
– Fairness
Taxonomy of MAC Protocols
• What can be the different and distinguishable
approaches to access the wireless channel?

• How about pre-sharing the resources equally?

• How about making a queue?

• And if we leave it to the transmitter, as per the


demand of the traffic?
Broad Classes of MAC Scheme
1. Channel partitioning
– Divide channel into smaller “pieces” (time slots,
frequency, code, etc.)
– Allocate each piece to a node for exclusive use
2. Random access
– Channel is not divided, allow collisions!
– “Recover” from collisions
3. Taking turns
– Tightly coordinate shared access to avoid collisions
Channel Partitioning
Schemes
Control Based Access
• Scheduled/centralized approach to multiple
access
• Better suited to circuit switched networks,
especially for infrastructure networks
– Frequency Division Multiple Access (FDMA)
– Time Division Multiple Access (TDMA)
– Code Division Multiple Access (CDMA)
– Space Division Multiple Access (SDMA)
– Token Ring / Bus Ring
Frequency Division Multiple
Access (FDMA)
• Divide spectrum (freq) into n bands (channels)
– One channel to each node for each direction of a data flow
– User has access to only 1/n of bandwidth, but all the time
– One channel could be reserved for control functions
• Each node sends in a pre-determined frequency bin
– Unused time in frequency bands go idle
• Ex: 6-station LAN, 1,3,4 have pkt, frequency bands 2,5,6 idle
frequency bands

time
Time Division Multiple Access
(TDMA)
• Divide time into multiple slots (n channels)
– Station gets a slot (length=pkt trans time) in each round
– User accesses full bandwidth, but only for 1/n of time
– Reserved or fixed and dynamic, on-demand assignment
– One channel could be reserved for control functions
• Node send in a defined slot to each flow direction
– Access to channel in ‘rounds’, unused slots go idle
– Example: 6-station LAN, 1,3,4 have pkt, slots 2,5,6 idle
Code Division Multiple Access
(CDMA)
• Multiple orthogonal codes to partition the spectrum
– n channels defined by assigning n codes, 1 each to n users
– Same freq, but unique chipping sequence to encode data
– Code is used to ‘spread’ the spectrum of transmission
– Each data bit (symbol) is transmitted by sending the code
• Receiver correlate code to received data to decode it
– encoded signal = original data x chipping sequence
– decoding: product of encoded signal x chipping sequence
Code Division Multiple Access
(CDMA)
TDMA, FDMA and CDMA
Channel Access in Cellular
Telephony
• First generation
– Capacity sharing based on FDMA, analog
voice+signaling
• 2G: Capacity sharing based on TDMA or CDMA
– Digital voice+control signaling, encryption, error correctn
– Bandwidth allocated when needed (idle, dedicated mode)
• 3G standard based on wideband CDMA
– 5 MHz carrier as compared with 200 kHz for narrowband
• 3G “widens the data pipe”
– Typically require different access and routing strategies
• Data is bursty, whereas voice is continuous, both packet switched
Orthogonal Frequency Division
Multiple Access (OFDMA)
• OFDMA divides a signal into sub-channels
– Using OFDMA/TDMA, sub channels allocated in
freq domain, and OFDM symbols in time domain
– Each sub-channel allocated to different subscriber
– Sub-channels can be combined from diff carriers
Random Access
Schemes
Channel Allocation Problem
• Static channel allocation in LAN/MAN
– Issues with FDM or TDM
• Fewer than N users
– Valuable chunk of time (TDM) or bandwidth (FDM) wasted
• More than N users
– Some users are denied access (even if another user is idle)
• Exactly N users
– Idle users waste bandwidth e.g. bursty traffic (worst of both)
• Dynamic channel allocation in LANs/MANs
Assumptions for Dynamic Channel
Allocation
• Station model
– N independent stations generate frames, blocked in access
• Single channel assumption
– Single channel for communication, stations are equivalent
• Collision assumption
– If two frames transmitted simultaneously, overlap in time,
result in a garbled signal; all stations can detect collisions
• Time assumption
– Continuous time or slotted time
• Carrier assumption
– Carrier Sense (LAN) or no Carrier Sense (Satellite)
Multiple Access Schemes
• Single shared broadcast channel
– Two or more simultaneous transmissions: interference
– Only one node can send successfully at a time
A multiple access protocol is characterized as follows:
• Distributed algorithm determines sharing of channel
– i.e. to determine how and when node can transmit
• Communication about channel sharing must use
channel itself!
• Scheduled or contention-based TDM
– Typically used in LANs, wireless and wired
– Contention-based, or explicitly / implicitly scheduled
TDM Based Schemes
• Contention Based TDM Schemes
– Aloha and Slotted Aloha
– Carrier Sense Multiple Access (CSMA)
– Multiple Access with Collision Avoidance (MACA)
– MACA for Wireless (MACAW)
– Inhibit Sense Multiple Access (ISMA)
• Reservation Based TDM Schemes
– Polling
– Reservation TDMA
– Demand Assigned Multiple Access (DAMA)
– Packet Reservation Multiple Access (PRMA)
Contention-based Multiple
Access
• FDMA, TDMA and CDMA are all scheduled
multiple access schemes
– Need distributed or centralized scheduling algorithm
– Overhead for scheduling
• Contention-based or “free-for-all” schemes are
probabilistic
– Transmission may succeed or fail due to “collision”
– Collisions delay transmission and waste capacity
Contention or ‘Free-for-all’
Approach - Distributed
• ALOHA (Pure and slotted)
• Carrier Sense Multiple Access (CSMA)
– 1-persistent, non-persistent and p-persistent
– CSMA/CD (Ethernet)
• CSMA with Collision Avoidance (CSMA/CA)
• Elimination Yield Non-Preemptive Multiple Access (EY-
NPMA)
• Collision-Free Protocols
– Bitmap protocol
– Binary countdown
• Limited-Contention Protocols
– Contention when load is light, collision-free when load is heavy
Collision-Free Protocols
• Assumption
– N stations with unique address, propagation delay is negligible
• Bit-map protocol
– A reservation protocol: the desire to transmit is broadcasted before
the actual transmission

• Binary countdown
Limited-Contention Protocols
• ALOHA
– Low load: improved efficiency
– High load: high delay
• Collision-free protocols
– Low load: high delay
– High load: improved efficiency
• New protocol? – limited contention protocol
– Uses contention at low load
– Uses collision-free at high load
ALOHA
• 1971 by Norman Abramson, Univ. of Hawaii
– Extremely simple scheme, no coordination of medium
access, no resolution if there are collisions
• Stations attempt to transmit randomly (users
transmit whenever they have data)
– Collision if transmission of two or more stations overlap
– Hosts wait a timeout for an ACK, if no ACK received
within timeout, assume ‘collision’
– When collision occurs, wait for a random amount
of time (to avoid repeated collisions) and then
retransmit
Aloha
• Wasted time due to collision is 2 packet intervals
• Probability of collision increases with number of
transmitting nodes
– Assuming Poisson arrivals, maximum throughput
achieved at 18% load
– pkt sent at t0 collide with other pkts sent in [t0-1, t0+1]
ALOHA – Performance
Analysis
• Poisson process (1837)
– Simplest model for arrivals
into a queue system
– the probability of an arrival
in a small interval of time
depends only on the size of
the interval
– The probability that k
frames are generated during
a given frame time follows
the Poisson distribution
Slotted ALOHA
• Improvement over classical Aloha, 1972 by Roberts
– No coordination of medium access or resolution of
collisions (like Aloha)
– Divide time into discrete intervals; all transmitters are
synchronized to define fixed time slots (pkt trans time)
• Stations attempt to transmit only at the beginning of
next time slot
– Transmissions of two or more stations overlap
=‘collision’
– If collision: retransmit packet in future slots with
probability p, until successful
Slotted Aloha
• Collision are confined to one time slot
– Wasted time due to a collision = 1 packet interval
• Collision occurs if two or more stations receive new
packets during the preceding time slot
– Max throughput achieved at 36% load, for Poisson arrivals
– Doubles the maximum throughput

Success (S), Collision (C), Empty (E) slots


Slotted ALOHA Analysis
• Let m be the number of nodes in the system
• Let qa be the probability of a new transmission
attempt by a node during a given time slot (Poisson
arrivals)
• Let qr be the probability of a retransmission attempt
by a node during a given time slot
• The state of the system is n, the number of
“backlogged” nodes, 0 <= n <= m
• Markov chain model used to determine system
throughput as a function of state
Slotted ALOHA Analysis
• Equilibrium achieved: arrival rate = departure rate
– Three such points: two equilibrium points are stable, one equilibrium
point is unstable
• Only one stable point is desirable
– Other parameter values may lead to
• One stable point and an unstable equilibrium point
• Single stable point
• No stable point
Problems of ALOHA Protocol
• Low efficiency
– Pure Aloha
– Slotted Aloha
• Undesirable steady state
– At a fixed transmission rate, when the
number of backlogged stations
varies
Carrier Sense Multiple Access
• CSMA:improves Aloha by listen before transmitting
– Node wishing to transmit data first sense the channel
– If channel sensed idle: transmit entire frame
– If channel sensed busy, defer transmission
• Human analogy: don’t interrupt others!
– Can significantly reduce the probability of a collision
– Collision avoidance -- reduce probability of near
simultaneous transmissions
• Transmissions from two or more stations can still
overlap, so collisions can occur
– Retransmission in case of collision (LLC sublayer, TCP)
Collision Detection
my-machine your-machine

start start
transmission at transmission at
time 0 time T

almost there at collision !!!


time T

How to ensure that my-machine knows about the collision?


41
CSMA – Collisions
• Nodes start to transmit at about the same time
– Heavy load: nodes simultaneously sense the channel idle
– Time to detect other transmission is significant perf factor
– Performance degrades to that of Aloha as detection time
approaches frame transmit time
• Hidden terminal problem, unique to wireless net
– A station cannot detect another station’s transmission, yet
collision occurs at intended receiver(s)
CSMA – Collisions …
• Collisions can still occur:
– Propagation delay means two
nodes may not hear each
other’s transmission
• Collision:
– Entire packet transmission
time wasted
• Note:
– Role of distance &
propagation delay in
determining collision
probability
CSMA/CD -Collision Detection
• Carrier sensing and deferral on ‘busy’ as in CSMA
– Listen even while transmitting, and if collision is
detected, stop transmission (“Listen-while-talk” protocol)
– Human analogy: the polite conversationalist
• Collision detected within short time, in
wired LANs)
– Measure signal strength, compare
transmitted and received signals
– Difficult in wireless LANs; and can be
costly
CSMA/CD -Collision Detection
• CSMA/CD can be used with nonpersistent, 1-
persistent, or p-persistent variants
– IEEE 802.3 and Ethernet specifies 1-persistent CSMA/CD
• Limits max length to keep propagation delays tight, so
CSMA/CD responds well
• Collision: abort transmission sooner than
end-of-pkt
– Collided transmissions aborted
• Reduces channel wastage
• Better efficiency than pure CSMA
– When collision detected, begin retransmission
CSMA/CD -Collision Detection
• CSMA/CD doesnt require explicit acknowledgement
– Unlike CSMA, which require an ACK or timeout to detect
a collision
– Collision detection is built into the transmitter
• Exponential back-off strategy
– After a collision, wait for randomly chosen time, then
retransmit
– Each time there is another collision, wait time is doubled
• At each retransmission, choose randomly from among a discrete
set of values within exponentially increasing wait time
– Retransmit a finite # of times
Efficiency of CSMA/CD
• If collision is detected, instead of wasting the whole
packet transmission time (a slot), it only wastes the
time needed to detect collision
P: packet size, e.g. 1000 bits
P/C C: link capacity, e.g. 10Mbps

– Collision detect time=2T (T is one-way propagation delay)


• Approx e tries before each successful transmission
– Wastage of e2T (5T) sec on collision, before each
successful transmission, which takes P/C
Efficiency of CSMA/CD
• The efficiency (percentage of useful time) is

• Value of a plays a fundamental role in the efficiency


of CSMA/CD protocols

• Question: What to do in order to increase the


bandwidth of network, but still maintaining the same
efficiency?
CSMA – Persistence
• “Persistence” deals with how CSMA responds
when channel becomes idle
– Station transmits with probability p
– Defers transmission with probability p – 1
• 1 persistent CSMA (p=1)
– When channel is sensed busy, continuously sensing
• Non-persistent CSMA (p=0)
– When channel is sensed busy, wait for random time
• p-persistent CSMA
– Slotted channels, when idle, transmit with probability p
1-persistent CSMA
• If channel is sensed idle, transmit immediately
– If channel is busy, continuously listen (carrier sense)
• Always transmit when channel becomes free ( p = 1)
– Reduced probability of channel under-utilization
– Increased probability of collision due to two or more
waiting stations transmitting at about the same time
• 1-persistent better than 0-persistent if …
– Offered load is light, or penalty for a collision is small

Packet A Packet B PacketPacket


X Y time
Host B listens Host B sends Collision
Non-Persistence CSMA
• If channel is sensed idle: transmit immediately
• If channel is busy: do not continuously sense ( p = 0)
– Waits for a random interval before sensing again
– Repeat until channel is sensed to be idle
– Less prob of collision after channel goes from busy to idle
• Higher throughput than 1-persistent CSMA, with many senders
– Increased probability of under-utilization of channel

Packet A Packet B time


Host B Random Host B sends
listens Sleep
p-Persistent CSMA
• Generalization of 1-persistent CSMA
– Typically applied to slotted channels
– Slot length is chosen as maximum propagation delay
• A host senses the channel, and
– If slot is idle, transmit with probability p, or defer with
probability q=1-p
– If next slot is idle, transmit with probability p, or defer
with probability q=1-p, repeat…
– If channel is busy, then sense channel continuously until it
becomes free, begin again

You might also like