subject

Suppose that three different processes, P1, P2, and P3, share the variables x and y and execute the following code fragments concurrently, and that the initial value of y is 8. The instructions to add and subtract in memory are not atomic. P1: P2: P3:
x = y; x = y; x = y;
x = x + 1; x = x - 1; x = x - 1;
y = x; y = x; y = x;

Which of the following values of y are possible after all three processes finish executing their code fragments?

a. 5
b. 6
c. 7
d. 8
e. 9
f. 10

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:30
Communication is the exchange of information. true false
Answers: 2
question
Computers and Technology, 22.06.2019 16:30
Which of the following statements best describes it careers?
Answers: 2
question
Computers and Technology, 22.06.2019 19:00
If your accelerator suddenly gets stuck what should you do
Answers: 2
question
Computers and Technology, 23.06.2019 21:40
Draw the resistor’s voltage and current phasors at t=15ms. draw the vectors with their tails at the origin. the orientation of your vectors will be graded. the exact length of your vectors will not be graded.
Answers: 2
You know the right answer?
Suppose that three different processes, P1, P2, and P3, share the variables x and y and execute the...
Questions
question
Mathematics, 25.04.2021 18:40
question
Mathematics, 25.04.2021 18:40
question
Mathematics, 25.04.2021 18:50
question
Physics, 25.04.2021 18:50
question
Mathematics, 25.04.2021 18:50
Questions on the website: 13722367