Thursday 22 September 2011

Solutions for Critical Section Problem




Summary of Techniques for Critical Section Problem

Software
  1. Peterson's Algorithm: based on busy waiting
  2. Semaphores: general facility provided by operating system (e.g., OS/2)
    • based on low-level techniques such as busy waiting or hardware assistance
    • described in more detail below
  3. Monitors: programming language technique.

Hardware
  1. Exclusive access to memory location
    • always assumed
  2. Interrupts that can be turned off
    • must have only one processor for mutual exclusion
  3. Test-and-Set: special machine-level instruction
  4. Swap: atomically swaps contents of two words

0 comments:

Post a Comment