AeroCoder
Open the tools

DO-178C HANDBOOK · CONTENTS

DO-178C HANDBOOK

/

Special Topics

RTOS & Partitioning

Real-time operating systems, robust time and space partitioning, and IMA.

Desk summary

  • 01A safety-critical RTOS is airborne software like any other: it must meet DO-178C at the highest level it serves, along with its board support package, drivers and libraries.
  • 02Partitioning isolates software components so a fault in one cannot corrupt another. DO-178C §2.4.1 sets five principles; Table A-4 objective 13 asks that partitioning integrity be confirmed.
  • 03Robust partitioning must hold in space (memory), time (CPU) and I/O, even with design errors or hardware faults in a partition. It is the foundation of IMA (DO-297).
  • 04ARINC 653 standardises the partitioned-OS interface (APEX): fixed partition schedules, sampling and queuing ports, health monitoring.
  • 05Partitioning is a system property, not an RTOS feature. Caches, DMA, interrupts and shared I/O are where it usually breaks. Multicore processors add interference channels addressed by AMC 20-193 / AC 20-193 (formerly CAST-32A).

Intuition

Think of it like an apartment building

Each partition is a flat with its own walls (memory protection), its own fixed slot for the shared laundry (the time schedule), and its own mailbox (I/O ports). A noisy tenant cannot get into your flat, cannot use your laundry slot, and cannot read your post — whatever they do, and even if their own wiring catches fire. The landlord (the RTOS and hardware) enforces the rules, so the walls must be at least as strong as the most valuable thing in any flat. That is why the partitioning software must be at the level of the highest-level application it hosts.

The RTOS as airborne software

An RTOS provides multitasking, deterministic scheduling, inter-task communication, memory management, interrupt handling and, often, robust partitioning. Because it underpins every application, it carries the highest software level of anything it hosts. A certifiable RTOS must be deterministic (bounded, predictable service times), reliable, compatible with the processor and environment, fault tolerant with health monitoring, certifiable (complete life cycle data), maintainable and reusable. FAA AC 20-148 describes how a reusable software component such as an RTOS can be packaged for reuse across projects.

Classic RTOS hazards and how they are handled

HazardWhat happensUsual mitigation
DeadlockTasks wait forever for resources held by each otherDesign out one of its four preconditions (e.g. fixed lock order); analysis, since testing rarely finds it
Starvation and lockoutA task never gets the resource or CPU it needs in timeSchedulability analysis; bounded critical sections
Priority inversionHigh-priority task blocked by a low-priority one holding a lock (the Mars Pathfinder resets)Priority inheritance or priority ceiling protocol; better, a design where it cannot happen
Memory leaks and fragmentationHeap slowly exhausted or unusableNo dynamic allocation after initialisation; fixed-size pools
Inter-task interferenceA task overwrites another’s data or the kernel’sMMU protection; kernel in a privileged mode
JitterCaches and pipelines make execution times varyCache flush at partition switch; WCET analysis including worst-case flush time

Pitfall

Certification traps with a COTS RTOS

A “safe subset” cut from a commercial OS, but the user manual still describes the full one. Life cycle data reverse-engineered from dense, under-commented code. Features unused by your applications left in — they are deactivated code and must be handled as such (see Dead, Extraneous & Deactivated Code). Error handlers that were never exercised. The RTOS tested on a vendor reference board but not on your hardware with your BSP. And vendor problem reports that are not shared for the life of the aircraft.

The RTOS developer should deliver a vulnerability analysis — sometimes called a partitioning or hazard analysis — listing behaviours that could affect users (data consistency, deactivated code, tasking, scheduling, memory and device access, queuing, interrupts and exceptions) and the constraints the integrator and application developers must respect. AC 20-148 expects such an analysis for any reusable software component. Your system requirements must then trace to the RTOS requirements you rely on, so there is no gap between what the RTOS does and what the system assumes.

Partitioning in DO-178C

DO-178C §2.4.1 treats partitioning as a way to contain faults and, potentially, reduce verification effort. Whether components run on separate hardware or share a processor, the same principles apply:

  • 1.A partitioned component must not contaminate another’s code, I/O or data storage.
  • 2.A partitioned component may use shared processor resources only during its scheduled time.
  • 3.Failures of hardware unique to one partitioned component must not adversely affect the others.
  • 4.Software that provides partitioning must be at the same or higher level than the highest-level component it protects.
  • 5.Hardware that provides partitioning must be assessed by the system safety process.

