CN114443244A - Task execution method, device and equipment - Google Patents

Task execution method, device and equipment Download PDF

Info

Publication number
CN114443244A
CN114443244A CN202111629914.0A CN202111629914A CN114443244A CN 114443244 A CN114443244 A CN 114443244A CN 202111629914 A CN202111629914 A CN 202111629914A CN 114443244 A CN114443244 A CN 114443244A
Authority
CN
China
Prior art keywords
task
executed
priority
tasks
group
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111629914.0A
Other languages
Chinese (zh)
Inventor
张慧林
王明明
马恒
吴睿振
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Original Assignee
Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd filed Critical Shandong Yunhai Guochuang Cloud Computing Equipment Industry Innovation Center Co Ltd
Priority to CN202111629914.0A priority Critical patent/CN114443244A/en
Publication of CN114443244A publication Critical patent/CN114443244A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/484Precedence

Abstract

The application discloses a task execution method, a device and equipment, comprising the following steps: acquiring a task to be executed, and dividing the task to be executed into projects of a task group corresponding to a first priority; wherein each of said task groups has a unique corresponding said first priority; respectively determining task margins of the tasks to be executed corresponding to the projects of the task group, and reordering the tasks to be executed corresponding to the projects according to the task margins to obtain a reordered task queue corresponding to the task group; the task margin represents the execution urgency degree of the task to be executed; and polling the task group in a priority polling mode to determine the task to be executed from the corresponding reordering task queue, and executing the task to be executed by using a work engine. The method and the device solve the problem that the task is served first and the execution is neglected, and improve the task execution and work engine scheduling efficiency.

Description

