i wrote 2 processes in order to satisfy mutual exclusion but om not sure if it is.. my initial flag value is 0.
process 1
while(1){
while flag=1 do{-nothing-}
flag=1
-enter critical section-
flag=0
}
process 2
while(1){
while flag=1 do{-nothing-}
flag=1
-enter critical section-
flag=0
}
in fact they are exactly the same. does those 2 processes satisfy the mutual exclusion? i cant see what requirement is violated..