What is the use of Semaphore?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

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

755


hi friends, i have done my BE(CSE)at 2011 then i have joined one company before they asked me 50k so i paid but now they telling no project here so we r going to close like that so now i need any job i have good knowledge in core java and j2ee(jsp,servlet,jdbc) so if u know any job pl help me

1989


what is a non-repeatable read?

2037


what is a portable component?

1673


What class is the top of the awt event hierarchy?

825


Is there a guarantee of uniqueness for entity beans?

750


What state does a thread enter when it terminates its processing?

824


What is the map interface?

838


What are local interfaces? Describe.

901


What is local interface. How values will be passed?

767


Is “abc” a primitive value?

822


What is the difference between the string and stringbuffer classes?

791


AS a developer will u create a data source in connection pool? If so how will u do that, how to access the object from connection pool using IRAD tool?

1896


Explain the steps in details to load the server object dynamically?

4786


What is RMI and what are the services in RMI?

841