Thread Latency Analysis via Preemption and Run-Queue Metrics

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Thread latency occurs due to unintentional starvation of threads for access to resources, leading to performance bottlenecks in multi-processor systems, as existing methods fail to effectively analyze and address the factors contributing to this latency.

Innovation Solution

A method and apparatus that collect and analyze statistical data on thread in-run-queue time and preempted time to evaluate thread latency, allowing for identification of preemption and power management-related issues, and provide insights for optimizing thread priority assignment and power management policies.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If threads are scheduled based on priority in a multi-processor system, then resource allocation efficiency is improved, but thread latency increases due to unintentional starvation and preemption

Engineering Contradiction:
Improveresource allocation efficiencyVSAvoidthread latency
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent implements a feedback mechanism by collecting statistical data on thread preemption and run-queue times, then using this information to evaluate and adjust scheduling decisions. The system monitors thread latency metrics and feeds this information back to the scheduler to optimize resource allocation while reducing thread starvation and latency

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent replaces traditional priority-based scheduling mechanisms with a data-driven evaluation system that uses statistical analysis of thread behavior patterns. Instead of relying solely on static priority assignments, the system substitutes mechanical scheduling with intelligent decision-making based on collected performance data

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Use of energy by moving object

If power management policies are applied to hardware resources, then energy consumption is reduced, but thread execution time increases due to preemption and resource availability issues

Engineering Contradiction:
Improvehardware energy consumptionVSAvoidthread execution time
Core Design Contradiction:
Use of energy by moving objectVSDuration of action of moving object

Solution Approach 1:

The patent applies dynamic adjustment to power management policies by continuously monitoring thread execution patterns and adapting resource allocation in real-time. The system dynamically balances power savings with execution time requirements by adjusting CPU frequency, voltage, and resource allocation based on current workload characteristics and thread priorities

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes power management parameters such as CPU frequency, voltage levels, and resource allocation settings based on analyzed thread latency data. By adjusting these parameters dynamically according to actual thread behavior patterns, the system optimizes both energy efficiency and execution performance

Inventive Principle:
Principle #35Parameter changes

3Productivity

If statistical data collection is implemented to analyze thread behavior, then system performance optimization is enabled, but computational overhead increases

Engineering Contradiction:
Improvesystem performance optimizationVSAvoidcomputational overhead
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The patent implements partial data collection by focusing only on critical thread metrics such as preemption events and run-queue times, rather than collecting complete traces of all thread activities. This selective approach provides sufficient information for performance optimization while minimizing the computational overhead of data collection and processing

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS9588811B2Method and apparatus for analysis of thread latency
Publication Date: 2017.03.07 MEDIATEK INC
  • US9588811B2 patent drawing
  • US9588811B2 patent drawing
  • US9588811B2 patent drawing

AI summary

A method for analysis of thread latency includes: determining a thread of interest; computing a summation of time periods in which the thread of interest stays in a run queue to determine a thread in-run-queue time; computing a summation of time periods in which the thread of interest is preempted by other threads to determine a thread preempted time; and evaluating thread latency of the thread of interest according to the thread preempted time to the thread in-run-queue time.