CS485 Sylabus

### The p-persistent CSMA protocol

• p-persistent CSMA:

• The p-persistent CSMA protocol:

• The p-persistent CSMA protocol tries to fix the "guaranteed" collision problem in the p-persistent CSMA protocol

• When a node can transmit, the node will:

 Flip a coin

• If coin comes up head, then

 The node will transmit

Otherwise

 The node will sense again

• (I call this protocol the gambler...)

• Flow chart:

Explanation:

• If the node senses that the carrier is idle, then:

 The node will transmit with probability p

Graphically:

Reason:

• There may be multiple nodes sensing at the same time:

• Then: one node may decide to transmit, while the other node may decide to back off:

• If the node senses that the carrier is busy, then:

 Wait until the current transmission ends Transmit with probability p

Graphically:

Reason:

• There may be multiple nodes sensing at the same time:

• Then: one node may decide to transmit, while the other node may decide to back off:

• What's value should we use for p ????

• Selecting the p value in p-persistent CSMA:

• p must be set to a value such that:

• It is very likely that exactly one node will pick a random number x such that:

 ``` x < p ```

I.e.: exactly 1 node should transmit its message

• Result from probability theory:

• If n nodes are sensing, then the probability:

 ``` 1 p = --- n ```

will maiximize the likelihood that exactly one node will transmit (and (n-1) nodes will back off)

• Example:

• If there are 2 nodes waiting for the current transmission to finish, then use:

 ``` p = 0.5 ```

• On the other hand, if there are 3 nodes waiting for the current transmission to finish, then use:

 ``` p = 0.33333333 (1/3) ```

And so on...

Conclusion:

 p must be dynamic

It's hard to know how many nodes are busy...

So:

 The p-persistent CSMA protocol is not implemented as a real life protcol.