Alan Kaminsky Department of Computer Science Rochester Institute of Technology 4486 + 2220 = 6706
Home Page
Data Communications and Networks II 4003-541-70/4005-741-70 Spring Quarter 2006
Course Page

4003-541-70/4005-741-70
Data Communications and Networks II
Undergraduate Programming Project 3

Prof. Alan Kaminsky -- Spring Quarter 2006
Rochester Institute of Technology -- Department of Computer Science

Overview
Software Requirements
Questions
Submission Requirements
Grading Criteria
Late Projects
Plagiarism


Overview

This project is based on Chapter 2, Problem 12 in Andrew Tanenbaum, Computer Networks (Prentice-Hall, 1981), page 89.

In the following 9-node network, each link is bidirectional with a capacity of 50 kilobits per second in each direction.

The traffic pattern in the network is as follows. For each source and destination listed, packets flow along the given path, and packets are generated at the given mean arrival rate in packets per second. (Note: If there is traffic from X to Y, there may or may not any traffic from Y to X.)

Src  Dst  Path  Rate      Src  Dst  Path  Rate      Src  Dst  Path  Rate
---  ---  ----  ----      ---  ---  ----  ----      ---  ---  ----  ----
 A    B   AB     10        B    I   BFHI    6        H    D   HFGD   14
 A    C   ABC    14        C    E   CDE    10        H    E   HIE     3
 A    D   ABCD   20        D    H   DGFH    6        I    A   IHA    10
 B    G   BFG     6        C    I   CDEI   10        I    C   IEDC   15
 B    E   BCDE    8        G    B   GFB     8

Write a discrete event simulation program like the Tanenbaum program studied in class, except:

  • The program simulates the above network topology.
  • The simulated network uses source routing to route packets, rather than forwarding tables.
  • The traffic pattern is specified on the command line, rather than hard-coded into the program.
  • The program simulates only the traffic given on the command line; it does not simulate a range of traffic scale factors.
  • The program prints the results for a series of simulation runs but does not display a plot.


Software Requirements

Requirement 1. The program is called Tanenbaum2. The program is run by typing this command:
 
java Tanenbaum2 <generator> <packetsize> <queuefactory> <queuesize> <n> <t> <seed> <path> <rate> ...

  1. <generator> is the name of the packet generator class.
  2. <packetsize> is the mean packet size (bits).
  3. <queuefactory> is the name of queue factory class.
  4. <queuesize> is the maximum queue size (packets). If the queue factory creates unbounded queues, the maximum queue size is ignored but must still be specified.
  5. <n> is the number of simulation runs.
  6. <t> is the total simulation time for each simulation run (seconds).
  7. <seed> is a random seed.
  8. <path> is the path for the first traffic flow; it consists of a string of letters A through I; the first letter is the source node; the last letter is the destination node.
  9. <rate> is the mean arrival rate for the first traffic flow (packets per second, double precision floating point).
  10. There may be one or more traffic flows, each specified by a path and a rate.
(Note: This means that the main program class must be named Tanenbaum2, and this class must not be in a package.)

Requirement 2. For each simulation run, the program must print the following line on the standard output: the simulation run number (1 through <n>), a tab character, the mean of the end-to-end packet delay times, a tab character, the standard error of the end-to-end packet delay times, a tab character, and the fraction of the packets that were dropped. There is no additional white space before, after, or within the line.

Requirement 3. If the program encounters any error condition, the program must print a meaningful error message and must terminate. The wording of the error message is up to you. The error message may include an exception stack trace.

Requirement 4. The program must have a separate class named MMGenerator, and this class must not be in a package. This class must generate packets from a given source to a given destination, with exponentially distributed interarrival times at a given mean arrival rate, and with exponentially distributed packet sizes at a given mean packet size.

Requirement 5. The program must have a separate class named MCGenerator, and this class must not be in a package. This class must generate packets from a given source to a given destination, with exponentially distributed interarrival times at a given mean arrival rate, and with a given constant packet size.


Questions

