TAG
Python
10 articles
- Concurrency Programming (12): Finale — Series Summary
A look back at concurrency correctness, shared memory and message passing, and the five-layer view connecting concurrency tools to hardware.
- Concurrency Programming (11): Shared Memory and Message Passing — How They Work Together
Explores how channels and queues synchronize shared state internally, and how shared memory and message passing work together in a task-processing system.
- Concurrency Programming (9): BlockingQueue and Channels — Atomicity, Visibility, and Ordering
From producer–consumer handoffs to Java BlockingQueue, Go channels, and CPython queue.Queue, this article examines the atomicity and memory-ordering guarantees of message passing.
- Concurrency Programming (8): Read-Write Locks — From Language Rules to the CPU
Uses the same counter and counter + ready examples to trace read-write locks from Java language-level rules through the JDK, HotSpot, and x86-64, explaining Atomicity, Visibility, Ordering, and the boundary with Mutex.
- Concurrency Programming (1): Start with the Hardware — From count++ to Atomicity, Visibility, and Ordering
Starting from the von Neumann architecture and instruction execution, this article follows count++ down to the hardware-level problems of atomicity, visibility, and ordering.
- Concurrency Programming (2): Language Memory Models — Rules Programmers Can Rely On
Moves from hardware memory models back to the language layer: why languages need their own concurrency semantics, and what Java, Go, and CPython guarantee to concurrent programs.
- Concurrency Programming (0): The Problem Space and Scope
Defines the scope as concurrency within a single process on a single machine, then connects shared variables, shared memory, message passing, language concurrency semantics, and hardware implementation.
- Concurrency Programming (7): volatile — From Language Semantics to the CPU
Uses the counter + ready example to trace Java volatile from the Java Memory Model through HotSpot to x86-64, showing how visibility and ordering are defined and implemented, and how volatile differs from atomics and mutexes.
- Concurrency Programming (5): Atomics — Atomicity, Visibility, and Ordering at the Language Level
Continues with counter and ready to explain the language-level rules behind Java AtomicInteger, Go sync/atomic, and CPython's application-level Atomic boundary.
- Concurrency Programming (3): Mutexes — Atomicity, Visibility, and Ordering at the Language Level
Continues with counter++ to explain how mutexes provide atomicity, visibility, and ordering, then compares Java synchronized, Go sync.Mutex, and CPython threading.Lock.