Write a solution to the Dining Philosophers problem in which each philosopher is allowed to pick up his chopsticks only if both of them are available. Note that the easiest way to do this would be to introduce a monitor for the chopsticks semaphores, and modify the values of the chopsticks array only in a critical section.