Tagged articles
52 articles
Page 1 of 1
Deepin Linux
Deepin Linux
Apr 25, 2026 · Fundamentals

Mastering Mutex Locks: Solving Linux Kernel Synchronization Challenges in One Article

This article provides a comprehensive deep‑dive into Linux kernel mutex locks, explaining their principles, implementation, and APIs, and demonstrates through detailed C/C++ examples how to use them safely to avoid data races, deadlocks, and performance bottlenecks in multithreaded kernel and user‑space code.

Linux kernelSynchronizationdeadlock
0 likes · 46 min read
Mastering Mutex Locks: Solving Linux Kernel Synchronization Challenges in One Article
Deepin Linux
Deepin Linux
Feb 7, 2026 · Fundamentals

Mastering Linux Process Synchronization: Prevent Race Conditions with Mutexes, Semaphores, and More

This comprehensive guide explains why race conditions occur in Linux processes, explores the underlying concepts of critical sections and synchronization, and provides practical examples of atomic operations, mutexes, semaphores, condition variables, read‑write locks, and spinlocks to ensure safe concurrent programming.

CPOSIXcondition variable
0 likes · 39 min read
Mastering Linux Process Synchronization: Prevent Race Conditions with Mutexes, Semaphores, and More
Code Wrench
Code Wrench
Oct 11, 2025 · Backend Development

Master Go Concurrency with sync: Mutex, RWMutex, WaitGroup, Once, Cond & Pool

Learn how Go's sync package provides essential concurrency primitives—Mutex, RWMutex, WaitGroup, Once, Cond, and Pool—through clear examples and best‑practice patterns that prevent data races, deadlocks, and performance pitfalls, enabling safe, elegant, and efficient goroutine coordination.

GoOncePool
0 likes · 7 min read
Master Go Concurrency with sync: Mutex, RWMutex, WaitGroup, Once, Cond & Pool
Deepin Linux
Deepin Linux
Oct 3, 2025 · Fundamentals

When to Use Mutex vs Spinlock: Performance Guide and Best Practices

Choosing the right lock—mutex or spinlock—can dramatically affect program performance; this article explains their underlying waiting mechanisms, compares CPU usage, context‑switch costs, and suitability across multi‑core versus single‑core, high‑contention versus low‑contention scenarios, and provides practical C++ code examples.

CSpinlockmutex
0 likes · 29 min read
When to Use Mutex vs Spinlock: Performance Guide and Best Practices
php Courses
php Courses
Sep 16, 2025 · Fundamentals

Mastering std::mutex in C++: Prevent Data Races with Simple Examples

Learn why mutexes are essential for safe multithreaded C++ programming, explore the basic std::mutex API, see practical code examples, and discover advanced lock management with std::lock_guard and other mutex types to avoid data races and deadlocks.

Cconcurrencylock_guard
0 likes · 9 min read
Mastering std::mutex in C++: Prevent Data Races with Simple Examples
FunTester
FunTester
Jul 13, 2025 · Backend Development

Master Go Concurrency: Goroutines, Channels, and Real-World Examples

Learn how Go’s built‑in concurrency model using goroutines and channels can transform sequential code into responsive, high‑performance applications, with clear explanations of concurrency vs parallelism, practical code samples, synchronization techniques, and best practices for building scalable web servers.

ChannelGoroutineParallelism
0 likes · 10 min read
Master Go Concurrency: Goroutines, Channels, and Real-World Examples
Deepin Linux
Deepin Linux
May 20, 2025 · Fundamentals

Understanding and Preventing Deadlocks in C++ Multithreaded Programming

This article explains what deadlocks are in C++ multithreaded programming, outlines their causes and four necessary conditions, presents common scenarios and code examples, and offers practical strategies such as consistent lock ordering, std::lock, std::scoped_lock, recursive mutexes, and lock hierarchies to avoid them.

C++Lockconcurrency
0 likes · 20 min read
Understanding and Preventing Deadlocks in C++ Multithreaded Programming
FunTester
FunTester
Mar 26, 2025 · Backend Development

Common Go Concurrency Errors and Best Practices

This article examines frequent mistakes in Go's concurrent programming—such as confusing concurrency with parallelism, assuming concurrency always speeds up execution, misusing channels versus mutexes, overlooking workload types, and misunderstanding contexts—provides detailed explanations, potential impacts, and best‑practice solutions with improved code examples.

