What is a semaphore?

Answer Posted / chinnadurai.s

Synchronization tool that does not require busy waiting
Semaphore S–integer variable
Two standard operations modify S: wait()and signal()
Originally called P()andV()
Less complicated
Can only be accessed via two indivisible (atomic) operations

wait (S)
{
while S <= 0;
// no-op
S--;
}
&#61548;signal (S)
{
S++;
}

Is This Answer Correct ?    23 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is microsoft coming out with a new operating system?

529


What is gnu os?

555


How many goroutines are in a core?

552


Is i3 good for gaming?

581


What is the most powerful processor?

592






What are positional parameters?

492


Why is my computer so slow?

546


Can I close my computer while updating?

574


What is microsoft spreadsheet compare?

542


How do I combine multiple folders on a mac?

544


1) What is an Virtual memory? 2) How do we test API's in both Windows/Linux/Unix? 3) What is an IOCTL? 4) How do you open a char device through API's? 5) What is major num/ minor num? 6) What is the max num for minor num? 7) Who gives you the major / minor numbers? 8) Reverse a string using recursive func. 9) fork/vfork/clone. 10) What does fork returns? 11) What is a zombie process? 12) What happens when a child completes before parent tries to wait for it? 13) Interrupt handlers, top-hdnl....?

2047


Is the higher the ghz the better?

526


Can I delete old updates to free up disk space?

525


Dear All, When the patches are installed in the server OS, how will we know that which patch is the latest patch?

1735


What is the meaning of slosh login in nfs?

2104