跳到主要内容

12. 时钟调整过程 (Clock-Adjust Process)

时钟调整过程 (clock-adjust process) 以一秒为间隔运行, 用于施加频率校正以及残余偏移 (residual offset) theta_r 的固定百分比. TC 参数缩放时间常数, 使其与轮询间隔 (poll interval) 匹配. 离散度 (dispersion, EPSILON) 每秒按 PHI 增加.

定时器中断机制 (Timer Interrupt Mechanism)

秒计数器 c.t: 服务开始时从零开始, 每秒递增一次.

中断处理 (Interrupt handling):

  1. 每秒发生一次定时器中断 (timer interrupt).
  2. 调用 clock_adjust() 例程.
  3. 应用时间和频率调整.
  4. 扫描关联 (associations), 检查秒计数器是否等于或超过 p.next.
  5. 如果是, 调用轮询过程 (poll process) 发送分组并计算下一个 p.next 值.

示例实现在 Appendix A.5.6.1 的 clock_adjust() 例程中给出.