Computer Communications & Networks CS-576: Lecture#10

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 23

Computer Communications

& Networks CS-576


Lecture#10
Multiple Access

2
Random Access
 ALOHA
 Unslotted ALOHA
 Slotted ALOHA
 CSMA (Carrier Sense Multiple Access)
1 persistence
Non persistence
P persistence
 CSMA/CD
 CSMA/CA

3
Random Access Protocols
 When node has packet to send
 transmit at full channel data rate R.
 no a priori coordination among nodes

 Two or more transmitting nodes ➜ “collision”,

 Random Access protocol specifies:


 how to detect collisions
 how to recover from collisions (e.g., via delayed
retransmissions)

4
WHY Random Access
 Also called contention methods.

 Two reasons
 There is no scheduled time for a station to
transmit; transmission is random among the
stations. No station is superior than other.
 No rule specifies which station should send
next. Each station has to compete with other
to access the medium.

5
ALOHA
Also Name as Pure ALOHA , Unslotted ALOHA

6
ALOHA
● A user transmits whenever it has packets to transmit
● When two or more packet transmissions overlap in time,
a collision occurs and all the packets involved in the
collision are destroyed. (non-capture)
● If ACK not received within timeout, then a user picks
random backoff time (to avoid repeated collision)
● User retransmits packet after backoff time

7
8
Slotted ALOHA

9
Slotted ALOHA
 Time is divided into slots of T fr s and stations are
forced to send only at the beginning of time slot
 Stations are allowed to send the packet only at the
beginning of time slot for synchronization.
 If a station misses its time slot, it has to wait for the
next slot.
 If two stations try to send the packet at the beginning
of each time slot, then there is a possibility of collision.

 Slotted ALOHA was invented to improve the


efficiency of Pure ALOHA

10
CSMA
Carrier sense multiple access (CSMA)
It is a probabilistic media access control (MAC)
protocol in which a node verifies the absence of
other traffic before transmitting on a shared
transmission medium, such as an electrical bus,
or a band of the electromagnetic spectrum.

11
Basic Principle
 Principle: "sense before transmit" or "listen before talk"
 Carrier sense means that a transmitter attempts to determine
whether another transmission is in progress before initiating a
transmission. That is, it tries to detect the presence of a carrier
wave from another node before attempting to transmit. If a
carrier is sensed, the node waits for the transmission in
progress to end before initiating its own transmission.
 Multiple access means that multiple nodes may send and
receive on the medium. Transmissions by one node are
generally received by all other nodes connected to the
medium

12
Protocol Variety
 CSMA with collision detection
 CSMA/CD is used to improve CSMA performance by
terminating transmission as soon as a collision is detected,
thus shortening the time required before a retry can be
attempted.
 CSMA with collision avoidance
• In CSMA/CA collision avoidance is used to improve the
performance of CSMA. If the transmission medium is
sensed busy before transmission, then the transmission is
deferred for a random interval.

13
CSMA/CD

14
CSMA/CA

15
Virtual Time CSMA
Virtual time CSMA
VTCSMA is designed to avoid collision generated by nodes
transmitting signals simultaneously, used mostly in hard real-
time systems. The VTCSMA uses two clocks at every node, a
virtual clock (vc) and a real clock (rc) which tells "real time".
When the transmission medium is sensed to be busy, the vc
freezes, when the transmission medium is free, it is reset.
Hence, calculating vc runs faster than rc when channel is
free, and vc is not initiated when the transmission medium is
busy.

16
CSMA
 Several types of CSMA protocols:

1-persistent CSMA

Nonpersistent CSMA

p-persistent CSMA

17
1-persistent
Sense the channel
If busy
keep listening to the channel and transmit immediately
when the channel becomes idle
If idle
Transmit a packet immediately
If collision occurs:
Wait a random amount of time and start over again

1-persistent CSMA is used in CSMA/CD systems


including Ethernet.

18
1-persistent
Behavior Diagram of 1-persistent

Flow Diagram of 1-persistent


19
Nonpersistent
Sense the channel
If busy
Wait a random amount of time and sense the channel again
If idle
Transmit a packet immediately
If collision occurs
Wait a random amount of time and start all over again
Merits
Better channel utilization
Reduces chances of collision
Reduces efficiency

20
Nonpersistent
Behavior Diagram of Non persistent

Flow Diagram of Nonpersistent


21
p-persistent
Applied for slotted channels.
This is an approach between 1-persistent and non-persistent
CSMA access modes.
If idle
It transmits immediately.
If busy
It senses the transmission medium continuously until it becomes
idle, then transmits a frame with probability p.
If the node does not transmit (the probability of this event is 1-p)

p-persistent CSMA is used in CSMA/CA systems including Wi-


Fi and other packet radio systems.

22
p-persistent
Behavior Diagram of p-persistent

Flow Diagram of p-persistent


23

You might also like