Tagged articles
63 articles
Page 1 of 1
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
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Oct 18, 2025 · Backend Development

Master Java Concurrency: Choose ReentrantLock, ReadWriteLock, StampedLock, or Semaphore

This article explores Java’s advanced lock mechanisms—ReentrantLock, ReentrantReadWriteLock, StampedLock, and Semaphore—detailing their core features, practical code examples, and ideal usage scenarios, helping developers decide which synchronization tool best fits their performance and concurrency requirements.

JavaLocksReadWriteLock
0 likes · 9 min read
Master Java Concurrency: Choose ReentrantLock, ReadWriteLock, StampedLock, or Semaphore
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
Sohu Tech Products
Sohu Tech Products
May 7, 2025 · Backend Development

Master Java Concurrency: Fork/Join, CountDownLatch, CyclicBarrier, Semaphore & Exchanger Deep Dive

This article provides a comprehensive guide to Java's core concurrency utilities—including Fork/Join, CountDownLatch, CyclicBarrier, Semaphore, and Exchanger—explaining their principles, internal AQS implementation, practical usage patterns, performance optimizations, and complete code examples for real‑world scenarios.

CountDownLatchCyclicBarrierExchanger
0 likes · 25 min read
Master Java Concurrency: Fork/Join, CountDownLatch, CyclicBarrier, Semaphore & Exchanger Deep Dive
Code Mala Tang
Code Mala Tang
Feb 20, 2025 · Fundamentals

Mastering Lock Mechanisms: From Mutexes to Distributed Locks in Python

This comprehensive guide explores why locks are essential in concurrent programming, explains the principles behind mutexes, semaphores, read‑write locks, and re‑entrant locks, provides Python code examples, discusses common pitfalls like deadlocks, and offers best‑practice strategies for production environments.

Synchronizationconcurrencydeadlock
0 likes · 22 min read
Mastering Lock Mechanisms: From Mutexes to Distributed Locks in Python
Raymond Ops
Raymond Ops
Jan 13, 2025 · Cloud Native

How Docker Transforms Go Web App Development and Deployment

This tutorial explains how to containerize a simple Go web application with Docker, set up a development workflow using Docker and Bee, build and run images, and automate continuous integration and deployment with Semaphore, covering prerequisites, Dockerfile creation, testing, and production deployment steps.

DockerGoWeb Development
0 likes · 23 min read
How Docker Transforms Go Web App Development and Deployment
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
php Courses
php Courses
Nov 12, 2024 · Backend Development

Analysis of Process Mutual Exclusion in PHP and Automatic Semaphore Release

This article explains how a PHP script uses a named semaphore for process mutual exclusion, demonstrates why a second concurrent process can acquire the semaphore after the first finishes, and clarifies that PHP automatically releases held semaphores when a process terminates.

BackendPHPconcurrency
0 likes · 3 min read
Analysis of Process Mutual Exclusion in PHP and Automatic Semaphore Release
Architect
Architect
Oct 27, 2024 · Backend Development

How We Scaled a Lottery System to Over 1M Daily Users: Architecture & Performance Hacks

This article details the end‑to‑end architecture and step‑by‑step performance tuning of a high‑traffic lottery platform, covering server‑level rate limiting, application‑level throttling, semaphore usage, user‑behavior detection, caching strategies, database optimizations, and hardware upgrades that together enabled stable handling of millions of daily requests.

Backend ArchitecturePerformance Optimizationdatabase scaling
0 likes · 15 min read
How We Scaled a Lottery System to Over 1M Daily Users: Architecture & Performance Hacks
Code Wrench
Code Wrench
Aug 20, 2024 · Fundamentals

Master OS Fundamentals: From Kernel/User Modes to Semaphores

This article explains core operating system concepts—including its main functions, the distinction between user and kernel modes, process and thread management, and semaphore-based synchronization—providing clear definitions, code examples, and practical usage scenarios for developers.

