Blocking-based RTOS tasks create brittle embedded software because blocked tasks are unresponsive to new events, forcing unnecessary task proliferation and mutex complexity. The Active Object design pattern offers a better alternative: tasks structured as 'message pumps' with a single blocking call at the top, dispatching events to non-blocking handlers. This event-driven approach improves responsiveness, cohesion, and extensibility. Wrapping this pattern in a framework adds inversion of control and enables hierarchical state machines (as modeled in UML), making designs more scalable and amenable to code generation. The author argues this represents a similar leap over traditional RTOS as RTOS represented over the superloop.

10m read timeFrom embeddedrelated.com
Post cover image