External Object Reference Management for Isolated Heaps
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In managed runtimes, data exchange between isolates with separate heaps is cumbersome due to unnecessary overhead from copying entire object hierarchies and security concerns, especially when dealing with external references and garbage collection.
Innovation Solution
A method involving a source isolate generating an external object reference, passing it to a target isolate, storing the reference in an exported reference table, and removing it upon notification from a finalizer that the reference has become unreferenced, allowing efficient data access and management without requiring a distributed garbage collector.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If data is copied from one heap to another, then data exchange between isolates is achieved, but unnecessary overhead is introduced due to traversal of the entire object hierarchy
Solution Approach 1:
The patent extracts only the necessary reference information (object identifiers and type information) from the object hierarchy, rather than copying entire objects. External object references are created that point to objects in the source isolate's heap, allowing the target isolate to access objects without traversing or copying the entire object hierarchy, thus eliminating unnecessary copying overhead.
Solution Approach 2:
The patent introduces external object references as intermediaries between isolates. These references act as mediators that allow objects in one isolate to be accessed by another isolate without direct copying. The reference table serves as an intermediary mapping structure that translates references between isolates, enabling efficient data exchange while maintaining heap isolation.
2Reliability
If complex objects are marshaled for data exchange, then complete data transfer is achieved, but additional overhead and security concerns are introduced
Solution Approach 1:
The patent extracts only the essential information needed for reference (object identifier and type) rather than marshaling complete complex objects. This extraction approach maintains data transfer reliability by preserving object identity and type information while eliminating the complexity of full object marshaling and unmarshaling processes.
3Productivity
If external references are allowed between isolates, then data access efficiency is improved, but garbage collection becomes complicated
Solution Approach 1:
The patent segments the reference management system into isolate-specific reference tables that track external references. Each isolate maintains its own reference table mapping external references to objects in its heap, allowing garbage collectors to operate independently within each isolate without needing a complex distributed garbage collection system. The segmentation enables localized reference counting and garbage collection decisions.
4Reliability
If separate heaps are used for each isolate, then security is enhanced through isolation, but data exchange becomes cumbersome
Solution Approach 1:
The patent uses external object references and reference tables as intermediaries that enable data exchange between isolates while maintaining separate heaps. These intermediaries provide a controlled interface that preserves security isolation by preventing direct access to another isolate's heap, while still allowing efficient data exchange through reference-based access to objects across isolate boundaries.
Data Source
AI summary
A method may include generating, by a source isolate, an external object reference, passing, by the source isolate, the external object reference to a target isolate, storing, by the source isolate and in an exported reference table, an entry that maps the external object reference to an object stored in a heap of the source isolate, performing, by the target isolate, a task that accesses the object using the external object reference, receiving, by the source isolate and from a finalizer of the external object reference, a notification that the external object reference has become unreferenced, and in response to the notification, removing, by the source isolate, the entry from the exported reference table.


