Different Solutions to dining philosophers problem.
Answer Posted / 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 |
Post New Answer View All Answers
1).what is forest? 2).what is dns and dhcp port no's? 3).what is file system? 4).what is terminal server?
Define Consumer Satellite Products
Why do data link layer protocols position the checksum in the trailer and not in the header ?
What is virtual channel
Dear Sir, I have installed 40 HCL thin clients model BVX 4000 on windows 2003 server in the RDP mode, Processor is xeon 3040 1.667 GHZ, with 320 GB SATA Hard Disc and and 1 GB RAM ECC DDR II RAM , in have also expanded the RAM to 8 GB. but still the Graphics and ppt are opening in frames. please do suggest me how can i use these thin Clients to work in the normal pc mode so that the graphics( Photos .JPEG images and normal power point presentations.? Regards ather.
What are the various classes of IP addressing? Calculate the maximum number of class A, B and C network Ids.
What Equipment Do I Need for My VSAT Network?
We can use Office Communication server instead of any dialer?
What is MAC address
Write two ways in which computer applications differ from network applications ?
I have 2 networks. One is LAN & other is Tata Indicom Modem which is connected to USB. The problem is that When USB Modem is using, i am unable to use LAN. And when we use LAN, we cannot use USB Modem. kindly help me.
Hi i need one website name.Which is used to identify or find the system or person who or which are logged in to the Internet or working with Internet.We can watch and access their drives(memory) also through that website.Could you please tell me which is that website.Please answer me.Advance thanks
What are the principles that were applied to arrive at the seven layers in OSI model?
What MAU?
Differentiate between SMTP and SNMP