Claude 3a70e824a2 feat(v4): Phase 7 Task 2b -- pipelining and the hot-words cache, built, off as v3 (#189)
Rulings, Captain Bob 2026-11-13: "Build a hot-words cache"; then, v3 being found to have both off
(ENABLE_PIPELINING, ENABLE_HOTWORDS_CACHE: n in Kconfig.physics and kernel/Makefile), "Built, off as v3".

- The kernel, at every call (mesh.c): v3's hit check, the transition, the likeliest next word (kept as each
  count rises; v3 scans 1024 a call -- the same word but in a tie v3's Q48.16 rounding makes), speculation
  at v3's thresholds into the node's cache; a word past heat 50 promoted at its call (v3 promotes at a
  lookup; v4's heat is the kernel's). Counters from the owner's heap, given back when a word goes.
- The node (dict.f18): (LOOKUP) tries (HOT)'s xts first, in F18, calling only C@; the kernel keeps it true
  (entries that go, or whose name is defined again, taken out). Empty unless the build has the cache.
- Tests: test_mesh_boot.c as built (57 checks) and with both on (mesh-boot-on, 65). v4 test: all pass.
- Reported, v3's own: when full, its promote takes the next slot without looking for the word there (a few
  hot words churn all 32 slots); its prefetch misses are never counted. Both reproduced.
- amd64 boots, RESULT: PASS, but 174 s and 181 s against 2a's 146 s, while on the host the mesh boot is no
  slower: being measured. Not pushed (held to the Phase 7 boundary).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
2026-11-13 21:52:01 +00:00
2026-10-19 06:49:11 -04:00
2026-08-02 05:11:24 -04:00
2026-11-10 15:19:25 +00:00
2026-08-01 07:49:56 -04:00
2026-10-19 06:35:46 -04:00
2026-10-19 06:35:46 -04:00
2026-08-02 05:11:24 -04:00

LithosAnanke v4.0.0-alpha.4

UEFI-bootable FORTH microkernel. Boots from firmware, initialises memory and interrupts, then runs StarForth as its sole userspace runtime. No libc. No OS. Just stone and necessity.

Lithos (foundation) + Ananke (necessity) — the kernel under StarshipOS.

Try it in your browser: starshipos-f18.com — a StarshipOS machine of your own, booted to [zuse@Hera] ok>, thrown away when you leave. Releases: v4.0.0-alpha.4, the kernel 4.0.0-alpha.4 with the StarForth engine 3.2.0.


Products

StarForth v4 moves the engine onto a 32-instruction core derived from Chuck Moore's F18 (docs/v4.0.0/). With it, this repository carries three products, not one:

Product What it is
Hosted StarForth F18 The v4 engine as a native Linux build, for amd64, arm64 and riscv64.
FPGA StarForth F18 A 32-bit build of the same engine loaded into the FPGA: the gateway to the rest, the foundation everything else is built up from.
StarshipOS The bare-metal product: LithosAnanke running StarForth.

