Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How do I cd into a directory?

959


What is a sector?

969


How do I know if my motherboard is 32 bit or 64 bit?

930


Can I use chkdsk on ssd?

985


What is the cpu scheduler?

989


Explain briefly about compiler and its functioning?

1014


What are the disadvantages of microkernels?

1341


How do I run chkdsk?

999


How do I find the path of a shared folder?

1006


What is difference between Process and Thread?

1022


How does dynamic loading aid in better memory space utilization?

1441


How do I copy and paste a file location?

977


What is a virtual memory?

958


Should I install 32 bit or 64 bit?

957


What is the main cause of blue screen of death?

1063