Dynamic Lock Swapping for Task Queue Processing Delays

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In serialization operations, tasks holding locks for resources are often delayed waiting for additional resources, causing other tasks in the lock queue to be prevented from accessing the resource, leading to processing delays.

Innovation Solution

A method to determine when a task holding a lock should release it to a waiting task by checking conditions such as lock swappability, time limits, and resource availability, allowing the lock to be swapped among tasks in the queue to prevent prolonged delays.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a task holds a lock to a resource while waiting for additional resources, then the task can maintain its position in the resource access sequence, but other tasks in the lock queue are prevented from accessing the resource causing processing delays

Engineering Contradiction:
Improveresource access integrityVSAvoidtask processing throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent implements dynamic lock management where the lock holder can be changed based on real-time conditions. When the current lock holder is blocked waiting for additional resources, the system dynamically transfers the lock to the next waiter in queue, allowing the system to adapt its resource access pattern to current blocking conditions and improve overall throughput.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the lock holding state parameter by detecting when the current holder is blocked and transitioning the lock to a different task. This parameter change (from one task holding the lock to another task holding the lock) resolves the contradiction by maintaining resource access integrity while improving processing throughput.

Inventive Principle:
Principle #35Parameter changes

2Duration of action of moving object

If a task holds a lock for an extended period while waiting for additional resources, then the task can complete its operations when resources become available, but system performance deteriorates due to prolonged lockholding

Engineering Contradiction:
Improvelock holding durationVSAvoidsystem processing performance
Core Design Contradiction:
Duration of action of moving objectVSProductivity

Solution Approach 1:

The system performs preliminary detection of blocked conditions and proactively transfers the lock before the current holder can proceed. By detecting when a task is blocked on additional resources and transferring the lock in advance, the system prevents extended lockholding and maintains high processing performance.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system continuously monitors the state of lock holders and waiters, providing feedback about blocked conditions. When feedback indicates that the current lock holder is blocked, the system triggers a lock transfer to the next waiter, thereby preventing prolonged lockholding and maintaining system performance.

Inventive Principle:
Principle #23Feedback

3Stability of the object's composition

If other tasks must wait for the current lock holder to complete all operations and release the lock, then resource access order is maintained, but processing delays increase for queued tasks

Engineering Contradiction:
Improvelock queue orderVSAvoidtask waiting time
Core Design Contradiction:
Stability of the object's compositionVSLoss of time

Solution Approach 1:

The patent implements dynamic reordering of the lock queue based on blocking conditions. When the current lock holder is blocked, the system dynamically allows the next waiter to proceed, effectively reordering access without violating the fundamental FIFO principle. This dynamic adjustment reduces waiting time while maintaining overall queue stability.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the queue processing parameter by allowing out-of-order lock acquisition under specific blocking conditions. When the current holder is blocked, the parameter changes to allow the next waiter to acquire the lock, thereby reducing waiting time while maintaining the stability of the overall queue structure.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS12175304B2Determining when to release a lock from a first task holding the lock to grant to a second task waiting for the lock
Publication Date: 2024.12.24 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US12175304B2 patent drawing
  • US12175304B2 patent drawing
  • US12175304B2 patent drawing

AI summary

Provided are a computer program product, system, and method to determine whether a holding of a lock to the resource by a first task satisfies a condition and whether the lock is swappable. The lock is released from the first task and granted to a second task waiting in a queue for the lock in response to determining that the holding of the lock satisfies the condition and that the lock is swappable. The first task is indicated in the queue waiting for the lock in response to granting the lock to the second task.