Concurrent Size

09/15/2022
by   Gal Sela, et al.
0

The size of a data structure (i.e., the number of elements in it) is a widely used property of a data set. However, for concurrent programs, obtaining a correct size efficiently is non-trivial. In fact, the literature does not offer a mechanism to obtain a correct (linearizable) size of a concurrent data set without resorting to inefficient solutions, such as taking a full snapshot of the data structure to count the elements, or acquiring one global lock in all update and size operations. This paper presents a methodology for adding a concurrent linearizable size operation to sets and dictionaries with a relatively low performance overhead. Theoretically, the proposed size operation is wait-free with asymptotic complexity linear in the number of threads (independently of data-structure size). Practically, we evaluated the performance overhead by adding size to various concurrent data structures in Java-a skip list, a hash table and a tree. The proposed linearizable size operation executes faster by orders of magnitude compared to the existing option of taking a snapshot, while incurring a throughput loss of 1%-20% on the original data structure's operations.

READ FULL TEXT
research
07/05/2020

Constant-Time Lazy Snapshots Supporting General Queries on Concurrent Data Structures

We present a general transformation that takes any concurrent data struc...
research
10/20/2017

Building Efficient Concurrent Graph Object through Composition of List-based Set

In this paper, we propose a generic concurrent directed graph (for share...
research
12/27/2017

Analysis of Concurrent Lock-Free Hash Tries with Constant-Time Operations

Ctrie is a scalable concurrent non-blocking dictionary data structure, w...
research
04/04/2018

Maintenance of Strongly Connected Component in Shared-memory Graph

In this paper, we propose a generic concurrent directed graph (for share...
research
10/29/2020

A more Pragmatic Implementation of the Lock-free, Ordered, Linked List

The lock-free, ordered, linked list is an important, standard example of...
research
03/08/2021

A coordination-free, convergent, and safe replicated tree

The tree is an essential data structure in many applications. In a distr...
research
04/28/2023

MCPrioQ: A lock-free algorithm for online sparse markov-chains

In high performance systems it is sometimes hard to build very large gra...

Please sign up or login with your details

Forgot password? Click here to reset