Tagged articles
23 articles
Page 1 of 1
Deepin Linux
Deepin Linux
May 10, 2026 · Fundamentals

Do You Really Understand pthread Internals? Master Linux Multithreading Basics

This article dives deep into Linux pthread fundamentals, covering process‑vs‑thread concepts, the POSIX API, kernel implementation via the clone syscall, thread lifecycle, synchronization primitives, common pitfalls such as deadlocks, stack overflows and thread leaks, and provides practical debugging and mitigation techniques with real code examples.

clone syscalldeadlocklinux
0 likes · 55 min read
Do You Really Understand pthread Internals? Master Linux Multithreading Basics
Huolala Tech
Huolala Tech
Dec 31, 2025 · Fundamentals

Why Does __dispatch_barrier_waiter_redirect_or_wake Crash on iOS 14‑16? A Deep GCD Investigation

The article analyses a recurring crash in an iOS driver app caused by the __dispatch_barrier_waiter_redirect_or_wake function in libdispatch, explains the EXC_BREAKPOINT/SIGTRAP mechanism, compares libdispatch versions, reveals a premature queue release due to non‑atomic reference‑count handling, and proposes replacing GCD‑based barriers with pthread_rwlock_t to eliminate the bug.

BarrierCrashGCD
0 likes · 15 min read
Why Does __dispatch_barrier_waiter_redirect_or_wake Crash on iOS 14‑16? A Deep GCD Investigation
Deepin Linux
Deepin Linux
Dec 28, 2025 · Fundamentals

Understanding Linux User Stacks: How Threads Manage Memory and Calls

This article explains the role of the Linux user stack in multithreaded programs, covering its memory layout, how each thread gets a private stack, stack frame mechanics, growth and overflow handling, and practical examples of creating and debugging stacks with pthreads and gdb.

CThreadUser Stack
0 likes · 24 min read
Understanding Linux User Stacks: How Threads Manage Memory and Calls
Liangxu Linux
Liangxu Linux
Nov 16, 2025 · Fundamentals

Mastering pthread Condition Variables: Efficient Thread Wait‑Notify in Linux

This article explains the core principles, API usage, and best‑practice steps for pthread condition variables in embedded Linux, showing why they must be paired with mutexes, how to avoid lost wake‑ups, when to use signal versus broadcast, and includes a complete C example with practical tips.

c-programmingcondition variablepthread
0 likes · 9 min read
Mastering pthread Condition Variables: Efficient Thread Wait‑Notify in Linux
Liangxu Linux
Liangxu Linux
Oct 25, 2025 · Fundamentals

Master Linux Threads: Creation, Control, and Scheduling Explained

This guide explains Linux thread fundamentals, covering definitions, differences from processes, user‑level vs kernel‑level models, creation and termination with pthread APIs, attribute settings, cancellation, cleanup, detaching, and scheduling policies, all illustrated with complete code examples.

POSIXSchedulingThread Detach
0 likes · 18 min read
Master Linux Threads: Creation, Control, and Scheduling Explained
Liangxu Linux
Liangxu Linux
Oct 19, 2025 · Fundamentals

Master Linux Thread Programming: From Basics to Advanced Control

This article provides a comprehensive guide to Linux threads, covering fundamental concepts, the distinction between processes and threads, user‑level vs kernel‑level threading, thread creation and termination with POSIX APIs, attribute settings, cancellation, cleanup, detachment, scheduling policies, and practical code examples.

POSIXThreadslinux
0 likes · 17 min read
Master Linux Thread Programming: From Basics to Advanced Control
Deepin Linux
Deepin Linux
Sep 25, 2025 · Fundamentals

Master Linux Thread Stacks: Prevent Overflows, Leaks, and Optimize Memory

This article explains the inner workings of Linux thread stacks, distinguishes user and kernel stacks, shows how NPTL creates independent stacks, highlights common pitfalls like stack overflow, memory leaks, and address‑space exhaustion, and provides practical C/C++ examples, tuning tips, thread‑pool designs, and debugging tools to keep your multithreaded programs stable and efficient.

Thread Stacklinuxpthread
0 likes · 46 min read
Master Linux Thread Stacks: Prevent Overflows, Leaks, and Optimize Memory
Sohu Smart Platform Tech Team
Sohu Smart Platform Tech Team
Aug 9, 2025 · Mobile Development

Mastering iOS Locks: From Spin Locks to Semaphores Explained

This article explains the purpose, actions, and common types of locks in iOS—including spin locks, mutexes, semaphores, and read‑write locks—provides practical code examples, discusses underlying principles such as busy‑waiting and priority inversion, and compares performance across different lock implementations.

LocksSynchronizationiOS
0 likes · 18 min read
Mastering iOS Locks: From Spin Locks to Semaphores Explained
Deepin Linux
Deepin Linux
Apr 21, 2025 · Backend Development

POSIX Multithreading and Network Programming in C: Threads, Synchronization, and Socket APIs

This article introduces the POSIX standard for portable multithreaded and network programming in C, explains thread creation, lifecycle, and synchronization mechanisms such as mutexes, semaphores and condition variables, and provides complete server‑client socket examples together with practical multithreaded file‑processing code and debugging tips.

CPOSIXSocket
0 likes · 23 min read
POSIX Multithreading and Network Programming in C: Threads, Synchronization, and Socket APIs
Liangxu Linux
Liangxu Linux
Nov 21, 2024 · Fundamentals

