Skip to content

miguelmatos-ua/semaphore_restaurant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

semaphore_restaurant

Simulation of a restaurant using semaphores.

Several groups have dinner in a restaurant that has only 2 tables, 1 receptionist, 1 waiter and a chef.

The rules are that each group goes to the receptionist who will indicate them which table they should go to, or if they should wait.

After obtaining the table, the group orders food to the waiter, waits for food and starts eating as soon as it arrives. At the end, the group contacts the receptionist again in order to pay the bill and leaves.

The waiter takes the food request to the chef and brings the food, when ready, to the table.

The chef takes the food requests from the chef and cooks it. After it is over, he signals the waiter that the food is ready.

The receptionist receives payments and attributes tables.

About

Classic restaurant problem executed with semaphores

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages