TAG
Go
8 articles
- 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 (8): From Mutex to Read-Write Locks
Continues with counter and counter + ready to explain how read-write locks allow concurrent readers, comparing Java's Lock API, Go sync.RWMutex, and the situation in CPython.
- 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.
- 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 (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 (7): volatile — Visibility and Ordering for ready and counter
Uses the counter + ready example to explain the visibility and ordering guarantees of Java volatile, and why Go and Python do not have an equivalent volatile keyword.
- Concurrency Programming (6): Atomic Implementation — From Runtime to CPU
Follows Java AtomicInteger, Go sync/atomic, and CPython's internal atomic operations to see how Atomic RMW reaches the compiler, runtime, and CPU.
- Concurrency Programming (5): Atomics — Atomicity, Visibility, and Ordering at the Language Level
Continues with counter and ready to explain the atomicity, visibility, and ordering guarantees of atomic operations, then compares the public semantics in Java, Go, and CPython.