What is a semaphore?

Answer Posted / mahi 27

"semaphore " is an integer value that provide signalling
among the process
and it is an synchronization tool
semaphores are proposed by "DIJKSTRA"
generally semaphores are divided into 2 types
they are 1.General semaphore(or)counting semaphore
2.Binary semaphore(or)Mutex
in general semaphores 2 primitives are used they are
1.semwait(s)
2.semsignal(s)
semwait() checks decrements the semaphore value if the value
becomes negative then the process executing the semwait()is
blocked other wise the process continues execution
semsignal() increments the semaphore value if the value is
less than or equal to zero then a process blocked by a
semwait()operation is unblocked

Is This Answer Correct ?    18 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do simultaneous downloads take longer?

640


Which intel core is best?

653


Can I restore my computer to yesterday?

629


Is 4 cores enough for streaming?

687


any body tell me what are the prob's mostly we face and send some critical prob in real time environment in Solaris and veritas (VXVM,VCS)

1885






What do you know about the latest android version Lollipop?

628


How do you reset your computer?

646


Which one is the best operating system?

611


How do I run wget?

609


Assuming one link of the Trojan horse copy-and-observe-later chain is broken. There are two other possible angles of attack by Alice: Alice logging on and attempting to read the string directly, and alice assigning a security level of sensitive to the back-pocket file. Does the reference monitor prevent these attacks?

2466


what is multitask win95

637


How do you fix a computer that won't start up?

590


How do I compare plugins in notepad ++?

645


How do I combine multiple folders on a mac?

629


What's the best operating system?

667