This is a simulation of the Sleeping Barber problem. The barber sleeps until a customer arrives. If there are no customers, the barber goes to sleep. If a customer arrives when the barber is cutting hair, the customer waits if there are empty chairs. If there are no empty chairs, the customer leaves the shop.