Alan Kaminsky
•
Department of Computer Science
•
Rochester Institute of Technology
•
4486
+
2220
= 6706
Home Page
Advanced Computer Networks
•
4005-741-01
•
Fall Quarter 2009
Course Page
4005-741-01 Advanced Computer Networks
Module 2. Discrete Event Simulation
Lecture Notes
Prof. Alan Kaminsky -- Fall Quarter 2009
Rochester Institute of Technology -- Department of Computer Science
Computer Science Course Library Packages
Classes for building discrete event simulation programs
Package
edu.rit.discretesim
Classes for generating random numbers with various distributions
Package
edu.rit.numeric.prob
Classes for creating plots from within a program
Class
edu.rit.numeric.plot.Plot
Class
edu.rit.numeric.XYSeries
Class
edu.rit.numeric.ListXYSeries
Example: Simulation of an M/M/1 Queue
Class
MM1
[
source code
]
Discrete event simulation of an unbounded FIFO M/M/1 queue
Mean arrival rate λ and mean service rate μ are command line arguments -- "knobs"
Measures mean wait time and mean queue length
Class
MM1v2
[
source code
]
Same as above, except . . .
Does several simulation runs with a series of λ values
Displays a plot of mean wait time versus λ
Example: Simulation of a Small Network
Four routers connected in a bidirectional ring
One host attached to each router
Host 0 is a server, hosts 1-3 are clients
Each host consists of one or more generators
Traffic pattern
Host 1 → Host 0 packets, interarrival times exponentially distributed, mean arrival rate λ
10
Host 2 → Host 0 packets, interarrival times exponentially distributed, mean arrival rate λ
20
Host 3 → Host 0 packets, interarrival times exponentially distributed, mean arrival rate λ
30
Host 0 → Host 1 packets, interarrival times exponentially distributed, mean arrival rate λ
01
Host 0 → Host 2 packets, interarrival times exponentially distributed, mean arrival rate λ
02
Host 0 → Host 3 packets, interarrival times exponentially distributed, mean arrival rate λ
03
All packets same size, all links same data rate, constant service rate μ
Each router consists of one or more queues/servers
Each queue individually bounded at
max
packets
Measurements
Mean delivery time for all packets
Mean drop fraction for all packets
Classes
Class
Packet
[
source code
]
Class
PacketFactory
[
source code
]
Class
Host
[
source code
]
Class
Router
[
source code
]
Class
DeliveryTimeMeter
[
source code
]
Class
Main01
[
source code
]
Advanced Computer Networks
•
4005-741-01
•
Fall Quarter 2009
Course Page
Alan Kaminsky
•
Department of Computer Science
•
Rochester Institute of Technology
•
4486
+
2220
= 6706
Home Page
Copyright © 2009 Alan Kaminsky. All rights reserved. Last updated 02-Oct-2009. Please send comments to ark
@
cs.rit.edu.