Question
What is the primary purpose of a mutex lock?
Select an option. Your answer will be checked instantly.
Correct Answer: A. To grant one thread at a time exclusive access to a protected resource
Explanation:
A mutex has ownership semantics and protects a critical section from concurrent conflicting access.
A thread acquires it before entering and releases it after leaving.
Leave a Reply