Two processes 𝑋 and 𝑌 need to access a critical section. Consider the…

GATE · 2015 · CS · Set 3 · Computer Science & IT

Two processes 𝑋 and 𝑌 need to access a critical section. Consider the following synchronization construct used by both the processes

Here, varP and varQ are shared variables and both are initialized to false. Which one of the following statements is true?

  1. A.

    The proposed solution prevents deadlock but fails to guarantee mutual exclusion

  2. B.

    The proposed solution guarantees mutual exclusion but fails to prevent deadlock

  3. C.

    The proposed solution guarantees mutual exclusion and prevents deadlock

  4. D.

    The proposed solution fails to prevent deadlock and fails to guarantee mutual exclusion

Attempted by 353 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…