I entered into a discussion with a friend on the following question, which asks if mutual exclusion holds:
Consider two processes:
$s_1$ and $s_2$ are two variables, set equal initially.
P1:
while $s_1 = s_2$: wait.
/execute critical section/
$s_1$ is set such that it is not equal to $s_2$
P2:
while $s_1 = s_2$: wait.
/execute critical section/
$s_1$ is set such that it is not equal to $s_2$
My friend argues that mutual exclusion holds. His explanation:
Mutual Exclusion holds if the following implication holds: If a process is in its critical section, then other processes should not be allowed in their critical sections.
Consider this implication as $P \to Q$. He argues that since the premise $P$ is wrong (because none of P1 and P2 are in their critical sections), the implication is true and hence mutual exclusion holds.
Whereas my thinking is that when none of the processes get to enter their critical section, talking about mutual exclusion is pointless and hence the property doesn't hold.
Is the implication way of thinking the correct approach? I feel that it's not, but I have not been able to prove my intuition.