CIS2168 - Homework 7: Discrete-Event Simulation

Assignment given: October 12, 2010
Due Date: October 25, by 10pm

Write a program to do the discrete-event simulation of a computer system. We assume that the system can be represented as the following queueing network:

                   ---+    +-+  SWITCH
  INPUT------>x---->|||--->| |--->x------>OUTPUT
              ^    ---+    +-+    |
              |   QUEUE1   CPU    |
              |    +-+    +---    v
              +<---| |<---|||<----+      
                   +-+    +---      
	           DISK   QUEUE2   
To this system arrive jobs. When a job arrives at QUEUE1 if CPU is free it goes there. Otherwise it is queued in QUEUE1 until CPU becomes available. A job spends some time on the cpu, then either the job completes or it continues to the disk, after which it returns to the cpu. Execution of the job continues in this way until it leaves the system.

The program will define as constants the following values:

Write to a log file, sim.log, each significant event [the significant events are the arrival of a new job into the system, the completion of a job at a server, the termination of the simulation].

Determine and print out:

Your program should process a reasonable number of jobs, at least one thousand.

Include a second document, RUNS.txt, describing the data you have used to test your program, why you chose, and what you have learned from it. You should choose reasonable values for the interarrival times and for the server service times [for simplicity, choose a P defaulted to 0.25, and use a service time at the disk equal to the service time of real disks].

IF YOU LIKE:

You can do this homework in teams of two if you also provide a graphic output for the program where the movement of jobs is represented in the graph. You could represent the jobs by letters, a total of 52, assuming that at no time more than 52 jobs are in the system. If you take this option, please send me information on the team composition by this Friday.