Declarative fence insertion
Authors:
Open Access
- 23 October 2015
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 367-385
Abstract
Previous work has shown how to insert fences that enforce sequential consistency. However, for many concurrent algorithms, sequential consistency is unnecessarily strong and can lead to high execution overhead. The reason is that, often, correctness relies on the execution order of a few specific pairs of instructions. Algorithm designers can declare those execution orders and thereby enable memory-model-independent reasoning about correctness and also ease implementation of algorithms on multiple platforms. The literature has examples of such reasoning, while tool support for enforcing the orders has been lacking until now. In this paper we present a declarative approach to specify and enforce execution orders. Our fence insertion algorithm first identifies the execution orders that a given memory model enforces automatically, and then inserts fences that enforce the rest. Our benchmarks include three off-the-shelf transactional memory algorithms written in C/C++ for which we specify suitable execution orders. For those benchmarks, our experiments with the x86 and ARMv7 memory models show that our tool inserts fences that are competitive with those inserted by the original authors. Our tool is the first to insert fences into transactional memory algorithms and it solves the long-standing problem of how to easily port such algorithms to a novel memory model.Keywords
Funding Information
- National Science Foundation (CCF-0926127)
This publication has 17 references indexed in Scilit:
- Decomposing OpacityLecture Notes in Computer Science, 2014
- Synthesis of Memory Fences via Refinement PropagationLecture Notes in Computer Science, 2014
- Don’t Sit on the FenceLecture Notes in Computer Science, 2014
- Predicate Abstraction for Relaxed Memory ModelsLecture Notes in Computer Science, 2013
- Improved multithreaded unit testing2011
- Transactional Locking II2006
- Minimal multicut and maximal integer multiflow: A surveyEuropean Journal of Operational Research, 2005
- Hiding relaxed memory consistency with a compilerIEEE Transactions on Computers, 2001
- Transactional memoryACM SIGARCH Computer Architecture News, 1993
- Efficient and correct execution of parallel programs that share memoryACM Transactions on Programming Languages and Systems, 1988