← Back
Home › Systems › Embedded and IoT

avionics

Hosts an aircraft's flight-critical software on a few shared computing cabinets, isolating applications from one another instead of using many separate boxes.

Airbus IMA, Honeywell Primus Epic and FMS, Garmin G3000

Open the avionics pageavionics Code coverage instrumentationcompilers: Insert counters into compiled code to record which blocks, edges or lines ran; a spanning tree of the control-flow graph cuts the counters needed.›End to end protection e2eembedded: Per-message counter, ID and CRC over a black channel to detect loss, repetition, corruption, delayFault detection isolationrecoveryembedded: Monitor/response tables, fault isolation and safe-mode recovery hierarchies for autonomous systemsFault tree analysisembedded: Write the unwanted top event as AND/OR logic over component failures, reduce it to minimal cut sets, then compute its probability and each failure's share.›Model checking and formal proofembedded: Exhaustively explore a model's reachable states (or prove its invariants with a solver or proof assistant) to find rule violations with a shortest counterexample trace.›Hot-standby redundancyembedded: A second, always-current controller shadows the primary and takes over within a few cycles of silence; epochs stop the old primary from fighting back.›Preemptive priority schedulingembedded: Always run the highest-priority ready task, switching the instant a higher one becomes ready; selection is O(1) with one FIFO per priority and a bitmap.›Redundancy votingembedded: N-modular redundancy and MooN voting (2oo3, TMR) with discrepancy detectionSafety-critical codingstandardsembedded: Which rule sets (MISRA C, CERT C, JPL Power of Ten, Rust lint subsets) apply when software must not fail, what they forbid, and how to enforce them in CI.›Safety monitor architectureembedded: Independent doer/checker safety monitor that forces a safe state when the main channel misbehavesTime triggered schedulingembedded: Static cyclic schedules where every task and message has a precomputed time slotWatchdog timerembedded: A hardware down-counter that resets the chip unless software proves, in time and in a plausible pattern, that it is still healthy.›Geodesic distance (haversine,Vincenty, Karney)geometry: Shortest-path distance between two lat/lon points on the Earth: haversine on a sphere (about 0.5% error), Vincenty or Karney on the WGS84 ellipsoid (sub-millimetre).›Leg based path constructiongeometry: Build the lateral flight path from route legs (TF, CF, RF, fly-by turns, holds) as geodesic segments and tangent arcsGpu vector renderinggraphics: Rendering vector paths, fills and strokes on the GPU (tessellation or SDF/coverage)Retained mode ui treegraphics: Widget, element and render-object trees with rebuild, relayout and repaint boundariesContext switchinghardware-os: Handing a core to another task by saving and loading registers, stack and address space; the hidden cache and TLB cost outweighs the direct one.›Interrupt handlinghardware-os: How a device signal reaches a CPU handler through an interrupt controller and vector table, and how top/bottom halves, polling switch-over and coalescing keep load bounded.›Virtual memory and the TLBhardware-os: How page tables and TLBs translate every address, what TLB reach means, and when 2 MiB or 1 GiB huge pages pay off on Linux.›Runge-Kutta 4numerics: The classic four-stage, fourth-order ODE step; error drops 16× when the step halves, with no derivatives or past steps needed.›Extended Kalman filterrobotics: Kalman filter for nonlinear motion and measurement models: linearize f and h with Jacobians at the current estimate each step. The default estimator in robot navigation.›Pure pursuit path trackingrobotics: Geometric path following by steering to a look-ahead point (pure pursuit, L1, Stanley)Sensor fusionrobotics: Combining IMU, GNSS, camera, lidar and radar estimates with Kalman-type filters and time alignmentToken bucketsystems: A bucket of up to b tokens refilled at rate r; requests spend tokens, enforcing an average rate while allowing bursts of b.›Control-flow graphcompilers: Split a linear instruction list into basic blocks and connect them by jumps; the graph every optimizer, SSA builder and dataflow pass walks.›Minimum spanning treegraphs: Cheapest set of edges connecting all vertices; Kruskal sorts edges and joins components with union-find, Prim grows one tree, Boruvka merges in parallel rounds.›Hierarchical state machinesystems: Nest states so a substate inherits its parent's reactions and only overrides what differs, with ordered entry and exit actions along the path.›BFS and DFSgraphs: The two basic graph traversals; BFS gives hop distances and levels, DFS gives discovery/finish order for cycles, components and topological order.›Binary decision diagramsoptimization: A reduced ordered BDD stores a Boolean function as a shared DAG that is unique per variable order, so equivalence is one integer compare and counting is one pass.›Swiss tabledata-structures: Open-addressing hash table that filters 8-16 slots at once with 1-byte hash tags and SIMD, giving fast lookups at 87.5 % load.›CDCL SAT solvingoptimization: Search for a satisfying assignment, learn a new constraint from every dead end, and jump back past irrelevant choices; handles industrial formulas with millions of clauses.›Dpll toptimization: SMT architecture: CDCL over boolean abstraction plus theory solvers, theory propagation, Nelson-OppenPrimary-backup replicationdistributed: One node orders all writes and ships them to standbys; the acknowledgement rule (none, one, all) sets what a crash loses, and an external arbiter decides who takes over.›Dataflow analysiscompilers: Compute a fact per program point (live variables, reaching definitions, available expressions) by iterating transfer functions over the CFG to a fixed point.›Memory protection unitembedded: A handful of base/size regions with permissions, checked on every access by the CPU, give microcontroller tasks isolation and stack-overflow traps without an MMU.›Newton root findingnumerics: Linearize at the guess and jump to the tangent root; quadratic convergence near a simple root, made robust by brackets (1D) or line search.›+ 14 moreUnion-findgraphs: Disjoint-set forest with union by size and path compression; merges sets and answers same-set queries in effectively constant time.›Sparse matrices (CSR)numerics: Compressed sparse row stores only nonzeros as row pointers, column indices and values; SpMV streams them once, so it is memory-bandwidth bound.›d-ary heapdata-structures: Array heap with d children per node (d = 4 typical): half the binary heap's depth, siblings in one cache line, faster priority queues.›Drat proof certificatesoptimization: DRAT and LRAT proofs emitted by SAT solvers and checked independentlyTwo watched literalsoptimization: Unit propagation for SAT that watches just two literals per clause, so backtracking costs nothing and long clauses are rarely touched.›Arena allocatorsystems: Allocate by bumping a pointer through big chunks and free everything at once: a few instructions per allocation for objects sharing a lifetime.›Congruence closurecompilers: Union-find over terms with congruence propagation; decides equality with uninterpreted functionsBit blastingoptimization: Reduce bit-vector constraints to CNF via adder, multiplier and comparator circuitsSimplex methodoptimization: Solves linear programs by walking along the edges of the feasible polytope from vertex to vertex, one basis swap (pivot) at a time; the workhorse behind MIP solvers.›Leasesdistributed: A lock that expires on its own: bounded-time ownership that survives crashes and partitions, given bounded clock drift and fencing tokens on writes.›Write-ahead logstorage: Append each change to a checksummed sequential log and fsync it before touching data pages; the basis of crash durability in nearly every database.›Health checkingsystems: Decide per backend whether to route to it using probes and real-traffic errors, with consecutive-count hysteresis, capped ejection and a panic fallback.›+ 13 moreHash consingdata-structures: Intern structurally equal immutable terms so equality is pointer comparison and sharing is maximalArithmetic circuitshardware-os: Adder and multiplier circuits: carry-lookahead, prefix adders, Booth encoding, Wallace and Dadda treesTseitin transformationoptimization: Linear-size CNF encoding of formulas with auxiliary variablesFencing tokensdistributed: A number that grows with every lock grant and is checked by the protected resource, so a paused ex-holder's late write is rejected.›CRC32C checksumshardware-os: The Castagnoli CRC-32 with dedicated instructions on x86 (SSE4.2) and ARMv8. It is the standard fast integrity check for storage blocks, logs and network frames.›fsync, O_DSYNC and O_DIRECThardware-os: What fsync, fdatasync, O_DSYNC, O_DIRECT and F_FULLFSYNC really guarantee on Linux and macOS, and the exact call sequences for crash-safe files.›+ 5 moreSIMD programminghardware-os: Process 4-16 lanes per instruction with AVX2, AVX-512 or NEON via Rust std::arch, with runtime dispatch and a portable fallback.›+ 2 more+ 1 more

