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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com