which is best among semaphores and mutexes?

Answer Posted / ankit tripathi

We should always go for mutex lock as compared to semaphore
lock when it comes for a Multithreaded program(exclusion
b/w threads) and when we do not want exclusion b/w process,
the reason is that mutex is not an IPCS and any other
program cannot effect it, moreover you need not to create
an IPC Key and all those stuffs.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of an I/O status information?

624


How are the wait/signal operations for monitor different from those for semaphores?

495


What are the four necessary and sufficient conditions behind the deadlock?

609


Does ram affect excel performance?

508


What is the kernel of the operating system?

504






How do I force a program to close?

514


How many registers does x86 have?

547


What is mutual exclusion and multithreading in OS?

609


Is faster ram worth it?

528


What is difference between Process and Thread?

590


What are the thread states?

594


What is Page-Stealer process?

725


What are old chkdsk files?

581


Can bad sectors cause blue screen?

544


What is a cache memory?

560