The concept of concurrent programming involves the simultaneous execution of multiple program threads. It holds a pivotal role in critical systems such as operating system kernels, where both speed and safety are of paramount importance. To formally verify these concurrent programs, a well-specified concurrency semantics, also known as a memory model, is essential.
Sequential Consistency (SC) stands as the canonical model of concurrency, where a program's behaviors stem from the interleaving of thread operations. However, while SC provides strong intuitive assurances to programmers, it faces significant challenges. Implementing SC on processors like Intel's x86, IBM's POWER, and ARM multiprocessors is intricate. These processors execute memory operations speculatively or out of order, leading to weak behaviors that do not align with the SC model. Achieving SC semantics on such architectures requires expensive barriers, impacting performance. Additionally, common compiler optimizations that reorder memory operations are unsound under SC, adding another layer of performance impact.
Furthermore, automatic verification of concurrent programs under SC, using established methods such as bounded model checking, encounters significant hurdles. The "state explosion problem" arises, where exploring the vast number of possible thread interleavings becomes computationally infeasible, even for relatively small concurrent programs.
This research project focuses on exploring alternatives to SC as the fundamental semantics for high-level programming languages. In essence, the project seeks to redefine the concurrency model, with specific goals:
Implementability: It should support common compiler optimizations and work efficiently on modern architectures, including allowing various types of instruction reordering done by these architectures.
Programmability: The model should allow programmers to prevent weak behaviors by using adequate synchronization and support high-level reasoning principles.
Amenability to Verification: It should enable verification and formal reasoning, using existing techniques for sequential programs and for SC.
The challenge is to fulfill all three goals simultaneously. Notably, focusing on amenability to verification as a design goal for a concurrency model from the outset is a new approach, diverging from the traditional sequence of defining a model first and then addressing the verification problem.
By aiming to enhance both software reliability and performance, this project holds promise for critical systems' programming and safety.