Sargam Asked a Question
May 19, 2022 2:01 pmpts 30 pts
Ques. Iwo Process X &y necd to access a CS. Consider the following - Processy Process X while (tue) Var Q = true. var P= true; while (Var P = = true) while (Var Q = = true) CS CS Var P = false Var Q = false Here varP and varQ are shared variables and both are initialized to false. Which one of the (A) Proposed solution guarantee that there is no deadlock but no mutual exclusion. (B) It guarantees mutual exclusion but fails to prevent deadlock (C) guarantees both deadlock and mutual exclusion.
  • 1 Answer(s)
  • Shares
  • Aparna 1 thankyou
    When both processes try to enter critical section simultaneously , both are allowed to do so since both shared variables var P and var Q are true. So it is very clear that there i...
    Show more
    • cropped8615065390791220915.jpg
    Likes(0) Reply(0)