[Paper Review] Verifying Sequential Consistency on Shared-Memory Multiprocessors by Model Checking
This paper presents a sound and complete model checking algorithm to verify sequential consistency in shared-memory multiprocessors with fixed numbers of processors and memory locations, but arbitrary data values. By exploiting causality and data independence—common properties in real systems—it reduces the verification problem to checking write order consistency, enabling fully automatic verification without manual witness construction.
The memory model of a shared-memory multiprocessor is a contract between the designer and programmer of the multiprocessor. The sequential consistency memory model specifies a total order among the memory (read and write) events performed at each processor. A trace of a memory system satisfies sequential consistency if there exists a total order of all memory events in the trace that is both consistent with the total order at each processor and has the property that every read event to a location returns the value of the last write to that location. Descriptions of shared-memory systems are typically parameterized by the number of processors, the number of memory locations, and the number of data values. It has been shown that even for finite parameter values, verifying sequential consistency on general shared-memory systems is undecidable. We observe that, in practice, shared-memory systems satisfy the properties of causality and data independence. Causality is the property that values of read events flow from values of write events. Data independence is the property that all traces can be generated by renaming data values from traces where the written values are distinct from each other. If a causal and data independent system also has the property that the logical order of write events to each location is identical to their temporal order, then sequential consistency can be verified algorithmically. Specifically, we present a model checking algorithm to verify sequential consistency on such systems for a finite number of processors and memory locations and an arbitrary number of data values.
Motivation & Objective
- To address the challenge of verifying sequential consistency in shared-memory multiprocessors, which is undecidable in general even for finite parameter values.
- To identify practical assumptions—causality and data independence—that allow algorithmic verification of sequential consistency.
- To develop an automatic model checking method that avoids manual construction of witness total orders, reducing verification effort.
- To enable verification for arbitrary data values while fixing processor and memory location counts, making it scalable for debugging.
- To provide a foundation for verifying cache-coherence protocols with formal guarantees, prior to more complex verification efforts.
Proposed method
- Leverages the property of causality: every read event must read from a prior write or initial value, ensuring data flow from writes.
- Employs data independence: protocol behavior is invariant under data value renaming, allowing analysis on unambiguous runs with distinct written values.
- Reduces the witness total order problem to specifying a total order on write events per memory location, which induces a partial order on all events.
- Constructs a model checker that verifies that the induced partial order is consistent with local processor orders and satisfies the sequential consistency condition.
- Uses symmetry assumptions (processor and location symmetry) to reduce the number of model checking lemmas from exponential to min(n, m), improving scalability.
- Applies the method to atomic read/write events, with extension possible to request-response models when request ordering matches response ordering.
Experimental results
Research questions
- RQ1Can sequential consistency be verified automatically for shared-memory systems with fixed processor and memory location counts but arbitrary data values?
- RQ2Under what assumptions does the undecidability of sequential consistency verification become decidable?
- RQ3Can causality and data independence be used to eliminate the need for manually constructed serializers or witness generators?
- RQ4How can symmetry in processors and memory locations be exploited to reduce the state space in model checking?
- RQ5Is it possible to achieve sound and complete verification without requiring unbounded storage or complex finite-state machines?
Key findings
- The paper establishes that sequential consistency can be verified algorithmically for causal and data-independent shared-memory systems with fixed n and m, and arbitrary v.
- The method is sound and complete, meaning it correctly identifies all sequentially consistent traces and only those.
- By focusing on write event order per location, the approach avoids tracking unbounded histories, which is the core obstacle in general verification.
- The use of symmetry assumptions reduces the number of required model checking lemmas from exponential in n and m to min(n, m), significantly improving efficiency.
- The approach outperforms existing methods like serializer-based model checking in terms of automation and state space overhead.
- The method is extendable to protocols like lazy caching, provided write ordering decisions can be made before value reads, suggesting broad applicability.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.