Weak persistency semantics from the ground up: formalising the persistency semantics of ARMv8 and transactional models

Emerging non-volatile memory (NVM) technologies promise the durability of disks with the performance of volatile memory (RAM). To describe the persistency guarantees of NVM, several memory persistency models have been proposed in the literature. However, the formal persistency semantics of mainstream hardware is unexplored to date. To close this gap, we present a formal declarative framework for describing concurrency models in the NVM context, and then develop the PARMv8 persistency model as an instance of our framework, formalising the persistency semantics of the ARMv8 architecture for the first time. To facilitate correct persistent programming, we study transactions as a simple abstraction for concurrency and persistency control. We thus develop the PSER (persistent serialisability) persistency model, formalising transactional semantics in the NVM context for the first time, and demonstrate that PSER correctly compiles to PARMv8. This then enables programmers to write correct, concurrent and persistent programs, without having to understand the low-level architecture-specific persistency semantics of the underlying hardware.

[1]  Thomas F. Wenisch,et al.  Memory persistency , 2014, 2014 ACM/IEEE 41st International Symposium on Computer Architecture (ISCA).

[2]  Leslie Lamport,et al.  How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs , 2016, IEEE Transactions on Computers.

[3]  Ori Lahav,et al.  On the Semantics of Snapshot Isolation , 2018, VMCAI.

[4]  Ankit Singla,et al.  Enabling Efficient RDMA-based Synchronous Mirroring of Persistent Memory Transactions , 2018, ArXiv.

[5]  Shaked Flur,et al.  Simplifying ARM concurrency: multicopy-atomic axiomatic and operational models for ARMv8 , 2017, Proc. ACM Program. Lang..

[6]  Terence Kelly,et al.  Failure-Atomic Persistent Memory Updates via JUSTDO Logging , 2016, ASPLOS.

[7]  Maurice Herlihy,et al.  Linearizability: a correctness condition for concurrent objects , 1990, TOPL.

[8]  Jishen Zhao,et al.  PMTest: A Fast and Flexible Testing Framework for Persistent Memory Programs , 2019, ASPLOS.

[9]  D. Stewart,et al.  The missing memristor found , 2008, Nature.

[10]  Xi Wang,et al.  Specifying and Checking File System Crash-Consistency Models , 2016, ASPLOS.

[11]  Takayuki Kawahara,et al.  Spin-transfer torque RAM technology: Review and prospect , 2012, Microelectron. Reliab..

[12]  Yuan Xie,et al.  Kiln: Closing the performance gap between systems with and without persistence support , 2013, 2013 46th Annual IEEE/ACM International Symposium on Microarchitecture (MICRO).

[13]  Peter Sewell,et al.  Mathematizing C++ concurrency , 2011, POPL '11.

[14]  Ori Lahav,et al.  On Parallel Snapshot Isolation and Release/Acquire Consistency , 2018, ESOP.

[15]  Avi Mendelson,et al.  Hardware Transactions in Nonvolatile Memory , 2015, DISC.

[16]  Thomas F. Wenisch,et al.  Delegated persist ordering , 2016, 2016 49th Annual IEEE/ACM International Symposium on Microarchitecture (MICRO).

[17]  Stratis Viglas,et al.  REWIND: Recovery Write-Ahead System for In-Memory Non-Volatile Data-Structures , 2015, Proc. VLDB Endow..

[18]  Christos H. Papadimitriou,et al.  The serializability of concurrent database updates , 1979, JACM.

[19]  Satish Narayanasamy,et al.  Persistency for synchronization-free regions , 2018, PLDI.

[20]  Onur Mutlu,et al.  Architecting phase change memory as a scalable dram alternative , 2009, ISCA '09.

[21]  Viktor Vafeiadis,et al.  Persistence semantics for weak memory: integrating epoch persistency with the TSO memory model , 2018, Proc. ACM Program. Lang..

[22]  Rajesh K. Gupta,et al.  NV-Heaps: making persistent objects fast and safe with next-generation, non-volatile memories , 2011, ASPLOS XVI.

[23]  Daniel Kroening,et al.  Don’t Sit on the Fence , 2013, ACM Trans. Program. Lang. Syst..

[24]  Terence Kelly,et al.  Dalí: A Periodically Persistent Hash Map , 2017, DISC.

[25]  Hans-Juergen Boehm,et al.  Persistence programming models for non-volatile memory , 2016, ISMM.

[26]  Christopher Frost,et al.  Better I/O through byte-addressable, persistent memory , 2009, SOSP '09.

[27]  Daniel Lustig,et al.  Automated Synthesis of Comprehensive Memory Model Litmus Test Suites , 2017, ASPLOS.

[28]  Hans-Juergen Boehm,et al.  Atlas: leveraging locks for non-volatile memory consistency , 2014, OOPSLA.

[29]  Thomas F. Wenisch,et al.  High-Performance Transactions for Persistent Memories , 2016, ASPLOS.

[30]  Jade Alglave,et al.  Litmus: Running Tests against Hardware , 2011, TACAS.

[31]  George A. Constantinides,et al.  Automatically comparing memory consistency models , 2017, POPL.

[32]  Francesco Zappa Nardelli,et al.  x86-TSO , 2010, Commun. ACM.

[33]  Andy Rudoff,et al.  Persistent Memory Programming , 2017, login Usenix Mag..

[34]  Maya Gokhale,et al.  Microscope on Memory: MPSoC-Enabled Computer Memory System Assessments , 2018, 2018 IEEE 26th Annual International Symposium on Field-Programmable Custom Computing Machines (FCCM).

[35]  Michael M. Swift,et al.  Mnemosyne: lightweight persistent memory , 2011, ASPLOS XVI.

[36]  John Wickerson,et al.  The semantics of transactions and weak memory in x86, Power, ARM, and C++ , 2017, PLDI.

[37]  Satish Narayanasamy,et al.  Language-level persistency , 2017, 2017 ACM/IEEE 44th Annual International Symposium on Computer Architecture (ISCA).

[38]  Francesco Zappa Nardelli,et al.  86-TSO : A Rigorous and Usable Programmer ’ s Model for x 86 Multiprocessors , 2010 .

[39]  Daniel Jackson,et al.  Software Abstractions - Logic, Language, and Analysis , 2006 .

[40]  A. L. Narasimha Reddy,et al.  SCMFS: A file system for Storage Class Memory , 2011, 2011 International Conference for High Performance Computing, Networking, Storage and Analysis (SC).

[41]  Anton Podkopaev,et al.  Bridging the gap between programming languages and hardware weak memory models , 2018, Proc. ACM Program. Lang..

[42]  Stratis Viglas,et al.  Efficient persist barriers for multicores , 2015, 2015 48th Annual IEEE/ACM International Symposium on Microarchitecture (MICRO).

[43]  Michael L. Scott,et al.  Linearizability of Persistent Memory Objects Under a Full-System-Crash Failure Model , 2016, DISC.

[44]  Jeehoon Kang,et al.  Repairing sequential consistency in C/C++11 , 2017, PLDI.

[45]  Youyou Lu,et al.  Empirical Study of Transactional Management for Persistent Memory , 2018, 2018 IEEE 7th Non-Volatile Memory Systems and Applications Symposium (NVMSA).

[46]  Ganesh Gopalakrishnan,et al.  GPU Concurrency: Weak Behaviours and Programming Assumptions , 2015, ASPLOS.

[47]  Anoop Gupta,et al.  Memory consistency and event ordering in scalable shared-memory multiprocessors , 1990, ISCA '90.