CPSC 641: Performance Issues in High Speed Networks

Professor Carey Williamson

Winter 2019

Assignment 2: Weasley Barber Shop (30 marks)

Due Date: Thursday, February 14, 2019 (4:00pm)

Learning Objectives

The purpose of this assignment is to learn about analytical and simulation modeling. In particular, you will use Markov chains and discrete-event simulation to study the loss behaviour of a finite-capacity queue in a heterogeneous multi-server system.

Scenario

The Weasley twins, Fred and George, have opened a new barber shop at Hogwarts. Their shop has two identical barber chairs for customers to sit in while getting their hair cut, either by Fred (barber chair F) or George (barber chair G). There are also three ordinary chairs in the waiting room for customers who are waiting for service, in a First-Come-First-Serve (FCFS) fashion.

Customers arrive to the barber shop according to a Poisson arrival process with average rate λ. If both barber chairs are empty when a customer arrives, then the arriving customer chooses their barber chair uniformly at random (since they can't tell the twins apart), and starts getting their hair cut immediately by the chosen barber. If only one barber chair is empty, the customer goes to that chair, and starts getting their hair cut immediately. If both barber chairs are occupied, then the arriving customer goes to the waiting room, if space is available, and waits for their turn to get a haircut. If the waiting room is full, the customer leaves in a huff and never returns. If there are waiting customers, they receive service by the next available barber as soon as a barber chair is vacated. The service time for a haircut is exponentially distributed with mean 1/μ, where μ is the service rate for customer haircuts. However, Fred is slightly faster than George at cutting hair. Their respective service rates are μ1 and μ2, with μ1 > μ2.

Analytical Modeling (15 marks)

Simulation Modeling (15 marks)

Optional Bonus (2 marks)

Using either your analytical model or your simulation model (or both), test the sensitivity of your results to the customer arrival process, while leaving the service time distribution the same as before (i.e., exponential). In particular, keep the average customer arrival rate the same, but change the characteristics/properties of the inter-arrival time distribution to see the effect (if any) on customer loss. Indicate what arrival process(es) you used, and comment on your results.

Assignment Submission

When you are finished, please hand in a hardcopy of your analytical and simulation modeling results, including diagrams, equations, graphs, and the writeup about your observations. You do not need to provide source code for the simulator that you used, but please indicate what programming language you used, and how many lines of code you needed. (You should also keep your simulator handy, in case I ask for it later).