Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

If the transmitted code word is 10011000 and the received code word is 11001001. What is the error word ? Write transmitted code word , received code word and error word as polynomials.

2973


Define Consumer Satellite Products

1194


Explain Various fields in Ethernet frame format

1617


What is the function of data link layer?

1170


What is the difference between TFTP and FTP application layer protocols?

21123


when I issue the "show ip route bgp" command, I see my routes being learned via ospf and bgp. How can I verify on the nx-os which one will always be used and which one is a backup?

1094


Why transport layer protocols like TCP and UDP are called end-to-end protocols. What is the difference between them?

3208


Write a short note on ISDN?

1928


If i want to crack any serial key using system information then how can i do it? Is it possible?

2423


Can you name all the physical layers in networking?

1124


Explain the advantage and disadvantage of ethernet ?

2448


Why does ATM use the cell of small and fixed length ?

2594


Compare satellite with fiber as a communication medium and enumerate the application areas where satellite still holds a niche(or special)marker.

1743


Differentiate between Link state and Distance Vector Routing algorithm.

1663


Outline and discuss the main fields in Ethernet IEEE 802.3 frame. What are the main objectives of preamble ?

1873