A Tree Clock Data Structure for Causal Orderings in Concurrent Executions

01/17/2022
by   Umang Mathur, et al.
0

Dynamic techniques are a scalable and effective way to analyze concurrent programs. Instead of analyzing all behaviors of a program, these techniques detect errors by focusing on a single program execution. Often a crucial step in these techniques is to define a causal ordering between events in the execution, which is then computed using vector clocks, a simple data structure that stores logical times of threads. The two basic operations of vector clocks, namely join and copy, require Θ(k) time, where k is the number of threads. Thus they are a computational bottleneck when k is large. In this work, we introduce tree clocks, a new data structure that replaces vector clocks for computing causal orderings in program executions. Joining and copying tree clocks takes time that is roughly proportional to the number of entries being modified, and hence the two operations do not suffer the a-priori Θ(k) cost per application. We show that when used to compute the classic happens-before (HB) partial order, tree clocks are optimal, in the sense that no other data structure can lead to smaller asymptotic running time. Moreover, we demonstrate that tree clocks can be used to compute other partial orders, such as schedulable-happens-before (SHB) and the standard Mazurkiewicz (MAZ) partial order, and thus are a versatile data structure. Our experiments show that just by replacing vector clocks with tree clocks, the computation becomes from 2.02 × faster (MAZ) to 2.66 × (SHB) and 2.97 × (HB) on average per benchmark. These results illustrate that tree clocks have the potential to become a standard data structure with wide applications in concurrent analyses.

READ FULL TEXT
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

10/02/2020

Proving Highly-Concurrent Traversals Correct

Modern highly-concurrent search data structures, such as search trees, o...
09/03/2017

Faster Concurrent Range Queries with Contention Adapting Search Trees Using Immutable Data

The need for scalable concurrent ordered set data structures with linear...
03/08/2021

A coordination-free, convergent, and safe replicated tree

The tree is an essential data structure in many applications. In a distr...
02/21/2020

Chronofold: a data structure for versioned text

Collaborative text editing and versioning is known to be a tough topic. ...
01/08/2020

The Simplex Tree: an Efficient Data Structure for General Simplicial Complexes

This paper introduces a data structure, called simplex tree, to represen...
08/27/2019

Partial Sums on the Ultra-Wide Word RAM

We consider the classic partial sums problem on the ultra-wide word RAM ...
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...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.