Dynamic Thread Scheduling via Index Variables
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional context scheduling methods in multithreaded microcontroller or microprocessor systems often fail to achieve optimal scheduling due to the use of quasi-static priorities, leading to suboptimal thread execution and resource utilization.
Innovation Solution
A novel context scheduling method that selects threads for execution based on index variables, with the thread having the highest or lowest index value being prioritized, and allows the value of these index variables to change during execution, utilizing a hardware interpolator circuit to determine and adjust these values.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If conventional quasi-static priority-based context scheduling is used, then the scheduling control is simple and hardware implementation is straightforward, but the thread execution efficiency and processor resource utilization are suboptimal
Solution Approach 1:
The patent implements dynamic context scheduling by continuously updating index variables for each thread based on real-time execution metrics (such as execution time, priority changes, and resource usage). The scheduler dynamically recalculates scheduling decisions at each context switch point rather than using fixed static priorities, allowing the system to adapt to changing workload conditions and optimize processor utilization automatically.
Solution Approach 2:
The patent changes the scheduling parameter from fixed priority values to dynamic index variables that are continuously updated based on thread execution characteristics. These index variables are calculated using formulas that incorporate execution time, priority levels, and other performance metrics, transforming the scheduling decision-making process from static to adaptive parameter-based selection.
2Productivity
If more threads are kept simultaneously in the CPU core, then the resource utilization improves and pipeline efficiency increases, but the context switching overhead and management complexity increase
Solution Approach 1:
The patent implements a self-managing thread scheduling system where each thread maintains its own index variable that is automatically updated based on its execution history and current state. The hardware scheduler simply compares these pre-calculated index variables and selects the thread with the highest priority index, eliminating the need for complex software-based context management and reducing the overhead of tracking multiple thread states.
Solution Approach 2:
The patent replaces complex software-based context management mechanisms with a streamlined hardware implementation. The hardware scheduler uses simple comparison logic to evaluate index variables and perform context switches, substituting elaborate software scheduling algorithms with efficient hardware-level index comparison and thread selection mechanisms.
3Adaptability or versatility
If static priority scheduling is used, then the implementation is simple and predictable, but the system cannot adapt to changing workload conditions and achieve optimal throughput
Solution Approach 1:
The patent implements feedback-driven scheduling where the index variables are continuously updated based on feedback from thread execution performance. The system monitors execution time, thread priority changes, and resource usage patterns, then uses this feedback to recalculate index variables and adjust scheduling decisions, creating a closed-loop adaptive scheduling mechanism that responds to changing workload conditions.
Solution Approach 2:
The patent performs preliminary calculation and preparation of index variables before context switching occurs. By pre-calculating the index values based on accumulated execution data and thread characteristics, the system prepares scheduling decisions in advance, allowing for rapid adaptive response when context switches are triggered without requiring complex real-time computations during the actual switching event.
Data Source
AI summary
The invention relates to a device to be used with a scheduling method, and to a scheduling method, in particular a context scheduling method, comprising the steps of performing a scheduling for threads to be executed by a multithreaded processor, wherein the scheduling is performed as a function of index variables assigned to the threads. That thread whose index variable has the highest, or—in an alternative—the lowest value may be selected as the respective thread to be executed by the processor.


