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 resource allocation graph?

737


Is 32 bit obsolete?

553


What is the difference between logical address space and physical address space?

568


What is RR scheduling algorithm?

662


What is process synchronization?

632






How can you pause the execution of a Thread for a certain amount of time?

615


What is the largest ram?

539


Difference between time sharing and multitasking systems?

581


Is 100 cpu usage bad?

545


What is the safest operating system?

584


How does swapping result in better memory management?

812


What is tras timing?

576


What is sock_stream?

574


Can you please explain the difference between demand-paging and pre-paging?

601


Explain the difference between logical & physical address.

628