Coprocessor Virtual Memory via CPU Swap Buffer

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional coprocessors have memory allocation limitations, preventing dynamic memory allocation during program execution, which can lead to insufficient memory and program failure when the actual memory needs exceed initial allocations.

Innovation Solution

A system and method for dynamically allocating memory during execution by using a worker thread on a central processing unit to notify and allocate additional memory from a swap buffer, allowing memory to be dynamically allocated even on coprocessors that do not support memory paging or swapping.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If memory allocation is limited to a maximum amount before execution begins, then the coprocessor has simple memory management, but the program may fail when memory needs exceed the allocated amount

Engineering Contradiction:
Improveprogram execution reliabilityVSAvoidmemory management complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent introduces a swap buffer as an intermediary memory structure that mediates between the coprocessor's limited accessible memory and the CPU's larger non-accessible memory. When the first buffer (accessible to coprocessor) becomes full, data is swapped to the swap buffer (accessible only to CPU), allowing the coprocessor to continue execution without memory expansion while maintaining program reliability

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent segments memory into multiple portions: a first buffer accessible to the coprocessor for active processing, and a swap buffer accessible only to the CPU for overflow storage. This segmentation allows the coprocessor to operate with limited memory while the CPU manages additional storage, resolving the contradiction between simple memory management and execution reliability

Inventive Principle:
Principle #1Segmentation

2Adaptability or versatility

If the coprocessor has fixed memory allocation, then memory management is simple, but the system cannot support unlimited child tasks and nested parallelism

Engineering Contradiction:
Improvesupport for child tasks and nested parallelismVSAvoiddynamic memory allocation complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The swap buffer acts as an intermediary that enables unlimited child tasks and nested parallelism by providing overflow storage capacity managed by the CPU. The coprocessor can launch unlimited tasks knowing that memory constraints will be handled by the CPU through the swap buffer mechanism, achieving high adaptability without adding complexity to the coprocessor itself

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system implements self-service memory management where the CPU automatically monitors the first buffer status and performs swapping operations when needed. This eliminates the need for the coprocessor to have complex dynamic memory allocation capabilities while still enabling unlimited task creation and nested parallelism through the CPU's autonomous memory management

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS8904068B2Virtual memory structure for coprocessors having memory allocation limitations
Publication Date: 2014.12.02 NVIDIA CORP
  • US8904068B2 patent drawing
  • US8904068B2 patent drawing
  • US8904068B2 patent drawing

AI summary

One embodiment sets forth a technique for dynamically allocating memory during multi-threaded program execution for a coprocessor that does not support dynamic memory allocation, memory paging, or memory swapping. The coprocessor allocates an amount of memory to a program as a put buffer before execution of the program begins. If, during execution of the program by the coprocessor, a request presented by a thread to store data in the put buffer cannot be satisfied because the put buffer is full, the thread notifies a worker thread. The worker thread processes a notification generated by the thread by dynamically allocating a swap buffer within a memory that cannot be accessed by the coprocessor. The worker thread then pages the put buffer into the swap buffer during execution of the program to empty the put buffer, thereby enabling threads executing on the coprocessor to dynamically receive memory allocations during execution of the program.