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

Can a laptop have both ssd and hdd?

844


When I press power button on laptop nothing happens?

657


Can I restore my computer to yesterday?

752


How do you clear cache on a laptop?

749


Is google an operating system?

712


How do I compare files in notepad ++?

722


Is gnu an os?

731


Is the higher the ghz the better?

719


What is the most powerful computer in the world 2019?

749


Is the g in gnu silent?

720


How do I upgrade my operating system?

763


What is the shortcut key to refresh laptop?

703


What is the most powerful server in the world?

791


How To Enable & Disable Quorum?

800


What is the meaning of slosh login in nfs?

2285