内存事务的安全私有化
Safe Privatization in Transactional Memory
摘要:
transmandemory(TM)通过让程序员将某些代码块指定为原子代码块来促进并发应用程序的开发。使用TM的程序员通常希望在事务内部和外部访问相同的数据,例如,以提高性能或支持遗留代码。在这种情况下,程序员理想地希望TM保证强原子性,其中事务可以被视为相对于非事务访问也以原子方式执行。由于保证任意程序的强原子性是非常昂贵的,研究人员建议只保证某些无数据竞争(DRF)程序,特别是那些遵循私有化习语的程序:从某个时候开始,线程同意可以非事务性地访问给定对象。在TM中安全地支持私有化是非常重要的,因为这通常需要正确地插入事务围栏,直到所有活动事务完成。不幸的是,目前没有就事务性DRF的单一定义达成共识,特别是因为现有的DRF概念没有考虑到事务性围栏。在本文中,我们提出了这样一个概念,并证明,如果TM满足一定的条件推广不透明性和使用它的程序是DRF假设强原子性,那么程序确实具有强原子语义。我们表明,我们的DRF概念允许程序员使用私有化的成语。我们还提出了一种方法来证明我们的不透明度的推广,并将其应用到TL2 TM。
英文摘要:
Transactional memory (TM) facilitates the development of concurrent applications by letting the programmer designate certain code blocks as atomic. Programmers using a TM often would like to access the same data both inside and outside transactions, e.g., to improve performance or to support legacy code. In this case, programmers would ideally like the TM to guarantee strong atomicity, where transactions can be viewed as executing atomically also with respect to non-transactional accesses. Since guaranteeing strong atomicity for arbitrary programs is prohibitively expensive, researchers have suggested guaranteeing it only for certain data-race free (DRF) programs, particularly those that follow the privatization idiom: from some point on, threads agree that a given object can be accessed non-transactionally. Supporting privatization safely in a TM is nontrivial, because this often requires correctly inserting transactional fences, which wait until all active transactions complete. Unfortunately, there is currently no consensus on a single definition of transactional DRF, in particular, because no existing notion of DRF takes into account transactional fences. In this paper we propose such a notion and prove that, if a TM satisfies a certain condition generalizing opacity and a program using it is DRF assuming strong atomicity, then the program indeed has strongly atomic semantics. We show that our DRF notion allows the programmer to use privatization idioms. We also propose a method for proving our generalization of opacity and apply it to the TL2 TM.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。