[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
research-article
Open access

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

Published: 10 October 2019 Publication History

Abstract

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.

Supplementary Material

a135-raad (a135-raad.webm)
Presentation at OOPSLA '19

References

[1]
Jade Alglave, Mark Batty, Alastair F. Donaldson, Ganesh Gopalakrishnan, Jeroen Ketema, Daniel Poetzl, Tyler Sorensen, and John Wickerson. 2015. GP U concurrency: Weak behaviours and programming assumptions. In 20th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS 2015). ACM, New York, NY, USA, 577–591.
[2]
Jade Alglave, Daniel Kroening, Vincent Nimal, and Daniel Poetzl. 2017. Don’t sit on the fence: A static analysis approach to automatic fence insertion. ACM Trans. Program. Lang. Syst. 39, 2, Article 6 (May 2017), 38 pages.
[3]
Jade Alglave, Luc Maranget, Susmit Sarkar, and Peter Sewell. 2011. Litmus: Running tests against hardware. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS 2011), Vol. 6605. Springer, 41–44.
[4]
ARM. 2018. ARM architecture reference manual ARMv8, for ARMv8-A architecture profile (DDI 0487D.a). https: //static.docs.arm.com/ddi0487/da/DDI0487D_a_armv8_arm.pdf
[5]
Hillel Avni, Eliezer Levy, and Avi Mendelson. 2015. Hardware transactions in nonvolatile memory. In 29th International Symposium on Distributed Computing (DISC 2015). Springer, 617–630.
[6]
Mark Batty, Scott Owens, Susmit Sarkar, Peter Sewell, and Tjark Weber. 2011. Mathematizing C++ concurrency. In 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2011). ACM, New York, NY, USA, 55–66.
[7]
Hans-J. Boehm and Dhruva R. Chakrabarti. 2016. Persistence programming models for non-volatile memory. In 2016 ACM SIGPLAN International Symposium on Memory Management (ISMM 2016). ACM, New York, NY, USA, 55–67.
[8]
James Bornholt, Antoine Kaufmann, Jialin Li, Arvind Krishnamurthy, Emina Torlak, and Xi Wang. 2016. Specifying and checking file system crash-consistency models. In 21st International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS 2016). ACM, 83–98.
[9]
Dhruva R. Chakrabarti, Hans-J. Boehm, and Kumud Bhandari. 2014. Atlas: Leveraging locks for non-volatile memory consistency. SIGPLAN Not. 49, 10 (Oct. 2014), 433–452.
[10]
Andreas Chatzistergiou, Marcelo Cintra, and Stratis D. Viglas. 2015. REWIND: Recovery write-ahead system for in-memory non-volatile data-structures. Proc. VLDB Endow. 8, 5 (Jan. 2015), 497–508.
[11]
Nathan Chong, Tyler Sorensen, and John Wickerson. 2018. The semantics of transactions and weak memory in x86, Power, ARM, and C++. In 39th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2018). ACM, New York, NY, USA, 211–225.
[12]
Joel Coburn, Adrian M. Caulfield, Ameen Akel, Laura M. Grupp, Rajesh K. Gupta, Ranjit Jhala, and Steven Swanson. 2011. NV-Heaps: Making persistent objects fast and safe with next-generation, non-volatile memories. SIGPLAN Not. 46, 3 (March 2011), 105–118.
[13]
Jeremy Condit, Edmund B. Nightingale, Christopher Frost, Engin Ipek, Benjamin Lee, Doug Burger, and Derrick Coetzee. 2009. Better I/O through byte-addressable, persistent memory. In ACM SIGOPS 22nd Symposium on Operating Systems Principles (SOSP 2009). ACM, New York, NY, USA, 133–146.
[14]
Harold Cooper. 2008. Persistent collections. https://pcollections.org/
[15]
Niall Douglas. 2018. P1026R0: A call for a data persistence (iostream v2) study group. http://www.open- std.org/jtc1/sc22/ wg21/docs/papers/2018/p1026r0.pdf
[16]
Kourosh Gharachorloo, Daniel Lenoski, James Laudon, Phillip Gibbons, Anoop Gupta, and John Hennessy. 1990. Memory consistency and event ordering in scalable shared-memory multiprocessors. SIGARCH Comput. Archit. News 18, 2SI (May 1990), 15–26.
[17]
Vaibhav Gogte, Stephan Diestelhorst, William Wang, Satish Narayanasamy, Peter M. Chen, and Thomas F. Wenisch. 2018. Persistency for Synchronization-free Regions. In 39th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2018). ACM, New York, NY, USA, 46–61.
[18]
Maurice P. Herlihy and Jeannette M. Wing. 1990. Linearizability: A correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst. 12, 3 (July 1990), 463–492.
[19]
Intel. 2014. Intel architecture instruction set extensions programming reference. https://software.intel.com/sites/default/ files/managed/07/b7/319433- 023.pdf
[20]
Intel. 2015. Persistent memory programming. http://pmem.io/
[21]
Intel. 2019. Intel 64 and IA-32 architectures software developer’s manual (Combined volumes). https://software.intel.com/ sites/default/files/managed/39/c5/325462- sdm- vol- 1- 2abcd- 3abcd.pdf
[22]
ITRS. 2011. Process integration, devices, and structures. http://www.maltiel- consulting.com/ITRS_2011- Process- IntegrationDevices- Structures.pdf International technology roadmap for semiconductors.
[23]
Joseph Izraelevitz, Terence Kelly, and Aasheesh Kolli. 2016a. Failure-atomic persistent memory updates via JUSTDO logging. In 21st International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS 2016). ACM, New York, NY, USA, 427–442.
[24]
Joseph Izraelevitz, Hammurabi Mendes, and Michael L. Scott. 2016b. Linearizability of persistent memory objects under a full-system-crash failure model. In 30th International Symposium on Distributed Computing (DISC 2016). Springer, 313–327.
[25]
Daniel Jackson. 2012. Software abstractions – Logic, language, and analysis (revised ed.). MIT Press.
[26]
Abhishek Kumar Jain, G. Scott Lloyd, and Maya Gokhale. 2018. Microscope on memory: MPSoC-enabled computer memory system assessments. In 26th IEEE Annual International Symposium on Field-Programmable Custom Computing Machines (FCCM 2018). IEEE, 173–180.
[27]
Arpit Joshi, Vijay Nagarajan, Marcelo Cintra, and Stratis Viglas. 2015. Efficient persist barriers for multicores. In 48th International Symposium on Microarchitecture (MICRO-48). ACM, New York, NY, USA, 660–671.
[28]
T. Kawahara, K. Ito, R. Takemura, and H. Ohno. 2012. Spin-transfer torque RAM technology: Review and prospect. Microelectronics Reliability 52, 4 (2012), 613 – 627.
[29]
Aasheesh Kolli, Vaibhav Gogte, Ali Saidi, Stephan Diestelhorst, Peter M. Chen, Satish Narayanasamy, and Thomas F. Wenisch. 2017. Language-level persistency. In 44th Annual International Symposium on Computer Architecture (ISCA 2017). ACM, New York, NY, USA, 481–493.
[30]
Aasheesh Kolli, Steven Pelley, Ali Saidi, Peter M. Chen, and Thomas F. Wenisch. 2016a. High-performance transactions for persistent memories. SIGPLAN Not. 51, 4 (March 2016), 399–411.
[31]
Aasheesh Kolli, Jeff Rosen, Stephan Diestelhorst, Ali Saidi, Steven Pelley, Sihang Liu, Peter M. Chen, and Thomas F. Wenisch. 2016b. Delegated persist ordering. In 49th Annual IEEE/ACM International Symposium on Microarchitecture (MICRO-49). IEEE Press, Piscataway, NJ, USA, Article 58, 13 pages.
[32]
Ori Lahav, Viktor Vafeiadis, Jeehoon Kang, Chung-Kil Hur, and Derek Dreyer. 2017. Repairing sequential consistency in C/C++11. In 38th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2017). ACM, New York, NY, USA, 618–632.
[33]
Leslie Lamport. 1979. How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Computers 28, 9 (Sept. 1979), 690–691.
[34]
Benjamin C. Lee, Engin Ipek, Onur Mutlu, and Doug Burger. 2009. Architecting phase change memory as a scalable dram alternative. In 36th Annual International Symposium on Computer Architecture (ISCA 2009). ACM, New York, NY, USA, 2–13.
[35]
Sihang Liu, Yizhou Wei, Jishen Zhao, Aasheesh Kolli, and Samira Manabi Khan. 2019. PMTest: A fast and flexible testing framework for persistent memory programs. In 24th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS 2019). ACM, 411–425.
[36]
Daniel Lustig, Andrew Wright, Alexandros Papakonstantinou, and Olivier Giroux. 2017. Automated synthesis of comprehensive memory model litmus test suites. In 22nd International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS 2017). ACM, 661–675.
[37]
Faisal Nawab, Joseph Izraelevitz, Terence Kelly, Charles B. Morrey, Dhruva R. Chakrabarti, and Michael L. Scott. 2017. Dalí: A periodically persistent hash map. In 31st International Symposium on Distributed Computing (DISC 2017) (LIPIcs), Vol. 91. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 37:1–37:16.
[38]
Christos H. Papadimitriou. 1979. The serializability of concurrent database updates. J. ACM 26, 4 (Oct. 1979), 631–653.
[39]
PCJ. 2016. Persistent collections for Java. https://github.com/pmem/pcj
[40]
Steven Pelley, Peter M. Chen, and Thomas F. Wenisch. 2014. Memory persistency. In 41st Annual International Symposium on Computer Architecuture (ISCA 2014). IEEE Press, Piscataway, NJ, USA, 265–276. http://dl.acm.org/citation.cfm?id= 2665671.2665712
[41]
Anton Podkopaev, Ori Lahav, and Viktor Vafeiadis. 2019. Bridging the gap between programming languages and hardware weak memory models. Proc. ACM Program. Lang. 3, POPL, Article 69 (Jan. 2019), 31 pages.
[42]
Christopher Pulte, Shaked Flur, Will Deacon, Jon French, Susmit Sarkar, and Peter Sewell. 2018. Simplifying ARM concurrency: Multicopy-atomic axiomatic and operational models for ARMv8. Proc. ACM Program. Lang. 2, POPL, Article 19 (Dec. 2018), 29 pages.
[43]
Azalea Raad, Ori Lahav, and Viktor Vafeiadis. 2018. On parallel snapshot isolation and release/acquire consistency. In Programming Languages and Systems (ESOP 2018). Springer, 940–967.
[44]
Azalea Raad, Ori Lahav, and Viktor Vafeiadis. 2019. On the semantics of snapshot isolation. In Verification, Model Checking, and Abstract Interpretation (VMCAI 2019). Springer, 1–23.
[45]
Azalea Raad and Viktor Vafeiadis. 2018. Persistence semantics for weak memory: Integrating epoch persistency with the TSO memory model. Proc. ACM Program. Lang. 2, OOPSLA, Article 137 (Oct. 2018), 27 pages.
[46]
Peter Sewell, Susmit Sarkar, Scott Owens, Francesco Zappa Nardelli, and Magnus O. Myreen. 2010. X86-TSO: A rigorous and usable programmer’s model for x86 multiprocessors. Commun. ACM 53, 7 (July 2010), 89–97.
[47]
Hongping Shu, Hongyu Chen, Hao Liu, Youyou Lu, Qingda Hu, and Jiwu Shu. 2018. Empirical study of transactional management for persistent memory. In 7th Non-Volatile Memory Systems and Applications Symposium (NVMSA 2018). IEEE, 61–66.
[48]
D. B. Strukov, G. S. Snider, D. R. Stewart, and R. S. Williams. 2008. The missing memristor found. Nature 453 (2008), 80 – 83.
[49]
Arash Tavakkol, Aasheesh Kolli, Stanko Novakovic, Kaveh Razavi, Juan Gómez-Luna, Hasan Hassan, Claude Barthels, Yaohua Wang, Mohammad Sadrosadati, Saugata Ghose, Ankit Singla, Pratap Subrahmanyam, and Onur Mutlu. 2018. Enabling efficient RDMA-based synchronous mirroring of persistent memory transactions. CoRR abs/1810.09360 (2018). arXiv: 1810.09360
[50]
Haris Volos, Andres Jaan Tack, and Michael M. Swift. 2011. Mnemosyne: Lightweight persistent memory. SIGPLAN Not. 47, 4 (March 2011), 91–104.
[51]
John Wickerson, Mark Batty, Tyler Sorensen, and George A. Constantinides. 2017. Automatically comparing memory consistency models. In 44th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2017). 190–204.
[52]
Xiaojian Wu and A. L. Narasimha Reddy. 2011. SCMFS: A file system for storage class memory. In 2011 International Conference for High Performance Computing, Networking, Storage and Analysis (SC 2011). ACM, New York, NY, USA, Article 39, 11 pages.
[53]
Jishen Zhao, Sheng Li, Doe Hyun Yoon, Yuan Xie, and Norman P. Jouppi. 2013. Kiln: Closing the performance gap between systems with and without persistence support. In 46th Annual IEEE/ACM International Symposium on Microarchitecture (MICRO-46). ACM, New York, NY, USA, 421–432.

