0% found this document useful (0 votes)
14 views18 pages

csir-net-gate-mathematical-sciences-number-theory-handwritten-notes

The document discusses channel allocation in computer networks, focusing on static and dynamic channel allocation methods, including multiple access protocols. It explains the roles of the data link layer in managing data transmission and collision detection, particularly through protocols like CSMA/CD and CSMA/CA. Additionally, it covers controlled access protocols such as reservation, polling, and token passing to ensure efficient data transmission without collisions.

Uploaded by

Tharun Tharun
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)
14 views18 pages

csir-net-gate-mathematical-sciences-number-theory-handwritten-notes

The document discusses channel allocation in computer networks, focusing on static and dynamic channel allocation methods, including multiple access protocols. It explains the roles of the data link layer in managing data transmission and collision detection, particularly through protocols like CSMA/CD and CSMA/CA. Additionally, it covers controlled access protocols such as reservation, polling, and token passing to ensure efficient data transmission without collisions.

Uploaded by

Tharun Tharun
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/ 18

Data link layer

Channel Allocation Problem in Computer Network


Channel allocation is a process in which a single channel is divided and allotted to multiple
users in order to carry user specific tasks. There are user’s quantity may vary every time the
process takes place. If there are N number of users and channel is divided into N equal-sized
sub channels, Each user is assigned one portion. If the number of users are small and don’t
vary at times, then Frequency Division Multiplexing can be used as it is a simple and
efficient channel bandwidth allocating technique.

Channel allocation problem can be solved by two schemes: Static Channel Allocation in
LANs and MANs, and Dynamic Channel Allocation.

These are explained as following below.

1. Static Channel Allocation in LANs and MANs:


It is the classical or traditional approach of allocating a single channel among multiple
competing users using Frequency Division Multiplexing (FDM). if there are N users, the
frequency channel is divided into N equal sized portions (bandwidth), each user being
assigned one portion. since each user has a private frequency band, there is no interference
between users.
However, it is not suitable in case of a large number of users with variable bandwidth
requirements.
It is not efficient to divide into fixed number of chunks.

T = 1/(U*C-L)
T(FDM) = N*T(1/U(C/N)-L/N)
Where,
T = mean time delay,
C = capacity of channel,
L = arrival rate of frames,
1/U = bits/frame,
N = number of sub channels,
T(FDM) = Frequency Division Multiplexing Time

2. Dynamic Channel Allocation:


In dynamic channel allocation scheme, frequency bands are not permanently assigned to the
users. Instead channels are allotted to users dynamically as needed, from a central pool. The
allocation is done considering a number of parameters so that transmission interference is
minimized.
This allocation scheme optimises bandwidth usage and results is faster transmissions.
Dynamic channel allocation is further divided into:
Centralised Allocation
Distributed Allocation
Possible assumptions include:
Station Model:
Assumes that each of N stations independently produce frames. The probability of producing
a packet in the interval IDt where I is the constant arrival rate of new frames.
Single Channel Assumption:
In this allocation all stations are equivalent and can send and receive on that channel.
Collision Assumption:
If two frames overlap in time-wise, then that’s collision. Any collision is an error, and both
frames must re transmitted. Collisions are only possible error.

Time can be divided into Slotted or Continuous.


Stations can sense a channel is busy before they try it.
Protocol Assumption:
 N independent stations.
 A station is blocked until its generated frame is transmitted.
 probability of a frame being generated in a period of length Dt is IDt where I is the
arrival rate of frames.
 Only a single Channel available.
 Time can be either: Continuous or slotted.
 Carrier Sense: A station can sense if a channel is already busy before transmission.
 No Carrier Sense: Time out used to sense loss data.

Multiple Access Protocols in Computer Network


Multiple Access Protocols are methods used in computer networks to control how data is
transmitted when multiple devices are trying to communicate over the same network. These
protocols ensure that data packets are sent and received efficiently, without collisions or
interference. They help manage the network traffic so that all devices can share the
communication channel smoothly and effectively.

Who is Responsible for the Transmission of Data?


The Data Link Layer is responsible for the transmission of data between two nodes. Its main
functions are:

Data Link Control


Multiple Access Control

Data Link Control


