Lock Hierarchy
• Hardware—memory interlock test-and-set
• Spin mutex—spin lock: software level lock for shortly
• Locks that block briefly, but may not sleep:
• Blocking mutex—spin for a while, then block on an entrance
• Pool mutex—general-use blocking mutex
• Reader-Writer locks—mutexes with shared-
exclusive semantics
• Read-mostly locks—fast access for reading