4010-441 Principles of Concurrent System Design
Sleeping Barber Design Exercise

This page is accessible at www.se.rit.edu/~se441/ClassExercises/SleepingBarberDesign.html.

Overview

In this class exercise, your team will create an actor-based design for solving the classic Sleeping Barber Problem.

Problem

A barber shop has just one barber with one barber chair, and three waiting chairs in which customers may wait for a haircut. Without customers around, the barber sleeps. When a customer arrives, the barber wakes up to cut his hair. If the barber is busy cutting hair when a customer arrives, the customer sits down in an available waiting chair. If a waiting chair isn’t available, the customer leaves. When the barber completes cutting a customer's hair he gets the next available waiting customer. If no customers are waiting, he goes back to sleep.

  1. Take several minutes to identify the potential concurrency issues in this problem and the circumstances when they occur? We will discuss this before moving to the next the part of the exercise.
  2. Design an actor-based system and describe the design in the actor-based design document template. We will discuss several teams designs in class.

Submission

Before the end of class, submit your design document in the Sleeping Barber Class Exercise dropbox.