Deferred Lock for Iterative Object De-allocation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In multithreaded environments, de-allocating objects associated with virtual functions is complex and can cause system delays due to the large number of objects involved, especially when threads attempt to access objects being deleted, leading to performance interruptions.

Innovation Solution

Implementing a deferred lock mechanism that delays the de-allocation of objects until all threads have left the computing space, using an incrementing removal index and removal pointer to iteratively de-allocate objects, ensuring that code has finished referencing them before deletion, and utilizing a spinlock to manage access to the live pointer array.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If all objects are de-allocated at the same time, then memory storage is efficiently managed, but system delays and performance interruptions occur

Engineering Contradiction:
Improvememory storage efficiencyVSAvoidsystem performance
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

The patent segments the de-allocation process by dividing objects into different states (active, deferred, deleted) and de-allocating them in stages rather than all at once. The deferred lock mechanism creates a transition phase where objects are marked for deletion but not immediately removed, allowing systematic memory management without causing system-wide interruptions.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies preliminary action by establishing a deferred lock mechanism that prepares objects for de-allocation in advance but delays the actual removal. Threads can acquire the deferred lock to check if objects are ready for deletion before proceeding, ensuring that de-allocation happens only when safe, thus preventing performance interruptions while maintaining memory efficiency.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If de-allocation is delayed until threads leave computing space, then thread safety is ensured, but de-allocation time increases

Engineering Contradiction:
Improvethread safetyVSAvoidde-allocation time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent introduces an intermediary mechanism - the deferred lock - that mediates between thread execution and object de-allocation. Instead of directly de-allocating objects when threads leave, the system uses the deferred lock as a buffer to coordinate the timing, allowing threads to safely exit while ensuring de-allocation occurs at an appropriate moment without excessive delay.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The de-allocation process operates periodically rather than continuously - objects are marked for deletion, then de-allocated in periodic batches when the deferred lock is acquired. This periodic approach ensures thread safety by waiting for appropriate moments while limiting the time objects remain in intermediate states, balancing reliability and time efficiency.

Inventive Principle:
Principle #19Periodic action

3Ease of operation

If a thread reads storage of an object being deleted, then data access flexibility is maintained, but data integrity is compromised

Engineering Contradiction:
Improvedata access flexibilityVSAvoiddata integrity
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent applies preliminary action by establishing a clear sequence: objects are first marked for deletion in the deferred state, then threads are prevented from accessing them, and finally de-allocation occurs. This preliminary marking phase allows the system to prepare for de-allocation while maintaining data integrity by controlling access before the actual deletion happens.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent extracts the de-allocation operation from the active object lifecycle by creating a separate deferred state. Objects are taken out of the active pool and placed in a deferred deletion queue, where they can be safely removed without affecting threads that might otherwise access them. This separation ensures data integrity while maintaining operational flexibility for active objects.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS8832401B2Iteratively de-allocating active objects associated with virtual functions of an adapter
Publication Date: 2014.09.09 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US8832401B2 patent drawing
  • US8832401B2 patent drawing
  • US8832401B2 patent drawing

AI summary

A method of managing memory may include selecting an object of a memory heap to be de-allocated and initiating a deferred lock configured to delay de-allocation of the object. The deferred lock may be acquired in response to a thread leaving a computing space, and the object may be de-allocated.