Concurrency Object Classification via Shadow Heap

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In multi-threaded applications, determining the type of concurrency object, such as a lock or synchronization object, can be challenging, especially when the same API is used for both, leading to ambiguity in concurrency type determination, which complicates data race detection and increases the risk of concurrency errors like race conditions.

Innovation Solution

The solution involves intercepting API calls that create concurrency objects, recording type information to distinguish between lock and synchronization objects, and using a shadow heap to store this information, allowing for accurate classification and association with the objects, even in ambiguous cases where the API does not clearly indicate the type.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If the same API is used for both lock objects and synchronization objects, then the API is versatile and easy to use, but the determination of concurrency type becomes ambiguous and difficult

Engineering Contradiction:
ImproveAPI versatilityVSAvoidConcurrency type determination difficulty
Core Design Contradiction:
Adaptability or versatilityVSDifficulty of detecting and measuring

Solution Approach 1:

The patent applies preliminary action by intercepting the API call at the creation stage of the concurrency object. Before the object is used, the system records the type information (lock or synchronization object) in association with the object's memory address. This preliminary classification enables accurate type determination later, even when the same API is used for both types, thus resolving the ambiguity without sacrificing API versatility.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If concurrency type information is not accurately determined, then the race detection process is simpler, but the accuracy of race detection decreases and concurrency errors increase

Engineering Contradiction:
ImproveRace detection efficiencyVSAvoidRace detection accuracy
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent introduces an intermediary mechanism - a shadow heap data structure that stores type information for concurrency objects. This shadow heap acts as a mediator between the API calls and the race detection process. When analyzing memory access patterns, the race detection algorithm queries the shadow heap to retrieve the concurrency type, enabling accurate differentiation between lock objects and synchronization objects without complicating the overall detection workflow.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If lock acquisition and synchronization operations are monitored to detect race conditions, then race detection capability is improved, but the complexity of the detection system increases

Engineering Contradiction:
ImproveRace detection capabilityVSAvoidDetection system complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent merges the type classification functionality with the existing race detection system. By intercepting API calls and recording type information in the shadow heap, the system combines object creation monitoring with type classification. This integration allows the race detection process to automatically obtain type information without requiring separate classification mechanisms, thus improving detection capability while minimizing additional system complexity.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS8135690B2Concurrency object classification
Publication Date: 2012.03.13 MICROSOFT TECHNOLOGY LICENSING LLC
  • US8135690B2 patent drawing
  • US8135690B2 patent drawing
  • US8135690B2 patent drawing

AI summary

A method of automatically classifying a concurrency object includes intercepting a call that is configured to create the concurrency object. Concurrency type information for the concurrency object is identified based on the call. The type information indicates whether the concurrency object is a lock object or a synchronization object. The concurrency type information is associated with the concurrency object.