🤖 AI Summary
This work addresses a fundamental limitation of the traditional lockset model, which assumes that critical sections are confined to a single thread and thus fails to accurately capture cross-thread synchronization patterns in C/Pthread programs. By leveraging trace semantics, this study transcends this restriction and formally defines, for the first time, critical sections that may span multiple threads. It further redefines the relationship between locks and critical sections accordingly. The proposed approach effectively identifies naturally occurring multi-threaded critical sections in real-world concurrent programs, thereby filling a critical semantic gap in the standard lockset model and significantly enhancing both the accuracy and completeness of concurrent program analysis.
📝 Abstract
Locks are a standard mechanism for synchronizing concurrent threads. The standard lock set construction assumes that critical sections are confined to a single thread, and therefore only accounts for locks acquired within that thread. The commonly used notion of a critical section implicitly assumes that protected events belong to the same thread. We show that this assumption is not valid for general C/Pthread executions.
Using a trace model that captures the essence of C/Pthread programs, we give a trace-based characterization of critical sections that does not impose a per-thread restriction. As a result, critical sections may span multiple threads. Such \emph{multi-thread} critical sections arise naturally in real programs and close a semantic gap in the standard lock set construction.