Tag

Mutex

0 views collected around this technical thread.

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++LockMutex
0 likes · 20 min read
Understanding and Preventing Deadlocks in C++ Multithreaded Programming
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.

LinuxMutexSynchronization
0 likes · 42 min read
Understanding Linux Kernel Synchronization Mechanisms
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.

ContextGoMutex
0 likes · 27 min read
Common Go Concurrency Errors and Best Practices
FunTester
FunTester
Feb 18, 2025 · Fundamentals

Understanding Mutex Locks and Their Use in Go Concurrency

This article explains what a mutex is, why it is needed in concurrent programming, shows basic lock/unlock operations with Go code examples, compares mutexes with atomic operations, and provides best‑practice guidelines to avoid deadlocks and improve performance.

AtomicGoMutex
0 likes · 8 min read
Understanding Mutex Locks and Their Use in Go Concurrency
Architecture Development Notes
Architecture Development Notes
Feb 4, 2025 · Fundamentals

Mastering Rust’s Send and Sync Traits for Safe Concurrency

Explore how Rust’s Send and Sync marker traits guarantee thread‑safe ownership transfer and shared references, with clear explanations, practical code examples, custom type implementations, common pitfalls, and performance considerations to help you write reliable concurrent programs.

ARCMutexRust
0 likes · 8 min read
Mastering Rust’s Send and Sync Traits for Safe Concurrency
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.

AtomicGoMutex
0 likes · 19 min read
Master Go Concurrency: Goroutines, Scheduler, and Synchronization Techniques
Raymond Ops
Raymond Ops
Jan 9, 2025 · Backend Development

Master Go Concurrency: Goroutines, Scheduler, Race Detection, and Channels Explained

This article walks through Go's concurrency model, detailing how goroutines are scheduled across logical processors, how to control parallelism with GOMAXPROCS, detect and resolve race conditions using atomic operations, mutexes, and channels, and provides practical code examples for each concept.

AtomicChannelsGo
0 likes · 18 min read
Master Go Concurrency: Goroutines, Scheduler, Race Detection, and Channels Explained
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++
Deepin Linux
Deepin Linux
Nov 27, 2024 · Fundamentals

Linux Thread Synchronization: Mechanisms, Implementations, and Practical Applications

This article provides a comprehensive overview of Linux thread synchronization, explaining core concepts such as mutexes, condition variables, semaphores, and futexes, describing their implementation details, code examples, and common usage scenarios like producer‑consumer and reader‑writer problems.

Condition VariableFutexLinux
0 likes · 33 min read
Linux Thread Synchronization: Mechanisms, Implementations, and Practical Applications
Aikesheng Open Source Community
Aikesheng Open Source Community
Aug 12, 2024 · Databases

Analyzing and Simulating MySQL show slave status Hang: Mutex Locks and Debugging

This article investigates why the MySQL show slave status command can hang in a 1‑master‑N‑slave replication setup, analyzes the involved mutex locks through source code inspection, and demonstrates a reproducible debugging scenario using GDB breakpoints and pstack to pinpoint lock contention.

MutexMySQLReplication
0 likes · 13 min read
Analyzing and Simulating MySQL show slave status Hang: Mutex Locks and Debugging
Architecture Development Notes
Architecture Development Notes
Jul 20, 2024 · Backend Development

Master Go Concurrency: Mutex, RWMutex, Cond, Atomic, Once & WaitGroup Explained

This article explores Go's built‑in concurrency primitives—including Mutex, RWMutex, Condition variables, atomic operations, sync.Once, and WaitGroup—detailing their purposes, usage patterns, and best‑practice guidelines to write correct and efficient concurrent programs.

AtomicGoMutex
0 likes · 13 min read
Master Go Concurrency: Mutex, RWMutex, Cond, Atomic, Once & WaitGroup Explained
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
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.

AtomicDatabaseMutex
0 likes · 5 min read
Handling Concurrent Access and Race Conditions in PHP
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 kernelMutexRCU
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.

AtomicGoMutex
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 kernelMutexSynchronization
0 likes · 16 min read
Understanding Linux Kernel Mutex: Mechanism, Data Structures, and APIs
Aikesheng Open Source Community
Aikesheng Open Source Community
Jan 29, 2021 · Databases

Quick Diagnosis of MySQL Hang Issues Using Callstack and Mutex Analysis

This article demonstrates a step‑by‑step method for diagnosing MySQL hangs by collecting callstack information, identifying mutex conflicts, and mapping function calls to code locations to pinpoint the root cause of deadlocks.

CallstackDatabaseHang Diagnosis
0 likes · 4 min read
Quick Diagnosis of MySQL Hang Issues Using Callstack and Mutex Analysis
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.

Condition VariableMutexSemaphore
0 likes · 11 min read
PThread Essentials: Thread Creation, Synchronization, and Advanced Techniques
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Oct 17, 2020 · Fundamentals

A Deep Dive into Java's AbstractQueuedSynchronizer (AQS) and Custom Mutex Implementation

This article explains the principles of Java's AbstractQueuedSynchronizer (AQS), compares semaphore and monitor mechanisms, analyzes the source code of ReentrantLock, and demonstrates how to create a custom non-reentrant mutex using AQS, with detailed diagrams and code examples.

AQSJavaLock
0 likes · 29 min read
A Deep Dive into Java's AbstractQueuedSynchronizer (AQS) and Custom Mutex Implementation
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Aug 5, 2020 · Fundamentals

Understanding Processes, Threads, and Synchronization in Operating Systems

This article explains the fundamental concepts of operating systems, describing how the CPU functions as a factory, the distinction between static programs and dynamic processes, the role of threads, and synchronization mechanisms such as mutexes, semaphores, and inter‑process communication.

IPCMutexOperating System
0 likes · 7 min read
Understanding Processes, Threads, and Synchronization in Operating Systems