For the following, I'd like to know what would happen in the case below:
//global declarations
Boolean in1=false, in2=false;
Process P1::
while(1){
//entry protocol
while(in2){
in1=true;
}
//--critical section --
//exit protocol
in1=false;
}
Process P2::
while(1){
//entry protocol
in2=true;
while(in1){
in2=true;
}
//--critical section --
//exit protocol
in1=false;
}
Just a bit stumped with this at the moment, because I think it just lacks mutual exclusion - but just wanted to make sure!