The data link control is responsible for the reliable transmission of messages over
transmission channels by using techniques like framing, error control and flow control. For
Data link control refer to – Stop and Wait ARQ.

Multiple Access Control


If there is a dedicated link between the sender and the receiver then data link control layer is
sufficient, however if there is no dedicated link present then multiple stations can access the
channel simultaneously. Hence multiple access protocols are required to decrease collision
and avoid crosstalk. For example, in a classroom full of students, when a teacher asks a
question and all the students (or stations) start answering simultaneously (send data at same
time) then a lot of chaos is created( data overlap or data lost) then it is the job of the teacher
(multiple access protocols) to manage the students and make them answer one at a time.

Thus, protocols are required for sharing data on non dedicated channels. Multiple access
protocols can be subdivided further as

Multiple Access Protocol1. Random Access Protocol


In this, all stations have same superiority that is no station has more priority than another
station. Any station can send data depending on medium’s state( idle or busy). It has two
features:

 There is no fixed time for sending data


 There is no fixed sequence of stations sending data

The Random access protocols are further subdivided as:

ALOHA
It was designed for wireless LAN but is also applicable for shared medium. In this, multiple
stations can transmit data at the same time and can hence lead to collision and data being
garbled.
Types of Aloha

Pure ALOHA
When a station sends data it waits for an acknowledgement. If the acknowledgement doesn’t
come within the allotted time then the station waits for a random amount of time called back-
off time (Tb) and re-sends the data. Since different stations wait for different amount of time,
the probability of further collision decreases.

Vulnerable Time = 2* Frame transmission time


Throughput = G exp{-2*G}
Maximum throughput = 0.184 for G=0.5
Slotted ALOHA
It is similar to pure aloha, except that we divide time into slots and sending of data is allowed
only at the beginning of these slots. If a station misses out the allowed time, it must wait for
the next slot. This reduces the probability of collision.

Vulnerable Time = Frame transmission time


Throughput = G exp{-*G}
Maximum throughput = 0.368 for G=1

CSMA
Carrier Sense Multiple Access ensures fewer collisions as the station is required to first sense
the medium (for idle or busy) before transmitting data. If it is idle then it sends data,
otherwise it waits till the channel becomes idle. However there is still chance of collision in
CSMA due to propagation delay. For example, if station A wants to send data, it will first
sense the medium.If it finds the channel idle, it will start sending data. However, by the time
the first bit of data is transmitted (delayed due to propagation delay) from station A, if station
B requests to send data and senses the medium it will also find it idle and will also send data.

This will result in collision of data from station A and B.

CSMA Access Modes


1-Persistent: The node senses the channel, if idle it sends the data, otherwise it continuously
keeps on checking the medium for being idle and transmits unconditionally(with 1
probability) as soon as the channel gets idle.
Non-Persistent: The node senses the channel, if idle it sends the data, otherwise it checks the
medium after a random amount of time (not continuously) and transmits when found idle.
P-Persistent: The node senses the medium, if idle it sends the data with p probability. If the
data is not transmitted ((1-p) probability) then it waits for some time and checks the medium
again, now if it is found idle then it send with p probability. This repeat continues until the
frame is sent. It is used in Wifi and packet radio systems.
O-Persistent: Superiority of nodes is decided beforehand and transmission occurs in that
order. If the medium is idle, node waits for its time slot to send data.

CSMA/CD is one such technique where different stations that follow this protocol agree on
some terms and collision detection measures for effective transmission. This protocol decides
which station will transmit when so that data reaches the destination without corruption.

How Does CSMA/CD Work?


Step 1: Check if the sender is ready to transmit data packets.
Step 2: Check if the transmission link is idle.
The sender has to keep on checking if the transmission link/medium is idle. For this, it
continuously senses transmissions from other nodes. The sender sends dummy data on the
link. If it does not receive any collision signal, this means the link is idle at the moment. If it
senses that the carrier is free and there are no collisions, it sends the data. Otherwise, it
refrains from sending data.
Step 3: Transmit the data & check for collisions.
The sender transmits its data on the link. CSMA/CD does not use an ‘acknowledgment’
system. It checks for successful and unsuccessful transmissions through collision signals.
During transmission, if a collision signal is received by the node, transmission is stopped.
The station then transmits a jam signal onto the link and waits for random time intervals
before it resends the frame. After some random time, it again attempts to transfer the data and
repeats the above process.
Step 4: If no collision was detected in propagation, the sender completes its frame
transmission and resets the counters.
Consider the above situation. Two stations, A & B.
Propagation Time: Tp = 1 hr ( Signal takes 1 hr to go from A to B)

