| Home > Protocol > Aloha Protocol > CS 01 |
| |
Aloha Protocol
|
| |
|
| |
| ALOHA
PROTOCOL IN C - LANGUAGE (Updated
- inputs by Thilip) |
| |
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <dos.h>
#define FRAME_TIME 250
main()
{
float S1, S2, G, J, val[100]
;
int I, n, K, delay ;
void wait() ;
clrscr() ;
printf("Please Give the
Total Load : ");
scanf("%d", &n);
printf("Please Enter the
value of load \n");
for (I=0; I<n; I++)
{
scanf("%f", &val[I]);
}
clrscr();
printf("\nOUTPUT 1: (THROUGHPUT
Vs LOADCURVE)\n\n");
printf("s=g*exp(-G) FOR
SLOTTED ALOHA * \n");
printf("s=g*exp(-2G) FOR
PURE ALPHA #\n");
printf("\n------ (THROUGHPUT
PER FRAME TIME)----\n");
for(K=0; K<n; K++)
{
G=val[K];
S1 = G * exp (-G);
S2 = G * exp(-2 * G);
printf("%1.3f", G
);
for (I=0; I <=S1*20; I++)
{
printf(" ");
}
printf("*");
for(I=S2*20; I<=S2*75; I++
)
{
printf(" ");
}
printf("#\n");
}
printf("G (ATTEMPTS PER
PACKET TIME) \n\n");
wait() ;
getch() ;
clrscr() ;
printf("\nOUTPUT 2 (DELAY
Vs THROUGHPUT) \n\n");
printf("\n-----(THOUGHPUT
PER FRAME TIME)----\n");
for(K=0; K<n; K++)
{
G=val[K];
S1 = G * exp (-G);
printf("3");
for (I=0; I <=S1*2.7; I++)
{
printf(" ");
}
printf("*\n");
}
printf("\n");
printf("---- DELAY -----");
wait();
getch();
clrscr();
}
void wait()
{
sound(440);
delay(300);
nosound();
}
OUTPUT of (THROUGHPUT V/S LOADCURVE)
s=g*exp(-G) FOR SLOTTED ALOHA
*
s-g*exp(-2G) FOR PURE ALPHA
# |
|
|
|
| 0.0000003 |
* |
# |
| 0.5000003 |
* |
# |
| 1.0000003 |
* |
# |
| 1.5000003 |
* |
# |
| 2.0000003 |
* |
# |
| 2.5000003 |
* |
# |
| 3.0000003 |
* |
# |
| 3.5000003 |
* |
# |
|
| G (ATTEMPTS PER PACKET TIME) |
| OUTPUT of (DELAY V/S THROUGHPUT) |
|
| |
| -----------(THROUGHPUT PER FRAME TIME) -----> |
3*
3*
3*
3*
3*
3*
3*
3*
3* |
| --- DELAY------> |
|
| |
Slotted
Aloha
Pure Aloha
Aloha and Network Stability
Aloha Simulation & Reservation Aloha Protocol
Slotted ALOHA Simulation Parameters
ALOHA PROTOCOL IN C - LANGUAGE |
- FDDI Frequently Asked Questions (FAQ)
- The function and frame format of FDDI.
- Aloha
- Comparative analysis between two types of ATM Switches
a) The Knockout Switch
b) The Barcher-Banyan Switch
- Various popular standards for compressing multimedia data
- Distributed Multimedia Survey: Standards
- ASCII to hex value chart
- Comparative analysis - TCP - UDP
- Addressing Formats and QoS parameters
- Bellman Ford's Algorithm
|
TOP |
|
| |
- FDDI Frequently Asked
Questions (FAQ)
- The function and frame
format of FDDI.
- Aloha
- Comparative analysis between
two types of ATM Switches
a) The
Knockout Switch
b) The
Barcher-Banyan Switch
- Various popular standards
for compressing multimedia
data
- Distributed Multimedia
Survey: Standards
- ASCII to hex value chart
- Comparative analysis -
TCP - UDP
- Addressing Formats and
QoS parameters
- Bellman
Ford's Algorithm
|
| |