Police Threads Detect Dependence Violations
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for parallelizing applications in distributed computer systems face challenges in detecting data dependencies, particularly with memory accesses that are indeterminable at compile time, leading to potential dependency violations and inefficient execution.
Innovation Solution
The method involves executing sections of an application in parallel using co-threads, logging memory transactions, and comparing logs to detect dependence violations dynamically at runtime, allowing for early identification and minimization of execution costs associated with such violations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If speculative parallelization is performed without runtime dependency checking, then execution speed is improved, but dependency violations occur leading to incorrect results
Solution Approach 1:
The patent performs preliminary dependency analysis at compile time by analyzing loop structures and memory access patterns. The compiler identifies potential dependency violations and inserts instrumentation code that will check for actual dependencies at runtime, allowing speculative parallelization to proceed while maintaining correctness through pre-prepared detection mechanisms
Solution Approach 2:
The patent implements runtime feedback mechanisms where police threads continuously monitor memory transactions and compare logs from different co-threads. When a dependency violation is detected, the system provides feedback to rollback or adjust the parallelization, ensuring correctness while maintaining high execution speed through continuous monitoring
2Reliability
If runtime log comparison is performed to detect dependency violations, then correctness is improved, but execution overhead increases
Solution Approach 1:
The patent segments the dependency detection function into separate police threads that are distinct from the computational co-threads. Each police thread is responsible for monitoring specific memory transactions and comparing logs, dividing the complex detection task into manageable independent units that can operate in parallel without interfering with the main computation
Solution Approach 2:
The patent introduces log structures as intermediary data structures that store memory transaction information. Instead of directly comparing memory states between threads, the system uses logs as intermediaries that capture and organize transaction data, making dependency detection more efficient and less complex by working with structured log data rather than raw memory states
3Difficulty of detecting and measuring
If police threads continuously monitor memory transactions, then dependency detection capability is improved, but resource consumption increases
Solution Approach 1:
The patent implements partial monitoring where police threads focus on monitoring only the specific memory transactions and locations that are relevant to the parallelized loops. Rather than monitoring all memory access in the system, the system performs partial action by concentrating monitoring resources on the critical sections where dependency violations are most likely to occur, reducing overall resource consumption while maintaining effective detection capability
Data Source
AI summary
A method for detecting a dependence violation in an application that involves executing a plurality of sections of the application in parallel, and logging memory transactions that occur while executing the plurality of sections to obtain a plurality of logs and a plurality of temporary results, where the plurality of logs is compared while executing the plurality of sections to determine whether the dependence violation exists.


