Address-Level Synchronization for Shared Data Objects
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Concurrent programming in computer systems faces challenges with traditional locking mechanisms, such as increased complexity, inefficiency, and overhead, especially when dealing with complex data structures and read-only operations, as well as the complexity introduced by transactional memory programming.
Innovation Solution
The implementation of address-level synchronization, where a master thread arbitrates access to shared data objects, allowing non-master threads to perform non-blocking read operations and log modifications, with multiple versions of the data object synchronized at session ends or beginnings, reducing the need for fine-grained locking and transactional complexity.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If traditional locking mechanisms are used to protect shared resources, then data integrity is maintained, but programming complexity increases and concurrency is reduced
Solution Approach 1:
The patent segments the shared data object into multiple versions (current version and read-only versions). This segmentation allows different threads to operate on different versions simultaneously, reducing the need for coarse-grained locking while maintaining data integrity. The versioning mechanism divides the protection scope into finer granularities without requiring complex lock management code.
Solution Approach 2:
The patent introduces a versioning intermediary layer between threads and the shared data object. Instead of threads directly competing for locks on the data object, they access different versions mediated by the synchronization mechanism. This intermediary abstracts the complexity of concurrent access control while ensuring data integrity through controlled version transitions.
2Productivity
If fine-grained locking is implemented to increase concurrency, then more threads can access different portions simultaneously, but programming complexity increases substantially
Solution Approach 1:
The data object is segmented into multiple versions rather than into fine-grained locked portions. This segmentation enables concurrency by allowing threads to access different versions simultaneously without requiring complex lock hierarchies or lock ordering protocols, thus maintaining high concurrency with simpler programming.
Solution Approach 2:
The patent creates copies of the data object in different versions. These copies enable concurrent access without requiring fine-grained locking mechanisms. Threads can read from stable copies while the current version is being modified, achieving high concurrency without the programming complexity of fine-grained locks.
3Device complexity
If locks are held for extended periods to perform multiple operations, then fewer lock acquisitions are needed, but blocked threads cannot make progress
Solution Approach 1:
The patent implements dynamic version management where the system automatically transitions between versions based on access patterns. When the current version becomes read-only, a new version is created dynamically. This dynamic versioning allows holding threads to continue operating on the current version while new threads access the read-only version, maintaining thread progress without requiring extended lock holdings.
Solution Approach 2:
The patent discards the current version by transitioning it to read-only status and recovering resources by creating a new current version. This allows the system to release write access efficiently while maintaining thread progress, as threads can continue on the old version while new operations proceed on the new version without being blocked.
4Reliability
If read-only operations are performed on locked data structures, then data integrity is ensured, but reading threads cannot make progress concurrently
Solution Approach 1:
The patent segments access rights by version, allowing multiple threads to simultaneously read from the same read-only version without requiring a lock. This segmentation of read access across multiple threads on the same version maintains data integrity while enabling concurrent reading operations to proceed without blocking, significantly improving reading throughput.
Solution Approach 2:
The read-only version serves multiple functions simultaneously: it provides a stable data snapshot for concurrent reading operations while the current version handles write operations. This multi-functionality allows the system to maintain data integrity for readers while enabling them to make progress concurrently without acquiring locks.
Data Source
AI summary
From among a plurality of threads accessing a shared data object, one thread acquires a “master” status to arbitrate among the requests of competing threads during a given session of data access to the shared data object. During the session, the master thread resolves any conflicts resulting from attempts to access or modify the shared data object by other threads, and only the master thread may apply modifications to the shared data object during the session. Meanwhile, during the session, non-master threads may perform non-blocking read operations on the shared data object. During a subsequent session, a different thread may acquire master status.


