Consider the following C code: Assume p1 and p2 are two concurrent processes…

Consider the following C code:

Assume p1 and p2 are two concurrent processes that share the global variables x, y and z. Assignment and condition checks are atomic functions. Which of the following is false about p1 and p2:

  1. A.

    p1 terminates but p2 does not

  2. B.

    p1 and p2 both terminates

  3. C.

    p2 terminates but p1 does not

  4. D.

    both does not terminates

Attempted by 121 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…