Different Solutions to dining philosophers problem.
Answer / anubhav agrawal
One solution would be to banish a philosopher from the
table, thus emptying a seat. This leaves five chopsticks
for four people, so at least one of the philosophers will
be able to eat; thus, no deadlock. This means that each
system must have more resources available than tables, in
essence.
Another solution is to say that a philosopher can only pick
up chopsticks if both are available, and then only if the
neighbors are not going to pick them up. This is a
permissive style that causes some extra slowdown by adding
the step of permissions, but it keeps all of the
philosophers alive, which is the most important thing.
A third solution is an asymmetric one: number the
philosophers starting at an arbitrary chair and continuing
around the table. Then, a philosopher with an odd number
picks up the left chopstick and then the right, and the
even numbered philosophers pike up the right chopstick and
then the left. Thus, philosophers 2, 3, and 4 only can be
missing a pair if one of the two people at their sides are
actually eating (not just waiting), thus making sure a
deadlock is impossible.
There are countless more possible solutions to the dining-
philosophers problem. The primary factor in deciding if a
solution is good or not is to make sure that there are no
deadlocks or long pauses in the procedure; in other words,
a good solution makes sure a philosopher doesn't starve to
death.
Solutions to this problem show up regularly in all sorts of
areas, from biology to psychology to computer science. The
problem of synchronization is a fundamental one in our
world, and the dining-philosophers problem addresses it
simply, clearly, and directly
Is This Answer Correct ? | 12 Yes | 0 No |
Tell the correct definition of router, hub and switch and where do we use these?
a node has the ip address 138.50.10.7 and 138.50.10.9. But it is transmitting data from node1 to node2 only. The reason may be a)a node cannot have more than one address b)class A should have second octet different c)classB " " " " " d)a,b,c
I need to know the driver name associated with the DSN ? In java we can get it by using getDriverName()(implemented by 3rd party vendors.) method ? but i need the implemetation to get the driver name? so can u give me the code ? how to get the code ?
what is frame realy
IN MY SYSTEM IAM USING VM WARE I INSTALLED 2003 SREVER AND TWO CLIENTS USING SAME 2003SERVER NOW I WOULD LIKE TO INSTALL EXCHANGE SREVER IN MY VM WARE IS IT POSSIBLE IF IT IS PLEASE SHOW ME A ROOT HOW CAN I
What is virtual channel
What are some of the basic steps taken while troubleshooting blue screen errors in win xp?
What is packet switching ? Explain two different approaches of packet switching. ?
Why is IP called ‘best-effort delivery’ protocol?
what is active directory?
Which is better Router or Layer 3 switch?How.
hi,i want to do the certification course in ethical hacking& hacking....wats is the difference...can any one suggest the good institutes.....wat r the fee particulars.....wat job opportunitie will be there? thanks in advance