http://rosettacode.org/wiki/Dining_philosophers