Tagged articles

object header

6 articles · Page 1 of 1
Coder Trainee
Coder Trainee
Jul 4, 2026 · Backend Development

Deep Dive into Java Concurrency: The Source-Level Mechanics of synchronized

This article thoroughly examines Java's synchronized keyword, covering its three usage forms, the underlying bytecode instructions, how lock information is stored in the object header's Mark Word, the step‑by‑step lock upgrade process from no‑lock to heavyweight, and JVM optimizations such as lock elimination and coarsening, providing interview‑ready explanations.

JVMconcurrencyjava
0 likes · 10 min read
Deep Dive into Java Concurrency: The Source-Level Mechanics of synchronized
Top Architect
Top Architect
Oct 14, 2020 · Fundamentals

Deep Dive into Java synchronized: Object Header, Lock Types, and JVM Implementation

This article provides a comprehensive analysis of the HotSpot JVM implementation of the synchronized keyword, covering object header layout, the three lock states (biased, lightweight, heavyweight), their acquisition and release processes, bytecode differences, and practical code examples to help readers understand Java concurrency internals.

JVMLockingconcurrency
0 likes · 16 min read
Deep Dive into Java synchronized: Object Header, Lock Types, and JVM Implementation