Leaky-Bucket Thread Scheduler for Microprocessor Priority Control
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Multithreaded processors face challenges in optimizing thread scheduling policies to allocate processing power effectively among multiple threads, particularly in applications requiring different processing rates and resolutions, leading to inefficiencies in instruction execution and increased latency due to cache misses and pipeline stalls.
Innovation Solution
A parameterized leaky-bucket thread scheduler is employed to dynamically update workload levels and generate instruction dispatch priorities for each thread, allowing for tailored allocation of processing resources based on specified workload ranges and quality-of-service requirements.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If a fixed priority thread scheduler is used, then the scheduling policy is simple and easy to implement, but it cannot adapt to different quality-of-service requirements and workload ranges of threads
Solution Approach 1:
The patent implements a dynamic priority scheduler that adjusts thread priorities based on real-time workload levels and quality-of-service requirements. The scheduler transitions from a fixed priority model to a dynamic one where priorities are continuously updated according to measured workload parameters, allowing the system to adapt to changing conditions without requiring complex manual reconfiguration.
Solution Approach 2:
The patent introduces a feedback mechanism where the scheduler monitors actual thread workload levels and uses this information to adjust priorities. The feedback loop compares measured workload against target quality-of-service parameters and automatically modifies scheduling decisions, enabling the system to self-optimize based on real-time performance data.
2Productivity
If thread priorities are dynamically adjusted based on workload levels, then quality-of-service requirements can be met, but the overhead of workload measurement and priority updates increases
Solution Approach 1:
The patent implements self-service mechanisms where threads automatically report their own workload levels without requiring external monitoring or intervention. Each thread maintains its own workload counter and priority adjustments are performed autonomously based on predefined policies, eliminating the need for a complex external management system and reducing overall scheduler overhead.
Solution Approach 2:
The patent changes the parameter representation from complex priority vectors to simplified workload level integers. By mapping complex quality-of-service requirements to discrete workload levels (e.g., level 0-3), the system reduces the computational complexity of priority calculations while maintaining the ability to differentiate between various service quality requirements.
3Productivity
If multiple threads share processing resources with different quality requirements, then resource allocation can be optimized, but cache misses and pipeline stalls increase due to frequent context switching
Solution Approach 1:
The patent performs preliminary actions by pre-calculating and publishing thread priority orders based on quality-of-service requirements before actual execution begins. This allows the execution pipeline to anticipate resource allocation patterns and prepare accordingly, reducing the impact of context switching on pipeline stability while still enabling optimized resource sharing among threads with different quality requirements.
Data Source
AI summary
A leaky-bucket style thread scheduler for scheduling concurrent execution of multiple threads in a microprocessor is provided. The execution pipeline notifies the scheduler when it has completed instructions. The scheduler maintains a virtual water level for each thread and decreases it each time the execution pipeline executes an instruction of the thread. The scheduler includes an instruction execution rate for each thread. The scheduler increases the virtual water level based on the requested rate per a predetermined number of clock cycles. The scheduler includes virtual water pressure parameters that define a set of virtual water pressure ranges over the height of the virtual water bucket. When a thread's virtual water level moves from one virtual water pressure range to the next higher range, the scheduler increases the instruction issue priority for the thread; conversely, when the level moves down, the scheduler decreases the instruction issue priority for the thread.


