xv6 Kernel case study Source

Tournament tree lock

Processes race up a bracket of two-process Peterson locks. Only the winner of the root enters the critical section.

processes
Tournament tree of Peterson locks