← BYTES
Unix IPC·Starter·Ref: 15.1.65
In the context of multiple threads sharing memory, what is a 'race condition'?
Have a question about this video? Mention reference 15.1.65 when you contact us.
a.A bug where the correctness of a result depends on the unpredictable timing/ordering of multiple threads accessing shared data, without proper synchronization
b.A competition between two programs to see which one finishes first
c.A hardware fault in the CPU's clock circuitry
d.A normal, intended feature of multi-threaded programs with no downside
A race condition occurs when multiple threads access shared memory without correct synchronization, and the actual outcome depends on the unpredictable order in which their operations happen to interleave -- exactly the class of bug mutexes, semaphores, and the other primitives in this topic exist to prevent.
Find this on YouTube & Instagram
Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:
#BYTES#BYTES15165#UnixIPC