This is an implementation of "Dining Savages" problem as described in "The Little Book of Semaphores" by Allen B. Downey Version 2.1.5. Problem Description: A tribe of savages eats communal dinners from a large pot that can hold M servings of stewed missionary1. When a savage wants to eat, he helps himself from the pot, unless it is empty. If the pot is empty, the savage wakes up the cook and then waits until the cook has refilled the pot.