Q1: (a) Has data-races if the while-loop reads x.j -- note: x.j is being written to in a parallel thread. (b) No data-race. (c) May throw NPE (when setting x.j.done = true) - when the processWork and clearWork are invoked on the same item. (d) No infinite loop, assuming the "job" does not do anything unexpected. Q2: Max parallelism = 2. So even if we increase the value of N, the max gain = 1 (\gamm + (1-\gamma)/2)) = 2 / (1+\gamma). Q3. S1 happens before S2 and S3. S2 and S3 run in parallel (no HB relation). S4 happens after S2 and S3. Ans (a). Q4: Assume the declaration to be an assignment statement. Do reaching definitions analysis. If none of the "definitions" reach a use then that use is "undefined". Details skipped here. Q5. False, False, True, True (in practice), True (including Entry and Exit blocks).