DO-178C Table A-4

Verification of Outputs of Software Design Process

#ObjectiveRefABCDOutputs
1

Low-level requirements comply with high-level requirements

6.3.2.a·Software Verification Results (11.14)
2

Low-level requirements are accurate and consistent

6.3.2.b·Software Verification Results (11.14)
3

Low-level requirements are compatible with target computer

6.3.2.c··Software Verification Results (11.14)
4

Low-level requirements are verifiable

Unlike the high-level equivalent (A-3 obj 4), not required at Level C.

6.3.2.d··Software Verification Results (11.14)
5

Low-level requirements conform to standards

6.3.2.e·Software Verification Results (11.14)
6

Low-level requirements are traceable to high-level requirements

6.3.2.f·Software Verification Results (11.14)
7

Algorithms are accurate

6.3.2.g·Software Verification Results (11.14)
8

Software architecture is compatible with high-level requirements

6.3.3.a·Software Verification Results (11.14)
9

Software architecture is consistent

Components, data flow and control flow fit together correctly.

6.3.3.b·Software Verification Results (11.14)
10

Software architecture is compatible with target computer

6.3.3.c··Software Verification Results (11.14)
11

Software architecture is verifiable

6.3.3.d··Software Verification Results (11.14)
12

Software architecture conforms to standards

6.3.3.e·Software Verification Results (11.14)
13

Software partitioning integrity is confirmed

Conditional: only applies when partitioning is used; the only A-4 objective at Level D.

6.3.3.fSoftware Verification Results (11.14)
applies with independence
applies
· not required

A:13 B:13 C:9 D:1

Table A-4 objective 13 (“Software partitioning integrity is confirmed”) applies at every level whenever partitioning is used. Partition violations are also a named error class for hardware/software integration testing (§6.4.3), which pulls partitioning into Table A-6 testing. The hard part is that partitioning requirements are negative (“no partition can write another partition’s memory unless configured as shared”): a few tests demonstrate it, but arguing the tests are sufficient needs a structured partitioning analysis of every shared resource.

Note

Protection is wider than partitioning

CAST-2 frames partitioning as one form of protection, which may be one-way or two-way, strict (no effect at all) or safety-only (no effect on safety properties, e.g. a CRC on data from a non-assured link). Wrappers, encoding, tools and separate hardware are other protection means.

Robust time, space and I/O partitioning

The three dimensions of robust partitioning

DimensionGoalUsual mechanismWhere it breaks
Space (memory)No partition can change another’s code or private data, or command its private devicesHardware MMU tables set up by the kernel; software fault isolation if no MMUDMA engines bypassing the MMU; shared caches; misconfigured tables; stack overflow into neighbours
Time (CPU)Each partition gets its budget at its scheduled rate; nobody can steal time or halt the CPUStatic cyclic partition schedule (ARINC 653 major/minor frames); timer-tick-only interruptsRunaway loops, overruns, interrupts, cache flush time, DMA bus contention
I/OEach partition receives its I/O and can only send what it is allowed toPorts and channels defined in configuration tables; driver APIs mediating device accessShared buses, device drivers, intermediate buffers, interrupts from devices

Worked example

Cache flush and the partition window

A display computer hosts a level A primary flight display partition and a level D maintenance partition. To stop the maintenance partition’s cache contents from slowing the PFD partition unpredictably, the kernel flushes the cache at each partition switch. The flush time depends on how much dirty data is written back, so the worst-case flush is included in each window’s budget. If windows are too short, the PFD partition spends most of its slot with a cold cache — a performance problem the timing analysis must catch.

Designing for robust partitioning

0/8

ARINC 653 and IMA (DO-297)

ARINC 653 defines APEX, the interface between applications and a partitioned operating system. Part 1 covers the required services: partition management, process management within a partition, time management, inter-partition communication through sampling ports (latest value, fixed size) and queuing ports (message queues), intra-partition communication (buffers, blackboards, semaphores, events), and health monitoring. Part 2 adds optional services such as a file system, multiple module schedules and logbooks. Partition sizes, schedules, ports and health-monitor actions are set in configuration data owned by the system integrator, which makes applications portable between compliant platforms.

