Memory Manager Page Fault Handling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current memory management systems face bottlenecks due to the processor's need to access the Translation Lookaside Buffer (TLB) frequently, leading to cache access delays and high page fault interrupt processing times, which reduce overall system efficiency.

Innovation Solution

A memory management method where a memory manager determines page fault types and allocates corresponding pages without generating interrupts for blank-page-caused faults, using existing or substituted pages, and updates page table entries, thereby reducing page fault interrupts and improving efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If the processor frequently accesses the TLB for virtual-physical address mapping, then address translation is performed, but the cache access time increases and system efficiency decreases

Engineering Contradiction:
Improveaddress translation accuracyVSAvoidcache access time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent pre-loads page table entries into the TLB before they are actually needed for address translation. By anticipating future address translation needs and populating the TLB in advance, the system reduces the frequency of TLB misses and subsequent cache access delays, directly addressing the time loss without compromising translation accuracy

Inventive Principle:
Principle #10Preliminary action

2Speed

If the MMU performs hardware-based page lookup, then address translation speed is improved, but page fault interrupt processing time increases significantly

Engineering Contradiction:
Improveaddress translation speedVSAvoidpage fault interrupt processing time
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The patent extracts the page fault handling functionality from the processor's interrupt processing path and relocates it to the memory management device. When a page fault occurs, the memory management device directly retrieves the required page data from memory without triggering a processor interrupt, thereby maintaining fast address translation while eliminating the time-consuming interrupt processing overhead

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The memory management device is empowered to autonomously handle page faults by directly accessing memory and retrieving page data without processor intervention. This self-service mechanism allows the system to maintain hardware-based translation speed while avoiding the significant time loss associated with processor interrupt handling

Inventive Principle:
Principle #25Self-service

3Measurement precision

If the TLB is placed in the key path of cache access, then virtual-physical address mapping is performed, but TLB misses cause frequent MMU lookups and create system bottlenecks

Engineering Contradiction:
Improveaddress mapping accuracyVSAvoidmemory management efficiency
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The memory management device pre-loads page table entries into the TLB based on predicted access patterns and memory access requests. By proactively populating the TLB with likely-needed entries, the system maintains accurate address mapping while significantly reducing TLB miss rates and preventing system bottlenecks

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system implements a feedback mechanism where the memory management device monitors TLB hit/miss rates and dynamically adjusts its pre-loading strategy. When TLB misses are detected, the device learns from the access pattern and pre-loads related page table entries in advance, thereby maintaining mapping accuracy while improving overall memory management efficiency

Inventive Principle:
Principle #23Feedback

Data Source

PatentEP3121731B1Memory management method and device
Publication Date: 2022.06.08 HUAWEI TECH CO LTD
  • EP3121731B1 patent drawingFigure 1
  • EP3121731B1 patent drawingFigure 2
  • EP3121731B1 patent drawingFigure 3

AI summary

Embodiments of the present invention provide a memory management method and a device, where the method includes: receiving, by a memory manager, a memory access request, where the memory access request carries a virtual address; determining a page fault type of the virtual address if the memory manager finds, in a translation lookaside buffer TLB and a memory, no page table entry corresponding to the virtual address; allocating, by the memory manager, a corresponding page to the virtual address if the page fault type of the virtual address is a blank-page-caused page fault, where the blank-page-caused page fault means that no corresponding page is allocated to the virtual address; and updating, by the memory manager, the page table entry corresponding to the virtual address to the memory and the TLB. By determining the page fault type of the virtual address, the memory manager does not generate a page fault when a blank-page-caused page fault occurs, but allocates a corresponding page to the virtual address. Therefore, the method in the embodiments can reduce a quantity of occurrences of the page fault, thereby improving memory management efficiency.