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

What is monolithic kernel?

1207


Tell me is windows nt a full blown object oriented operating system? Give reasons?

1147


What is the latest version of mint?

1035


What is basic concept of operating system?

990


When would you choose Top-down methodology?

2330


Explain the purpose of the open() and close() operations.

2199


What are the various components of a computer system?

1060


What are the differences between Real Time Operating System (RTOS) and General Purpose Operating Systems (GPOS)?

1070


What is short term scheduler in operating system (os)?

1154


Difference between time sharing and multitasking systems?

1089


Difference between a thread and process?

1177


How much does a pc cost?

1030


What's the difference between 32 and 64 bit?

993


How are data structures handled by ntfs?

1168


State two differences between user and kernel space?

1066