All jobs / Embedded / hardware / RTOS
Embedded / hardware interview question · 1–3 years
Average loop time is fine; the plant oscillates. What did you miss?
The strongest answer
Jitter and worst case — I budget max, not mean, and I look at interrupts that steal the edge
Why it works
Exactly. Control cares about the late one. Averages hide the thief.
What a good answer covers
- Budget worst-case, not mean.
- Find IRQs that steal the edge.
- Do not hide jitter in an average.
- Do not blame the plant first.
Answers that fall short
- Close, but not the strongest: A faster average via -O3 only
-O3 does not bound an ISR. - Weak: I average the control output to hide it
Hiding the output is not a spec. - Red flag: I say the plant is wrong
The plant is allowed to be honest.
Who gets asked this
More RTOS questions
- A task should sample every 10 ms. It sleeps for 10 ms at the end of each pass, and over minutes the period…
- Two tasks write a global “state” byte. What is the grown-up move?
- A low-priority task holds a lock a high-priority task needs. What do you name?
- One task corrupts another’s stack. What do you add besides “be careful”?
- 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?