Ship Phase A GC before parallel mutators
Platform spec ADR
Ship Phase A GC before parallel mutators
Spec standingStandard
- Contracts and edge cases MUST rules for allocation, barriers, roots, and Phase A mutator exclusivity.
- Design model Heap ownership, tri-color GC, Phase A mutator rules, and compiler/runtime split.
- Examples Allocation failures, GC pacing triggers, and external root pinning scenarios.
- FAQ and troubleshooting GC pauses, mutator violations, barrier omissions, and heap growth debugging.
- Flow and algorithm Allocation, barrier insertion, collection pacing, and safepoint algorithms.
- Verification and traceability Runtime GC tests, Abfall integration, and compiler stack-map obligations.
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”Parallel GC mutators need write barriers, stack-map coverage, and scheduler coordination. Shipping partial parallel GC risks data races on the Abfall heap.
Decision
Section titled “Decision”| Phase | Mutators | Ship order |
|---|---|---|
| A (v0.2) | One Beskid mutator; many cooperative fibers | Default ship |
| B (v0.3, opt-in) | Parallel mutators + real gc_write_barrier on pointer-payload channels + syscall-pool guard | Wired behind BESKID_RUNTIME_PHASE_B / set_runtime_phase(RuntimePhase::PhaseB); stays opt-in until preemption emission and concurrent-mark stress land |
| B (later) | Phase B becomes the default | Requires AOT/JIT to insert runtime_preempt_check prologues and full concurrent-mark stress coverage |
Phase B must not become the default without updating this feature hub and fiber scheduler contracts.
Consequences
Section titled “Consequences”Phase A barriers stay correct because Phase B reuses the same Dijkstra insertion barrier; the difference is that Phase B exercises it on multi-mutator workloads and on pointer-payload channel ops. Fiber/feature docs cross-link Phase tables.
Verification anchors
Section titled “Verification anchors”GC integration tests under crates/beskid_runtime/tests/:
tests/concurrency.rs— channel/scheduler coretests/gc.rs,tests/gc_concurrency.rs— Phase A heap and root handlestests/phase_b_concurrency.rs— Phase B multi-mutator stress, pointer-payload channels with write barriers, syscall-pool guard, optional preemption hook
Platform-spec Phase diagrams in hub and design model.