摘要 |
A time synchronization method and system for a multi-core system are provided, and the time synchronization method comprises the following steps of: A, establishing at least one clock synchronization domain, and respectively allocating each core to each clock synchronization domain; B, selecting a core with a lowest load in each clock synchronization domain as a master clock synchronization source in the clock synchronization domain, and selecting the clock synchronization domain having the master clock synchronization source with a lowest load among various master clock synchronization sources as a master clock synchronization domain, while other clock synchronization domains as slave clock synchronization domains; C, the master clock synchronization domain sending a synchronization deviation detection message to each slave clock synchronization domain, and calculating a time deviation value between each slave clock synchronization domain and the master clock synchronization domain; D, when the time deviation value is greater than a permitted deviation value, the master clock synchronization domain calculating a time adjustment quantity of each slave clock synchronization domain and releasing the time adjustment value to each slave clock synchronization domain, and each slave clock synchronization domain making adjustment based on its time adjustment quantity. |