What is a semaphore in concurrency control?
21 views
- A data structure used to synchronize access to shared resources (Correct Answer)
- A hardware component used to control access to shared resources
- A synchronization primitive used to protect critical regions
- A software component used to manage threads
Explanation
Answer: a. A data structure used to synchronize access to shared resources
Explanation: A semaphore is a synchronization primitive used to synchronize access to shared resources in a multi-threaded program. It is a data structure that contains a counter and two operations, wait and signal, which can be used to control access to the shared