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

In the token-passing mutual exclusion algorithm, is the timestamping used to reset clocks and correct drifts, as in the distributed queue algorithms? if not, what is the function of the timestamping?

2459


How do you reset your computer?

752


How do you pronounce gnu?

750


What causes a computer not to boot up?

651


What are compile time Errors?

811






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

3066


Which one is the best operating system?

707


What is the best os for laptop?

700


Why is my computer so slow?

718


What is difference between post and patch?

777


What is an example of a network operating system?

665


Do cores matter for gaming?

718


What is the name of first operating system?

657


How do I make a pdf file on my laptop?

695


How do you clear cache on a laptop?

727