Showing posts with label medium access control. Show all posts
Showing posts with label medium access control. Show all posts

Thursday, December 24, 2015

CSMA/CD

Explain how collision is handled using CSMA/CD over a wired medium.

The Carrier Sense Multiple Access with Collision Detection (CSMA/CD) method augments CSMA algorithm to handle collisions when detected over a wired medium.

In this method, a station monitors the medium after it sends a frame

The channel is sensed before frame transmission by using one of the persistence methods. If there is a collision, the frame is sent again, otherwise successful transmission.
Transmission and collision detection is a continuous process. The station transmits and receives simultaneously.

For CSMA/CD to work, the sending station must detect a collision before sending the last bit of the frame, since sender does not keep a copy of the frame.
Frames should be long enough to allow collision detection prior to end of transmission

If a collision is detected during transmission, the station transmits a brief jamming signal to ensure that all stations know that there has been a collision and aborts transmission.
The station waits for a random amount of time and attempts retransmission. Retransmission is given after 15 attempts.

Example

At time t1, station A starts sending the bits of its frame.
At time t2, station C has not yet sensed the first bit sent by station A.

Station C starts sending bits in its frame, which propagate in both directions.

Station C detects a collision at time t3 when it receives the first bit of A's frame. Station C sends a jamming signal and immediately aborts transmission.
Station A detects collision at time t4 and aborts transmission.





Wednesday, December 23, 2015

medium access control

Why is medium access control needed?

If access to medium is not regulated, then multiple stations may transmit simultaneously resulting in collisions and retransmission.

There will be little or no throughput on the network.

Access to the medium could be either in a random or controlled manner.

Classify the various protocols used for medium access.

Random access
Controlled access
Channelization
Aloha

Reservation
FDMA
CSMA

Polling
TDMA
o
CSMA/CA
Token passing
CDMA
o
CSMA/CD



Explain CSMA medium access technique.

In Carrier Sense Multiple Access (CSMA), each station first checks state of the medium using one of the persistence methods before sending.

The possibility of collision still exists because of propagation delay. When a station sends a frame, it takes time for the first bit to reach every station.

1-Persistent

When a station finds the line idle, sends its frame immediately (with probability 1).

This method has the highest chance of collision because two or more stations may find the line idle and send frames immediately.

Non-persistent

When a station senses the line to be idle, it sends immediately.
If the line is not idle, it waits a random amount of time and then senses the line again.

This approach reduces the chance of collision because it is unlikely that two or more stations will wait the same amount of time and retry to send simultaneously.
However, it reduces the efficiency because the medium remains idle when there may be stations with frames to send.

p-Persistent

This method is used if the channel has time slots with slot duration equal to or greater than the maximum propagation time.
It reduces collision and improves efficiency as follows:

1.      With probability p, the station sends its frame.

2.      With probability q = 1 – p, the station waits for the beginning of the next time slot and checks the line again.
a.       If the line is idle, it goes to step1.


b.      If the line is busy, back off procedure is adopted.