CPSC 641: Performance Issues in High Speed Networks

Professor Carey Williamson

Winter 2022

Assignment 2: COVID Barber Shop (30 marks)

Due Date: Thursday, February 17, 2022 (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

A pair of siblings, Faruz and Gemal, have opened a new barber shop in Calgary. They are identical twins, and always like doing things together. Despite the challenges of the pandemic times, they think that they can build a successful business, since they are excellent hair stylists, and have advanced degrees from the Haskayne School of Business at the University of Calgary. Their shop has two barber chairs for customers to sit in while getting their hair cut, either by Faruz (barber chair F) or Gemal (barber chair G). There are also three ordinary chairs just outside the shop (due to COVID regulations) for customers who are waiting for service, in a First-Come-First-Serve (FCFS) fashion, as shown here:

Barber Shop

There are no appointments at this barber shop. Rather, Faruz and Gemal are happy to service customers whenever they arrive (day or night). Customers arrive to the barber shop randomly, 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 must sit on a chair outside, waiting for their turn to get a haircut. If the waiting area is full, the disgruntled customer leaves and never returns. Customers in the waiting area keep moving forward in the queue, and eventually receive service from 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, Faruz is slightly faster than Gemal at cutting hair. Their respective service rates are μ1 and μ2, with μ1 > μ2.

Despite their strong business acumen, Faruz and Gemal have limited knowledge of computer science and computer systems performance evaluation, and have turned to you as their friend to help them better understand their shop and its performance. Their main question to you is about whether three chairs in the waiting area is the right number. Faruz thinks more chairs would make things better, but Gemal is not convinced of this. Your task is to use your skills as a performance analyst to resolve this issue for them.

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, just in case I ask for it later).