At time t=0, A transmits its data.


t= 30 mins : Collision occurs.
After the collision occurs, a collision signal is generated and sent to both A & B to inform the
stations about the collision. Since the collision happened midway, the collision signal also
takes 30 minutes to reach A & B.

Therefore, t=1 hr: A & B receive collision signals.


This collision signal is received by all the stations on that link. Then,

How to Ensure that it is our Station’s Data that Collided?


For this, Transmission time (Tt) > Propagation Time (Tp) [Rough bound]
This is because we want that before we transmit the last bit of our data from our station, we
should at least be sure that some of the bits have already reached their destination. This
ensures that the link is not busy and collisions will not occur.
But, above is a loose bound. We have not taken the time taken by the collision signal to travel
back to us. For this consider the worst-case scenario.

Consider the above system again.

At time t=0, A transmits its data.


t= 59:59 mins : Collision occurs
This collision occurs just before the data reaches B. Now the collision signal takes 59:59
minutes again to reach A. Hence, A receives the collision information approximately after 2
hours, that is, after 2 * Tp.

Hence, to ensure tighter bound, to detect the collision completely,


Tt > >= 2 * Tp
This is the maximum collision time that a system can take to detect if the collision was of its
own data.

What should be the Minimum length of the Packet to be Transmitted?


Transmission Time = Tt = Length of the packet/ Bandwidth of the link
[Number of bits transmitted by sender per second]
Substituting above, we get,
Length of the packet/ Bandwidth of the link>= 2 * Tp
Length of the packet >= 2 * Tp * Bandwidth of the link
Padding helps in cases where we do not have such long packets. We can pad extra characters
to the end of our data to satisfy the above condition.

Features of Collision Detection in CSMA/CD

 Carrier Sense: Before transmitting data, a device listens to the network to check if
the transmission medium is free. If the medium is busy, the device waits until it
becomes free before transmitting data.

Multiple Access: In a CSMA/CD network, multiple devices share the same
transmission medium. Each device has equal access to the medium, and any device
can transmit data when the medium is free.

Collision Detection: If two or more devices transmit data simultaneously, a collision
occurs. When a device detects a collision, it immediately stops transmitting and sends
a jam signal to inform all other devices on the network of the collision. The devices
then wait for a random time before attempting to transmit again, to reduce the chances
of another collision.

 Backoff Algorithm: In CSMA/CD, a backoff algorithm is used to determine when a


device can retransmit data after a collision. The algorithm uses a random delay before
a device retransmits data, to reduce the likelihood of another collision occurring.

 Minimum Frame Size: CSMA/CD requires a minimum frame size to ensure that all
devices have enough time to detect a collision before the transmission ends. If a frame
is too short, a device may not detect a collision and continue transmitting, leading to
data corruption on the network.

Advantages of CSMA/CD

 Simple and widely used: CSMA/CD is a widely used protocol for Ethernet
networks, and its simplicity makes it easy to implement and use.
 Fairness: In a CSMA/CD network, all devices have equal access to the
transmission medium, which ensures fairness in data transmission.
 Efficiency: CSMA/CD allows for efficient use of the transmission medium by
preventing unnecessary collisions and reducing network congestion.
Disadvantages of CSMA/CD

 Limited Scalability: CSMA/CD has limitations in terms of scalability, and it may not
be suitable for large networks with a high number of devices.

 Vulnerability to Collisions: While CSMA/CD can detect collisions, it cannot prevent


them from occurring. Collisions can lead to data corruption, retransmission delays,
and reduced network performance.

 Inefficient Use of Bandwidth: CSMA/CD uses a random backoff algorithm that can
result in inefficient use of network bandwidth if a device continually experiences
collisions.

 Susceptibility to Security Attacks: CSMA/CD does not provide any security


