1-persistent CSMA To avoid idle channel time 1-persistent protocol can be use a station wishing to transmit listens to the medium and obeys the following rules 1. If medium is idle, transmit; otherwise, go to step 2 2. If medium is busy continue to listen until the channel is sensed idle, then transmit immediately 1-persistent stations are selfish Drawback: If two or more stations are waiting to transmit, a collision is guaranteed
11 1-persistent CSMA • To avoid idle channel time, 1-persistent protocol can be used • A station wishing to transmit listens to the medium and obeys the following rules: 1. If medium is idle, transmit; otherwise, go to step 2 2. If medium is busy, continue to listen until the channel is sensed idle; then transmit immediately. • 1-persistent stations are selfish • Drawback: — If two or more stations are waiting to transmit, a collision is guaranteed
persistent CSMA p-persistent Csma is a compromise that attempts to reduce collisions like nonpersistent and reduce idle time, like 1-persistent Rules. 1. If the medium is idle transmit with probability p, and delay one time unit with probability( 1-p) The time unit is typically equal to the maximum propagation delay 2. If the medium is busy, continue to listen until the channel is idle and repeat step 1 3. If transmission is delayed one time unit, repeat step 1 Question: What is an effective value of p 12
12 p-persistent CSMA • p-persistent CSMA is a compromise that attempts to reduce collisions, like nonpersistent, and reduce idle time, like 1-persistent • Rules: 1. If the medium is idle, transmit with probability p, and delay one time unit with probability (1 – p) • The time unit is typically equal to the maximum propagation delay 2. If the medium is busy, continue to listen until the channel is idle and repeat step 1 3. If transmission is delayed one time unit, repeat step 1 • Question: — What is an effective value of p?
Value of p? Assume n stations are waiting to transmit while a transmission is taking place At the end of transmission the expected number of stations attempting to transmit is the number of stations ready (i.e. n times the probability of transmitting (i.e p: np If np> 1, on average there will be a collision Repeated attempts to transmit almost guarantee more collisions Retries compete with new transmissions from other stations Eventually all stations try to send Continuous collisions; zero throughput So np should be less than 1 for expected peaks of n Drawback of p-persistent If heavy load is expected, p should be small such that np< 1 However, as p is made smaller, stations must wait longer to attempt transmission which results in very long delays 13
13 Value of p? • Assume n stations are waiting to transmit while a transmission is taking place • At the end of transmission, the expected number of stations attempting to transmit is the number of stations ready (i.e., n) times the probability of transmitting (i.e., p): np • If np > 1, on average there will be a collision — Repeated attempts to transmit almost guarantee more collisions — Retries compete with new transmissions from other stations — Eventually, all stations try to send • Continuous collisions; zero throughput • So np should be less than 1 for expected peaks of n • Drawback of p-persistent: — If heavy load is expected, p should be small such that np < 1. However, as p is made smaller, stations must wait longer to attempt transmission, which results in very long delays
CSMACDH CSMA with collision Detection The problem of CSMA a collision occupies medium for the duration of a frame transmission hich is not good for long frames. Collision detection Stations listen whilst transmitting. If collision is detected, stop transmission immediately Rules of CSMA/CD 1. If the medium is idle, transmit; otherwise, go to step 2 2. If the medium is busy, continue to listen until the channel is idle then transmit immediately 3. If a collision is detected during transmission transmit a brief jamming signal to assure that all stations know that there has been a collision and then cease transmission 4. After transmitting the jamming signal, wait a random amount of time, referred to as backoff then attempt to transmit again (repeat from step 1) 14
14 CSMA/CD: CSMA with Collision Detection • The problem of CSMA: — A collision occupies medium for the duration of a frame transmission, which is not good for long frames. • Collision Detection: — Stations listen whilst transmitting. If collision is detected, stop transmission immediately. • Rules of CSMA/CD: 1. If the medium is idle, transmit; otherwise, go to step 2 2. If the medium is busy, continue to listen until the channel is idle, then transmit immediately 3. If a collision is detected during transmission, transmit a brief jamming signal to assure that all stations know that there has been a collision and then cease transmission 4. After transmitting the jamming signal, wait a random amount of time, referred to as backoff, then attempt to transmit again (repeat from step 1)