CS516 Assignment 5

Due: In Class
November 18, 1999
Weight: 15% of final mark

Write a program, in any programming language on UNIX, which simulates a token ring similar to that specified in IEEE Standard 802.5. You should write your program so that it is flexible, allowing system parameters and even functional behavior of the protocol to be changed easily.

Specifications:

Hints:

Your simulation must accurately determine transmission times, but you should avoid simulating irrelevant details. In particular, the bit patterns of various control and data bytes are not relevant--you need to know how many such bytes there are, but you can simply maintain a data structure for each frame which stores all the needed information in a form convenient to your program. Similarly, you need not simulate the bit-by-bit movement of the token or frame, but rather compute when it will arrive at a place where something significant will happen.

I suggest you maintain a list of events, sorted in ascending order of time. The list will initially contain the arrival times of frames to be transmitted, read from the input file. Successive events are removed from the list and processed. During processing, future events may be generated; the exact time of each future event is calculated and the event is inserted into the list in its proper place.

Other useful hints are:

Make sure to state assumptions, if you are making any other than those specified above, for this assignment.

Submissions:

You should hand in a similar documentation as you have done for ASN3 (i.e., an external documentation describing how the program was implemented, the source listing and test outputs with the -t flag off). We will shortly provide the test cases you must use for submission.

In order for the TA to verify your program, please do the following:

Marking Scheme:

This assignment is worth a total of 15% of the final mark. Documentation is worth 5%. The remaining 10% will be awarded roughly as follows:

So, get the single-priority scheme working first, then add the multiple priority scheme. Neatness and understandability count. Good-luck!