previous | start | next

Mutual Exclusion

Only one process should be accessing the critical resource at a time.

Example of violation of the mutual exclusion requirement

The original "producer" thread and "consumer" thread sharing the variable x with no synchronization is an example. The result was that the output did not reflect each change in x.



previous | start | next