How it is built

Architecture overview

Integrated modular avionics (IMA) replaces a rack of single-purpose "black boxes" with a few shared computing cabinets that host many aircraft functions at once. The FAA's advisory circular defines an IMA as a "shared set of flexible, reusable, and interoperable hardware and software resources" that form a platform hosting applications, and stresses that an IMA is defined by its architecture, not by the function it serves: it may run displays and navigation, but also flight controls or electrical-power control (FAA AC 20-170). The one idea that makes it work is robust partitioning: every application gets a guaranteed slice of CPU time, memory and network bandwidth, enforced by the platform, so that a failure in one function cannot reach another and each can be certified on its own.

A cabinet runs a partitioning kernel (an ARINC 653 style operating system) with a fixed, repeating time schedule. Partitions talk through typed ports and over a deterministic switched network (AFDX, ARINC 664 Part 7). A health monitor and watchdogs detect faults; redundancy and restart policies recover from them. On top sit the functions themselves: here a flight-management and navigation function and a cockpit display, as in the commercial IMA families named in the goal (Airbus, Honeywell Primus Epic, Garmin G3000). Those products are closed; this page describes the shared design, not any one of them.

Parts:

 sensors (IRS, GPS, air data) ──AFDX / ARINC 429──┐
                                                  ▼
 ┌────────────── IMA cabinet (one or several, dual-redundant) ─────────────┐
 │ module: CPU + MMU + timer                                               │
 │  ┌ partition: nav / FMS ─┐ ┌ partition: display ─┐ ┌ partition: other ─┐│
 │  │ fusion, EKF, legs     │ │ widget tree, draw   │ │ …                 ││
 │  └──── ports (sampling, queuing) ───┴──────────────┴───────────────────┘│
 │  partitioning kernel: major frame = [win A][win B][win C]… (repeats)    │
 │  health monitor ◄── faults, watchdog ──► restart / switch to standby    │
 └───────────────▲──────────────────────────────────────┬──────────────────┘
                 │ virtual links (BAG + max frame size) │
                 └──────────── AFDX switches ◄──────────┘