ChannelGoGoroutine
0 likes · 27 min read
Common Go Concurrency Errors and Best Practices
Radish, Keep Going!
Radish, Keep Going!
Feb 11, 2025 · Fundamentals

How Go 1.24’s New Spinning Mutex Boosts Performance by Up to 70%

The article explains the background of the Go mutex performance proposal, details the new spinning flag added to the mutex state, walks through fast‑path, spinning, and sleep phases of lock acquisition, presents benchmark results showing up to 70% speed‑up, and provides references for further reading.

GoRuntimeconcurrency
0 likes · 11 min read
How Go 1.24’s New Spinning Mutex Boosts Performance by Up to 70%
Raymond Ops
Raymond Ops
Jan 25, 2025 · Backend Development

Master Go Concurrency: Goroutines, Scheduler, and Synchronization Techniques

This article explains Go's concurrency model, detailing how goroutines are scheduled on logical processors, how to create and manage them, detect and resolve race conditions using atomic operations, mutexes, and channels, and demonstrates practical code examples for each concept.

BackendChannelatomic
0 likes · 19 min read
Master Go Concurrency: Goroutines, Scheduler, and Synchronization Techniques
BirdNest Tech Talk
BirdNest Tech Talk
Jan 15, 2025 · Backend Development

Data Race vs Race Condition in Go: Clear Differences and How to Fix Them

The article explains the distinction between a data race—simultaneous unsynchronized memory access by goroutines—and a race condition—logic errors caused by timing dependencies—using Go code examples, demonstrates how to reproduce each issue, and shows how mutexes or atomic operations can resolve them.

GoGoroutineatomic
0 likes · 5 min read
Data Race vs Race Condition in Go: Clear Differences and How to Fix Them
IT Services Circle
IT Services Circle
Jan 4, 2025 · Backend Development

Is std::cout Thread‑Safe? Understanding Data Races, Race Conditions, and Practical Solutions in C++

This article examines whether std::cout is thread‑safe, explains the concepts of data race and race condition, demonstrates how interleaved output can occur in multithreaded C++ programs, and presents several solutions—including mutexes, custom wrappers, and C++20 std::osyncstream—to ensure orderly output.

C++data racemutex
0 likes · 10 min read
Is std::cout Thread‑Safe? Understanding Data Races, Race Conditions, and Practical Solutions in C++
BirdNest Tech Talk
BirdNest Tech Talk
Oct 27, 2024 · Fundamentals

How Go’s Runtime Uses Treap for Efficient Goroutine Scheduling

This article explains the treap data structure—its BST and heap properties, random priority balancing, and implementation details—then dives into Go's runtime semaRoot treap, showing step‑by‑step enqueue and dequeue algorithms with code, rotations, and performance reasoning.

Data Structuresbalanced treeconcurrency
0 likes · 17 min read
How Go’s Runtime Uses Treap for Efficient Goroutine Scheduling
MaGe Linux Operations
MaGe Linux Operations
Sep 28, 2024 · Backend Development

Master Go Concurrency: Goroutines, Channels, Locks, Timers and Synchronization

This comprehensive guide explains the fundamentals of concurrent programming in Go, covering the differences between parallelism and concurrency, process and thread concepts, and detailed usage of goroutines, channels, select statements, timers, mutexes, read‑write locks, wait groups, once, sync.Map, and atomic operations with practical code examples and diagrams.

ChannelGoroutineParallelism
0 likes · 42 min read
Master Go Concurrency: Goroutines, Channels, Locks, Timers and Synchronization
MaGe Linux Operations
MaGe Linux Operations
Apr 20, 2024 · Backend Development

Mastering Go Concurrency: Goroutines, Scheduler, Race Detection & Channels

This article explains Go's concurrency model, detailing how goroutines are scheduled onto logical processors, how to create and run them, handle race conditions with atomic operations, mutexes, and the race detector, and share data safely using unbuffered and buffered channels with practical code examples.

ChannelGoGoroutine
0 likes · 19 min read
Mastering Go Concurrency: Goroutines, Scheduler, Race Detection & Channels
Ops Development & AI Practice
Ops Development & AI Practice
Apr 15, 2024 · Fundamentals

Mastering Go Concurrency: When to Use WaitGroup vs Mutex

