Skip to main content

CSMA in computer Network

Carrier sense multiple access (CSMA)

Carrier sense multiple access (CSMA) is a mac protocol in which a transmitting node verifies the absence of traffic on the shared medium/channel  before transmitting its data on the medium which is shared by multiple nodes i.e. CSMA is based on the principle "sense before transmit" or "listen before talk”.


Carrier sense means that a transmitting node receives a feedback from the receiver to detect if receiver is busy with other station/node and if the receiver is found to be busy the transmitter waits until the receiver free before transmitting the its own data.

Multiple access means that multiple stations send and receive on the same shared medium. Transmissions by one node are generally received by all other stations connected to through the  medium.


CSMA protocol was developed to solve the problem found in ALOHA i.e. to minimize the chances of collision or interference, so as to improve the performance. CSMA protocol is based on the principle of 'carrier sense'. The station senses the carrier or channel before transmitting a frame. It means the station checks the state of channel, whether it is idle or busy.

Even though all the nodes attempt to sense whether the channel is in use, there is still chance that two stations will attempt at the same time  to access the medium it is because the stations will only sense at their node and not the whole medium or communication path and because of propagation delay at one node may result in collision of data from other node means The frame transmitted by one station takes some time to reach other stations. In the meantime, other stations may sense the channel to be free and transmit their frames. This results in the collision.


csma time sharing

There Are Three Different Type of CSMA Protocols

  1. 1-persistent CSMA
  2.  Non- Persistent CSMA
  3. p-persistent CSMA

1)  1-persistent CSMA

  • In this before sending the data, the station first listen to the channel to see if anyone else is transmitting the data at the moment.
  • If the station sense the channel idle, the station transmits a frame.
  • And if the channel is busy, then it sense the transmission medium continuously until it become idle.
  • Since the station transmits the frame with the probability of 1 when the carrier or channel is idle, this scheme of CSMA is called as 1-persistent CSMA 

     Drawback of I-persistent

  • The propagation delay has an important effect in the performance of the protocol. The more the propagation delay, and the worse the performance of the protocol.

  • Because of this propagation delay there are still high chances of collision.

1-persistent

(2)  Non-persistent CSMA

  •  In Non-persistent CSMA the station, senses the channel before sending and If no one else is sending, the station begins sending the frames on the channel.
  •  However, if the channel is already in busy, the station does not continuously sense the channel and will wait for random amount of time before sensing the channel again for the purpose of seizing it immediately upon detecting the end of the previous transmission.
  • This algorithm leads to better channel utilization but longer delay than 1-persistent CSMA. 

     Advantage of non-persistent

  •  It reduces the chance of collision because the stations wait a random amount of time. It is not like 1-persistent CSMA where two or more stations will wait for same amount of time and will retransmit at the same time.

     Disadvantage of non-persistent

  • It reduces the efficiency of network because the channel may remain idle until the station again sense the channel after random amount of time.
non-persistent

(3)  p-persistent CSMA

  • This method is used in slotted channels.
  •  Whenever a station becomes ready to send, it senses the channel.
  •   If channel is busy, station waits until next slot.
  •  If channel is idle, it transmits with a probability p.
  • With the probability Q=1-P, the station then waits for the beginning of the next time slot.
  • If the next slot is also idle, it either transmits or waits again, with probabilities P and Q.
  • This process is repeated till either frame has been transmitted or another station has begun transmitting.
  • In case of the transmission by another station, the station acts as if there had been a collision (i.e., it waits a random amount of time and starts again).

     Advantage of p-persistent

  •   It reduces the chance of collision and improves the efficiency of the network.
P-persistent


Comments

Popular posts from this blog

Computer Network and Types

Computer Network A network set up by connecting two or more computers and other supporting hardware devices through communication channels is called a computer network. It enables computers to communicate with each other and to share commands, data, etc., including the hardware and software resources. Uses of Computer Network: It allows you to share resources such as printers, scanners, etc. You can share expensive software and database among network users. It facilitates communications from one computer to another computer. It allows the exchange of data and information among users through a network. What Are the Important Types of Computer Networks? There are various types of computer networks available. We can categorize them according to their size as well as their purpose. The size of a network should be expressed by the geographic area and number of computers, which are a part of their networks. It includes devices housed in a single room to millions of devices sp...

What is Binary Exponential Back-off Algorithm in Computer Networking?

What is Binary Exponential Back-off Algorithm?                          When two station A and B transmit data simultaneously there will be collision and when collision occurs both the stations waits for some time before retransmitting the data. The time for which they stop sending the data is called back-off time and to calculate the back-off time we use an algorithm knows as Binary Exponential Back-off Algorithm.   How Binary Exponential Back- off Algorithm(BEB) Work?   After undergoing the collision both the stations wait for random amount of time in the range of    [0, (2^n)-1]. Value of n is - the nth times they are undergoing collision. If a station chooses a time K which is in the range [0, (2^n)-1] then Back-off time = K*time slot Example 1 - Collision occurs for 1st time then n=1 and range will be 0 to 1. Means K value will be between     0 to 1. ...

IPv4 and IPv6

IP (INTERNET PROTOCOL) ADDRESS The IP address is a numeric address. It is a network layer address (Layer 3). It's an identifier for a computer or device on a network. Every device has to have an IP address for communication purposes. The IP address consists of 2 parts: the first part is the network address and the second part is the host address. There are also two types of IP addresses: IPv4 and IPv6. IPv4 IPv4 is the current version of IP addresses. It's a 32-bit numeric address written as four numbers separated by periods. 66.99.324. 13 ⟶ Octet The number range in each octet is 0 – 255. This address version can produce over 4,294,967,296 unique addresses. Computers and networks don't read IP addresses in the standard numeric format. 66 . 94 . 29 . 13 They only understand numbers in a binary format. Binary numbers only use 1's and 0's. So, the computer will convert numeric format to binary format.               66.94.29.13 ...

Reliance Jio Phone 3 features

Reliance Jio Phone 3 smartphone runs on Android v8.1 (Oreo) operating system. The phone is powered by Quad core, 1.4 GHz processor. It runs on the MediaTek Chipset. It has 2 GB RAM and 64 GB internal storage. Reliance Jio Phone 3 smartphone has a IPS LCD display. The screen has a resolution of HD (720 x 1280 pixels) and 294 ppi pixel density. On camera front, the buyers get a 2 MP Primary Camera and on the rear, there's an 5 MP camera with features like Digital Zoom. It is backed by a 2800 mAh battery. Connectivity features in the smartphone include WiFi, Bluetooth, GPS, Volte, and more. Reliance Jio Phone 3 key specs front camera           2 MP battery                    2800 mAh processor                  MediaTek display            ...

Can coronavirus spread through mosquitoes?

  Can coronavirus spread through mosquitoes? Scientists have confirmed for the first time that the novel coronavirus behind the COVID-19 pandemic cannot be transmitted to people by mosquitoes , a finding that adds evidence to WHO claims that the disease is not mosquito-borne. The research, published in the journal Scientific Reports, provided the first experimental evidence on the capacity of SARS-CoV-2, the virus that causes COVID-19 disease, to infect and be transmitted by mosquitoes. "Here we provide the first experimental data to investigate the capacity of SARS-CoV-2 to infect and be transmitted by mosquitoes," the study noted. "While the World Health Organization (WHO) has definitively stated that mosquitoes cannot transmit the virus, our study is the first to provide conclusive data supporting the theory," said Stephen Higgs, a co-author of the research from Kansas State University in the US. According to the study, conducted at the university...