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, 22.06.2019 19:40
Solve the following javafx application: write a javafx application that analyzes a word. the user would type the word in a text field, and the application provides three buttons for the following: - one button, when clicked, displays the length of the word.- another button, when clicked, displays the number of vowels in the word.- another button, when clicked, displays the number of uppercase letters in the word(use the gridpane or hbox and vbox to organize the gui controls).
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
Idon’t understand the double8 coding problem. it is java
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
Which analyst position analyzes information using mathematical models to business managers make decisions?
Answers: 1
question
Computers and Technology, 23.06.2019 21:00
Which set of steps will organize the data to only show foods with more than 100 calories and rank their sugar content from greatest to least?
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
Spanish, 24.07.2019 00:30
Questions on the website: 13722360