Accelerating Reference Count Decrement via Hardware Transactional Memory

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Reference count processing in object deletion is costly due to the need for frequent atomic operations, especially in multi-threaded environments, where updating reference counts consumes a significant portion of execution time.

Innovation Solution

Utilizing hardware transactional memory (HTM) for non-atomic operations to accelerate the decrement of reference counts, particularly when a large number of reference counts need to be decremented, and switching to atomic operations when the number is below a threshold to optimize performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If atomic operations are used to update reference counts in multi-threaded environments, then thread safety and reliability are ensured, but execution time and processing overhead increase significantly

Engineering Contradiction:
Improvethread safetyVSAvoidexecution time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the reference count update process into two distinct phases: a bulk decrement phase using non-atomic operations for speed, and a final verification phase using atomic operations for safety. This segmentation allows the system to achieve both high performance and thread safety by applying the appropriate operation type to the appropriate portion of the work.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent dynamically selects between non-atomic and atomic operations based on the execution context and object state. The system transitions from using expensive atomic operations to cheaper non-atomic operations when bulk decrements are performed, and switches back to atomic operations when thread safety is critically needed, creating a dynamic adaptation to performance and safety requirements.

Inventive Principle:
Principle #15Dynamics

2Productivity

If non-atomic operations are used to decrement reference counts, then processing speed and productivity improve, but thread safety and data consistency may be compromised

Engineering Contradiction:
Improveprocessing speedVSAvoidthread safety
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent performs preliminary bulk decrements of reference counts using non-atomic operations to achieve fast processing. This preliminary action handles the majority of reference count updates efficiently, reserving atomic operations only for the final verification and critical sections where thread safety is essential.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary mechanism that coordinates between non-atomic bulk operations and atomic verification operations. This intermediary ensures that the faster non-atomic operations do not compromise overall system consistency by managing the transition to atomic operations when needed.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Manufacturing precision

If atomic operations are used for every reference count update, then data consistency is maintained, but the overhead consumes more than 90% of execution time in programs like LinkedList manipulation

Engineering Contradiction:
Improvedata consistencyVSAvoidexecution time
Core Design Contradiction:
Manufacturing precisionVSLoss of time

Solution Approach 1:

The patent applies different operation qualities to different parts of the reference count update process. Non-atomic operations are used for the bulk decrement portion where absolute consistency is less critical, while atomic operations are reserved for the final verification and critical sections where data consistency is paramount. This local differentiation of operation quality achieves both speed and consistency.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent changes the operational parameter from always using atomic operations to conditionally using non-atomic operations for bulk decrements. This parameter change in the operation type based on the specific task being performed dramatically reduces overhead while maintaining data consistency through subsequent atomic verification.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS10620971B2Accelerating reference count processing in object deletion
Publication Date: 2020.04.14 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10620971B2 patent drawing
  • US10620971B2 patent drawing
  • US10620971B2 patent drawing

AI summary

A computer-implemented method is provided for deleting a given object from among a plurality of objects in an object-oriented programming language computing system which uses a Reference Count (RC) of each of the plurality of objects to check a liveness of the plurality of objects. The method includes decrementing, in a Reference Counts (RCs) decrement operation, RCs of objects referenced from the given object using one or more non-atomic operations in a transaction that utilizes a hardware transactional memory mechanism to accelerate the reference counts decrement operation.