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 g in gnu?

634


Does a disk cleanup delete everything?

652


How do I make a pdf file on my laptop?

602


Can I delete old updates to free up disk space?

600


How many goroutines are in a core?

633






How can I clean up my computer?

653


What do you mean by Run time Errors?

791


any body tell me what are the prob's mostly we face and send some critical prob in real time environment in Solaris and veritas (VXVM,VCS)

1885


What is an example of a network operating system?

575


What are Odm Commands.

709


What is the most powerful processor?

659


What do you know about the latest android version Lollipop?

628


How do I clean up and speed up my laptop?

582


What causes a computer not to boot up?

564


Which is better curl or wget?

692