Consider a dinner table where n dining philosophers are seated.
Each
philosopher has a plate of food; however, there is only a single
eating-utensil placed
in the center of the table. Eating is done at discrete rounds. At
the beginning of
each round, if a philosopher wishes to eat, she may attempt to
obtain the utensil
from the center of the table. If the philosopher obtains the
utensil, she eats for the
duration of the round (i.e., only one philosopher may eat during
any given round)
and then places the utensil back at the table center at the end of
the round. If
two or more philosophers attempt to obtain the utensil at the
beginning of the
same round, then no philosopher will eat during that round (i.e.,
no one obtains the
utensil); thus, if all the philosophers try to access the utensil
on every round, no
philosopher would ever eat.
One way to avoid the starvation of these philosophers is to use
randomization. A
possible simple randomized algorithm is to have each philosopher
attempt to obtain
the utensil at any given round with probability p > 0. Assume
that each philosopher
uses the same probability p.
a) What is the probability (in terms of p) that a philosopher is
able to successfully
eat during any given single round?
b) What value of p maximizes this probability?
c) Using the probability from Part b, what is the probability that
a philosopher
does not successfully obtain the utensil after k consecutive
rounds?
ANSWER:
AS PER THE GIVEN INFORMATION:
FOR A:
p*(1-p)^n
FOR B:
p = 1/n
FOR C:
[(1- 1/n)^n ]/n
Please Kindly Thumbs up for this answer. If any doubts feel free to query. Thank you
Consider a dinner table where n dining philosophers are seated. Each philosopher has a plate of...
3. Consider the variation of the Dining Philosophers problem shown in Figure 6.17, where all unused chopsticks are placed in the center of the table and any philosopher can eat with any two chopsticks. One way to prevent deadlock in this system is to provide sufficient resources. For a system with n philosophers, what is the minimum number of chopsticks that ensures deadlock freedom? Why? Owned by Philosopher Waiting for hopsticks / Philosopher Philosopher Waiting for Owned by Owned by...
Which clinical evidence indicates that cirrhosis has not
developed in this patient as a result of cystic fibrosis?
CASE STUDY CYSTIC FIBROSIS Berial mised o For the Disease Summary for this case study se the CD-ROM this PATIENT CASE cient lent Patient's Chief Complaints Provided by patient's mother: "I noticed a let-down in T's exercise tolerance level a week ago and the last couple of days his cough and sputum production have gotten much worse. When he started having breathing...
microbiology help
TOT Zoo Add Page Insert Table Chart Text Shape Media Comment These questions will serve in lieu of a lab report for Exercise 15, 16, and 17 You will find the answer to these questions in the background, procedure, results and interpretation sections of manual Exercise 15, 16, and 17, videos, Actions of Selective and Differential Media Chart, and the Principle/Theory article in homework section.) General Questions 1. What is the purpose (function) of selective media? (How does...