skip to main content
research-article
Free Access

HRF-Relaxed: Adapting HRF to the Complexities of Industrial Heterogeneous Memory Models

Published:16 April 2015Publication History
Skip Abstract Section

Abstract

Memory consistency models, or memory models, allow both programmers and program language implementers to reason about concurrent accesses to one or more memory locations. Memory model specifications balance the often conflicting needs for precise semantics, implementation flexibility, and ease of understanding. Toward that end, popular programming languages like Java, C, and C++ have adopted memory models built on the conceptual foundation of Sequential Consistency for Data-Race-Free programs (SC for DRF). These SC for DRF languages were created with general-purpose homogeneous CPU systems in mind, and all assume a single, global memory address space. Such a uniform address space is usually power and performance prohibitive in heterogeneous Systems on Chips (SoCs), and for that reason most heterogeneous languages have adopted split address spaces and operations with nonglobal visibility.

There have recently been two attempts to bridge the disconnect between the CPU-centric assumptions of the SC for DRF framework and the realities of heterogeneous SoC architectures. Hower et al. proposed a class of Heterogeneous-Race-Free (HRF) memory models that provide a foundation for understanding many of the issues in heterogeneous memory models. At the same time, the Khronos Group developed the OpenCL 2.0 memory model that builds on the C++ memory model. The OpenCL 2.0 model includes features not addressed by HRF: primarily support for relaxed atomics and a property referred to as scope inclusion. In this article, we generalize HRF to allow formalization of and reasoning about more complicated models using OpenCL 2.0 as a point of reference. With that generalization, we (1) make the OpenCL 2.0 memory model more accessible by introducing a platform for feature comparisons to other models, (2) consider a number of shortcomings in the current OpenCL 2.0 model, and (3) propose changes that could be adopted by future OpenCL 2.0 revisions or by other, related, models.

References

  1. Sarita Adve. 2010. Data races are evil with no exceptions: Technical perspective. Commun. ACM 53, 11 (Nov. 2010), 84--84. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Sarita V. Adve and Mark D. Hill. 1990. Weak ordering—a new definition. In Proceedings of the International Symposium on Computer Architecture. ACM, New York, NY, 2--14. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Hans-J. Boehm. 2013. N3710: Specifying the absence of out of thin air results (LWG2265).Google ScholarGoogle Scholar
  4. Hans-J. Boehm and S. V Adve. 2008. Foundations of the C++ concurrency memory model. In Proceedings of the International Symposium on Programming Language Design and Implementation. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Hans-J. Boehm and Brian Demsky. 2014. Outlawing ghosts: Avoiding out-of-thin-air results. In Proceedings of the Workshop on Memory Systems Performance and Correctness (MSPC’14). ACM, New York, NY, Article 7, 6 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Benedict R. Gaster, Derek Hower, and Lee Howes. 2015. HRF-Relaxed: Adapting HRF to the complexities of industrial heterogeneous memory models (Supplemental material). (Jan. 2015). Retrieved from http://benedictgaster.org/?page_id=278.Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Kourosh Gharachorloo, Daniel Lenoski, James Laudon, Phillip Gibbons, Anoop Gupta, and John Hennessy. 1990. Memory consistency and event ordering in scalable shared-memory multiprocessors. In Proceedings of the 17th Annual International Symposium on Computer Architecture (ISCA’90). ACM, New York, NY, 15--26. DOI:http://dx.doi.org/10.1145/325164.325102 Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Blake A. Hechtman, Shuai Che, Derek R. Hower, Yingying Tian, Bradford M. Beckmann, Mark D. Hill, Steven K. Reinhardt, and David A. Wood. 2014. QuickRelease: A throughput-oriented approach to release consistency on GPUs. In HPCA. 189--200.Google ScholarGoogle Scholar
  9. Derek R. Hower, Blake A. Hechtman, Bradford M. Beckmann, Benedict R. Gaster, Mark D. Hill, Steven K. Reinhardt, and David A. Wood. 2014. Heterogeneous-race-free memory models. In Proceedings of the 19th International Conference on Architectural Support for Programming Languages and Operating Systems (APLOS’14). ACM, New York, NY, 427--40. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. HSA Foundation. 2012. Heterogeneous System Architecture: A Technical Review.Google ScholarGoogle Scholar
  11. ISO. International Organization for Standardization. 2011. ISO/IEC 14882:2011 information technology—programming languages—C++.Google ScholarGoogle Scholar
  12. Leslie Lamport. 1979. A new approach to proving the correctness of multiprocess programs. ACM Trans. Program. Lang. Syst. 1, 1 (Jan. 1979), 84--97. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Brandon Lucia, Luis Ceze, Karin Strauss, Shaz Qadeer, and Hans-J. Boehm. 2010. Conflict exceptions: Simplifying concurrent language semantics with precise hardware exceptions for data-races. In Proceedings of the 37th Annual International Symposium on Computer Architecture (ISCA’10). ACM, New York, NY, 210--221. DOI:http://dx.doi.org/10.1145/1815961.1815987 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Daniel Marino, Abhayendra Singh, Todd Millstein, Madanlal Musuvathi, and Satish Narayanasamy. 2010. DRFX: A simple and efficient memory model for concurrent programming languages. In Proceedings of the 2010 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI’10). ACM, New York, NY, 351--362. DOI:http://dx.doi.org/10.1145/1806596.1806636 Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. NVIDIA Corporation. 2013. CUDA 5.5 C Programming Guide.Google ScholarGoogle Scholar
  16. Oracle. 2014. The Java Langauge Specification.Google ScholarGoogle Scholar
  17. Herb Sutter. 2012. Atomic weapons: The C++ memory model and modern hardware. In C++ and Beyond.Google ScholarGoogle Scholar

Index Terms

  1. HRF-Relaxed: Adapting HRF to the Complexities of Industrial Heterogeneous Memory Models

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image ACM Transactions on Architecture and Code Optimization
          ACM Transactions on Architecture and Code Optimization  Volume 12, Issue 1
          April 2015
          201 pages
          ISSN:1544-3566
          EISSN:1544-3973
          DOI:10.1145/2744295
          Issue’s Table of Contents

          Copyright © 2015 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 16 April 2015
          • Accepted: 1 January 2015
          • Revised: 1 December 2014
          • Received: 1 July 2014
          Published in taco Volume 12, Issue 1

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article
          • Research
          • Refereed

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader