What is the use of Semaphore?

Answers were Sorted based on User's Feedback



What is the use of Semaphore?..

Answer / geeta

Semaphore variable are to make sure that some shared
variable is not being modified/updated simultaneously by
two separate processes/threads.

Is This Answer Correct ?    2 Yes 0 No

What is the use of Semaphore?..

Answer / anonymous

It is being used to prevent DEADLOCK upto some extent only.
It is a primitive level mechanism.

Is This Answer Correct ?    2 Yes 0 No

What is the use of Semaphore?..

Answer / rajesh

Semaphore is to solve the problem of syncronisation. It is
a monitor, to monitor the critical section of the program.

it can be implemented with the help of the a single
variable and depending upon the value of that variable
thread is allowed to enter in the critical section.

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More Advanced Java Interview Questions

Wt is the main difference between Java and Java J2EE and Advanced java?

5 Answers   Wipro,


What is daemon thread?

3 Answers  


What is abstract schema?

0 Answers  


Explain Object Serialization and it can be used?

3 Answers   Infosys,


what is JTA ?

2 Answers  


What are local interfaces? Describe.

0 Answers  


In connection pool,when 100 clients are requesting, in pool 100 objects is there, when another client is making request how it will work

3 Answers  


What is Lock Based Protocol and what is its use?

2 Answers   Wipro,


which book is better for jdbc ,servlets and jsp

0 Answers   TCS,


how to use debug in my elipse to solve problems that exist in my project

0 Answers   SAP Labs, TCS,


What are the methods used for inter-thread communication? and in what class these methods are defined?

2 Answers  


what is the Remote Stub?

1 Answers  


Categories