Towards a visually interpretable analysis of Two-Phase Locking membership
Davide Martinenghi
TL;DR
This work tackles the challenge of creating visually interpretable analyses for $2PL$ membership by encoding lock-based constraints as inequalities $\mathcal{I}(S)$ and mapping them to a directed graph $\mathcal{G}(S)$, where satisfiability corresponds to acyclicity. When cycles are present, it applies BFS to locate a minimal cycle and iteratively removes preferential inequalities to obtain a satisfiable subproblem, yielding a $2PL$-compliant topological order. The proposed tabular visualization, augmented with a plateau marker and culprits highlighting removed inequalities, provides an intuitive view of where and why a schedule violates $2PL$. A prototype tool renders the results as LaTeX tables, supporting teaching, debugging, and practical analysis in both traditional and distributed database contexts.
Abstract
Two-phase locking (2PL) is a consolidated policy commonly adopted by Database Management Systems to enforce serializability of a schedule. While the policy is well understood, both in its standard and in the strict version, automatically deriving a suitable tabular/graphical analysis of schedules with respect to 2PL is far from trivial, and requires several technicalities that do not straightforwardly translate to visual cues. In this paper, we delve into the details of the development of a tool for 2PL analysis.
