Race Condition Detection via API Access Contracts
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Debugging multithreaded programs is challenging due to concurrent access issues to shared resources, leading to invalid states, crashes, and invalid results, as existing technologies fail to effectively prevent or detect invalid accesses.
Innovation Solution
Monitoring accesses to shared data structures through API methods and implementing pre-defined synchronization safeguards to determine valid or invalid accesses, preventing invalid accesses and providing data for reporting and debugging purposes.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If multithreaded programs access shared resources concurrently without synchronization safeguards, then productivity is improved through parallel processing, but reliability deteriorates due to invalid internal states and program crashes
Solution Approach 1:
The patent applies preliminary action by establishing access contracts and synchronization safeguards before threads access shared resources. The system defines valid access patterns in advance through API contracts, and checks these contracts before allowing access to shared data structures, preventing race conditions before they occur
Solution Approach 2:
The patent uses access contracts as an intermediary mechanism between multiple threads and shared resources. These contracts define the rules for valid access and act as a mediator that validates each access attempt, ensuring threads follow proper synchronization protocols without direct conflict
2Reliability
If synchronization safeguards are implemented to prevent invalid accesses, then reliability is improved, but device complexity increases due to monitoring and validation mechanisms
Solution Approach 1:
The patent achieves universality by creating a general-purpose access contract framework that can be applied to any shared data structure through standardized API methods. Rather than implementing separate synchronization mechanisms for each resource, a single contract-based system validates all accesses uniformly, reducing overall complexity
Solution Approach 2:
The system applies self-service by having each API method automatically check its associated access contract before proceeding with the operation. The validation is built into the API layer itself, so the system self-regulates access to shared resources without requiring external monitoring or complex control logic
3Reliability
If access monitoring is implemented to detect invalid accesses, then reliability is improved through early detection of race conditions, but use of energy increases due to continuous monitoring overhead
Solution Approach 1:
The patent applies partial action by monitoring only the specific access patterns defined in the contracts, rather than continuously monitoring all possible thread activities. The system checks contract compliance at API boundary points, monitoring exactly what is necessary to detect race conditions without excessive overhead
Data Source
AI summary
Each of a plurality of accesses by a multithreaded program to shared data structures stored within a database is monitored. The accesses are implemented by varying application programming interface (API) methods. Thereafter, it is determined, based on pre-defined synchronization safeguards, whether each of the accesses is valid or invalid based on the utilized corresponding API method. Those accesses to the shared data structures that were determined to be valid are allowed to proceed while those accesses to the shared data structures that were determined to be invalid are prevented from proceeding.


