A powerful tool for designing complex concurrent programs is through composition with object implementations from lower-level primitives. Strongly-linearizable implementations allow to preserve hyper-properties, e.g., probabilistic guarantees of randomized programs. However, the only known wait-free strongly-linearizable implementations for many objects rely on compare&swap, a universal primitive that allows any number of processes to solve consensus. This is despite the fact that these objects have wait-free linearizable implementations from read / write primitives, which do not support consensus. This paper investigates a middle-ground, asking whether there are wait-free strongly-linearizable implementations from realistic primitives such as test&set or fetch&add, whose consensus number is 2. We show that many objects with consensus number 1 have wait-free strongly-linearizable implementations from fetch&add. We also show that several objects with consensus number 2 have wait-free or lock-free implementations from other objects with consensus number 2. In contrast, we prove that even when fetch&add, swap and test&set primitives are used, some objects with consensus number 2 do not have lock-free strongly-linearizable implementations. This includes queues and stacks, as well as relaxed variants thereof.
翻译:设计复杂并发程序的一个强大工具是通过使用低层级原语的对象实现进行组合。强线性izability实现能够保留超属性,例如随机化程序的概率保证。然而,许多对象已知的唯一无等待强线性izability实现依赖于比较并交换(compare&swap)这一通用原语,它允许任意数量的进程解决共识问题。尽管这些对象已有基于读写原语(不支持共识)的无等待线性izability实现,但这一现状仍然存在。本文探究了一个中间地带,即是否存在基于测试并设置(test&set)或取并加(fetch&add)等现实原语(其共识数为2)的无等待强线性izability实现。我们证明,许多共识数为1的对象可通过取并加实现无等待强线性izability实现。此外,我们还表明,若干共识数为2的对象可通过其他共识数为2的对象实现无等待或免锁实现。相反,我们证明即使使用了取并加、交换(swap)和测试并设置原语,某些共识数为2的对象(包括队列、栈及其松弛变体)也不存在免锁强线性izability实现。