Gated Store Buffer for Precise Virtual Machine Exceptions

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Virtual machines face challenges in providing precise exception semantics, as existing software techniques are slow, and hardware techniques that improve performance involve additional complexity and cost, making it difficult to emulate precise exception behavior across different hardware environments.

Innovation Solution

The system uses safepoints and register rename maps to revert execution to a previous state, combined with a gated store buffer to ensure precise exception handling, allowing for efficient emulation of exception behavior without significant hardware complexity.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If software techniques are used to provide precise exception semantics, then precision is improved, but speed deteriorates

Engineering Contradiction:
Improveexception semantics precisionVSAvoidprogram execution speed
Core Design Contradiction:
Measurement precisionVSSpeed

Solution Approach 1:

The patent introduces a store buffer as an intermediary structure between the execution unit and memory system. This buffer temporarily holds store operations, allowing the execution unit to continue processing instructions without waiting for memory writes to complete. The store buffer acts as a mediator that decouples the timing of store operations from memory access, enabling faster exception handling while maintaining precise exception semantics.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Speed

If hardware techniques are used to provide precise exception semantics, then speed is improved, but device complexity increases

Engineering Contradiction:
Improveexception handling speedVSAvoidhardware complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent segments the memory system into two distinct parts: a store buffer for temporary store operations and the main memory system for permanent storage. This segmentation allows the system to handle stores asynchronously in the buffer while maintaining simple, straightforward memory access paths for loads and other operations. The segmentation enables fast exception handling by isolating the complexity of store buffering from the rest of the memory subsystem.

Inventive Principle:
Principle #1Segmentation

3Measurement precision

If store operations are delayed in a gated store buffer, then precise exception semantics are improved, but loss of time increases

Engineering Contradiction:
Improveexception delivery precisionVSAvoidstore operation delay
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent implements a dynamic gate control mechanism for the store buffer. The gate is selectively opened or closed based on the current execution state. During normal execution, the gate allows stores to proceed to memory. When an exception is detected, the gate closes to prevent further stores from reaching memory, ensuring precise exception semantics. This dynamic control allows the system to maintain precision only when necessary, minimizing time loss during normal operation.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS8959277B2Facilitating gated stores without data bypass
Publication Date: 2015.02.17 SUN MICROSYSTEMS INC
  • US8959277B2 patent drawing
  • US8959277B2 patent drawing
  • US8959277B2 patent drawing

AI summary

One embodiment of the present invention provides a system that facilitates precise exception semantics for a virtual machine. During operation, the system executes a program in the virtual machine using a processor that includes a gated store buffer that stores values to be written to a memory. This gated store buffer is configured to delay a store to the memory until after a speculatively-optimized region of the program commits. The processor signals an exception when it detects that a load following the store is attempting to access the same memory region being written by the store prior to the commitment of the speculatively-optimized region.