Files
LithosAnanake/capsules/workload-3.4th
T
Robert Allan JamesandClaude Opus 5.5 f152a91099 Stage H: DoE rebuilt on BIRTH/SEND/KILL, defs-only workloads; work heat floor on contact (FABRIC-3.8 §3.9, §3.13.7)
Workload capsules the DoE births are definitions only; each defines WL-RUN
(its old birth-time work plus its entry word twice) and WL-DONE-ARGS. The
driver births N workers, SENDs each 'WL-RUN WL-DONE-ARGS SEND', waits in an
ordinary loop for N MU-DONE messages, KILLs them (parked idle), and emits
the marker. The serialized VM-EXEC round-robin is gone.

Kernel: no switch checkpoint after a payload's last word; work heat is the
assessed per-beat charge, and a VM gaining work is raised to the busy set's
floor (Captain Bob's ruling) -- fixes a live stall where a busy-waiting Hera
never yielded, without serializing batch starts.

Evidence: cfg-4 rows spread evenly over Hera and all 8 worker slots (44k
switches); full cfg-4 trials on amd64/aarch64/riscv64 end fail=0 with 8/8
KILL dead; Stage G interleave byte-identical on all three. Acceptance:
dict_hash unchanged, relay 3, idle growth 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 23:48:16 -04:00

94 lines
2.3 KiB
Forth

Block 4606
( SINUSOIDAL WAVE WORKLOAD - Smooth oscillation )
( Approximated via lookup table with random modulation )
( Randomized amplitude and frequency )
: COMPUTE ( n -- )
0 SWAP 0 DO I 7 * + LOOP DROP ;
Block 4615
( Sine lookup: 16 steps per quarter wave via CASE )
( sin: 0,10,20,31,41,50,59,67,74,81,87,91,95,98,99,100 )
: SIN-STEP ( phase -- intensity )
15 AND CASE
0 OF 0 ENDOF 1 OF 10 ENDOF
2 OF 20 ENDOF 3 OF 31 ENDOF
4 OF 41 ENDOF 5 OF 50 ENDOF
6 OF 59 ENDOF 7 OF 67 ENDOF
8 OF 74 ENDOF 9 OF 81 ENDOF
10 OF 87 ENDOF 11 OF 91 ENDOF
12 OF 95 ENDOF 13 OF 98 ENDOF
14 OF 99 ENDOF 15 OF 100 ENDOF
ENDCASE ;
Block 4625
( Full sine wave via quarter-wave symmetry )
: FULL-SIN ( phase -- intensity )
63 AND
DUP 16 < IF SIN-STEP EXIT THEN
DUP 32 < IF 31 SWAP - SIN-STEP EXIT THEN
DUP 48 < IF 32 - SIN-STEP EXIT THEN
63 SWAP - SIN-STEP ;
Block 4635
( Sinusoidal wave with random amplitude/frequency modulation )
: SINE-PULSE ( phase amplitude -- )
SWAP FULL-SIN * 100 / 1+
COMPUTE ;
: SINE-CYCLE ( steps base-amp base-wait -- )
ROT 0 DO
I
2 PICK 80 120 RANDOM 100 */
SINE-PULSE
DUP 80 120 RANDOM 100 */ WAIT
LOOP 2DROP ;
Block 4645
( Main sinusoidal wave generator )
: SINE-WAVE ( cycles -- )
0 DO
64 ( 64 steps = full wave )
70 130 RANDOM ( randomize amplitude 70-130% )
40 80 RANDOM ( randomize base wait 40-80ms )
SINE-CYCLE
100 200 RANDOM WAIT ( inter-cycle pause )
LOOP ;
Block 4655
( Phase-shifted dual sine - interference pattern )
: DUAL-SINE ( -- )
32 0 DO
I FULL-SIN 80 120 RANDOM 100 */
I 16 + FULL-SIN 80 120 RANDOM 100 */
+ 2 / 1+ COMPUTE
60 100 RANDOM WAIT
LOOP ;
: RUN-DUAL 4 0 DO DUAL-SINE LOOP ;
Block 4665
( Damped sine - decaying amplitude )
: DAMPED-SINE ( cycles -- )
100 SWAP ( starting amplitude )
0 DO
64 0 DO
I OVER FULL-SIN * 100 / 1+
85 115 RANDOM 100 */ COMPUTE
50 80 RANDOM WAIT
LOOP
85 * 100 / ( decay by 15% each cycle )
DUP 10 < IF DROP 10 THEN
LOOP DROP ;
( FABRIC-3.8 3.9: defs only; the DoE SENDs WL-RUN )
: WL-RUN 42 SEED 3 SINE-WAVE 98765 SEED RUN-DUAL
11111 SEED 3 DAMPED-SINE DUAL-SINE DUAL-SINE ;
: WL-DONE-ARGS S" MU-DONE" S" Hera" ;