Question: Assume two processes are modifying a shared variable in memory ( call it x ) as shown below. Assuming the initial value of x is

Assume two processes are modifying a shared variable in memory (call it x) as shown below.
Assuming the initial value of x is 4, answer the following two questions.
What value will x hold after both process finish execution, given that S was initialized to 2.
(a)3
(b)4
(c)5
(d) Any of the above
(e) Cannot be determined
What value will x hold after both process finish execution, given that S was initialized to 1.
(a)3
(b)4
(c)5
(d) Any of the above
(e) Cannot be determined
 Assume two processes are modifying a shared variable in memory (call

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!