Operating System (2140702)

BE | Semester-4   Winter-2018 | 10-12-2018

Q2) (a)

What is mutual exclusion? List out various methods/approach to achieve it.

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