What is a Mutex?: How does it work?

A Systems Programming Class by Edaqa Mortoray

You’ve used a mutex before, but have you wondered how it works? In this class, we look inside to discover what lock and unlock do. We’ll discuss how a program coordinates with the operating system, to allow multiple threads to synchronize their work.

Aside from satisfying your curiosity, this knowledge improves your understanding of concurrent processing. Anybody working with parallel computing should know what’s happening. It helps you spot defects, unravel performance problems, and avoid the evil data races.

I might gloss over a few details in the class, but at the end you’ll understand how a mutex works.

Ask questions and I’ll do my best to answer.


This class is based on the article Hows does a mutex Work? What does it cost?.

For further instruction on programming and interview preparation, check out Interview.codes. A site I created to refresh your knowledge and help you succeed at interviews.

🎓 Levels: Intermediate
Some exposure to parallel computing will help.

⏱ Running Time: 30m


Enroll on SkillShare


Edaqa is an avid teacher with many years of experience in programming and animation. Join the thousands of people who have already benefited from his writing, live streams, and videos.