The runtime system of dynamic languages such as Prolog or Lisp and theirderivatives contain a symbol table, in Prolog often called the atom table. Asimple dynamically resizing hash-table used to be an adequate way to implementthis table. As Prolog becomes fashionable for 24x7 server processes we need todeal with atom garbage collection and concurrent access to the atom table.Classical lock-based implementations to ensure consistency of the atom tablescale poorly and a stop-the-world approach to implement atom garbage collectionquickly becomes a bottle-neck, making Prolog unsuitable for soft real-timeapplications. In this article we describe a novel implementation for the atomtable using lock-free techniques where the atom-table remains accessible evenduring atom garbage collection. Relying only on CAS (Compare And Swap) and noton external libraries, the implementation is straightforward and portable. Under consideration for acceptance in TPLP.
展开▼