Mutual Exclusion
It is a way of making sure that if one process is using a shared variable or file; the other process will be excluded (stopped) from doing the same thing.
Methods/approach to achieve Mutual Exclusion:
- Disabling interrupts
- Shared lock variable
- Strict Alteration
- TSL (Test and Set Lock) Instruction
- Exchange Instruction
- Peterson’s Solution
- Semaphore