skip to main content
research-article

Eliminating read barriers through procrastination and cleanliness

Published:15 June 2012Publication History
Skip Abstract Section

Abstract

Managed languages typically use read barriers to interpret forwarding pointers introduced to keep track of copied objects. For example, in a multicore environment with thread-local heaps and a global, shared heap, an object initially allocated on a local heap may be copied to a shared heap if it becomes the source of a store operation whose target location resides on the shared heap. As part of the copy operation, a forwarding pointer may be established in the original object to point to the copied object. This level of indirection avoids the need to update all of the references to the object that has been copied.

In this paper, we consider the design of a managed runtime that eliminates read barriers. Our design is premised on the availability of a sufficient degree of concurrency to stall operations that would otherwise necessitate the copy. Stalled actions are deferred until the next local collection, avoiding exposing forwarding pointers to the mutator. In certain important cases, procrastination is unnecessary -- lightweight runtime techniques can sometimes be used to allow objects to be eagerly copied when their set of incoming references is known, or when it can be determined that having multiple copies would not violate program semantics.

We evaluate our techniques on 3 platforms: a 16-core AMD64 machine, a 48-core Intel SCC, and an 864-core Azul Vega 3. Experimental results over a range of parallel benchmarks indicate that our approach leads to notable performance gains (20 - 32% on average) without incurring any additional complexity.

References

  1. T. A. Anderson. Optimizations in a Private Nursery-based Garbage Collector. In ISMM, pages 21--30, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. A. W. Appel. Simple Generational Garbage Collection and Fast Allocation. Software Practice and Experience, 19: 171--183, February 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. S. Auhagen, L. Bergstrom, M. Fluet, and J. Reppy. Garbage Collection for Multicore NUMA Machines. In Workshop on Memory Systems Performance and Correctness, pages 51--57, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. F. Bacon, P. Cheng, and V. T. Rajan. A Real-Time Garbage Collector with Low Overhead and Consistent Utilization. In POPL, pages 285--298, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. H. G. Baker, Jr. List Processing in Real Time on a Serial Computer. Communication of the ACM, 21: 280--294, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. S. M. Blackburn and A. L. Hosking. Barriers: Friend or Foe? In ISMM, pages 143--151, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. H. Boehm. A Garbage Collector for C and C, 2012. URL http://www.hpl.hp.com/personal/Hans_Boehm/gcGoogle ScholarGoogle Scholar
  8. R. A. Brooks. Trading Data Space for Reduced Time and Code Space in Real-Time Garbage Collection on Stock Hardware. In Lisp and Functional Programming, pages 256--262, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. D. Doligez and X. Leroy. A Concurrent, Generational Garbage Collector for a Multithreaded Implementation of ML. In POPL, pages 113--123, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. L. Gidra, G. Thomas, J. Sopena, and M. Shapiro. Assessing the scalability of garbage collectors on many cores. SIGOPS Operating Systems Review, 45 (3): 15--19, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. P. Hartel, M. Feeley, M. Alt, and L. Augustsson. Benchmarking Implementations of Functional Languages with "Pseudoknot", a Float-Intensive Benchmark. Journal of Functional Programming, 6 (4): 621--655, 1996.Google ScholarGoogle ScholarCross RefCross Ref
  12. Intel. SCC Platform Overview, 2012. URL http://communities.intel.com/docs/DOC-5512.Google ScholarGoogle Scholar
  13. R. Jones and A. C. King. A Fast Analysis for Thread-Local Garbage Collection with Dynamic Class Loading. In International Workshop on Source Code Analysis and Manipulation, pages 129--138, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. S. Marlow and S. Peyton Jones. Multicore Garbage Collection with Local Heaps. In ISMM, pages 21--32, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. R. Milner, M. Tofte, and D. Macqueen. The Definition of Standard ML. MIT Press, Cambridge, MA, USA, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. MLton. The MLton Compiler and Runtime System, 2012. URL http://www.mlton.org.Google ScholarGoogle Scholar
  17. MultiMLton. MLton for Scalable Multicore Architectures, 2012. URL http://multimlton.cs.purdue.edu.Google ScholarGoogle Scholar
  18. J. Reppy. Concurrent Programming in ML. Cambridge University Press, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. P. M. Sansom. Dual-Mode Garbage Collection. In Proceedings of the Workshop on the Parallel Implementation of Functional Languages, pages 283--310, 1991.Google ScholarGoogle Scholar
  20. F. Siebert. Limits of parallel marking garbage collection. In ISMM, pages 21--29, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. G. L. Steele, Jr. Multiprocessing Compactifying Garbage Collection. Communcations of the ACM, 18: 495--508, September 1975. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. B. Steensgaard. Thread-Specific Heaps for Multi-Threaded Programs. In ISMM, pages 18--24, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Streambench. The STREAM Benchmark: Computer Memory Bandwidth, 2012. URL http://http://www.streambench.org/.Google ScholarGoogle Scholar
  24. L. Ziarek, K. Sivaramakrishnan, and S. Jagannathan. Composable Asynchronous Events. In PLDI, pages 628--639, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Eliminating read barriers through procrastination and cleanliness

    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

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!