Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

William Stallings presents a more complicated version of the barbershop problem, which he attributes to Ralph Hilzer at the California State University at Chico. Our

image text in transcribed

William Stallings presents a more complicated version of the barbershop problem, which he attributes to Ralph Hilzer at the California State University at Chico. Our barbershop has three chairs, three barbers, and a waiting area that can accommodate four customers on a sofa and that has standing room for additional customers. Fire codes limit the total number of customers in the shop to 20. A customer will not enter the shop if it is filled to capacity with other customers. Once inside, the customer takes a seat on the sofa or stands if the sofa is filled. When a barber is free, one of the customers from the sofa is served (whoever gets to the chair first) and, if there are any standing customers, one of them takes a seat on the sofa whoever gets the chance first. When a customer's haircut is finished, any barber can accept payment, but because there is only one cash register, payment is accepted for one customer at a time. The barbers divide their time among cutting hair, accepting payment, and sleeping in their chair waiting for a customer In other words, the following synchronization constraints apply Customers do the following functions in order, enter the Shop, sit on sofa, sit in the barber chair, pay, exit shop Barbers do the following: they cut hair and accept payment. Customers cannot enter the shop if the shop is at capacity. If the sofa is full, an arriving customer cannot sit on the sofa until one of the customers on the sofa sits in the barber chair. If all three barber chairs are busy, an arriving customer cannot sit in the barber chair until one of the customers in a chair pays for the hair cut The customer has to pay before the barber can accept payment. The barber must accept payment before the customer can exit shop . William Stallings presents a more complicated version of the barbershop problem, which he attributes to Ralph Hilzer at the California State University at Chico. Our barbershop has three chairs, three barbers, and a waiting area that can accommodate four customers on a sofa and that has standing room for additional customers. Fire codes limit the total number of customers in the shop to 20. A customer will not enter the shop if it is filled to capacity with other customers. Once inside, the customer takes a seat on the sofa or stands if the sofa is filled. When a barber is free, one of the customers from the sofa is served (whoever gets to the chair first) and, if there are any standing customers, one of them takes a seat on the sofa whoever gets the chance first. When a customer's haircut is finished, any barber can accept payment, but because there is only one cash register, payment is accepted for one customer at a time. The barbers divide their time among cutting hair, accepting payment, and sleeping in their chair waiting for a customer In other words, the following synchronization constraints apply Customers do the following functions in order, enter the Shop, sit on sofa, sit in the barber chair, pay, exit shop Barbers do the following: they cut hair and accept payment. Customers cannot enter the shop if the shop is at capacity. If the sofa is full, an arriving customer cannot sit on the sofa until one of the customers on the sofa sits in the barber chair. If all three barber chairs are busy, an arriving customer cannot sit in the barber chair until one of the customers in a chair pays for the hair cut The customer has to pay before the barber can accept payment. The barber must accept payment before the customer can exit shop

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Economics For Investment Decision Makers

Authors: Sandeep Singh, Christopher D Piros, Jerald E Pinto

1st Edition

1118111966, 9781118111963

More Books

Students also viewed these Finance questions