Compare commits
2
Commits
d7d3e088db
...
d64ad4a1c3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d64ad4a1c3 | ||
|
|
046ce0be65 |
@@ -136,3 +136,7 @@ him -> the tag, on his word.
|
||||
- The gate refuses unsigned builds (#174); a protocol run here is unsigned -- the gate's signing is CI's.
|
||||
- POST's floor is v4/system/POST_FLOOR (#173): raise it when POST grows; never lower it without him.
|
||||
- Kernel host tests: make -C kernel/tests test (docs/v4.0.0/plans/2026-11-12-kernel-host-tests.md).
|
||||
- **alpha.5 is closed to new work** (Captain Bob, 2026-11-13: "Don't let me add anything else to this
|
||||
milestone."). What it holds now is all it gets: #189 (the blocker), #191, #192, #193 and what was already in it.
|
||||
If he proposes another item for alpha.5, remind him of this ruling and offer the next milestone; only his
|
||||
explicit word that he is overriding it reopens it.
|
||||
|
||||
@@ -6625,3 +6625,24 @@ and memorize frequently so we can pick up where we left off").
|
||||
`test_host_quit.c`), A2's five (`test_host_compile.c`); the depth checks moved to the new figures.
|
||||
- **Next:** Phase 1 -- v4 in the kernel's boot, the Stadium and the heartbeat started; then Phase 2,
|
||||
the word accounts at `call`; then Phase 7, the loops on them.
|
||||
|
||||
### 23. #189 Phase 1: v4 in the kernel's boot -- the Stadium, the opcodes, the fabric, births (2026-11-13)
|
||||
|
||||
- **The Stadium on a v4 boot** (plan `2026-11-13-engine-step4-phase1-v4-in-the-kernels-boot.md`,
|
||||
Tasks 1-4): made for both systems in v3's order, keyed by node ("A new node key": Hera, node 10, is
|
||||
patron zero under hers); v3's checks after POST; the 32 opcodes as Stadium patrons, charged per
|
||||
heartbeat tick ("Both": HEAT-OP's feed, about 0.5 us a charge -- kept); acceptance fails a v4 boot
|
||||
without the physics.
|
||||
- **A wrong turn, and its correction.** Asked "who runs next", I offered choices of scheduling
|
||||
policy, and "Hera by compudynamics now" was ruled on that framing. Captain Bob: "Scheduler? Have we
|
||||
regressed?" The design has none (`JUSTIFICATION.md` 4; `fabric.h`; this file's turn-attractor,
|
||||
"without a scheduler"). The ruling was withdrawn; "Build it to proper spec." And 5a's "Hera as
|
||||
now, in a fabric" could not carry births: the old boot spoke only her console's wire and ran no
|
||||
other node.
|
||||
- **To spec** (Task 5): the kernel boots the fabric (`v4/mesh.h`): the nucleus assembled by the
|
||||
machine's ROM, Hera born empty and given it, every node stepped together. A born node's room comes
|
||||
from the kernel's heap and its Stadium quota from Hera's; killed, both are given back
|
||||
(`stadium_return_quota`). Seen on bare metal: `11 2 2 BIRTH` -- node 11's parity line; Hera sends
|
||||
it `6 7 * .`, it answers 42; `11 KILL`; the Stadium CONSERVED after.
|
||||
- **Next:** Phase 2, the word accounts at `call` -- the kernel's record per word, fed by the hook
|
||||
(A1); then Phase 7, the loops on those records. And retiring v3 as a boot target (#156).
|
||||
|
||||
@@ -471,7 +471,7 @@ these, a group at a time, with POST after each.
|
||||
| ~~How the node tells a dictionary entry from a bare address at `call`~~ Ruled 2026-10-20: the kernel's table of entry addresses, filled by `(WORD-DEFINED)`, emptied by `(WORD-FORGOTTEN)`; a target not in it is a bare routine | Step 3 |
|
||||
| ~~`EXECUTE`, which enters a word by a return~~ Ruled 2026-10-20: `EXECUTE` calls the xt | Step 3 |
|
||||
| ~~`>R R> R@ I J LEAVE`, which cannot be called~~ Ruled 2026-10-20: they stay in line and are checked when the definition holding them is compiled; every other in-line word is called | Step 3 |
|
||||
| Who decides which node runs next, and when: Hera, by compudynamics; preemptive and cooperative | Step 7 |
|
||||
| ~~Who decides which node runs next, and when: Hera, by compudynamics; preemptive and cooperative~~ **Settled 2026-11-13 (#189; Captain Bob, "Build it to proper spec"): no one decides -- there is no scheduler (`JUSTIFICATION.md` 4). Every awake node executes an instruction word at each step of the fabric (`v4/include/v4/fabric.h`), and a node with nothing to do waits at a port. The kernel boots the fabric so (`v4/include/v4/mesh.h`).** | Step 7 |
|
||||
| The node's safe moment for message delivery and switching | Step 7 |
|
||||
| `PAD 42 OVER !`, a byte address given to `!` (D-1) | Step 6 |
|
||||
| Which word patrons' accounts the hosted product keeps, having no Stadium | Step 3 |
|
||||
|
||||
@@ -41,13 +41,18 @@ then Phase 7. HEAT-OP's Stadium feed was ruled into this phase ("Both": the regi
|
||||
- **Q4: "In Phase 1."** The registry (`v4/src/manage.c`) comes into the kernel build in this phase:
|
||||
Task 5 is in. Asked how much -- it needs a fabric of nodes, births that make them, and who runs
|
||||
next (`ENGINE.md` 6, open) -- **"Full births now."**
|
||||
- **Who runs next (`ENGINE.md` 6): "Hera by compudynamics now."** As v3's turn-attractor, agreed
|
||||
with Captain Bob (`FABRIC-3.md`, the turn-attractor: "the next turn to whichever live identity VM
|
||||
currently has the lowest `execution_heat_q48` ... No priority levels, no time slices, no
|
||||
preemption -- the same density comparison Stadium already uses"): the next instruction word goes
|
||||
to the **coolest awake node** that can run, by its resident heat in the Stadium -- its opcode
|
||||
patrons (Task 3) until Phase 2 adds its words. Switching only between instruction words
|
||||
(`ENGINE.md` 3a). A node asleep at its wires, or blocked, is not a candidate.
|
||||
- ~~**Who runs next (`ENGINE.md` 6): "Hera by compudynamics now."**~~ **Withdrawn 2026-11-13** -- the
|
||||
question was put wrongly, as a choice of scheduling policy. The design has no scheduler
|
||||
(`JUSTIFICATION.md` 4: "There is no scheduler to write"; `fabric.h`: "There is no choice of whose
|
||||
turn it is"; FABRIC-3's turn-attractor: "fix the gap without a scheduler"): every awake node steps
|
||||
together, and a node with nothing to do waits at a port. Captain Bob, asked "Scheduler? Have we
|
||||
regressed?", then: **"Build it to proper spec."** The withdrawn ruling, as it was written:
|
||||
~~As v3's turn-attractor, agreed with Captain Bob (`FABRIC-3.md`, the turn-attractor: "the next
|
||||
turn to whichever live identity VM currently has the lowest `execution_heat_q48` ... No priority
|
||||
levels, no time slices, no preemption -- the same density comparison Stadium already uses"): the
|
||||
next instruction word goes to the **coolest awake node** that can run, by its resident heat in the
|
||||
Stadium -- its opcode patrons (Task 3) until Phase 2 adds its words. Switching only between
|
||||
instruction words (`ENGINE.md` 3a). A node asleep at its wires, or blocked, is not a candidate.~~
|
||||
|
||||
## Questions (as they were put)
|
||||
|
||||
@@ -135,30 +140,55 @@ own sources.
|
||||
item: "a boot without the physics fails"). Seen to fail on today's build (Task 1 Step 1).
|
||||
- [ ] **Step 2:** the protocol, all eight stages; then the push, on Captain Bob's word.
|
||||
|
||||
### Task 5: the registry and births (Q4: "Full births now")
|
||||
### Task 5: the registry and births, to spec
|
||||
|
||||
Each its own increment, each test first, each a boot:
|
||||
**5a's "Hera as now, in a fabric" is superseded for births** (2026-11-13): with Hera booted by
|
||||
`v4_boot_run`, her messages to a child are answered "no one is there" (`boot.c` speaks only her
|
||||
console's wire) and nothing runs a child while the boot drives her. To spec -- `MESH.md` 9,
|
||||
`MACHINE.md` 3, and as `v4/tests/test_host_unit.c` already does on the host -- **Hera is born empty in
|
||||
the kernel's fabric, and every node steps together** (`v4_fabric_step`). No scheduler.
|
||||
|
||||
- [x] **5a. A fabric in the kernel, Hera in it.** Ruled 2026-11-13 (Captain Bob): **"Hera as now, in
|
||||
a fabric"** -- she boots by `v4_boot_run` as before (the hosted product's parity kept), and her node
|
||||
is place 0 of the kernel's fabric (`sk_v4.c`), entered in the registry as node 10; her registry
|
||||
requests go to `v4_manage_serve` through `v4_boot`'s new `request` hook, and `centre.4th` and
|
||||
`hera.4th` are loaded on her through its new `capsules` list -- before the seal, so POST runs on
|
||||
them. The fabric has one place: `NODE-BORN` is answered "no room" until 5b. `CAPSULE-OPEN/-LINE`
|
||||
read the kernel's capsule directory, checked as the boot checks; no capsule of F18 code is there
|
||||
until 5b. She is not told her number ((ME) stays 0): the boot's console addresses node 0. Word
|
||||
count 375 (55 from the two capsules), each in the dictionary; `mkdictionary.py` loads the kernel's
|
||||
capsules into the hosted system before `WORDS`, so the live list is the kernel's.
|
||||
Seen to fail first: the acceptance check `NODE-ME .` gave UNKNOWN WORD; then `0 ok`.
|
||||
- [ ] **5b. Births.** `NODE-BORN`: room for a node from the kernel's heap, a place in the fabric, a
|
||||
Stadium quota granted from Hera's under the new node's key (`stadium_node_key(number)`), its
|
||||
opcode patrons; `NODE-KILL` gives the room and the quota back. The capsule words
|
||||
(`CAPSULE-OPEN/-CELL/-LINE`) from the kernel's capsule directory.
|
||||
- [ ] **5c. Who runs next.** The turn-attractor: each step, the coolest awake node that can run
|
||||
executes an instruction word; the opcode charge for every node at the heartbeat's service points.
|
||||
A test that two busy nodes take turns as their heat says, and a sleeping node is never chosen.
|
||||
- [ ] **5d. Acceptance.** A boot births a node from Hera, it answers a line, Hera kills it, and the
|
||||
Stadium is CONSERVED after.
|
||||
- [x] **5a. The registry** (2026-11-13; `f10d2bc8`): Hera at place 0, entered as node 10; `centre.4th`
|
||||
and `hera.4th`; `NODE-ME`. Kept; its boot is replaced by 5b.
|
||||
- [x] **5b. The mesh boot** -- `v4/system/mesh.c` (new), the kernel's boot of the fabric, a host test
|
||||
first (`v4/tests/test_host_meshboot.c`, 64-bit cells, as `test_host_unit.c`):
|
||||
1. the nucleus: the machine's ROM assembles the system on a node of its own (`boot.c`'s
|
||||
`load_system`, shared); written as a capsule of F18 cells (`v4_capsule_write`) -- "a node that
|
||||
is born is given assembled code, never the source" (Captain Bob, 2026-10-15);
|
||||
2. Hera born empty at place 0 of the fabric: the kernel on her port 0 (it gives her the nucleus
|
||||
a cell at a time, and takes her requests -- blocks, the kernel's words, the registry), the
|
||||
console on her port 1 (whole messages); stepped until she sleeps at her wires;
|
||||
3. told she is 10 and where the console is; entered in the registry; the kernel's words;
|
||||
`forth79.4th` a line at a time; sealed; POST (`v4_post_run`, its lines as messages); the
|
||||
kernel's capsules (`centre.4th`, `hera.4th`); sealed;
|
||||
4. the same parity lines as `v4_boot_run` prints, so acceptance reads a mesh boot as it read the
|
||||
other;
|
||||
5. a line from the console is a message to node 10; what any node prints comes back as messages;
|
||||
how it ended is said; `KEY` reads her console registers, fed by the host;
|
||||
6. births: `NODE-BORN` makes a node in room the owner gives, carrying the mesh ROM, wired to the
|
||||
kernel on its port 0 for its blocks; `NODE-KILL` gives the room back. `CAPSULE-OPEN` of
|
||||
`v4:nucleus-64.f18` reads the nucleus a cell at a time.
|
||||
The test: the parity lines; POST passes; `NODE-ME .` 0; `KEY`; `11 2 2 BIRTH` -- node 11 takes in
|
||||
the nucleus and FORTH-79 and answers a line; `11 KILL`.
|
||||
- [x] **5c. The kernel boots by it** (`sk_v4.c`): the prompt's lines go to node 10 as messages; the
|
||||
identity gate, the block chain after POST, the heartbeat's service; a born node's room from the
|
||||
kernel's heap, its Stadium quota granted from Hera's under its node key (`stadium_node_key`), its
|
||||
opcode patrons charged with Hera's; its quota given back when it is killed. The hosted product
|
||||
keeps `v4_boot_run`; `boot.h`'s "differ only in where the text goes" is corrected.
|
||||
- [x] **5d. Acceptance:** a boot births a node from Hera, it answers a line, Hera kills it, the
|
||||
Stadium CONSERVED after; then the protocol.
|
||||
|
||||
**Built (2026-11-13).** 5b: `v4/system/mesh.c`, `v4/include/v4/mesh.h`; `boot.c` shares
|
||||
`v4_boot_assemble` (which `v4_boot_run` now calls), `v4_boot_capsule` and its number printing;
|
||||
the image carries `(ME)`'s address. `v4/tests/test_mesh_boot.c` (in `make -C v4 test`): failed
|
||||
first (no `mesh.c`), then 16 checks -- POST 539/539, `NODE-ME` 0, `11 2 2 BIRTH`, node 11 answers
|
||||
directly and through Hera, `11 KILL`. 5c: `sk_v4.c` boots by it -- 16 places, a born node's room
|
||||
from the kernel's heap, its Stadium quota under its node key granted from Hera's on its first
|
||||
charge and given back when it is killed (`stadium_return_quota`, `stadium_ops_forget`: failed first,
|
||||
then `test_stadium_ops` 20 checks); every node's opcodes charged. A line that waits for an answer
|
||||
is broken by the next line, as a message (`MESH.md` 7b.6). 5d: `qemu_session.py births()`. The
|
||||
amd64 boot: 160 s (about 90 s before -- POST and the lines now go as messages); `dict_hash`
|
||||
changes (Hera is told she is 10).
|
||||
|
||||
## What this phase does not do
|
||||
|
||||
|
||||
+15
-5
@@ -730,14 +730,15 @@ LOADER_CFLAGS += $(V4_DEFS)
|
||||
V4_ENGINE_SRCS := $(addprefix v4/src/,node.c exec.c stack.c iword.c heat.c guard.c image.c fabric.c capsule.c message.c wire.c manage.c)
|
||||
V4_ROM_C := $(BUILD_DIR)/v4_rom_64.c
|
||||
V4_MAP_C := $(BUILD_DIR)/v4_map_64.c
|
||||
V4_MESH_ROM_C := $(BUILD_DIR)/v4_mesh_rom_64.c # a mesh node's ROM: the nodes Hera births carry it (v4/mesh.h, #189)
|
||||
|
||||
LOADER_EXTRA_SRCS += $(KERNEL_SRC)/v4/sk_v4.c $(KERNEL_SRC)/v4/sk_v4_identity.c $(KERNEL_SRC)/v4/sk_v4_marker.c $(KERNEL_SRC)/v4/sk_v4_grow.c $(KERNEL_SRC)/v4/sk_v4_mint.c $(KERNEL_SRC)/v4/sk_v4_stop.c $(KERNEL_SRC)/v4/sk_v4_slots.c
|
||||
KERNEL_EXTRA_SRCS += $(KERNEL_SRC)/v4/sk_v4.c $(KERNEL_SRC)/v4/sk_v4_identity.c $(KERNEL_SRC)/v4/sk_v4_marker.c $(KERNEL_SRC)/v4/sk_v4_grow.c $(KERNEL_SRC)/v4/sk_v4_mint.c $(KERNEL_SRC)/v4/sk_v4_stop.c $(KERNEL_SRC)/v4/sk_v4_slots.c
|
||||
# v4/system/boot.c is the boot the hosted v4 system runs too: the ROM
|
||||
# assembles the system, then the capsules from this kernel's own capsule
|
||||
# directory, then the prompt.
|
||||
LOADER_V4_OBJS := $(patsubst v4/src/%.c,$(LOADER_OBJ_DIR)/v4engine/%.o,$(V4_ENGINE_SRCS)) $(LOADER_OBJ_DIR)/v4engine/v4_rom.o $(LOADER_OBJ_DIR)/v4engine/v4_map.o $(LOADER_OBJ_DIR)/v4system/boot.o $(LOADER_OBJ_DIR)/v4system/blocks.o $(LOADER_OBJ_DIR)/v4system/post.o $(LOADER_OBJ_DIR)/v4system/post_cases.o
|
||||
KERNEL_V4_OBJS := $(patsubst v4/src/%.c,$(KERNEL_OBJ_DIR)/v4engine/%.o,$(V4_ENGINE_SRCS)) $(KERNEL_OBJ_DIR)/v4engine/v4_rom.o $(KERNEL_OBJ_DIR)/v4engine/v4_map.o $(KERNEL_OBJ_DIR)/v4system/boot.o $(KERNEL_OBJ_DIR)/v4system/blocks.o $(KERNEL_OBJ_DIR)/v4system/post.o $(KERNEL_OBJ_DIR)/v4system/post_cases.o
|
||||
LOADER_V4_OBJS := $(patsubst v4/src/%.c,$(LOADER_OBJ_DIR)/v4engine/%.o,$(V4_ENGINE_SRCS)) $(LOADER_OBJ_DIR)/v4engine/v4_rom.o $(LOADER_OBJ_DIR)/v4engine/v4_map.o $(LOADER_OBJ_DIR)/v4engine/v4_mesh_rom.o $(LOADER_OBJ_DIR)/v4system/mesh.o $(LOADER_OBJ_DIR)/v4system/boot.o $(LOADER_OBJ_DIR)/v4system/blocks.o $(LOADER_OBJ_DIR)/v4system/post.o $(LOADER_OBJ_DIR)/v4system/post_cases.o
|
||||
KERNEL_V4_OBJS := $(patsubst v4/src/%.c,$(KERNEL_OBJ_DIR)/v4engine/%.o,$(V4_ENGINE_SRCS)) $(KERNEL_OBJ_DIR)/v4engine/v4_rom.o $(KERNEL_OBJ_DIR)/v4engine/v4_map.o $(KERNEL_OBJ_DIR)/v4engine/v4_mesh_rom.o $(KERNEL_OBJ_DIR)/v4system/mesh.o $(KERNEL_OBJ_DIR)/v4system/boot.o $(KERNEL_OBJ_DIR)/v4system/blocks.o $(KERNEL_OBJ_DIR)/v4system/post.o $(KERNEL_OBJ_DIR)/v4system/post_cases.o
|
||||
endif
|
||||
|
||||
LOADER_SRCS := $(LOADER_SRCS_BASE) $(LOADER_EXTRA_SRCS)
|
||||
@@ -903,12 +904,13 @@ endif
|
||||
# two copies met ("cp: cannot create regular file ... File exists", fixed
|
||||
# 2026-10-26).
|
||||
ifeq ($(STARFORTH_V4),1)
|
||||
$(V4_ROM_C) $(V4_MAP_C) &: FORCE
|
||||
$(V4_ROM_C) $(V4_MAP_C) $(V4_MESH_ROM_C) &: FORCE
|
||||
@mkdir -p $(dir $(V4_ROM_C))
|
||||
@echo " V4ROM capsules/v4/rom -> $(V4_ROM_C) $(V4_MAP_C)"
|
||||
@$(MAKE) --no-print-directory -C v4 CC=cc $(CURDIR)/v4/build/rom-64.c $(CURDIR)/v4/build/v4_map_64.c
|
||||
@echo " V4ROM capsules/v4/rom -> $(V4_ROM_C) $(V4_MAP_C) $(V4_MESH_ROM_C)"
|
||||
@$(MAKE) --no-print-directory -C v4 CC=cc $(CURDIR)/v4/build/rom-64.c $(CURDIR)/v4/build/v4_map_64.c $(CURDIR)/v4/build/mesh-rom-64.c
|
||||
@cmp -s v4/build/rom-64.c $(V4_ROM_C) || cp v4/build/rom-64.c $(V4_ROM_C)
|
||||
@cmp -s v4/build/v4_map_64.c $(V4_MAP_C) || cp v4/build/v4_map_64.c $(V4_MAP_C)
|
||||
@cmp -s v4/build/mesh-rom-64.c $(V4_MESH_ROM_C) || cp v4/build/mesh-rom-64.c $(V4_MESH_ROM_C)
|
||||
|
||||
# The system's memory map, capsules/v4/sys/map-<w>.f18, is generated from
|
||||
# the same description as the ROM and v4_map_image (v4/tests/host_map.h), and
|
||||
@@ -928,6 +930,14 @@ $(KERNEL_OBJ_DIR)/v4engine/v4_rom.o: $(V4_ROM_C) | $(KERNEL_OBJ_DIR)
|
||||
@mkdir -p $(dir $@)
|
||||
@echo "CC (kernel) $<"
|
||||
@$(CC) $(KERNEL_CFLAGS) -c $< -o $@
|
||||
$(LOADER_OBJ_DIR)/v4engine/v4_mesh_rom.o: $(V4_MESH_ROM_C) | $(LOADER_OBJ_DIR)
|
||||
@mkdir -p $(dir $@)
|
||||
@echo "CC (loader) $<"
|
||||
@$(LOADER_CC) $(LOADER_CFLAGS) -c $< -o $@
|
||||
$(KERNEL_OBJ_DIR)/v4engine/v4_mesh_rom.o: $(V4_MESH_ROM_C) | $(KERNEL_OBJ_DIR)
|
||||
@mkdir -p $(dir $@)
|
||||
@echo "CC (kernel) $<"
|
||||
@$(CC) $(KERNEL_CFLAGS) -c $< -o $@
|
||||
$(LOADER_OBJ_DIR)/v4engine/v4_map.o: $(V4_MAP_C) | $(LOADER_OBJ_DIR)
|
||||
@mkdir -p $(dir $@)
|
||||
@echo "CC (loader) $<"
|
||||
|
||||
@@ -195,6 +195,16 @@ VMUuid stadium_node_key(uint32_t node);
|
||||
int stadium_boot_init_for(VMUuid first);
|
||||
int stadium_birth_node(VMUuid key, const char *name);
|
||||
|
||||
/*
|
||||
* stadium_return_quota(vm, to) -- a node is gone: its quota is given back (#189, Phase 1 Task 5c),
|
||||
* the inverse of stadium_grant_quota(). Every resident patron of it is evicted, its heat cooling to
|
||||
* its reservoir as any eviction's does; its free cells go to `to`'s free list; its slot is free for
|
||||
* the next grant. Its reservoir -- the share of 1.0 its grant gave it, its own -- goes with it, as
|
||||
* the grant made it. 0, or -1: no such quota, `to` none or the same, the first quota (patron zero's),
|
||||
* or a patron that cannot be evicted (pinned, or holding another).
|
||||
*/
|
||||
int stadium_return_quota(VMUuid vm_id, VMUuid to_vm_id);
|
||||
|
||||
/* stadium_is_initialized - Whether stadium_boot_init() has succeeded. */
|
||||
int stadium_is_initialized(void);
|
||||
|
||||
|
||||
@@ -38,6 +38,10 @@ void stadium_ops_init(void);
|
||||
* `tick` the heartbeat's count now. Nothing for a key with no quota. */
|
||||
void stadium_ops_charge(VMUuid vm_id, const uint64_t counts[STADIUM_OPS_COUNT], uint64_t tick);
|
||||
|
||||
/* A node is gone: its opcode counts are forgotten, so a node that later has its quota's slot starts
|
||||
* from none (#189). Before stadium_return_quota(), while the key still has its slot. */
|
||||
void stadium_ops_forget(VMUuid vm_id);
|
||||
|
||||
/* An opcode patron's heat now (Q48.16), or 0: not resident, or no quota. */
|
||||
uint64_t stadium_ops_heat(VMUuid vm_id, unsigned op);
|
||||
|
||||
|
||||
+88
-133
File diff suppressed because it is too large
Load Diff
@@ -667,6 +667,42 @@ int stadium_grant_quota(VMUuid new_vm_id, VMUuid from_vm_id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int stadium_return_quota(VMUuid vm_id, VMUuid to_vm_id) {
|
||||
int slot, to_slot;
|
||||
size_t idx, last = STADIUM_CELL_NONE, count = 0;
|
||||
|
||||
if (!stadium_initialized) return -1;
|
||||
slot = quota_slot_for_vm(vm_id);
|
||||
to_slot = quota_slot_for_vm(to_vm_id);
|
||||
if (slot <= 0 || to_slot < 0 || slot == to_slot) return -1; /* slot 0 is patron zero's */
|
||||
|
||||
/* its patrons leave, their heat to its reservoir */
|
||||
while (stadium_quotas[slot].resident_head != STADIUM_CELL_NONE)
|
||||
if (stadium_evict(stadium_quotas[slot].resident_head) != 0) return -1;
|
||||
|
||||
/* its free cells to `to`'s free list */
|
||||
for (idx = stadium_quotas[slot].free_head; idx != STADIUM_CELL_NONE;
|
||||
idx = link_to_size(stadium_cell_array[idx].header.link)) {
|
||||
stadium_owner[idx] = (uint16_t)to_slot;
|
||||
last = idx;
|
||||
count++;
|
||||
}
|
||||
if (last != STADIUM_CELL_NONE) {
|
||||
stadium_cell_array[last].header.link = size_to_link(stadium_quotas[to_slot].free_head);
|
||||
stadium_quotas[to_slot].free_head = stadium_quotas[slot].free_head;
|
||||
stadium_quotas[to_slot].free_count += count;
|
||||
}
|
||||
|
||||
stadium_quotas[slot].vm_id = vm_uuid_none();
|
||||
stadium_quotas[slot].in_use = 0;
|
||||
stadium_quotas[slot].free_head = STADIUM_CELL_NONE;
|
||||
stadium_quotas[slot].free_count = 0;
|
||||
stadium_quotas[slot].resident_head = STADIUM_CELL_NONE;
|
||||
stadium_quotas[slot].reservoir = 0;
|
||||
stadium_quotas[slot].consumed = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* stadium_best_donor - FABRIC-3.md SXVI donor-floor fix: which currently
|
||||
* in-use VM has the most free (unclaimed) cells right now. Callers granting
|
||||
|
||||
@@ -136,6 +136,20 @@ void stadium_ops_charge(VMUuid vm_id, const uint64_t counts[STADIUM_OPS_COUNT],
|
||||
}
|
||||
}
|
||||
|
||||
void stadium_ops_forget(VMUuid vm_id)
|
||||
{
|
||||
int slot;
|
||||
unsigned k;
|
||||
if (!ops_initialized) return;
|
||||
slot = stadium_quota_slot_for_vm(vm_id);
|
||||
if (slot < 0) return;
|
||||
for (k = 0; k < STADIUM_OPS_COUNT; k++) {
|
||||
op_slots[slot][k].cell_index = STADIUM_CELL_NONE;
|
||||
op_slots[slot][k].last_tick = 0;
|
||||
op_slots[slot][k].last_count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t stadium_ops_heat(VMUuid vm_id, unsigned op)
|
||||
{
|
||||
int slot;
|
||||
|
||||
@@ -86,5 +86,23 @@ int main(void)
|
||||
CHECK(h5 > 2u * h0 && h5 < 4u * h0, "in proportion to their retirements, about 3 to 1");
|
||||
CHECK(stadium_reservoir_peek(k2) >= Q48_ONE / 3 && stadium_conserved(k2), "the floor kept, conservation held");
|
||||
}
|
||||
|
||||
/* a node killed: its quota given back (#189, Phase 1 Task 5c) -- its patrons evicted, its cells
|
||||
* to the node it came from, its slot free for the next birth; its opcode counts forgotten */
|
||||
{
|
||||
VMUuid k2 = stadium_node_key(12), k3 = stadium_node_key(13);
|
||||
uint64_t c3[32];
|
||||
stadium_ops_forget(k2);
|
||||
CHECK(stadium_return_quota(k2, key) == 0, "node 12's quota is given back to node 10");
|
||||
CHECK(stadium_quota_slot_for_vm(k2) < 0 && stadium_ops_heat(k2, 5) == 0, "node 12 has no quota, and no opcode heat");
|
||||
CHECK(stadium_conserved(key), "node 10 conserved after taking its cells back");
|
||||
CHECK(stadium_return_quota(key, key) != 0 && stadium_return_quota(k2, key) != 0, "a quota is not given back to itself, or twice");
|
||||
CHECK(stadium_grant_quota(k3, key) == 0, "the slot is free: node 13 is granted one");
|
||||
memset(c3, 0, sizeof c3);
|
||||
c3[7] = 2;
|
||||
stadium_ops_charge(k3, c3, 30);
|
||||
CHECK(stadium_ops_heat(k3, 7) == 2u * (uint64_t)STADIUM_WORD_HEAT_QUANTUM && stadium_ops_heat(k3, 5) == 0,
|
||||
"node 13 starts with no counts of node 12's: two retirements, two quanta");
|
||||
}
|
||||
return DONE();
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Development boot, not acceptance evidence (2026-11-13): an amd64 boot of the mesh boot under development (#189 Phase 1, Tasks 5b-5d), before the edge cases. POST passed (539/539). The session checks' results are not recorded in this serial log. The protocol run is the evidence.
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
Development boot, not acceptance evidence (2026-11-13): an amd64 boot of the mesh boot under development (#189 Phase 1, Tasks 5b-5d), before the edge cases. POST passed (539/539). The session checks' results are not recorded in this serial log. The protocol run is the evidence.
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
Development boot, not acceptance evidence (2026-11-13): the amd64 boot that checked the edge cases on bare metal (#189: "Check for the edge cases"). Every session check passed (RESULT: PASS), including a node running SPIN for ever, the prompt answering while it runs, and 11 KILL with the Stadium CONSERVED. The protocol run is the evidence.
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
STOPPED, not a result: this v4-checks run was stopped partway (2026-11-13) because v4/Makefile changed under it -- a sanitized mesh-boot test was added to `sanitize` (Captain Bob: "Yes, add it to v4-checks"). No failure had been seen. The run on the final tree is the evidence.
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
STOPPED, not a result: this v4-checks run (2026-11-13) was stopped by the 10-minute limit set on the command that ran it, partway through the sanitizer runs (the 32-bit depth test). No failure had been seen. The run with a longer limit is the evidence.
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,63 @@
|
||||
# Protocol for 046ce0be
|
||||
|
||||
- Commit: 046ce0be65e326aa6cf01d17f5230de7c7f769c5
|
||||
- Tree: clean
|
||||
- Result: PASS
|
||||
|
||||
`scripts/nightly.sh protocol` (#135), begun 20261113-170011 UTC; `feat(v4): the mesh boot to spec -- Hera born empty in the kernel's fabric; births, kills, every node stepping together (#189)`.
|
||||
|
||||
## Stages
|
||||
|
||||
| Stage | Result | Output |
|
||||
|---|---|---|
|
||||
| `accept-amd64` | PASS | `logs/20261113-170011/protocol/accept-amd64.log` |
|
||||
| `accept-aarch64` | PASS | `logs/20261113-170011/protocol/accept-aarch64.log` |
|
||||
| `accept-riscv64` | PASS | `logs/20261113-170011/protocol/accept-riscv64.log` |
|
||||
| `accept-stick-high` | PASS | `logs/20261113-170011/protocol/accept-stick-high.log` |
|
||||
| `test-32` | PASS | `logs/20261113-170011/protocol/test-32.log` |
|
||||
| `proofs` | PASS | `logs/20261113-170011/protocol/proofs.log` |
|
||||
| `images` | PASS | `logs/20261113-170011/protocol/images.log` |
|
||||
| `docs` | PASS | `logs/20261113-170011/protocol/docs.log` |
|
||||
|
||||
## The boots
|
||||
|
||||
| Boot | Serial log | POST | System |
|
||||
|---|---|---|---|
|
||||
| amd64 | `logs/20261113-170039/amd64/qemu-amd64-20261113-170039.log` | `PARITY:V4_POST tests=539 pass=539 fail=0` | `PARITY:V4_SYSTEM word_count=375 dict_hash=0xbbf72b1f752a1a51` |
|
||||
| aarch64 | `logs/20261113-170343/aarch64/qemu-aarch64-20261113-170343.log` | `PARITY:V4_POST tests=539 pass=539 fail=0` | `PARITY:V4_SYSTEM word_count=375 dict_hash=0xbbf72b1f752a1a51` |
|
||||
| riscv64 | `logs/20261113-171202/riscv64/qemu-riscv64-20261113-171202.log` | `PARITY:V4_POST tests=539 pass=539 fail=0` | `PARITY:V4_SYSTEM word_count=375 dict_hash=0xbbf72b1f752a1a51` |
|
||||
| stick-high | `logs/20261113-171445/amd64/qemu-amd64-20261113-171445.log` | `PARITY:V4_POST tests=539 pass=539 fail=0` | `PARITY:V4_SYSTEM word_count=375 dict_hash=0xbbf72b1f752a1a51` |
|
||||
|
||||
dict_hash: the same on all three: `0xbbf72b1f752a1a51`.
|
||||
|
||||
## test-32
|
||||
|
||||
39 programs, 1861045 checks, 0 failures
|
||||
|
||||
## The proofs
|
||||
|
||||
`logs/20261113-172209/isabelle/isabelle-20261113-172209.log`
|
||||
|
||||
## The images (SHA-256)
|
||||
|
||||
```
|
||||
edad1fd47f4a5395d70a917ea179d331529530847f7a3ffd7d8bea052528b122 StarshipOS.iso
|
||||
860dcd73c514aa092fa576e79dd6836112731f308302677aab78463b809a6151 pc-stick.img
|
||||
441dbb615fe1f6a48ec5cade1287ea0c753c65207fd03bbbd61d2ce95aff5b63 raspi5.img
|
||||
8ce24573c9ddb845dae6d078c36c087a3aaa6b5cff777e98e0f12e2f23dbf288 MilkV.img
|
||||
22b6bd40b51d1bed179d1857e6363eceb33e4ab1d75d1fa701b5709f063dc4fa pc-stick.img.xz
|
||||
b59da2fa3b5ee8a114aa7337492115a45d7978e4e085c83c2261391a37f45b02 raspi5.img.xz
|
||||
3ec8ac0bdd5e5a47c7e9814e15c5cf80903f9d7f6b123a86363e7613543dfaf8 MilkV.img.xz
|
||||
```
|
||||
|
||||
## The documents (SHA-256)
|
||||
|
||||
```
|
||||
e53f9c4f68213b211fa54f1e21c694ed2ad8b89b7ca48cbddb363bc37c9d7a50 ./api.pdf
|
||||
992fb3f4d1fd3fc8ba59955d9bd4d2d1e55d8bdaefc641fd59f1e5068e7cadd1 ./book.pdf
|
||||
bab2ad2cde3a0bd945053e84777aeaf2a8129bb529e6693fd9062270d5fbee3f ./dictionary.pdf
|
||||
d77fe6e0a7fcbb4aaf6f657808287b3aaf8e332faf0b9434aee5025d30a2f9bd ./fabric.pdf
|
||||
25981963c41f420a7da7739758b4047aea93beabf340d72f420e24e0d3ec8728 ./vol1.pdf
|
||||
a50a0eba19571cec523d7ffc8f1853c9fb7e914cbfbcd982f4f8ee879bbe8215 ./vol2.pdf
|
||||
dfa1f5daf58174c9b2bc48ca78321c1a081d44264a41c48d237b273838419b05 ./vol3.pdf
|
||||
```
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user