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

Explain about local and global page replacements?

990


What is a critical section?

1151


Explain an idle thread?

1006


How do I stop blue screen?

978


Explain the handheld systems. List the issues related to the handheld system.

1129


Difference between NTFS and FAT32?

1082


Explain briefly about linker and its functioning?

1024


Explain what is the memory wall problem?

1213


Explain page fault interrupt?

1028


Can you please explain the difference between trap and trapdoor?

1058


What are the deadlock avoidance schemes?

1209


How do you exit a screen?

1046


What are the various capacities in which a ram is available?

1006


How do I know chkdsk is finished?

995


Is it safe to delete ost file?

986