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

advantage of thread?

3 Answers   HCL,


what is meant by JRMP?

0 Answers  


What is clustering? What are the different algorithms used for clustering?

0 Answers  


What is the difference between Process and Threads?

19 Answers  


What is a session? Can you share a session object between different theads?

0 Answers  






what is Static binding?

2 Answers   Wipro,


What is Connection Pooling?

1 Answers   Enteg Technologies, Infosys, Polaris,


What is the immediate superclass of the applet class?

0 Answers  


Can I import same package/class twice? Will the jvm load the package twice at runtime?

0 Answers  


What is the difference between static and non-static with examples?

0 Answers   HCL,


What is glasgow?

0 Answers  


How would you reatach detached objects to a session when the same object has already been loaded into the session?

0 Answers  


Categories