Summary of Techniques for Critical Section Problem
Software
- Peterson's Algorithm: based on busy waiting
- 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
- Monitors: programming language technique.
Hardware
- Exclusive access to memory location
- always assumed
- Interrupts that can be turned off
- must have only one processor for mutual exclusion
- Test-and-Set: special machine-level instruction
- Swap: atomically swaps contents of two words
0 comments:
Post a Comment