摘要
PTP协议是IEEE-1588中定义的一种精密时钟同步协议,广泛应用于分布式系统中。但当采用纯软件实现时,同步精度受到网卡的缓存效应、网络的平稳性和操作系统的进程调度等多种因素的影响,难以达到亚毫秒的精度。本文通过分析各种影响因素的特点,结合PTP协议时钟同步机制,提出了一种高精度时钟同步方法,通过采用握手机制以及对测量数据进行处理,有效减弱了各种因素的影响,并结合基于CPU定时器构造的高精度时钟,实现了亚毫秒精度的时钟同步。
PTP protocol is defined in IEEE-1588 as a precision clock synchronization protocol, which is widely used in distributed systems. However, when implemented by software, the synchronization accuracy will under the influence of the buffer effect by the network card, the smoothness of network and the scheduling of operating system, and other factors. So it is difficult to achieve sub-millisecond accuracy. In this paper, by analyzing the characteristics of the various influencing factors, according to clock synchronization mechanism of PTP protocol, a high-precision clock synchronization method is put forward, with the use of handshake mechanisms, and data processing, weaken the various factors which effectively and achieve the sub-millisecond precision synchronization with the high precision clock based on the CPU timer.
出处
《自动化技术与应用》
2010年第1期67-70,74,共5页
Techniques of Automation and Applications