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 : Layered Architecture

Layered Architecture Protocol Hierarchy To tackle with the design complexity most of the networks are organize as a set of layers or levels. The fundamental idea of layered architecture is to divide the design into small pieces. The layering provides modularity to the network design. The main duty of each layer is to provide offer services to higher layers, and provide abstraction. The main benefits of layered architecture are modularity and clear interfaces. Five Layered Network Design Issues:  Layered architecture in computer network design  Layered architectures have several advantages. Some of them are,   Modularity and clear interface   Provide flexibility to modify network services   Ensure independence of layers   Management of network architecture is easy   Each layer can be ...

Computer Network : ISO-OSI Reference Model

ISO-OSI Reference Model Principal of OSI Reference Model The OSI reference model has 7 layers. The principles that were applied to arrive at the seven layers can be briefly summarized as   follows: A layer should be created where a different abstraction is needed. Each layer should perform a well-defined function. The function of each layer should be chosen with an eye toward defining internationally standardized protocols. The layer boundaries should be chosen to minimize the information flow across the interface The  number   of  layers  should   be   large   enough   that   distinct functions    need   not  be   thrown together    in the same layer out of necessity and small enough that architecture does not become unmanageble. Feature of OSI Model: Big picture of communication over network is understandable thr...

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...

Do Google Assistant work on KaiOS?

Yes Google Assistant can now read, translate text on KaiOS Google on Tuesday announced that now within Google Assistant, KaiOS users in India can use Google Lens to read, translate, and define words. At Google I/O in 2019, the US-based search engine giant brought a camera-based translation to Google Lens to help understand information. With Lens, one can point the camera at text one see and translate it into more than 100 languages and can even speak the words out loud in the preferred language. "We brought these Lens capabilities to Google Go, so even those on the most affordable smartphones can access them. Today we are extending this capability to the millions of Google Assistant users on KaiOS devices in India," the company said in a statement. It is currently available in English and several Indian languages, including Hindi, Bengali, Telugu, Marathi, and Tamil, and will soon be available in Kannada and Gujarati. Users can simply press the right soft key ...

52 Chinese apps red-flagged by Indian Intel agencies

52 Chinese apps red-flagged by Indian Intel agencies; TikTok, ShareIt, UC Browser, Clean Master in list Indian intelligence agencies have asked the government to block or advise people to stop using a bunch of applications that are apparently extracting user data. These Chinese apps, 52 in number are linked to neighboring country China. The concern raised is that the applications in question end up extracting a huge amount of private data and sending this outside India. The list of applications includes popular tools that are used by lots of people in the country. These Chinese apps list include : TikTok Vault-Hide Vigo Video Bigo Live Weibo WeChat SHAREit UC News UC Browser BeautyPlus Xender ClubFactory Helo LIKE Kwai ROMWE SHEIN NewsDog Photo Wonder APUS Browser VivaVideo- QU Video Inc Perfect Corp CM Browser Virus Cleaner (Hi Security Lab) Mi Community DU recorder YouCam Makeup Mi Store 360 Security DU Battery Saver DU Browser DU Cleaner DU Privacy Clean Master – Cheetah...

Data link layer :Mac sub-layer, MAC Addressing,MAC vs IP addressing

MAC Sublayer In the seven-layer OSI model of computer networking, media access control (MAC) data communication protocol is a sublayer of the data link layer (layer 2). The MAC sublayer provides addressing and channel access control mechanisms that make it possible for several terminals or network nodes to communicate within a multiple access network that incorporates a shared medium, e.g. Ethernet. The hardware that implements the MAC is referred to as a media access controller.   The MAC sublayer acts as an interface between the logical link control (LLC) sublayer and the network's physical layer. The MAC layer emulates a full-duplex logical communication channel in a multi-point network. This channel may provide unicast, multicast or broadcast communication service.   MAC Addressing (Media Access Control address) In a local area network (LAN) or other network, the MAC (Media Access Control) address is your computer's unique hardware number. In a local are...