skip to main content
10.1145/1620405.1620419acmotherconferencesArticle/Chapter ViewAbstractPublication PagesjtresConference Proceedingsconference-collections
research-article

Data caching, garbage collection, and the Java memory model

Published:23 September 2009Publication History

ABSTRACT

Multiprocessors often feature weaker memory models than sequential consistency. Relaxed memory models can be implemented more efficiently and allow more optimizations. The Java memory model is a relaxed memory model that is a natural choice for a Java processor. In this paper, we show that a data cache that obeys the restrictions of the Java memory model can be implemented efficiently. The proposed implementation requires only local actions to ensure data consistency and is therefore timing analysis friendly.

Furthermore, we investigate the impact of the proposed data cache design on the correctness of real-time garbage collection. Relaxed memory models must to be taken into account when initializing and moving objects during heap compaction. Also, write barriers and the start of a garbage collection cycle require careful design under the Java memory model.

References

  1. S. V. Adve and K. Gharachorloo. Shared memory consistency models: A tutorial. Computer, 29(12):66--76, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. J. Auerbach, D. F. Bacon, P. Cheng, D. Grove, B. Biron, C. Gracie, B. McCloskey, A. Micic, and R. Sciampacone. Tax-and-spend: Democratic scheduling for real-time garbage collection. In Proceedings of the 7th ACM International Conference on Embedded software, pages 245--254, Atlanta, GA, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. H. Azatchi, Y. Levanoni, H. Paz, and E. Petrank. An on-the-fly mark and sweep garbage collector based on sliding view. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, Anaheim, CA, USA, Nov. 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. F. Bacon, P. Cheng, and V. Rajan. A real-time garbage collecor with low overhead and consistent utilization. In Conference Record of the Thirtieth Annual ACM Symposium on Principles of Programming Languages, ACM SIGPLAN Notices 38(1), New Orleans, LA, USA, Jan. 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. K. Barabash, O. Ben-Yitzhak, I. Goft, E. K. Kolodner, V. Leikehman, Y. Ossia, A. Owshanko, and E. Petrank. A parallel, incremental, mostly concurrent garbage collector for servers. ACM Transactions on Programming Languages and Systems, 27(6): 1097--1146, Nov. 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. P. Cenciarelli, A. Knapp, and E. Sibilio. The Java memory model: Operationally, denotationally, axiomatically. Lecture Notes in Computer Science, 4421:331, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. P. Cheng. Scalable Real-Time Parallel Garbage Collection for Symmetric Multiprocessors. PhD thesis, Carnegie Mellon University, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. E. W. Dijkstra, L. Lamport, A. J. Martin, C. S. Scholten, and E. F. M. Steffens. On-the-fly garbage collection: An exercise in cooperation. Communications of the ACM, 21(11):965--975, Nov. 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. D. Doligez and G. Gonthier. Portable, unobtrusive garbage collection for multiprocessor systems. In Conference Record of the Twenty-First Annual ACM Symposium on Principles of Programming Languages, Portland, OR, USA, Jan. 1994. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. D. Doligez and X. Leroy. A concurrent generational garbage collector for a multi-threaded implementation of ML. In Conference Record of the Twentieth Annual ACM Symposium on Principles of Programming Languages, pages 113--123, Charleston, SC, USA, Jan. 1993. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. K. Gharachorloo, D. Lenoski, J. Laudon, P. Gibbons, A. Gupta, and J. Hennessy. Memory consistency and event ordering in scalable shared-memory multiprocessors. SIGARCH Comput. Archit. News, 18(3a):15--26, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. J. Gosling, B. Joy, G. Steele, and G. Bracha. The Java Language Specification, Third Edition. The Java Series. Addison-Wesley Professional, Boston, Mass., 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. R. Heckmann, M. Langenbach, S. Thesing, and R. Wilhelm. The influence of processor architecture on the design and results of WCET tools. Proceedings of the IEEE, 91(7): 1038--1054, Jul. 2003.Google ScholarGoogle ScholarCross RefCross Ref
  14. Intel Corporation. Intel 64 and IA-32 Architectures Software Developer's Manual - Volume 3A: System Programming Guide, Part 1, March 2009.Google ScholarGoogle Scholar
  15. P. Keleher, A. L. Cox, and W. Zwaenepoel. Lazy release consistency for software distributed shared memory. In ISCA '92: Proceedings of the 19th annual international symposium on Computer architecture, pages 13--21, New York, NY, USA, 1992. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. D. Lea. The JSR-133 cookbook for compiler writers. Available at http://gee.cs.oswego.edu/dl/jmm/cookbook.html. Accessed June 24, 2009.Google ScholarGoogle Scholar
  17. Y. Levanoni and E. Petrank. An on-the-fly reference counting garbage collector for Java. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, ACM SIGPLAN Notices 36(11), Tampa, FL, USA, Nov. 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. J. Manson. The Java memory model. PhD thesis, University of Maryland, College Park, MD, USA, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. C. Pitter. Time-Predictable Java Chip-Multiprocessor. PhD thesis, Vienna University of Technology, Austria, 2009.Google ScholarGoogle Scholar
  20. W. Puffitsch and M. Schoeberl. Non-blocking root scanning for real-time garbage collection. In Proceedings of the 6th International Workshop on Java Technologies for Real-time and Embedded Systems (JTRES 2008), September 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. J. Reineke, D. Grand, C. Berg, and R. Wilhelm. Timing predictability of cache replacement policies. Journal of Real-Time Systems, 37(2):99--122, Nov. 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. M. Schoeberl. Real-time garbage collection for Java. In Proceedings of the 9th IEEE International Symposium on Object and Component-Oriented Real-Time Distributed Computing (ISORC 2006), pages 424--432, Gyeongju, Korea, Apr. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. M. Schoeberl. A Java processor architecture for embedded real-time systems. Journal of Systems Architecture, 54/1--2:265--286, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. M. Schoeberl. Time-predictable cache organization. In Proceedings of the First International Workshop on Software Technologies for Future Dependable Distributed Systems (STFSSD 2009), Tokyo, Japan, March 2009. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. J. Sevcik and D. Aspinall. On validity of program transformations in the Java memory model. In Ecoop 2008-Object-Oriented Programming: 22nd European Conference Paphos, Cyprus, July 7--11, 2008, Proceedings, page 27. Springer, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. F. Siebert. Hard Realtime Garbage Collection in Modern Object Oriented Programming Languages. aicas Books, 2002.Google ScholarGoogle Scholar
  27. T. Yuasa. Real-time garbage collection on general-purpose machines. Journal of Systems and Software, 11(3):181--198, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Data caching, garbage collection, and the Java memory model

          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
          • Published in

            cover image ACM Other conferences
            JTRES '09: Proceedings of the 7th International Workshop on Java Technologies for Real-Time and Embedded Systems
            September 2009
            194 pages
            ISBN:9781605587325
            DOI:10.1145/1620405

            Copyright © 2009 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 ACM 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: 23 September 2009

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article

            Acceptance Rates

            Overall Acceptance Rate50of70submissions,71%

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader