What is the problem of dining philosophers?

The problem of philosophers of eating is a thought experiment or an example used in computer science. The problem uses an analogy to illustrate synchronization problems that may occur when computers share resources. Computer scientists use problems with dining philosopher to teach students about algorithms used to solve these problems.

The scenario of a dining philosopher is a circular table on which five philosophers sit. In the middle of the table is a bowl of noodles or other food. Each philosopher has one fork or chopstick on both sides, which means there are five forks or wands. The philosopher needs two tools to eat. Every philosopher must also spend some time thinking and cannot think and eat at the same time. The heart of a dining philosopher problem is the difficulty of prevention of blocking.

Blocking in this problem occurs when the philosophers get to a position where they cannot think of nasto. For example, if every philosopher should pick up the equipment on his left, no one would be withCHOPEN Eat, because all tools would be used, but no philosopher would have two. In order to eat all philosophers, the student must create an algorithm that ensures that some philosophers eat while others think. This allows meals and thinking to continue without stopping.

There are a number of possible solutions to the problem of dining philosophers. One solution includes the creation of a sixth figure, a waiter who provides or denies permission to philosophers to pick up their forks. Others include regulating the order in which the philosophers pick up and postpone their forks to maximize availability. Others involve speech to philosophers to check that their neighbors eat before trying to eat. Each solution essentially includes the development of a set of rules, called an algorithm that follows when philosophers think, eat or pick up and postpone their dishes.

the problem with the dining philosopher was the first time expressedThe Dutch computer scientist Edsger Dijkstra in 1965 as a question for students. Since then, the problem has undergone a number of changes. It appears in a number of slightly different formats, some of which only change the details of the story, but others that suggest further limitation of the problem to show difficult concepts. The most common modern version was created by Tony Hoare.

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?