We study the psync complexity of concurrent sets in the non-volatile shared memory model. Flush instructions are used in non-volatile memory to force shared state to be written back to non-volatile memory and must typically be accompanied by the use of expensive fence instructions to enforce ordering among such flushes. Collectively we refer to a flush and a fence as a psync. The safety property of strict linearizability forces crashed operations to take effect before the crash or not take effect at all; the weaker property of durable linearizability enforces this requirement only for operations that have completed prior to the crash event. We consider lock-free implementations of list-based sets and prove two lower bounds. We prove that for any durable linearizable lock-free set there must exist an execution where some process must perform at least one redundant psync as part of an update operation. We introduce an extension to strict linearizability specialized for persistent sets that we call strict limited effect (SLE) linearizability. SLE linearizability explicitly ensures that operations do not take effect after a crash which better reflects the original intentions of strict linearizability. We show that it is impossible to implement SLE linearizable lock-free sets in which read-only (or search) operations do not flush or fence. We undertake an empirical study of persistent sets that examines various algorithmic design techniques and the impact of flush instructions in practice. We present concurrent set algorithms that provide matching upper bounds and rigorously evaluate them against existing persistent sets to expose the impact of algorithmic design and safety properties on psync complexity in practice as well as the cost of recovering the data structure following a system crash.
翻译:我们研究了非易失性共享内存模型中并发集合的同步屏障复杂度。在非易失性内存中,冲洗指令用于强制将共享状态写回非易失性内存,且通常需要配合使用昂贵的屏障指令来强制执行此类冲洗操作的顺序。我们将冲洗和屏障统称为同步屏障。严格线性化安全属性要求崩溃操作要么在崩溃前生效,要么完全不生效;而更弱的持久线性化属性仅对崩溃事件前已完成的操作强制执行此要求。我们研究了基于链表的无锁集合实现并证明了两个下界。我们证明:对于任何持久线性化无锁集合,必然存在某个执行序列,其中某个进程在更新操作中至少需要执行一次冗余同步屏障。我们引入了一种针对持久集合的严格线性化扩展,称为严格有限效应线性化。严格有限效应线性化明确确保操作在崩溃后不会生效,这更好地反映了严格线性的原始设计意图。我们证明了不可能实现读操作(或搜索操作)无需冲洗或屏障的严格有限效应线性化无锁集合。我们开展了关于持久集合的实证研究,考察了各种算法设计技术以及冲洗指令在实际场景中的影响。我们提出了提供匹配上界的并发集合算法,并与现有持久集合进行严格评估,以揭示算法设计和安全属性对实际同步屏障复杂度的影响,以及在系统崩溃后恢复数据结构的成本。