We present a general technique for garbage collecting old versions for multiversion concurrency control that simultaneously achieves good time and space complexity. Our technique takes only $O(1)$ time on average to reclaim each version and maintains only a constant factor more versions than needed (plus an additive term). It is designed for multiversion schemes using version lists, which are the most common. Our approach uses two components that are of independent interest. First, we define a novel range-tracking data structure which stores a set of old versions and efficiently finds those that are no longer needed. We provide a wait-free implementation in which all operations take amortized constant time. Second, we represent version lists using a new lock-free doubly-linked list algorithm that supports efficient (amortized constant time) removals given a pointer to any node in the list. These two components naturally fit together to solve the multiversion garbage collection problem--the range-tracker identifies which versions to remove and our list algorithm can then be used to remove them from their version lists. We apply our garbage collection technique to generate end-to-end time and space bounds for the multiversioning system of Wei et al. (PPoPP 2021).
翻译:我们提出了一个收集旧版本的垃圾的通用技术,用于收集旧版本的多版本货币控制,同时实现良好的时间和空间复杂度。我们的技术平均只需要O(1)美元的时间来回收每个版本,并维持比需要的更多版本的常数因子(加上一个添加词)。它设计用于使用最常见的版本列表的多版本计划。我们的方法使用两个独立感兴趣的组成部分。首先,我们定义了储存一套旧版本并有效找到不再需要的旧版本的新范围的跟踪数据结构。我们提供了一种无等待的操作,所有操作都使用摊销的固定时间。第二,我们代表版本列表使用新的无锁双联列表算法,支持高效(摊销的固定时间)清除到列表中的任何节点。这两个组成部分自然适合解决多版本垃圾收集问题 — 范围跟踪器确定了要删除的版本,然后可以使用我们的列表算法将之从版本列表列表列表中删除。我们应用垃圾收集技术来生成 WePP 和 AL 的多版本的终端到终端时间和空间框 。 (20PP21) 。