Deep Dive into ZGC: A Modern Garbage Collector in OpenJDK

Author:

Yang Albert Mingkun1ORCID,Wrigstad Tobias2ORCID

Affiliation:

1. Oracle, Stockholm, Sweden

2. Uppsala University, Uppsala, Sweden

Abstract

ZGC is a modern, non-generational, region-based, mostly concurrent, parallel, mark-evacuate collector recently added to OpenJDK. It aims at having GC pauses that do not grow as the heap size increases, offering low latency even with large heap sizes. The ZGC C++ source code is readily accessible in the OpenJDK repository, but reading it (25 KLOC) can be very intimidating, and one might easily get lost in low-level implementation details, obscuring the key concepts. To make the ZGC algorithm more approachable, this work provides a thorough description on a high-level, focusing on the overall design with moderate implementation details. To explain the concurrency aspects, we provide a SPIN model that allows studying races between mutators and GC threads, and how they are resolved in ZGC. Such a model is not only useful for learning the current design (offering a deterministic and interactive experience) but also beneficial for prototyping new ideas and extensions. Our hope is that our detailed description and the SPIN model will enable the use of ZGC as a building block for future GC research, and research ideas implemented on top of it could even be adopted in the industry more readily, bridging the gap between academia and industry in the context of GC research.

Funder

Swedish Foundation for Strategic Research

Publisher

Association for Computing Machinery (ACM)

Subject

Software

Reference31 articles.

1. List processing in real time on a serial computer

2. Myths and realities

3. Roman Kennke and Christine H. Flood. 2014. JEP 189: Shenandoah: A Low-Pause-Time Garbage Collector (Experimental). Retrieved from http://openjdk.java.net/jeps/189.

4. Iris Clark Roman Kennke and Aleksey Shipilev. 2021. Shenandoah GC. Retrieved 16 may 2020 from https://wiki.openjdk.java.net/display/shenandoah.

Cited by 6 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Encore: Coda;Lecture Notes in Computer Science;2024

2. Partial Failure Resilient Memory Management System for (CXL-based) Distributed Shared Memory;Proceedings of the 29th Symposium on Operating Systems Principles;2023-10-23

3. Heap Size Adjustment with CPU Control;Proceedings of the 20th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes;2023-10-19

4. Collecting Garbage on the Blockchain;Proceedings of the 15th ACM SIGPLAN International Workshop on Virtual Machines and Intermediate Languages;2023-10-18

5. Concurrent GCs and Modern Java Workloads: A Cache Perspective;Proceedings of the 2023 ACM SIGPLAN International Symposium on Memory Management;2023-06-06

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3