Introduction - If you have any usage issues, please Google them yourself
Use semaphores method dining philosophers problem of deadlock avoidance, the philosopher into three states, thinking, hunger, eating only when both sides of a philosopher chopsticks are available, only allowing him to use chopsticks, and a get two chopsticks, or do not take