DO-297 (recognised in the US by AC 20-170) gives development and certification guidance for Integrated Modular Avionics: a shared platform of hardware and core software that hosts applications from different suppliers and of different levels. Robust partitioning is its cornerstone — it must give the same functional isolation a federated design with separate boxes would have, including under hardware failures, and must not depend on any hosted application behaving well. DO-297 describes incremental acceptance in six tasks, from platform acceptance through application acceptance to aircraft integration, so platform and application credit can be reused.

Model-based development

Generated code in a partition

Generated application code typically runs as one or more ARINC 653 processes inside a partition, called by a hand-written or generated scheduler wrapper. The model’s sample rates must map onto the partition period and minor frames; rate transitions in the model become inter-process or inter-partition communication. Verify that the model’s timing assumptions (sample time, execution order) match the partition schedule, and include the generated step functions’ WCET in the partition budget.

Choosing an RTOS, and the multicore question

  • —Pedigree: has it been approved at your level on aircraft before? Is complete life cycle data available, and in what form (full data, AC 20-148 RSC package, or reverse-engineered)?
  • —Fit: ARINC 653 or POSIX profile? Supports your processor, MMU, caches and devices? Scalable so unused features can be excluded?
  • —Evidence: vulnerability and partitioning analysis available? Test suites runnable on your hardware, with your BSP?
  • —Support: will the vendor share all problem reports for the life of the aircraft, support certification, and notify of updates? What if the vendor disappears?
  • —Tools: are timing analysis, configuration and debugging tools available, and do any need qualifying?
  • —Change: how much will be modified for your project, and what retest does that trigger?

Note

Multicore processors: AMC 20-193 / AC 20-193

On a multicore processor, cores share caches, memory controllers and interconnects, so one core can slow another even with perfect MMU protection. These interference channels break the timing assumptions of classic partitioning. CAST-32A (2016) set out the issues; it has been replaced by EASA AMC 20-193 (2022) and FAA AC 20-193 (January 2024), which carry essentially the same objectives: plan the MCP configuration, identify and mitigate interference channels, verify resource usage and worst-case execution times with interference present, handle MCP-specific errors, and summarise compliance. Most objectives apply at the higher DALs, with a reduced set at lower ones. No single mitigation is treated as sufficient on its own.

What the auditor looks for

What the reviewer will ask

Which partitioning requirements exist, and where is the analysis showing every shared resource is covered? How do DMA, caches and interrupts respect partition windows? Is the partitioning software at the level of the highest hosted application? Was the RTOS tested on the actual hardware and BSP? Who owns the configuration tables and how are they verified? For multicore: what interference channels exist and how were WCETs measured under interference?

Self-check

A processor hosts a level A partition and a level C partition. The RTOS kernel provides the partitioning. What level must the kernel’s partitioning function be developed to?

Sources & further reading

  • DO-178C §2.4.1 (partitioning), §6.3.3, §6.4.3; Table A-4 objective 13
  • Rierson, Developing Safety-Critical Software (2013), ch. 20 and 21, and Appendices B and C (RTOS concerns and selection questions)
  • ARINC 653, Avionics Application Software Standard Interface (Parts 1 and 2)
  • RTCA DO-297, Integrated Modular Avionics Development Guidance and Certification Considerations; FAA AC 20-170
  • CAST-2, Guidelines for Assessing Software Partitioning/Protection Schemes
  • FAA AC 20-148, Reusable Software Components
  • EASA AMC 20-193 (2022) and FAA AC 20-193 (2024), Use of Multi-Core Processors; CAST-32A (2016)
  • FAA report, Commercial Off-The-Shelf Real-Time Operating System and Architectural Considerations

← Previous

Field-Loadable & User-Modifiable Software

Special Topics

Next →

Configuration, Parameter & Aeronautical Data

Special Topics

On this page

The RTOS as airborne softwarePartitioning in DO-178CRobust time, space and I/O partitioningARINC 653 and IMA (DO-297)Choosing an RTOS, and the multicore question