All jobs / Embedded / hardware / RTOS
Embedded / hardware interview question · 1–3 years
When do you pick an RTOS over a main-loop, and when not?
The strongest answer
RTOS when I have concurrent deadlines I cannot honestly interleave — main-loop when the work is a simple sequence I can bound
Why it works
Exactly. Concurrency you can name. Fashion and logos are not deadlines.
What a good answer covers
- RTOS for named concurrent deadlines.
- Main-loop when the sequence is boundable.
- Not a fashion pick.
- Not a logo pick.
Answers that fall short
- Close, but not the strongest: Always RTOS; it is 2026
2026 still has tight loops that win. - Weak: Never RTOS; they are bloat
A well-used RTOS is not automatically bloat. - Red flag: I pick whichever has the nicer logo
Logos do not meet a 2 ms cycle.
Who gets asked this
More RTOS questions
- 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?
- 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”?