面向同步的精简指令集
Towards Reduced Instruction Sets for Synchronization
摘要:
与通常的看法相反,Ellen、Gelashvili、Saught和Zhu最近的一项工作表明,可计算性不需要多核架构来支持“强”同步指令,如比较和交换,而不是“弱”指令的组合,如递减和乘法。然而,这是现状,反过来,最有效的并发数据结构严重依赖于比较和交换(例如,摆动指针和一般冲突解决)。我们表明,这不需要的情况下,通过设计和实现一个并发线性日志数据结构(也称为历史对象),支持两个操作:append(item),它将项目追加到日志,和get-log(),它返回追加的项目,到目前为止,按顺序。读取器是无等待的,写入器是无锁的,并且这种数据结构可以用于无锁的通用构造中,以实现具有给定顺序规范的任何并发对象。我们的实现使用原子读取,异或,递减和提取和增量指令上支持的X86架构,并提供类似的性能比较和交换为基础的解决方案在今天的硬件。这就提出了一个关于架构必须支持的最小同步指令集的基本问题。
英文摘要:
Contrary to common belief, a recent work by Ellen, Gelashvili, Shavit, and Zhu has shown that computability does not require multicore architectures to support "strong" synchronization instructions like compare-and-swap, as opposed to combinations of "weaker" instructions like decrement and multiply. However, this is the status quo, and in turn, most efficient concurrent data-structures heavily rely on compare-and-swap (e.g. for swinging pointers and in general, conflict resolution). We show that this need not be the case, by designing and implementing a concurrent linearizable Log data-structure (also known as a History object), supporting two operations: append(item), which appends the item to the log, and get-log(), which returns the appended items so far, in order. Readers are wait-free and writers are lock-free, and this data-structure can be used in a lock-free universal construction to implement any concurrent object with a given sequential specification. Our implementation uses atomic read, xor, decrement, and fetch-and-increment instructions supported on X86 architectures, and provides similar performance to a compare-and-swap-based solution on today's hardware. This raises a fundamental question about minimal set of synchronization instructions that the architectures have to support.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。