Tag

Atomic

1 views collected around this technical thread.

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.

AtomicMutexSynchronization
0 likes · 8 min read
Understanding Mutex Locks and Their Use in Go Concurrency
Architecture Development Notes
Architecture Development Notes
Jan 26, 2025 · Fundamentals

Master Lock-Free Programming in Rust: Atomic Operations & Memory Ordering

This guide explains how to build high‑performance lock‑free data structures in Rust by using atomic operations, memory ordering semantics, and practical examples such as a thread‑safe counter and a lock‑free stack, followed by best‑practice recommendations.

AtomicRustconcurrency
0 likes · 4 min read
Master Lock-Free Programming in Rust: Atomic Operations & Memory Ordering
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.

AtomicMutexRace Condition
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.

AtomicChannelsMutex
0 likes · 18 min read
Master Go Concurrency: Goroutines, Scheduler, Race Detection, and Channels Explained
FunTester
FunTester
Jan 3, 2025 · Backend Development

Java Atomic Package Classes: AtomicBoolean, AtomicInteger, AtomicLong, and LongAdder

This article introduces Java's java.util.concurrent.atomic package, detailing the core atomic classes—AtomicBoolean, AtomicInteger, AtomicLong, and LongAdder—including their constructors, key methods, typical use cases, and performance considerations in high‑concurrency scenarios for developers seeking efficient thread‑safe operations.

AtomicJavaLongAdder
0 likes · 9 min read
Java Atomic Package Classes: AtomicBoolean, AtomicInteger, AtomicLong, and LongAdder
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.

AtomicMutexconcurrency
0 likes · 13 min read
Master Go Concurrency: Mutex, RWMutex, Cond, Atomic, Once & WaitGroup Explained
IT Services Circle
IT Services Circle
Mar 17, 2024 · Backend Development

Understanding the volatile Keyword in Java Concurrency

This article explains the Java volatile keyword, covering its underlying principles, effects on visibility and instruction reordering, appropriate usage scenarios, limitations, and provides a practical code example demonstrating how volatile ensures thread visibility and prevents dead loops in multithreaded programs.

AtomicCASJava
0 likes · 6 min read
Understanding the volatile Keyword in Java Concurrency
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.

AtomicMutexPHP
0 likes · 5 min read
Handling Concurrent Access and Race Conditions in PHP
Cognitive Technology Team
Cognitive Technology Team
Oct 5, 2023 · Backend Development

Lock‑Free Concurrency in Java: CAS, volatile and JUC Utilities

This article explains how Java achieves lock‑free concurrency using CAS and volatile for optimistic locking, discusses its advantages and drawbacks such as the ABA problem and contention hotspots, and presents solutions including versioned CAS classes and contention‑reduction techniques provided by the JUC package.

AtomicCASJUC
0 likes · 6 min read
Lock‑Free Concurrency in Java: CAS, volatile and JUC Utilities
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Sep 27, 2022 · Backend Development

Four Common Ways to Implement Thread Synchronization in Java

This article explains the concept of thread synchronization in Java and provides detailed examples of four implementation methods—using the synchronized keyword, ReentrantLock, atomic variables, and ThreadLocal—along with code snippets and a comparison of their advantages and usage scenarios.

AtomicJavaReentrantLock
0 likes · 6 min read
Four Common Ways to Implement Thread Synchronization in Java
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.

AtomicMutexSynchronization
0 likes · 19 min read
Understanding Go Concurrency: Goroutines, Scheduler, Threads and Synchronization
Tencent Cloud Developer
Tencent Cloud Developer
Jun 13, 2022 · Backend Development

Analysis of Go's sync.Map Implementation: Design, Architecture, and Source Code Walkthrough

The article explains how Go’s sync.Map achieves high‑concurrency performance by maintaining a lock‑free read‑only snapshot in an atomic.Value and a mutex‑protected dirty map, detailing entry state transitions, miss‑driven promotion, and the Store, Load, and Delete operations that together avoid a global lock.

AtomicData Structuresconcurrency
0 likes · 18 min read
Analysis of Go's sync.Map Implementation: Design, Architecture, and Source Code Walkthrough
Cognitive Technology Team
Cognitive Technology Team
May 22, 2022 · Fundamentals

Lock‑Free (Non‑Blocking) Algorithms and Their Implementation in Java

Lock‑free (non‑blocking) algorithms replace traditional locks with hardware primitives such as compare‑and‑swap (CAS) to ensure data consistency during concurrent access, offering superior scalability and eliminating deadlocks, and the article explains Java’s atomic variables, CAS‑based implementations, and how to address the ABA problem with AtomicStampedReference.

ABAAtomicCAS
0 likes · 5 min read
Lock‑Free (Non‑Blocking) Algorithms and Their Implementation in Java
Top Architect
Top Architect
Sep 4, 2020 · Fundamentals

Understanding the volatile Keyword and Thread Synchronization in Java

This article explains how the volatile keyword ensures visibility of shared variables across threads, illustrates its behavior with examples and code, discusses its limitations regarding atomicity, and presents solutions using synchronized blocks or atomic classes for proper thread synchronization in Java.

AtomicJavaSynchronization
0 likes · 8 min read
Understanding the volatile Keyword and Thread Synchronization in Java
Xiaokun's Architecture Exploration Notes
Xiaokun's Architecture Exploration Notes
Feb 4, 2020 · Fundamentals

Unlocking Java’s CAS: How Unsafe Powers Atomic Operations and Solves ABA

This article explains the Compare‑and‑Swap (CAS) mechanism, its hardware‑level implementation via Java’s Unsafe class, provides sample code for basic CAS, atomic adders, custom atomic types, analyzes the ABA problem, and presents solutions such as versioned stamps and AtomicStampedReference.

AtomicCASJava
0 likes · 10 min read
Unlocking Java’s CAS: How Unsafe Powers Atomic Operations and Solves ABA
Java Captain
Java Captain
Sep 25, 2018 · Fundamentals

Optimistic vs Pessimistic Locks and CAS Implementation in Java

The article explains the concepts of pessimistic and optimistic locking, details how CAS (Compare‑And‑Swap) implements optimistic locks in Java, discusses their advantages, drawbacks such as the ABA problem and high spin costs, and compares CAS usage with synchronized blocks in concurrent programming.

AtomicCASJava Concurrency
0 likes · 14 min read
Optimistic vs Pessimistic Locks and CAS Implementation in Java
360 Zhihui Cloud Developer
360 Zhihui Cloud Developer
Sep 18, 2018 · Backend Development

How to Implement Non‑Reentrant Functions in Go: Mutex and Atomic Solutions

This article explains what a non‑reentrant function is, why it matters in concurrent Go programs, and demonstrates two practical implementations—using a sync.Mutex and an atomic flag—to ensure a function runs only once at any given time.

AtomicMutexconcurrency
0 likes · 5 min read
How to Implement Non‑Reentrant Functions in Go: Mutex and Atomic Solutions
Java Captain
Java Captain
Jun 3, 2018 · Fundamentals

Understanding High Concurrency in Java: Memory Model, Thread Safety, and Synchronization Techniques

This article explores Java high‑concurrency concepts, detailing the Java Memory Model, thread communication, instruction reordering, atomic classes, synchronization mechanisms, lock implementations, concurrent collections, and safe object publication, providing code examples and practical guidance for building robust multithreaded applications.

AtomicJMMJava
0 likes · 18 min read
Understanding High Concurrency in Java: Memory Model, Thread Safety, and Synchronization Techniques