Phase A single GC mutator on scheduler threads
Platform spec ADR
Phase A single GC mutator on scheduler threads
Spec standingStandard
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
| Section id | Required | Found |
|---|---|---|
what-this-feature-specifies | yes | yes |
implementation-anchors | yes | yes |
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
Context
Section titled “Context”Fibers may run on multiple OS threads while Phase A GC still uses one process-wide arena (enter_runtime_scope). Syscall pool workers must not become second mutators.
Decision
Section titled “Decision”| Rule | Detail |
|---|---|
| Phase A (default) | One thread at a time may execute Beskid allocations as GC mutator |
| Scheduler | Transfers mutator execution between fibers on that contract |
| Syscall pool | Workers run blocking host work without arbitrary Beskid mutator code or generated allocation; runtime tags them and traps stray allocations (assert_mutator_allowed) |
| Phase B (opt-in, v0.3) | Multiple Beskid mutators may share one heap by holding a MutatorAttachGuard from attach_phase_b_mutator; pointer-payload channel ops apply gc_write_barrier on send and receive |
| Future | Phase B becomes the default once preemption code emission and full concurrent-mark stress coverage land |
Aligns with D-CORE-CONC-0007.
Consequences
Section titled “Consequences”run_blocking paths park fibers and resume on scheduler threads for mutator work.
Verification anchors
Section titled “Verification anchors”beskid_runtime scheduler + enter_runtime_scope; concurrency runtime tests
(tests/concurrency.rs, tests/gc_concurrency.rs); Phase B opt-in coverage in
tests/phase_b_concurrency.rs exercises multi-mutator allocation, pointer-payload
channel write barriers, and the syscall-pool allocation guard.