Skip to main content
IMPORTANT NOTICE: As of December 21, 2025, we will no longer provide the old free Moodle hosting plan with pre-installed plugins that your site currently uses.
After that date, all sites that use it and have not switched to a paid hosting plan will be migrated to the current free hosting plan (wihout plugins and with only 2 GB of disk space).
You can switch to a payment plan for only $19.95 USD per month or $219.95 USD per year (plus local taxes).
Moodle
  • Home
  • Calendar
  • More
You are currently using guest access
Log in
Moodle
Home Calendar
Expand all Collapse all
  1. Dashboard
  2. OS
  3. Unit 6: Inter-Process Communication (IPC)
  4. 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