E-BEB [ Enhanced Binary Exponential Backoff ] Algorithm for fair channel access:

KUSHAGRA BANSAL
3 min readNov 13, 2020

--

What is the Fairness Problem :

When they are numerous Active number of Stations, if any station sends one of its data frames to another station chances are higher than the station who sends the data frame earlier will send it another data frame again. A station probability increases of sendings it data frame while other station Packet delay increases which makes a decrease in throughput.

Example: After the transmission of the data frame if node A BT value means the backoff time value is higher will have a lower probability of sending its data frame again. Node B with a lower BT value will come to zero and sends the packet again n again causing fairness problem.

The E-BEB Algorithm:

In IEEE 802.11 BEB and Improved-BEB Algo BT value is taken randomly such that Node with Lower BT has more chances to access the channel again.

Here, In E-BEB, BT Threshold[ BT ] and CW is having a relation between them. When many nodes use the medium, we require a small BT value relative to the current CW to reduce collisions. On the other hand, when few nodes use the medium, we require a high BT_Th value relative to the current CW for rapid collision resolution

BT = CWmin / sqrt( CWmax )* CW * SlotTime — — ( 4 )

// CW => Contention Windows

Thus, the channel throughput is distributed more equally between the nodes. The CW suits the traffic and thus achieves fairness. Empirically, as the CW increases and vice versa, the throughput decreases. The E-BEB algorithm, therefore, improves the throughput of all traffic. The packet delay and decrease are also reduced by E-BEB.

C++ =>

#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#include<string.h>
#include<math.h>
int main()
{
int C = 12, D = 4, E = 8;
int counter = 0 ;
double slot_time = 0.00000166, CW ;
int CWmax = 1024, CWmin = 32;
double BT, G, Total_Backoff_time = 0;
printf("Enter the Curr_BW (CW) by user : ");
scanf("%lf" , &CW) ;
FILE *fp;
char *f_name = "aaa.txt";
char ch;

fp = fopen(f_name, "r+");
if (fp == NULL) {
printf("%s does not exists \n", f_name);
return;
} else {
printf("%s: opened in read mode.\n\n", f_name);

}

while ((ch = fgetc(fp) )!= EOF) {
// end-of-file

if(ch == '0' || ch == '1'){
printf("frame %c \n ", ch);

}

if(ch == '1' || ch =='0')
{

if(counter < CWmin){

counter = counter + 1;
if(CW > CWmin){
CW = CW - CWmin;

}else{
CW = CW - 2;
}

if( CW < (1 / sqrt(CWmin) ) * CWmin ){

CW = (1 / sqrt(CWmin) ) * CWmin ;
printf("The value Current CW is : %0.8f\n " ,CW);
BT = ( CWmin / sqrt(CWmax))* CW * slot_time;
printf("=> Value of Backoff time is : %0.8f\n" , BT);
printf("NODE TRANSMITS SUCCESSFULLY");
}else{

printf("The value Current CW is : %0.8f\n ", CW);

BT = ( CWmin / sqrt(CWmax))* CW * slot_time;
printf("=> Value of Backoff time is : %0.8f\n" , BT);
printf("NODE TRANSMITS SUCCESSFULLY");
}


}else{
counter = 1;CW =CW + (CWmax / CW)*CWmin ;if(CW < CWmax){

CW = CWmax;
printf("The value Current CW is : %0.8f\n ", CW);
BT = ( CWmin / sqrt(CWmax))* CW * slot_time;
printf("=> Value of Backoff time is : %0.8f\n" , BT);

printf("NODE TRANSMITS SUCCESSFULLY");
}else{

BT = ( CWmin / sqrt(CWmax))* CW * slot_time;
printf("=> Value of Backoff time is : %0.8f\n" , BT);
printf("NODE TRANSMITS SUCCESSFULLY");
}

}

}
if(ch == '1' || ch =='0'){Total_Backoff_time = Total_Backoff_time + BT;
printf("\n");
printf("=> Total Back_off time for frame is : %0.8f \n " ,Total_Backoff_time);
printf("\n\n");

}

}
}

To learn in-depth about how Fairness is calculate using FI (Fairness Index) on Network Simulator refer to the research paper Jian[52].

Jain R, Durresi A, Babic G. Throughput fairness index: an explanation. ATM Forum Contribution 99–0045, February 1999.

https://www.cse.wustl.edu/~jain/atmf/ftp/atm99-0045.pdf

Check my GitHub account !!!

Thank You !!!

KUSHAGRA BANSAL

--

--

No responses yet