Interview Prep: What is a Mutex?
Edaqa Mortoray
29:38
More details
Description
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.
Project
How would you like to write a mutex?
That may sound harder than it really is. Iâve created a small app, with some skeleton interface for the mutex. You need to complete the mutex to get the simulation working correctly.
This exercise helps you internalize a part of how the mutex works.
The code is at: https://github.com/mortoray/interview.codes
Check it out and open the `demo.html` file in your browser. You need to complete the `mutex.js` file.
User Reviews
Rating
Edaqa Mortoray
Instructor's Courses
SitePoint
View courses SitePoint- language english
- Training sessions 7
- duration 29:38
- Release Date 2023/09/25