Task Scheduling via Standby Thread Dispatch

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In unmanned vehicle systems, the frequent switching among threads in multi-core processors leads to resource wastage due to the need for context information protection and restoration, resulting in excessive overhead and limited task parallelism, which hampers performance and scalability.

Innovation Solution

A method where a main thread assigns newly triggered processing tasks with higher priority to a standby thread, utilizing the system kernel to dispatch processors based on task priority, thereby reducing unnecessary thread switching and optimizing resource allocation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If frequent thread switching is performed in multi-core processors to execute processing tasks, then task parallelism and processor utilization are improved, but context information protection and restoration overhead increases, leading to resource wastage

Engineering Contradiction:
Improvetask parallelismVSAvoidcontext information overhead
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The patent creates a standby thread in advance before processing tasks arrive. When a high-priority task needs to be executed, the system can switch to the pre-created standby thread without creating a new thread, thereby reducing the overhead of thread creation and context switching while maintaining the ability to handle multiple tasks efficiently

Inventive Principle:
Principle #10Preliminary action

2Adaptability or versatility

If thread switching is performed to execute processing tasks, then task scheduling flexibility is improved, but context information protection and restoration is required, resulting in excessive overhead

Engineering Contradiction:
Improvetask scheduling flexibilityVSAvoidcontext information management
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent extracts the high-priority task execution function from the main thread by creating a separate standby thread. This allows the main thread to continue executing lower-priority tasks while the standby thread handles high-priority tasks independently, reducing the complexity of context switching and information protection by minimizing the frequency of switches between different task contexts

Inventive Principle:
Principle #2Taking out (Extraction)

3Ease of operation

If existing multi-core system kernel allocates time slices based on task priority, then task execution is simplified, but high-priority tasks may experience delays when main threads are busy

Engineering Contradiction:
Improvetask execution simplicityVSAvoidhigh-priority task execution delay
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The standby thread acts as an intermediary between the main thread and the high-priority task. When a high-priority task arrives and the main thread is busy, the task is assigned to the standby thread instead of waiting for the main thread to finish. This intermediary approach ensures high-priority tasks are executed promptly without complicating the overall task execution mechanism

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11294714B2Method and apparatus for scheduling task, device and medium
Publication Date: 2022.04.05 APOLLO INTELLIGENT DRIVING (BEIJING) TECHNOLOGY CO LTD
  • US11294714B2 patent drawing
  • US11294714B2 patent drawing
  • US11294714B2 patent drawing

AI summary

The present disclosure provides a method and an apparatus for scheduling a task, a device and a medium. The method includes: obtaining a processing task to be executed from a task queue via a main thread bound to a processor, in which the processor is configured to execute the main thread, to execute the processing task; obtaining a newly triggered processing task; in response to determining that a priority of the newly triggered processing task is greater than or equal to a priority of the processing task executed on the main thread, assigning the newly triggered processing task to a standby thread; and dispatching and assigning a processor from at least one processor through the system kernel to execute the standby thread.