arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1608.00989cs.PL
收藏

多线程Prolog的无锁原子垃圾回收

Lock-free atom garbage collection for multithreaded Prolog

Jan Wielemaker, Keri Harris

摘要:

动态语言(如Prolog或Lisp及其衍生物)的运行时系统包含一个符号表,在Prolog中通常称为原子表。一个简单的动态哈希表曾经是实现这个表的一个合适的方法。随着Prolog在24x7服务器进程中的流行,我们需要处理原子垃圾回收和对原子表的并发访问。经典的基于锁的实现,以确保原子表的一致性伸缩性差,停止世界的方法来实现原子垃圾回收很快成为瓶颈,使Prolog不适合软实时应用程序。在本文中,我们描述了一种使用无锁技术的原子表的新颖实现,其中原子表即使在原子垃圾回收期间也保持可访问性。仅依赖于CAS(比较和交换),而不是外部库,实现是简单和可移植的。正在考虑接受TPLP。

英文摘要:

The runtime system of dynamic languages such as Prolog or Lisp and their derivatives contain a symbol table, in Prolog often called the atom table. A simple dynamically resizing hash-table used to be an adequate way to implement this table. As Prolog becomes fashionable for 24x7 server processes we need to deal with atom garbage collection and concurrent access to the atom table. Classical lock-based implementations to ensure consistency of the atom table scale poorly and a stop-the-world approach to implement atom garbage collection quickly becomes a bottle-neck, making Prolog unsuitable for soft real-time applications. In this article we describe a novel implementation for the atom table using lock-free techniques where the atom-table remains accessible even during atom garbage collection. Relying only on CAS (Compare And Swap) and not on external libraries, the implementation is straightforward and portable. Under consideration for acceptance in TPLP.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