Augmenting an existing sequential data structure with extra information to support greater functionality is a widely used technique. For example, search trees are augmented to build sequential data structures like order-statistic trees, interval trees, tango trees, link/cut trees and many others. We study how to design concurrent augmented tree data structures. We present a new, general technique that can augment a lock-free tree to add any new fields to each tree node, provided the new fields' values can be computed from information in the node and its children. This enables the design of lock-free, linearizable analogues of a wide variety of classical augmented data structures. As a first example, we give a wait-free trie that stores a set $S$ of elements drawn from $\{1,\ldots,N\}$ and supports linearizable order-statistic queries such as finding the $k$th smallest element of $S$. Updates and queries take $O(\log N)$ steps. We also apply our technique to a lock-free binary search tree (BST), where changes to the structure of the tree make the linearization argument more challenging. Our augmented BST supports order statistic queries in $O(h)$ steps on a tree of height $h$. The augmentation does not affect the asymptotic running time of the updates. For both our trie and BST, we give an alternative augmentation to improve searches and order-statistic queries to run in $O(\log |S|)$ steps (with a small increase in step complexity of updates). As an added bonus, our technique supports arbitrary multi-point queries (such as range queries) with the same time complexity as they would have in the corresponding sequential data structure.
翻译:增强现有顺序数据结构以支持更多功能是一种广泛应用的技术。例如,搜索树被增强以构建顺序数据结构,如顺序统计树、区间树、探戈树、链接/切割树等。我们研究如何设计并发的增强树数据结构。我们提出了一种新的通用技术,该技术可以增强无锁树,为每个树节点添加任何新字段,前提是新字段的值可以从节点及其子节点的信息中计算得出。这使得能够设计各种经典增强数据结构的无锁、可线性化对应物。作为第一个示例,我们给出了一种无等待的字典树,它存储从$\{1,\ldots,N\}$中抽取的元素集合$S$,并支持可线性化的顺序统计查询,例如查找$S$中第$k$小的元素。更新和查询需要$O(\log N)$步。我们还应用我们的技术到无锁二叉搜索树(BST)上,其中树结构的变化使得线性化论证更具挑战性。我们的增强BST支持在高度为$h$的树上以$O(h)$步进行顺序统计查询。这种增强不会影响更新的渐近运行时间。对于我们的字典树和BST,我们给出了一种替代增强方法,以改进搜索和顺序统计查询,使其在$O(\log |S|)$步内运行(同时更新步骤复杂度略有增加)。作为额外收获,我们的技术支持任意多点查询(如范围查询),其时间复杂度与对应顺序数据结构中的相同。