Processor Timer Synchronization in Virtual Machines
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In multiprocessor systems, synchronizing processor timers to a shared time value is challenging due to independent timers with unsynchronized time values and frequencies, and existing methods like NTP are inefficient and complex, especially in virtualization environments where reading platform chipset registers is slower than local CPU registers.
Innovation Solution
A method for synchronizing processor timers using machine-local oscillators with stable frequencies, allowing for accurate and low-latency synchronization to a standard reference time like UTC, involving a synchronizing program that calculates synchronization values and uses a platform timer to maintain accurate time records across processors, including virtual machines and guest operating systems.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If NTP (Network Time Protocol) is used to synchronize processor timers, then time synchronization is achieved, but the synchronization latency is high and the system complexity increases
Solution Approach 1:
The patent extracts the time synchronization function from the network layer (NTP) and implements it directly in the hypervisor and processor timer layer. This eliminates the need for network communication for time synchronization, thereby reducing latency while maintaining accuracy through direct processor-to-hypervisor timer synchronization mechanisms.
Solution Approach 2:
The patent introduces the hypervisor as an intermediary between the processor timers and the time synchronization source. The hypervisor receives time synchronization data and distributes it to all virtual machines and processors, eliminating the need for each processor to independently access slow platform chipset registers while maintaining centralized time coordination.
2Measurement precision
If platform chipset timer is used for time synchronization, then all CPUs can access a shared time source, but the reading speed is much slower than local CPU registers
Solution Approach 1:
The patent segments the time synchronization system into two parts: a fast local cache maintained by each processor/virtual machine and a slower update source from the hypervisor. This allows frequent time readings to be served from the fast local cache without accessing the slow platform chipset registers, while still maintaining shared time synchronization through periodic hypervisor updates.
Solution Approach 2:
The patent implements preliminary action by having the hypervisor pre-calculate and distribute time synchronization data to all processors and virtual machines before they need to read the time. This allows virtual machines to have time values pre-loaded in their local context, enabling fast time readings without accessing the slow platform timer.
3Measurement precision
If platform-specific timer information is propagated to virtual machines, then time synchronization is achieved, but the complexity of hypervisor and guest OS increases and virtual machines are tightly bound to physical hardware
Solution Approach 1:
The patent implements universality by creating a standardized virtual timer interface in the hypervisor that provides time synchronization functionality independent of the underlying platform-specific timer hardware. This universal interface allows virtual machines to access time synchronization without knowing or depending on specific platform timer implementations (PIT, HPET, Cyclone), thereby reducing complexity and improving portability.
Solution Approach 2:
The patent uses copying by creating virtual copies of timer interfaces that abstract away the physical hardware details. Instead of propagating platform-specific timer information to virtual machines, the hypervisor creates simplified virtual timer representations that provide the necessary time synchronization functionality without exposing complex hardware details to the guest operating system.
Data Source
AI summary
An operating system in a virtual environment can obtain the current time of the processor that the OS is utilizing through a method for synchronizing timers on multiple processors with a standard reference time, such as the Coordinated Universal Time (UTC). A hypervisor controlling the processors obtains a number of synchronization values that, together with a local timer counter value, are utilized by the guest operating system to determine the physical processor time.


