Which statement correctly distinguishes a mutex from a counting semaphore?

Options

  • A. A mutex is commonly used for exclusive ownership of a resource, whereas a counting semaphore can represent multiple available resource instances
  • B. A mutex is always used to count an unlimited number of resources
  • C. A counting semaphore cannot be used for synchronization
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

A. A mutex is commonly used for exclusive ownership of a resource, whereas a counting semaphore can represent multiple available resource instances

Detailed Explanation

Explanation: A mutex is primarily used to provide mutual exclusion for a critical section and commonly has ownership semantics. A counting semaphore maintains a count and can be used to control access to multiple instances of a resource.