Binary Translation Caching for Low-Delay Cross-ISA Execution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing binary translation methods, particularly dynamic binary translators, result in significant hardware overhead and user-noticeable delays due to just-in-time compilations, especially when dealing with applications that include self-modifying code or require frequent translations.

Innovation Solution

A system comprising a binary translator with a system service and a runtime code module that manages a persistent translation cache, enabling efficient translation and execution of binaries across different instruction set architectures, including handling self-modifying code through write protection and epoch-based reclamation, and utilizing a secure enclave processor for cryptographic security.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If dynamic binary translation is used to translate applications between execution environments, then translation accuracy is improved, but hardware overhead increases and execution speed decreases

Engineering Contradiction:
Improvetranslation accuracyVSAvoidexecution speed
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The system performs preliminary translation of application code before execution by using a translation cache that stores pre-translated binary code. When an application needs to be executed, the system checks the translation cache for existing translations and uses them directly, avoiding the need for dynamic translation during execution and thus eliminating the performance penalty associated with just-in-time compilation.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If just-in-time compilation is performed during application execution, then translation completeness is improved, but user-noticeable delays increase

Engineering Contradiction:
Improvetranslation completenessVSAvoidexecution delay
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The translation cache stores pre-computed translations of application code segments before execution is needed. When an application launches or when code segments are accessed, the system retrieves pre-translated code from the cache rather than performing translation at runtime, eliminating user-noticeable delays associated with just-in-time compilation while maintaining complete translation coverage.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system creates and stores copies of translated code segments in the translation cache. These cached copies are then reused for subsequent execution of the same code, eliminating the need to perform translation again and avoiding repeated user-noticeable delays that would occur with continuous just-in-time compilation.

Inventive Principle:
Principle #26Copying

3Productivity

If a translation cache is implemented to store translated binaries, then translation efficiency is improved, but system complexity increases

Engineering Contradiction:
Improvetranslation efficiencyVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The translation cache is integrated into the existing operating system framework and works with standard application execution mechanisms. The cache manages translated code segments using conventional memory management and process isolation techniques, allowing multiple applications and execution environments to share the same cache infrastructure without requiring separate complex management systems for each translation scenario.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS20250265061A1Systems and Methods for Performing Binary Translation
Publication Date: 2025.08.21 APPLE INC
  • US20250265061A1 patent drawing
  • US20250265061A1 patent drawing
  • US20250265061A1 patent drawing

AI summary

Systems and methods for performing binary translation include a system that is capable of translating binaries written for use in a source execution environment to binaries compatible with a target execution environment. Consistent with some embodiments, a binary translation system includes a system service and a runtime code module that exists in an application memory address space. The binary translation system translates object-level binaries corresponding to executables, linkers, libraries, and the like and stores the translation in a translation cache that is cryptographically secured to ensure that only a system having a specific key is able to access the translations. If the application or application binary has been modified since the translation was performed, the system service will ensure that the translation is removed from the cache, a new translation is performed, and all threads accessing that translation are updated to the new translation.