implementation of the standard dining philosophers problem and a solution without deadlocks