Sugandha
Sugandha

Reputation: 61

what is p in 'p - persistent csma'?

I was just going through the basics of CSMA and encountered 'Persistence Methods'. Here goes the Wiki Definition:

P-persistent

This is an approach between 1-persistent and non-persistent CSMA access modes. [2]When the transmitting node is ready to transmit data, it senses the transmission medium for idle or busy. If idle, then it transmits a frame with probability p. If busy, then it senses the transmission medium continuously until it becomes idle, then transmits with probability p. If the node does not transmit (the probability of this event is 1-p), it waits until the next available time slot. If the transmission medium is still not busy, it transmits again with the same probability p.

Can you tell me what is this probability p? and based on what it is calculated?

Upvotes: 3

Views: 16503

Answers (2)

Shakill Hingah
Shakill Hingah

Reputation: 1

It applies to slotted channels and works as follows.

Operation:

when a station becomes ready to send, it senses the channel. If it is idle, it transmits with a probability p. With a probability q=1-p, it defers until the next slot. If that slot is also idle, it either transmits or defers again, with probabilities p and q. This process is repeated until either the frame has been transmitted or another station has begun transmitting. In the latter case, the “unlucky” station acts as if there had been a collision (i.e., it waits a random time and starts again). If the station initially senses the channel busy, it waits until the next slot and applies the above algorithm.

Upvotes: 0

Hossam Houssien
Hossam Houssien

Reputation: 379

The P-persistent approach combines the advantages of the other two strategies. It reduces the chance of collision and improves efficiency.The P-persistent method is used if the channel has time slots with a slot duration >= the maximum propagation time.

Flow chart of how P-persistent works

Your question is "how to select that Probability".

  • Assume that N nodes have a packet to send and the medium is busy
  • Then, Np is the expected number of nodes that will attempt to transmit once the medium becomes idle.
  • If Np > 1, then a collision is expected to occur. Therefore, the network must make sure that Np <= 1 to avoid the collision, where N is the maximum number of nodes that can be active at a time.

Edit #1:

The logic used to check whether a station is able to transmit or not is very simple, firstly the value of variable P is calculated and based on that value the decision is made

  • If P <= 1, station can transmit
  • Else (i.e. P > 1), it has to wait

Now it comes the part of "how to calculate the variable P", using a very simple equation below, where N is the number of stations that are connected to the shared medium.

enter image description here

Upvotes: 5

Related Questions