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

Why context switching is overhead?

873


Is deepin os stable?

782


What are go channels?

768


What do you know about the latest android version Lollipop?

748


How do you reset your computer?

834


Can yum install rpm?

858


How do I compare files in notepad ++?

748


How do I merge folders on mac?

745


What is the latest version of google browser?

769


Why is my computer so slow?

770


what are latest technologies ? and how will keep yourself up to date ?

2648


What does kernel panic mean?

829


Which intel core is best?

784


Does a disk cleanup delete everything?

763


What is the best memory for a laptop?

795