Dynamic Lock Mode Switching for Parallel Transaction Efficiency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional parallel processing techniques, such as coarse-grained and fine-grained locking, face inefficiencies and complexity in managing shared data across multiple processing threads, leading to performance issues and data corruption.
Innovation Solution
A system that allows switching between centralized and distributed lock modes based on metadata, enabling multiple processing threads to access and modify shared data without corruption, by using global and segment version information and lock bits to manage locks efficiently.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If coarse-grained locking is used to manage shared data, then implementation simplicity is improved, but parallel processing performance deteriorates due to limitations on simultaneous execution
Solution Approach 1:
The patent segments the shared data into multiple regions, each protected by its own fine-grained lock. This allows different processing threads to access different regions simultaneously, improving parallel processing performance while maintaining implementation simplicity through a systematic locking approach.
Solution Approach 2:
The patent dynamically selects between coarse-grained and fine-grained locking modes based on operating conditions and metadata. This dynamic adaptation allows the system to optimize for either implementation simplicity or parallel processing performance depending on the current workload and data access patterns.
2Productivity
If fine-grain locking is used to enable parallel execution, then parallel processing performance is improved, but implementation complexity worsens
Solution Approach 1:
The patent creates a universal locking mechanism that can operate in both coarse-grained and fine-grained modes. This multi-functional locking system reduces implementation complexity by providing a single framework that adapts to different performance requirements rather than requiring separate implementations.
Solution Approach 2:
The patent changes the granularity parameter of the locking mechanism based on operating conditions. By adjusting this parameter, the system can switch between coarse-grained and fine-grained locking, managing implementation complexity while maintaining high parallel processing performance when needed.
3Adaptability or versatility
If dynamic switching between lock modes is implemented, then adaptability to operating conditions is improved, but system complexity worsens
Solution Approach 1:
The patent implements a self-service locking system that automatically selects between coarse-grained and fine-grained modes based on metadata and operating conditions. This automation reduces system complexity by eliminating the need for manual configuration or complex control logic, while maintaining high adaptability to different operating scenarios.
4Productivity
If lock mode switching is performed during thread execution, then execution efficiency is improved, but risk of data corruption worsens
Solution Approach 1:
The patent performs preliminary actions by establishing the appropriate lock mode before thread execution begins. Lock mode switching is performed outside of active transaction regions, ensuring that data access patterns are already established and protected before any modifications occur. This preliminary setup maintains execution efficiency while preventing data corruption during mode transitions.
Data Source
AI summary
A computer system includes multiple processing threads that execute in parallel. The multiple processing threads have access to a global environment including different types of metadata enabling the processing threads to carry out simultaneous execution depending on a currently selected type of lock mode. A mode controller monitoring the processing threads initiates switching from one type of lock mode to another depending on current operating conditions such as an amount of contention amongst the multiple processing threads to modify the shared data. The mode controller can switch from one lock mode another regardless of whether any of the multiple processes are in the midst of executing a respective transaction. A most efficient lock mode can be selected to carry out the parallel transactions. In certain cases, switching of lock modes causes one or more of the processing threads to abort and retry a respective transaction according to the new mode.


