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 / jethva_trupti

A semaphore, a new variable type.
A semaphore could have the value 0,indicating that no
wakeups were saved, or some positive values if one or more
wakeups were pending.
a semaphore s is an integer variable that apart from
initialization, is accesssed only through two standard
atomic operations, wait and signal. these operations were
orignially termed p(for wait to test) and v(for signal to
increment).
The classical defination of wait in psedocode is
wait(s)
{
while(s<=0)
;// no-op
s--;
}
The classical defination of signal in psedocode is
signal(s)
{
s++;
}
Modification to the integer value of smaphore in wait and
signal operations must be executed individually.
that is, when one process modifies the semaphore value no
other process can simultaneously modifiy that same
semaphore value.

Is This Answer Correct ?    68 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do cores matter for gaming?

913


Can I put an ssd in my old computer?

949


How To Convert A Normal Vg To Big & Scalable Vg And Also Big To Scalable Vg?

981


What's the best operating system?

996


Can you turn on a computer with the keyboard?

835


What Command To Take Backup Other Vg's?

982


How do I free up disk space?

926


Why context switching is overhead?

1010


What is the difference between the OS which you use and other OSs?

948


How do I merge folders on mac?

933


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

967


discuss the procedures to evaluate disk excess time

2527


What is the best os for laptop?

954


When I press power button on laptop nothing happens?

864


How do I combine multiple folders on a mac?

921