What is the difference between mutex and semaphore?

Answers were Sorted based on User's Feedback



What is the difference between mutex and semaphore?..

Answer / ravichand

There are 3 major differences between Mutex and Binary
semaphore.....
1. In case of Mutex semaphore the task that had taken the
semaphore can only give it, however in the case of binary
semaphore any task can give the semaphore.

2. Calling SemFlush() function in Mutex is illegal.

3. Mutex Semaphore can not be given from an ISR.

Is This Answer Correct ?    6 Yes 9 No

What is the difference between mutex and semaphore?..

Answer / rabia

well its true that mutex is a binary semaphore having value
1 or 0
but mutex also define that when a producer is producing
something consumer is not allowed to consume at that
time.........
where as semaphore is the locking mechanism which have non
negative integers

Is This Answer Correct ?    10 Yes 14 No

What is the difference between mutex and semaphore?..

Answer / answers

Mutex: Nothing but a binary semaphore.
Mutex definition says "Mutex can lock any number of times,
and also it should unlock any number of times"---meaning,
in re-entrant codes if recursive is used.

In this case it will lock number of times and also should
unlock same number of times.

Semaphore: i think its default-----reeated answers.

Is This Answer Correct ?    9 Yes 23 No

What is the difference between mutex and semaphore?..

Answer / rasmi mishra

Mutex is the bonary semaphore.

Is This Answer Correct ?    9 Yes 30 No

Post New Answer

More Operating Systems General Concepts Interview Questions

Binding of instructions and data to memory?

0 Answers  


What is bursting?

0 Answers  


What is memory-management unit (mmu)?

0 Answers  


Explain about linker and the functions executed by them?

0 Answers  


Explain 32 bit application/OS vs 64 application/OS?

0 Answers   MCN Solutions,






How do I search for excel files on my computer?

0 Answers  


Do 64 bit applications use more memory?

0 Answers  


what are multi core operating systems?

2 Answers  


Write a function that responds to a click anywhere on the page by displaying an alert dialog. Display the event name if the user held Shift during the mouse click. Display the element name that triggered the event if the user held Ctrl during the mouse click.

0 Answers  


Do I need program files and program files x86?

0 Answers  


What are the advantage of using threads?

0 Answers  


List advantages and disadvantages of dynamic memory allocation vs. static memory allocation.?

0 Answers  


Categories