Safe and sound lock generation with data-centric concurrency control - Salgado, Pedro Miguel Silva Ribeiro (2023)
The rise of multi-threaded programming propels shared-memory concurrency control to an even more important role, as it hinders program performance with multiple errors such as deadlocks. Most research on concurrency control tends to be control-centric rather than datacentric. This approach focuses on marking the beginning and end of critical regions that require synchronization. However, it decentralizes concurrency and increases the likelihood of errors and bugs by the programmer. In this state-of-the-art analysis, I examine existing control-centric approaches and their specifications, as well as provide a more in-depth analysis of a data-centric approach. I explain how these approaches prevent deadlocks, ensure serializability, and outline the annotations required from the programmer. The RC3 model aims to improve upon current data-centric concurrency control implementations. I provide a thorough explanation of the model’s strategy and pipeline, step-by-step, with real examples of each step’s purpose. In this thesis we take the RC3 Java algorithm as a starting point and create a version of it in OCaml. This OCaml version simplifies some of the complex details from the original Java code while keeping the critical logic intact. The thesis walks through each step of this OCaml implementation, explaining it thoroughly and providing practical code examples. Additionally, we use Cameleer, along with its annotations, combined with the Why3 graphical interface, to check that the OCaml implementations are correct and to ensure both the functionality and the robustness of the algorithm. In the end, I provide a detailed explanation of the results I achieved with the OCaml implementation and Cameleer verification. I’ll clarify which parts of the algorithm I successfully verified and point out areas that require future work. Additionally, I’ll describe the OUnit tests I performed to ensure the robustness of my OCaml implementation.