A barbershop consist 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 barber shop and all the 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.
PEOPLE WHO WRITE THE PROGRAM ARE BRILLANTSThe sleeping-barber problem?
To make the long story cut, I think what you wanna say is you don't like barbers who are apt to sleep when you go there.
If this is collect, you should make an appointment to get a hair cut so that you can make them prepare for cutting.The sleeping-barber problem?
1 not every Barber is used to do so.
2. in afternoon every one sleep.
3. please do not try to criticise every one.
4. go at the fixed time or take the prior appointment.
5. rest change the barber shop. do not go at that shop.
6. best coordination is that take the prior appointment through phone
LET SLEEPING DOG (BARBER) ALONE.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment