textbook p233 6.11 The sleeping-Barber Problem online classroom excercise-2 Version 0 |
|
👤 Author: by writer 2021-09-29 03:56:15 last modified by writer |
excercise The sleeping-Barber Problem, textbook p233 6.11 The sleeping-Barber Problem
A barbershop consists of a waiting room with n chairs and a barber room with one chair. If there are no customers to be served, the barber goes to sleep. If a coustomer enters the barershop and all chairs are occuipied, then the customer leaves the shop. If the barber is busy but chairs are availabe, then the custumer sits in one of the free chairs. If the barber is asleep, the customer wakes up the barber. Write a program to coorinate the barber and the customers.
Please login to reply. Login