Virtual Core Mapping for TEE Resource Scheduling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current processor resource scheduling in terminal devices is inefficient due to the inability of the rich execution environment (REE) operating system to accurately perceive the resource usage by the trusted execution environment (TEE), leading to inaccurate statistics and potential jamming of processes.

Innovation Solution

The method involves dynamic mapping between physical and virtual processor cores, using a CPU yield mechanism to allow client applications to yield time slice resources to trust applications, maintaining the client application's working state and allowing accurate resource usage tracking by the REE OS, thereby facilitating better resource scheduling and load balance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If the REE OS schedules processor resources without perceiving TEE resource usage, then the scheduling process is simple, but the resource statistics become inaccurate leading to process jamming

Engineering Contradiction:
Improvescheduling process complexityVSAvoidresource usage statistics accuracy
Core Design Contradiction:
Device complexityVSMeasurement precision

Solution Approach 1:

The patent introduces a virtual machine manager (Hypervisor) as an intermediary layer between the REE OS and TEE applications. The Hypervisor virtualizes processor resources, creating virtual processor cores that the REE OS can schedule without directly managing TEE resources. This intermediary enables accurate resource tracking through virtualization while maintaining scheduling simplicity at the REE OS level.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent segments processor resources into physical processor cores and virtual processor cores. The physical cores are divided and allocated to different virtual machines (first VM for REE, second VM for TEE). This segmentation allows the REE OS to schedule virtual resources while the Hypervisor manages the mapping to physical resources, ensuring accurate resource statistics without complicating the REE OS scheduling logic.

Inventive Principle:
Principle #1Segmentation

2Productivity

If the REE OS directly manages both REE and TEE resources, then resource scheduling is centralized, but the system complexity increases and efficiency decreases

Engineering Contradiction:
Improveresource scheduling efficiencyVSAvoidsystem architecture complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system architecture is segmented into multiple layers: REE OS for Rich Execution Environment, Hypervisor for virtualization management, and TEE OS for Trusted Execution Environment. Each layer manages specific resources independently, avoiding the complexity of centralized management while maintaining overall system coordination through well-defined interfaces.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The Hypervisor acts as an intermediary that manages the interface between REE and TEE resource management. It handles the virtualization of processor cores and the mapping between virtual and physical resources, allowing both REE OS and TEE OS to operate independently with improved efficiency without requiring direct integration complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Speed

If time slice resources are allocated exclusively to client applications, then client application performance is optimized, but trust application execution is delayed or blocked

Engineering Contradiction:
Improveclient application execution speedVSAvoidtrust application processing throughput
Core Design Contradiction:
SpeedVSProductivity

Solution Approach 1:

The patent implements dynamic time slice resource allocation where the Hypervisor adjusts the mapping between virtual processor cores and physical processor cores based on real-time resource usage. When client applications need resources, they receive full allocation; when trust applications need to execute, the Hypervisor dynamically shifts resource allocation, ensuring both can execute efficiently without permanent blocking.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the parameter of processor core allocation dynamically. The Hypervisor modifies the mapping relationship between virtual and physical processor cores based on workload demands. Time slice resources are reassigned between REE and TEE contexts as needed, allowing client applications to achieve optimal performance while trust applications can execute without permanent delays.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS20240338255A1Service Processing Method and Related Apparatus
Publication Date: 2024.10.10 HONOR DEVICE CO LTD
  • US20240338255A1 patent drawing
  • US20240338255A1 patent drawing
  • US20240338255A1 patent drawing

AI summary

A service processing method and a related apparatus, in which a mapping is established between a physical processor core used by a client application and a virtual processor core used by a trust application corresponding to the client application, so that the trust application can use time slice resources of the physical processor core occupied by the client application to the trust application to execute service processing. In this way, the system can perceive the time slice resources used by the trust application when scheduling resources of the physical processor core, which facilitates implementing more accurate statistics on the usage of the resources of the physical processor core, thereby implementing load balancing during resource scheduling.