What is the use of Semaphore?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
Difference between loadclass and class.forname?
What is waiting state? In what ways a thread can enter into waiting state?
whats is mean by class.forName() whats the return type of class
Can I use javascript to submit a form?
What value does read() return when it has reached the end of a file?
Do I need to import javlang package any time? Why ?
Why does most servlets extend HttpServlet?
Can I run seam with jdk 1.4 and earlier?
Wt is the main difference between Java and Java J2EE and Advanced java?
How to implement dphibernate to activate lazy loading in Flex with java ?thanx in advance!
What is the difference between a static and a non-static inner class?
Does Java pass arguments by value or reference?