Heterogeneous Clock Synchronization Using RTOS and DMA
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing computing systems, particularly those with heterogeneous architectures, face challenges in achieving precise clock synchronization due to clock drift and skew, which can lead to desynchronization in applications like audio playback across multiple networked loudspeakers, impacting the listening experience.
Innovation Solution
Implementing a heterogeneous computing architecture that combines a General Purpose Operating System (GPOS) with a Real-Time Operating System (RTOS) to manage clock synchronization, utilizing direct memory access (DMA) and a mailbox mechanism to ensure immediate processing of synchronization signals, and selecting or generating a reliable reference clock signal.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If a single General Purpose Operating System (GPOS) is used to manage all computing tasks, then system flexibility and ease of operation are improved, but clock synchronization precision deteriorates due to scheduling delays and context switches
Solution Approach 1:
The computing system is segmented into two independent OS instances: a GPOS for general-purpose tasks and an RTOS for real-time clock synchronization. This segmentation allows each OS to be optimized for its specific function, with the RTOS providing precise timing while the GPOS maintains system flexibility.
Solution Approach 2:
A mailbox mechanism serves as an intermediary between the GPOS and RTOS, enabling communication and data exchange. The mailbox allows the GPOS to retrieve synchronized time information from the RTOS without direct interference, maintaining both system flexibility and synchronization precision.
2Measurement precision
If a Real-Time Operating System (RTOS) is used exclusively for clock synchronization, then time synchronization precision is improved, but device complexity increases due to the need for multiple OS instances and coordination mechanisms
Solution Approach 1:
The GPOS and RTOS share common hardware resources including the processor, memory, and mailbox mechanism. This merging of resources reduces the overall complexity compared to having completely separate systems, while still maintaining the functional benefits of both OS types.
Solution Approach 2:
The RTOS autonomously manages clock synchronization tasks without requiring constant intervention from the GPOS. The RTOS independently processes synchronization signals and updates system time, reducing the coordination burden and simplifying the interaction between the two OS instances.
3Ease of operation
If clock synchronization is performed using standard GPOS scheduling, then ease of operation is maintained, but latency increases due to context switches and scheduling overhead
Solution Approach 1:
The real-time clock synchronization function is extracted from the GPOS and implemented as a separate RTOS. This extraction removes the scheduling overhead and context switches that cause latency in GPOS, while the GPOS continues to operate simply for general-purpose tasks.
Solution Approach 2:
The RTOS maintains continuous execution of clock synchronization tasks without interruption from other GPOS activities. This continuous operation eliminates the start-stop nature of GPOS scheduling, ensuring minimal latency in time synchronization while keeping the GPOS simple and easy to operate.
Data Source
Figure 1A
Figure 1B
Figure 1C
AI summary
Systems and methods for clock synchronization in accordance with embodiments of the invention are illustrated. One embodiment includes a clock synchronization system includes a reference device including a clock circuitry, and a transmitter configured to transmit a synchronization signal based on a clock signal using the clock circuitry, and a receiving device including a processor configured to operate by a general-purpose operating system (GROS), a coprocessor configured to operate by a real-time operating system (RTOS), a memory utilized by the processor, where the coprocessor has direct memory access to the memory, and a receiver configured to receive the signal, where the RTOS directs the coprocessor to trigger an interrupt upon reception of the signal, sample a GROS clock time stored in the memory in response to the interrupt, generate a clock time based on the signal and the sampled GROS clock time, and provide the GROS with the clock time.