skip to main content
10.1145/3459898.3463903acmconferencesArticle/Chapter ViewAbstractPublication PagesismmConference Proceedingsconference-collections
research-article

Fusuma: double-ended threaded compaction

Published:22 June 2021Publication History

ABSTRACT

Jonkers's threaded compaction is attractive in the context of memory-constrained embedded systems because of its space efficiency. However, it cannot be applied to a heap where ordinary objects and meta-objects are intermingled for the following reason. It requires the object layout information, which is often stored in meta-objects, to update pointer fields inside objects correctly. Because Jonkers's threaded compaction reverses pointer directions during garbage collection (GC), it cannot follow the pointers to obtain the object layout. This paper proposes Fusuma, a double-ended threaded compaction that allows ordinary objects and meta-objects to be allocated in the same heap. Its key idea is to segregate ordinary objects at one end of the monolithic heap and meta-objects at the other to make it possible to separate the phases of threading pointers in ordinary objects and meta-objects. Much like Jonkers's threaded compaction, Fusuma does not require any additional space for each object. We implemented it in eJSVM, a JavaScript virtual machine for embedded systems, and compared its performance with eJSVM using mark-sweep GC. As a result, compaction enabled an IoT-oriented benchmark program to run in a 28-KiB heap, which is 20 KiB smaller than mark-sweep GC. We also confirmed that the GC overhead of Fusuma was less than 2.50x that of mark-sweep GC.

