Implementing deterministic POSIX PSE51 and PSE52 controller runtimes: eliminating page faults, pre-faulting thread stacks, and configuring monotonic clocks.
Even with `mlockall()` active, modern kernels allocate stack pages lazily using copy-on-write semantics. If an actuator thread suddenly traverses a deep call tree during an emergency steer maneuver, the CPU triggers a minor page fault, introducing a 30-microsecond delay. POSIX real-time runtimes touch every 4096-byte boundary of the thread stack during creation, ensuring all physical frames are committed before entering control loops.
Control algorithms rely on delta-time (dt) calculations to evaluate vehicle yaw rate and traction slip. If the system clock uses `CLOCK_REALTIME`, a cellular NTP sync update can jump time backward by milliseconds, causing division-by-zero or negative dt errors in steering controllers. `CLOCK_MONOTONIC_RAW` queries the physical hardware crystal oscillator directly, ensuring strictly linear, monotonically increasing timestamps.