A formal semantics of nested atomic sections with thread escape - Inria - Institut national de recherche en sciences et technologies du numérique Access content directly
Journal Articles Computer Languages, Systems and Structures Year : 2015

A formal semantics of nested atomic sections with thread escape


The multi-core trend is widening the gap between programming languages and hardware. Taking parallelism into account in the programs is necessary to improve performance. Unfortunately, current mainstream programming languages fail to provide suitable abstractions to do so. The most common pattern relies on the use of mutexes to ensure mutual exclusion between concurrent accesses to a shared memory. However, this model is error-prone and scales poorly by lack of modularity. Recent research proposes atomic sections as an alternative. The user simply delimits portions of code that should be free from interference. The responsibility for ensuring interference freedom is left either to the compiler or to the run-time system. In order to provide enough modularity, it is necessary that both atomic sections could be nested and threads could be forked inside an atomic section. In this paper we focus on the semantics of programming languages providing these features. More precisely, without being tied to a specific programming language, we consider program traces satisfying some basic well-formedness conditions. Our main contribution is the precise definition of atomicity, well-synchronisation and the proof that the latter implies the strong form of the former. A formalisation of our results in the Coq proof assistant is described.

Dates and versions

hal-01143199 , version 1 (16-04-2015)



Frédéric Dabrowski, Frédéric Loulergue, Thomas Pinsard. A formal semantics of nested atomic sections with thread escape. Computer Languages, Systems and Structures, 2015, 42 (supl), pp.2-21. ⟨10.1016/j.cl.2015.04.001⟩. ⟨hal-01143199⟩
156 View
0 Download



Gmail Mastodon Facebook X LinkedIn More