Question
There are five philosophers, each has a number 0 to 4 sitting at a circular table. Initially there are ten chopsticks in the middle of
There are five philosophers, each has a number 0 to 4 sitting at a circular table. Initially there are ten chopsticks in the middle of the table. Each philosopher needs exactly three chopsticks to eat. Whenever a philosopher is hungry, he starts picking up chopsticks one at a time, where the time between picking up chopsticks can be of varying delay. A hungry philosopher keeps picking up chopsticks (and doesnt share) until he has three, then he starts eating. When he's finished eating, he puts all of his chopsticks in the middle of the table.
1) Explain a situation that would put the philosophers in a deadlock situation
2) Say the philosophers have distinct numbers for identification. Consider the following additional rule for picking up chopsticks: When there is only one chopstick left, the philosopher that has two chopsticks and has the lowest number gets this last chopstick. Prove or disprove the philosophers are deadlock free. To disprove, show a deadlock example. To prove, show which of the necessary conditions for deadlock do not hold.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started