Tell me what is difference between binary semaphore and mutex?
Submitted by: MuhammadThe differences between binary semaphore and mutex are as follows -
☛ Mutual exclusion and synchronization can be used by binary semaphore while mutex is used only for mutual exclusion.
☛ A mutex can be released by the same thread which acquired it. Semaphore values can be changed by other thread also.
☛ From an ISR, a mutex can not be used.
☛ The advantage of semaphores is that, they can be used to synchronize two unrelated processes trying to access the same resource.
☛ Semaphores can act as mutex, but the opposite is not possible.
Submitted by: Muhammad
☛ Mutual exclusion and synchronization can be used by binary semaphore while mutex is used only for mutual exclusion.
☛ A mutex can be released by the same thread which acquired it. Semaphore values can be changed by other thread also.
☛ From an ISR, a mutex can not be used.
☛ The advantage of semaphores is that, they can be used to synchronize two unrelated processes trying to access the same resource.
☛ Semaphores can act as mutex, but the opposite is not possible.
Submitted by: Muhammad
Read Online Embedded Software Engineer Job Interview Questions And Answers
Top Embedded Software Engineer Questions
☺ | Explain me can we use printf inside ISR? |
☺ | Tell me can we use any function inside ISR? |
☺ | Tell me what are the qualifiers in C? |
☺ | Tell me how many types of IPC mechanism you know? |
☺ | Tell me why embedded system is useful? |
Top Best Engineering Categories
☺ | Mechanical Engineering Interview Questions. |
☺ | Civil Engineering Interview Questions. |
☺ | Chemical Engineering Interview Questions. |
☺ | Electrical Engineering Interview Questions. |
☺ | Automobile Engineering Interview Questions. |