Timeline for Chandy/Misra dining philosophers solution
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 14, 2015 at 16:26 | comment | added | David Richerby | That description doesn't make sense. The Chandy-Misra paper is quite clear that there is one fork for each pair of philosophers who are contesting a particular resource. A philosopher must hold all the forks associated with a resource before s/he can access that resource. The plates of food are the resource; the forks are the locking mechanism that prevents concurrent access. (And apologies for repeatedly mis-spelling Mani Chandy's surname.) | |
May 14, 2015 at 12:59 | comment | added | Omar Sharaki | "The Chandy-Misra algorithm can be described as follows. Each shared resource between a pair of nodes is represented as a fork that may reside at either node or may be in transit from one node to another. The nodes or processes are designated as philosophers." So the resource they are competing for would be, if this article is to be believed, the forks not the food, which would make the number of plates irrelevant. | |
May 14, 2015 at 12:57 | comment | added | Omar Sharaki | I don't want to make this an extended chat, but in reply to your last comment in the section above where you said "So, for example, if five philosophers want a single dish, there are ten forks just for that dish, plus other forks for other dishes. A phil. can only eat from a dish if he has all its forks." I'd like to point out that a philosopher can only communicate with his neighbors i.e only 2 phils. If he needs 10 forks as you say then what's he supposed to do? Also in reply to what you said about the shared resources being the food, regard this quote: | |
May 14, 2015 at 12:14 | vote | accept | Omar Sharaki | ||
May 13, 2015 at 11:00 | comment | added | David Richerby | I've now fixed the answer. | |
May 13, 2015 at 10:51 | history | edited | David Richerby | CC BY-SA 3.0 |
Corrected.
|
May 13, 2015 at 10:46 | review | Low quality posts | |||
May 13, 2015 at 10:52 | |||||
May 13, 2015 at 10:45 | history | edited | David Richerby | CC BY-SA 3.0 |
deleted 453 characters in body
|
May 13, 2015 at 10:45 | comment | added | David Richerby | Sorry, yes, I've completely messed this up. I'm sorry for taking a somewhat dismissive tone while being wrong myself. I'll rewrite the answer. (In the mean time, take this as a warning against the power of metaphor. To me, the clean/dirty fork thing implied that philosophers, being very civilized, would only eat with clean forks. I'd assumed that everyone starting with a dirty fork led to a starting transient where people have to swap forks for a bit until somebody has two clean ones, but this is not the case.) | |
May 13, 2015 at 10:36 | comment | added | Omar Sharaki | Also philosopher 5 should have no forks since he has the highest id, meaning philosophers 4 and 1 took the forks around him. I think the scenario after 3 requests a fork from 4 should be as follows: 1 has 2 forks(both dirty), 2 has 1 dirty fork, 3 has 2 forks(one dirty one clean), 4 has none, five has none. This means 2 philosphers, namely 1 and 3, have 2 forks and are thus ready to eat. Am I right? | |
May 13, 2015 at 10:23 | comment | added | Omar Sharaki | If 3 has 2 forks doesn't that mean he can eat? | |
May 13, 2015 at 10:10 | history | answered | David Richerby | CC BY-SA 3.0 |