In the context of Project Lilliput, which attempts to reduce the size of object header in the HotSpot Java Virtual Machine (JVM), we explore a curated set of synchronization algorithms. Each of the algorithms could serve as a potential replacement implementation for the "synchronized" construct in HotSpot. Collectively, the algorithms illuminate trade-offs in space-time properties. The key design decisions are where to locate synchronization metadata (monitor fields), how to map from an object to those fields, and the lifecycle of the monitor information. The reader is assumed to be familiar with current HotSpot implementation of "synchronized" as well as the Compact Java Monitors (CJM) design and Project Lilliput.
翻译:在旨在缩减HotSpot Java虚拟机(JVM)中对象头大小的Lilliput项目背景下,本文探究了一系列经过筛选的同步算法。每种算法均可能作为HotSpot中“synchronized”构造的潜在替代实现方案。这些算法共同揭示了时空特性间的权衡关系。关键设计决策包括:同步元数据(监视器字段)的存储位置、从对象到这些字段的映射方式,以及监视器信息的生命周期管理。本文假定读者已熟悉当前HotSpot中“synchronized”的实现机制、紧凑Java监视器(CJM)设计及Lilliput项目。