Task execution method, device and equipment
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for executing a task.
Background
Big data presents a big challenge to data processing capacity, dynamic scheduling, and bandwidth. The cooperative work of multiple work engines becomes a common processing mode. A commonly used multi-engine cooperative work processing method is to allocate a work queue to each engine, and a task is executed in the corresponding engine in a first-come first-serve manner, but the following situations may be encountered in such a work method: a task with strict execution delay is called as a short job, and a task with relatively loose execution delay is called as a long job later.
Therefore, how to improve task execution efficiency in multi-engine cooperative work is a technical problem to be solved urgently by those skilled in the art.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a method, an apparatus, a device and a storage medium for executing a task, which can solve the problem that the task is first served and the execution is neglected, and improve the task execution and work engine scheduling efficiency. The specific scheme is as follows:
a first aspect of the present application provides a task execution method, including:
acquiring a task to be executed, and dividing the task to be executed into projects of a task group corresponding to a first priority; wherein each of said task groups has a unique corresponding said first priority;
respectively determining task margins of the tasks to be executed corresponding to the projects of the task group, and reordering the tasks to be executed corresponding to the projects according to the task margins to obtain a reordered task queue corresponding to the task group; the task margin represents the execution urgency degree of the task to be executed;
and polling the task group in a priority polling mode to determine the task to be executed from the corresponding reordering task queue, and executing the task to be executed by using a work engine.
Optionally, the acquiring the task to be executed includes:
and inputting the task to be executed through a task bus interface, performing parity check on the task to be executed after the task to be executed flows through a task buffer area, and acquiring the effective task to be executed if the parity check is passed.
Optionally, the task execution method further includes:
and judging whether the available cache of the task buffer area is smaller than a preset threshold value, if so, triggering and generating an interruption early warning signal to carry out interruption early warning on the fullness of the buffer of the task buffer area.
Optionally, the respectively determining the task margins of the tasks to be executed corresponding to the items of the task group includes:
and respectively determining expected completion time and latest completion time of the task to be executed corresponding to each project, and determining the difference value of the expected completion time and the latest completion time as the task margin of the task to be executed.
Optionally, after the task to be executed is executed by using the work engine, the method further includes:
and determining the completion time after the execution of the task to be executed is completed, and correcting the expected completion time based on the completion time and the arrival time of the task to be executed to the project after being divided.
Optionally, the reordering the to-be-executed task corresponding to the project according to the task margin to obtain a reordered task queue corresponding to the task group includes:
and sequencing the task margins by utilizing a four-level sequencing network, and writing the corresponding tasks to be executed into a queue in sequence according to the sequence of the sequenced task margins to obtain the reordered task queue corresponding to the task group.
Optionally, the polling the task group in a priority polling manner to determine the task to be executed from the corresponding re-ordering task queue includes:
polling the task groups according to the first priority order of the task groups;
and allocating a second priority to the tasks to be executed in the re-ordering task queue, and determining the tasks to be executed from the corresponding re-ordering task queue according to the second priority of the tasks to be executed.
Optionally, the first priority corresponding to the task group is a QOS priority;
correspondingly, the method further comprises the following steps:
and dividing the task group and the QOS priority corresponding to the task group according to the corresponding QOS indication or task type when the bus task interface transmits the tasks.
A second aspect of the present application provides a task execution apparatus including:
the system comprises an acquisition and division module, a task execution module and a task execution module, wherein the acquisition and division module is used for acquiring tasks to be executed and dividing the tasks to be executed into projects of task groups corresponding to first priorities; wherein each of said task groups has a unique corresponding said first priority;
the determining and ordering module is used for respectively determining the task margins of the tasks to be executed corresponding to the projects of the task group, and reordering the tasks to be executed corresponding to the projects according to the task margins to obtain a reordered task queue corresponding to the task group; the task margin represents the execution urgency degree of the task to be executed;
and the polling execution module is used for polling the task group in a priority polling mode so as to determine the task to be executed from the corresponding reordering task queue and executing the task to be executed by using a work engine.
A third aspect of the application provides an electronic device comprising a processor and a memory; wherein the memory is used for storing a computer program which is loaded and executed by the processor to implement the aforementioned task execution method.
A fourth aspect of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are loaded and executed by a processor, the task execution method is implemented.
In the method, a task to be executed is obtained first, and the task to be executed is divided into projects of task groups corresponding to a first priority; wherein each of said task groups has a unique corresponding said first priority; then respectively determining the task margins of the tasks to be executed corresponding to the projects of the task group, and reordering the tasks to be executed corresponding to the projects according to the task margins to obtain a reordered task queue corresponding to the task group; the task margin represents the execution urgency degree of the task to be executed; and finally, polling the task group in a priority polling mode to determine the tasks to be executed from the corresponding reordering task queue, and executing the tasks to be executed by utilizing a work engine. According to the task scheduling method and device, the tasks to be executed are grouped according to the priority by adopting a task grouping priority architecture, and the grouped tasks to be executed are reordered by the task margin calculation logic, so that the problem that the tasks are firstly served and are neglected to execute low delay is solved, and the task execution and work engine scheduling efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flowchart of a task execution method provided herein;
FIG. 2 is a diagram of a specific task execution logic architecture provided herein;
FIG. 3 is a logic diagram of an implementation of a reconfigurable sequencing network MERGE4 according to the present application;
fig. 4 is a diagram of a reconfigurable QOS arbitration mode provided by the present application;
fig. 5 is a diagram of reconfigurable QOS arbitration mode polling provided herein;
FIG. 6 is a schematic structural diagram of a task performing device according to the present application;
fig. 7 is a block diagram of an electronic device for task execution according to the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The existing multi-engine cooperative work processing mode is to allocate a work queue for each engine, and a task is executed in the corresponding engine in a first-come first-serve mode, but the problem of low delay priority of the task itself is ignored due to the first-come first-serve characteristic of the task queue, so that the performance of a system is reduced or the functionality is wrong. In order to overcome the technical defects, the task execution scheme is provided, the tasks to be executed are grouped according to the priority by adopting a task grouping priority architecture, and the grouped tasks to be executed are reordered by task margin calculation logic, so that the problem that the tasks are firstly served and the execution is neglected and the low delay is solved, and the task execution and work engine scheduling efficiency is improved.
Fig. 1 is a flowchart of a task execution method according to an embodiment of the present application. Referring to fig. 1, the task execution method includes:
s11: acquiring a task to be executed, and dividing the task to be executed into projects of a task group corresponding to a first priority; wherein there is a unique corresponding first priority for each of the task groups.
In this embodiment, a task to be executed is obtained first, and then the task to be executed is divided into items of a task group corresponding to a first priority. Wherein there is a unique corresponding first priority for each of the task groups. In particular, the task execution method in this embodiment supports QOS (Quality of Service), which is a technology that a network can provide better Service capability for specified network communication by using various basic technologies to solve problems such as network delay and congestion. In this scenario, the first priority corresponding to the task group is a QOS priority. Therefore, before this, the task group and the QOS priority corresponding to the task group need to be divided according to the QOS indication or the task type corresponding to the task when the bus task interface transmits the task.
The above-mentioned procedure corresponds to the priority grouping module in fig. 2, and the present embodiment is divided into 16 task groups, as an example, where QOS priority is defined as QOS-0 < QOS-1 < QOS-2 < QOS-3 … … < QOS-15, and each task group can accommodate 16 tasks to be executed (accommodated by items) with this priority. It is understood that QOS priority assignment may follow indications of corresponding QOS for tasks during bus transfer, such as AWQOS (write QOS), ARQOS (read QOS) in axi (advanced eXtensible interface). AXI is a Bus protocol, which is the most important part of amba (advanced Microcontroller Bus architecture)3.0 protocol, and is an on-chip Bus oriented to high performance, high bandwidth, and low latency. If the mechanism similar to the above is not used, the QOS priority is allocated according to the task type, wherein the priority level is: real-time (e.g. display tasks) or stream data processing tasks (e.g. video codec) > memory/register read and write access > data block DMA (typically larger than 4096 bytes).
Specifically, in this embodiment, the task to be executed is input through the task bus interface and passes through the task buffer, and then parity check is performed on the task to be executed, and if the parity check passes, the valid task to be executed is obtained. The interface circuitry and task buffering to support parity is shown in the corresponding parts of fig. 2. The task content read out by the task buffer is subjected to parity check, if the parity check does not pass, a parity check error interrupt early warning signal is generated, and the task passing the parity check enters 16 task groups through QOS priority groups. The Parity Check (Parity Check) is a method of checking the correctness of code transmission. The check is performed according to the number of '1' in the bits of a group of binary codes transmitted is odd or even, the odd check is called odd check, and the even check is called even check. Further, a task enters a task buffer from a bus task interface, the task buffer generates a buffer full interrupt early warning signal when an available buffer reaches a preset value, that is, whether the available buffer of the task buffer is smaller than a preset threshold value needs to be judged, and if so, an interrupt early warning signal is triggered to be generated to perform interrupt early warning on the buffer full of the task buffer.
S12: respectively determining task margins of the tasks to be executed corresponding to the projects of the task group, and reordering the tasks to be executed corresponding to the projects according to the task margins to obtain a reordered task queue corresponding to the task group; and the task margin represents the execution urgency degree of the task to be executed.
In this embodiment, the task margins of the tasks to be executed corresponding to the items of the task group are respectively determined. And the task margin represents the execution urgency degree of the task to be executed. Specifically, an expected completion time and a latest completion time of the task to be executed corresponding to each project are respectively determined, and a difference value between the expected completion time and the latest completion time is determined as the task margin of the task to be executed. For example, a task margin Tt (Tt-Td-Te) is calculated according to 0 to 15 arrival times Ta (which can be obtained by a system timer) of tasks to be executed in the group, the expected completion time Te, and the worst case necessary completion time (latest completion time) Td of the task.
On this basis, the expected completion time may also be dynamically corrected, that is, the completion time after the execution of the task to be executed is completed is determined, and the expected completion time is corrected based on the completion time and the arrival time at the project after the task to be executed is divided. And dynamically correcting the expected completion time by using the final completion time Tf (which can be obtained by a system timer), wherein the initial value of the expected completion time comes from the static configuration of a register, and dynamically correcting after each task is completed in such a way that the average value of the actual completion time and the expected value at this time is used as the expected value Te' 1/2 ═ Tf-Ta) + Te for the next task execution. In addition, the calculation of the execution expected time may also use a weighted average, the weighting coefficient may be statically specified, or may be dynamically configured according to the task type, or may use a mode such as a multitask execution average in a time window, for example, a time average is performed on the number of tasks completed in a fixed time window, for example, within 1 millisecond.
In this embodiment, after the task margin is determined, the tasks to be executed corresponding to the project are reordered according to the task margin to obtain a reordered task queue corresponding to the task group. Specifically, the task margins may be sorted by using a four-level sorting network, and the corresponding tasks to be executed are sequentially written into a queue according to the order of the sorted task margins, so as to obtain the reordered task queue corresponding to the task group. The theory of operation of the sorting network is illustrated by the MERGE4 network in fig. 3, and it is assumed that four values, a1 (value 9), a2 (value 5), a3 (value 2), and a4 (value 6) are to be sorted, and the sorting network is referred to as MERGE 4. In a first clock cycle: a1 and a2 are compared, and a3 and a4 are compared, so that T1 in a staged result shown in FIG. 3 is obtained, namely {9, 5, 2, 6}, {5, 9, 2, 6 }; in a second clock cycle: comparing a1 and a3 in the results of T1, and comparing a2 and a4 to obtain a staged result, namely {5, 9, 2, 6}, {2, 6, 5, 9} in the T2 in FIG. 3; in the third clock cycle: comparing a2 and a3 in the result of T2 to obtain a final result T3, namely {2, 6, 5, 9}, {2, 5, 6, 9} completion sorting. It will be appreciated that since each workgroup can accommodate 16 tasks to be performed, sorting up to 16 tasks according to task margin requires a 4-level sorting network and MERGE2, MERGE4, MERGE8 and MERGE16, which works in a similar manner to MERGE 4. The reordering queue receives the task with the minimum task margin output according to the ordering network, the ordering network changes the execution sequence of first-come first-served 16 tasks to be executed with the same priority, and the task is written into the reordering task work queue according to the urgency degree of the task margin from small to large.
S13: and polling the task group in a priority polling mode to determine the task to be executed from the corresponding reordering task queue, and executing the task to be executed by using a work engine.
In this embodiment, the task group is polled in a priority polling manner to determine the task to be executed from the corresponding re-ordering task queue, and a work engine is used to execute the task to be executed. Besides the reordering task queue has the priority of QOS task group, each task to be detected in the reordering task queue can also reconstruct the priority. Correspondingly, the task group is polled according to the first priority order of the task group, then a second priority is allocated to the task to be executed in the reordering task queue, and the task to be executed is determined from the corresponding reordering task queue according to the second priority order of the task to be executed. In addition, the work engine is a hardware implementation that performs some kind of algorithmic processing, protocol processing, including but not limited to a processor, a hardware accelerator. After the task is executed, the task completion status of the task group and the task ID can be fed back to the task margin calculation module through a noc (network on chip). The NOC is interconnected on a chip and is used for efficiently connecting a plurality of processors, acceleration engines and the like on the chip.
It will be appreciated that the 16 reordering task queues inherit the previous QOS priority, i.e., the reordering task queue 15 has a priority greater than the reordering task queue QOS 0 due to its QOS 15. QOS has another way of priority polling: the 16 reordering task queues can be reconstructed into a task queue which is only divided into four priorities of high priority, second high priority, middle priority and low priority or only has two categories of high priority and low priority. This polling mode is modified polling arbitration, see fig. 4 and 5. Taking only 8 task groups available at present as an example, the access request numbers 7-3 represent input channel request _ HP (high priority access group) access requests 7-3, and the access request numbers 2-0 represent input channel request _ LP (low priority access group) access requests 2-0. The connection operation { req, QOS [1:0] } result is 3 bits for the access request and the access priority of each request number, and the corresponding binary arithmetic value is used as the arbitration basis. An access request of 1 represents a valid request and 0 represents no access request. The access priority represents the priority of the corresponding request number, and the arbitration process is briefly summarized as polling and comparing. The working process is to select the access request with the effective request and the first appearance with the maximum arithmetic value from the high priority access group according to the searching direction (high priority access group → low priority access group, searching access number 3 → 4 → 5 → 6 → 7 → 0 → 1 → 2 → 3) shown in fig. 4 as the output, for example, the access request with the number 4 in fig. 4 requests the binary bit 5 of the join operation (binary 101, req ═ 1, QOS ═ 01), the access request 7, 6 requests the number 4 although the binary value of the join operation is also 5, viewed from the searching direction, the access request with the number 4 is the effective request in the searching direction and the access request with the maximum arithmetic value is the first appearance, therefore the arbitration result of the round is the access request 4 wins.
As can be seen, in the embodiment of the application, a task to be executed is obtained first, and the task to be executed is divided into items of a task group corresponding to a first priority; wherein each of said task groups has a unique corresponding said first priority; then respectively determining the task margins of the tasks to be executed corresponding to the projects of the task group, and reordering the tasks to be executed corresponding to the projects according to the task margins to obtain a reordered task queue corresponding to the task group; the task margin represents the execution urgency degree of the task to be executed; and finally, polling the task group in a priority polling mode to determine the tasks to be executed from the corresponding reordering task queue, and executing the tasks to be executed by utilizing a work engine. According to the task scheduling method and device, the tasks to be executed are grouped according to the priority by adopting the task grouping priority architecture, and the grouped tasks to be executed are reordered through the task margin calculation logic, so that the problem that the tasks are firstly served and are neglected to execute low delay is solved, and the task execution and work engine scheduling efficiency is improved.
Referring to fig. 6, an embodiment of the present application further discloses a task execution device, which includes:
the acquisition and division module 11 is configured to acquire a task to be executed and divide the task to be executed into items of a task group corresponding to a first priority; wherein each of said task groups has a unique corresponding said first priority;
a determining and ordering module 12, configured to determine task margins of the to-be-executed tasks corresponding to the items of the task group respectively, and reorder the to-be-executed tasks corresponding to the items according to the task margins to obtain a reordered task queue corresponding to the task group; the task margin represents the execution urgency degree of the task to be executed;
and the polling execution module 13 is configured to poll the task group in a priority polling manner to determine the task to be executed from the corresponding reordering task queue, and execute the task to be executed by using the work engine.
As can be seen, in the embodiment of the application, a task to be executed is obtained first, and the task to be executed is divided into items of a task group corresponding to a first priority; wherein each of said task groups has a unique corresponding said first priority; then respectively determining the task margins of the tasks to be executed corresponding to the projects of the task group, and reordering the tasks to be executed corresponding to the projects according to the task margins to obtain a reordered task queue corresponding to the task group; the task margin represents the execution urgency degree of the task to be executed; and finally, polling the task group in a priority polling mode to determine the tasks to be executed from the corresponding reordering task queue, and executing the tasks to be executed by utilizing a work engine. According to the task scheduling method and device, the tasks to be executed are grouped according to the priority by adopting the task grouping priority architecture, and the grouped tasks to be executed are reordered through the task margin calculation logic, so that the problem that the tasks are firstly served and are neglected to execute low delay is solved, and the task execution and work engine scheduling efficiency is improved.
In some specific embodiments, the obtaining and dividing module 11 is further specifically configured to input the task to be executed through a task bus interface, perform parity check on the task to be executed after the task to be executed flows through a task buffer, and obtain the valid task to be executed if the parity check passes;
accordingly, in some specific embodiments, the task execution device further includes:
and the early warning module is used for judging whether the available cache of the task buffer area is smaller than a preset threshold value, and if so, triggering and generating an interruption early warning signal to carry out interruption early warning on the fullness of the buffer of the task buffer area.
In some specific embodiments, the determining and sorting module 12 specifically includes:
a determining unit, configured to determine an expected completion time and a latest completion time of the task to be executed corresponding to each project, respectively, and determine a difference between the expected completion time and the latest completion time as the task margin of the task to be executed;
the correction unit is used for determining the completion time after the execution of the task to be executed is completed and correcting the expected completion time based on the completion time and the arrival time of the task to be executed to the project after being divided;
and the sequencing unit is used for sequencing the task margins by utilizing a four-level sequencing network, and sequentially writing the corresponding tasks to be executed into a queue according to the sequence of the sequenced task margins to obtain the reordered task queue corresponding to the task group.
In some specific embodiments, the polling execution module 13 specifically includes:
the first polling unit is used for polling the task groups according to the first priority order of the task groups;
and the second polling unit is used for allocating a second priority to the tasks to be executed in the reordering task queue and determining the tasks to be executed from the corresponding reordering task queue according to the second priority of the tasks to be executed.
In some embodiments, when the first priority corresponding to the task group is a QOS priority, the task execution device further includes:
and the QOS grouping module is used for dividing the task group and the QOS priority corresponding to the task group according to the corresponding QOS indication or task type when the bus task interface transmits the tasks.
Further, the embodiment of the application also provides electronic equipment. FIG. 7 is a block diagram illustrating an electronic device 20 according to an exemplary embodiment, and the contents of the diagram should not be construed as limiting the scope of use of the present application in any way.
Fig. 7 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. Wherein, the memory 22 is used for storing a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the task execution method disclosed in any of the foregoing embodiments.
In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to obtain external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
In addition, the storage 22 is used as a carrier for resource storage, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon may include an operating system 221, a computer program 222, data 223, etc., and the storage may be a transient storage or a permanent storage.
The operating system 221 is used for managing and controlling each hardware device and the computer program 222 on the electronic device 20, so as to realize the operation and processing of the mass data 223 in the memory 22 by the processor 21, and may be Windows Server, Netware, Unix, Linux, and the like. The computer programs 222 may further include computer programs that can be used to perform other specific tasks in addition to the computer programs that can be used to perform the task execution method disclosed by the electronic device 20 in any of the foregoing embodiments. Data 223 may include tasks to be performed that are collected by electronic device 20.
Further, an embodiment of the present application further discloses a storage medium, in which a computer program is stored, and when the computer program is loaded and executed by a processor, the steps of the task execution method disclosed in any of the foregoing embodiments are implemented.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above detailed description of the task execution method, apparatus, device and storage medium provided by the present invention has been provided, and the principle and implementation of the present invention are described herein by applying specific examples, and the above description of the embodiments is only used to help understanding the method and core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method of task execution, comprising:
acquiring a task to be executed, and dividing the task to be executed into projects of a task group corresponding to a first priority; wherein each of said task groups has a unique corresponding said first priority;
respectively determining task margins of the tasks to be executed corresponding to the projects of the task group, and reordering the tasks to be executed corresponding to the projects according to the task margins to obtain a reordered task queue corresponding to the task group; the task margin represents the execution urgency degree of the task to be executed;
and polling the task group in a priority polling mode to determine the task to be executed from the corresponding reordering task queue, and executing the task to be executed by using a work engine.
2. The task execution method according to claim 1, wherein the acquiring the task to be executed comprises:
and inputting the task to be executed through a task bus interface, performing parity check on the task to be executed after the task to be executed flows through a task buffer area, and acquiring the effective task to be executed if the parity check is passed.
3. The task execution method of claim 2, further comprising:
and judging whether the available cache of the task buffer area is smaller than a preset threshold value, if so, triggering and generating an interruption early warning signal to carry out interruption early warning on the fullness of the buffer of the task buffer area.
4. The task execution method according to claim 1, wherein the determining task margins of the tasks to be executed corresponding to the respective items of the task group respectively comprises:
and respectively determining expected completion time and latest completion time of the task to be executed corresponding to each project, and determining the difference value of the expected completion time and the latest completion time as the task margin of the task to be executed.
5. The task execution method of claim 4, wherein after the task to be executed is executed by the work engine, the method further comprises:
and determining the completion time after the execution of the task to be executed is completed, and correcting the expected completion time based on the completion time and the arrival time of the task to be executed to the project after being divided.
6. The task execution method of claim 1, wherein reordering the tasks to be executed corresponding to the project according to the task margin to obtain a reordered task queue corresponding to the task group comprises:
and sequencing the task margins by utilizing a four-level sequencing network, and writing the corresponding tasks to be executed into a queue in sequence according to the sequence of the sequenced task margins to obtain the reordered task queue corresponding to the task group.
7. The task execution method of claim 1, wherein the polling the task group in a priority polling manner to determine the task to be executed from the corresponding re-ordered task queue comprises:
polling the task groups according to the first priority order of the task groups;
and allocating a second priority to the tasks to be executed in the re-ordering task queue, and determining the tasks to be executed from the corresponding re-ordering task queue according to the second priority of the tasks to be executed.
8. A task execution method according to any one of claims 1 to 7, wherein the first priority corresponding to the task group is a QOS priority;
correspondingly, the method further comprises the following steps:
and dividing the task group and the QOS priority corresponding to the task group according to the corresponding QOS indication or task type when the bus task interface transmits the tasks.
9. A task execution apparatus, comprising:
the system comprises an acquisition and division module, a task execution module and a task execution module, wherein the acquisition and division module is used for acquiring tasks to be executed and dividing the tasks to be executed into projects of task groups corresponding to first priorities; wherein each of said task groups has a unique corresponding said first priority;
the determining and ordering module is used for respectively determining the task margins of the tasks to be executed corresponding to the projects of the task group, and reordering the tasks to be executed corresponding to the projects according to the task margins to obtain a reordered task queue corresponding to the task group; the task margin represents the execution urgency degree of the task to be executed;
and the polling execution module is used for polling the task group in a priority polling mode so as to determine the task to be executed from the corresponding reordering task queue and executing the task to be executed by using a work engine.
10. An electronic device, comprising a processor and a memory; wherein the memory is used for storing a computer program which is loaded and executed by the processor to implement the task execution method according to any of claims 1 to 8.
CN202111629914.0A 2021-12-28 2021-12-28 Task execution method, device and equipment Pending CN114443244A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111629914.0A CN114443244A (en) 2021-12-28 2021-12-28 Task execution method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111629914.0A CN114443244A (en) 2021-12-28 2021-12-28 Task execution method, device and equipment

