Virtual Programmable Interrupt Timer Catch-Up Mode

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for maintaining accurate time in virtual machines are prone to time drift and 'interrupt storms' due to non-deterministic timing behavior caused by virtualization and host activity, leading to performance issues and incompatibility with multiple operating systems.

Innovation Solution

A method that adaptively corrects time loss in virtual machines by running the programmable interrupt timer at a higher frequency than nominal, using a feedback mechanism to apply time corrections only when necessary, and monitoring the interrupt rate to prevent interrupt storms, while maintaining transparency to the guest operating system.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If the virtual programmable interrupt timer relies on periodic host operating system callback mechanism, then the virtualization service can emulate the programmable interrupt timer for virtual machines, but the virtual system experiences non-deterministic timing behavior and time loss due to preemption by host activity

Engineering Contradiction:
Improvevirtualization capabilityVSAvoidtiming accuracy
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent applies preliminary action by pre-calculating and storing expected timer interrupt times in a queue before they are needed. The virtualization service maintains a queue of pending timer interrupts with their scheduled times, allowing it to proactively deliver interrupts at the correct moments rather than relying on periodic callbacks that may be preempted. This eliminates time loss by ensuring interrupts are delivered exactly when expected, even during host preemption.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent replaces the mechanical periodic callback mechanism with a software-based event queue system. Instead of relying on hardware-like periodic interrupts from the host, the system uses a software queue that tracks expected interrupt times and delivers them when appropriate. This substitution allows precise timing control independent of host preemption cycles.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Productivity

If the virtual programmable interrupt timer interrupt is delayed past the next expected timer period, then the interrupt arrival rate becomes less than nominal, but the interrupt merges with the next virtual programmable interrupt timer interrupt causing time loss

Engineering Contradiction:
Improveinterrupt deliveryVSAvoidtime loss
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system pre-calculates all expected timer interrupt times and stores them in a queue before execution. By having the complete schedule of expected interrupts ready in advance, the virtualization service can compare actual delivery times against the pre-calculated schedule and immediately identify any delays or merges, preventing time loss accumulation.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements feedback by continuously monitoring the actual interrupt delivery time against the expected interrupt time from the queue. When a delay or merge is detected, the system uses this feedback information to adjust subsequent interrupt scheduling, ensuring time accuracy is maintained despite variations in host preemption patterns.

Inventive Principle:
Principle #23Feedback

3Measurement precision

If guest operating system time is suddenly jumped forward when time is corrected, then time accuracy is improved, but domain controllers and other time-sensitive programs are intolerant to sudden time changes

Engineering Contradiction:
Improvetime accuracyVSAvoidtime jump disruption
Core Design Contradiction:
Measurement precisionVSObject-affected harmful factors

Solution Approach 1:

The system pre-calculates the exact moment when time correction should be applied based on the queue of expected interrupts. Rather than correcting time arbitrarily when drift is detected, the correction is scheduled to occur at a pre-determined future point in the interrupt queue, allowing the system to prepare for the correction and minimize disruption to time-sensitive operations.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent makes the time correction mechanism dynamic by adjusting the correction amount and timing based on actual measured drift and the current state of the interrupt queue. The system can apply corrections gradually over multiple interrupts or delay corrections until a suitable moment, rather than applying fixed corrections, thereby reducing sudden jumps while maintaining accuracy.

Inventive Principle:
Principle #15Dynamics

4Measurement precision

If the virtualization service runs the programmable interrupt timer at a higher frequency than nominal, then time accuracy is improved, but interrupt storms may occur disrupting guest operating system operations

Engineering Contradiction:
Improvetime accuracyVSAvoidinterrupt storm
Core Design Contradiction:
Measurement precisionVSObject-generated harmful factors

Solution Approach 1:

The system pre-calculates the exact number and timing of interrupts needed to correct time drift based on the measured error and the queue of expected interrupts. By having this schedule prepared in advance, the system can deliver multiple interrupts in succession to catch up on lost time without creating an uncontrolled interrupt storm, as the total number of interrupts is predetermined.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent applies partial action by delivering only the specific number of additional interrupts needed to correct the measured time drift, rather than continuously running the timer at higher frequency. The system calculates the precise correction amount needed and delivers exactly that many interrupts, avoiding excessive action that would cause interrupt storms while still achieving time accuracy.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS8533709B2Changing frequency of a virtual programmable interrupt timer in virtual machines to control virtual time
Publication Date: 2013.09.10 MICROSOFT TECHNOLOGY LICENSING LLC
  • US8533709B2 patent drawing
  • US8533709B2 patent drawing
  • US8533709B2 patent drawing

AI summary

A catch-up mode that runs a virtual programmable interrupt timer faster than a nominal rate to prevent time loss in a virtual machine can be implemented. If time loss is determined, a catch-up mode can be initiated to cause increased firings, beyond a nominal rate, of the programmable interrupt timer to adjust the clock of the virtual machine to the clock of the host system. The virtual programmable interrupt timer can also be readjusted to a predetermined nominal rate when the time loss in the guest operating system is determined approximately within a predetermined tolerance range. The catch-up mode can be monitored to avoid “interrupt storms” on the virtual machine. The virtual programmable interrupt timer can be altered by the guest operating system to accommodate different operating systems.