Bird
Raised Fist0

Which of the following statements about binary semaphores and mutexes is INCORRECT?

medium🐞 Bug Identification Q14 of Q15
Operating Systems - Semaphore vs Mutex - When to Use Which
Which of the following statements about binary semaphores and mutexes is INCORRECT?
AA binary semaphore can be used to signal between threads without ownership enforcement
BA mutex guarantees that only the thread that locked it can unlock it
CA binary semaphore always enforces ownership semantics similar to a mutex
DMutexes are typically used to protect critical sections, while binary semaphores are used for signaling
Step-by-Step Solution
  1. Step 1: Review binary semaphore properties

    Binary semaphores do not enforce ownership; any thread can signal.
  2. Step 2: Review mutex properties

    Mutex enforces ownership; only locking thread can unlock.
  3. Step 3: Analyze each statement

    A is correct; B is correct; C is incorrect because binary semaphores lack ownership enforcement; D is correct.
  4. Final Answer:

    Option C -> Option C
  5. Quick Check:

    Binary semaphore ownership enforcement is the key difference from mutex.
Quick Trick: Binary semaphore ≠ mutex ownership enforcement.
Common Mistakes:
MISTAKES
  • Assuming binary semaphore enforces ownership like mutex
  • Confusing signaling with mutual exclusion
  • Believing mutexes are used for signaling
Trap Explanation:
PITFALL
  • Candidates often conflate binary semaphore and mutex due to similar binary states, missing ownership enforcement distinction.
Interviewer Note:
CONTEXT
  • Tests ability to distinguish ownership and usage semantics between binary semaphore and mutex.
Master "Semaphore vs Mutex - When to Use Which" in Operating Systems

2 interactive learning modes - each teaches the same concept differently

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Operating Systems Quizzes