Question

The dining philosopher’s problem with N=6 philosophers (philosophers 0...5 or threads T0...T5). Assume that T3 is...

  1. The dining philosopher’s problem with N=6 philosophers (philosophers 0...5 or threads T0...T5). Assume that T3 is the first to attempt to eat(), immediately followed by T5, and T4 (before T3 finishes eating). Analyze this situation in detail (and show steps) to determine if and how the solution works.

Homework Answers

Answer #1

Sol.

Assume that p3 Pick left fork first and before finishing p3, p5 pick right fork then p4 will wait for finishing p3 and p5 to eat. os if p3 pick left fork and before finishing p3 , p5 pick right and other philosopher pick their left fork then deaklock will occur.becuase p4 willl starve.

So, the right sequence will be ..

If p3 pick left fork then p4 will pick left fork before p5 to prevent from the deadlock..

So either follow the clock sequqnce or anticlock sequence to avoid the deadlock or starving...

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions