Computers and Technology

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

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:50, Isaiahtate053
Write a 3-4 page apa formatted paper comparing your organization’s it strategy with the best practices outlined in your course text. content should include, but not be limited to: developing and delivering on the it value, developing it strategy for the business value and linking it to business metrics. your paper should include an abstract and a conclusion and a reference page with 3-5 references
Answers: 1
image
Computers and Technology, 22.06.2019 15:30, mariap3504
Whats are the different parts of no verbal comunication, especially body language?
Answers: 3
image
Computers and Technology, 22.06.2019 21:00, daniella0123
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings starting from index 0. for each match, add one point to userscore. upon a mismatch, exit the loop using a break statement. assume simonpattern and userpattern are always the same length. ex: the following patterns yield a userscore of 4: simonpattern: rrgbryybgy userpattern: rrgbbrybgy
Answers: 2
image
Computers and Technology, 23.06.2019 03:50, dondre54
Q-1 which of the following can exist as cloud-based it resources? a. physical serverb. virtual serverc. software programd. network device
Answers: 1
Do you know the correct answer?
Suppose that three different processes, P1, P2, and P3, share the variables x and y and execute the...

Questions in other subjects:

Konu
Mathematics, 24.09.2020 14:01