11. 系统过程 (System Process)
系统过程 (system process) 包含缓解算法 (mitigation algorithms), 用于处理来自时钟过滤算法 (clock filter algorithm) 的样本数据. 这些算法包括选择算法 (selection algorithm), 聚类算法 (cluster algorithm), 组合算法 (combine algorithm) 和时钟规训算法 (clock discipline algorithm).
11.1. System Process 变量
关键系统变量 (system variables) 包括更新时间 (update time, t), 系统对等体标识符 (system peer identifier, p), 闰秒指示符 (leap indicator), 层级 (stratum), 精度 (precision, rho), 组合偏移 (combined offset, THETA), 组合抖动 (combined jitter, PSI), 根延迟 (root delay, DELTA), 根离散度 (root dispersion, EPSILON), 幸存者列表 (survivor list, v), 参考 ID (reference ID) 和参考时间 (reference time).
关键常量: NMIN = 3 (minimum survivors), CMIN = 1 (minimum candidates).
11.2. System Process 操作
11.2.1. Selection Algorithm
基于一致性原则识别并剔除错误时间源 (falsetickers), 保留真实时间源 (truechimers). 它使用区间相交方法生成候选列表 (candidate list).
11.2.2. Cluster Algorithm
通过移除统计离群点细化候选列表. 它迭代丢弃距离质心最远的候选项, 直到只剩最小数量的幸存者 (survivors). 随后根据同步距离, 层级和抖动选择一个幸存者作为系统对等体 (system peer).
11.2.3. Combine Algorithm
使用加权平均计算最终的系统偏移 (system offset) 和抖动:
THETA = Σ(w_i * theta_i) / Σ(w_i)
where w_i = 1 / lambda_i
11.3. 工作流 (Workflow)
- 输入 (Input): 来自时钟过滤算法的样本.
- 选择 (Selection): 剔除错误时间源.
- 聚类 (Cluster): 通过统计方法细化.
- 组合 (Combine): 计算加权平均.
- 输出 (Output): 将最终偏移提供给时钟规训算法.
示例实现在 Appendix A.5.5.6 的 clock_select() 例程中给出.