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
Do cores matter for gaming?
Can I put an ssd in my old computer?
How To Convert A Normal Vg To Big & Scalable Vg And Also Big To Scalable Vg?
What's the best operating system?
Can you turn on a computer with the keyboard?
What Command To Take Backup Other Vg's?
How do I free up disk space?
Why context switching is overhead?
What is the difference between the OS which you use and other OSs?
How do I merge folders on mac?
What is a Safe State and what is its use in deadlock avoidance?
discuss the procedures to evaluate disk excess time
What is the best os for laptop?
When I press power button on laptop nothing happens?
How do I combine multiple folders on a mac?