FPU Context Switching with Selective Save and Restore

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing operating systems face challenges in managing floating-point unit (FPU) resources during task switching, leading to potential data processing errors or system crashes, especially in multi-state CPU environments.

Innovation Solution

A method and electronic device for managing FPU resources by setting variables to point to specific addresses, filling FPU registers with context variables, and controlling state transitions, including saving FPU register contents to task control blocks when necessary, to ensure safe and efficient state switching.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If FPU resources are saved and restored during every state transition, then system reliability is improved, but time overhead and processing efficiency deteriorate

Engineering Contradiction:
Improvesystem reliabilityVSAvoidtime overhead
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent applies partial action by selectively saving FPU resources only when necessary. The management circuit determines whether to save FPU context based on whether the current state is a user state or kernel state, and whether the FPU has been modified since the last save. This selective approach avoids unnecessary save/restore operations while maintaining system reliability.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The patent uses parameter changes by tracking the modification status of FPU resources through status bits or flags. The management circuit monitors whether FPU registers have been modified and only triggers save operations when the modification status indicates changes, thereby reducing redundant save/restore operations during state transitions.

Inventive Principle:
Principle #35Parameter changes

2Reliability

If FPU resources are saved and restored during every state transition, then system reliability is improved, but processing efficiency deteriorates

Engineering Contradiction:
Improvesystem reliabilityVSAvoidprocessing efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies partial action by selectively saving FPU resources only when necessary. The management circuit determines whether to save FPU context based on whether the current state is a user state or kernel state, and whether the FPU has been modified since the last save. This selective approach avoids unnecessary save/restore operations while maintaining system reliability.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The patent uses parameter changes by tracking the modification status of FPU resources through status bits or flags. The management circuit monitors whether FPU registers have been modified and only triggers save operations when the modification status indicates changes, thereby reducing redundant save/restore operations during state transitions.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If FPU resources are properly managed during task switching, then system stability is improved, but device complexity increases

Engineering Contradiction:
Improvesystem stabilityVSAvoiddevice complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent introduces an FPU management circuit as an intermediary component between the FPU and the state transition logic. This management circuit handles the complexity of tracking FPU resource usage, determining save/restore needs, and executing the appropriate operations, thereby isolating the complexity from the main task switching logic and maintaining system stability.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS20260064469A1Electronic device and method for managing floating-point unit resources
Publication Date: 2026.03.05 SIGMASTAR TECH LTD
  • US20260064469A1 patent drawing
  • US20260064469A1 patent drawing
  • US20260064469A1 patent drawing

AI summary

A method for managing a floating-point unit (FPU) resource is applied to an electronic device. The electronic device includes a computing circuit and a memory. The memory stores a first variable and a second variable. The computing circuit includes an FPU. The FPU comprises an FPU register. The computing circuit operates in one of a first state, a second state, and a third state. The management method includes the following steps: (A) setting the first variable to point to an address of the second variable when the computing circuit switches from the first state to the second state, and the first variable is in an initial state; (B) filling the FPU register with an FPU context of the second variable; and (C) controlling the computing circuit to switch to the second state.