用线性化点验证并发对象的正确性
Proving Correctness of Concurrent Objects by Validating Linearization Points
摘要:
并发数据结构或CDS,如并发堆栈、队列、集合等,在过去几年中已经变得非常流行,部分原因是多核系统的兴起。但CDS最大的挑战之一是开发正确的结构,然后证明这些结构的正确性。我们相信,有助于证明这些CDS正确性的技术也可以指导开发新的CDS。证明CDS正确性的一种直观技术是使用线性化点或LP。LP是每个方法的执行间隔中的原子事件,使得整个方法的执行似乎在该事件的瞬间发生。基于LP的方法的主要挑战之一是识别CDS的正确LP。在许多情况下,识别正确的LP可能是欺骗性的错误。事实上,在许多情况下,LP识别甚至更糟的是CDS本身可能是错误的。为了解决这些问题,已经开发了几种用于验证线性化的自动工具。但是我们相信这些工具并不能为程序员提供开发正确的并发程序或识别LP的洞察力。考虑到开发CDS并验证其正确性的复杂性,本文解决了该领域最基本的问题:给定CDS的LP集,如何证明其正确性?我们假设给定一个CDS和它的LP。我们开发了一种手工制作的技术,通过验证其LP来证明CDS的正确性。如前所述,识别正确的LP非常棘手和错误。但是,由于我们的技术是手工制作的,我们相信,如果当前选择的LP不正确,证明正确性的过程可能会提供识别正确LP的洞察力。我们还相信,这种技术也可以为程序员提供一些见解,以开发更有效的CDS变体。
英文摘要:
Concurrent data structures or CDS such as concurrent stacks, queues, sets etc. have become very popular in the past few years partly due to the rise of multi-core systems. But one of the greatest challenges with CDSs has been developing correct structures and then proving the correctness of these structures. We believe that techniques that help prove the correctness of these CDSs can also guide in developing new CDSs. An intuitive technique to prove the correctness of CDSs is using Linearization Points or LPs. An LP is an atomic event in the execution interval of each method such that the execution of the entire method seems to have taken place in the instant of that event. One of the main challenges with the LP based approach is to identify the correct LPs of a CDS. Identifying the correct LPs can be deceptively wrong in many cases. In fact, in many cases, the LP identified or even worse the CDS itself could be wrong. To address these issues, several automatic tools for verifying linearizability have been developed. But we believe that these tools don't provide insight to a programmer to develop the correct concurrent programs or identify the LPs. Considering the complexity of developing a CDS and verifying its correctness, we address the most basic problem of this domain in this paper: given the set of LPs of a CDS, how to show its correctness? We assume that we are given a CDS and its LPs. We have developed a hand-crafted technique of proving the correctness of the CDS by validating its LPs. As observed earlier, identifying the correct LPs is very tricky and erroneous. But since our technique is hand-crafted, we believe that the process of proving correctness might provide insight to identify the correct LPs, if the currently chosen LP is incorrect. We also believe that this technique might also offer the programmer some insight to develop more efficient variants of the CDS.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。