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 you fix a computer that won't start up?

687


What are compile time Errors?

823


Can I factory reset my laptop without a recovery disc?

705


what is gr-edge edit?

1888


What is the difference between kernel and operating system?

699


Who started gnu?

875


Which one is the best operating system?

713


Can I delete old updates to free up disk space?

699


What should I consider when buying a laptop?

723


How do I change my local disk?

698


Is 4 cores enough for streaming?

790


How do I clean up my computer to make it run faster?

701


How do you reset your computer?

762


What is Cycle Stealing in OS?

799


What is startup repair on my computer?

732