Csma 802.11 scripting in python

You are to study the performance of multiple access protocols in a wireless setting. Consider the network shown in Figure 1.

The circles denote the communication range R of each station. We are interested in the following two scenarios:

A. Concurrent Communications: Stations A, B, C, and D of Figure 1(a) are within the same collision domain (any transmission is received by all). Communication takes place between pairs A → B and C → D. Traffic is generated at A and C according to a Poisson arrival process with parameters λA and λC, respectively. B. Hidden Terminals: Stations A, B, and C of Figure 1(b), belong to two collision domains. Communication takes place between pairs A → B and C → B. Traffic is generated at A and C according to a Poisson arrival process with parameters λA and λC, respectively. For each scenario, compute relevant performance metrics for the following multiple access protocols. A time-slotted system is assumed. 1. CSMA with Collision Avoidance (CSMA/CA) according to the 802.11 DCF function. (a) A station T x ready to transmit (when a frame has arrived for transmission from the upper layers of the network stack) selects a random backoff value in [0, CW0 − 1]. It first senses the channel for an initial period of DIFS time.

(b) If the channel is busy, T x (and every other station with a frame for transmission) monitors the channel until it becomes idle. When the channel becomes idle, T x decrements his counter by one with every idle slot. If the channel becomes busy, T x freezes its backoff counter. When the counter reaches zero, T x transmits its frame. (c) If the frame is successfully received (no collision) by Rx, the station Rx replies with an ACK frame after SIFS time. This completes the transmission round and the protocol repeats for the next transmission. For successive transmissions, the station has to sense for DIFS time before starting the countdown. (d) If a collision occurs, the stations that collided double their contention window CW and repeat the backoff process. After k collisions, the backoff value is selected from [0, 2 kCW0 − 1]. The CW value cannot exceed threshold CWmax 

so basically the concept in there is that a global time is ongoing, and each stations randomly transmit data in any slot.

(so I have to create simulation where packets are sent at random times by station A and B).

Then each packet sense media by first sending DIFS to see if media is free and then send RTS to control media and then sends data.
Meanwhile station B should sees media is busy and should wait.

I am like lost on what could be best approach to implement it, I looked at producer consumer concept in python, but it does not synchronize well in my logic flow.

Any ideas/directions with examples will be highly appreciated.

Here is the algorithm overview:

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
The price is based on these factors:
Academic level
Number of pages
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Enjoy 10% OFF today with the coupon code: save10