Homework 4
Due Nov 20, 2003

  1. An interesting scenario often arises in queueing systems, where a designer has to choose between one server of unit service rate or n servers each of 1/n service rate. All servers are still served from the same queue. As soon as a server becomes idle, it picks up the next customer in the queue for service. Using and extending the M/M/1 queue simulation already provided as a part of SMPL distribution, analyze the performance of single vs. multiple servers (of the same overall capacity). Note that you can easily simulate a multiserver facility by passing an appropriate parameter in the facilty() call.  For the performance study plot offered load vs. average response time. Express offered load in a normalized fashion as the ratio of the arrival rate and the service rate. Use n = 1,2,5, 10 and 20. Present one single plot as a family of curves.  No source code is needed. But include any discussion/observation you wish to make.
  1. Solve Problem 3, Chap 2 from MacDougall's book. Be sure to spend some time trying to understand the model. Going through the example program in pages 44-45 will help. This program is already provided as a part of the SMPL distribution.
  2. Negative exponential is same as exponential. According to the problem statement, CPU service time is exponentially distributed with a mean of 40ms. The CPU service demand is 480 ms. Note that a geometric distribution describes the number of times a terminal request goes through the CPU and hence one of the disks. Each disk is chosen with equal (i.e., 0.5) probability.  The disk service time is the sum of  latency time, seek time and transfer time. Latency time is uniform between [0,16.7] ms.  For seek time, replace triangular by uniform to make it easy.

You should instrument your program to determine the response time for each terminal request (i.e., job) and average them over to report the mean response time, as desired. Then you should carry out an operational check to verify that the mean response time you found this way is indeed correct. To do this, the problem statement asks you to calculate the mean response time using the SMPL provided report (it is up to you to figure out how to do this), and then verify that it is very close to the mean response time that you computed by instrumenting the program. It probably won't be exactly equal because of the use of randomness and short run of the simulation. So don't worry if it is not exact, but should be very close. Closer estimations are possible by longer simulations, naturally!

Mean no. of terminal requests in the system means how many terminal requests on an average reside in the computer system (the dotted box in the figure). This number should be less than or equal to 16. Hint: you can evaluate this from the SMPL  generated report. No real need to write additional code.

You may have some trouble in interpreting the report SMPL generates. They seem to use some awkward terminology sometimes. In the report, UTIL. is utilization (U), MEAN BUSY PERIOD is mean service time (1/m), and MEAN QUEUE LENGTH is, well, mean queue length (Q). In OPERATION COUNT, RELEASE means #service completions or #departures (C), and QUEUE means #customers finding the server busy when the made the request. So, the ratio of QUEUE and RELEASE is the fraction of customers that had to wait in the queue.

Turn in your commented source code, program output and your analysis/answers.