Java semaphore

Ads

 
 

Share on Google+Share on Google+

samar
Java semaphore
1 Answer(s)      7 years ago
Posted in : Java Interview Questions
What is the use of Semaphore?
Ads
View Answers

October 30, 2010 at 12:31 PM


Hi,

A semaphore is a type of Interprocess communication resource used for synchronization and mutual exclusion between any two asynchronous processes.

Semaphore is a location in memory whose value can be tested and set by more than one process. The test and set operation is, so far as each process is concerned, uninterruptible or atomic; once started nothing can stop it. The result of the test and set operation is the addition of the current value of the semaphore and the set value, which can be positive or negative. Depending on the result of the test and set operation one process may have to sleep until the semphore's value is changed by another process. Semaphores can be used to implement critical regions, areas of critical code that only one process at a time should be executing.

Semaphores are commonly use for two purposes: to share a common memory space and to share access to files. Semaphores are one of the techniques for interprocess communication (IPC). The C programming language provides a set of interfaces or "functions" for managing semaphores.

Thanks.


Ads









Related Tutorials/Questions & Answers:
Java semaphore
Java semaphore  What is the use of Semaphore
Version of com.smartlogic>Semaphore-Java-APIs dependency
List of Version of com.smartlogic>Semaphore-Java-APIs dependency
Advertisements
Maven Dependency Semaphore-Java-APIs >> Semaphore-4.0-44
You should include the dependency code given in this page to add Maven Dependency of com.smartlogic >> Semaphore-Java-APIs versionSemaphore-4.0-44 in your project
Maven Dependency Semaphore-Java-APIs >> Semaphore-4.0.45
You should include the dependency code given in this page to add Maven Dependency of com.smartlogic >> Semaphore-Java-APIs versionSemaphore-4.0.45 in your project
java
java  diff bt core java and java
java
java  what is java
JAVA
JAVA  how the name came for java language as "JAVA
java
java   why iterator in java if we for loop
Java
Java   Whether Java is pure object oriented Language
java
java  explain technologies are used in java now days and structure java
java
java  different between java & core java
java
java  is java open source
java
java  what is java reflection
java
java   in java does not pointers concept but what is nullpointers in java?   nullpointer is a runtime Exception
java
what is the size of array in java ?  what is the size of array in java ? what is the mean of finalize in java
java
java   What is ?static? keyword
java
java  RARP implementation using java socket
java
java  sample code for RARP using java
java
java  Does java allows multiline comments
Java
Java  how to do java in command prompt
java
java  give a simple example for inheritance in java
java
java  give a simple example for inheritance in java
java
java  why to set classpath in java
java
java  why to set classpath in java
java
java  why to set classpath in java
java
java  why to set classpath in java
java
java  Write a java code to print "ABABBABCABABBA
java
java  write a program in java to acess the email
java
java  send me java interview questions
java
java  how use java method
java
java  what are JAVA applications development tools

Ads

 
Advertisement null

Ads