Contents

Operating system on the MCU-based ECU

A real-time operating system schedules control software and provides protection mechanisms that help safety-critical functions share an MCU with other software.

3 min read · Discipline stake: BSW Safety Software

What runs here

An MCU-based brake, steering or battery-management ECU needs an operating system that gives control software predictable opportunities to execute. AUTOSAR Classic uses the Operating System module, usually called AUTOSAR OS. A different real-time operating system (RTOS) can serve this role in another architecture, but its services and integration must be assessed explicitly.

Component Role
Tasks and scheduler Run configured work according to priorities and preemption rules.
Interrupt handling Respond to hardware events; Category 2 interrupt service routines can use permitted OS services.
Counters, alarms and schedule tables Trigger task activations or events according to configured timing.
Resources and synchronization Coordinate access to shared data and hardware.
OS-Applications and protection Group OS objects, define access rights and support isolation where configured.
Hooks Provide defined entry points for error handling and protection reactions.

An OS-Application is a protection and ownership grouping, distinct from an application software component (SWC). Separating software into these groups alone does not establish freedom from interference. Protection features depend on configuration, the selected OS capabilities and hardware support. See the AUTOSAR Specification of Operating System.

Why it looks like this

For a control function, a correct result delivered too late can be unusable. Static configuration makes task releases, priorities, stacks and dependencies available for analysis before deployment. Predictability still depends on execution times, interrupt load and blocking; selecting an RTOS does not prove deadlines are met.

Embedded flash and limited RAM favor a compact, configured platform. An MCU’s memory protection unit can support access boundaries without requiring a general-purpose process environment. Lockstep execution addresses certain hardware faults; it does not replace software partitioning.

Where software with different ASIL requirements shares the processor, the safety argument must address interference through memory, execution time and communication. AUTOSAR OS scalability classes distinguish protection capabilities: SC2 adds timing protection, SC3 memory protection, and SC4 combines both. These capabilities support the argument; they do not automatically make the ECU suitable for ASIL D. See AUTOSAR Requirements on Operating System.

Control software updates should therefore be treated as changes to an analyzed configuration. Even a small diagnostic feature can change execution demand or stack usage. The cost tradeoff includes silicon resources, integration effort and renewed verification.

How it connects

Above the OS, the generated Runtime Environment (RTE) maps SWC runnable entities into tasks. A runnable is a function entry point, rather than an independently scheduled thread. Several runnables may share one task, making their execution order and combined runtime significant. See the AUTOSAR Specification of RTE Software.

Basic Software also needs scheduled execution. Integrators coordinate its main functions with application tasks, interrupts and startup sequencing. Below, processor-specific OS code uses core facilities such as timers, interrupt control and memory protection; MCAL and ECU abstraction provide peripheral access for the wider stack.

Other ECUs communicate through drivers and communication middleware, rather than directly through this scheduler. Include reception, task release, processing and transmission in the end-to-end timing budget. On multicore MCUs, AUTOSAR Inter-OS-Application Communicator (IOC) services can support configured communication across OS-Applications.

Compared with other node classes

  • HPC application processor: Linux, QNX or Android environments support broader application services; virtual machines introduce another scheduling and isolation boundary.
  • HPC safety island: A similar safety RTOS may run here, with additional dependencies on the application processor and shared SoC resources.
  • Zone controller: Multicore AUTOSAR OS integration must accommodate gateway traffic, local I/O and contention between cores.
  • Smart node / LIN slave: Bare metal or a tiny scheduler reduces overhead, with scheduling and protection responsibilities handled more directly by the firmware design.

Best practices

  • Define periods, deadlines, execution budgets and blocking limits before assigning priorities.
  • Align OS-Application boundaries, memory permissions and communication paths with the safety architecture.
  • Analyze worst-case response times and verify assumptions on target hardware under representative peak load.
  • Keep interrupt handlers bounded; defer substantial processing to scheduled tasks.
  • Define and test protection reactions against the required safe or degraded behavior.
  • Reassess timing, stacks and isolation whenever software, compiler options or OS configuration changes.

Common pitfalls

  • Treating OS-Applications as automatic proof of mixed-ASIL separation while overlooking shared drivers, privileged code or DMA access.
  • Assuming timing protection monitors every application deadline; execution-budget enforcement and deadline supervision solve different problems.
  • Using average CPU load as evidence of schedulability while missing interrupt bursts, long critical sections or multicore contention.

What it means for your discipline

  • Base software Core

    Configure tasks, interrupts, OS-Applications and protection settings, and integrate generated OS and RTE code. Maintain consistent scheduling and startup behavior across Basic Software modules.

  • Functional safety Core

    Define interference constraints and required fault reactions. Review timing and isolation evidence against the software safety requirements and OS integration assumptions.

  • HPC & application software Partial

    Keep runnables within execution and stack budgets, follow concurrency rules, and report changes that affect task timing or shared-resource access.

No direct stake: E/E architecture · Cybersecurity · Hardware & silicon · Networks & communication · Diagnostics & lifecycle · Software update & OTA

Where it sits in the software stack

Generic layered software of a central HPC (application processor with hypervisor, plus a safety island) and of a classic MCU-based ECU (AUTOSAR Classic). Highlighted modules matter for this topic. Click any module to open its page.

HPC · application processor (MPU) and safety island (MCU)

Not directly involved on this node type.

MCU-based ECU · AUTOSAR Classic
  • OS — Schedules tasks and interrupts, manages synchronization, and enforces configured memory and timing protection.