Algorithms for scalable synchronization on shared-memory multiprocessors这篇论文中，CLH锁之前还提到了另外一个锁算法。

## 凭证锁(The Ticket Lock)

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20   public class TicketLock { private final AtomicLong nextTicket = new AtomicLong(0); private final AtomicLong nowServing = new AtomicLong(0); public void lock() { long myTicket = nextTicket.getAndIncrement(); while (true) { //只为了表达算法，没catch异常 Thread.sleep(myTicket - nowServing.get()); if (nowServing.get() == myTicket) { return; } } } public void unlock() { nowServing.incrementAndGet(); } } 

“Exponential backoff is an algorithm that uses feedback to multiplicatively decrease the rate of some process, in order to gradually find an acceptable rate”

The Ticket Lock之后还有Array-Based Queuing Locks，但由于基于数组的队列锁，性能更不理想，所以就略过了。

Array-Based Queuing Locks之后就是 List-Based Queuing Lock 计算机多内核平台上的并发锁优化(一)中讲到的CLH锁和MCS锁都是基于链表队列实现的。

## 栅栏(BARRIERS)

• 1、a rule, problem etc that prevents people from doing something, or limits what they can do
• 2、a type of fence or gate that prevents people from moving in a particular direction
• 3、a physical object that keeps two areas, people etc apart