Type Casting in Managed Code Systems

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Managed code operating systems face performance issues due to the need to copy data between isolation contexts, which introduces overhead and compromises reliability and security, while unmanaged languages offer fine control but at the cost of reliability and security vulnerabilities.

Innovation Solution

The implementation of type casting in managed code systems, combined with immutable sharable zero-copy bulk data mechanisms, zero-copy caching, uniform memory access, and type-safe type casting, allows data to be transferred and accessed without copying, maintaining type safety and improving performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If managed programming languages are used to create operating systems, then software correctness and reliability are improved, but performance deteriorates due to data copying overhead between isolation contexts

Engineering Contradiction:
Improvesoftware correctnessVSAvoidI/O performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent introduces shared memory as an intermediary mechanism between managed memory isolation contexts. This allows different managed processes to access the same physical memory without copying data, thereby maintaining type safety while eliminating the performance penalty of data copying. The shared memory acts as a mediator that resolves the contradiction between isolation (correctness) and performance.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent eliminates the need for data copying by implementing zero-copy I/O operations. Instead of copying data between managed memory and shared memory, the system allows direct access to shared memory from managed code through type-safe casting mechanisms, thereby removing the performance bottleneck while preserving memory management safety.

Inventive Principle:
Principle #26Copying

2Productivity

If unchecked pointers are used in unmanaged languages, then I/O performance is improved through reduced overhead, but software reliability and security deteriorate

Engineering Contradiction:
ImproveI/O throughputVSAvoidsoftware security
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent uses the type system as an intermediary that provides the performance benefits of pointer-like access while maintaining the safety guarantees of managed code. The type-safe casting mechanism allows efficient data access without the need for unchecked pointers, thereby achieving both high performance and reliability.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent changes the fundamental parameter of memory access from unchecked pointer manipulation to type-safe casting. This parameter change allows the system to maintain the performance characteristics of unmanaged code while incorporating the safety and reliability features of managed code through the type system's constraints.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If an abstraction layer is inserted between source code and raw machine resources, then software correctness is improved, but performance deteriorates due to introduced overhead

Engineering Contradiction:
Improvesoftware qualityVSAvoidexecution speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent eliminates data copying overhead by implementing direct memory access mechanisms. The type-safe casting system allows managed code to access shared memory without copying data through the abstraction layer, thereby removing the performance penalty while preserving the correctness benefits of the managed language abstraction.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent replaces the mechanical data copying process with a more efficient type-safe casting mechanism. Instead of physically copying data through the abstraction layer, the system uses type casting to create virtual pointers that directly reference shared memory, thereby eliminating the overhead while maintaining abstraction benefits.

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

Data Source

PatentEP2941701B1Type casting in a managed code system
Publication Date: 2017.03.22 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP2941701B1 patent drawingFigure 1
  • EP2941701B1 patent drawingFigure 2
  • EP2941701B1 patent drawingFigure 3A~3B

AI summary

Type casting in a managed code system is described. The managed code system includes managed memory as well as shared memory located outside of the managed memory. The managed memory has multiple managed memory portions, each corresponding to a computing entity, such as a processes. The type system permits obtaining of data from shared memory using type casting to thereby assign the data a type that supports type casting. The type is a valid type casting type that satisfies certain requirements that allow the type to be assigned while maintaining type safety.