What is a binary semaphore? What is its use?

Answers were Sorted based on User's Feedback



What is a binary semaphore? What is its use?..

Answer / v.vijayakumar

A binary semaphore is one, which takes only 0 and 1 as
values. They are used to implement mutual exclusion and
synchronize concurrent processes

Is This Answer Correct ?    74 Yes 12 No

What is a binary semaphore? What is its use?..

Answer / usha

Binary semaphore has two values 0 and 1. It can be used for
guarding critical section and also for guarding single
resource. Semaphore value 1 indicates, resource is
available, 0 means it is not available.

Is This Answer Correct ?    24 Yes 3 No

What is a binary semaphore? What is its use?..

Answer / kulbir kaur

semaphores that are initialized to 1 and are used by two or
more processes to ensure that only one of them can enter its
critial region at a time are called binary semaphore.

Is This Answer Correct ?    10 Yes 3 No

What is a binary semaphore? What is its use?..

Answer / 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

What is a binary semaphore? What is its use?..

Answer / anjana sharma

Has value 0 or 1 ,used by different to have an acess to
critical region of a process.

Is This Answer Correct ?    11 Yes 9 No

What is a binary semaphore? What is its use?..

Answer / noel

Binary semaphore has two values 0 and 1. It can be used for
guarding critical section and also for guarding single
resource. Semaphore value 1 indicates, resource is
available, 0 means it is not available.

Is This Answer Correct ?    1 Yes 0 No

What is a binary semaphore? What is its use?..

Answer / pradeep_deepu

Another interpretation is semaphore means number of
resources available. Here , binary means two resources are
available.
It is used for synchronization by application of mutual
exclusion principle.(ex. Allowing only one resource to
access the contents)

Is This Answer Correct ?    21 Yes 30 No

Post New Answer

More Operating Systems General Concepts Interview Questions

What do you mean by a semaphore?

0 Answers   Flextronics,


What is page cannibalizing?

1 Answers   HCL, Wipro,


Can chkdsk damage a hard drive?

0 Answers  


What are the different tasks of Lexical analysis?

4 Answers  


In a compiler there is 36 bit for a word and to store a character 8bits are needed. IN this to store a character two words are appended .Then for storing a K characters string, How many words are needed. [a] 2k/9 [b] (2k+8)/9 [c] (k+8)/9 [d] 2*(k+8)/9 [e] none

1 Answers   Wipro,






What is asynchronous task?

0 Answers  


If two processes which shares same system memory and system clock in a distributed system, what is it called?

2 Answers   IBM,


Name the functions constituting the os's memory management.

0 Answers  


What is the safest operating system?

0 Answers  


What are co-operating processes?

0 Answers  


What is busy waiting?

3 Answers  


Why paging is used in os?

0 Answers  


Categories