This article examines Go's sync package, detailing how WaitGroup coordinates the completion of multiple goroutines while Mutex protects shared resources, compares their purposes and use cases, and provides practical code examples to help developers choose the right tool for concurrent programming.

GoGoroutineSynchronization
0 likes · 5 min read
Mastering Go Concurrency: When to Use WaitGroup vs Mutex
Liangxu Linux
Liangxu Linux
Mar 17, 2024 · Fundamentals

Master Linux Synchronization: From Semaphores to Mutexes with Practical Code

Learn the core principles of synchronization and mutual exclusion in multi‑process or multi‑threaded Linux environments, explore design concepts such as atomic operations and deadlock avoidance, and see complete POSIX‑thread code examples using semaphores, condition variables, mutexes and spinlocks.

LinuxPOSIXSynchronization
0 likes · 8 min read
Master Linux Synchronization: From Semaphores to Mutexes with Practical Code
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 kernelSpinlockSynchronization
0 likes · 13 min read
Overview of Linux Kernel Synchronization Mechanisms: Atomic Operations, Spinlocks, Semaphores, and Mutexes
php Courses
php Courses
Nov 2, 2023 · Backend Development

Handling Concurrent Access and Race Conditions in PHP

This article explains essential techniques for managing concurrent access and race conditions in PHP, covering mutex locks, semaphores, atomic operations, queue-based processing, database access optimization, and transaction management to improve system reliability and performance.

PHPatomicconcurrency
0 likes · 5 min read
Handling Concurrent Access and Race Conditions in PHP
JD Cloud Developers
JD Cloud Developers
Aug 10, 2023 · Backend Development

How to Prevent File Write Chaos in Rust with Tokio Mutex

This article demonstrates the problem of unordered file content when multiple Tokio tasks write concurrently in Rust, shows a sample program that exhibits the issue, and provides a solution using Tokio’s asynchronous Mutex to synchronize file access, ensuring ordered and complete writes.

RustTokiofile I/O
0 likes · 5 min read
How to Prevent File Write Chaos in Rust with Tokio Mutex
Liangxu Linux
Liangxu Linux
May 17, 2023 · Fundamentals

Understanding Linux Kernel Synchronization: From Semaphores to Thread Pools

This article explains the various Linux kernel synchronization mechanisms—including inter‑process communication, semaphores, mutexes, message queues, shared memory, and thread pools—detailing how they work, when to use them, and their role in ensuring coordinated execution within the kernel.

IPCKernelLinux
0 likes · 10 min read
Understanding Linux Kernel Synchronization: From Semaphores to Thread Pools
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.

Linux kernelRCUSpinlock
0 likes · 26 min read
Understanding Synchronization Mechanisms and RCU in the Linux Kernel
Tencent Cloud Developer
Tencent Cloud Developer
Jul 25, 2022 · Backend Development

Understanding Go Concurrency: Goroutines, Scheduler, Threads and Synchronization

The article explains Go’s concurrency model, detailing how goroutines are lightweight work units scheduled by the Go runtime onto logical processors, the role of the scheduler, differences between concurrency and parallelism, thread limits, and practical synchronization tools such as WaitGroup, atomic operations, and mutexes.

GoSchedulerSynchronization
0 likes · 19 min read
Understanding Go Concurrency: Goroutines, Scheduler, Threads and Synchronization
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Apr 22, 2022 · Fundamentals

Understanding Linux Kernel Mutex: Mechanism, Data Structures, and APIs

The Linux kernel’s mutex is a sleeping lock that serializes access by sleeping threads, enforces strict ownership rules, uses a state flag with a wait list and per‑CPU optimistic spin queue, offers APIs like mutex_init, lock, unlock and trylock, and employs handoff and MCS‑style spinning to improve performance, with OPPO’s team optimizing it to reduce UI jank.

Linux kernelSynchronizationconcurrency
0 likes · 16 min read
Understanding Linux Kernel Mutex: Mechanism, Data Structures, and APIs
DeWu Technology
DeWu Technology
Nov 23, 2020 · Fundamentals

PThread Essentials: Thread Creation, Synchronization, and Advanced Techniques

This session reviews PThread fundamentals and advanced techniques in C, covering thread creation, termination, attributes, mutexes, reader‑writer locks, condition variables, semaphores, barrier synchronization, and thread‑specific data, with code examples and a concluding homework assignment.

