arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2203.00783cs.PL
收藏

为隐式同步协议综合细粒度同步协议(扩展版)

Synthesizing Fine-Grained Synchronization Protocols for Implicit Monitors (Extended Version)

Kostas Ferles, Benjamin Sepanski, Rahul Krishnan, James Bornholt, Isil Dillig

摘要:

监视器是一种广泛使用的并发编程抽象,它封装了线程之间的所有共享状态。根据它们提供的原语,可以将XML分类为隐式或显式。隐式监视器更容易编程,但通常效率不高。为了解决这一差距,最近已经有研究自动合成显式信号监视器从一个隐式规范,但以前的工作并没有利用所有的mallelization的机会,由于整个监视器使用一个单一的锁。本文提出了一种新的技术,用于合成细粒度显式同步协议从隐式监视器。我们的方法是基于两个关键的创新:首先,我们提出了一个新的静态分析推断安全的交织,允许违反互斥的监视器操作,而不改变其语义。其次,我们使用这个静态分析的结果来生成一个MaxSAT实例,其模型对应于正确的建设同步协议。我们已经在一个名为Cortado的工具中实现了我们的方法,并在包含并行化机会的监视器上对其进行了评估。我们的评估表明,Cortado可以合成的同步政策的竞争力,甚至比,专家写的这些基准。

英文摘要:

A monitor is a widely-used concurrent programming abstraction that encapsulates all shared state between threads. Monitors can be classified as being either implicit or explicit depending on the primitives they provide. Implicit monitors are much easier to program but typically not as efficient. To address this gap, there has been recent research on automatically synthesizing explicit-signal monitors from an implicit specification, but prior work does not exploit all paralellization opportunities due to the use of a single lock for the entire monitor. This paper presents a new technique for synthesizing fine-grained explicit-synchronization protocols from implicit monitors. Our method is based on two key innovations: First, we present a new static analysis for inferring safe interleavings that allow violating mutual exclusion of monitor operations without changing its semantics. Second, we use the results of this static analysis to generate a MaxSAT instance whose models correspond to correct-by-construction synchronization protocols. We have implemented our approach in a tool called Cortado and evaluate it on monitors that contain parallelization opportunities. Our evaluation shows that Cortado can synthesize synchronization policies that are competitive with, or even better than, expert-written ones on these benchmarks.

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

↑