In this paper, we study the partitioning of a context-aware shared memory data structure so that it can be implemented as a distributed data structure running on multiple machines. By context-aware data structures, we mean that the result of an operation not only depends upon the value of the shared data but also upon the previous operations performed by the same client. While there is substantial work on designing distributed data structures, designing distributed context-aware data structures has not received much attention. We focus on singly-linked lists as a case study of the context-aware data structure. We start with a shared memory context-aware lock-free singly-linked list and show how it can be transformed into a distributed lock-free context-aware singly-linked list. The main challenge in such a transformation is to preserve properties of client-visible operations of the underlying data structure. We present two protocols that preserve these properties of client-visible operations of the linked list. In the first protocol, the distribution is done in the background as a low priority task, while in the second protocol the client-visible operations help the task of distribution without affecting client latency. In both protocols, the client-visible operations remain lock-free. Also, our transformation approach does not utilize any hardware primitives (except a compare-and-swap operation on a single word). We note that our transformation is generic and can be used for other lock-free context-aware data structures that can be constructed from singly-linked lists.
翻译:本文研究如何将上下文感知共享内存数据结构进行分区,使其能够作为分布式数据结构在多台机器上实现。所谓上下文感知数据结构,是指操作结果不仅取决于共享数据的值,还取决于同一客户端先前执行的操作。尽管已有大量关于分布式数据结构设计的研究,但分布式上下文感知数据结构的设计尚未得到充分关注。我们以单向链表作为上下文感知数据结构的案例进行研究。我们从共享内存的上下文感知无锁单向链表出发,展示如何将其转化为分布式无锁上下文感知单向链表。此类转化的主要挑战在于保持底层数据结构客户端可见操作的特性。我们提出了两种协议来保持链表客户端可见操作的这些特性。在第一种协议中,分布过程作为低优先级任务在后台执行;而在第二种协议中,客户端可见操作在不影响客户端延迟的情况下协助分布任务。两种协议中,客户端可见操作均保持无锁特性。此外,我们的转化方法未利用任何硬件原语(仅使用单字比较并交换操作)。我们指出,该转化方法具有通用性,可用于其他可从单向链表构建的无锁上下文感知数据结构。