PPT Slide
Disabling Interrupts
- Fast!
- No busy waiting!
- Uniprocessor-only solution!
- Best solution for a single processor (with the exception you don’t want the interrupts to be disable-able within user mode).
Using ExchangeWord()
- Busy waiting :(
- Requires hardware assistance (memory subsystem) :(
- Works with multiple processors!
- Best solution for shared memory multiprocessors.
Peterson’s algorithm (software-only solution)
- Busy waiting :(
- No hardware assistance required!
- Works with multiple processors!
- Best solution for distributed systems with no centralized control.