Reference Counting for Transaction Data Structure Stability

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In transactional memory systems, contention management is challenging due to the instability of transaction data structures, which can be deallocated before information about another transaction is read, leading to incorrect decision-making during conflict resolution.

Innovation Solution

A reference counting mechanism is implemented to ensure that transaction data structures remain stable by incrementing and decrementing a reference count when transactions register or unregister interest, preventing deallocation until no transactions are interested, and using an unstable attribute to manage thread stability during garbage collection.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If transaction data structures are made local to threads for efficiency, then performance is improved, but the data structures become unstable and can be deallocated before information is read

Engineering Contradiction:
ImproveperformanceVSAvoiddata structure stability
Core Design Contradiction:
ProductivityVSStability of the object's composition

Solution Approach 1:

The patent applies preliminary action by incrementing the reference count of a transaction data structure before reading its information. This ensures the data structure remains allocated and stable during the information retrieval process, preventing deallocation that would occur with local thread structures. The reference count is incremented in advance to guarantee stability throughout the subsequent read operations.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The reference count acts as an intermediary mechanism between the transaction data structure and the thread-local allocation strategy. It mediates the conflict between wanting local structures for performance and needing stable references for correct operation, by providing a counting mechanism that bridges these requirements.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If reference counting is used to stabilize data structures, then reliability is improved, but device complexity increases

Engineering Contradiction:
Improvedata structure stabilityVSAvoidreference counting mechanism
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The transaction data structure performs self-service by maintaining its own reference count. The structure automatically increments its count when another transaction needs to read its information, and automatically decrements when the reading transaction completes. This self-managing mechanism provides stability without requiring external intervention or complex management systems.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent merges the reference counting functionality directly into the transaction data structure itself, combining the stability mechanism with the data structure rather than implementing it as a separate system. This integration reduces overall complexity by eliminating the need for additional management infrastructure.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS7991967B2Using type stability to facilitate contention management
Publication Date: 2011.08.02 MICROSOFT TECHNOLOGY LICENSING LLC
  • US7991967B2 patent drawing
  • US7991967B2 patent drawing
  • US7991967B2 patent drawing

AI summary

Various technologies and techniques are disclosed for providing type stability techniques to enhance contention management. A reference counting mechanism is provided that enables transactions to safely examine states of other transactions. Contention management is facilitated using the reference counting mechanism. When a conflict is detected between two transactions, owning transaction information is obtained. A reference count of the owning transaction is incremented. The system ensures that the correct transaction was incremented. If the owning transaction is still a conflicting transaction, then a contention management decision is made to determine proper resolution. When the decision is made, the reference count on the owning transaction is decremented by the conflicting transaction. When each transaction completes, the reference counts it holds to itself is decremented. Data structures cannot be deallocated until their reference count is zero. Dedicated type-stable allocation pools can be reduced using an unstable attribute.