{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,28]],"date-time":"2026-09-28T20:09:28Z","timestamp":1790626168863,"version":"4.1.0"},"reference-count":31,"publisher":"Association for Computing Machinery (ACM)","issue":"4","license":[{"start":{"date-parts":[[2022,9,21]],"date-time":"2022-09-21T00:00:00Z","timestamp":1663718400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"funder":[{"name":"Swedish Foundation for Strategic Research","award":["SM19-0059"],"award-info":[{"award-number":["SM19-0059"]}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["ACM Trans. Program. Lang. Syst."],"published-print":{"date-parts":[[2022,12,31]]},"abstract":"<jats:p>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.<\/jats:p>","DOI":"10.1145\/3538532","type":"journal-article","created":{"date-parts":[[2022,5,24]],"date-time":"2022-05-24T03:11:02Z","timestamp":1653361862000},"page":"1-34","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":21,"title":["Deep Dive into ZGC: A Modern Garbage Collector in OpenJDK"],"prefix":"10.1145","volume":"44","author":[{"ORCID":"https:\/\/orcid.org\/0000-0003-0471-6594","authenticated-orcid":false,"given":"Albert Mingkun","family":"Yang","sequence":"first","affiliation":[{"name":"Oracle, Stockholm, Sweden"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-4269-5408","authenticated-orcid":false,"given":"Tobias","family":"Wrigstad","sequence":"additional","affiliation":[{"name":"Uppsala University, Uppsala, Sweden"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2022,9,21]]},"reference":[{"key":"e_1_3_4_2_1","doi-asserted-by":"publisher","DOI":"10.1145\/359460.359470"},{"key":"e_1_3_4_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/1005686.1005693"},{"key":"e_1_3_4_4_1","doi-asserted-by":"publisher","DOI":"10.5555\/998675.999420"},{"key":"e_1_3_4_5_1","unstructured":"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."},{"key":"e_1_3_4_6_1","unstructured":"Iris Clark Roman Kennke and Aleksey Shipilev. 2021. Shenandoah GC. Retrieved 16 may 2020 from https:\/\/wiki.openjdk.java.net\/display\/shenandoah."},{"key":"e_1_3_4_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/1064979.1064988"},{"key":"e_1_3_4_8_1","doi-asserted-by":"publisher","DOI":"10.1145\/1029873.1029879"},{"key":"e_1_3_4_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/359642.359655"},{"key":"e_1_3_4_10_1","doi-asserted-by":"publisher","DOI":"10.1145\/2972206.2972210"},{"key":"e_1_3_4_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/2737924.2738006"},{"key":"e_1_3_4_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/1480881.1480935"},{"key":"e_1_3_4_13_1","volume-title":"The SPIN Model Checker: Primer and Reference Manual (1st ed.)","author":"Holzmann Gerard","year":"2011","unstructured":"Gerard Holzmann. 2011. The SPIN Model Checker: Primer and Reference Manual (1st ed.). Addison-Wesley Professional."},{"key":"e_1_3_4_14_1","doi-asserted-by":"publisher","DOI":"10.1145\/376656.376810"},{"key":"e_1_3_4_15_1","unstructured":"ISO\/IEC. 2011. ISO\/IEC 9899:2011. Programming Language C. Retrieved 28 Dec 2021 from https:\/\/www.iso.org\/standard\/57853.html."},{"key":"e_1_3_4_16_1","unstructured":"Roman Kennke. 2019. Shenandoah GC in JDK 13 Part 1: Load Reference Barriers. Retrieved 16 April 2021 from https:\/\/developers.redhat.com\/blog\/2019\/06\/27\/shenandoah-gc-in-jdk-13-part-1-load-reference-barriers."},{"key":"e_1_3_4_17_1","unstructured":"Roman Kennke. 2021. Shenandoah Garbage Collection in OpenJDK 16: Concurrent Reference Processing. Retrieved 16 April 2021 from https:\/\/developers.redhat.com\/articles\/2021\/05\/20\/shenandoah-garbage-collection-openjdk-16-concurrent-reference-processing."},{"key":"e_1_3_4_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/1133981.1134023"},{"key":"e_1_3_4_19_1","unstructured":"Per Lid\u00e9n and Stefan Karlsson. 2018a. JEP 333: ZGC: A Scalable Low-Latency Garbage Collector. Retrieved 16 May 2020 from http:\/\/openjdk.java.net\/jeps\/333."},{"key":"e_1_3_4_20_1","unstructured":"Per Lid\u00e9n and Stefan Karlsson. 2018b. The Z Garbage Collector\u2014Low Latency GC for OpenJDK. Retrieved 16 May 2020 from http:\/\/cr.openjdk.java.net\/pliden\/slides\/ZGC-Jfokus-2018.pdf."},{"key":"e_1_3_4_21_1","unstructured":"MITRE. 2020. CWE-416: Use After Free. Retrieved 24 Sept. 2020 https:\/\/cwe.mitre.org\/data\/definitions\/416.html."},{"key":"e_1_3_4_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/1029873.1029877"},{"key":"e_1_3_4_23_1","doi-asserted-by":"publisher","DOI":"10.1145\/286860.286863"},{"key":"e_1_3_4_24_1","unstructured":"Ram Satish. 2016. Java WeakReference Example. Retrieved 16 May 2020 https:\/\/www.javarticles.com\/2016\/10\/java-weakreference-example.html. Retrived 2020-05-16."},{"key":"e_1_3_4_25_1","unstructured":"SPEC. 2015. SPECjbb\u00ae2015. Retrieved 24 Sept 2020 from https:\/\/www.spec.org\/jbb2015\/."},{"key":"e_1_3_4_26_1","doi-asserted-by":"publisher","DOI":"10.1145\/1993478.1993491"},{"key":"e_1_3_4_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/3133877"},{"key":"e_1_3_4_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/2602988.2602991"},{"key":"e_1_3_4_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/3226225"},{"key":"e_1_3_4_30_1","doi-asserted-by":"publisher","DOI":"10.5555\/645648.664824"},{"key":"e_1_3_4_31_1","doi-asserted-by":"publisher","DOI":"10.1145\/3381898.3397213"},{"key":"e_1_3_4_32_1","doi-asserted-by":"publisher","DOI":"10.1145\/3385412.3385977"}],"container-title":["ACM Transactions on Programming Languages and Systems"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3538532","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3538532","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T15:00:14Z","timestamp":1750172414000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3538532"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2022,9,21]]},"references-count":31,"journal-issue":{"issue":"4","published-print":{"date-parts":[[2022,12,31]]}},"alternative-id":["10.1145\/3538532"],"URL":"https:\/\/doi.org\/10.1145\/3538532","relation":{},"ISSN":["0164-0925","1558-4593"],"issn-type":[{"value":"0164-0925","type":"print"},{"value":"1558-4593","type":"electronic"}],"subject":[],"published":{"date-parts":[[2022,9,21]]},"assertion":[{"value":"2021-03-30","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2022-05-02","order":1,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2022-09-21","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}