From Total Store Order to Sequential Consistency: A Practical Reduction Theorem
From Total Store Order to Sequential Consistency: A Practical Reduction Theorem
复制标题
从总存储顺序到顺序一致性:实用的归约定理
DOI:
10.1007/978-3-642-14052-5_28
复制
发表时间:
2010
期刊:
影响因子:
--
通讯作者:
Norbert Schirmer
中科院分区:
文献类型:
--
作者:
Ernie Cohen;Norbert Schirmer
When verifying a concurrent program, it is usual to assume sequentially consistent memory. However, most modern multiprocessors buffer their stores, providing native sequential consistency only at a substantial performance penalty. To regain sequential consistency, a programmer has to follow an appropriate programming discipline. However, existing naive disciplines, such as protecting all shared accesses with locks to avoid data races, or flushing store buffers according to a protocol that allows arbitrary data races, are not flexible enough for building high-performance multiprocessor software. We present a new discipline for concurrent programming under TSO (total store order, with store buffer forwarding). Instead of using concurrency primitives, such as locks, it is based on maintaining ownership information in ghost state, allowing the discipline to be expressed as a state invariant and verified through conventional program reasoning. If every execution of a program in a system without store buffers follows the discipline, then every execution of the program in a system with store buffers is sequentially consistent.