Skip to main content
Remove advertising on this site for only $19.95 USD per month or $219.95 USD per year (plus local taxes).
Moodle
  • Home
  • More
You are currently using guest access
Log in
Home
  1. OS
  2. Sleeping-Barber-Problem

Sleeping-Barber-Problem

Completion requirements
Opened: Tuesday, 20 April 2021, 12:00 AM
Due: Tuesday, 27 April 2021, 12:00 AM

A barbershop consists of a waiting room with n chairs and a barber room with one barber chair. If there are no customers to be served, the barber goes to sleep. If a customer enters the barbershop and all chairs are occupied, then the customer leaves the shop. If the barber is busy but chairs are available, then the customer sits in one of the free chairs. If the barber is asleep, the customer wakes up the barber. Write a program to coordinate the barber and the customers.


You are currently using guest access (Log in)
Powered by Moodle