jonnify·bcs /bcs/ideas/ecs-to-bcs/the-handle-at-its-best

B1.4 · dive — the handle at its best

The handle, at its best.

Before the chapter buries the index-handle, it states the modern discipline at full strength: centralized systems own their allocations, only index-handles cross to the outside world, and spare bits carry a generation counter. Read with Part I’s eyes, that is two of the law’s three clauses discovered independently, inside one process.

Source: content/bcs1.4.md · What, quoting West 2007 and Weissflog 2018. The argument is sympathetic by design.

The 2018 discipline. Select a rule to read its exact statement — and the clause it discovered.
the boundary the system sole owner of its memory allocations arrays base pointers private arrays same-typed items {idx 7 | gen 2} the only thing that crosses spare bits: a per-slot generation counter
readout · Select a rule. Static reading: the sole owner is clause one discovered; handles-only crossing is clause two discovered; the generation counter is liveness by detection — and its own literature is candid that the check “isn’t waterproof”.
§1

The discipline

content/bcs1.4.md · What

Weissflog’s 2018 treatment states the modern form cleanly: move memory management into centralized systems, “the systems being the sole owner of their memory allocations”; group same-typed items into arrays whose base pointers are system-private; and let only index-handles cross to the outside world, with the handle’s spare bits carrying a generation pattern — a per-slot counter after the November 2018 update — so a stale handle is usually caught when the slot is reused.

content/bcs1.4.md · the quoted record of the two articlesfrozen
Weissflog 2018   "the systems being the sole owner of their memory allocations"
                 the generation check "isn't waterproof" -- detection, not prevention
West 2007        at five percent CPU cost, "we allowed the components to store
                 pointers to one another" -- the traveling pointer, under frame-rate duress

Read with Part I’s eyes, the discipline is clause one (systems own their state) and clause two (only identities cross) discovered independently — enforced by convention inside a single address space. The third clause has no ECS form at all; its absence is the next dive’s subject.

§2

The 2007 confession

content/bcs1.4.md · What

Even the pattern’s founding document records the pressure on clause two. West’s 2007 component article reports that when manager-mediated access cost five percent of CPU, “we allowed the components to store pointers to one another” — the traveling pointer, admitted under frame-rate duress, inside the very article that taught the industry components.

The admission is the load-bearing detail. Convention holds until the frame budget objects; nothing in the address space refuses the crossing. A law enforced by agreement bends exactly where the BCS substrate’s gates do not — the refusals of the PASS 6/6 transcript are the same clauses with the enforcement moved from review into the platform.

§3

The generation counter, exercised

a model of the per-slot check

The model below steps one slot through a fixed event sequence and runs the generation check as a pure function — handle admitted when its generation equals the slot’s. The model gives the slot two generation bits, so its counter wraps after four values; real engines carry more bits, and the same wrap. Detection works at step 4 and fails at step 5 — “isn’t waterproof”, collision detection over a reused slot, probabilistic by construction.

One slot, five steps. Select a step; the readout shows the slot state and the verdict.
h1 = {idx 7 | gen 1} issued at step 1, circulating slot 7 · gen ? system-private array · per-slot counter admitted when handle.gen == slot.gen
readout · Select a step. Static run: allocate issues h1 at gen 1; free and reallocate bump the slot to gen 2; presenting h1 is caught (1 ≠ 2); three more reuse cycles wrap the two-bit counter back to gen 1, and the stale h1 is admitted — detection, not prevention.

The chapter’s diagnosis lands in the next dive: detection of reuse is the wrong ambition once the minting law makes reuse unrepresentable. A name that is never reissued has no ABA case to catch.

§4

References

sources · related

Sources

Related