Parallel Sort

Everyone knows about what sorting is. There are so many computer algorithms that have emerged to support sorting. Some of the well-known algorithms are quick sort, heap sort, merge sort etc. All these sorting algorithms are working based on sequential sorting. Means, a single thread is used to perform the complete sorting operation. However, this... Continue Reading →

Advantages of Java Virtual Threads

Java virtual threads, introduced in JDK 19, enhance application performance and memory efficiency. They reduce memory consumption, improve availability and throughput, and mitigate 'OutOfMemoryError' risks. Virtual threads allow for simpler code maintenance by enabling sequential programming. They are fully compatible with existing platform thread APIs, facilitating seamless integration.

APIs to create Java Virtual Thread

Java virtual threads, introduced in JDK 19, enhance application availability, throughput, and code quality while minimizing memory use. This post explains various APIs to create virtual threads, including Thread.startVirtualThread(), Thread.ofVirtual().start(), and Executors. Understanding these features can improve application performance and thread management significantly.

Is Java Virtual Threads lightweight?

Java virtual threads consume significantly less memory compared to platform threads, demonstrated by programs creating 10,000 threads. While virtual thread creation is faster, both types use similar CPU resources and execution times when performing tasks. Adopting virtual threads can enhance memory efficiency and response time in applications with numerous threads or high stack sizes.

Java Virtual Threads – Easy introduction

Java virtual threads, introduced in JDK 19, enhance application availability, throughput, and memory efficiency. Unlike platform threads that remain allocated, virtual threads utilize operating system threads only during active processing. This feature leads to reduced memory consumption and improved performance, making it an efficient choice for threading in Java applications.

Chaos Engineering – Thread Leak

This article discusses simulating thread leaks in applications, leading to the 'java.lang.OutOfMemoryError: unable to create new native thread' error. It demonstrates a sample program that creates infinite threads, preventing them from exiting. The article also outlines manual and automated approaches to diagnose and analyze these memory issues effectively.

Up ↑