一种简单高效的无锁Hash Trie并行表设计
A Simple and Efficient Lock-Free Hash Trie Design for Concurrent Tabling
摘要:
并发制表系统实现中的一个关键部分是表空间的设计。表示表的最成功的建议之一是基于两级trie数据结构,其中一个trie级存储表中的子目标调用,另一个存储计算的答案。在这项工作中,我们提出了一个简单而有效的无锁设计,这两个层次的尝试可以在并发环境中的线程之间共享。为了实现锁自由,我们利用了CAS原子指令,现在可以在许多常见的体系结构中广泛找到。当线程访问并发区域时,CAS降低了同步的粒度,但仍然存在低级问题,如错误共享或缓存内存副作用。为了在表空间数据结构上的并发搜索和插入操作中尽可能有效,我们将我们的设计基于哈希trie数据结构,通过尽可能多地分散并发区域来最小化潜在的低级同步问题。在Yap Prolog系统上的实验结果表明,新的无锁hash trie设计可以有效地减少执行时间和规模优于以前的设计。
英文摘要:
A critical component in the implementation of a concurrent tabling system is the design of the table space. One of the most successful proposals for representing tables is based on a two-level trie data structure, where one trie level stores the tabled subgoal calls and the other stores the computed answers. In this work, we present a simple and efficient lock-free design where both levels of the tries can be shared among threads in a concurrent environment. To implement lock-freedom we took advantage of the CAS atomic instruction that nowadays can be widely found on many common architectures. CAS reduces the granularity of the synchronization when threads access concurrent areas, but still suffers from low-level problems such as false sharing or cache memory side-effects. In order to be as effective as possible in the concurrent search and insert operations over the table space data structures, we based our design on a hash trie data structure in such a way that it minimizes potential low-level synchronization problems by dispersing as much as possible the concurrent areas. Experimental results in the Yap Prolog system show that our new lock-free hash trie design can effectively reduce the execution time and scale better than previous designs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。