Race Condition Detection via API Access Contracts

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improveparallel processing capabilityVSAvoidprogram stability
Core Design Contradiction:
ProductivityVSReliability

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

Inventive Principle:
Principle #10Preliminary action

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

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If synchronization safeguards are implemented to prevent invalid accesses, then reliability is improved, but device complexity increases due to monitoring and validation mechanisms

Engineering Contradiction:
Improveaccess validationVSAvoidsynchronization mechanism complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

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

Inventive Principle:
Principle #6Universality (Multi-functionality)

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

Inventive Principle:
Principle #25Self-service

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

Engineering Contradiction:
Improverace condition detectionVSAvoidmonitoring overhead
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

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

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS9910715B2Synchronization safeguards for detecting race conditions in multithreaded programs
Publication Date: 2018.03.06 SAP SE
  • US9910715B2 patent drawing
  • US9910715B2 patent drawing
  • US9910715B2 patent drawing

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.