Question: Consider the code of two processes P 1 : while ( true ) { p = true; while ( q = = true ) {

Consider the code of two processes
P1:
while (true){
p= true;
while (q== true){
//CS
p= false;
}
}
P2:
while (true){
q= true;
while (p== true){
//CS
q= false;
}
}
Select one:
a. mutual exclusion is not satisfied but code is deadlock free
b. code might cause deadlock but mutual exclusion is satisfied
c. mutual exclusion is not satisfied and code might cause deadlock
d. Mutual exclusion is satisfied and code is deadlock free
 Consider the code of two processes P1: while (true){ p= true;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!