When to Use Spin Locks and How They Work in Multithreaded Code

This article explains the concept of spin locks, compares them with mutexes, shows how to use the pthread API and C++ atomic_flag to implement them, outlines suitable scenarios, highlights CPU‑usage pitfalls, and provides practical code examples.

C++Synchronizationconcurrency
0 likes · 10 min read
When to Use Spin Locks and How They Work in Multithreaded Code
Deepin Linux
Deepin Linux
Oct 30, 2024 · Fundamentals

An Introduction to POSIX Threads (Pthread) and Their Practical Usage in C/C++

This article provides a comprehensive overview of POSIX threads, covering their architecture, creation, synchronization, attributes, scheduling policies, advantages, drawbacks, and real‑world examples such as mutex protection, barrier synchronization, and a cross‑platform network server implementation.

C programmingPOSIXlinux
0 likes · 21 min read
An Introduction to POSIX Threads (Pthread) and Their Practical Usage in C/C++
Liangxu Linux
Liangxu Linux
Apr 26, 2023 · Operations

How to Monitor Multi‑Threaded Linux Processes with top -H

This guide shows how to create and manage multiple pthreads in an embedded Linux program, then monitor each thread’s runtime using the top command with the -H option, including the need to set thread names via pthread_setname_np for clear identification.

linuxmultithreadingpthread
0 likes · 5 min read
How to Monitor Multi‑Threaded Linux Processes with top -H
Liangxu Linux
Liangxu Linux
Apr 18, 2023 · Fundamentals

How to Monitor Every Thread of an Embedded Linux Process with top -H

This guide shows how to create a multi‑threaded C program on embedded Linux, set thread names with pthread_setname_np, and use the top command with the -H option to display each thread’s status, illustrating the difference when thread names are omitted.

DebuggingThreadsembedded
0 likes · 6 min read
How to Monitor Every Thread of an Embedded Linux Process with top -H
AI Cyberspace
AI Cyberspace
Mar 29, 2023 · Fundamentals

Mastering POSIX Threads: From User Threads to Thread Pools in Linux

This article explains the concepts of user threads, the pthread library implementation, thread creation and termination functions, synchronization mechanisms like mutexes and condition variables, and demonstrates how to design and use a lightweight C thread‑pool with practical code examples.

C programminglinuxmultithreading
0 likes · 21 min read
Mastering POSIX Threads: From User Threads to Thread Pools in Linux
Alibaba Cloud Native
Alibaba Cloud Native
Dec 20, 2022 · Backend Development

Why Does Instrumentation.appendToSystemClassLoaderSearch Fail in Containers? A Deep Dive into Java Agent, JNI, and Thread‑Safety

This article investigates intermittent Java Agent errors caused by Instrumentation.appendToSystemClassLoaderSearch in container environments, tracing the issue through JNI calls, glibc stat failures, locale‑dependent iconv conversion, and ultimately fixing it with pthread thread‑local storage and proxy wrappers.

ContainerIConvJNI
0 likes · 11 min read
Why Does Instrumentation.appendToSystemClassLoaderSearch Fail in Containers? A Deep Dive into Java Agent, JNI, and Thread‑Safety
MaGe Linux Operations
MaGe Linux Operations
Oct 13, 2022 · Fundamentals

Mastering POSIX Threads: From Basics to Advanced Synchronization

This article explains the limitations of the traditional Unix fork model, introduces lightweight POSIX threads as a faster alternative, and provides a comprehensive guide to thread creation, attributes, synchronization primitives, and cleanup functions using the pthread library in Linux.

POSIXSynchronizationlinux
0 likes · 17 min read
Mastering POSIX Threads: From Basics to Advanced Synchronization
Alibaba Cloud Native
Alibaba Cloud Native
Jun 18, 2022 · Fundamentals

Unraveling Java Agent Crashes: JVM, glibc, and Thread‑Local Pitfalls

Starting from mysterious Java Agent errors in Alibaba Cloud environments, this article traces the failure through the JVM’s Instrumentation.appendToSystemClassLoaderSearch call, examines glibc’s stat and iconv conversions, reveals thread‑local storage issues, and presents concrete fixes using pthread TLS and proxy wrappers.

IConvJVMJava Agent
0 likes · 12 min read
Unraveling Java Agent Crashes: JVM, glibc, and Thread‑Local Pitfalls
WeChat Client Technology Team
WeChat Client Technology Team
Sep 8, 2021 · Mobile Development

Uncovering Hidden Android Thread Pitfalls: Memory Leaks, Monitoring, and Hook Solutions

This article explores obscure Android thread issues—including uncontrolled thread creation, stack memory leaks, and the impact of thread‑priority settings—while presenting monitoring techniques, a pthread hook implementation, and performance considerations to help developers detect and resolve thread‑related crashes.

AndroidHookMemory Management
0 likes · 15 min read
Uncovering Hidden Android Thread Pitfalls: Memory Leaks, Monitoring, and Hook Solutions
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
ITPUB
ITPUB
Jan 19, 2017 · Fundamentals

How to Detect and Analyze Linux Deadlocks with pstack and gdb

This article explains what a deadlock is, outlines its four necessary conditions, provides a sample pthread program that deadlocks, and shows step‑by‑step how to use pstack and gdb on Linux to identify the stuck threads and understand the root cause.

deadlockgdbpstack
0 likes · 14 min read
How to Detect and Analyze Linux Deadlocks with pstack and gdb