DocumentCode
545658
Title
Automatic inference of memory fences
Author
Kuperstein, Michael ; Vechev, Martin ; Yahav, Eran
fYear
2010
fDate
20-23 Oct. 2010
Firstpage
111
Lastpage
119
Abstract
This paper addresses the problem of placing memory fences in a concurrent program running on a relaxed memory model. Modern architectures implement relaxed memory models which may reorder memory operations or execute them non-atomically. Special instructions called memory fences are provided to the programmer, allowing control of this behavior. To ensure correctness of many algorithms, in particular of non-blocking ones, a programmer is often required to explicitly insert memory fences into her program. However, she must use as few fences as possible, or the benefits of the relaxed architecture may be lost. Placing memory fences is challenging and very error prone, as it requires subtle reasoning about the underlying memory model. We present a framework for automatic inference of memory fences in concurrent programs, assisting the programmer in this complex task. Given a finite-state program, a safety specification and a description of the memory model, our framework computes a set of ordering constraints that guarantee the correctness of the program under the memory model. The computed constraints are maximally permissive: removing any constraint from the solution would permit an execution violating the specification. Our framework then realizes the computed constraints as additional fences in the input program. We implemented our approach in a tool called FENDER and used it to infer correct and efficient placements of fences for several non-trivial algorithms, including practical concurrent data structures.
Keywords
inference mechanisms; multiprocessing programs; FENDER; automatic inference; concurrent data structures; concurrent program; finite-state program; memory fences; relaxed memory model; Arrays; Computational modeling; Inference algorithms; Load modeling; Memory management; Out of order;
fLanguage
English
Publisher
ieee
Conference_Titel
Formal Methods in Computer-Aided Design (FMCAD), 2010
Conference_Location
Lugano
Print_ISBN
978-1-4577-0734-6
Electronic_ISBN
978-0-9835678-0-6
Type
conf
Filename
5770939
Link To Document