subject

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. Describe your multi-threaded solution to coordinate the barber and the customers. There should be one thread representing the barber and one additional thread for each new customer. Implement your solution using only Pthreads functions.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:30
An atom's diameter is about 0.1 nanometer (1×10-9m), and a human hair is about 1×10-3m. how many times greater is a human hair than an atom's diameter? sorry pushed wronf button but this is math
Answers: 3
question
Computers and Technology, 24.06.2019 10:40
Joe needs to see the slide transitions and animations he has applied to his slides in a large view. which presentation view should he use? in which tab would joe find the animations option to make further changes, if any?
Answers: 1
question
Computers and Technology, 24.06.2019 14:30
When workers demonstrate patience, are able to manage there emotions, and get along with other employees, which skills are being displayed?
Answers: 1
question
Computers and Technology, 25.06.2019 03:30
What best describes the purpose of occupational safety and health administration
Answers: 1
You know the right answer?
A barbershop consists of a waiting room with n chairs and a barber room with one barber chair. If th...
Questions
question
Spanish, 24.03.2020 03:25
question
History, 24.03.2020 03:25
Questions on the website: 13722363