Question: Question 2. (1+1+3 points) Consider the following three assignment statements S1, S2, and 53: si: x = x - y; S2: y = x +

Question 2. (1+1+3 points) Consider the following three assignment statements S1, S2, and 53: si: x = x - y; S2: y = x + y; S3: x = x + y; Assume that x is initially 5 and y is initially 2. Answer the following questions. (a) If s, s2, and s3 are executed sequentially (i.e., S1; 52; 53;), what are the final values of x and y? (b) If si, s2, and s3 are executed concurrently (i.e., co si // S2 // S3 oc), are the three processes S1, S2, and s3 independent? Does S2 satisfy the at-most-once property? c) If S1, S2, and s3 are executed atomically and concurrently (i.e., co ;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
