Scalable Translation Caching for Binary Translation Systems
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Binary translation systems with shared translation caches face increased lock contention and memory consumption as the number of threads increases, leading to inefficiencies in processing and memory management.
Innovation Solution
Implementing a computing device with scalable translation caching that allocates shared translation caches for each execution domain, along with global region and prototype caches, to reduce contention and memory usage by caching metadata and prototype code, allowing for efficient binary translation across multiple threads.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If a shared translation cache is used across all threads, then memory consumption is reduced, but lock contention increases with the number of threads
Solution Approach 1:
The translation cache is segmented into multiple per-thread translation caches, where each thread has its own dedicated cache. This segmentation eliminates lock contention between threads while maintaining efficient memory usage through selective sharing of translation metadata via the global region cache and global prototype cache.
2Productivity
If a dedicated translation cache is allocated for each thread, then lock contention is reduced, but memory consumption increases with the number of threads
Solution Approach 1:
Translation metadata and prototype code are merged into global shared structures (global region cache and global prototype cache) that can be reused across threads. This combining approach allows per-thread translation caches to remain small while benefiting from shared resources, reducing overall memory consumption without sacrificing thread safety.
3Quantity of substance
If translation metadata is regenerated for each thread, then memory usage is reduced, but processing time increases due to redundant translation
Solution Approach 1:
Translation metadata and prototype code are generated in advance and stored in global shared caches. When a thread needs to execute translated code, the system performs a lookup in the global region cache and global prototype cache before installing into the per-thread translation cache, avoiding redundant translation work and reducing processing time.
Data Source
AI summary
Technologies for binary translation include a computing device that allocates a translation cache shared by all threads associated with a corresponding execution domain. The computing device assigns a thread to an execution domain, translates original binary code of the thread to generate translated binary code, and installs the translated binary code into the corresponding translation cache for execution. The computing device may allocate a global region cache, generate region metadata associated with the original binary code of a thread, and store the region metadata in the global region cache. The original binary code may be translated using the region metadata. The computing device may allocate a global prototype cache, translate the original binary code of a thread to generate prototype code, and install the prototype code in the global prototype cache. The prototype code may be a non-executable version of the translated binary code. Other embodiments are described and claimed.


