Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is a semaphore?

Answer Posted / thangavelu t

semaphore is integer variable that used to achieve mutual
exclusion.
it always indicates no of resource instances available.

programming example:
code
{
acquire(s);
critical region;
release(s);
}

acquire(semaphore s)
{
while(s==0);
s--;
}
release(semaphore s)
{
s++;
}
init(semaphore s,int instances)
{
s=instances;//initializes to no of resources instances
}

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you crash a computer?

1019


How do you fix a crashed computer?

985


Will disk cleanup delete my files?

905


describe the situation in which priority inversion can occur

1343


Can we kill init process?

1053


Directories can be implemented either as "special files" that can only be accessed in limited ways, or as ordinary data files. What are the advantages and disadvantages of each approach?

4479


What is a Safe State and what is its use in deadlock avoidance?

1021


How many goroutines are in a core?

976


What are the Types Of Vg & Explain About Them?

981


How do you remove a virus from your computer?

970


Is heap shared between processes?

967


How do I boot up my computer?

910


What is a Kernel?

1074


How do I merge folders on mac?

1006


Can I restore my computer to yesterday?

970