subject

What are the disadvantages of Peterson’s solution for critical-section problem? Code below shows the solution to two process mutual exclusion problem. Process Pi
do {
flag[i] = true;
turn = j;
while (flag[j] && turn == j);
critical section
flag[i] = false;
remainder section
} while (true);
Process Pj
do {
flag[j] = true;
turn = i;
while (flag[i] && turn == i);
critical section
flag[j] = false;
remainder section
} while (true);

Answer True or False to the following questions:

a. This algorithm satisfies the "mutual exclusion", "progress" and "bounded waiting" condition.
b. This algorithm has a flaw as the variable "turn" can be modified by both processes at the same time.
c. This algorithm may cause "deadlock" if both processes set their flags to True at the same time.
d. This algorithm satisfies only the "mutual exclusion" and "progress" condition

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 13:30
Spoons are designed to be used for: spring hammering. applying body filler. identifying high and low spots. sanding highly formed areas.
Answers: 3
question
Computers and Technology, 23.06.2019 21:10
Asample of 200 rom computer chips was selected on each of 30 consecutive days, and the number of nonconforming chips on each day was as follows: 8, 19, 27, 17, 38, 18, 4, 27, 9, 22, 30, 17, 14, 23, 15, 14, 12, 20, 13, 18, 14, 20, 9, 27, 30, 13, 10, 19, 12, 26. construct a p chart and examine it for any out-of-control points. (round your answers to four decimal places.)
Answers: 2
question
Computers and Technology, 24.06.2019 05:30
Hey i really need some solving this problem: 1. encrypt this binary string into cipher text: 110000. include in your answer the formula the decoder would use to decrypt your cipher text in the format (coded answer) x n mod (m) = y & 2. decrypt this cipher text into a binary string: 106 you.
Answers: 2
question
Computers and Technology, 24.06.2019 16:00
Which of the following characters is acceptable to use in a filename? ? / – %
Answers: 1
You know the right answer?
What are the disadvantages of Peterson’s solution for critical-section problem? Code below shows the...
Questions
question
Medicine, 13.11.2020 21:00
question
Mathematics, 13.11.2020 21:00
question
Mathematics, 13.11.2020 21:00
question
Mathematics, 13.11.2020 21:00
question
Mathematics, 13.11.2020 21:00
question
Mathematics, 13.11.2020 21:00
question
History, 13.11.2020 21:00
Questions on the website: 13722360