0% found this document useful (0 votes)
17 views

Module 3 Lec 48-49- Data Link Layer

Uploaded by

swastikadatta89
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Module 3 Lec 48-49- Data Link Layer

Uploaded by

swastikadatta89
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

CN (IT-3001)

Data Link Layer: MAC Protocol


Prof. Amit Jha
School of Electronics Engineering (SOEE)
KIIT Deemed to be University

Disclaimer: The contents in this slide have been referred from many sources which I do not claim as my own. Some of the content has been modified for easier
understanding of the students without any malafide intention. This slide is only for educational purpose strictly, and not for the commercial purpose. Images
portrayed (if any) are not to hurt the sentiments of any person.
Objective
• Media Access/Multiple Access
• Random Access
• ALOHA
• CSMA
• CSMA/CD
• CSMA/CA
• Controlled Access
• Resevation
• Polling
• Token passing
• Cahnnelization
• FDMA
• TDMA
• CDMA
Amit Jha, SOEE, KIIT-DU
Two Sublayers of the Data-Link-Layer
• The data link layer is divided into two sublayers as shown below.
1. Data Link Control (DLC) sublayer
2. Media Access Control (MAC) Sublayer
• The upper sublayer that is responsible for flow and error control is
called the logical link control (LLC) layer.
• The lower sublayer that is mostly responsible for multiple access
resolution is called the media access control (MAC) layer.
• Why do we need multiple-access protocol?
Ans: In a broadcast or multipoint, nodes use a common link. To use this
common link efficiently, we need a multiple-access protocol to
coordinate access to the link.

Amit Jha, SOEE, KIIT-DU


Amit Jha, SOEE, KIIT-DU
Types of Multiple-Access Protocol/ MAC
Protocol

Amit Jha, SOEE, KIIT-DU


Random Access Protocol
• Why the name random access?
- There is no scheduled time for a station to transmit.
- Transmission is random among the stations.
- No station is superior to another station and none is assigned the controlled
over another.
• In a random access method, each station has the right to the medium
without being controlled by any other station. However, if more than
one station tries to send, there is an access conflict-collision-and the
frames will be either destroyed or modified.

Amit Jha, SOEE, KIIT-DU


• To avoid access conflict or to resolve it when it happens, each station
follows a procedure that answers the following questions:

- When can the station access the medium?


- What can the station do if the medium is busy?
- How can the station determine the success or failure of the transmission?
- What can the station do if there is an access conflict?
3
2
4
1

Shared multiple
access medium

M 5
Amit Jha, SOEE, KIIT-DU
ALOHA: Pure ALOHA
• Based upon the simplest solution: just do it
- A station transmits whenever it has data to transmit.
- If more than one frames are transmitted, they interfere with each other (collide)
and are lost.
- If ACK not received within timeout, then a station picks random back-off time (to
avoid repeated collision).
- Station retransmits frame after back-off time denoted as 𝑇𝐵
• Note: A collision involves two or more stations. If all these stations try to
resend their frames after the time-out, the frames will collide again.
• After a maximum number of retransmission attempts 𝐾𝑚𝑎𝑥 a station must
give up and try later.
Amit Jha, SOEE, KIIT-DU
Four stations transmitting 2 frames each.
Out of all the frames, only two frames survive: frame 1.1 and frame 3.2

Fig. Example of frame collisions in pure ALOHA

Amit Jha, SOEE, KIIT-DU


Procedure for pure ALOHA protocol

Note: R is a random number chosen from the range 0 to 2𝑘 − 1 , and value of the
random number increases after each collision.
Amit Jha, SOEE, KIIT-DU
Example 1: The stations on a wireless ALOHA network are a maximum of 600 km apart. If we
assume that signals propagate at 3 × 108 𝑚Τ𝑠, we find 𝑇𝑃 = (600 x 103 ) / (3 x 108 ) = 2 ms.
Now we can find the value of 𝑇𝐵 for different values of K.

a) For K=1, the range of R is {0, 1}. The station needs to generate a random number with
value 0 or 1. So, 𝑇𝐵 is either 0 or 2ms, based on outcome of the random variable.
b) For K=2, the range of R is {0, 1, 2, 3}. So, 𝑇𝐵 can be 0, 2, 4 or 6ms, based on outcome
of the random variable.
c) For K=3, the range of R is {0, 1, 2, 3,…, 7}. So, 𝑇𝐵 is can be 0, 2, 4, 6, 8, 10, 12, or
14ms, based on outcome of the random variable.
d) So on……………
e) We need to mention that if k >10, it is normally set to 10.

Amit Jha, SOEE, KIIT-DU


Vulnerable time: It is the time duration , in which there is a possibility
of collision. Vulnerable time in pure ALOHA = 𝟐 × 𝑻𝒇𝒓

𝑇𝑓𝑟 = 𝑓𝑟𝑎𝑚𝑒 𝑡𝑟𝑎𝑛𝑠𝑚𝑖𝑠𝑠𝑖𝑜𝑛 𝑡𝑖𝑚𝑒

2 × 𝑇𝑓𝑟 A sends a frame at t

B already sent a frame


C sends

Fig: Vulnerable time for pure ALOHA


Amit Jha, SOEE, KIIT-DU
Example 2: A pure ALOHA network transmits 200-bit frames on a shared
channel of 200 kbps. What is the requirement to make this frame collision-
free?

