English

Critical Sections Are Not Per-Thread: A Trace Semantics for Lock-Based Concurrency

Programming Languages 2026-04-08 v4 Logic in Computer Science

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. Traditional definitions of critical sections implicitly assume that protected events belong to the same thread. We demonstrate that this assumption does not hold 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.

Keywords

Cite

@article{arxiv.2603.13142,
  title  = {Critical Sections Are Not Per-Thread: A Trace Semantics for Lock-Based Concurrency},
  author = {Martin Sulzmann},
  journal= {arXiv preprint arXiv:2603.13142},
  year   = {2026}
}

Comments

- clear distinction between open and closed critical sections (reflected in the definitions, statements and proofs) - some grammar and latex fixes

R2 v1 2026-07-01T11:18:42.640Z