[Paper Review] Sequential Consistency and Concurrent Data Structures
This paper investigates sequential consistency (SC) as a weaker alternative to linearizability for concurrent data structures, revealing that SC permits trivially broken implementations where threads can operate without synchronization. To address this, the authors propose k-SC—a quantitative strengthening of SC that forces synchronization after at most k local events, creating a scalable hierarchy between SC and linearizability.
Linearizability, the de facto correctness condition for concurrent data structure implementations, despite its intuitive appeal is known to lead to poor scalability. This disadvantage has led researchers to design scalable data structures satisfying consistency conditions weaker than linearizability. Despite this recent trend, sequential consistency as a strictly weaker consistency condition than linearizability has received no interest. In this paper, we investigate the applicability of sequential consistency as an alternative correctness criterion for concurrent data structure implementations. Our first finding formally justifies the reluctance in moving towards sequentially consistent data structures: Implementations in which each thread modifies only its thread-local variables are sequentially consistent for various standard data structures such as pools, queues and stacks. We also show that for almost all data structures, and the data structures we consider in this paper, it is possible to have sequentially consistent behaviors in which a designated thread does not synchronize at all. As a potential remedy, we define a hierarchy of quantitatively strengthened variants of sequential consistency such that the stronger the variant the more synchronization it enforces which at the limit is equal to that enforced by linearizability.
Motivation & Objective
- To evaluate sequential consistency (SC) as a viable correctness criterion for concurrent data structures, despite its theoretical appeal.
- To identify fundamental weaknesses in SC that allow non-synchronization and semantically incorrect behaviors in standard data structures.
- To propose a quantitative refinement of SC—k-SC—that enforces periodic synchronization to prevent pathological implementations.
- To establish a formal hierarchy between SC and linearizability via bounded non-synchronization intervals.
- To demonstrate that common data structures like queues, stacks, and pools are vulnerable to SC's lack of enforcement mechanisms.
Proposed method
- Define robustness as a property of method sequences that remain valid regardless of the data structure's current state.
- Introduce composability as a structural property of data structures where any two valid behaviors can be interleaved into another valid behavior.
- Construct SC implementations where a thread can delay synchronization indefinitely if its local event sequence is robust.
- Propose k-SC: a variant of SC requiring that every thread synchronize at least once after every k local events.
- Design a template algorithm for k-SC that locally buffers operations and atomically commits them after k events or when robustness is violated.
- Formally define k-serial histories to characterize k-SC, with 0-SC equivalent to linearizability.
Experimental results
Research questions
- RQ1Can sequentially consistent implementations of common data structures like queues, stacks, and pools exhibit semantically incorrect behavior due to lack of synchronization?
- RQ2Under what structural conditions (e.g., composability, robustness) do SC implementations fail to enforce meaningful synchronization?
- RQ3Is there a way to quantitatively strengthen SC to prevent isolated, non-synchronizing threads while preserving scalability?
- RQ4How does k-SC relate to linearizability, and can it serve as a practical intermediate consistency condition?
- RQ5Can k-SC be effectively implemented in practice using local buffering and atomic commit mechanisms?
Key findings
- For all standard data structures (pools, queues, stacks, registers), there exist sequentially consistent implementations where a thread can execute arbitrarily long sequences without synchronizing with others.
- In composable data structures like queues and stacks, fully non-synchronizing implementations are sequentially consistent, leading to incorrect program behavior such as unprocessed tasks.
- The existence of robust sequences (e.g., push, enqueue) allows threads to perform operations in isolation without affecting correctness under SC.
- k-SC is formally defined such that a thread must synchronize at least once every k events, with 0-SC equivalent to linearizability.
- The k-SC model provides a continuous spectrum between SC and linearizability, enabling scalable implementations with bounded non-synchronization.
- The k-SC template can be implemented by modifying existing singular implementations with local buffering and atomic commit on threshold or robustness violation.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.