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
How do you crash a computer?
How do you fix a crashed computer?
Will disk cleanup delete my files?
describe the situation in which priority inversion can occur
Can we kill init process?
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?
What is a Safe State and what is its use in deadlock avoidance?
How many goroutines are in a core?
What are the Types Of Vg & Explain About Them?
How do you remove a virus from your computer?
Is heap shared between processes?
How do I boot up my computer?
What is a Kernel?
How do I merge folders on mac?
Can I restore my computer to yesterday?