Table of Contents
Fetching ...

Skip Hash: A Fast Ordered Map Via Software Transactional Memory

Matthew Rodriguez, Vitaly Aksenov, Michael Spear

TL;DR

The skip hash is introduced, which uses STM to combine a skip list and a hash map behind a single ordered map abstraction, resulting in O(1) overhead for most operations, which demonstrates that designing novel STM-based data structures is a promising direction for future research.

Abstract

Scalable ordered maps must ensure that range queries, which operate over many consecutive keys, provide intuitive semantics (e.g., linearizability) without degrading the performance of concurrent insertions and removals. These goals are difficult to achieve simultaneously when concurrent data structures are built using only locks and compare-and-swap objects. However, recent innovations in software transactional memory (STM) allow programmers to assume that multi-word atomic operations can be fast and simple. This paper introduces the skip hash, a new ordered map designed around that assumption. It combines a skip list and a hash map behind a single abstraction, resulting in $O(1)$ overheads for most operations. The skip hash makes use of a novel range query manager -- again leveraging STM -- to achieve fast, linearizable range queries that do not inhibit scalability. In performance evaluation, we show that the skip hash outperforms the state of the art in almost all cases. This places the skip hash in the uncommon position of being both exceedingly fast and exceedingly simple.

Skip Hash: A Fast Ordered Map Via Software Transactional Memory

TL;DR

The skip hash is introduced, which uses STM to combine a skip list and a hash map behind a single ordered map abstraction, resulting in O(1) overhead for most operations, which demonstrates that designing novel STM-based data structures is a promising direction for future research.

Abstract

Scalable ordered maps must ensure that range queries, which operate over many consecutive keys, provide intuitive semantics (e.g., linearizability) without degrading the performance of concurrent insertions and removals. These goals are difficult to achieve simultaneously when concurrent data structures are built using only locks and compare-and-swap objects. However, recent innovations in software transactional memory (STM) allow programmers to assume that multi-word atomic operations can be fast and simple. This paper introduces the skip hash, a new ordered map designed around that assumption. It combines a skip list and a hash map behind a single abstraction, resulting in overheads for most operations. The skip hash makes use of a novel range query manager -- again leveraging STM -- to achieve fast, linearizable range queries that do not inhibit scalability. In performance evaluation, we show that the skip hash outperforms the state of the art in almost all cases. This places the skip hash in the uncommon position of being both exceedingly fast and exceedingly simple.

Paper Structure

This paper contains 21 sections, 6 figures, 1 table.

Figures (6)

  • Figure 1: Transactional Composition of an Unordered Map and Skip List
  • Figure 2: Elemental operations of a skip hash augmented with a range query coordinator.
  • Figure 3: Range query implementation
  • Figure 4: A concrete implementation of the range query coordinator.
  • Figure 5: Comparison of skip hash performance versus state-of-the-art ordered maps, with varying mixtures of lookup, update, and range operations. The x-axis represents thread count, and the y-axis represents throughput as millions of operations per second. All range queries were of length $100$, thus processing $50$ keys on average.
  • ...and 1 more figures