Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CDMA technique in computer network, Summaries of Computer Networks

It's a technique in computer networking

Typology: Summaries

2021/2022

Available from 09/07/2022

zeeshan-iqbal-1845
zeeshan-iqbal-1845 🇮🇳

4 documents

1 / 12

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download CDMA technique in computer network and more Summaries Computer Networks in PDF only on Docsity!

COMPUTER NETWORK ASSIGNMENT 3

NAME: ZEESHAN IQBAL

DEPT: BCSE ROLL: 001910501031

YEAR: 3

RD

SEM: 5

TH

QUESTION:

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:

  • Non-persistent
  • 1 - persistent
  • P-persistent

GOALS:

Design and implement 3 CSMA techniques: Non-persistent, 1 persistent and P-persistent

method for channel sensing. We can provide additional time delay and error in transmission.

OVERVIEW:

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.

SPECIFICATION:

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.

PROCESS:

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:

  • Collision :^ There may be collisions with other frames transmitted through that channel on the same time. Depending upon the CSMA technique the frames are resen t immediately or after a random time.
  • Successful transmission :^ The frames are successfully received by the receiver. The workflow is presented in the following diagram:

CODE:

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.

PERSISTENT TECHNIQUES:

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:

ANALYSIS:

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.

CONCLUSION:

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