Tag

spinlock

0 views collected around this technical thread.

Deepin Linux
Deepin Linux
Mar 30, 2025 · Fundamentals

Understanding Linux Kernel Synchronization Mechanisms

This article explains how the Linux kernel ensures safe concurrent access to shared resources through various synchronization mechanisms such as atomic operations, spinlocks, mutexes, read‑write locks, and semaphores, illustrating their concepts, APIs, and practical usage with code examples.

ConcurrencyMutexSynchronization
0 likes · 42 min read
Understanding Linux Kernel Synchronization Mechanisms
Tencent Architect
Tencent Architect
Jun 24, 2024 · Operations

Root Cause Analysis of Linux Kernel Hard Lockup on CPU 51

This article walks through a real Linux kernel hard lockup case, explaining what hard lockup is, analyzing stack traces and register values, identifying a spinlock contention on a per‑CPU runqueue, and showing how an inappropriate GFP flag caused interrupts to be enabled at the wrong time, leading to a deadlock and the eventual fix.

debugginghard-lockupkernel
0 likes · 17 min read
Root Cause Analysis of Linux Kernel Hard Lockup on CPU 51
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Dec 29, 2023 · Fundamentals

Overview of Linux Kernel Synchronization Mechanisms: Atomic Operations, Spinlocks, Semaphores, and Mutexes

The article systematically explains Linux kernel synchronization primitives—from basic atomic operations through queued spinlocks, counting semaphores, and sleeping mutexes to read‑write semaphores and per‑CPU variants—detailing their underlying data structures, memory‑barrier semantics, and the fast‑path and slow‑path acquisition and release APIs.

Linux kernelMutexSemaphore
0 likes · 13 min read
Overview of Linux Kernel Synchronization Mechanisms: Atomic Operations, Spinlocks, Semaphores, and Mutexes
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Mar 17, 2023 · Operations

Understanding Synchronization Mechanisms and RCU in the Linux Kernel

Linux kernel synchronization requires protecting shared mutable state from concurrent access using primitives such as spinlocks, mutexes, read‑write locks, or lock‑less techniques like RCU, which copies data and waits for a grace period, each offering distinct performance, latency, and complexity trade‑offs.

ConcurrencyLinux kernelMutex
0 likes · 26 min read
Understanding Synchronization Mechanisms and RCU in the Linux Kernel
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Mar 3, 2023 · Backend Development

Understanding Spinlocks in Java: Principles, Advantages, Use Cases, and Implementation

This article explains what a spinlock is, outlines its advantages and disadvantages, describes suitable usage scenarios, and provides a detailed Java implementation using CAS, including code examples and an explanation of the underlying CAS algorithm.

CASConcurrencyLock
0 likes · 5 min read
Understanding Spinlocks in Java: Principles, Advantages, Use Cases, and Implementation
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Nov 11, 2021 · Fundamentals

Understanding and Implementing the CLH Spin Lock in Java

This article explains the concepts of spin locks and mutexes, introduces the CLH lock as a fair spin lock used in Java's AbstractQueuedSynchronizer, and provides a detailed step‑by‑step walkthrough of its initialization, lock acquisition, release, testing, and common pitfalls with illustrative code and diagrams.

AQSCLHLockConcurrency
0 likes · 17 min read
Understanding and Implementing the CLH Spin Lock in Java
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 14, 2019 · Backend Development

Common Java Pitfalls and Performance Tips: NullPointerException, Spin Locks, Low Coupling, CPU Monitoring, and Hash Functions

This article explains typical Java issues such as NullPointerException, demonstrates using spin locks for efficient multithreading, emphasizes low‑coupling design, shows how to diagnose CPU spikes with Linux tools and jstack, and describes why hash functions have O(1) lookup with collision‑resolution strategies.

CPU monitoringConcurrencyPerformance
0 likes · 5 min read
Common Java Pitfalls and Performance Tips: NullPointerException, Spin Locks, Low Coupling, CPU Monitoring, and Hash Functions
Java Captain
Java Captain
Jan 26, 2019 · Fundamentals

Classification and Implementation of Various Java Locks

This article explains the different types of Java locks—including fair, reentrant, exclusive, read‑write, optimistic, pessimistic, segment, biased, lightweight, heavyweight, and spin locks—describes their characteristics, usage scenarios, and provides concrete code examples for each implementation.

AQSConcurrencyLocks
0 likes · 15 min read
Classification and Implementation of Various Java Locks