This post explores how threads in Kotlin enter a BLOCKED state when they cannot acquire a lock held by another thread. A sample program demonstrates this scenario with 10 threads attempting to access a synchronized method, causing 9 to be blocked. It also discusses diagnosing BLOCKED threads through manual and automated approaches.
The article explains how to simulate and troubleshoot CPU spikes in Kotlin by creating a program with six threads in an infinite loop. It discusses manual and automated approaches to diagnose CPU spikes, detailing how to capture and analyze thread dumps using the yCrash tool for effective root cause analysis of performance issues.
This post discusses deadlock in multi-threaded applications, specifically in Kotlin. It defines deadlock and provides a practical example using trains on a single track. A sample Kotlin program illustrates how deadlock occurs between two threads. Troubleshooting deadlock involves capturing thread dumps and analyzing them with tools like yCrash for clearer insight.
The post discusses c1 and c2 compiler threads in Java, which optimize application performance but may lead to high CPU consumption. It explains the differences between client and server JIT compilers, default thread counts, and provides solutions for managing high CPU usage, including JVM arguments to adjust compilation levels and thread counts.
This article on chaos engineering demonstrates how to simulate a CPU spike to 100% using an infinite loop in a Java program with multiple threads. It discusses monitoring CPU consumption using the UNIX tool 'top' and suggests manual and automated root cause analysis methods, highlighting the yCrash tool's effectiveness in identifying the source of the issue.
