What is a semaphore?

Answer Posted / kondepati

->synchronization tool that does not require busy writing.
->semaphore S-integer variable
->can only be accessesd via two indivisible(atomic) operations
wait(S):while S<=0 do no-op;
S:=s-1;
signal(S):S+1;
semaphores are of two types

COUNTING SEMAPHORE-integer value can range over an
unrestricted domain.

BINARY SEMAPHORE-integer value can range only between 0 and
1;can be simpler to implement.

can implement a counting semaphore S as a binary semaphore.

Is This Answer Correct ?    10 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the latest android operating system?

573


How many goroutines are in a core?

551


Can you turn on a computer with the keyboard?

511


What is the most powerful processor?

591


How can I clean up my computer?

558






iam free downloading the KK Dictionery to my system but that is not installed yet. can anybody tell be why this happen and what the system have to install the software.

1884


What is difference between kernel and os?

566


How do I clean up and speed up my laptop?

495


Why context switching is overhead?

610


When I startup my computer the screen is black?

531


Assuming feedback to the adversary flugging an error as each incorrect character is entered, what is the expected time to discover the correct password?

2869


Why is my computer so slow?

546


How do you reset your computer?

555


How do I make a pdf file on my laptop?

510


Is i3 good for gaming?

581