Programmable Reference Counters for Multi-Threaded Resource Allocation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing systems face challenges in efficiently managing resource allocation and release during multi-threaded program execution, leading to potential overallocation and inefficient resource utilization.

Innovation Solution

The system initializes programmable reference counters to limit resource allocation for each task, specifies resource parameters for thread arrays, and allows an override mechanism for resource release, ensuring that architectural resources are retained or released based on thread array exit conditions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If resources are allocated to each thread array for execution, then resource availability for concurrent tasks is improved, but resource overallocation may occur leading to inefficient resource utilization

Engineering Contradiction:
Improveresource availabilityVSAvoidresource overallocation
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The system uses reference counters to track resource allocation status and provides feedback to the work distribution unit. When a thread array exits, the reference counter signals whether resources should be released or retained, preventing overallocation while maintaining availability for concurrent tasks.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system changes the state parameter of resources from a static allocation model to a dynamic model controlled by reference counters. Resources can be retained or released based on the reference counter value, allowing flexible adaptation to concurrent task requirements without overallocation.

Inventive Principle:
Principle #35Parameter changes

2Productivity

If resources are released when thread array exits, then resource pool is replenished for future tasks, but resources may be released prematurely when continuation tasks are pending

Engineering Contradiction:
Improveresource pool replenishmentVSAvoidresource retention timing
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The reference counter provides feedback about the presence of continuation tasks. When a child task is generated, the reference counter prevents resource release. When the thread array exits and the reference counter indicates no continuation tasks, resources are safely released back to the pool.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system performs preliminary allocation of resources to thread arrays before execution. This preliminary action ensures resources are available when needed while the reference counter mechanism prepares to manage release timing based on continuation task status.

Inventive Principle:
Principle #10Preliminary action

3Measurement precision

If reference counters are used to track resource allocation, then resource management precision is improved, but system complexity increases due to additional tracking mechanisms

Engineering Contradiction:
Improveresource allocation trackingVSAvoidtracking mechanism complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The reference counter serves multiple functions: tracking resource allocation, signaling resource release conditions, and managing continuation task state. This multi-functionality reduces the need for separate tracking mechanisms, minimizing added complexity while maintaining precision.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The reference counter automatically updates itself based on thread array entry and exit events. The work distribution unit queries the reference counter state to determine resource release timing, eliminating the need for complex centralized control logic and reducing system complexity.

Inventive Principle:
Principle #25Self-service

4Duration of action of stationary object

If resources are retained for continuation tasks, then task execution continuity is improved, but resource pool availability for other tasks decreases

Engineering Contradiction:
Improvetask execution continuityVSAvoidresource pool availability
Core Design Contradiction:
Duration of action of stationary objectVSProductivity

Solution Approach 1:

The reference counter provides feedback about continuation task status. Resources are retained only when the reference counter indicates pending continuation tasks, and released when no continuation tasks remain, dynamically balancing continuity needs with pool availability.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system transitions from static resource allocation to dynamic resource management. Resources are retained or released based on real-time reference counter state, allowing the system to adapt resource availability to actual task execution needs and maximize overall productivity.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS9507638B2Compute work distribution reference counters
Publication Date: 2016.11.29 NVIDIA CORP
  • US9507638B2 patent drawing
  • US9507638B2 patent drawing
  • US9507638B2 patent drawing

AI summary

One embodiment of the present invention sets forth a technique for managing the allocation and release of resources during multi-threaded program execution. Programmable reference counters are initialized to values that limit the amount of resources for allocation to tasks that share the same reference counter. Resource parameters are specified for each task to define the amount of resources allocated for consumption by each array of execution threads that is launched to execute the task. The resource parameters also specify the behavior of the array for acquiring and releasing resources. Finally, during execution of each thread in the array, an exit instruction may be configured to override the release of the resources that were allocated to the array. The resources may then be retained for use by a child task that is generated during execution of a thread.