No. 71 / project of 147 on the ladder

AtomVM stdlib scheduler/timer stress

introduces — AtomVM timer path; receive-after timeout path; multi-process stdlib workload; allocation pressure on P70 runtime

harden statelast run2026-05-05
signoff
  • DRCNOT RUN
  • LVSNOT RUN
  • antennaNOT RUN

P70 proved AtomVM could run a bundled-stdlib ping-pong demo on the real-newlib/FPU base. P71 keeps the same chip and runtime, then pushes the VM a notch deeper: timers, receive timeouts, multiple spawned workers, allocation pressure, message collection, and io:format/2.

Headline: AtomVM now runs a small concurrent Erlang workload on the chip in Verilator and exits ok.

AtomVM on P71 (stdlib scheduler/timer stress)
Starting AtomVM revision 0.8.0-dev+git.81c67c9
Found startup beam: stress.beam
P71 AtomVM stress starting
timer delta ms: 51
receive-after fired
worker 1 count 64 sum 4224
worker 2 count 96 sum 14160
worker 3 count 128 sum 33408
worker 4 count 160 sum 65040
workers total: 116832
P71 AtomVM stress PASS
Return value: ok
AtomVM exited result=0

What changed

This is not a new RTL-feature rung. P71 inherits P70’s RTL, reset code, linker script, newlib syscalls, F/D bit-motion paths, and small D-FPU subset.

The useful change is the workload:

  • erlang:send_after/3 exercises AtomVM’s timer machinery.
  • receive ... after exercises scheduler timeout handling.
  • four worker processes allocate lists of tuples and compute sums.
  • the parent process collects worker messages and prints the total.

The boot image still uses the fixed 16 MiB layout: stage-0 at zero, lib.avm at 8 MiB, and main.avm at 12 MiB.

Verification

cd projects/71_atomvm_stress/test
make all
make verilator-run

Harness result:

[harness] === run ended after 18862281 post-load cycles ===
[harness] halted=1, halt_code=0x00000001

The 5 ms timer probe reported 51 ms in this run. That is not a precision claim: the current bare-metal shim busy-polls mtime in sys_poll_events, so this rung proves scheduler/timer progress, not calibrated sleep accuracy.

What is not proven

F/D architectural compliance was NOT RUN. LibreLane hardening was NOT RUN. This also does not prove sockets, ports, crypto, files, or broad OTP behavior. P71 proves a practical AtomVM stdlib workload on the chip’s current real-newlib runtime.

What just happened?

AtomVM is no longer only printing a banner or doing a single ping-pong loop. It can load the bundled stdlib, handle timer-driven scheduler wakeups, run multiple Erlang processes, allocate per-process data, and exit cleanly.