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

Define latency, transfer and seek time with respect to disk I/O.

2 Answers   Brainware,


Do I need web plugins for vlc?

0 Answers  


What is Throughput, Turnaround time, waiting time and Response time?

0 Answers  


Describe main memory and secondary memory storage in brief.

0 Answers  


How is the process address space handled during process migration?

1 Answers  






What is the use of paging in operating system?

0 Answers  


Why is it that a single, all – encompassing metric cannot be developed for programme complexity or programme quality?

0 Answers   IBM,


What is BSS(Block Started by Symbol)?

0 Answers  


What is the max ram for a 64 bit?

0 Answers  


How does dynamic loading aid in better memory space utilization?

0 Answers  


How can I boot from usb?

0 Answers  


unix system is a)multi processing b)multi processing ,multiuser c)multi processing ,multiuser,multitasking d)multiuser,multitasking

7 Answers   eInfochips, Semantic Space, Verizon,


Categories