Task scheduling method, apparatus, device and medium

A task scheduling and task processing technology, which is applied to multi-programming devices, program control design, instruments, etc., can solve the problems of high thread switching overhead, waste of resources, and many processing tasks, and achieve the effect of taking into account resource costs and reasonable scheduling

Active Publication Date: 2019-01-01
APOLLO INTELLIGENT DRIVING (BEIJING) TECHNOLOGY CO LTD
View PDF4 Cites 14 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Due to the many and complex processing tasks of the unmanned vehicle system, the processor needs to switch threads frequently
[0004] It is necessary to protect and restore context information before and after thread switching, so frequent thread switching will lead to waste of resources
Due to the limited parallelism and execution resources of the on-board hardware itself, the above-mentioned traditional multi-threading scheme has shortcomings such as excessive thread switching overhead and insufficient task parallelism, which severely limits the performance and scalability of on-board computing.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Task scheduling method, apparatus, device and medium
  • Task scheduling method, apparatus, device and medium
  • Task scheduling method, apparatus, device and medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0030] figure 1 It is a flow chart of a task scheduling method provided by Embodiment 1 of the present invention. This embodiment is applicable to the processing task scheduling situation of an unmanned vehicle system. The method can be executed by a task scheduling device, which can use software and / or hardware, and can be configured in electronic devices that handle various processing tasks, such as in unmanned vehicles. The electronic device is provided with at least one processor, but optionally at least two processors, for parallel processing of processing tasks.

[0031] like figure 1 As shown, the method specifically includes:

[0032] S101. Obtain a processing task to be executed from the task queue by binding the main thread of the processor, and execute the main thread by the bound processor to execute the processing task.

[0033] In this embodiment of the present invention, the processor may be a CPU (Central Processing Unit, central processing unit). One threa...

Embodiment 2

[0046] figure 2 It is a flowchart of a task scheduling method provided by Embodiment 2 of the present invention. This embodiment is a refinement based on the foregoing embodiments, and describes in detail how to obtain a new trigger processing task and how to allocate the new trigger processing task to a standby thread. Specifically include the following steps:

[0047] S201. Obtain a processing task to be executed from the task queue by binding the main thread of the processor, and the bound processor executes the main thread to execute the processing task.

[0048] Specifically, the main thread traverses the tasks to be executed in the task queue, and executes the processing task when it finds a processing task to be executed. After the processing task is executed, the main thread traverses the processing tasks in the task queue again so as to find and execute the next processing task.

[0049] S202. Through the main thread, traverse each processing task in the task queu...

Embodiment 3

[0071] image 3 It is a structural diagram of a task scheduling device provided by Embodiment 3 of the present invention. The device includes: a processing task execution module 31 , a processing task acquisition module 32 , a spare thread allocation module 33 and a spare thread execution module 34 . in:

[0072] The processing task execution module 31 is configured to obtain a processing task to be executed from the task queue by binding the main thread of the processor, and execute the main thread by the bound processor to execute the processing task;

[0073] A processing task obtaining module 32, configured to obtain a new trigger processing task;

[0074] The standby thread allocation module 33 is configured to assign the new trigger processing task to the standby thread if the priority of the new trigger processing task is greater than or equal to the priority of the main thread currently executing the processing task;

[0075] The standby thread execution module 34 i...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The embodiment of the invention discloses a task scheduling method, an apparatus, a device and a medium. The method comprises the following steps: acquiring a processing task to be executed from a task queue by a main thread of a binding processor, and executing the main thread by the binding processor to execute the processing task; obtaining a new triggered processing task; assigning the newly triggered processing task to a standby thread if the priority of the newly triggered processing task is greater than or equal to the priority of the currently executed processing task of the main thread; an allocation processor being scheduled from at least one processor to execute the spare thread through a system core. By using this method, the processing tasks can be reasonably scheduled, and the resource cost of the unmanned vehicle system can be taken into account.

Description

technical field [0001] Embodiments of the present invention relate to computer task processing control technologies, and in particular, to a task scheduling method, device, equipment and medium. Background technique [0002] Unmanned vehicle system is an important application field of artificial intelligence. In the unmanned vehicle system, multiple functional modules corresponding to different functions are running, and each functional module is realized by a program, which may or may not have matching hardware devices. Typical functional modules include a dozen or even dozens of functional modules such as a driver module, a perception module, and a planning module. Different unmanned vehicle systems will have different functional modules due to different hardware devices or different software functions. [0003] Each functional module has a corresponding processing task. When the processing task obtains input data or receives an execution instruction in real time, it nee...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/48
CPCG06F9/4806G06F9/4881G06F9/5027
Inventor 张超陈卓姚卫锋夏黎明辛建康邓呈亮
Owner APOLLO INTELLIGENT DRIVING (BEIJING) TECHNOLOGY CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products