关于「实战工具与检查器规格:并发协同台账、四件套条款与预注册检验」,《并发拓扑耦合与黑板复用》给出的定量结论是什么?
结论:第八章给出并发耦合度与黑板复用增益试算器、检查器规格表、台账节奏与预注册检验,检验每臂需 156 次记录。书中以标注框区分已发表的证据、可运行的计算(21 段程序)、原典与作者的假说。
数据口径:书中参数为示意,数据为合成,全部计算由书中程序生成;本书是非个人化经营建议,不提供任何加速比承诺。 第一章说明峰值从何而来,示意参数下峰值在 6.78 个窗口附近。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 156
| A. repeat-failure share 0.30 vs 0.18 | 156 encounters per arm |
| if coupled arm is 0.15 | 95 per arm |
| if coupled arm is 0.21 | 289 per arm |
| if coupled arm is 0.24 | 676 per arm |
| B. reuse rate 0.30 vs 0.45 | 62 entries |
| C. simulated power at n | 156: 0.792 (2,000 studies) |
| false-alarm rate when arms are equal | 0.043 |
查看完整验算程序
# Chapter 8. p82: pre-registered sample sizes and a power check.
# Test 1: share of pitfall encounters that repeat a failure another
# node already posted; isolated arm p0 = 0.30, coupled arm p1 = 0.18
# (illustrative). One-sided two-proportion z test, alpha 0.05, power
# 0.80. Test 2: reuse rate (entries cited by another node / entries
# written); null 0.30, target 0.45, one-sample, same alpha and power.
# A Monte Carlo of 2000 simulated studies checks the power of test 1.
import math
import random
from statistics import NormalDist
Z = NormalDist()
ALPHA, POWER = 0.05, 0.80
def n_two(p0, p1):
za, zb = Z.inv_cdf(1 - ALPHA), Z.inv_cdf(POWER)
pb = (p0 + p1) / 2
num = (za * math.sqrt(2 * pb * (1 - pb))
+ zb * math.sqrt(p0 * (1 - p0) + p1 * (1 - p1))) ** 2
return math.ceil(num / (p0 - p1) ** 2)
def n_one(p0, p1):
za, zb = Z.inv_cdf(1 - ALPHA), Z.inv_cdf(POWER)
num = (za * math.sqrt(p0 * (1 - p0))
+ zb * math.sqrt(p1 * (1 - p1))) ** 2
return math.ceil(num / (p1 - p0) ** 2)
def power_mc(p0, p1, n, runs, rng):
za = Z.inv_cdf(1 - ALPHA)
hits = 0
for _ in range(runs):
x0 = x1 = 0
for _ in range(n):
if rng.random() < p0:
x0 += 1
if rng.random() < p1:
x1 += 1
pb = (x0 + x1) / (2 * n)
se = math.sqrt(2 * pb * (1 - pb) / n)
if se > 0 and (x0 - x1) / n / se > za:
hits += 1
return hits / runs
if __name__ == "__main__":
n1 = n_two(0.30, 0.18)
print("A. repeat-failure share 0.30 vs 0.18: {:,} encounters per"
" arm".format(n1))
for p1 in (0.15, 0.21, 0.24):
print(" if coupled arm is {:.2f}: {:,} per arm".format(
p1, n_two(0.30, p1)))
n2 = n_one(0.30, 0.45)
print("B. reuse rate 0.30 vs 0.45: {:,} entries".format(n2))
rng = random.Random(41182)
pw = power_mc(0.30, 0.18, n1, 2000, rng)
print("C. simulated power at n = {:,}: {:.3f} ({:,} studies)".format(
n1, pw, 2000))
alpha = power_mc(0.30, 0.30, n1, 2000, rng)
print(" false-alarm rate when arms are equal: {:.3f}".format(alpha))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《多核并发操作拓扑耦合、共享黑板无锁通信与跨节点涌现增益母典》第 8 章「实战工具与检查器规格:并发协同台账、四件套条款与预注册检验」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-411 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026411,
author = {Fan, Yafu},
title = {Topological Coupling of Concurrent Multi-Core Operations: Lock-Free Blackboard Signalling and Cross-Node Emergent Gains},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}