Episode 4.7 - Race Conditions and Mutexes

Опубликовано: 13 Июль 2026
на канале: Vadim Karpusenko
5,867
64

Table of Contents:

00:10 - Example of code with Race Conditions
00:18 - Sum of numbers from 0 to n-1
00:31 - Analytical result
00:54 - Confirming Race Conditions
01:14 - Unpredictable result
01:35 - Shared variable
01:46 - Race Conditions explained
02:29 - Race conditions on write-read and write-write operations
02:53 - Avoiding Race Conditions
03:04 - Mutex
03:12 - Penalties of over-synchronization
03:25 - Critical section
03:32 - Mutex = Mutual Exclusion
03:53 - Thread spinning
04:15 - Over-synchronized codes are essentially serialized
04:34 - Justifying critical sections
04:55 - Lightweight synchronization
05:03 - Atomic operations
05:23 - Atomic operations can lead to over-synchronization as well
05:44 - Supported Atomic Operation
06:10 - Atomic operations cannot protect classes