Adaptive Self-Tuning Locking Mechanism for Transactional Middleware

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Transactional middleware systems face performance challenges in managing concurrent transactions due to inefficiencies in lock mechanisms, particularly in high-performance environments with multiple processors, where existing locking mechanisms do not adapt effectively to changing conditions, leading to suboptimal throughput and resource management.

Innovation Solution

An adaptive self-tuning locking mechanism that employs test-and-set operations and dynamically adjusts the spin count based on failure rates and CPU idle ratios, using both simple and adaptive algorithms to optimize lock acquisition in a transactional middleware environment, ensuring efficient resource allocation and handling of concurrent transactions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If a fixed spin count is used for lock acquisition, then the locking mechanism is simple to implement, but it cannot adapt to changing system conditions leading to suboptimal throughput

Engineering Contradiction:
Improveadaptability to changing conditionsVSAvoidlocking mechanism complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent implements dynamic adjustment of the spin count parameter based on real-time system conditions. The locking mechanism transitions from a static fixed spin count to a dynamic parameter that automatically adapts to changing workload patterns, CPU utilization, and lock acquisition success rates, thereby resolving the contradiction between adaptability and complexity.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent introduces feedback mechanisms where the system monitors lock acquisition success rates, CPU idle ratios, and spin failure rates. This feedback information is used to automatically adjust the spin count parameter, enabling the locking mechanism to adapt to changing conditions while maintaining reasonable complexity through automated control.

Inventive Principle:
Principle #23Feedback

2Reliability

If the spin count is increased to reduce spin failures, then lock acquisition reliability improves, but CPU resource consumption increases

Engineering Contradiction:
Improvelock acquisition reliabilityVSAvoidCPU resource consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent dynamically changes the spin count parameter based on monitored system conditions such as lock acquisition success rates and CPU utilization. When spin failures are detected, the system increases the spin count to improve reliability. When CPU resources are abundant and lock acquisition is successful, the system reduces the spin count to minimize resource consumption, thus resolving the contradiction between reliability and energy usage.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The locking mechanism performs self-adjustment by automatically monitoring its own performance metrics (spin failure rates, lock acquisition success) and autonomously modifying the spin count parameter without external intervention. This self-service capability allows the system to optimize the balance between reliability and resource consumption based on real-time conditions.

Inventive Principle:
Principle #25Self-service

3Reliability

If spin failures are handled by increasing retries, then lock acquisition success improves, but transaction processing time increases

Engineering Contradiction:
Improvelock acquisition successVSAvoidtransaction processing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent implements dynamic adjustment of the maximum retry count based on real-time monitoring of lock acquisition success rates and system workload. When lock acquisition failures are detected, the system increases the maximum retry count to improve reliability. When the system is under heavy load and transactions are time-sensitive, the system adjusts the retry count to minimize processing time, thus resolving the contradiction between reliability and time loss.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system uses feedback from monitoring lock acquisition outcomes and transaction processing metrics to automatically adjust the maximum retry count parameter. This feedback loop enables the locking mechanism to adapt to changing conditions and optimize the balance between lock acquisition success and transaction processing time without manual intervention.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS9846603B2System and method for supporting an adaptive self-tuning locking mechanism in a transactional middleware machine environment
Publication Date: 2017.12.19 ORACLE INT CORP
  • US9846603B2 patent drawing
  • US9846603B2 patent drawing
  • US9846603B2 patent drawing

AI summary

A system and method can support an adaptive self-tuning locking mechanism in a transactional middleware machine environment. The system allows each process in a plurality of processes to perform one or more test-and-set (TAS) operations in order to obtain a lock for data in a shared memory. Then, the system can obtain a spin failed rate for a current tuning period, wherein a spin failure happens when a process fails to obtain the lock after performing a maximum number of rounds of TAS operations that are allowed. Furthermore, the system can adaptively configuring a spin count for a next tuning period based on the obtained spin failure rate, wherein the spin count specifies the maximum number of rounds of TAS operations that are allowed for the next tuning period.