
This is an extra lab for those of you who like classic challenges. It's not that hard but it has more complexity than we have been dealing with in the class so far. You asked for it (and you know who you are).
The Chinese banquet
There are five philosophers sitting at a round table. There is a chopstick on either side of each one. There is a bottomless rice bowl in the center of the table. Each philosopher can basically eat rice or think. Now, when they are thinking, they are not eating and when they are eating, well, only so many philosophers can eat at one time since there are a limited number of chopsticks available (it takes two...).
Your job is to simulate the problem and figure out how to keep the philosophers from starving to death. Eating takes 5 units to complete and they have to eat every 25 units or they starve. The problem is to figure out how to allocate the time so that they don't starve.
Report on the various models and try and find a solution.