What are your solution strategies for "Dining Philosophers
Problem" ?



What are your solution strategies for "Dining Philosophers Problem" ?..

Answer / neena lekshmi p s

the dining philosophers problem is an illustrative example
of a common computing problem in concurrency. It is a
classic multi-process synchronization problem.

The dining philosophers problem is
summarized as five philosophers sitting at a table doing one
of two things: eating or thinking. While eating, they are
not thinking, and while thinking, they are not eating. The
five philosophers sit at a circular table with a large bowl
of spaghetti in the center. A fork is placed in between each
pair of adjacent philosophers, and as such, each philosopher
has one fork to his left and one fork to his right. As
spaghetti is difficult to serve and eat with a single fork,
it is assumed that a philosopher must eat with two forks.
Each philosopher can only use the forks on his immediate
left and immediate right.

The dining philosophers problem is
sometimes explained using rice and chopsticks rather than
spaghetti and forks, as it is more intuitively obvious that
two chopsticks are required to begin eating.

The philosophers never speak to each other, which creates a
dangerous possibility of deadlock when every philosopher
holds a left fork and waits perpetually for a right fork (or
vice versa).

Originally used as a means of illustrating the problem of
deadlock, this system reaches deadlock when there is a
'cycle of unwarranted requests'. In this case philosopher P1
waits for the fork grabbed by philosopher P2 who is waiting
for the fork of philosopher P3 and so forth, making a
circular chain.

Is This Answer Correct ?    2 Yes 9 No

Post New Answer

More Operating Systems General Concepts Interview Questions

Explain how a TP Monitor manages memory and processor resources more effectively than a typical operating system.

0 Answers  


Can you tell what a device is by mac address?

0 Answers  


Which is first operating system?

0 Answers  


What are the major differences between Thread and Process?

0 Answers  


What does 64bit mean?

0 Answers  






Explain the following file systems : NTFS, Macintosh(HPFS), FAT ?

1 Answers   Ignou,


Which JVM parameter is used to control the stack size of a thread?

0 Answers  


Explain what is meant by heap?

0 Answers   BPL,


What is the difference among deadlock avoidance, detection and prevention?

1 Answers   CTS, Nokia,


Explain busy waiting in operating system (os)?

0 Answers  


What are named pipes?

3 Answers   HP,


What are the advantages of a multiprocessor system?

0 Answers  


Categories