A Survey of Programming Language Memory Models

被引:3
作者
Moiseenko, E. [1 ,3 ]
Podkopaev, A. [2 ,3 ]
Koznov, D. [1 ]
机构
[1] St Petersburg State Univ, St Petersburg 198504, Petergof, Russia
[2] HSE Univ, St Petersburg 194100, Russia
[3] JetBrains Res, St Petersburg 197342, Russia
关键词
OPERATIONAL SEMANTICS; CONCURRENCY; ATOMICS; C/C++11; POWER; C-11;
D O I
10.1134/S0361768821060050
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
A memory model defines the semantics of concurrent programs operating on a shared memory. The most well-known and intuitive memory model, sequential consistency, is too strong for modern languages as it forbids many outcomes observable on modern hardware as a result of compiler and CPU optimizations. This gave rise to so-called weak or relaxed memory models. In recent years dozens of (weak) memory models for programming languages were proposed making different compromises with respect to programmability and the optimization potential. The goal of this paper is to survey and classify these models as well as to provide practical recommendations for language and compiler designers regarding a choice of a memory model. To achieve this goal we picked over 2000 research items from Google Scholar with keywords "Relaxed Memory Models," "Weak Memory Models," and "Weak Memory Consistency." Then, we narrowed down this list to 40 papers having as a contribution a programming language memory model. We divide these models to six main classes and analyze their properties and limitations. We conclude with a discussion on how a choice of a memory model is affected by desired features of a language and suggest several possible directions for future researh in the field of weak memory models.
引用
收藏
页码:439 / 456
页数:18
相关论文
共 68 条
[1]  
Alglave J., 2009, P 4 ACM SIGPLAN WORK, P13, DOI DOI 10.1145/1481839.1481842
[2]  
Alglave J, 2018, ACM SIGPLAN NOTICES, V53, P405, DOI [10.1145/3173162.3177156, 10.1145/3296957.3177156]
[3]   Herding Cats: Modelling, Simulation, Testing, and Data Mining for Weak Memory [J].
Alglave, Jade ;
Maranget, Luc ;
Tautschnig, Michael .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2014, 36 (02)
[4]  
[Anonymous], 2011, C C 11 MAPPINGS PROC
[5]   Overhauling SC Atomics in C11 and OpenCL [J].
Batty, Mark ;
Donaldson, Alastair F. ;
Wickerson, John .
ACM SIGPLAN NOTICES, 2016, 51 (01) :634-648
[6]   The Problem of Programming Language Concurrency Semantics [J].
Batty, Mark ;
Memarian, Kayvan ;
Nienhuis, Kyndylan ;
Pichon-Pharabod, Jean ;
Sewell, Peter .
PROGRAMMING LANGUAGES AND SYSTEMS, 2015, 9032 :283-307
[7]   Clarifying and Compiling C/C++ Concurrency: from C++11 to POWER [J].
Batty, Mark ;
Memarian, Kayvan ;
Owens, Scott ;
Sarkar, Susmit ;
Sewell, Peter .
ACM SIGPLAN NOTICES, 2012, 47 (01) :509-520
[8]   Mathematizing C plus plus Concurrency [J].
Batty, Mark ;
Owens, Scott ;
Sarkar, Susmit ;
Sewell, Peter ;
Weber, Tjark .
POPL 11: PROCEEDINGS OF THE 38TH ANNUAL ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES, 2011, :55-66
[9]   A Formalization of Java']Java's Concurrent Access Modes [J].
Bender, John ;
Palsberg, Jens .
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (OOPSLA)
[10]  
Boehm H.-J., 2014, MSPC, p7:1, DOI [10.1145/2618128.2618134, DOI 10.1145/2618128.2618134]