Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Phase A single GC mutator on scheduler threads

Platform spec ADR

Phase A single GC mutator on scheduler threads

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

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.

RuleDetail
Phase A (default)One thread at a time may execute Beskid allocations as GC mutator
SchedulerTransfers mutator execution between fibers on that contract
Syscall poolWorkers 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
FuturePhase B becomes the default once preemption code emission and full concurrent-mark stress coverage land

Aligns with D-CORE-CONC-0007.

run_blocking paths park fibers and resume on scheduler threads for mutator work.

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.