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 |
What?s a switch?
Describe and distinguish between FDMA, TDMA, and CDMA.
Explain Traffic shaping using token bucket algorithm
What is difference between IP address and IP protocol
where can we see the OS in the system?
working of ping and goopher?
What are the different type of networking or internetworking devices?
what is firewall?How it differs from ACLS?
Give two examples of a ‘collision-free’ protocol ?
Am planning to do a course on Remote Infrastructure Management.Is it a good field. And one more thing. Am planning to join Talent Sprint, Hyd. How good is this institute. Please help fast
1. What ports does FTP traffic travel over? 2. What ports does mail traffic utilize? 3. What ports do HTTP and HTTPS use? 4. Why is NTP required in an NFS network? 5. Name some common mal software on the server side 6. What is CPAN? How do you access it? 7. What is PEAR? 8. What advantages does mod_perl have over a perl CGI? 9. What is required to do SSL in Apache 1.x? 10. What is Tcl? 11. What is a servlet engine/container? 12. What is BIND? 13. Name the steps to setup a slave zone in BIND 14. Name the steps to setup a primary zone in BIND 15. What commands would you use under Solaris or Linux to modify/view an LDAP tree?
Differentiate between stop-and wait ARQ and Go-back-N protocol.