Dynamic Lock Conversion for Thread Queue Thrashing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional computing systems face inefficiencies due to manual initialization of locks as high or low performance, leading to suboptimal resource usage and performance issues, as they often switch unnecessarily between lock types in response to transient changes in thread queues, causing 'thrashing'.

Innovation Solution

A method and system that monitor thread queues to determine if threads have exceeded specific time and depth thresholds, converting low-performance locks to high-performance locks and vice versa, using a controller to manage these conversions and avoid unnecessary switching, allowing for granular adjustment based on actual usage patterns.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If locks are manually initialized as high or low performance, then resource allocation can be optimized, but system adaptability deteriorates because the lock type cannot change based on actual usage patterns

Engineering Contradiction:
Improvelock type adaptabilityVSAvoidlock management complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent applies dynamics by enabling locks to transition between different performance levels (low-performance and high-performance) based on real-time usage conditions. The lock type is no longer fixed but dynamically adjusts according to queue depth and wait time metrics, allowing the system to adapt to changing workloads without manual reconfiguration.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system implements self-service through automatic lock conversion mechanisms. The lock manager monitors usage patterns and autonomously converts locks between performance levels without requiring manual intervention. This self-adjusting capability resolves the adaptability-complexity contradiction by embedding the adaptation logic within the lock management system itself.

Inventive Principle:
Principle #25Self-service

2Speed

If locks switch frequently in response to transient queue changes, then responsiveness improves, but system stability deteriorates due to unnecessary thrashing between lock types

Engineering Contradiction:
Improvelock switching responsivenessVSAvoidlock type stability
Core Design Contradiction:
SpeedVSStability of the object's composition

Solution Approach 1:

The patent applies preliminary action by establishing threshold criteria (queue depth threshold and wait time threshold) that must be met before converting locks between performance levels. This pre-defined threshold mechanism prevents premature or transient switching, ensuring that only significant and sustained usage patterns trigger lock conversions, thereby maintaining stability while still responding to genuine workload changes.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system implements feedback through continuous monitoring of lock usage metrics (queue depth and wait time) and using this information to guide lock conversions. The lock manager receives feedback from actual usage patterns and adjusts lock types accordingly, creating a closed-loop system that balances responsiveness with stability by only switching when feedback indicates sustained needs.

Inventive Principle:
Principle #23Feedback

3Productivity

If all locks use high-performance types, then thread processing efficiency improves, but resource consumption increases due to unnecessary memory allocation

Engineering Contradiction:
Improvethread processing efficiencyVSAvoidmemory resource consumption
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The patent applies local quality by assigning different performance characteristics to different locks based on their specific usage patterns. Instead of uniformly applying high-performance locks to all threads, the system identifies individual locks that require high-performance handling (based on queue depth and wait time) and applies those selectively. This localized approach ensures high productivity where needed while conserving memory resources for locks that can use the more lightweight low-performance implementation.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS11829805B2Software lock management
Publication Date: 2023.11.28 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11829805B2 patent drawing
  • US11829805B2 patent drawing
  • US11829805B2 patent drawing

AI summary

A plurality of low-performance locks within a computing environment are monitored. It is identified that, during a time window, threads of one of the plurality of low-performance locks are in a lock queue for an average time that exceeds a time threshold. It is further identified that, during that same time window, the average queue depth of the one of the plurality of low-performance locks exceeds a depth threshold. The one of the plurality of low-performance locks is converted from a low-performance lock into a high-performance lock.