Task Scheduler for Multicore Systems with Core Affinity

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In multicore computers, efficiently distributing tasks across processing cores to maintain equal execution load while balancing computation resources is challenging, as existing methods struggle to effectively prioritize and manage new and suspended tasks.

Innovation Solution

Implementing a scheduling system with separate queues for new and suspended tasks per core, where suspended tasks have priority over new tasks within their core's queues, and new tasks can be executed by stealing from other cores, ensuring that suspended tasks are resumed by the core that originally executed them, and utilizing a scheduler with separate instances for each core to manage task execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If tasks are distributed across cores to maintain equal execution load, then productivity is improved, but device complexity increases due to the need for load balancing computation resources

Engineering Contradiction:
Improvetask execution efficiencyVSAvoidscheduling system complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The scheduling system is segmented into separate queue structures for each core (new task queues and suspended task queues), allowing independent management of different task types. This segmentation simplifies the overall scheduling complexity by dividing the monolithic scheduling problem into smaller, manageable per-core queue operations.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Each core has its own dedicated queues with specific characteristics (new tasks vs. suspended tasks), creating local quality differences in task management. This allows each core to optimize its own task execution independently while maintaining overall system productivity through localized scheduling decisions.

Inventive Principle:
Principle #3Local quality

2Reliability

If suspended tasks are prioritized over new tasks within a core's queues, then reliability is improved by maintaining core affinity, but productivity may worsen due to potential load imbalance across cores

Engineering Contradiction:
Improvecore affinity maintenanceVSAvoidoverall task completion rate
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The scheduler acts as an intermediary that mediates between the need to maintain core affinity (by prioritizing suspended tasks in local queues) and the need to balance load across cores. It selectively pops tasks from appropriate queues based on current system state, resolving the conflict between reliability and productivity.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The scheduling system dynamically adjusts task selection based on real-time conditions. While suspended tasks are generally prioritized to maintain core affinity, the system can flexibly switch to popping new tasks from other cores' queues when load balancing becomes necessary, making the scheduling behavior adaptive rather than rigid.

Inventive Principle:
Principle #15Dynamics

3Productivity

If new tasks can be stolen from other cores, then productivity is improved through better resource utilization, but device complexity increases due to inter-core task management

Engineering Contradiction:
Improveresource utilizationVSAvoidinter-core coordination complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

Each core's scheduler instance can independently steal new tasks from other cores' queues when its own queues are empty or when load balancing is needed. This self-service approach allows cores to autonomously balance their own workloads without complex centralized coordination, improving productivity while limiting the growth of system complexity.

Inventive Principle:
Principle #25Self-service

4Ease of operation

If separate scheduler instances are assigned to each core, then ease of operation is improved through decentralized control, but device complexity increases due to multiple scheduler instances

Engineering Contradiction:
Improvedecentralized task managementVSAvoidnumber of scheduler instances
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

Each scheduler instance, while dedicated to a specific core, implements a universal scheduling algorithm that handles both new tasks and suspended tasks using the same queue-popping logic. This multi-functionality allows each instance to independently manage its core's workload without requiring different scheduling mechanisms, simplifying the overall system despite having multiple instances.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS8549524B2Task scheduler for cooperative tasks and threads for multiprocessors and multicore systems
Publication Date: 2013.10.01 SAP SE
  • US8549524B2 patent drawing
  • US8549524B2 patent drawing
  • US8549524B2 patent drawing

AI summary

In a computer system with a multi-core processor, the execution of tasks is scheduled in that a first queue for new tasks and a second queue for suspended tasks are related to a first core, and a third queue for new tasks and a fourth queue for suspended tasks are related to a second core. The tasks have instructions, the new tasks are tasks where none of the instructions have been executed by any of the cores, and the suspended tasks are tasks where at least one of the instructions has been executed by any of the cores. New tasks are popped from the first queue to the first core; and in case the first queue being empty, tasks are popped to the first queue in the following preferential order: suspended tasks from the second queue, new task from the third queue, and new tasks from the fourth queue.