Thread Scheduling Rotation for Multiprocessor Fairness
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional thread scheduling in multiprocessor computer systems often results in non-uniform distribution of threads to processors, leading to unfairness in thread execution.
Innovation Solution
A method where the operating system determines whether to move threads to a later position in the thread list before assigning them to processors, using a random number generation to achieve thread rotation and improve fairness, while ensuring minimal impact on system performance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If threads are assigned sequentially from the beginning of the thread list to processors, then the scheduling process is simple and fast, but the distribution of threads to processors becomes non-uniform and unfair
Solution Approach 1:
The patent introduces dynamic adjustment to the static thread list by randomly moving threads to different positions before assignment. This dynamic shuffling ensures that threads are not always assigned in the same sequential order, thereby achieving more uniform distribution across processors while maintaining the simplicity of the overall scheduling mechanism.
Solution Approach 2:
The patent changes the position parameter of threads in the thread list by randomly moving threads to different positions before assignment. This parameter change ensures that the same thread can be assigned to different processors in different scheduling cycles, improving distribution uniformity without complicating the scheduling process.
2Manufacturing precision
If threads are shuffled randomly to improve distribution fairness, then thread distribution uniformity improves, but system performance may be affected
Solution Approach 1:
The patent applies partial shuffling rather than complete randomization of the thread list. By selectively moving only some threads to different positions, the system achieves improved distribution fairness while minimizing the disruption to thread execution patterns and reducing the impact on system performance.
Solution Approach 2:
The patent uses a simple random number generation mechanism to determine thread movements, which is computationally inexpensive. This lightweight approach to thread shuffling provides the benefits of improved distribution fairness without imposing significant computational overhead that would degrade system performance.
Data Source
AI summary
One embodiment disclosed relates to a method of distributing threads to processors of a multiprocessor computer system. Prior to assigning a thread at a current position in a thread list to a current processor number, a determination is made as to whether the thread is to be moved to a later position in the thread list. If the determination is made that the thread is to be moved, then the thread is moved to the later position in the thread list. On the other hand, if the determination is made that the thread is not to be moved, then the thread is assigned to the current processor number. Other embodiments are also disclosed.


