






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
It's a technique in computer networking
Typology: Summaries
1 / 12
This page cannot be seen from the preview
Don't miss anything!
RD
TH
Implement 1-persistent, non-persistent and p-persistent CSMA techniques. In this assignment, you have to implement 1-persistent, non-persistent and p-persistent CSMA techniques. Measure the performance parameters like throughput (i.e., average amount of data bits successfully transmitted per unit time) and forwarding delay (i.e., average end-to-end delay, including the queuing delay and the transmission delay) experienced by the CSMA frames (IEEE 802.3). Plot the comparison graphs for throughput and forwarding delay by varying p. State your observations on the impact of performance of different CSMA techniques. This report has broadly 3 classifications:
Design and implement 3 CSMA techniques: Non-persistent, 1 persistent and P-persistent
This assignment is designed as a menu driven approach. At first there will be a menu for the 3 different types of CSMA techniques. User will be allowed to select any one of the technique. The 3 CSMA techniques are defined in three separate functions which are being called from the menu function. In each technique multiple frames are being sent by multiple senders to the receiver using multiple threads.
The code is written in C++ language and compiled with g++ compiler in Ubuntu 20. environment and the operating system used is Ubuntu 20.04.
At first a menu is displayed for the CSMA techniques. User selects an option. Then data is read from different files and divided into packets. In the sender side some delay can be introduced while sending the frames to the receiver. Multiple threads are us ed to send multiple frames to the receiver. While sending the frame there may be two situations:
Only one file Main.cpp will contain three functions to handle three different CSMA techniques. Here multiple threads are being used to send multiple frames simultaneously to the receiver.
1 - persistent CSMA: In 1-persistent CSMA, the station continuously senses the channel to check its state i.e. idle or busy so that it can transfer data or not. In case when the channel is busy, the station will wait for the channel to become idle. When station found idle channel, it transmits the frame to the channel without any delay. It transmits the frame with probability 1. Due to probability 1, it is called 1-persistent CSMA. Non-persistent CSMA: In this method, the station that has frames to send, only that station senses for the channel. In case of an idle channel, it will send frame immediately to that channel. In case when the channel is found busy, it will wait for the random time and again sense for the state of the station whether idle or busy. In this method, the station does not immediately sense for the channel for only the purpose of capturing it when it detects the end of the previous transmission. The main advantage of using this method is that it reduces the chances of collision. The problem with this is that it reduces the efficiency of the network.
Non-persistent CSMA:
P-persistent CSMA:
Here I have used 10 senders sending their individual messages to the receiver. Each message is divided into multiple frames. From the result it can be said that P-Persistent CSMA method is best as it have the least chance of collision due to the P probability factor. Although, due to the waiting time P it takes more time for the transmission of the frames compared to other techniques. Throughput is the number of frames received in unit time which is least for P-Persistent due to the consumption of more time.
The lab assignment was great to learn the various methods of CSMA techniques for sensing the channel before sending the data. Here I can learn many new things and also get a chance