features, and the protocol is vulnerable to security attacks such as packet sniffing and
spoofing.

CSMA/CA

Carrier sense multiple access with collision avoidance. The process of collisions detection
involves sender receiving acknowledgement signals. If there is just one signal(its own) then
the data is successfully sent but if there are two signals(its own and the one with which it has
collided) then it means a collision has occurred. To distinguish between these two cases,
collision must have a lot of impact on received signal. However it is not so in wired
networks, so CSMA/CA is used in this case.

CSMA/CA Avoids Collision By

Interframe Space: Station waits for medium to become idle and if found idle it does not
immediately send data (to avoid collision due to propagation delay) rather it waits for a
period of time called Interframe space or IFS. After this time it again checks the medium for
being idle. The IFS duration depends on the priority of station.

Contention Window: It is the amount of time divided into slots. If the sender is ready to
send data, it chooses a random number of slots as wait time which doubles every time
medium is not found idle. If the medium is found busy it does not restart the entire process,
rather it restarts the timer when the channel is found idle again.

Acknowledgement: The sender re-transmits the data if acknowledgement is not received


before time-out.
Controlled Access Protocols (CAPs) in computer networks control how data packets are
sent over a common communication medium. These protocols ensure that data is transmitted
efficiently, without collisions, and with little interference from other data transmissions. In
this article, we will discuss Controlled Access Protocols.
What is the Controlled Access?
In controlled access, the stations seek data from one another to find which station has the
right to send. It allows only one node to send at a time, to avoid the collision of messages on
a shared medium. The three controlled-access methods are:
Reservation
Polling
Token Passing

1. Reservation
In the reservation method, a station needs to make a reservation before sending data.
The timeline has two kinds of periods:
Reservation interval of fixed time length
Data transmission period of variable frames.
If there are M stations, the reservation interval is divided into M slots, and each station has
one slot.
Suppose if station 1 has a frame to send, it transmits 1 bit during the slot 1. No other station is
allowed to transmit during this slot.
In general, i th station may announce that it has a frame to send by inserting a 1 bit into i th
slot. After all N slots have been checked, each station knows which stations wish to transmit.
The stations which have reserved their slots transfer their frames in that order.
After data transmission period, next reservation interval begins.
Since everyone agrees on who goes next, there will never be any collisions.
The following figure shows a situation with five stations and a five-slot reservation frame. In
the first interval, only stations 1, 3, and 4 have made reservations. In the second interval, only
station 1 has made a reservation.Reservation
Advantages of Reservation
 The main advantage of reservation is high rates and low rates of data accessing time
of the respective channel can be predicated easily. Here time and rates are fixed.
 Priorities can be set to provide speedier access from secondary.
 Reservation-based access methods can provide predictable network performance,
which is important in applications where latency and jitter must be minimized, such as
in real-time video or audio streaming.
 Reservation-based access methods can reduce contention for network resources, as
access to the network is pre-allocated based on reservation requests. This can improve
network efficiency and reduce packet loss.
 Reservation-based access methods can support QoS requirements, by providing
different reservation types for different types of traffic, such as voice, video, or data.
This can ensure that high-priority traffic is given preferential treatment over lower-
priority traffic.
 Reservation-based access methods can enable more efficient use of available
bandwidth, as they allow for time and frequency multiplexing of different reservation
requests on the same channel.
 Reservation-based access methods are well-suited to support multimedia applications
that require guaranteed network resources, such as bandwidth and latency, to ensure
high-quality performance.

Disadvantages of Reservation
 Highly trust on controlled dependability.
 Decrease in capacity and channel data rate under light loads; increase in turn-around
time.

2. Polling
 Polling process is similar to the roll-call performed in class. Just like the teacher, a
controller sends a message to each node in turn.
 In this, one acts as a primary station(controller) and the others are secondary stations.
All data exchanges must be made through the controller.
 The message sent by the controller contains the address of the node being selected for
granting access.
 Although all nodes receive the message the addressed one responds to it and sends
data if any. If there is no data, usually a “poll reject”(NAK) message is sent back.
 Problems include high overhead of the polling messages and high dependence on the
reliability of the controller.

Advantages of Polling
 The maximum and minimum access time and data rates on the channel are fixed
