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

How do I upgrade my operating system?

771


What should I consider when buying a laptop?

744


Can we kill init process?

799


What do you know about the latest android version Lollipop?

730


Explian T - Factor?

830


windows 3.1 is

751


Is go garbage collected?

769


What do you mean by Run time Errors?

920


Which one is the first operating system?

716


1) What is an Virtual memory? 2) How do we test API's in both Windows/Linux/Unix? 3) What is an IOCTL? 4) How do you open a char device through API's? 5) What is major num/ minor num? 6) What is the max num for minor num? 7) Who gives you the major / minor numbers? 8) Reverse a string using recursive func. 9) fork/vfork/clone. 10) What does fork returns? 11) What is a zombie process? 12) What happens when a child completes before parent tries to wait for it? 13) Interrupt handlers, top-hdnl....?

2235


What are compile time Errors?

842


Do cores matter for gaming?

735


What are Odm Commands.

820


What is Cycle Stealing in OS?

819


What is the most powerful server in the world?

800