Embedded Software Engineer Question:

Download Job Interview Questions and Answers PDF

Tell me what is difference between binary semaphore and mutex?

Embedded Software Engineer Interview Question
Embedded Software Engineer Interview Question

Answer:

The 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.

Download Embedded Software Engineer Interview Questions And Answers PDF

Previous QuestionNext Question
Tell me what happens when recursive functions are declared inline?Tell me what is RTOS?