SynchronizationThread Specific Datacondition variable
0 likes · 11 min read
PThread Essentials: Thread Creation, Synchronization, and Advanced Techniques
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Aug 14, 2020 · Fundamentals

Linux Kernel Synchronization: Atomics, Spinlocks, Semaphores & Mutexes

This article explains the core synchronization mechanisms used in modern Linux kernels—including atomic operations, spinlocks, semaphores, and mutexes—detailing their definitions, underlying implementations, API usage, performance characteristics, and appropriate usage scenarios across different execution contexts such as process, interrupt, and soft‑interrupt contexts.

Linux kernelOperating SystemSpinlock
0 likes · 12 min read
Linux Kernel Synchronization: Atomics, Spinlocks, Semaphores & Mutexes
Ctrip Technology
Ctrip Technology
Mar 5, 2020 · Fundamentals

Understanding Kotlin/Native Asynchronous Concurrency: Workers, Object Subgraphs, and Multithreaded Coroutines

This article explores Kotlin/Native's asynchronous concurrency model, detailing the three native approaches—OS‑level threads, Kotlin/Native coroutines, and Workers with object subgraphs—while also examining the preview multithreaded coroutine support, transfer modes, annotations, and practical code examples.

Workersmultithreadingmutex
0 likes · 24 min read
Understanding Kotlin/Native Asynchronous Concurrency: Workers, Object Subgraphs, and Multithreaded Coroutines
Xueersi Online School Tech Team
Xueersi Online School Tech Team
Feb 28, 2020 · Fundamentals

Understanding Locks and Mutex Implementation in Go

This article explains the concept of locks, why they are needed in concurrent programming, and provides an in‑depth look at Go's synchronization primitives—including CAS, atomic operations, spinlocks, semaphores, and the evolution of the sync.Mutex implementation with code examples and performance considerations.

BackendGolangLock
0 likes · 17 min read
Understanding Locks and Mutex Implementation in Go
Programmer DD
Programmer DD
Nov 13, 2019 · Fundamentals

Understanding Processes and Threads: A Factory Analogy Explained

This article uses a factory analogy to demystify operating‑system concepts such as processes, threads, mutual‑exclusion locks, and semaphores, illustrating how CPUs, workspaces, workers, and access controls interact to enable concurrent execution while preventing conflicts.

Operating SystemThreadsconcurrency
0 likes · 5 min read
Understanding Processes and Threads: A Factory Analogy Explained
dbaplus Community
dbaplus Community
Nov 5, 2017 · Databases

Uncovering Oracle’s Hidden Parse Failures: Why AWR Shows 99% Parse Time

A customer’s Oracle 11g RAC experienced chronic high CPU usage; deep AWR analysis revealed that massive parse time was attributed to mutex waits and a hidden hard‑parse failure caused by a missing column, which triggered Bug 16175381 and forced process spin, ultimately resolved by correcting the faulty SQL.

AWRCPUOracle
0 likes · 10 min read
Uncovering Oracle’s Hidden Parse Failures: Why AWR Shows 99% Parse Time
Qunar Tech Salon
Qunar Tech Salon
Aug 1, 2017 · Databases

MySQL Time Zone Setting Causes High CPU and Slow Queries Due to Mutex Contention

A production MySQL incident showed sudden system CPU spikes and many running threads despite low query throughput, which was traced to the server's time_zone=system setting causing timestamp conversion to lock a global mutex, leading to excessive spin‑locks, context switches, and degraded performance that was resolved by changing the time_zone to a fixed offset.

CPUTime Zonecontext switch
0 likes · 6 min read
MySQL Time Zone Setting Causes High CPU and Slow Queries Due to Mutex Contention
ITPUB
ITPUB
Sep 27, 2016 · Backend Development

Building a Linux C++ Memory Leak Detector with Custom New/Delete

This article explains how to implement a memory‑leak detection subsystem for Linux C++ programs by overloading the global new/delete operators, recording allocation sites with file and line information, handling mismatched deletions, supporting dynamic monitoring, and addressing nested‑delete and mutex re‑entrancy issues.

C++DebuggingLinux
0 likes · 30 min read
Building a Linux C++ Memory Leak Detector with Custom New/Delete