Sol:
Average frame transmission time 𝑇𝑓𝑟 is 200 bits/200 kbps or 1 ms. The
vulnerable time is 2 x1 ms =2 ms.
This means no station should send later than 1 ms before this station starts
transmission and no station should start sending during the one 1-ms period
that this station is sending.

Amit Jha, SOEE, KIIT-DU


Pure ALOHA Model
• Definitions and assumptions
– 𝑇𝑓𝑟 frame transmission time (assume constant)
– S: throughput (average # successful frame transmissions per
𝑇𝑓𝑟 seconds)
– G: load (average # transmission attempts per 𝑇𝑓𝑟 sec.)
– Psuccess : probability a frame transmission is successful
Note: Any transmission that begins during vulnerable period leads to
collision. Success if and only if no arrivals during 2 𝑇𝑓𝑟 seconds.
Throughput is given by,
S = GPsuccess
Amit Jha, SOEE, KIIT-DU
Abramson’s assumption for calculation of 𝑷𝑺𝒖𝒄𝒄𝒆𝒔𝒔

• What is probability of no arrivals in vulnerable period?

• Abramson’s assumption: Effect of back-off algorithm is that frame arrivals are


equally likely to occur at any time interval.
• G is avg. # arrivals per 𝑇𝑓𝑟 seconds
• Divide 𝑇𝑓𝑟 into n intervals of duration =𝑇𝑓𝑟 /n
• p = probability of arrival in  interval, then
G=np since there are n intervals in 𝑇𝑓𝑟 seconds
Psuccess  P[0 arrivalsin 2𝑇𝑓𝑟 seconds] 
 P[0 arrivalsin 2n intervals] …………Abramson’s assumption:
2𝑛
𝐺
= 1−𝑝 2𝑛 = 1−  e  2G as n  
𝑛
Amit Jha, SOEE, KIIT-DU
Throughput of ALOHA
2G
S  GPsuccess  Ge
• Collisions are means
for coordinating
access Use basic maths
0.2 e-2 = 0.184
0.18
0.16
• Max throughput is
0.14
0.12
max= 1/2e (18.4%)
• Bimodal behavior:
S

0.1
0.08
0.06
0.04
Small G, S≈G
0.02 Large G, S↓0
0

G Amit Jha, SOEE, KIIT-DU


Example 3: A pure ALOHA network transmits 200-bit frames on a shared channel of 200
kbps. What is the throughput if the system (all stations together) produces
a. 1000 frames per second
b. 500 frames per second
c. 250 frames per second

Sol: 𝐻𝑒𝑟𝑒, 𝑇𝑓𝑟 is 200 bits/200 kbps or 1 ms.


a. If the system creates 1000 frames per second, this is 1 frame per millisecond. The load is
1. In this case S = 𝐺 × 𝑒 −2𝐺 or S =0.135 (13.5 percent). This means that the throughput is
1000 X 0.135 =135 frames. Only 135 frames out of 1000 will probably survive.
b. If the system creates 500 frames per second, this is (1/2) frame per millisecond. The load
is (1/2). In this case S = 𝐺 × 𝑒 −2𝐺 or S = 0.184 (18.4 percent). This means that the
throughput is 500 x 0.184 = 92 and that only 92 frames out of 500 will probably survive.
Note that this is the maximum throughput case, percentagewise.
c. If the system creates 250 frames per second, this is (1/4) frame per millisecond. The load
is (1/4). In this case S = 𝐺 × 𝑒 −2𝐺 or S =0.152 (15.2 percent). This means that the
throughput is 250 x 0.152 = 38. Only 38Amitframes out of 250 will probably survive.
Jha, SOEE, KIIT-DU
Slotted ALOHA
Time is slotted in 𝑇𝑓𝑟 seconds slots Stations synchronized to frame times
Stations transmit frames in first slot after frame arrival
Backoff intervals are in multiples of slots

Amit Jha, SOEE, KIIT-DU


Vulnerable time for slotted aloha

Slots
Amit Jha, SOEE, KIIT-DU
Throughput of Slotted ALOHA
Psuccess = P[0 arrivalsin 𝑇𝑓𝑟 seconds]
= P[0 arrivalsin n intervals] …Abramson’s assumption
𝑛
𝑛
𝐺
= 1−𝑃 = 1−
𝑛
 e G ………………..as n  
∴ 𝑆 = 𝐺𝑃𝑆𝑢𝑐𝑐𝑒𝑠𝑠 = 𝐺𝑒 −𝐺
0.4
0.368
0.35

0.3

S 0.25 Ge-G
0.2 0.184
0.15

0.1

0.05 Ge-2G
0
1

8
0.5
0.25
0.125
0.0625
0.01563

0.03125

Amit Jha, SOEE, KIIT-DU


G
Limitations of ALOHA

The throughput for pure ALOHA is S =G x e-2G.


The maximum throughput 𝑆𝑚𝑎𝑥 = 0.184 when G =(1/2).

The throughput for slotted ALOHA is S = G x e-G.


The maximum throughput 𝑆𝑚𝑎𝑥 = 0.368 when G =1.

Homework:1) Repeat Example 3 for slotted ALOHA, and observe the conclusion.
2) Derive the formulae for the maximum throughput for Pure and Slotted ALOHA.

Amit Jha, SOEE, KIIT-DU

You might also like