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

快照隔离的语义研究

On the Semantics of Snapshot Isolation

Azalea Raad, Ori Lahav, Viktor Vafeiadis

摘要:

快照隔离(SI)是一种标准的事务性一致性模型,用于数据库、分布式系统和软件事务存储器(STM)。它的语义被正式定义为一个声明性的非循环性公理,并在操作上作为一个并发算法与内存轴承时间戳。我们开发了两个简单的等效操作定义SI作为基于锁的参考实现,不使用时间戳。我们的第一个锁定实现是有先见之明的,因为它需要事务访问的数据的先验知识,并急切地(就地)执行事务写入。我们的第二个实现是非预知的,通过将它们记录在本地日志中并在提交时将它们传播到内存来延迟执行事务性写入。虽然我们的第一个实现更简单,可能更适合于开发一个程序逻辑SI交易,我们的第二个实现是更实际的,由于其非预见性。我们表明,这两种实现是健全的和完整的声明SI规范,从而产生等效的SI操作定义。我们进一步考虑,第一次正式地,使用SI的上下文中与活泼的非事务性访问,可以出现在STM实现SI。我们介绍了强大的快照隔离(RSI),适应SI具有类似的语义和保证在这种混合设置。我们提出了一个声明性规范的RSI作为一个非循环公理和类似的开发两个操作模型作为基于锁的参考实现(一个渴望,一个懒惰)。我们表明,这些操作模型都是健全的和完整的声明性RSI模型。

英文摘要:

Snapshot isolation (SI) is a standard transactional consistency model used in databases, distributed systems and software transactional memory (STM). Its semantics is formally defined both declaratively as an acyclicity axiom, and operationally as a concurrent algorithm with memory bearing timestamps. We develop two simpler equivalent operational definitions of SI as lock-based reference implementations that do not use timestamps. Our first locking implementation is prescient in that requires a priori knowledge of the data accessed by a transaction and carries out transactional writes eagerly (in-place). Our second implementation is non-prescient and performs transactional writes lazily by recording them in a local log and propagating them to memory at commit time. Whilst our first implementation is simpler and may be better suited for developing a program logic for SI transactions, our second implementation is more practical due to its non-prescience. We show that both implementations are sound and complete against the declarative SI specification and thus yield equivalent operational definitions for SI. We further consider, for the first time formally, the use of SI in a context with racy non-transactional accesses, as can arise in STM implementations of SI. We introduce robust snapshot isolation (RSI), an adaptation of SI with similar semantics and guarantees in this mixed setting. We present a declarative specification of RSI as an acyclicity axiom and analogously develop two operational models as lock-based reference implementations (one eager, one lazy). We show that these operational models are both sound and complete against the declarative RSI model.

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

↑