Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Ship Phase A GC before parallel mutators

Platform spec ADR

Ship Phase A GC before parallel mutators

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

Parallel GC mutators need write barriers, stack-map coverage, and scheduler coordination. Shipping partial parallel GC risks data races on the Abfall heap.

PhaseMutatorsShip order
A (v0.2)One Beskid mutator; many cooperative fibersDefault ship
B (v0.3, opt-in)Parallel mutators + real gc_write_barrier on pointer-payload channels + syscall-pool guardWired 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 defaultRequires 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.

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.

GC integration tests under crates/beskid_runtime/tests/:

  • tests/concurrency.rs — channel/scheduler core
  • tests/gc.rs, tests/gc_concurrency.rs — Phase A heap and root handles
  • tests/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.