Homework 1: Discrete-Event Simulation

Hints, Partial solution, Suggested format of Log File, Directions for mailing homework to Lab Instructor,

Write in C a program to do the discrete-event simulation of a system representing a CPU and a Disk. The situation is as described in the following queueing network:

                
                
         SWITCH1    ----+       +--+           SWITCH2
 INPUT ---->x------->||||------>|  |------------->x--------> OUTPUT
            ^       ----+       +--+              |
            |       QUEUE1     SERVER1            |
            |                   (CPU)             |
            |          +--+          +----        v  
            x----------|  |<---------||||<--------+
                       +--+          +----
                     SERVER 2       QUEUE2                          
                      (DISK)

where SERVER1 is the CPU and SERVER2 is the Disk. QUEUE1 and QUEUE2 are, respectively, the buffers for requests to the CPU and to the Disk..

The user is asked at run time to specify:

Determine:

Run the program a number of times with different values for the parameters and random seed. Examine in correspondence the utilizations and queue sizes. If for a given choice of parameters by changing the random seed we obtain utilization and size values that are stable [i.e. do not change much, say, change at most 10%], then we have a good simulation.

This homework is assigned on September 5 and it is due September 27 by 5pm. Mail the homework to the TA. Be sure to receive within 24 a message back from the TA confirming reception of the homework. If you do not receive the reply from the TA contact by email both the instructor and the TA.

ingargiola@cis.temple.edu