Answer the following questions. Record your answers in a plain text file named "questions.txt" and include this file in your project submission.

  1. (5 points) Packet interarrival times are exponentially distributed with the mean arrival rates given above. Packet sizes are exponentially distributed with a mean of 1000 bits. Packets follow the paths given above. The routers' packet queues are unbounded. What is the mean packet delay time?
     
  2. (5 points) Packet interarrival times are exponentially distributed with the mean arrival rates given above. Packet sizes are exponentially distributed with a mean of 1000 bits. Packets follow the paths given above. The routers' packet queues have a maximum size of 3 packets. What is the mean packet delay time and the packet dropped fraction?
     
  3. (5 points) Packet interarrival times are exponentially distributed with the mean arrival rates given above. Packet sizes are a constant 2000 bits. Packets follow the paths given above. The routers' packet queues are unbounded. What is the mean packet delay time?
     
  4. (5 points) Packet interarrival times are exponentially distributed with the mean arrival rates given above. Packet sizes are a constant 2000 bits. Packets follow the paths given above. The routers' packet queues have a maximum size of 3 packets. What is the mean packet delay time and the packet dropped fraction?
     
  5. (5 points) Give the mean arrival rate, mean service rate, and traffic intensity for each router queue that is carrying traffic in the network. (Hint: A router queue's mean arrival rate is the sum of the mean arrival rates for all traffic flows going through that router queue.)
     
  6. (5 points) Find a different path for one or more of the traffic flows so as to decrease the mean packet delay time. Without doing any simulations, give a justification why changing the path or paths in this way should decrease the mean packet delay time.
     
  7. (5 points) Give simulation results proving that changing the path or paths decreases the mean packet delay time, under each set of conditions from Questions 1 through 4.


Submission Requirements

Your project submission will consist of a Java archive (JAR) file containing all the Java source files for your project as well as the file "questions.txt".

  • Each Java source file name must end in ".java".
     
  • Each class or interface must include a Javadoc comment describing the overall class or interface.
     
  • Each method within each class or interface must include a Javadoc comment describing the overall method, the arguments if any, the return value if any, and the exceptions thrown if any.

See my Java source files which we studied in class for the style of Javadoc comments I'm looking for.

Put all the source files and the questions file into a JAR file named "<username>.jar", replacing <username> with the user name from your Computer Science Department account. The command is:

jar cvf <username>.jar *.java questions.txt

If your project used classes from the Computer Science Course Library without modifications, you do not need to include the source files for these classes in your submission. If your project used classes from the Computer Science Course Library with modifications, you do need to include the source files for these classes in your submission.

Send your JAR file to me by email at ark­@­cs.rit.edu. Include your full name and your computer account name in the email message, and include the JAR file as an attachment.

When I get your email message, I will extract the contents of your JAR file into a directory. I will set my Java class path to include the following directories: the directory where I extracted your files, and the Computer Science Course Library directory. I will compile all the Java source files in your submission using the JDK 1.5.0 compiler. I will then send you a reply message acknowledging I received your project and stating whether I was able to compile all the source files. If you have not received a reply within one business day (i.e., not counting weekends), please contact me. Your project is not successfully submitted until I have sent you an acknowledgment stating I was able to compile all the source files.

The submission deadline is Tuesday, May 16, 2006 at 11:59pm. The date/time at which your email message arrives in my inbox (not the time when I actually read the message, which will be some time later than when it arrives in my inbox) will determine whether your project meets the deadline.

If you submit your project before the deadline, but I do not accept it (e.g. I can't compile all the source files), and you cannot or do not submit your project again before the deadline, the project will be late (see below). I strongly advise you to submit the project several days before the deadline, so there will be time to deal with any problems that may arise in the submission process.


Grading Criteria

30% of your project grade will be based on the design of your project as documented in the Javadoc and as implemented in the source code. Your project should:

  • Be designed using object oriented design principles.
  • Make use of reusable software components where appropriate.
  • Be documented using proper Javadoc style as described above.
  • Correctly implement the discrete event simulation.

35% of your project grade will be based on test runs of your project. The grade for this portion will be based on whether your project produces the correct data on the standard output as specified in the Software Requirements. Every incorrect output will result in a loss of points. There is one exception: If your application does not run using the command line stated in Requirement 1 or the class names stated in Requirements 4 and 5, you will receive 0 points for this portion of your grade.

Any deviation from the requirements will result in loss of points. This includes errors in the output formatting (such as incorrect number of spaces, incorrect capitalization, or incorrect punctuation), misspelled output, and extraneous output not called for in the requirements. The requirements state exactly what the output is supposed to be, and there is no excuse for outputting anything different. If any requirement is unclear, please ask for clarification.

35% of your project grade will be based on your answers to the Questions.


Late Projects

See the Course Policies for my policy on extensions.

I will not accept a late programming project unless you arrange with me for an extension. A late programming project will receive a grade of 0.


Plagiarism

See the Course Policies for my policy on plagiarism.

You may use any resources you wish to do the programming project, including resources discussed in class and resources you find on your own. You may discuss the programming project at a general level with others in the class. However, the programming project you turn in must be entirely your own work. You are not allowed to collaborate with anyone else on the programming project. You are not allowed to use any current or past student's work in any way when working on your programming project.

I will not tolerate plagiarism. If in my judgment the programming project is not entirely your own work, you will get a grade of 0 for the programming project. I will also place a report of the plagiarism incident in your permanent file in the Computer Science Department office. Repeated plagiarism incidents will result in disciplinary action in accordance with Computer Science Department policy and RIT policy.

There are only two exceptions to the prohibition on plagiarism:

  1. You may reuse without modification a source file from the Computer Science Course Library.
     
  2. You may take a source file from the Computer Science Course Library and add your own modifications, provided you state that you have done so and give credit to the original author.

Ad Hoc Networks 4003-543-01/4005-742-01 Spring Quarter 2007
Course Page
Alan Kaminsky Department of Computer Science Rochester Institute of Technology 4486 + 2220 = 6706
Home Page
Copyright © 2006 Alan Kaminsky. All rights reserved. Last updated 29-Apr-2006. Please send comments to ark­@­cs.rit.edu.