KernelThreadprocess
0 likes · 8 min read
Master OS Fundamentals: From Kernel/User Modes to Semaphores
Wukong Talks Architecture
Wukong Talks Architecture
Jun 19, 2024 · Backend Development

Design and Optimization of a High‑Concurrency Lottery System

This article details how a large‑scale lottery service was architected and tuned for extreme traffic spikes by applying server‑side rate limiting, application‑level throttling, behavior‑based filtering, caching strategies, database optimizations, and hardware upgrades, resulting in a ten‑fold performance improvement.

Backend ArchitectureDatabase Tuninghigh concurrency
0 likes · 12 min read
Design and Optimization of a High‑Concurrency Lottery System
Open Source Linux
Open Source Linux
Jun 7, 2024 · Backend Development

How Docker Transforms Go Web App Development and Deployment

This tutorial explains how Docker can streamline building, testing, and deploying Go web applications, introduces the use of Semaphore for continuous deployment, and walks through creating development and production Dockerfiles, configuring CI/CD pipelines, and managing updates on the server.

Continuous DeploymentDockerGo
0 likes · 25 min read
How Docker Transforms Go Web App Development and Deployment
MaGe Linux Operations
MaGe Linux Operations
Apr 19, 2024 · Cloud Native

How Docker Transforms Go Web App Development and Continuous Deployment

This tutorial shows how to containerize a Go web application with Docker, use Beego for routing, set up development and production Dockerfiles, run automated tests, and integrate Semaphore for continuous integration and deployment, enabling consistent environments and streamlined workflows.

DockerGoWeb Development
0 likes · 24 min read
How Docker Transforms Go Web App Development and Continuous Deployment
Programmer DD
Programmer DD
Feb 20, 2024 · Backend Development

How to Throttle Java Virtual Threads with Semaphores for Optimal Throughput

This article explains how to manage the throughput of Java 21 virtual threads by using Executors to create them and applying java.util.concurrent.Semaphore to limit concurrent execution, ensuring efficient and safe concurrency without pooling virtual threads.

Backend DevelopmentJavaVirtual Threads
0 likes · 4 min read
How to Throttle Java Virtual Threads with Semaphores for Optimal Throughput
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
IT Services Circle
IT Services Circle
Jun 29, 2023 · Backend Development

Tencent Testing Engineer Interview Experience and Technical Q&A

This article shares a detailed account of a Tencent testing engineer interview, covering self‑introduction, Go knowledge, Redis performance, distributed lock implementation, semaphore mechanics, RPC vs HTTP, concurrency usage, Git security practices, Linux commands, and a few brain‑teaser and algorithm questions.

BackendGoRPC
0 likes · 13 min read
Tencent Testing Engineer Interview Experience and Technical Q&A
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Apr 20, 2023 · Backend Development

Overview of Four Core Java Concurrency Utilities

This article introduces the four essential Java concurrency utilities—CountDownLatch, CyclicBarrier, Semaphore, and Exchanger—explaining their functions, underlying principles, typical usage patterns, and practical scenarios such as thread synchronization, resource limiting, and data exchange in multithreaded applications.

CountDownLatchCyclicBarrierExchanger
0 likes · 7 min read
Overview of Four Core Java Concurrency Utilities
Su San Talks Tech
Su San Talks Tech
Dec 30, 2022 · Fundamentals

Unlocking Java Concurrency: A Deep Dive into AQS, Locks, and Condition Queues

This article explains Java's AbstractQueuedSynchronizer (AQS) framework, covering its MESA monitor model, entry and condition wait queues, exclusive and shared lock acquisition and release, and how core concurrency utilities like ReentrantLock, ReadWriteLock, CountDownLatch, Semaphore, ThreadPoolExecutor, and CyclicBarrier are built upon it.

AQSConditionJava
0 likes · 30 min read
Unlocking Java Concurrency: A Deep Dive into AQS, Locks, and Condition Queues
Top Architect
Top Architect
Oct 27, 2022 · Backend Development

Redis Cache Expiration Avalanche and Mitigation Strategies

