CS716 Advanced Computer Networks: by Dr. Amir Qayyum
CS716 Advanced Computer Networks: by Dr. Amir Qayyum
1
Lecture No. 13
2
802.11 MAC: CSMA/CA
Similar to Ethernet
Defer the transmission until the link
becomes idle
Take back off if collision occurs
Is it sufficient ?
All nodes are not always within
reach of (to hear) each other 3
Hidden and Exposed Nodes
Hidden nodes
Sender thinks its OK to send when its not (false +ve)
A-C and B-D are hidden nodes in the figure below
Exposed nodes
Sender does not send when its OK to send (false ve)
B and C are exposed nodes in the figure below
A B C D
4
Multiple Access with Collision
Avoidance (MACA)
Collision detection
No active collision detection
Known only if CTS or ACK is
not received
Binary exponential back off
(BEB) is used in case of
collision, like in Ethernet 8
802.11 - Supporting Mobility
Distribution system
AP-1 AP-3
AP-2 F
A B G
H
C E
D
12
Managing Connectivity/Roaming
14
Managing Mobility
However
Node was probably in range of
new AP before leaving range of
old AP
Scanning too expensive to use
continuously
How handoff between APs
managed as users move? 15
Managing Connectivity
Active scanning: when a node join or move
Passive scanning: AP periodically sends
Beacon frame, advertising its capabilities
Distribution system
AP-1 AP-3
AP-2 F
A B G
H
C
C E
D
16
Managing Mobility
Solution to handoff: APs send
periodic beacon frames
Node may switch AP in response
to beacon
if signal strength better from new AP
using geographical information
any other reason 17
Managing Mobility
ToDS=0, FromDS=0 C A
ToDS=1, FromDS=1 E AP-3 AP-1 A
19
Network Adaptors
20
Now you know
communication ?
CPU
Cache $
Network
memory adaptor to network
bus
I/O bus
Memory
Typically where data link
functionality is implemented
23
Components of a Network Adaptor
Bus interface communicates with a specific host
Bus defines protocol for CPU-adaptor communication
Link interface speaks correct protocol on network
Implemented by a chip set, in software or on FPGA
Buffering between different speed bus and link
Host I/O bus
Bus Link
network
Interface Interface
Network Adaptor
24
Host Perspective
Adaptor is ultimately
programmed by CPU
Adaptor exports a Control
Status Register (CSR)
CSR is readable and writable
from CPU at some memory
25
address
Host Perspective
CSR write: CPU instructs Adaptor
(e.g., transmit)
CSR read: Adaptor informs CPU (e.g.,
receive error)
Host CPU either poll CSR or
interrupted by OS
Interrupt handler routine disables
interrupts and is short 26
Data Motion Options for Network
Adaptor Use
Transfer frames between adaptor
and host memory
Programmed input/output (PIO)
Processor manages itself each
access (loads/stores)
Faster than DMA for small amounts
of data
27
Data Motion Options for Network
Adaptor Use
Direct memory access (DMA)
Adaptor gets buffer descriptor lists
by host for read/write
Processor is not involved: free to do
other things
Can be faster than memory copy
through CPU
Start-up cost 28
Data Motion - DMA
100
1400
1500
1500
1500
29
DMA: Scatter Read, Gather Write
Memory
Adaptor Memory
Data movement
CPU
path using PIO
Cache $
Network
memory adaptor to network
bus
I/O bus
Memory Data movement
path using DMA
32
Network Adaptor: Event Notification
Hardware interrupts
Processor free to do other things
Events delivered immediately
State (register) save/restore
expensive
Context switches more
expensive 33
Network Adaptor: Event Notification
Event polling
Processor must periodically
check
Events wait until next check
No extra state changes
34
Device Drivers
Link capacity
Processor computing power
I/O bus bandwidth
Overhead involved in each bus
transfer
38
Performance Bottlenecks
I/O bus
956 Mbps
Main
800
memory
4.48 Gbps Mbps
CPU
16 Gbps L2
L1 cache
cache crossbar
40