Deployment
Where the parts run: processors, containers, processes and threads.
On this page: core · deployment · container · binary · process · thread · isr · route · chain · watchdog · allocator · place
Where and in what the parts run: processors and their cores, containers, binaries, processes, threads and interrupts, the bus each link takes, latency chains, and the watchdogs a part keeps. A deployment is kept apart from the system it places, so the logical model does not change. How two parts talk — pattern and buffer on ports and links — is in the port and link properties; a deadline is on a port or a transition.
core#
A named core of a processor — a place a thread can run. cores N declares N identical ones (cpu0 …); core names a special one (an accelerator, a lockstep safety core).
- Keywords:
core - Set: deployment
- Where: inside
component - Syntax:
core id ["Name"] { type "Cortex-R52" }
| Property | Value | Meaning |
|---|---|---|
description |
text | Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX. |
color |
color name | A palette color id, or a literal "#rrggbb". |
type |
string | What the core is. |
core safety "Safety island" { type "Cortex-R52" }
deployment#
Where and in what the parts of a system run: binaries placed on processors, their processes and threads, and the bus each link takes. Kept apart from the system, like canvas, so one system can have several deployments. Emitted to processes.yaml, threads.yaml, tasks.yaml and containers.yaml, thread: on each part, and link timing.
- Keywords:
deployment - Set: deployment
- Where: top level
- Syntax:
deployment Id ["Name"] { system Sys; platform Hw; binary b on cpu { process p { thread t { runs part } } }; container c "image" on cpu { binary … }; route a.p -> b.q over bus }
| Property | Value | Meaning |
|---|---|---|
description |
text | Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX. |
system |
system name | The system whose parts run (the logical model). Default: the only system. |
platform |
system name | The system of processors and buses they run on. Default: the same system. |
packaging |
container | ros2 |
How its software ships. container: each process of a binary on a Linux processor runs in a container of its own on that processor, named after it — its core(s) the cpuset, its memory-limit the cgroup's, the host's network, sys_nice when a thread is real-time; a binary's threads with no process share one named after the binary. Containers written out stay as written; write one out to give it an image, a device or another network. ros2: each binary on a Linux processor is a ROS 2 (ament) package, an executable per process, a node per part it runs — its ports publishers, subscriptions and services, its periodic threads timers (archec gen --target ros2). |
deployment Vehicle "L4 stack on the vehicle" {
system Car
platform CarHw
binary adas "adas-stack" on adcu_soc {
process driving {
core cpu2
thread drive { runs adcu; priority 80 }
}
}
route adcu.can_brake -> brakes.can over chassis_can { priority 3 }
}
container#
An OCI container on a Linux processor whose runtime is containerd (or docker / podman): its image after the id, the cores and memory its cgroup allows, its network and the devices it sees. Its binaries run in it — they take its on. In the Arche project it is an entry of containers.yaml (processor, cpuset, memory-limit, network, image), and its processes and threads say container:. archec gen --target containerd writes a Containerfile per container and a compose file for nerdctl compose, --target k8s a Kubernetes Deployment pinned to its processor's node.
- Keywords:
container - Set: deployment
- Where: inside
deployment - Syntax:
container id "registry/image:tag" on processor { core cpu2, cpu3; memory-limit 4GiB; network host; binary … }
| Property | Value | Meaning |
|---|---|---|
description |
text | Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX. |
on |
refs | The processor it runs on: a part of the platform with cores, os linux / linux-rt and runtime containerd. |
core |
refs | The cores its cgroup may use (cpuset). Default: every core of the processor. |
memory-limit |
any | Memory its cgroup may use (4GiB): its processes' memory-limits are checked against it, and the containers of a processor against its ram. |
network |
host | bridge | none |
Its network: host shares the processor's (a link to another container costs the processor's ipc-latency), bridge gives it its own (a link leaving it costs its latency), none cuts it off. A container on a CAN bus needs host: a SocketCAN interface (can0) is a network interface. |
latency |
duration | On a bridge network: the latency of a link between it and another container of the processor (default: the processor's ipc-latency). |
device |
any | Host devices it sees ("/dev/ttyS1"): a binary in it whose link is routed over a serial bus needs one. Not CAN: SocketCAN is reached through network host. |
capabilities |
refs | Linux capabilities added to it: sys_nice lets its threads use policy fifo / rr; all runs it privileged. |
prop |
prop | An environment variable of the container: prop NAME = "value". |
container perception "registry.local/adas/perception:1.4" on adcu_soc {
core cpu2, cpu3
memory-limit 4GiB
network host
capabilities sys_nice
binary planner {
language rust
thread drive { runs adcu; priority 80; policy fifo }
}
}
binary#
What is built and installed: one executable or firmware image, placed on a processor of the platform — or written inside a container, which it runs in and takes its on from. On an rtos / bare-metal processor it is one address space: write its threads directly in it (they become RTOS tasks).
- Keywords:
binary(old spellings:executable,firmware) - Set: deployment
- Where: inside
deployment, insidecontainer - Syntax:
binary id ["file name"] on processor { process … ; thread … }
| Property | Value | Meaning |
|---|---|---|
description |
text | Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX. |
on |
refs | The processor it runs on: a part of the platform with cores. Inside a container, leave it out: the container's. |
language |
rust | c | cpp | python | ada | go |
Source language. go: archec gen --target go writes the binary's program, on a Linux board. |
options |
any | Options of a generator for this binary (or process) only, over the generator's own: options mygen { mode "fast" }; options { … } is for whichever generator runs. The generator model gives each binary, and each process, its options resolved. |
binary brake_fw "brake.elf" on brake_mcu {
thread ctl { runs brakes; period 1ms; step regulate; priority 10 }
}
process#
An address space and fault boundary inside a binary (processes.yaml). Arche pins a process to one core: a thread with a core of its own is placed on it directly.
- Keywords:
process(old spelling:partition) - Set: deployment
- Where: inside
binary - Syntax:
process id ["Name"] { core cpu0; memory-limit 512MiB; thread … }
| Property | Value | Meaning |
|---|---|---|
description |
text | Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX. |
core |
refs | The core the process runs on. |
memory-limit |
any | Memory it may use (512MiB), checked against the processor's ram. |
options |
any | Options of a generator for this binary (or process) only, over the generator's own: options mygen { mode "fast" }; options { … } is for whichever generator runs. The generator model gives each binary, and each process, its options resolved. |
process driving {
core cpu2
memory-limit 4GiB
thread drive { runs adcu; priority 80 }
}
thread#
A unit of scheduling (threads.yaml, or tasks.yaml on an RTOS). It runs parts: their functions, handlers and state machine execute on it, one at a time. With a period it is time-triggered and calls step each period; without one it wakes on each message.
- Keywords:
thread(old spelling:task) - Set: deployment
- Where: inside
binary, insideprocess - Syntax:
thread id ["Name"] { runs part, …; priority 50; period 10ms; step fn; core cpu1; deadline 8ms }
| Property | Value | Meaning |
|---|---|---|
description |
text | Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX. |
runs |
refs | The parts of the system (paths, adcu.npu) that execute on this thread. A function (planner.replan) is analysed on this thread, but Arche places whole parts. |
priority |
number | Higher is more urgent (SCHED_FIFO / FreeRTOS sense). |
period |
duration | Activation period: the thread is time-triggered. |
step |
refs | The function of one of its parts called each period (simulated with an rt.timer the compiler adds beside the part). |
deadline |
duration | Relative deadline (default: the period). |
core |
refs | The core it runs on — overrides its process's. |
policy |
fifo | rr | edf |
Scheduling policy. |
stack |
any | Stack size (8KiB or a number of bytes). |
wcet |
duration | Worst-case execution time of one activation. Default: from the wcet of the functions it runs (its step and what it calls, else its costliest function). |
queue |
number | The size of its message queue: what waits for it while it runs (an active object's queue). Without it the queue is unbounded — on an RTOS, say it. |
affinity |
refs | The cores it may run on, when one core does not say it: the scheduler picks among them. |
thread ctl "Brake control" { runs brakes; period 1ms; step regulate; priority 10 }
isr#
An interrupt service routine: a thread started by an interrupt, above every task of its core.
- Keywords:
isr(old spelling:interrupt) - Set: deployment
- Where: inside
binary, insideprocess - Syntax:
isr id ["Name"] { runs part; irq 42; wcet 20us; min-interval 1ms }
| Property | Value | Meaning |
|---|---|---|
description |
text | Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX. |
runs |
refs | The parts (or one function) it runs. |
irq |
number | Interrupt number. |
priority |
number | Priority (default: one above every thread of its processor). |
core |
refs | The core it is taken on. |
wcet |
duration | Worst-case execution time. |
min-interval |
duration | Shortest time between two interrupts: its period in the analysis. |
isr can_rx { runs brakes; irq 42; wcet 15us; min-interval 500us }
route#
The bus a link of the system takes when its two ends run on different processors. Simulated as a shared medium: one transfer at a time, by priority.
- Keywords:
route - Set: deployment
- Where: inside
deployment - Syntax:
route a.port -> b.port over bus { priority 3; id 0x120 }
| Property | Value | Meaning |
|---|---|---|
description |
text | Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX. |
over |
refs | The bus: a component of the platform with kind bus, linked to both processors. |
priority |
number | Arbitration priority on the bus (higher wins). |
id |
any | Frame id on the bus (CAN id, VLAN…). |
latency |
duration | Transit latency (simulation timing). |
route adcu.can_brake -> brakes.can over chassis_can { priority 3; id 0x120 }
chain#
A cause-effect chain through parts of the system, with a latency budget: the analysis adds up execution, waiting for periods and transport along it, and warns past the budget.
- Keywords:
chain - Set: deployment
- Where: inside
deployment - Syntax:
chain id ["Name"] { through a, b, c; budget 100ms }
| Property | Value | Meaning |
|---|---|---|
description |
text | Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX. |
through |
refs | The parts the data goes through, in order. |
budget |
duration | The worst-case end-to-end latency allowed. |
satisfies |
list of requirement names | Requirements this element satisfies (emitted to traces.yaml). |
chain obstacle "Obstacle to brake command" { through adcu, brakes; budget 100ms }
watchdog#
A timer the part restarts with kick <name> in a ```arche body: armed when the part starts, it runs out timeout after the last kick, and then on-timeout runs, once — until the next kick arms it again. As Lingua Franca's watchdogs. Simulated (archec sim), and generated in C (archec gen --target c) and in Rust (--target embassy: an embassy_time timer in the part's task); archec difftest compares the C with the simulator.
- Keywords:
watchdog - Set: deployment
- Where: inside
component, insidesystem - Syntax:
watchdog name ["Label"] { timeout 50ms; on-timeout ```arche … ``` }
| Property | Value | Meaning |
|---|---|---|
description |
text | Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX. |
timeout |
duration | How long after the last kick (or the start) it runs out. |
on-timeout |
code | What runs when it runs out: a ```arche block (goto Fault, a send…). |
watchdog link "Link lost" {
timeout 50ms
on-timeout ```arche
goto Lost
```
}
allocator#
A memory allocator of a deployment: a pool of blocks of one size, a partition, a flipflop (two buffers in turn), a heap or static memory — in a processor's memory, inside another allocator (parent). In a process it is that process's own; in a binary or the deployment, shared makes it reachable from several. Parts, ports and algorithms take their memory from allocators through a place.
- Keywords:
allocator - Set: deployment
- Where: inside
deployment, insidebinary, insideprocess - Syntax:
allocator id ["Name"] { kind pool; block-size 4KiB; blocks 16; memory cpu.ddr; alignment 64; parent heap; shared; mapped }
| Property | Value | Meaning |
|---|---|---|
description |
text | Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX. |
kind |
pool | partition | flipflop | heap | static |
How it hands out memory: pool (blocks of block-size), partition, flipflop, heap or static (one block). |
block-size |
any | The size of one block (4KiB): for a heap or static, all of it. |
blocks |
number | How many blocks it has (1 by default). |
memory |
refs | The memory of the processor it is in: a memory of the processor (memory cpu.ddr). |
alignment |
number | The alignment of each block, in bytes: a block is rounded up to it. |
parent |
refs | The allocator its memory comes from: its blocks × block-size must fit in one of the parent's blocks. |
shared |
bool | Reachable from other processes (private to its process by default). |
mapped |
bool | In memory mapped into each process that uses it (not on a local memory). |
allocator frames "Frame buffers" { kind pool; block-size 4KiB; blocks 16; memory cpu.ddr }
place#
How one part (or one port) of the system executes and where its memory comes from, in a deployment. In a process, a part no thread runs is placed in it with no thread of its own: execution passive (it runs in its callers' threads) or protected (one caller at a time). memory hrt|lrt <allocator> is its memory for real-time and non-real-time data, memory saved|tmp <allocator> an algorithm's working memory, memory comm <allocator> its ports' (parameters marshalled into a queue); on a port, its buffering.
- Keywords:
place - Set: deployment
- Where: inside
deployment, insidebinary, insideprocess - Syntax:
place part[.port] { execution passive|protected|active; memory hrt pool; memory comm pool; buffering { … } }
| Property | Value | Meaning |
|---|---|---|
description |
text | Prose description. $…$ and $$…$$ are LaTeX math; a ```latex block is kept as LaTeX. |
execution |
active | passive | protected |
active (it runs on a thread: write it in the thread's runs), passive (in its callers' threads) or protected (passive, one caller at a time). Default: active when a thread runs it, else passive. |
memory |
any | An allocator for one use: hrt (its real-time data), lrt (the rest), saved / tmp (an algorithm's working memory), comm (what its ports marshal). Repeatable: memory hrt frames. |
max-size |
any | In buffering { }, on a dataflow port: the largest buffer it holds, in bytes. |
transfer |
copy | share |
In buffering { }: copy (each consumer has its own buffer) or share (one buffer, shared). |
destroy |
after-transfer | after-processing |
In buffering { }: when a buffer is freed — after-transfer (once sent) or after-processing (once the consumer is done). share with after-transfer frees what another still reads: an error. |
build |
any | In buffering { }, on an output: allocate a new buffer, or reuse input — the buffer of an input of the same part, written in place. |
allocator |
refs | In buffering { }: the allocator its buffers come from (a deployment's allocator). |
place split.input {
memory comm frames
buffering { max-size 4KiB; transfer copy; destroy after-processing; allocator frames }
}