arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.13142cs.PLcs.LO
收藏

关键部分并非线程专属:一种基于跟踪语义的锁基并发机制

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

Karlsruhe University of Applied Sciences(卡尔斯鲁厄应用科技大学)

Martin Sulzmann

AI总结:

本文提出一种基于跟踪语义的锁基并发机制,用于描述关键部分可能跨越多个线程的情况,填补了传统锁集构造的语义空白。

摘要:

锁是同步并发线程的标准机制。标准锁集构造假设关键部分局限于单一线程,因此只考虑该线程内获取的锁。传统关键部分定义隐含假设受保护事件属于同一线程。我们证明这一假设不适用于一般C/Pthread执行。使用捕捉C/Pthread程序本质的跟踪模型,我们给出了不 impose 线程限制的关键部分特征化。因此,关键部分可能跨越多个线程。此类多线程关键部分在真实程序中自然出现,填补了传统锁集构造的语义空白。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