All jobs / Embedded / hardware / RTOS

Embedded / hardware interview question · 0–1 years

When do you reach for a mutex, and when for a binary semaphore?

The strongest answer

A mutex protects shared data — it has an owner who must give it back, and it can lend priority to whoever is blocked; a binary semaphore signals an event from an ISR or a task to a task

Why it works

Exactly — ownership and priority inheritance are what make a mutex the right tool for shared data.

What a good answer covers

Answers that fall short

Who gets asked this

More RTOS questions