Multi-threaded Metadata Synchronization via Segmented Caches
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional relational database management systems face performance bottlenecks due to the use of a single synchronization mechanism, which prevents multiple threads from concurrently accessing metadata structures, leading to inefficiencies in highly concurrent systems.
Innovation Solution
Implementing a plurality of synchronization mechanisms coupled with compare and swap (CAS) operations to allow multiple threads to access metadata structures concurrently, ensuring thread safety and reducing the need for exclusive access to metadata caches.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a single synchronization mechanism (spinlock or mutex) is used to protect the global cache and all local caches, then thread safety is ensured, but multiple threads cannot concurrently operate on metadata structures
Solution Approach 1:
The patent divides the single global synchronization mechanism into multiple separate synchronization mechanisms, each associated with a specific cache (global cache or local cache). This segmentation allows different threads to acquire different synchronization mechanisms simultaneously, enabling concurrent access to different metadata structures while maintaining thread safety within each cache boundary.
2Reliability
If a single synchronization mechanism is used to protect all caches, then exclusive access is guaranteed, but performance becomes a bottleneck in highly concurrent systems
Solution Approach 1:
The patent segments the monolithic synchronization mechanism into multiple finer-grained synchronization mechanisms distributed across different caches. This allows exclusive access to be maintained within each cache while permitting concurrent access across multiple caches, thereby eliminating the performance bottleneck in highly concurrent systems.
Solution Approach 2:
Each cache has its own synchronization mechanism with local scope, allowing threads to acquire synchronization only for the specific cache they need to access. This local quality approach ensures exclusive access where needed while minimizing the impact on other threads accessing different caches, thus improving overall system performance.
3Productivity
If multiple threads access metadata structures concurrently, then system throughput increases, but ensuring thread safety becomes more complex
Solution Approach 1:
The patent reduces synchronization complexity by segmenting the protection scope into multiple small, independent synchronization mechanisms rather than one large complex mechanism. Each mechanism protects a specific cache, making the synchronization logic simpler and more manageable while still enabling concurrent access across multiple caches.
Data Source
AI summary
Synchronization of metadata structures in a multi-threaded system includes receiving, by a first thread of a processing device, a request for a metadata structure located in a first cache associated with an object, obtaining, by the first thread of the processing device, a synchronization mechanism associated with the first cache, holding, by the first thread of the processing device, the metadata structure associated with the object, receiving, by a second thread of the processing device, a request for the metadata structure in a second cache associated with the object, obtaining, by the second thread of the processing device, a synchronization mechanism associated with the second cache and informing the second thread of the processing device that the metadata structure associated with the object is not available.


