Ee534 Mac PDF
Ee534 Mac PDF
– Random Access
• Pure and Slotted ALOHA,
• CSMA, CSMA/CD,
Shared multiple
access medium
M 5
Approaches to Media Sharing
Medium sharing techniques
Satellite Channel
uplink f1 ; downlink f2
uplink f3 ; downlink f4
Scheduling: Polling
Inbound line
Data from 1 from 2
Data
Stations
Scheduling: Token-Passing
Ring networks
token
Data to M
token
Crash!!
• Random Access
• Pure and Slotted ALOHA,
• CSMA, CSMA/CD,
t
kX (k+1)X t0 +X+2tprop t0 +X+2tprop+ B
Time-out
Vulnerable
period
• Random Access
• Pure and Slotted ALOHA,
• CSMA, CSMA/CD,
Station A captures
channel at t = tprop
A
CSMA Options
Transmitter behavior when busy channel is sensed
1-persistent CSMA (most greedy)
•Start transmission as soon as the channel becomes idle
•In case of a collision, the sender keeps on sensing the channel and as soon it
finds it idle, transmits again
•Low delay and low efficiency
•1-persistent CSMA is used in CSMA/CD systems including Ethernet.
Non-persistent CSMA (least greedy)
•if the channel is idle it starts transmitting the data.
•if the channel is busy, the station waits for random amount of time and
repeats the algorithm.
•High delay and high efficiency
Sensing
CSMA Options
p-persistent CSMA (adjustable greedy)
•Wait till channel becomes idle, transmit with prob. p; or wait one mini-slot
time & re-sense with probability 1-p
•when idle, transmits with a probability p, and so on
•used in CSMA/CA systems including Wi-Fi and other packet radio systems.
•Delay and efficiency can be balanced
Sensing
1-Persistent CSMA Throughput
S
0.53
• Better than
Aloha & slotted
0.45
a 0.01 Aloha for small
a
0.16
a =0.1• Worse than
Aloha for a > 1
G
a=1
Non-Persistent CSMA Throughput
a = 0.01
S 0.81 • Higher
maximum
0.51 throughput than
1-persistent for
a = 0.1 small a
0.14
• Worse than
G
Aloha for a > 1
a=1
CSMA with Collision Detection
(CSMA/CD)
•Monitor for collisions & abort transmission
•Stations with frames to send, first do carrier sensing
•After beginning transmissions, stations continue listening to
the medium to detect collisions
•If collisions detected, all stations involved stop transmission,
reschedule random backoff times, and try again at scheduled
times
•In CSMA collisions result in wastage of X seconds spent
transmitting an entire frame
•CSMA-CD reduces wastage to time to detect collision and
abort transmission
CSMA/CD reaction time
A begins to
transmit at A B B begins to
t=0 transmit at
B t = tprop- ;
A
B detects
A detects collision at
collision at A t = tprop
B
t= 2 tprop-
(a)
Busy Contention Busy Idle Contention Busy
Time
Contention Resolution
• Calculate the mean time required for a station to
successfully capture the channel.
• Contention is resolved (“success’) if exactly 1 station
transmits in a slot:
n−1
P success =np(1−p)
• By taking derivative of Psuccess w.r.t. p we find max
occurs at p=1/n
max 1 1 n−1 1 n−1 1
P success =n (1− ) =(1− ) →
n n n e
Contention Resolution
The average number of minislots that elapse until a station
successfully captures the channel is calculated as follows.
The probability that j minislots are required is given by
Time
Non-P CSMA
max
Slotted ALOHA
ALOHA
– Random Access
• Pure and Slotted ALOHA,
• CSMA, CSMA/CD,
Central
Controller
Reservation Systems
Reservation Frame
interval transmissions
r d d d r d d d Time
Cycle n Cycle (n + 1)
r = 1 2 3 M
r 3 5 r 3 5 r 3 5 8 r 3 5 8 r 3
t
Efficiency of Reservation Systems
Assume minislot duration = vX
TDM single frame reservation scheme
If propagation delay is negligible, a single frame transmission requires (1+v)X seconds
Link is fully loaded when all stations transmit, maximum efficiency is:
MX 1
ρmax = =
MvX+MX 1 +v
TDM k frame reservation scheme
If k frame transmissions can be reserved with a reservation message
and if there are M stations, as many as Mk frames can be transmitted
in XM(k+v) seconds
Maximum efficiency is: MkX 1
ρmax = =
MvX+MkX v
1+
k
Random Access Reservation Systems
Large number of light traffic stations
Dedicating a minislot to each station is inefficient
Slotted ALOHA reservation scheme
Stations use slotted Aloha on reservation minislots
On average, each reservation takes at least e minislot
attempts
Effective time required for the reservation is 2.71vX
X 1
ρmax = =
X(1+ev) 1 + 2.71v
Example: GPRS
General Packet Radio Service
Packet data service in GSM cellular radio
GPRS devices, e.g., cellphones or laptops, send
packet data over radio and then to Internet
Slotted Aloha MAC used for reservations
Single & multi-slot reservations supported
Reservation Systems and QoS
Different applications; different requirements
Immediate transfer for ACK frames
Low-delay transfer & steady bandwidth for voice
High-bandwidth for Web transfers
Reservation provide direct means for QoS
Stations makes requests per frame
Stations can request for persistent transmission access
Centralized controller issues grants
Preferred approach
Decentralized protocol allows stations to determine grants
Protocol must deal with error conditions when requests or grants are
lost
Polling Systems
Centralized polling systems: A central controller transmits
polling messages to stations according to a certain order
The central controller sends a polling message to a
particular station.
When polled, the station sends its inbound messages and
indicates the completion of its transmission through a go-
ahead message.
The central controller might poll the stations in round-robin
fashion , or according to some other pre-determined order
Polling Systems
Polling Systems
Distributed polling systems: A permit for frame transmission
is passed from station to station according to a certain
order
A signaling procedure exists for setting up order
Polling System Options
Service Limits: How much is a station allowed to
transmit per poll?
Exhaustive: until station’s data buffer is empty
(including new frame arrivals)
Gated: all data in buffer when poll arrives
Frame-Limited: one frame per poll
Time-Limited: up to some maximum time
Polling System Options
Priority mechanisms
More bandwidth & lower delay for stations that
appear multiple times in the polling list
Issue polls for stations with message of priority k or
higher
Walk Time & Cycle Time
Assume polling order is round robin
Time is “wasted” polling stations
Time to prepare & send polling message
Time for station to respond
Walk time: from when a station completes transmission to when
next station begins transmission
Cycle time is between consecutive polls of a station
Overhead/cycle = total walk time/cycle time
Polling
messages
1 2 3 4 5 … M 1 2
t
Frame transmissions
Cycle Time
Average Cycle Time
t’ t’ t’ t’ t’ t’
1 2 3 4 5 … M 1
t
Tc
Assume walk times all equal to t’
Exhaustive Service: stations empty their buffers
Cycle time = Mt’ + time to empty M station buffers
/M be frame arrival rate at a station
N average number of frames transmitted from a station
C
Time to empty one station buffer:
λ ρT c
T station =N c X=( T c ) X= ρ=λX
M M
Average Cycle Time: '
' ' Mt
T c =Mt +MT station =Mt +ρT c ⇒ T c=
1−ρ
Efficiency of Polling Systems
Exhaustive Service
Cycle time increases as traffic increases, so delays become very
large
Walk time per cycle becomes negligible compared to cycle time:
MT station Can approach
Efficiency= =ρ 100%
Tc
Limited Service
Many applications cannot tolerate extremely long delays
Time or transmissions per station are limited
This limits the cycle time and hence delay
Efficiency of 100% is not possible
MX 1 Single frame
Efficiency= = per poll
MX+Mt 1 +t ' / X
'
Polling Application: Token-Passing
Rings
token
Free Token = Poll
Frame Delimiter is Token
Free = 01111110
Busy = 01111111
Token Ring
• Proposed in 1969 and initially referred to as a
Newhall ring.
• Token ring :: a number of stations connected by
transmission links in a ring topology.
Information flows in one direction along the
ring from source to destination and back to
source.
• Medium access control is provided by a small
frame, the token, that circulates around the ring
when all stations are idle. Only the station
possessing the token is allowed to transmit at
any given time.
Toke Ring
Such ring networks consists of station interfaces
Each interface acts like a repeater + has some
additional functions
Token Passing Rings
• An interface in the listen mode reproduces each bit it
has received at its input at its output with a constant
delay, typically of the order of one bit
• This delay allows interface to observe pattern, e.g.,
address of the attached station, free token
• When the address is observed it copies all information
to the attached station
Listen mode
Input Output
from Delay to
ring ring
MX 1 1
ρmax = ' = =
τ +MX 1+τ / MX 1 +a' / M
'
'
τ
a '= is the normalized ring latency
X
Token Ring Throughput
Single-frame operation
Effective frame transmission time is maximum of X and ’ ,
therefore
MX 1
ρmax = =
΄+ M max{(X,΄} max{1, a΄} + a΄/M
Single-token operation
Effective frame transmission time is X+ ’ ,therefore
MX ΄+ 1
ρmax = =
M(X+ ΄) 1+a΄(1 + 1/M)
Token Reinsertion Efficiency
Comparison
“physical”
Processor
ROM
RAM
address
Medium Access Control Sublayer
In IEEE 802.1, Data Link Layer divided into:
1) Medium Access Control Sublayer
Coordinate access to medium
Connectionless frame transfer service
Machines identified by MAC/physical address
Broadcast frames with MAC addresses
2) Logical Link Control Sublayer
Between Network layer & MAC sublayer
MAC Sub-layer
IEEE 802 OSI
Data link
layer
Physical
Physical Various physical layers
layer
layer
Logical Link Control Layer
IEEE 802.2: LLC enhances service provided by MAC
A C
I/G C/R
1 7 bits 1 7 bits
MAC FCS
Header
Ethernet
IEEE 802.3 MAC: Ethernet
MAC Protocol:
CSMA/CD
Slot Time is the critical system parameter
– upper bound on time to detect collision
– upper bound on time to acquire channel
– upper bound on length of frame segment generated by
collision
– quantum for retransmission scheduling
– max{round-trip propagation, MAC jam time}
Truncated binary exponential backoff
for retransmission n: 0 < r < 2k, where k=min(n,10)
Give up after 16 retransmissions
IEEE 802.3 Original Parameters
• Transmission Rate: 10 Mbps
• Min Frame: 512 bits = 64 bytes
• Slot time: 512 bits/10 Mbps = 51.2 sec
– 51.2 sec x 2x105 km/sec =10.24 km, 1 way
– 5.12 km round trip distance
• Max Length: 2500 meters + 4 repeaters
• Each x10 increase in bit rate, must be accompanied
by x10 decrease in distance
81
IEEE 802.3 MAC Frame
802.3 MAC Frame
7 1 6 6 2 4
Destination Source
Preamble SD Length Information Pad FCS
address address
Synch Start 64 - 1518 bytes
frame
ORG Type
3 2
SNAP Header
SNAP PDU Information
LLC PDU AA AA 03
1 1 1
25
20
15
10
5
0
0.24
0.42
0.48
0.54
0.96
0
0.06
0.12
0.18
0.36
0.6
0.66
0.72
0.78
0.84
0.9
0.3
Medium Twisted pair category 3 Twisted pair category 5 Optical fiber multimode
UTP 4 pairs UTP two pairs Two strands
Medium Two optical Two optical fibers Two optical fibers Two optical fibers
fibers multimode/single-
Multimode at Single-mode at Single-mode at mode with four
850 nm 1310 nm 1550 nm wavelengths at 1310
SONET nm band
64B66B code 64B66B compatibility 8B10B code
Hub Hub
Hub