Thread Grouping Scheduler for Multi-Core Lock Contention
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In modern computing systems, multi-threaded applications often face inefficiencies due to competition for hardware resources, leading to high lock overhead times and inefficient utilization of resources as threads wait for access.
Innovation Solution
A method and system that group threads based on lock overhead times, allocate processor cores accordingly, and assign time-quantums to each group to optimize resource utilization and reduce contention, ensuring efficient execution.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If threads are scheduled without grouping based on lock overhead, then the scheduling mechanism is simple, but resource utilization becomes inefficient due to contention
Solution Approach 1:
The patent segments threads into different groups based on their lock overhead characteristics. Thread groups are created with different priorities, where groups with lower lock overhead receive higher priority scheduling. This segmentation allows the system to differentiate resource allocation based on thread behavior, improving overall resource utilization without requiring complete redesign of the scheduling mechanism.
Solution Approach 2:
The patent changes the scheduling parameter by introducing lock overhead measurement as a key metric for thread grouping. By measuring and categorizing threads based on their lock overhead times, the system dynamically adjusts scheduling priorities. This parameter change enables the scheduler to make informed decisions about resource allocation, transforming the scheduling approach from simple FIFO to behavior-based priority scheduling.
2Loss of time
If threads compete for the same hardware resources without grouping, then resource allocation is uniform, but lock overhead time increases
Solution Approach 1:
The patent segments threads into priority groups based on lock overhead characteristics. Thread groups with lower lock overhead are assigned to higher priority queues, ensuring they receive preferential scheduling. This segmentation reduces the lock overhead time for critical threads by minimizing their waiting time in the schedule queue, while still maintaining manageable complexity through systematic grouping rather than individual thread management.
Solution Approach 2:
The patent implements a feedback mechanism where the scheduler continuously measures lock overhead times for threads and uses this information to dynamically adjust thread grouping and scheduling priorities. This feedback loop allows the system to adapt to changing thread behaviors, optimizing lock overhead reduction while maintaining reasonable management complexity through automated adjustment rather than manual configuration.
3Productivity
If all threads are assigned equal scheduling priority, then the scheduling algorithm is simple, but threads with low lock overhead wait unnecessarily
Solution Approach 1:
The patent changes the scheduling priority parameter based on measured lock overhead characteristics. Threads are assigned different priority levels corresponding to their lock overhead groups, with lower lock overhead threads receiving higher priorities. This parameter change enables the scheduler to differentiate between threads based on their resource contention behavior, improving execution efficiency for critical threads while maintaining algorithmic simplicity through rule-based priority assignment.
Solution Approach 2:
The patent performs preliminary classification of threads into priority groups based on their lock overhead characteristics before scheduling execution. By pre-categorizing threads according to their resource contention patterns, the system prepares the scheduling structure in advance, allowing efficient priority-based dispatch without complex real-time decision-making. This preliminary action reduces waiting time for high-priority threads while keeping the scheduling algorithm relatively simple.
Data Source
AI summary
In general, the invention relates to a non-transitory computer readable medium comprising instructions, which when executed by a processor perform a method. The method includes obtaining lock overhead times for a plurality of threads, generating a set of thread groups, wherein each of the plurality of threads is assigned to one of the plurality of thread groups based on the lock overhead times, allocating at least one core of a multi-core system to each of the plurality of thread groups, and assigning a time-quantum for each of the plurality of thread groups, wherein the time-quantum for each of the plurality of thread groups corresponds to an amount of time that threads in each of the plurality of thread groups can execute on the at least one allocated core.


