adplus-dvertising
frame-decoration

Question

How does a mutex work in multithreaded programming?

a.

It allows multiple threads to own the mutex simultaneously

b.

It allows any thread to acquire the mutex at any given moment

c.

It can only be acquired by one thread at any given moment

d.

It does not allow threads to compete for a single resource

Posted under Reverse Engineering

Answer: (c).It can only be acquired by one thread at any given moment Explanation:A mutex (from mutually exclusive) is an object that can only be acquired by one thread at any given moment. Any threads that attempt to acquire a mutex while it is already owned by another thread will enter a wait state until the original thread releases the mutex or until it terminates.

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. How does a mutex work in multithreaded programming?