Tag: java
All the articles with the tag "java".
JVM Notes (Part 1)
Notes on Java bytecode, stack frames, and JVM runtime data areas, together with common startup options for heap memory, thread stacks, garbage collection, and heap dumps. Parameter conversions and capacity examples illustrate memory configuration, followed by the difference between memory leaks and running out of memory.
Arthas
This article records Arthas startup, reconnection, and common startup issues, with practical examples of finding classes, decompiling, compiling, and hot updates. It also covers changing log levels dynamically, inspecting and modifying JVM options, and cautions when using redefine.
Locks in Java (Part 3): Implementing Wait and Notify with Condition
Explains how to combine Lock and Condition to make threads wait and notify one another, comparing await, signal, and signalAll with wait/notify. A ReentrantLock example illustrates thread coordination and the requirement to acquire the lock before waiting or notifying and release it afterward.
Locks in Java (Part 2): Implementing a Custom Lock
Introduces lock memory semantics and the use of AQS and the Lock interface to implement custom synchronization components, including an example that allows two concurrent threads. It also compares polling with wait/notify and discusses notification, competing for a lock again, and checking conditions.