TA Course (Fall 2001): ECS 252 - Computer Networks

~~~~~~~~~~~~~~~~~~~~~~~~~~~*~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Homework Solutions

  1. Homework #1 --- hw1sol.ps
  2. Homework #2 --- hw2sol.ps
  3. Homework #3 --- hw3sol.ps
  4. MidTerm Solution --- Midtermsol.ps
  5. Homework #4 --- hw4sol.ps
  6. Homework #5 (NEW!) --- hw5sol.ps
  7. Final Exam Solution --- finalsol.ps
~~~~~~~~~~~~~~~~~~~~~~~~~~~*~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Resource for Course Project

Discrete Event Simulation for a Variation of M/M/1 Queuing System

Problem Description:

Consider an M/M/1 system with the following variation: Whenever the server becomes free, he accepts two customers (if at least two are available) from the queue into service simultaneously. Of these two customers, only one receives service; when the service for this one is completed, both customers depart (and so the other customer got a "free ride").

If only one customer is available in the queue when the server becomes free, then that customer is accepted alone and is serviced; if a new customer happens to arrive when this single customer is being served, then the new customer joins the old one in service and this new customer receives a "free ride."

In all cases, the service time is exponentially distributed with mean 1/u sec and the average (Poisson) arrival rate is L(Lambda) customers per second.

Use Discrete Event Simulation to find average queue size as L varies.

Solution:

random.h

event.h
mm1.cpp

Download the code here: mm1.tar

~~~~~~~~~~~~~~~~~~~~~~~~~~~*~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link to ECS252 Course WebPage

~~~~~~~~~~~~~~~~~~~~~~~~~~~*~~~~~~~~~~~~~~~~~~~~~~~~~~~~