动态连接可并行LL/SC和CAS的持久算法
Durable Algorithms for Writable LL/SC and CAS with Dynamic Joining
摘要:
我们提出了持久的实现两个众所周知的通用原语- CAS(比较和交换),和它的ABA自由的对等部分LLSC(加载链接,存储条件)。我们所有的实现都是:可写,意味着它们支持Write()操作;每个操作的时间复杂度不变;允许动态连接,意味着新创建的进程(也称为任意名称的线程)可以加入协议并访问我们的实现;并且具有自适应空间复杂度,这意味着空间使用在实际使用对象的进程$n$的数量上成比例,这与为最大数量的进程$N$设计的先前协议相反。我们的持久可扩展CAS实现DuraCAS需要$O(m + n)$空间来支持$n$进程访问的$m$对象,从而改进了最先进的$O(m + N^2)$。根据定义,LLSC对象除了存储对象值之外,还必须存储“上下文”。我们的可扩展LLSC实现DuraLL需要$O(m + n + C)$空间,其中$C$是跨所有对象存储的“上下文”的数量。虽然LLSC由于不使用ABA而比CAS具有优势,但对象定义似乎需要额外的空间使用。为了解决这个问题,我们定义了LLSC的外部上下文(EC)变体。我们的EC可扩展LLSC实现是免ABA的,并且具有仅为$O(m + n)$的空间复杂度。据我们所知,我们是第一个提出持久的CAS算法,允许动态加入,我们的算法是第一个表现出自适应空间复杂度。据我们所知,我们是第一个实现任何类型的持久LLSC对象的公司。
英文摘要:
We present durable implementations for two well known universal primitives -- CAS (compare-and-swap), and its ABA-free counter-part LLSC (load-linked, store-conditional). All our implementations are: writable, meaning they support a Write() operation; have constant time complexity per operation; allow for dynamic joining, meaning newly created processes (a.k.a. threads) of arbitrary names can join a protocol and access our implementations; and have adaptive space complexities, meaning the space use scales in the number of processes $n$ that actually use the objects, as opposed to previous protocols which are designed for a maximum number of processes $N$. Our durable Writable-CAS implementation, DuraCAS, requires $O(m + n)$ space to support $m$ objects that get accessed by $n$ processes, improving on the state-of-the-art $O(m + N^2)$. By definition, LLSC objects must store "contexts" in addition to object values. Our Writable-LLSC implementation, DuraLL, requires $O(m + n + C)$ space, where $C$ is the number of "contexts" stored across all the objects. While LLSC has an advantage over CAS due to being ABA-free, the object definition seems to require additional space usage. To address this trade-off, we define an External Context (EC) variant of LLSC. Our EC Writable-LLSC implementation is ABA-free and has a space complexity of just $O(m + n)$. To our knowledge, we are the first to present durable CAS algorithms that allow for dynamic joining, and our algorithms are the first to exhibit adaptive space complexities. To our knowledge, we are the first to implement any type of durable LLSC objects.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。