What is the difference between mutex and semaphore?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
Explain the difference between load-time dynamic linking and run-time dynamic linking?
How can the speed of interrupt driven input output systems be improved?
One starts counting from 0 to max and the other stars from max to 0. Which one executes fast.
How do I find my hidden files?
What is mutual exclusion and multithreading in OS?
Explain the Functionality of Operating System?
What is the difference between ie and edge?
How to stop a long running thread?
0 Answers Sans Pareil IT Services,
Under what circumstances do page faults occur? Describe the actions taken by the operating system when a page fault occurs?
What are the reasons for process suspension?
Explain the handheld systems.
Why is round robin algorithm considered better than first come first served algorithm?