FORTH-79 is recomposed on the F18 engine and stored as a capsule; the StarshipOS-specific vocabulary gets the same treatment. v3 remains the reference system until v4 meets its acceptance criteria (docs/v4.0.0/JUSTIFICATION.md §16). Both run on bare metal now: every board image carries v4 and v3, boots v4 as built, and one word in its boot configuration chooses (see below) — except the PC stick, which is v4 only. v3 is being retired (its own milestone, #156): what v4 needs of it, the block layer, moves into v4 and the rest is removed.


Status

Milestone Status
M0–M6 UEFI boot · PMM · VMM · IDT · APIC · heap · framebuffer VT100 console ✅ Complete
M7 StarForth VM integration + parity validation ✅ Complete
M7.1 Capsule birth · Mama FORTH vocabulary · the Tripod fleet · kernel-Hermes · word-level ACL ✅ Live
M8 Keyboard input to the REPL — PS/2, virtio and USB keyboards (a full keyboard: Caps/Num Lock, keypad) ✅ In QEMU, all three ISAs
M9 Block storage — on v4, Artemis and Zuse's identity on the StarshipOS stick (GPT partitions, over USB mass storage); v3's Artemis on virtio-blk ✅ In QEMU · real disks: no driver yet (boards/BRINGUP.md A4)
The stick One USB stick is the whole OS: plug it in, boot, [zuse@Hera] ok> — its first boot mints its own Zuse and grows Artemis to fill it (docs/v4.0.0/STICK.md, #92) ✅ Tasks 1–3 of 5 in QEMU · the real Zuse on a second stick next
Bare metal a generic PC (amd64; first on the bench: a Beelink SER5), Raspberry Pi 5 (aarch64), Milk-V Mars (riscv64); Zynq-7020 (ARMv7) not yet ported Images build; first boots on the bench — boards/BRINGUP.md

v4 is the default build, and v3 is being retired: every kernel boots v4 unless its boot arguments say system=v3. POST at boot, on all three ISAs: v4 — 538 tests, PARITY:V4_SYSTEM word_count=317 dict_hash=0xfec8c47cfc6f437f; v3 — 1052 tests, PARITY:M7.1a word_count=526 hash=0x82f4ae7cb2e2d424.

How a change gets in (the Captain Bob method): master is reached only through a pull request that passed acceptance — amd64, aarch64 and riscv64 booted in QEMU to [zuse@Hera] ok>, POST 538/538 and one dict_hash on all three; the PC stick booted loaded above 2 GiB, as a PC's firmware loads it; and the 32-bit build's tests. Every acceptance boot starts from a fresh stick, so every run is a first boot. The same stages run nightly and for every release (scripts/nightly.sh); the serial logs are committed.

What's live

  • The Tripod — a named multi-VM fleet: Hera (the Mama VM, the governor), Artemis (block storage: a Block Allocation Map with Q48.16 block heat, cooldown and reclamation) and Hestia, birthed, run and re-birthed independently on all three architectures.
  • kernel-Hermes — messaging moved into the kernel (the Hermes VM is gone, docs/fabric/FABRIC-3.5.md): every VM takes its own messages on its own turn, under a cooperative switcher that every VM takes part in.
  • The plug-and-play stick (v4) — make boot_image TARGET=PC and make write_stick DEVICE=/dev/sdX, plug it in, boot: the stick's first boot mints its own Zuse (no two sticks share one) and grows its Artemis partition to fill the stick, up to 256 GiB, writing metadata only.
  • Identities on thumbdrives — Zuse, the superuser, and every user is a minted USB thumbdrive (Ed25519, Zuse-signed); plugging one in births that user's VMs, pulling it out ends them. There is only the drive: no password, no PIN.
  • Signed capsules — the capsules the kernel boots from are signed under the StarshipOS Root CA (ci/pki/starshipos-root-ca.pem, published with every release) and checked at boot.
  • Word-level ACL — every dictionary entry carries a TTL/allow/mode/pin access-control record; strict, TTL and pinned modes; two console layers (emergency ok> and superuser zuse)ok>). Measured overhead of the live ACL-TTL mechanism: +0.0603%, CV 0.000%, architecture-independent (docs/fabric/FABRIC-1.md §T).
  • Logs that persist — every VM's log records go to a ring on Artemis's disk (LOG-FLUSH, LOG-SHOW).
  • The physics-driven runtime — seven feedback loops and the L8 Jacquard mode selector, with a per-VM heat channel into fleet-wide tuning (VM Fleet Attractor).
  • Kconfig build configuration — about 40 physics, heartbeat, pipelining and kernel-only knobs, shared with the hosted build.

Quick Start

# One boot image per physical target (output: build/boards/<board>/)
make boot_image TARGET=PC         # any x86-64 UEFI PC -- GPT/ESP, BOOTX64.EFI
make boot_image TARGET=RASPI      # Raspberry Pi 5 -- FAT, config.txt + kernel_2712.img + DTB
make boot_image TARGET=MILKV      # Milk-V Mars    -- GPT/ESP, BOOTRISCV64.EFI (U-Boot bootefi)
make boards                       # list boards (the Zynq-7020 has no ARMv7 port yet)

# Each image carries v4 and v3. As built it boots v4; to boot v3, change the one word
#   system=v4  ->  system=v3
# in starforth.cfg on the PC's stick or the Mars's card, or cmdline.txt on the Pi 5's card.

# The same TARGET drives all, docs and clean (make help)
make                              # every board with a kernel port + hosted v3 + the book
make docs                         # build/docs/LithosAnanke.pdf (LaTeX master: docs/book/main.tex)
make clean TARGET=RASPI           # that board's outputs and build/aarch64/kernel

# The PC stick, written to a real USB stick (checks the device, asks you to type its name back,
# verifies the write); then boot it from the PC's firmware boot menu
make write_stick DEVICE=/dev/sdX

# The kernel in QEMU (OVMF / AAVMF / EDK2), one architecture at a time -- boots v4 from a fresh
# data stick, so every boot is a stick's first boot
make -f kernel/Makefile ARCH=amd64   clean qemu
make -f kernel/Makefile ARCH=aarch64 clean qemu
make -f kernel/Makefile ARCH=riscv64 clean qemu
make -f kernel/Makefile ARCH=amd64 clean qemu-stick-high   # the PC stick itself, loaded high
make -f kernel/Makefile ARCH=amd64 KERNEL_ARGS=system=v3 clean qemu   # v3, while it remains

# The Pi 5's native boot path, rehearsed on QEMU's virt machine at EL2
make -f kernel/Makefile ARCH=aarch64 RPI5_NATIVE_BASE=0x40080000 rpi5-rehearsal

Artifacts: build/<arch>/kernel/starkernel_loader.efi · build/<arch>/kernel/starkernel_kernel.elf

Tree: kernel/ (LithosAnanke: Makefile, src/, include/starkernel/, linker/), v3/ (StarForth v3 engine and hosted build), v4/ (StarForth v4, see docs/v4.0.0/), boards/<board>/ (board.mk + boot files), capsules/ (the FORTH capsules). Every makefile runs from the repo root; the root Makefile forwards any other goal to v3/Makefile.

For the hosted v3 VM by itself, see the separate StarForth repository — LithosAnanke used to be a branch inside it, and is now its own project.

Build configuration (optional)

Every kernel-only knob is an optional Kconfig symbol; a plain make -f kernel/Makefile uses the defaults unless you opt in:

make -f kernel/Makefile ARCH=amd64 menuconfig
make -f kernel/Makefile ARCH=amd64 kernel_amd64_defconfig

Documentation

Start at docs/README.md — the map: where each kind of document lives and which to believe. Among them:

The FABRIC record Every design decision and the work as it happened (FABRIC-3.md is the living one) — published as The Book of Fabric from alpha.4
The stick The x86-64 StarshipOS stick: plug and play, the proxy Zuse, growth
StarForth v4 The F18-derived engine
Board bring-up Getting onto a PC, the Pi 5 and the Mars
Roadmap and versioning Milestone plan and release-versioning policy
Capsule System — M7.1 Capsule birth protocol
Word-level ACL The access-control design
HAL, as built Hardware abstraction layer
Developer guide / Kconfig reference Full symbol reference for both builds
Dead ideas and revised claims What is no longer true, and since when
Changelog Milestone-level history

License

Starship License 1.0 (SL-1.0) — free for personal, research, and educational use. Commercial use requires a separate agreement. Attribution to R.A. James (Captain Bob) must be preserved in all distributions.

Patent pending. USPTO provisional filed December 2025 — physics-grounded self-adaptive runtime system. This license does not grant patent rights. Licensing inquiries: rajames440@gmail.com


Robert A. James (Captain Bob) · Systems Engineer · Hacking since 1973

S
Description
StarshipOS: the LithosAnanke kernel and the StarForth engine (v3, v4 F18)
https://www.starshipos-f18.org
Readme
2.2 GiB
2026-11-10 15:19:25 +00:00
Languages
C 74.1%
Isabelle 7.8%
TeX 3.7%
Shell 3.2%
Python 2.5%
Other 8.7%