Question: Hotel Simulation A hotel is simulated by using threads and semaphores to model customer and employee behavior. This project is similar to the barbershop example
Hotel Simulation A hotel is simulated by using threads and semaphores to model customer and employee behavior. This project is similar to the "barbershop" example in the textbook. The following rules apply: Overview The hotel to be simulated has two employees at the front desk to register guests and two bellhops to handle guests' bags. A guest will first visit the front desk to get a room number. The front desk employee will find an available room and assign it to the guest. If the guest has less than 3 bags, the guest proceeds directly to the room. Otherwise, the guest visits the bellhop to drop off the bags. The guest will later meet the bellhop in the room to get the bags, at which time a tip is given. Threads: Guest: 1) 25 guests visit the hotel (1 thread per guest created at start of simulation). 2) Each guest has a random number of bags (0-5)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
