What is a binary semaphore? What is its use?
Answer Posted / ashaa
The semaphore discussed previously is called a counting sempahore. Another kind of semaphore is the binary semaphore; This is exactly like a counting semaphore except for the following:
the semaphore value is restricted to 0 and 1.
P succeeds only when the semaphore value is 1.
V does not change the semaphore value when it is 1. (Thus successive Vs are lost.)
Binary semaphores are sometimes easier to implement. than counting semaphores. We will not describe implementations of binary semaphores in terms of low-level or OS constructs (these would be similar to the implementations of counting semaphores). Instead we show how counting semaphores can be implemented by binary semaphores, which demonstrates that binary sempahores are as powerful as counting semaphores.
Convention: Unless otherwise mentioned, a semaphore is to be interpreted as a counting semaphore.
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What is monolithic kernel?
Tell me is windows nt a full blown object oriented operating system? Give reasons?
What is the latest version of mint?
What is basic concept of operating system?
When would you choose Top-down methodology?
Explain the purpose of the open() and close() operations.
What are the various components of a computer system?
What are the differences between Real Time Operating System (RTOS) and General Purpose Operating Systems (GPOS)?
What is short term scheduler in operating system (os)?
Difference between time sharing and multitasking systems?
Difference between a thread and process?
How much does a pc cost?
What's the difference between 32 and 64 bit?
How are data structures handled by ntfs?
State two differences between user and kernel space?