References

  1. Bowen Alpern, Steve Augart, Stephen M. Blackburn, Maria A. Butrico, Anthony Cocchi, Perry Cheng, Julian Dolby, Stephen J. Fink, David Grove, Michael Hind, Kathryn S. McKinley, Mark F. Mergen, J. Eliot B. Moss, Ton Anh Ngo, Vivek Sarkar, and Martin Trapp. 2005. The Jikes Research Virtual Machine project: Building an open-source research community. IBM Syst. J., 44, 2 (2005), 399–418. https://doi.org/10.1147/sj.442.0399 Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. David F. Bacon, Perry Cheng, and V. T. Rajan. 2003. Controlling fragmentation and space consumption in the metronome, a real-time garbage collector for Java. In Proceedings of the 2003 Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES 2003). ACM, 81–92. https://doi.org/10.1145/780732.780744 Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Stephen M. Blackburn, Perry Cheng, and Kathryn S. McKinley. 2004. Oil and Water? High Performance Garbage Collection in Java with MMTk. In 26th International Conference on Software Engineering (ICSE 2004). IEEE Computer Society, 137–146. https://doi.org/10.1109/ICSE.2004.1317436 Google ScholarGoogle ScholarCross RefCross Ref
  4. Craig Chambers, David M. Ungar, and Elgin Lee. 1989. An Efficient Implementation of SELF – a Dynamically-Typed Object-Oriented Language Based on Prototypes. In Conference Proceedings on Object-Oriented Programming: Systems, Languages, and Applications (OOPSLA 1989). ACM, 49–70. https://doi.org/10.1145/74877.74884 Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Chris J. Cheney. 1970. A Nonrecursive List Compacting Algorithm. Commun. ACM, 13, 11 (1970), 677–678. https://doi.org/10.1145/362790.362798 Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Daniel Clifford, Hannes Payer, Michael Stanton, and Ben L. Titzer. 2015. Memento mori: dynamic allocation-site-based optimizations. In Proceedings of the 2015 ACM SIGPLAN International Symposium on Memory Management (ISMM 2015). ACM, 105–117. https://doi.org/10.1145/2754169.2754181 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Ulan Degenbaev, Michael Lippautz, and Hannes Payer. 2019. Concurrent marking of shape-changing objects. In Proceedings of the 2019 ACM SIGPLAN International Symposium on Memory Management (ISMM 2019). ACM, 89–102. https://doi.org/10.1145/3315573.3329978 Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. David Detlefs, Christine H. Flood, Steve Heller, and Tony Printezis. 2004. Garbage-first garbage collection. In Proceedings of the 4th International Symposium on Memory Management (ISMM 2004). ACM, 37–48. https://doi.org/10.1145/1029873.1029879 Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. L. Peter Deutsch and Allan M. Schiffman. 1984. Efficient Implementation of the Smalltalk-80 System. In Proceedings of the 11th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL 1984). ACM, 297–302. https://doi.org/10.1145/800017.800542 Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Bruce K. Haddon and William M. Waite. 1967. A Compaction Procedure for Variable-Length Storage Elements. Comput. J., 10, 2 (1967), 162–165. https://doi.org/10.1093/comjnl/10.2.162 Google ScholarGoogle ScholarCross RefCross Ref
  11. Urs Hölzle, Craig Chambers, and David M. Ungar. 1991. Optimizing Dynamically-Typed Object-Oriented Languages With Polymorphic Inline Caches. In ECOOP’91 European Conference on Object-Oriented Programming (Lecture Notes in Computer Science, Vol. 512). Springer, 21–38. https://doi.org/10.1007/BFb0057013 Google ScholarGoogle ScholarCross RefCross Ref
  12. H. B. M. Jonkers. 1979. A Fast Garbage Compaction Algorithm. Inf. Process. Lett., 9, 1 (1979), 26–30. https://doi.org/10.1016/0020-0190(79)90103-0 Google ScholarGoogle ScholarCross RefCross Ref
  13. Haim Kermany and Erez Petrank. 2006. The Compressor: concurrent, incremental, and parallel compaction. In Proceedings of the 27th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2006). ACM, 354–363. https://doi.org/10.1145/1133981.1134023 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Donald Ervin Knuth. 1997. The art of computer programming, Volume I: Fundamental Algorithms, 3rd Edition. Addison-Wesley. isbn:0201896834 https://www.worldcat.org/oclc/312910844Google ScholarGoogle Scholar
  15. Bernard Lang and Francis Dupont. 1987. Incremental incrementally compacting garbage collection. In Proceedings of the Symposium on Interpreters and Interpretive Techniques. ACM, 253–263. https://doi.org/10.1145/29650.29677 Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Stefan Marr, Benoit Daloze, and Hanspeter Mössenböck. 2016. Cross-Language Compiler Benchmarking—Are We Fast Yet? In Proceedings of the 12th Symposium on Dynamic Languages (DLS 2016). ACM, 120–131. isbn:978-1-4503-4445-6 https://doi.org/10.1145/2989225.2989232 Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Hiro Onozawa, Hideya Iwasaki, and Tomoharu Ugawa. 2021. Customizing JavaScript Virtual Machines for Specific Applications and Execution Environments. Computer Software, 38, 3 (2021), to appear (in Japanese).Google ScholarGoogle Scholar
  18. Hiro Onozawa, Tomoharu Ugawa, and Hideya Iwasaki. 2021. Fusuma: Double-Ended Threaded Compaction (Full Version). https://ipl.cs.uec.ac.jp/~iwasaki/eJS/technical-report/Fusuma.pdfGoogle ScholarGoogle Scholar
  19. Tony Printezis. 2001. Hot-Swapping Between a Mark&Sweep and a Mark&Compact Garbage Collector in a Generational Environment. In Proceedings of the 1st Java Virtual Machine Research and Technology Symposium. USENIX. http://www.usenix.org/publications/library/proceedings/jvm01/printezis.htmlGoogle ScholarGoogle Scholar
  20. Tomoharu Ugawa, Hideya Iwasaki, and Takafumi Kataoka. 2019. eJSTK: Building JavaScript virtual machines with customized datatypes for embedded systems. J. Comput. Lang., 51 (2019), 261–279. https://doi.org/10.1016/j.cola.2019.01.003 Google ScholarGoogle ScholarCross RefCross Ref
  21. Tomoharu Ugawa, Carl G. Ritson, and Richard E. Jones. 2018. Transactional Sapphire: Lessons in High-Performance, On-the-fly Garbage Collection. ACM Trans. Program. Lang. Syst., 40, 4 (2018), 15:1–15:56. https://doi.org/10.1145/3226225 Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Fusuma: double-ended threaded compaction

      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 Conferences
        ISMM 2021: Proceedings of the 2021 ACM SIGPLAN International Symposium on Memory Management
        June 2021
        106 pages
        ISBN:9781450384483
        DOI:10.1145/3459898

        Copyright © 2021 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: 22 June 2021

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate72of156submissions,46%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader