Lock Variable Segmentation for Concurrent Critical Section Execution
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing computing devices face sub-optimal performance due to unnecessary restrictions on the execution of program code caused by critical sections, where locks prevent concurrent execution of instructions across entities, even when these instructions do not perform externally accessible operations.
Innovation Solution
The implementation of a mechanism where entities can hold a lock variable with a TAKEN_FOR_READING value in a local cache while the lower-level cache holds a FREE value, allowing multiple entities to concurrently execute critical sections protected by the same lock, while maintaining the appearance that they are not executed concurrently by preventing externally accessible operations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If locks are used to prevent concurrent execution of critical sections, then data coherence and conflict prevention are improved, but execution performance and productivity deteriorate due to unnecessary restrictions
Solution Approach 1:
The patent segments the lock variable into two separate variables: a first lock variable stored in the lower-level cache and a second lock variable stored in the local cache. This segmentation allows different entities to read from the first lock variable while writing to the second lock variable, enabling concurrent execution without compromising data coherence. The segmentation resolves the contradiction by allowing multiple entities to execute critical sections simultaneously while maintaining the appearance of mutual exclusion through the coordinated use of both lock variables.
Solution Approach 2:
The patent implements a copy of the lock variable in the local cache (second lock variable) that mirrors the state of the original lock variable in the lower-level cache (first lock variable). This copying mechanism allows entities to hold a local copy with a TAKEN_FOR_READING value while the lower-level cache maintains the FREE value, enabling concurrent execution. The copy is updated only when necessary to maintain consistency, thus improving performance while preserving the reliability of the locking mechanism.
2Reliability
If locks prevent concurrent execution of critical sections, then conflict prevention is improved, but device complexity increases due to additional lock management mechanisms
Solution Approach 1:
The patent divides the lock management into two independent parts by using separate lock variables in different cache levels. The first lock variable in the lower-level cache maintains the traditional locking semantics for conflict prevention, while the second lock variable in the local cache handles the concurrency control. This segmentation reduces the complexity of the overall lock management mechanism by allowing each variable to serve a specific purpose without requiring complex coordination logic.
3Reliability
If critical sections are executed sequentially, then data coherence is maintained, but execution time and loss of time increase
Solution Approach 1:
The patent introduces dynamic behavior to the lock variable management by allowing entities to hold the lock variable with a TAKEN_FOR_READING value in the local cache without immediately updating the lower-level cache. This dynamic approach enables concurrent execution of critical sections while maintaining data coherence through selective updates. The system dynamically adjusts the state of lock variables based on the execution context, allowing multiple entities to execute simultaneously when safe and maintaining sequential execution when necessary to preserve coherence.
Data Source
AI summary
In the described embodiments, entities in a computing device selectively write specified values to a lock variable in a local cache and one or more lower levels of a memory hierarchy to enable multiple entities to enable the concurrent execution of corresponding critical sections of program code that are protected by a same lock.


