Police Threads Detect Dependence Violations

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

VSEngineering 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

Engineering Contradiction:
Improveexecution speedVSAvoidcorrectness of results
Core Design Contradiction:
ProductivityVSReliability

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

Inventive Principle:
Principle #10Preliminary action

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

Inventive Principle:
Principle #23Feedback

2Reliability

If runtime log comparison is performed to detect dependency violations, then correctness is improved, but execution overhead increases

Engineering Contradiction:
Improvedetection accuracyVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

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

Inventive Principle:
Principle #1Segmentation

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

Inventive Principle:
Principle #24Intermediary (Mediator)

3Difficulty of detecting and measuring

If police threads continuously monitor memory transactions, then dependency detection capability is improved, but resource consumption increases

Engineering Contradiction:
Improvedependency detection capabilityVSAvoidcomputational resource consumption
Core Design Contradiction:
Difficulty of detecting and measuringVSUse of energy by moving object

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

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS8151255B2Using police threads to detect dependence violations to reduce speculative parallelization overhead
Publication Date: 2012.04.03 ORACLE AMERICAN INC
  • US8151255B2 patent drawing
  • US8151255B2 patent drawing
  • US8151255B2 patent drawing

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.