How the parts fit together

Partitioned kernel

The kernel gives each partition spatial isolation (its own address space, enforced by the MMU, see Virtual memory and the TLB) and temporal isolation (a fixed execution window inside a repeating major frame). The window schedule is static, set at configuration time, which keeps execution deterministic (SYSGO's ARINC 653 overview). The window table is a time-triggered schedule (time-triggered-scheduling, no page yet); inside a window the partition's own processes are scheduled by priority with preemption (Preemptive priority scheduling). The two levels are why a runaway partition loses only its own window, which a single priority scheduler across all applications could not guarantee.

Switching between windows is a Context switching step that also swaps the memory map and flushes or tags TLB entries; its cost is paid at every window boundary, so windows are sized to amortise it. Interrupt handling is the awkward part: a device interrupt must not run another partition's code during your window. Kernels either keep interrupt handlers minimal (they record and defer) or route the work to the partition that owns the device in its next window.

Partitions exchange data over ports. ARINC 653 names two kinds, sampling (latest value wins, for periodic state) and queuing (ordered messages, for events) (SYSGO overview). Communication is declared in configuration, never discovered at run time, so the platform can check bandwidth and memory before the aircraft flies.

Health and recovery

The standard also covers health monitoring: failures are detected and handled at process, partition or module level so they do not cascade (SYSGO overview). A Watchdog timer catches a partition that stops making progress; a fault handler then applies a configured action such as restarting the partition or the module. fault-detection-isolation-recovery (no page yet) names the whole loop. The FAA circular asks IMA systems to restart any hosted function whose continued operation the safety assessment requires, preferably automatically so that crew-initiated recovery is not needed (AC 20-170, ch. 6).

For functions that must keep running, the cabinet pair is redundant. Hot-standby redundancy keeps a second channel with current state so a switch-over loses no more than one frame. Where three channels compute the same value, redundancy-voting (no page yet) masks a single wrong one; a safety-monitor-architecture (no page yet) places a simple independent checker beside a complex function so a wrong output is blocked rather than trusted. These choices come out of Fault tree analysis: each top event (loss of function, misleading data) is traced to the failures that cause it, which shows where redundancy or a monitor is required.

Deterministic network and data integrity

AFDX is full-duplex switched Ethernet with static routing tables, two redundant links, and traffic regulated at the sender by virtual links (Gutiérrez et al.). Each virtual link has a largest frame size and a bandwidth allocation gap (BAG): a power of two between 1 and 128 ms, the minimum interval between frames on that link. A sender may emit a frame only when its allowance permits, which is the same rate-limiting idea as a Token bucket, and switches police the same contract. Because every flow has a known maximum rate, worst-case latency and jitter can be calculated, which is the proof an authority wants. The cost is that unused bandwidth stays reserved.

end-to-end-protection-e2e (no page yet) wraps safety data (a counter, a checksum, sometimes a timeout) so that a receiver detects loss, repetition, reordering or corruption introduced anywhere between application and application, including inside the partitioning kernel or switches. It sits above the network because the network is not the only thing that can fail.

The navigation function runs in its own partition. sensor-fusion (no page yet) combines inertial, satellite and air-data inputs; the workhorse is an Extended Kalman filter that propagates the state with the inertial model and corrects it with each measurement, with Runge-Kutta 4 as a typical integrator for the propagation step. PX4 and ArduPilot, open autopilots, use the same filter family for their state estimators (PX4 EKF2 guide; ArduPilot EKF overview).

Given a position, the flight plan is turned into a path. Procedures are coded as legs, such as "track to a fix" or "constant-radius arc to a fix"; leg-based-path-construction (no page yet) joins them with turn transitions into one lateral path, using Geodesic distance for distances and bearings along the ellipsoid. pure-pursuit-path-tracking (no page yet) then turns "where am I against the path" into a roll or heading command for the autopilot. The contract with the platform is only its inputs and outputs: it reads sampling ports at a fixed rate and writes its command, so it can be tested on a desktop with the same data.

Cockpit display

The display partition draws the crew's view. A retained-mode scene tree (retained-mode-ui-tree, no page yet) lets the display application change a widget's data while a separate renderer owns drawing, which also fits partitioning: the application and the renderer are separate parties talking over defined messages. gpu-vector-rendering (no page yet) draws maps, symbols and text from vector data on a GPU. Display integrity (the pixels must match the data) is a safety property, so monitors compare rendered output.

Assurance

All of the above is built to the airborne software standard of the day (DO-178 series, cited by AC 20-170 as DO-178B at its publication). Safety-critical coding standards restrict the language to analysable constructs; Code coverage instrumentation shows the tests exercised the code to the required depth; Model checking and formal proof proves properties of the scheduler or protocol that tests cannot reach. Because IMA components come from many suppliers, DO-297 and the AC define incremental acceptance: a module, platform or application is accepted once and later reused, so adding one application does not reopen the whole cabinet (AC 20-170, ch. 2).

Data and control flow

One navigation update through the cabinet:

  1. The inertial and satellite units send data frames over their virtual links, one frame per BAG at most, to both redundant network planes.
  2. The network driver in the nav partition's window delivers the first valid copy of each frame to a sampling port; the E2E check rejects stale or corrupted data.
  3. In its window the nav partition fuses the new measurements, propagates the filter state, and updates the estimated position and uncertainty. If a sensor is flagged invalid, it drops out of the fusion.
  4. The path logic compares the position with the active leg and writes a steering command and the next-waypoint data to its output ports.
  5. The kernel moves port data between partitions at window boundaries; the display partition reads the position and the path in its next window and redraws.
  6. A monitor compares the two cabinet channels; on disagreement the safety logic selects the channel flagged healthy.

One fault, one recovery:

  1. A partition misses its progress report; the watchdog expires at the end of its window.
  2. The health monitor classifies the fault and looks up the configured action for that partition.
  3. The kernel restarts the partition in a defined mode and re-initialises its ports; other partitions keep their windows and never see a pause.
  4. If restart fails or the fault is module-level, the standby channel takes over and a maintenance message is raised.

Scaling

  1. Schedule capacity. Time in the major frame is the scarce resource. Levers: shorten window overheads, move rarely needed work to a slower rate, give a function more windows, add a core or a second module.
  2. Network bandwidth. Virtual links reserve bandwidth, so the sum of maximum rates bounds the link. Levers: larger BAG for slow data, merge related messages into one frame, add switches or cabinets.
  3. Latency. The worst case is the sum of waiting for a window, the virtual-link gap and the switch queues. Levers: align producer and consumer windows, choose a shorter major frame, shorten BAGs on critical links.
  4. Certification effort. Often the real limit. Levers: incremental acceptance, reuse of accepted modules, and keeping each function small enough to test to coverage.

Failure modes

FailureSymptomCauseFix
Partition overrunits output is late or stale, others unaffectedwork does not fit its windowenlarge window or reduce work; the kernel preempts at the window end
Hidden couplinga fault in one function degrades anothershared cache, bus or interrupt path not covered by the isolation argumentdemonstrate containment, configure shared resources per partition
Network contract violationframes dropped at a switchsender exceeds its virtual-link rate or jitter budgetfix the sender schedule; verify with worst-case analysis
Stale data used as freshautopilot steers on old positionsampling port read without age check, E2E not appliedvalidity and age on every sampling message, E2E wrapper
Common-mode software faultboth channels fail identicallyidentical code and inputs in redundant channelsdissimilar software, an independent monitor
Restart loopfunction restarts repeatedly, then lostfault is persistent, restart policy retries foreverbounded restart count, then standby or degraded mode
Filter divergenceposition jumps or driftsbad measurement accepted, wrong noise modelinnovation gating, sensor validity, reset logic

Real implementations

namewhat it isrepolicencenotes
POKpartitioned micro-kernel for embedded systemspok-kernel/pokBSD-style (see repo)research and teaching kernel in the ARINC 653 spirit; not a certified product
Xen ARINC 653 schedulerpluggable scheduler giving each domain fixed windows per major framexen-project/xen (xen/common/sched/arinc653.c)GPL-2.0virtualised partitions; the source describes its schedule as time per major frame
seL4formally verified microkernel with isolation proofsseL4/seL4GPL-2.0 (kernel), BSD-2 (user level)a separation-kernel base for partitioned systems
NASA cFSflight-software framework with scheduler, health and safety, limit checker appsnasa/cFSApache-2.0spacecraft, not IMA; open version is a demo bundle
PX4autopilot with an EKF-based navigation estimatorPX4/PX4-AutopilotBSD-3-Clausethe navigation function in open form
ArduPilotautopilot with EKF navigationArduPilot/ardupilotGPL-3.0same role as PX4
PikeOScommercial separation kernel and hypervisor with an ARINC 653 personality——SYSGO; closed

Sources

  • FAA Advisory Circular 20-170, Integrated Modular Avionics Development, Verification, Integration, and Approval using RTCA/DO-297 and TSO-C153 (with change 1): definitions of IMA, platform, robust partitioning, incremental acceptance; restart features (ch. 6). FAA
  • J. J. Gutiérrez, J. C. Palencia, M. González Harbour, Response time analysis in AFDX networks: virtual links, BAG, redundancy and determinism of ARINC 664 Part 7. paper
  • SYSGO, ARINC and ARINC 653 in embedded software: APEX, fixed windows in a major frame, ports, health monitoring. article
  • Xen source, xen/common/sched/arinc653.c: ARINC 653 compatible scheduler. source
  • PX4 Guide, Using PX4's Navigation Filter (EKF2). docs
  • ArduPilot Copter docs, Extended Kalman Filter (EKF). docs
  • NASA cFS repository README. repo

Similar systems

Share the most building blocks with this one.