Adaptive Spinning

This is blog 5 in the OpenJ9 locking/synchronization series (blog 1). This blog covers OpenJ9’s adaptive spinning strategy which dynamically enables/disables lock spinning using heuristics in order to avoid the negative impact of lock spinning. Before reading this blog, one needs to know about the system-monitors (blog 2), object-monitors (blog 3) and three-tier spinning (blog…

Categoriesvm

Lock Nursery

This is blog 6 in the OpenJ9 locking/synchronization series (blog 1). It covers a memory optimization within OpenJ9 related to the object-monitors (blog 2), which are used to enforce synchronization for the Java objects. Before reading this blog, one needs to have knowledge about the object-monitors. Please read the blog on the object-monitors before reading…

Categoriesvm

Object-Monitor Implementation

This is blog 3 in the OpenJ9 locking/synchronization series (blog 1). It covers a data structure named object-monitor which is used to enforce synchronization for the Java objects. Before reading this blog, one needs to have knowledge about the system-monitors (blog 2). Please read the blog on the system-monitors before reading this blog. In OpenJ9,…

Categoriesvm

System-Monitor and GC-Spinlock Implementation

This is blog 2 in the OpenJ9 locking/synchronization series (blog 1). It covers two data structures: system-monitor and GC-spinlock, which are used to enforce synchronization in OpenJ9. A system-monitor (omrthread_monitor_t) has two phases: spinlock and fallback to the operating system (OS). In the spinlock (first) phase, the system-monitor spins in a loop while performing atomic…

Categoriesvm

OpenJ9 Locking/Synchronization

OpenJ9 Java Virtual Machine (JVM) implements the synchronization features needed for the Java language. Also, OpenJ9 is a multi-threaded application with virtual machine (VM), garbage collector (GC), just-in-time (JIT) and other native threads which require synchronization. This is the main blog a.k.a blog 1 which summarizes the various data structures and features used to support…

Categoriesvm