Multiple choice

A semaphore whose variable is allowed to take on only the values of 0 and 1 is called ____ semaphore.

  1. binary

  2. unary

  3. general

  4. none of these

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

A binary semaphore can only take values 0 and 1, acting like a mutex lock. It's used for mutual exclusion. General (counting) semaphores can take non-negative integer values and manage multiple resource instances.