The article explains how Redis cache expiration can cause a request avalanche that overloads databases, and presents mitigation techniques such as semaphore rate limiting, per‑key locking, fault‑tolerant cache rebuilding, and example Java code using Spring and Redis.

CacheJavaavalanche
0 likes · 8 min read
Redis Cache Expiration Avalanche and Mitigation Strategies
FunTester
FunTester
Oct 19, 2022 · Backend Development

Controlling Java Async QPS with Semaphore and ThreadPool

This article explains how to use Java's java.util.concurrent.Semaphore together with a fixed-size thread pool to enforce a precise QPS limit for asynchronous tasks, providing API details, implementation steps, and a complete test example.

BackendJavaQPS
0 likes · 6 min read
Controlling Java Async QPS with Semaphore and ThreadPool
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Nov 1, 2021 · Backend Development

Understanding Java Concurrency Utilities: CyclicBarrier, CountDownLatch, Semaphore, and Exchanger

This article provides a comprehensive overview of Java's core concurrency utilities—CyclicBarrier, CountDownLatch, Semaphore, and Exchanger—explaining their purposes, internal mechanisms, constructors, usage patterns, and code examples to help developers master multithreaded programming.

CountDownLatchCyclicBarrierExchanger
0 likes · 11 min read
Understanding Java Concurrency Utilities: CyclicBarrier, CountDownLatch, Semaphore, and Exchanger
Top Architect
Top Architect
Aug 10, 2021 · Backend Development

Understanding Java Concurrency Utilities: CountDownLatch, CyclicBarrier, Semaphore, and Exchanger

This article explains four Java concurrency utilities—CountDownLatch, CyclicBarrier, Semaphore, and Exchanger—detailing their concepts, typical use cases, and providing complete code examples that demonstrate synchronization patterns such as thread coordination, resource limiting, and data exchange.

CountDownLatchCyclicBarrierExchanger
0 likes · 13 min read
Understanding Java Concurrency Utilities: CountDownLatch, CyclicBarrier, Semaphore, and Exchanger
Top Architect
Top Architect
May 24, 2021 · Backend Development

Understanding CountDownLatch, CyclicBarrier, Semaphore, and Exchanger in Java

This article explains Java’s concurrency utilities CountDownLatch, CyclicBarrier, Semaphore, and Exchanger, illustrating their concepts with race‑style analogies, providing complete code examples, and showing execution results to demonstrate how threads can synchronize, wait, limit, and exchange data.

CountDownLatchCyclicBarrierExchanger
0 likes · 12 min read
Understanding CountDownLatch, CyclicBarrier, Semaphore, and Exchanger in Java
Python Crawling & Data Mining
Python Crawling & Data Mining
May 14, 2021 · Fundamentals

Master Python Threading: From Basics to Advanced Techniques

This article provides a comprehensive guide to Python threading, covering core concepts such as thread creation, synchronization primitives like locks, RLocks, conditions, semaphores, events, local storage, and timers, complete with practical code examples and explanations of their usage and pitfalls.

LockPythonSynchronization
0 likes · 12 min read
Master Python Threading: From Basics to Advanced Techniques
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 10, 2021 · Fundamentals

Understanding Java Semaphore: Usage Scenarios, Code Example, and Source‑Code Deep Dive

This article introduces Java's Semaphore as a thread‑synchronization tool, explains its flow‑control use cases such as database connections and parking lots, provides a complete parking‑lot simulation code sample, and analyzes the underlying AQS‑based implementation including fairness, acquire/release mechanics, and auxiliary methods.

AQSFairnessJava
0 likes · 13 min read
Understanding Java Semaphore: Usage Scenarios, Code Example, and Source‑Code Deep Dive
JavaEdge
JavaEdge
Apr 29, 2021 · Interview Experience

Mastering Java Semaphore: How init, down, and up Ensure Thread Safety

This article explains the semaphore model, its three core operations (init, down, up), how they manage counters and waiting queues, and demonstrates proper usage in Java to achieve mutual exclusion and resource limiting, complete with code examples and visual diagrams.

