Thursday, April 19, 2012

Ensure if it is Mutual Exclusion or not

int turn =1


Process 1



If (turn != 0)                                      
{
Critical_Region()
noncritical_region()
turn = 0
}


Process2



if (turn !=1) {
Critical_Region()
noncritical_region()
turn =1
}


Kindly tell me that if these two processes ensures that they are mutually exclusive or not?





No comments:

Post a Comment