← BYTES
Unix IPC·Starter·Ref: 15.1.61

What is a mutex, in the simplest terms?

Have a question about this video? Mention reference 15.1.61 when you contact us.

   [ MUTEX: LOCKED by Thread A ]

   Thread B tries to lock() --> must WAIT until A calls unlock()
a.A lock that allows only one thread (or process) at a time to enter a protected section of code, so only its owner may hold it
b.A type of network cable
c.A function that permanently stops a program
d.A kind of file format
A mutex (mutual exclusion lock) is the most basic synchronization primitive: whoever acquires it owns it, and every other thread/process attempting to acquire it must wait until the owner releases it -- guaranteeing only one party is ever inside the protected section at a time.

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#BYTES15161#UnixIPC