Computer Science, asked by sambo101, 2 months ago

a) The barber shop has one barber, one barber chair, and n chairs for waiting customers, to sit on. If there are no customers present, the barber sits down in the barber chair and falls asleep, as illustrated in Fig.1. When a customer arrives, he has to wake up the sleeping barber. If additional customers arrive while the barber is cutting a customer's hair, they either sit down (if there are empty chairs) or leave the shop (if all chairs are full). Program the barber and the customers without getting into race conditions using C++ or Java program.

Answers

Answered by iamkishored
3

Answer:

sorry I don't time to read sorry bro

Similar questions