Dynamic Lock Swapping for Task Queue Processing Delays
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
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
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.
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.
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
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.
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.
Data Source
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.


