Question: Consider the concurrent program that consists of the following two processes that share the variable x: P 1 : x = 3 ; P 2

Consider the concurrent program that consists of the following two processes that share the variable x:
P1: x =3; P2: x =4; x = x *2; if(x ==4) x = x +6; else x = x *2+5;
What are the different values that the variable xcan have when the program terminates successfully?
Question 4Select one:
a.
6,10,12,14,17,18,20,21,22
b.
6,10,17,22
c.
4,6,10,12,16,20,21,22,23
d.
6,10
e.
6,10,17,21,22
f.
6,10,12,16,17,20,21,22,23
g.
4,6,10,12,16

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 Programming Questions!