A Case Study in Optimizing HTM-Enabled Dynamic Data Structures: Patricia Tries


The advent of multi-core microprocessors with restricted transactional memory (RTM) and accompanying compiler support allows us to revisit fundamental data structures with an eye to extracting more parallelism. The Patricia trie is one such common data structure used for storing both sets and dictionaries in a variety of contexts. This paper presents a concurrent implementation of a dynamically sized Patricia trie using a lock teleportation RTM fast path for find, add and remove operations, and a slow path based on atomic exchange spinlocks. We weigh the tradeoffs between alphabet size and tree depth inherent to tries and propose a novel means of determining the optimal number of retry attempts for specific operations on dynamically allocated data structures. The strategy proposed separates the retry policy governing operations that potentially interact with the operating system’s memory management facilities from read-only operations, and we find that this transactional trie can support considerably higher multiprogramming levels than its lock-based equivalent. A notable result is that this scheme keeps throughput from collapsing at high thread counts, even when the number of threads interacting with the data structure exceeds the number of hardware contexts available on the system.

Extracted Key Phrases

6 Figures and Tables

Cite this paper

@inproceedings{Repetti2015ACS, title={A Case Study in Optimizing HTM-Enabled Dynamic Data Structures: Patricia Tries}, author={Thomas J. Repetti and Maurice Herlihy}, year={2015} }