Publications (1)

Publication Number Publication Date
CN114443244A true CN114443244A (en) 2022-05-06

Family

ID=81365617

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111629914.0A Pending CN114443244A (en) 2021-12-28 2021-12-28 Task execution method, device and equipment

Country Status (1)

Country Link
CN (1) CN114443244A (en)

Similar Documents

Publication Publication Date Title
Tindell et al. Analysis of hard real-time communications
Delgado et al. Kairos: Preemptive data center scheduling without runtime estimates
US9218203B2 (en) Packet scheduling in a multiprocessor system using inter-core switchover policy
US6085215A (en) Scheduling mechanism using predetermined limited execution time processing threads in a communication network
JP4034969B2 (en) Memory management system for common memory
US8155134B2 (en) System-on-chip communication manager
US7080177B2 (en) System and method for arbitrating clients in a hierarchical real-time DRAM system
JP2008541217A (en) Memory controller, memory access control method, and system including memory controller
KR20160004365A (en) Service rate redistribution for credit-based arbitration
Chokshi et al. Performance analysis of FlexRay-based systems using real-time calculus, revisited
Caccamo et al. Sharing resources among periodic and aperiodic tasks with dynamic deadlines
US7308686B1 (en) Software input/output using hard real time threads
US8423975B1 (en) System performance simulator
US8504749B2 (en) Synchronization of multiple processor cores
EP1591907B1 (en) Resource management
CN111831408A (en) Asynchronous task processing method and device, electronic equipment and medium
CN114443244A (en) Task execution method, device and equipment
Arbaud et al. Resource management for mixed-criticality systems on multi-core platforms with focus on communication
CN109426562B (en) priority weighted round robin scheduler
CN112597080A (en) Read request control device and method and memory controller
US6654861B2 (en) Method to manage multiple communication queues in an 8-bit microcontroller
Dridi et al. DTFM: a flexible model for schedulability analysis of real-time applications on noc-based architectures
Di Natale et al. Worst-case time analysis of CAN messages
US10251194B2 (en) Efficient scheduling in asynchronous contention-based system
Baunach Dynamic hinting: Real-time resource management in wireless sensor/actor networks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination