Xuanwu Backend Tech Stack
Author

Xuanwu Backend Tech Stack

Primarily covers fundamental Java concepts, mainstream frameworks, deep dives into underlying principles, and JVM internals.

80
Articles
0
Likes
165
Views
0
Comments
Recent Articles

Latest from Xuanwu Backend Tech Stack

80 recent articles
Xuanwu Backend Tech Stack
Xuanwu Backend Tech Stack
Jan 13, 2025 · Backend Development

How Does Java’s volatile Keyword Ensure Thread Visibility and Prevent Reordering?

This article explains how Java's volatile keyword provides visibility guarantees and prevents instruction reordering through memory barriers, illustrates its behavior with code examples, discusses its limitations regarding atomicity, and outlines appropriate usage scenarios such as state flags and double‑checked locking.

Instruction ReorderingJavamemory barrier
0 likes · 9 min read
How Does Java’s volatile Keyword Ensure Thread Visibility and Prevent Reordering?
Xuanwu Backend Tech Stack
Xuanwu Backend Tech Stack
Jan 10, 2025 · Backend Development

Mastering CountDownLatch and CyclicBarrier: Java Concurrency Made Simple

CountDownLatch and CyclicBarrier are two essential Java synchronization tools from java.util.concurrent, enabling threads to coordinate tasks; this guide explains their concepts, usage with code examples, advantages, disadvantages, and key differences, helping developers choose the right tool for thread coordination.

CountDownLatchCyclicBarrierJava
0 likes · 10 min read
Mastering CountDownLatch and CyclicBarrier: Java Concurrency Made Simple
Xuanwu Backend Tech Stack
Xuanwu Backend Tech Stack
Jan 9, 2025 · Fundamentals

Master Java Thread Communication: wait/notify, Locks, Conditions & BlockingQueue

This article explores Java's thread communication techniques—including the basic wait/notify mechanism, advanced Lock and Condition usage, and the thread‑safe BlockingQueue—providing detailed explanations, producer‑consumer examples, and additional concurrency utilities like CountDownLatch, illustrating how to coordinate threads efficiently in multithreaded applications.

BlockingQueueConditionCountDownLatch
0 likes · 18 min read
Master Java Thread Communication: wait/notify, Locks, Conditions & BlockingQueue
Xuanwu Backend Tech Stack
Xuanwu Backend Tech Stack
Jan 8, 2025 · Backend Development

Why Java ThreadPoolExecutor’s Core Threads Aren’t Recycled by Default

In Java’s ThreadPoolExecutor, core threads remain alive even when idle unless the allowCoreThreadTimeOut flag is set to true, which then permits both core and non‑core threads to be reclaimed after exceeding the keepAliveTime threshold, a behavior that contradicts the pool’s design principle of minimizing thread creation overhead.

JavaThreadPoolExecutorallowCoreThreadTimeOut
0 likes · 2 min read
Why Java ThreadPoolExecutor’s Core Threads Aren’t Recycled by Default
Xuanwu Backend Tech Stack
Xuanwu Backend Tech Stack
Jan 7, 2025 · Fundamentals

Mastering Process Scheduling: From FCFS to Multilevel Feedback Queues

This article explains the distinction between preemptive and non‑preemptive scheduling and provides a concise overview of common process scheduling algorithms—including FCFS, SJF, HRRN, Round‑Robin, priority and multilevel feedback queue—highlighting their principles, advantages, and drawbacks.

algorithm analysisnon-preemptive schedulingoperating systems
0 likes · 7 min read
Mastering Process Scheduling: From FCFS to Multilevel Feedback Queues
Xuanwu Backend Tech Stack
Xuanwu Backend Tech Stack
Jan 6, 2025 · Backend Development

Master Thread Sequencing in Java: 8 Proven Techniques

This article explains why thread execution order is nondeterministic and presents eight Java techniques—join, single‑thread executor, CountDownLatch, CyclicBarrier, Semaphore, synchronized with wait/notify, and Lock with Condition—to reliably enforce sequential execution, complete with clear code examples for each method.

CountDownLatchExecutorServiceJava
0 likes · 13 min read
Master Thread Sequencing in Java: 8 Proven Techniques