All jobs / Embedded / hardware / RTOS
Embedded / hardware interview question · 3–5 years
One task corrupts another’s stack. What do you add besides “be careful”?
The strongest answer
MPU regions or separate privilege, plus a watermark — careful is not a boundary
Why it works
Exactly. Hardware boundaries. Merging and enlarging hide the thief.
What a good answer covers
- MPU or privilege split.
- Keep watermarks.
- Careful ≠ a boundary.
- Do not merge smashers.
Answers that fall short
- Close, but not the strongest: A code review emoji
Emoji is not an MPU. - Weak: I merge the tasks so they share the smash
A merge is a bigger smash. - Red flag: I enlarge both stacks until RAM is gone
RAM is finite; fences first.
Who gets asked this
More RTOS questions
- You have a 2 ms control deadline. What number do you present?
- A low-priority logger never runs. What do you check before “buy a faster MCU”?
- Two teams share one firmware, each has added mutexes, and you have now had two hangs that reproduce about…
- What does a staff engineer pin on the wall for a control product?
- When do you reach for a mutex, and when for a binary semaphore?
- When do you pick an RTOS over a main-loop, and when not?
- A UART interrupt needs to hand a byte to a task through an RTOS queue. What must the ISR do differently?
- Average loop time is fine; the plant oscillates. What did you miss?