Multiple Access Control in data link layer


Multiple Access Control

When multiple nodes or stations are connected together by using a common link to transmit data packets or frames. Every node or station are free to transmit the data frame at one time.In that case, multiple stations can access the channel and simultaneously transmits the data over the channel. It may create collision Hence, the multiple access protocol is required to reduce the collision.

For example,Let us assume that there is a classroom full of students.When a teacher asks a question to the students then all the students available in that class start answering the question at the same time. Because all the students respond at the same time so here is very high chances that the data will be overlap or data lost.Therefore it is the responsibility of a teacher which will be act as multiple access protocol to manage the students and make them one student can answer at a time.

To reduce the problem of collision we use the various Multiple Access Protocols :


Random Access Protocols

In random access protocol, no station is superior to another station and none is assigned control over another.This decision depends on the state of the medium (Idle or Busy). 

This method gives us two features:

The First is there is no schedule time for station to transmit the data. Transmission is random among the stations that is why it is called Random Access.

The Second is, no rules specify which station should send next. Station compete one another to access the medium. That is why these methods are also called Contention methods. In random access method,each station has right to the medium  without being controlled by any other station. However. if more than one station tries to send, there is an access conflict-collision and the frames will be either destroyed or modified(Corrupted).

There are various methods for random access protocols which are given below : 

  • ALOHA (Pure ALOHA and Slotted ALOHA)
  • CSMA
  • CSMA/CD
  • CSMA/CA

ALOHA

ALOHA, the earliest random access method was developed at the University of Hawaii in 1970. It was designed for a radio(wireless) LAN, but it can be used on any shared medium. The medium is shared between the stations. When a station sends a data, another station may attempt to do so at the same time. The data from the stations collide and become garbled.

In this Any station can transmit data to a channel at any time. It does not require any carrier sensing. It require transmission of data after some random amount of time.It can be of two types :

Pure ALOHA

The original ALOHA protocol is called pure ALOHA. This is a simple but elegant protocol.However, since there is only one channel to share, there is the possibility of collision between frames from different station. 

  • If you have data to send, send the data.
  • If, while you are transmitting data, you receive any data from another station, there has been a message collision. All transmitting stations will need to try resending "later".

  • In pure ALOHA, each station transmits data to a channel without checking whether the channel is idle or not, the chances of collision may occur, and the data frame can be lost.

  • When any station transmits the data frame to a channel, the pure Aloha waits for the receiver's acknowledgment. If it does not acknowledge the receiver end within the specified time, the station waits for a random amount of time, called the backoff time. And the station may assume the frame has been lost or destroyed. Therefore, it retransmits the frame until all the data are successfully transmitted to the receiver.Below figure shows an example of frame collision in pure ALOHA.




There are four stations that contend with one another for access to the shared channel. In this figure each stations sends two frames, there are total of eight frames on the shared medium.Some of these frames collide because multiple frames are in contention for the shared channel. Only two frames survive: one frame from station 1 and one frame from station 3.we need to resend the frames that have been destroyed during transmission.If all these stations try to resend their frames after the time-out the frames will collide again.Pure ALOHA dictates that when the time-out period passes, each station waits a random amount of time before resending its frame. The randomness will help to avoid more collision. We call this time the back off time

Slotted ALOHA

Slotted ALOHA was invented to improve the efficiency of Pure ALOHA. In slotted ALOHA we divide the time into equal time intervals called slots and forces the station to transmit the data only at the beginning of the time slot and only one frame is allowed to be sent to each slot.And if the stations are unable to send data at the beginning of the slot, the station will have to wait until the beginning of the slot for the next time. 

However, the possibility of a collision remains when trying to send a frame at the beginning of two or more station time slot.Below figure shows an example of frame collision in slotted ALOHA.


Because a station is allowed to send only at the beginning of the time slot. If a station misses this moment it must wait until the beginning of the next time slot. This means that the station in which started at the beginning of this slot has already finished sending its frame. There is still the possibility of collision if two stations are try to send at the beginning of the same time slot. 


CSMA (Carrier Sense Multiple Access)

To minimize the chance of collision and therefor increase the performance, the CSMA method was developed. The chance of collision can be reduced if a station senses the medium before trying to use it. CSMA method requires that each station check the state (Idle or Busy) of the medium before sending the frame.

It means that if the channel is idle, the station can send data to the channel. Otherwise, it must wait until the channel becomes idle. Hence, it reduces the chances of a collision on a transmission medium. In other words, CSMA is based on the principle "Sense before transmit". CSMA may reduce the possibility of collision.

The possibility of collision still exists because of propagation delay : when a station sends a frame, it still takes time for the first bit to reach every station and for every station to sense it. In other words, a station may sense the medium and find it idle, only because the first bit sent by another station has not yet been received.

There are three methods proposed for CSMA which tells us that what should a station do if the channel is Busy or Idle which are given below.

I-Persistent : The I-Persistent method is very simple. In this method, a station continuously sense and after the station finds the line idle.It sends its frame immediately. This method has the highest chance of collision because two or more stations may find the line idle and send their frames immediately at the same time.

Non Persistent : In this method, a station that has a frame to send sense, if the line is idle, it sends immediately. but if the line is busy, it waits a random amount of time and sense the line again.The Non Persistent method 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 on the same time.

P-Persistent : The P-Persistent method is used if the channel has the time slot duration equal to or greater than the maximum propagation time.This  method is the combination of two other persistent methods.It reduces the chance of collision and improves efficiency.

CSMA/CD

It is a carrier sense multiple access/ collision detection network protocol to transmit data frames.The CSMA method does not specify the procedure following a collision. CSMA/CD augments the algorithms to handle the collision. In this methods the station monitors the medium after it sends a frame to see if the transmission was successful. If so the station has finished , if there is a collision , the frame is sent again.

It first senses the shared channel before broadcasting the frames, and if the channel is idle, it transmits a frame to check whether the transmission was successful. If the frame is successfully received, the station sends another frame. If any collision is detected in the CSMA/CD, the station sends a jam/ stop signal to the shared channel to terminate data transmission. After that, it waits for a random time before sending a frame to a channel.

CSMA/CA

It is a Carrier Sense Multiple Access/Collision Avoidance network protocol for carrier transmission of data frames. It was invented for wireless network.It receives an acknowledgment when a data frame is sent to check whether the channel is clear or not. If the station receives only a single (own) acknowledgments, that means the data frame has been successfully transmitted to the receiver. But if it gets two signals (its own and one more in which the collision of frames), a collision of the frame occurs in the shared channel. Detects the collision of the frame when a sender receives an acknowledgment signal.

There are three strategies to avoid the collision which are given below :

Inter Frame Space(IFS)

In this method, the station waits for the channel to become idle, and if it gets the channel is idle, it does not immediately send the data. Instead of this, it waits for some time, and this time period is called the Inter Frame Space or IFS. However, the IFS time is often used to define the priority of the station.

Contention window

In the Contention window, the total time is divided into different slots. When the station/ sender is ready to transmit the data frame, it chooses a random slot number of slots as wait time. If the channel is still busy, it does not restart the entire process, except that it restarts the timer only to send data packets when the channel is inactive.

Acknowledgment

In the acknowledgment method, the sender station sends the data frame to the shared channel if the acknowledgment is not received ahead of time.




No comments:

Post a Comment