MCQs City stays free thanks to ads. Please turn off your ad blocker for this site so content and features keep working.
Operating System
Process Synchronization
Q
A semaphore is a shared integer variable __________
AA. That can not drop below zero
BB. That can not be more than zero
CC. That can not drop below one
DD. That can not be more than one
Correct Answer:
A. A. That can not drop below zero
Explanation:
A semaphore is a shared integer variable that can not drop below zero. In binary semaphore, if the value of the semaphore variable is zero that means there is a process that uses a critical resource and no other process can access the same critical resource until it is released. In Counting semaphore, if the value of the semaphore variable is zero that means there is no resource available.