Backend DevelopmentJavainterview
0 likes · 6 min read
Mastering Java Semaphore: How init, down, and up Ensure Thread Safety
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
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Nov 2, 2020 · Backend Development

Java Multithreaded Sequential Printing: Solutions Using Lock, wait/notify, Condition, Semaphore, and LockSupport

This article presents various Java solutions for common interview multithreading problems that require sequential printing, demonstrating implementations using Lock, wait/notify, Condition, Semaphore, and LockSupport, along with detailed code examples and explanations of thread communication mechanisms.

JavaLockconcurrency
0 likes · 15 min read
Java Multithreaded Sequential Printing: Solutions Using Lock, wait/notify, Condition, Semaphore, and LockSupport
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
Programmer DD
Programmer DD
Jun 28, 2020 · Fundamentals

Unlocking Java AQS Shared Mode: How Semaphore Works Under the Hood

This article explains the shared‑mode acquisition in Java's AbstractQueuedSynchronizer, walks through the core template methods, compares them with exclusive mode, and demonstrates a classic application by dissecting the Semaphore source code and its usage patterns.

AQSJavaSharedLock
0 likes · 14 min read
Unlocking Java AQS Shared Mode: How Semaphore Works Under the Hood
FunTester
FunTester
May 27, 2020 · Backend Development

How to Simulate Fixed QPS Mock APIs with Java Semaphore and Moco

This article explains how to overcome the difficulty of isolating external service performance during load testing by creating a fixed‑QPS mock endpoint using Java's Semaphore and a custom Moco ResponseHandler, includes code samples, accuracy observations, and practical guidelines.

JavaMoCoMock API
0 likes · 5 min read
How to Simulate Fixed QPS Mock APIs with Java Semaphore and Moco
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
Java Backend Technology
Java Backend Technology
Sep 15, 2019 · Backend Development

8 Ways to Enforce Thread Order in Java: From join to Semaphore

This article explores eight Java concurrency techniques—including join, main‑thread join, wait/notify, thread pools, Condition, CountDownLatch, CyclicBarrier, and Semaphore—to achieve sequential thread execution, complete with code examples and sample outputs for each method.

Javaconcurrencysemaphore
0 likes · 22 min read
8 Ways to Enforce Thread Order in Java: From join to Semaphore
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Jun 24, 2019 · Backend Development

Understanding Java Thread Locks: synchronized, ReentrantLock, Semaphore, and AtomicInteger

This article explains why multithreading is needed, outlines the challenges of concurrent access, and provides a detailed overview of four Java thread lock mechanisms—synchronized, ReentrantLock, Semaphore, and AtomicInteger—along with their characteristics, usage patterns, and performance considerations.

AtomicIntegerJavaThread Locks
0 likes · 9 min read
Understanding Java Thread Locks: synchronized, ReentrantLock, Semaphore, and AtomicInteger
Aikesheng Open Source Community
Aikesheng Open Source Community
Dec 30, 2018 · Databases

Analyzing InnoDB Semaphore Crashes and a DBA Diagnostic Tool

The article explains why InnoDB semaphore waits exceeding 600 seconds trigger server crashes, details the lock structures and functions involved, shows how buffer pool pressure and metadata statistics cause contention, and introduces a small DBA utility that parses MySQL error logs to reveal the relationships between threads, locks, and transactions.

DBAInnoDBdiagnostics
0 likes · 8 min read
Analyzing InnoDB Semaphore Crashes and a DBA Diagnostic Tool
Architect's Tech Stack
Architect's Tech Stack
Aug 12, 2018 · Backend Development

Understanding and Analyzing the Implementation of Java's Semaphore

This article explains the internal workings of Java's Semaphore, detailing its AQS-based architecture, fair and non‑fair synchronization strategies, core methods such as acquire, release, and their implementations, and provides a practical example demonstrating semaphore usage for thread coordination.

AQSJavaSynchronization
0 likes · 12 min read
Understanding and Analyzing the Implementation of Java's Semaphore