predictable.
 It has maximum efficiency.
 It has maximum bandwidth.
 No slot is wasted in polling.
 There is assignment of priority to ensure faster access from some secondary.

Disadvantages of Polling
 It consume more time.
 Since every station has an equal chance of winning in every round, link sharing is
biased.
 Only some station might run out of data to send.
 An increase in the turnaround time leads to a drop in the data rates of the channel
under low loads.
Efficiency Let Tpoll be the time for polling and Tt be the time required for transmission of
data. Then,

Efficiency = Tt/(Tt + Tpoll)

3. Token Passing
 In token passing scheme, the stations are connected logically to each other in form of
ring and access to stations is governed by tokens.
 A token is a special bit pattern or a small message, which circulate from one station to
the next in some predefined order.
 In Token ring, token is passed from one station to another adjacent station in the ring
whereas incase of Token bus, each station uses the bus to send the token to the next
station in some predefined order.
 In both cases, token represents permission to send. If a station has a frame queued for
transmission when it receives the token, it can send that frame before it passes the
token to the next station. If it has no queued frame, it passes the token simply.
 After sending a frame, each station must wait for all N stations (including itself) to
send the token to their neighbours and the other N – 1 stations to send a frame, if they
have one.
 There exists problems like duplication of token or token is lost or insertion of new
station, removal of a station, which need be tackled for correct and reliable operation
of this scheme.
Performance of token ring can be concluded by 2 parameters:-

 Delay, is a measure of time between when a packet is ready and when it is delivered.
So, the average time (delay) required to send a token to the next station = a/N.
 Throughput, which is a measure of successful traffic.
Throughput, S = 1/(1 + a/N) for a<1
and

S = 1/{a(1 + 1/N)} for a>1.


where N = number of stations
a = Tp/Tt
(Tp = propagation delay and Tt = transmission delay)

Advantages of Token passing


 It may now be applied with routers cabling and includes built-in debugging features
like protective relay and auto reconfiguration.
 It provides good throughput when conditions of high load.

Disadvantages of Token passing


 Its cost is expensive.
 Topology components are more expensive than those of other, more widely used
standard.
 The hardware element of the token rings are designed to be tricky. This implies that
you should choose on manufacture and use them exclusively.

3. Channelization

 In this, the available bandwidth of the link is shared in time, frequency and code to
multiple stations to access channel simultaneously.

 Frequency Division Multiple Access (FDMA) – The available bandwidth is divided


into equal bands so that each station can be allocated its own band. Guard bands are
also added so that no two bands overlap to avoid crosstalk and noise.
 Time Division Multiple Access (TDMA) – In this, the bandwidth is shared between
multiple stations. To avoid collision time is divided into slots and stations are allotted
these slots to transmit data. However there is a overhead of synchronization as each
station needs to know its time slot. This is resolved by adding synchronization bits to
each slot. Another issue with TDMA is propagation delay which is resolved by
addition of guard bands.
For more details refer – Circuit Switching

 Code Division Multiple Access (CDMA) – One channel carries all transmissions
simultaneously. There is neither division of bandwidth nor division of time. For
example, if there are many people in a room all speaking at the same time, then also
perfect reception of data is possible if only two person speak the same language.
Similarly, data from different stations can be transmitted simultaneously in different
code languages.

 Orthogonal Frequency Division Multiple Access (OFDMA) – In OFDMA the


available bandwidth is divided into small subcarriers in order to increase the overall
performance, Now the data is transmitted through these small subcarriers. it is widely
used in the 5G technology.

Advantages of OFDMA

 High data rates


 Good for multimedia traffic

 Increase in efficiency

 Disadvantages OFDMA

 Complex to implement

 High peak to power ratio

Spatial Division Multiple Access (SDMA) – SDMA uses multiple antennas at the
transmitter and receiver to separate the signals of multiple users that are located in different
spatial directions. This technique is commonly used in MIMO (Multiple-Input, Multiple-
Output) wireless communication systems.

Advantages SDMA

 Frequency band uses effectively

 The overall signal quality will be improved

 The overall data rate will be increased

Disadvantages SDMA

 It is complex to implement

 It require the accurate information about the channel

You might also like