Skip to content
RED SAGSkills
easyEmbedded Systems Engineer interview question

When would you use bare-metal firmware versus an RTOS?

What the interviewer wants to hear

  • Bare-metal: super loop with interrupts, simple and small
  • RTOS: tasks, priorities, scheduling, synchronisation
  • RTOS helps with many concurrent activities and timing needs
  • Costs: RAM, complexity, learning curve
  • Connectivity stacks often need an RTOS

Model answer

Bare-metal firmware usually means a super loop in main that checks flags and calls functions, plus interrupts for time-critical events. It is small, easy to understand and has no extra overhead, so I use it for simple devices like a temperature controller or a remote with a few inputs. An RTOS like FreeRTOS or Zephyr adds tasks with priorities, a preemptive scheduler, queues, semaphores and timers. It becomes worth it when the device does many things at once with different timing needs, such as reading sensors, running a BLE or Wi-Fi stack, updating a display and logging, because each activity can be a separate task and a high-priority task always responds on time. The costs are extra RAM for stacks, more complexity, and new bug types like deadlocks and priority inversion. Many vendor connectivity stacks already require an RTOS, which often makes the decision for you.

Can you answer it under time pressure?

Take a timed easy round and get scored on every answer.

Start mock interview

More easy Embedded Systems Engineer questions