Assignment 5 (Due December 20th 1996)
CSC454 - System Simulation
Rameen Mohammadi
For your final project, you will simulate a local area network using
the Ethernet topology. The focus of the project is on simulating
and understanding network contention. Here is my version.
The Ethernet model employs a broadcasting approach for
networking. A number of stations/nodes/computers are connected to such a
network, typically, in a one mile radius. A message broadcasted on the
network by one of the stations is picked up by all other stations. Stations
can recognize whether messages are for them or not. A message that
doesn't belong to a station is, simply, discarded by that station.
The most interesting part of this LAN is the concept of network contention.
When a station is ready to transmit a message, it first must determine
whether the network is already being used or not. If the network is not seized
by any other station, the station that wishes to transmit must first
send a small packet containing a unique bit pattern across the network. If
no other station is doing the same thing at that time, the transmitting
station can now assume ownership of the network and transmit a message.
If more than one station are contending for the network at the same time, their
bit patterns will collide which intern changes the bit pattern in the network
to something different than the bit patterns of all contending stations.
Collisions are easyly detected by the contending stations who listen to the
network for their own unique bit pattern. To resolve collisions, the following
Exponential Backoff Heuristic has been adopted which basically causes the
stations involved in a collision to transmit at a later time.
EBF = L2 * T * random() where L is the number
of seize attempts by the station and T is the time it takes to transmit
the stations bit pattern.
Key constraints
- There are eight stations in the environment that you simulate.
- Network transmission takes place using a thin coaxial cable
(1000,000 bits/sec.).
- You will not implement the simulation of receiving packets, just
contention and transmission of messages.
- Stations give up on transmitting a message after 5 unsuccessful
attempts to send it.
- Choose the mean interarrival rate for each station randomly. The
interrival mean for each station must be between 3 to 5
seconds. The mean should be a float variable.
- Generate messages with an interarrival drawn from a uniform
distribution mean+-2. Keep the times as float values.
- The size of each packet for a transmitted message is 1024 bits. Each
message shall contain 1 to 10 packets (uniformly dist.) associated
with it regardless of its point of origin. Remember that
1000,000 bits/sec is the transmission rate of the network.
- The packet containing the station's bit pattern (used for contention)
is 64 bytes long (there are eight bits in a byte).
Requirements:
- Design a Java Applet for this project.
- Each station represented by a circle.
- The network represented by an open-ended line with branched to each
circle.
- A text area for writing messages and the final report.
- One Start and one Terminate button to initiate
and terminate the simulation. I really don't care if
the Start button can restart the simulation
correctly, once the simulation has been terminated via the
Terminate button.
- When the Terminate button is clicked, output the following:
- Average wait time for messages of each station separately.
This is wait time before a successful transmission of a
messages.
- Average time spent for contention by each station.
- Total # of collisions detected by each station.
- Total # of messages discarded, due to too many collisions.