Cited By

View all
  • (2024)Compositionality and Observational Refinement for Linearizability with CrashesProceedings of the ACM on Programming Languages10.1145/36897928:OOPSLA2(2296-2324)Online publication date: 8-Oct-2024
  • (2024)Semantics of Remote Direct Memory Access: Operational and Declarative Models of RDMA on TSO ArchitecturesProceedings of the ACM on Programming Languages10.1145/36897818:OOPSLA2(1982-2009)Online publication date: 8-Oct-2024
  • (2024)Challenges in Empirically Testing Memory Persistency ModelsProceedings of the 2024 ACM/IEEE 44th International Conference on Software Engineering: New Ideas and Emerging Results10.1145/3639476.3639765(82-86)Online publication date: 14-Apr-2024
  • Show More Cited By

Index Terms

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

        Recommendations

        Comments

        Please enable JavaScript to view thecomments powered by Disqus.

        Information & Contributors

        Information

        Published In

        cover image Proceedings of the ACM on Programming Languages
        Proceedings of the ACM on Programming Languages  Volume 3, Issue OOPSLA
        October 2019
        2077 pages
        EISSN:2475-1421
        DOI:10.1145/3366395
        Issue’s Table of Contents
        This work is licensed under a Creative Commons Attribution International 4.0 License.

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        Published: 10 October 2019
        Published in PACMPL Volume 3, Issue OOPSLA

        Permissions

        Request permissions for this article.

        Check for updates

        Author Tags

        1. ARMv8
        2. memory persistency
        3. non-volatile memory
        4. weak memory

        Qualifiers

        • Research-article

        Funding Sources

        Contributors

        Other Metrics

        Bibliometrics & Citations

        Bibliometrics

        Article Metrics

        • Downloads (Last 12 months)84
        • Downloads (Last 6 weeks)7
        Reflects downloads up to 21 Dec 2024

        Other Metrics

        Citations

        Cited By

        View all
        • (2024)Compositionality and Observational Refinement for Linearizability with CrashesProceedings of the ACM on Programming Languages10.1145/36897928:OOPSLA2(2296-2324)Online publication date: 8-Oct-2024
        • (2024)Semantics of Remote Direct Memory Access: Operational and Declarative Models of RDMA on TSO ArchitecturesProceedings of the ACM on Programming Languages10.1145/36897818:OOPSLA2(1982-2009)Online publication date: 8-Oct-2024
        • (2024)Challenges in Empirically Testing Memory Persistency ModelsProceedings of the 2024 ACM/IEEE 44th International Conference on Software Engineering: New Ideas and Emerging Results10.1145/3639476.3639765(82-86)Online publication date: 14-Apr-2024
        • (2024)Skip It: Take Control of Your Cache!Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 210.1145/3620665.3640407(1077-1094)Online publication date: 27-Apr-2024
        • (2024)A verified durable transactional mutex lock for persistent x86-TSOFormal Methods in System Design10.1007/s10703-024-00462-1Online publication date: 31-Jul-2024
        • (2024)Specifying and Verifying Persistent LibrariesProgramming Languages and Systems10.1007/978-3-031-57267-8_8(185-211)Online publication date: 5-Apr-2024
        • (2024)Intel PMDK Transactions: Specification, Validation and ConcurrencyProgramming Languages and Systems10.1007/978-3-031-57267-8_6(150-179)Online publication date: 6-Apr-2024
        • (2023)Spirea: A Mechanized Concurrent Separation Logic for Weak Persistent MemoryProceedings of the ACM on Programming Languages10.1145/36228207:OOPSLA2(632-657)Online publication date: 16-Oct-2023
        • (2023)A Type System for Safe Intermittent ComputingProceedings of the ACM on Programming Languages10.1145/35912507:PLDI(736-760)Online publication date: 6-Jun-2023
        • (2023)Taking Back Control in an Intermediate Representation for GPU ComputingProceedings of the ACM on Programming Languages10.1145/35712537:POPL(1740-1769)Online publication date: 11-Jan-2023
        • Show More Cited By

        View Options

        View options

        PDF

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader

        Login options

        Full Access

        Media

        Figures

        Other

        Tables

        Share

        Share

        Share this Publication link

        Share on social media