What is the use of Semaphore?

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of the wait() method?

619


What is the difference between the session.update() method and the session.lock() method?

554


What is the relationship between an event-listener interface and an event-adapter class?

554


What is the form of storage space in java?

1735


What do you need to set-up a cluster with jboss?

573






Can constructors be synchronized in java?

617


what is a portable component?

1460


What is message driven beam?

581


What is TL and its use?

1989


What happens when a thread cannot acquire a lock on an object?

535


What must a class do to implement an interface?

583


Explain RMI Architecture?

606


Have you used threads in Servelet?

1928


What value does read() return when it has reached the end of a file?

549


What are the purpose of introspection?

677