Heterogeneous computing platform periodical segmentation task time determinacy division method

By using a combination of static scheduling algorithms and linear planning algorithms on a heterogeneous computing platform, a time-deterministic task scheduling table is generated, which solves the problem that traditional scheduling algorithms are difficult to meet the real-time scheduling requirements in the aerospace field, and achieves the cyclicality, hard real-timeness of tasks and the satisfaction of strict pre-driven successive relationships.

CN119690621APending Publication Date: 2025-03-25BEIJING INST OF CONTROL ENG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411790631.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

Traditional real-time scheduling planning algorithms are difficult to meet the periodicity, hard real-time and strict task-driven succession relationships required for real-time scheduling in the aerospace field at the same time.

Method used

A time deterministic division method for periodic segmented tasks of heterogeneous computing platforms is provided. By obtaining heterogeneous platform parameters and task set parameters, a static scheduling algorithm is used to generate a static scheduling table, and input it into a constructed linear planning algorithm model to obtain a time deterministic task schedule to schedule the task processor to execute tasks.

Benefits of technology

On the premise of ensuring that the task has a strict front-drive succession relationship and strong real-time nature, it has a low number of task migrations and a small number of activated cores, so as to meet the periodicity, hard real-time and strict task pre-drive succession relationship required for real-time scheduling in the aerospace field.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690621A_ABST
    Figure CN119690621A_ABST
Patent Text Reader

Abstract

The invention provides a heterogeneous computing platform periodical segmentation task time determinacy division method. The method comprises the following steps: generating a static scheduling table by utilizing a static scheduling algorithm according to acquired heterogeneous platform parameters and task set parameters; inputting the static scheduling table into the constructed linear programming algorithm model to obtain a time deterministic task scheduling table, and scheduling a task processor to execute a task according to the scheduling table; the linear programming algorithm model is constructed based on preset constraint conditions and a preset objective function, and the preset constraint conditions comprise a task complete execution constraint, a task deadline constraint, a segmented task time sequence constraint, a segmented task processor division constraint and a task execution window constraint; the preset objective function is obtained by optimizing the task scheduling length in the task set, the migration times of the task segments in different processors and the activated core number of the processor platform. According to the scheme, the periodicity, the hard real-time performance and the strict task precursor and successor relation required by real-time scheduling in the aerospace field can be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of real-time scheduling technology, and in particular to a method for time deterministic partitioning of periodic segmented tasks on a heterogeneous computing platform. Background Art

[0002] As a heterogeneous computing platform, the satellite-borne system needs to undertake large-scale parallel computing tasks in the aerospace field, and the scheduling algorithm plays a decisive role in the real-time and reliability of the system.

[0003] Among the related technologies, the linear programming method is a widely used offline scheduling and planning technology. Combined with the processor model and task model in a heterogeneous environment, the linear programming method can more intuitively constrain the deadline of the task, the processor resources of the system, etc. in a mathematical form. However, computing tasks in the aerospace field often have the characteristics of periodicity, hard real-time, and strict task predecessor and successor relationships. Traditional real-time scheduling and planning algorithms are difficult to meet the above requirements at the same time, and blindly increasing computing power is also difficult to apply to low-power operating environments.

[0004] Therefore, based on the above problems, there is an urgent need to provide a method for time deterministic partitioning of periodic segmented tasks on heterogeneous computing platforms to simultaneously meet the periodicity, hard real-time, and strict task predecessor and successor relationships required for real-time scheduling in the aerospace field. Summary of the invention

[0005] In order to solve the problem that traditional real-time scheduling and planning algorithms are difficult to simultaneously meet the periodicity, hard real-time and strict task predecessor and successor relationships required for real-time scheduling in the aerospace field, an embodiment of the present invention provides a method for time deterministic partitioning of periodic segmented tasks on a heterogeneous computing platform.

[0006] In a first aspect, an embodiment of the present invention provides a method for determining the time division of periodic segmented tasks on a heterogeneous computing platform, comprising:

[0007] Obtain heterogeneous platform parameters and task set parameters;

[0008] Generate a static scheduling table using a static scheduling algorithm according to the heterogeneous platform parameters and the task set parameters;

[0009] The static scheduling table is input into the constructed linear programming algorithm model to obtain a time-deterministic task scheduling table, so as to schedule the task processor to execute the task according to the time-deterministic task scheduling table; wherein the linear programming algorithm model is constructed based on preset constraints and preset optimization objective functions, and the preset constraints include task complete execution constraints, task deadline constraints, segmented task timing constraints, segmented task processor partitioning constraints and task execution window constraints; the preset objective function is obtained by optimizing the task scheduling length in the task set, the number of migrations of task segments in different processors and the number of activated cores of the processor platform.

[0010] In a second aspect, an embodiment of the present invention further provides a device for determining the time division of periodic segmented tasks on a heterogeneous computing platform, comprising:

[0011] An acquisition unit, used to acquire heterogeneous platform parameters and task set parameters;

[0012] A static scheduling table generating unit, configured to generate a static scheduling table using a static scheduling algorithm according to the heterogeneous platform parameters and the task set parameters;

[0013] A task scheduling unit is used to input the static scheduling table into the constructed linear programming algorithm model to obtain a time-deterministic task scheduling table, so as to schedule the task processor to execute the task according to the time-deterministic task scheduling table; wherein the linear programming algorithm model is constructed based on preset constraints and preset optimization objective functions, and the preset constraints include task complete execution constraints, task deadline constraints, segmented task timing constraints, segmented task processor partitioning constraints and task execution window constraints; the preset objective function is obtained by optimizing the task scheduling length in the task set, the number of migrations of task segments in different processors and the number of activated cores of the processor platform.

[0014] In a third aspect, an embodiment of the present invention further provides a computing device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in any embodiment of this specification is implemented.

[0015] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute the method described in any embodiment of this specification.

[0016] On the other hand, an embodiment of the present application further provides a computer program product, which includes a computer program. A processor of a computer device reads the computer program from a computer-readable storage medium, and the processor executes the computer program, so that the computer device executes any of the methods described in the above embodiments.

[0017] The embodiment of the present invention provides a method for time-deterministic partitioning of periodic segmented tasks of a heterogeneous computing platform. On the basis of combining and allocating specific computing resources required for task segmentation with resources inherent to heterogeneous processors, by constraining the complete execution of tasks, task deadlines, segmented task timing, processor partitioning of segmented tasks, and task execution windows, and according to the scheduling requirements of the aerospace field, combined with the decision variables generated by each task, the task scheduling length, task migration overhead, and the number of task processor core activations are taken as optimization targets, thereby constructing a new resource partitioning linear programming algorithm model. Finally, a static scheduling table generated based on heterogeneous platform parameters and task set parameters is input into the above-mentioned linear programming algorithm model, thereby obtaining a time-deterministic task scheduling table, so as to schedule the task processor to execute tasks according to the scheduling table. In this way, under the premise of ensuring that the tasks have a strict predecessor-successor relationship and strong real-time performance, the number of task migrations and the number of activated cores are relatively low, thereby being able to meet the periodicity, hard real-time performance, and strict task predecessor-successor relationship required for real-time scheduling in the aerospace field. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 It is a flow chart of a method for time deterministic partitioning of periodic segmented tasks on a heterogeneous computing platform provided by an embodiment of the present invention;

[0020] Figure 2 It is a Gantt diagram of a time-determined task scheduling table provided by an embodiment of the present invention;

[0021] Figure 3 is a flowchart of a table decoding service provided by an embodiment of the present invention;

[0022] Figure 4 This is a schematic diagram of a CPU-side task scheduling service flow provided by an embodiment of the present invention;

[0023] Figure 5 It is a schematic diagram of the DSP end task scheduling service process provided by an embodiment of the present invention;

[0024] Figure 6 is a hardware architecture diagram of a computing device provided by an embodiment of the present invention;

[0025] Figure 7It is a structural diagram of a device for time deterministic partitioning of periodic segmented tasks on a heterogeneous computing platform provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0027] At present, the LP-Feas method is the most classic offline planning method for real-time scheduling of periodic task sets based on a three-parameter task model. Its main problems are as follows: 1) For aerospace onboard computers with heterogeneous computing functions, the LP-Feas algorithm cannot adapt to task allocation in a heterogeneous environment, and it is difficult to ensure that each task can obtain the corresponding type of processor resources, which means that the scheduling algorithm is difficult to reasonably apply the heterogeneous computing resources carried by onboard computers. 2) The LP-Feas algorithm is difficult to face the DAG task model, which is becoming increasingly important in the field of real-time scheduling. The predecessor and successor relationship of tasks in the DAG model cannot be expressed in the classic linear programming algorithm. Therefore, the classic algorithm cannot give a reasonable planning solution when facing tasks with strong real-time performance and strict execution order. 3) The LP-Feas algorithm is not based on the research of onboard computing platforms, so the performance advantages of the algorithm are difficult to be reflected in the aerospace field. In resource-constrained embedded devices, energy consumption estimation and planning are more needed, but the classic algorithm lacks quantitative expression and optimization methods for energy consumption, task migration, and the number of core activations.

[0028] Based on the above problems, in the embodiments of the present invention, a heterogeneous computing platform model is formed by expanding the theoretical method of linear programming, adding the unique resource characteristics and computing power difference characteristics of heterogeneous processors to the model, and proposing a new linear expression method for resource partitioning in terms of heterogeneous computing resources. A task predecessor and successor relationship is added to a single task, and a new DAG task predecessor and successor relationship linear expression method is proposed for task segmentation. Furthermore, according to the scheduling needs of the aerospace field and combined with the existing decision variables, a linear expression method and optimization method for energy consumption, task migration, and the number of core activations are proposed.

[0029] The specific implementation of the above concept is described below.

[0030] Please refer to Figure 1 The embodiment of the present invention provides a method for determining the time division of periodic segmented tasks on a heterogeneous computing platform, the method comprising:

[0031] Step 100, obtaining heterogeneous platform parameters and task set parameters;

[0032] Step 102, generating a static scheduling table using a static scheduling algorithm according to the heterogeneous platform parameters and the task set parameters;

[0033] Step 104, input the static scheduling table into the constructed linear programming algorithm model to obtain a time-deterministic task scheduling table, so as to schedule the task processor to execute the task according to the time-deterministic task scheduling table; wherein the linear programming algorithm model is constructed based on preset constraints and preset optimization objective functions, and the preset constraints include task complete execution constraints, task deadline constraints, segmented task timing constraints, segmented task processor partitioning constraints and task execution window constraints; the preset objective function is obtained by optimizing the task scheduling length in the task set, the number of migrations of task segments in different processors and the number of activated cores of the processor platform.

[0034] In an embodiment of the present invention, on the basis of combining and allocating specific computing resources required for task segmentation and resources inherent in heterogeneous processors, by constraining the complete execution of tasks, task deadlines, segmented task timing, processor partitioning of segmented tasks, and task execution windows, and according to the scheduling requirements of the aerospace field, combined with the decision variables generated for each task, taking the task scheduling length, task migration overhead, and the number of task processor core activations as optimization targets, a new resource partitioning linear programming algorithm model is constructed. Finally, a static scheduling table generated based on heterogeneous platform parameters and task set parameters is input into the above-mentioned linear programming algorithm model to obtain a time-deterministic task scheduling table, so as to schedule the task processor to execute tasks according to the scheduling table. In this way, while ensuring that the tasks have a strict predecessor and successor relationship and strong real-time performance, they have a lower number of task migrations and a smaller number of activated cores, thereby being able to meet the periodicity, hard real-time performance, and strict task predecessor and successor relationship required for real-time scheduling in the aerospace field.

[0035] Described below Figure 1 How the various steps are performed.

[0036] For steps 100 and 102:

[0037] In some implementations, the heterogeneous platform parameters include processor type and processor quantity, and the task set parameters include task type, task priority, task cycle, task segmentation structure, task start execution time, worst execution time, and end time.

[0038] In an embodiment of the present invention, a task set is designed on a heterogeneous multi-core platform, task set parameters and heterogeneous platform parameters are input into the task set, and a sub-module is designed through a static scheduling algorithm. The static scheduling algorithm design sub-module performs offline analysis on the task set according to task attributes such as task type, priority, cycle, segment structure, and deadline of each task in the task set parameters, and finally completes the task division and outputs a static scheduling table.

[0039] In the embodiment of the present invention, in a heterogeneous multi-core platform, the processor types include a CPU processor, a DSP processor and a FPGA processor, wherein the CPU is a main processor, and the DSP and FPGA acceleration components are coprocessors.

[0040] The embodiments of the present invention are oriented to heterogeneous platforms and are committed to ensuring that the resource division of the segmented tasks of the hard real-time system is reasonable, meeting the real-time requirements of the tasks while reducing the task response time, reducing the number of task migrations, and reducing the number of activated cores. Firstly, a linear constraint expression method of execution integrity constraints, segmented task real-time constraints, segmented timing constraints, resource division constraints, and non-overlapping task windows is proposed, and the real-time nature of the tasks and the rationality of resource division are guaranteed through constraints. Furthermore, a linear expression method of measuring task scheduling length, number of task migrations, and minimum enabled processing cores is proposed. By using the linear expression method of these measurement indicators as optimization targets, the purpose of low task response time, reducing the number of task migrations, and reducing the number of activated cores is achieved.

[0041] Regarding step 104:

[0042] In the embodiment of the present invention, based on a mature linear programming solver, a new linear programming algorithm model is formed by establishing new linear constraints and optimization objectives. The solution obtained after solving the model will be the solution with the smallest value in the objective function while satisfying all constraints.

[0043] In some implementations, the preset constraint condition is set in the following manner:

[0044] Based on the task set parameters, respectively obtain the execution length decision variable, the execution start time decision variable, the execution end time decision variable and the processor allocation decision variable of each segment in each task instance in each task cycle;

[0045] The execution length decision variable, the execution start time decision variable, and the execution end time decision variable are constrained respectively to obtain the preset constraint conditions, which include task complete execution constraint, task deadline constraint, segmented task timing constraint, segmented task processor partition constraint, and task execution window constraint.

[0046] In the embodiment of the present invention, the decision variables will correspond to the solution content of each task one by one, and the start time, end time, and task execution window length of each segment of each task instance in the super cycle need to be generated respectively. It is also necessary to generate the allocation decision of each segment of each task instance in the super cycle on any processor. If the planning algorithm decides to allocate any task instance segment to a certain processor, the decision variable is set to 1, otherwise it is set to 0.

[0047] Combined with the above decision variables, the following constraints are entered into the linear programming solver in turn:

[0048] Task complete execution constraint: In order to ensure that each task segment can be completely executed on the processor of the corresponding processor type / cluster, it is necessary to ensure that the length of the execution time window allocated to all task segments is not less than the worst-case execution time of the segment.

[0049] Therefore, an execution length decision variable will be generated for each segment in each task instance in each cycle, and the constraint condition that the execution length decision variable is greater than or equal to the worst execution time of the corresponding task segment is added to the overall linear constraint set.

[0050] Task deadline constraints: Under the super-period planning strategy, deadline constraints need to be imposed on all task instances within the super-period. Combining the definition of implicit deadlines for periodic tasks and the heterogeneous segmented task model, the completion time of the last task segment in the task instance is used as the completion time of the entire task instance, requiring that the completion time of the current cycle of the task must not be later than the start time of the next cycle of the task.

[0051] Therefore, an execution end time decision variable will be generated for each segment in each task instance in each cycle, and the execution end time decision variable will be less than or equal to the end time of the corresponding cycle of the task instance (the implicit deadline of the periodic task) as a constraint condition added to the overall linear constraint set.

[0052] Segmented task timing constraints: Within the super-period span, the task needs to execute multiple task instances. Therefore, for the timing constraints of task segmentation, it is necessary not only to ensure that multiple task segments in a single task instance are executed in sequence, but also to ensure that multiple task instances within the super-period span are executed in sequence.

[0053] Therefore, for each segment in each task instance in each cycle, an execution start time decision variable will be generated, and combined with the generated execution end time decision variable, the execution start time decision variable of the first segment in each task instance in each task cycle is greater than the cycle start time corresponding to the task instance and the execution start time decision variable of the next segment in each task instance in each task cycle is greater than the execution end time decision variable of the previous segment is added as a constraint to the linear constraint set. In this way, it can be ensured that multiple task segments belonging to the same task instance meet the predecessor and successor relationship.

[0054] Processor partitioning constraints for segmented tasks: In the embodiment of the present invention, all task segments need to be partitioned into processors within a supercycle. Each task segment needs to be assigned to a specified processor cluster and is not allowed to be partitioned and executed on processors in other clusters, i.e., cross-processor execution is not allowed. In addition, in the processor cluster to which it belongs, a task segment is only allowed to be executed on one of the processors, i.e., a task segment is not allowed to be migrated during execution.

[0055] Therefore, a processor allocation decision variable will be generated for each segment in each task instance in each cycle, and this variable is a 0-1 variable; if the task segment of the task instance is assigned to the processor, the corresponding processor allocation decision variable is 1, otherwise it is 0. By making the processor allocation decision variable and the execution length decision variable of the same segment of the same task instance greater than or equal to zero, the sum of the allocation decision variables of all segments in the same task instance equal to 1 is subsequently added to the linear constraint set as a constraint condition. In this way, it can be ensured that a single segment in the task instance can only be divided and executed on a unique processor.

[0056] Task execution window constraint: ensure that the execution time window of the task is on the same processor, and the execution time windows of any two task segments are not allowed to overlap. This is an important constraint to ensure that each task segment belongs to a unique processor on the basis of the processor division constraint of the segmented task, and to ensure that the task segment keeps executing until the end. Because if there are two task segments that belong to the same processor and their execution windows overlap, it means that one segment is preempted during the execution process and the processor resources are given to another segment.

[0057] To avoid this situation, the execution start time decision variables and execution end time decision variables generated for each segment in each task instance in each cycle ensure that any segments in any two different task instances assigned to the same processor meet the following constraints: the difference between the execution start time decision variables of any two task segments is greater than the execution end time decision variable of the first task segment, which is added as a constraint to the linear constraint set. In this way, it can be ensured that for any processor, the execution time windows of different task segments executed on it do not overlap.

[0058] In some implementations, the preset objective function is constructed in the following manner:

[0059] The corresponding objective functions are constructed with the minimum task scheduling length in the task set, the minimum number of migrations of task segments in different processors, and the minimum number of activated cores on the processor platform as the goals respectively;

[0060] Perform a weighted summation on each objective function and its corresponding weight to obtain the preset objective function.

[0061] In some implementations, the preset objective function is as follows:

[0062]

[0063] Where F is the preset objective function, x, y and z are weight coefficients, n is the number of tasks, L i is the scheduling length of the i-th task, m is the number of processors, M i is the number of migrations between processors due to the assignment of different task segments to different processor cores, N p Is the flag for whether the pth processor is activated or not (N p =1 indicates that the pth processor is activated, N p =0 means the pth processor is not activated).

[0064] In order to ensure the real-time performance of the system and the rationality of resource allocation, the embodiment of the present invention considers the optimization method from the aspects of task scheduling length, task migration, and the number of core activations, and constructs a preset objective function with improving the performance of the time-deterministic planning algorithm as the design goal.

[0065] Specifically, the following optimization goals are set:

[0066] Minimize the length of task scheduling in a task set:

[0067] Since there are inconsistent task periods in the periodic task set studied in the embodiment of the present invention, a super-period planning strategy is adopted. For a task set, the task scheduling length represents the time span between the start time of the earliest task instance to be executed and the completion time of the latest task instance to be completed, which is called the scheduling length. For a periodic task set, the scheduling length is represented by the time span between the start time of the earliest task to be executed and the completion time of the latest task instance to be completed within the super-period time span.

[0068] In the periodic task set, minimizing the latest completion time of the last segment in the last instance of all tasks can indicate that the task has a smaller scheduling length. Under the premise of satisfying the task scheduling constraints, the sum of the start execution time of all task segments can be corrected by the minimal number o to ensure that the task segments are executed as early as possible under the premise of satisfying the real-time scheduling constraints. Combining the above two points, minimizing the latest segment completion time of all tasks and the sum of the start time of all task segments corrected by auxiliary corrections are selected as the task scheduling length optimization goal.

[0069] Minimize the number of migrations of task segments between different processors:

[0070] In the heterogeneous segmented task model studied in the embodiments of the invention, the function and structural design of the task determine that different segments of the task need to be executed on a specified type of processor (such as CPU, DSP, FPGA). During the operating system scheduling process, the CPU, as the main device, operates the relevant queues of the task control block (task segment). When the DSP and FPGA coprocessors execute the corresponding task segments, the task control block is also controlled by the main processor CPU. Reducing the migration of task control blocks between different CPU processors can reduce the system operation overhead caused by inter-core data communication.

[0071] In the embodiment of the present invention, the study of migration overhead focuses on the migration that occurs when different segments in a task are executed on different processors in the same cluster (intra-cluster migration). The migration execution of tasks between different clusters caused by the task segmentation structure belongs to the basic scheduling requirements and does not belong to the scope of scheduling optimization. For example, task segment 1 belongs to the CPU segment, and segment 2 belongs to the FPGA segment. The task needs to be migrated between segments 1 and 2 (CPU-FPGA). This is caused by the task segmentation structure and is unavoidable. For another example, task segment 1 belongs to the CPU0 segment, and segment 2 belongs to the CPU1 segment. The migration of tasks between segments 1 and 2 belongs to intra-cluster migration, and the migration overhead caused by this is minimized, and minimizing the number of migrations is used as the optimization goal of the migration overhead.

[0072] Minimize the number of activated cores on the processor platform:

[0073] If more processor cores are idle in the real-time scheduling system, it means that the real-time system can withstand greater task loads and risks. In the embodiment of the present invention, the processor allocation decision variable generated by the task can determine whether the processor is activated to run. If the sum of the decision variables allocated to the processor is greater than zero, it means that the processor is activated, otherwise the processor is not activated. By minimizing the number of activated cores, power consumption can be reduced while reserving certain processor resources for re-execution of erroneous tasks, thereby improving the fault tolerance and robustness of the system. Therefore, in the embodiment of the present invention, minimizing the activated cores of the processor platform is used as the optimization goal of the number of activated cores.

[0074] At this point, the preset objective function can be obtained by determining the weights of the task scheduling length optimization target, the task segment migration times optimization target in different processors, and the processor platform activation core number optimization target, and then performing weighted averaging on them.

[0075] The embodiment of the present invention is oriented towards heterogeneous platforms and is committed to ensuring reasonable resource division of segmented tasks of hard real-time systems. The linear programming expression formed by the constraints formed by decision variables and the optimization objectives can not only have a lower number of task migrations and a smaller number of activated cores under the premise of ensuring that the tasks have a strict predecessor and successor relationship and strong real-time performance, but also save energy consumption, improve system robustness, and reduce task migration overhead under the premise of satisfying the two hard conditions of reasonable resource division and system real-time performance.

[0076] In some implementations, the step of inputting the static scheduling table into a constructed linear programming algorithm model to obtain a time-deterministic task scheduling table includes:

[0077] Decoding the static scheduling table to obtain a decoded static scheduling table; wherein the decoded static scheduling table contains specific information of time-deterministic threads;

[0078] The time-deterministic task scheduling table is created according to the decoded static scheduling table and the task execution function list.

[0079] In the embodiment of the present invention, on the basis of satisfying the above-mentioned preset constraints and the preset objective function, the linear programming algorithm model in the actual system needs to go through table decoding service, task creation and task scheduling service, so as to finally obtain the time-deterministic task scheduling table (such as Figure 2 As shown), the task processor completes the scheduling of each task according to the specific information in the time-deterministic task scheduling table (such as start time, end time, task segmentation, etc.).

[0080] Specifically, the table decoding service mainly decodes and analyzes the input static scheduling table to obtain the specific information of the time-deterministic thread. After that, the task creation service creates a time-deterministic task scheduling table based on the decoded static scheduling table and the task execution function list (including the specific execution content of the tasks in the task set); the task scheduling service is divided into the CPU side and the accelerated computing (such as DSP) side. The CPU side and the accelerated computing side will complete the scheduling of each task according to the start time in the time-deterministic task scheduling table.

[0081] In the embodiment of the present invention, the specific process of table decoding service, task creation service and task scheduling service belongs to the conventional process in the field. After the table decoding obtains the specific information of the time-deterministic thread, the thread is mounted into the time data structure (such as the start time list of the thread) in sequence according to the thread. Figure 3 As shown in the figure). The task creation service creates a time-deterministic task schedule based on the time-deterministic task function. The time-deterministic task function has a unified format, and its specific content is a while loop. It suspends itself in a loop and waits to be awakened before running the subsequent function. The subsequent function here is obtained by indexing through the task execution function list.

[0082] In the cornerstone clock interrupt service function of the operating system, first determine whether there is a time-deterministic thread that needs to be awakened at the current time based on the time variable. If so, wake it up in sequence. If not, increase the time variable and wait for the next cornerstone clock interrupt service function to run. The CPU-side task scheduling service process is as follows Figure 4 shown.

[0083] The DSP side schedules the pre-created threads by receiving commands sent by the CPU side. The command interaction between the DSP and the CPU is carried out through a dual-port RAM, which uses two BLOCK areas. One BLOCK area is used to identify the DSP number, and the other BLOCK area is used to identify the TASK sequence. The specific process is as follows Figure 5 shown.

[0084] In summary, in the embodiment of the present invention, a heterogeneous computing platform model is formed by theoretically expanding the traditional linear programming method, and adding the unique resource characteristics and computing power difference characteristics of heterogeneous processors to the model. A new resource partitioning linear expression method is proposed for heterogeneous computing resources. This method can combine and allocate the specific computing resources required for task segmentation with the inherent resources of heterogeneous processors. It can well realize the planning ability of supporting heterogeneous computing platforms that the classical planning method does not have, and the linear expression method has good scalability, and the system model can accommodate various types and unlimited numbers of heterogeneous computing resources.

[0085] In an embodiment of the present invention, by expanding the task structure and model, adding a predecessor and successor relationship for a single task, increasing the decision variables for task segmentation and setting the segmentation timing relationship to support the DAG task model, it is only necessary to input the task structure in the pre-parameters to generate a scheduling window that conforms to the predecessor and successor relationship of the task during the planning process.

[0086] In the embodiments of the present invention, in combination with the needs of the aerospace field, the optimization objective function of the scheduling length, task migration, and the number of core activations described by the decision variables can save energy, improve system robustness, and reduce task migration overhead under the premise of meeting the two hard conditions of reasonable resource division and system real-time guarantee.

[0087] like Figure 6 , Figure 7 As shown, an embodiment of the present invention provides a device for determining the time division of periodic segmented tasks on a heterogeneous computing platform. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. From the hardware level, Figure 6 As shown, a hardware architecture diagram of a computing device where a time deterministic partitioning device for periodic segmented tasks of a heterogeneous computing platform is located is provided in an embodiment of the present invention. Figure 6 In addition to the processor, memory, network interface, and non-volatile memory shown in the figure, the computing device in which the device is located in the embodiment may also generally include other hardware, such as a forwarding chip responsible for processing messages, etc. Taking software implementation as an example, Figure 7 As shown, as a device in a logical sense, the CPU of the computing device in which it is located reads the corresponding computer program in the non-volatile memory into the memory and runs it. This embodiment provides a device for determining the time division of periodic segmented tasks on a heterogeneous computing platform, and the device includes:

[0088] The task collection unit 702 is used to obtain heterogeneous platform parameters and task collection parameters;

[0089] A static scheduling table generating unit 704 is used to generate a static scheduling table using a static scheduling algorithm according to the heterogeneous platform parameters and the task set parameters;

[0090] The task scheduling unit 706 is used to input the static scheduling table into the constructed linear programming algorithm model to obtain a time-deterministic task scheduling table, so as to schedule the task processor to execute the task according to the time-deterministic task scheduling table; wherein the linear programming algorithm model is constructed based on preset constraints and preset optimization objective functions, and the preset constraints include task complete execution constraints, task deadline constraints, segmented task timing constraints, segmented task processor partitioning constraints and task execution window constraints; the preset objective function is obtained by optimizing the task scheduling length in the task set, the number of migrations of task segments in different processors and the number of activated cores of the processor platform.

[0091] In an embodiment of the present invention, the task collection unit 702 can be used to execute step 100 in the above method embodiment, the static scheduling table generation unit 704 can be used to execute step 102 in the above method embodiment, and the task scheduling unit 706 can be used to execute step 104 in the above method embodiment.

[0092] In one embodiment of the present invention, the heterogeneous platform parameters include processor type and processor quantity, and the task set parameters include task type, task priority, task cycle, task segmentation structure, task start execution time, worst execution time and end time.

[0093] In one embodiment of the present invention, the preset constraint condition is obtained by setting in the following manner:

[0094] Based on the task set parameters, respectively obtain the execution length decision variable, the execution start time decision variable, the execution end time decision variable and the processor allocation decision variable of each segment in each task instance in each task cycle;

[0095] Constraining the execution length decision variable, the execution start time decision variable, and the execution end time decision variable respectively to obtain the preset constraint conditions;

[0096] The task complete execution constraint is: the execution length decision variable is greater than or equal to the worst execution time of the task segment corresponding to the task instance;

[0097] The task deadline constraint is: the execution end time decision variable is less than or equal to the cycle end time corresponding to the task instance;

[0098] The segmented task timing constraint is: the execution start time decision variable of the first segment in each task instance in each task cycle is greater than the cycle start time corresponding to the task instance, and the execution start time decision variable of the next segment in each task instance in each task cycle is greater than the execution end time decision variable of the previous segment;

[0099] The processor partitioning constraint of the segmented task is: the processor allocation decision variable and the execution length decision variable of the same segment in the same task instance are both greater than or equal to zero, and the sum of the allocation decision variables of all segments in the same task instance is equal to 1;

[0100] The task execution window constraint is: any segments in any two different task instances assigned to the same processor satisfy: the difference between the execution start time decision variables of any two task segments is greater than the execution end time decision variable of the first started task segment.

[0101] In one embodiment of the present invention, the preset objective function is constructed in the following manner:

[0102] The corresponding objective functions are constructed with the minimum task scheduling length in the task set, the minimum number of migrations of task segments in different processors, and the minimum number of activated cores on the processor platform as the goals respectively;

[0103] Perform a weighted summation on each objective function and its corresponding weight to obtain the preset objective function.

[0104] In one embodiment of the present invention, the preset objective function is as follows:

[0105]

[0106] Where F is the preset objective function, x, y and z are weight coefficients, n is the number of tasks, L i is the scheduling length of the i-th task, m is the number of processors, M i is the number of migrations between processors due to the assignment of different task segments to different processor cores, N p N is the flag indicating whether the pth processor is activated or not. p =1 indicates that the pth processor is activated, N p =0 means the pth processor is not activated.

[0107] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on a device for periodically segmenting tasks in a heterogeneous computing platform. In other embodiments of the present invention, a device for periodically segmenting tasks in a heterogeneous computing platform may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0108] The information interaction, execution process and other contents between the modules in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention. For the specific contents, please refer to the description in the embodiment of the method of the present invention, and no further description is given here.

[0109] An embodiment of the present invention also provides a computing device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, a method for time deterministic partitioning of periodic segmented tasks of a heterogeneous computing platform in any embodiment of the present invention is implemented.

[0110] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processor executes a method for time-deterministic partitioning of periodic segmented tasks on a heterogeneous computing platform in any embodiment of the present invention.

[0111] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program code stored in the storage medium.

[0112] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0113] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

[0114] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0115] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0116] An embodiment of the present application also provides a computer-readable storage medium, on which is stored at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement a method for time-deterministic partitioning of periodic segmented tasks on a heterogeneous computing platform provided by the above-mentioned method embodiments.

[0117] It should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0118] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various media that can store program codes.

[0119] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for determining the time division of periodic segmented tasks on a heterogeneous computing platform, characterized in that: Obtain heterogeneous platform parameters and task set parameters; Generate a static scheduling table using a static scheduling algorithm according to the heterogeneous platform parameters and the task set parameters; The static scheduling table is input into the constructed linear programming algorithm model to obtain a time-deterministic task scheduling table, so as to schedule the task processor to execute the task according to the time-deterministic task scheduling table; wherein the linear programming algorithm model is constructed based on preset constraints and preset objective functions, and the preset constraints include task complete execution constraints, task deadline constraints, segmented task timing constraints, segmented task processor partitioning constraints and task execution window constraints; the preset objective function is obtained by optimizing the task scheduling length in the task set, the number of migrations of task segments in different processors and the number of activated cores of the processor platform.

2. The method according to claim 1, characterized in that The heterogeneous platform parameters include processor type and processor quantity, and the task set parameters include task type, task priority, task cycle, task segmentation structure, task start execution time, worst execution time and end time.

3. The method according to claim 2, characterized in that The preset constraint condition is obtained by setting: Based on the task set parameters, respectively obtain the execution length decision variable, the execution start time decision variable, the execution end time decision variable and the processor allocation decision variable of each segment in each task instance in each task cycle; Constraining the execution length decision variable, the execution start time decision variable, and the execution end time decision variable respectively to obtain the preset constraint conditions; The task complete execution constraint is: the execution length decision variable is greater than or equal to the worst execution time of the task segment corresponding to the task instance; The task deadline constraint is: the execution end time decision variable is less than or equal to the cycle end time corresponding to the task instance; The segmented task timing constraint is: the execution start time decision variable of the first segment in each task instance in each task cycle is greater than the cycle start time corresponding to the task instance, and the execution start time decision variable of the next segment in each task instance in each task cycle is greater than the execution end time decision variable of the previous segment; The processor partitioning constraint of the segmented task is: the processor allocation decision variable and the execution length decision variable of the same segment in the same task instance are both greater than or equal to zero, and the sum of the allocation decision variables of all segments in the same task instance is equal to 1; The task execution window constraint is: any segments in any two different task instances assigned to the same processor satisfy: the difference between the execution start time decision variables of any two task segments is greater than the execution end time decision variable of the first started task segment.

4. The method according to claim 1, characterized in that: The preset objective function is constructed in the following way: The corresponding objective functions are constructed with the minimum task scheduling length in the task set, the minimum number of migrations of task segments in different processors, and the minimum number of activated cores on the processor platform as the goals respectively; Perform a weighted summation on each objective function and its corresponding weight to obtain the preset objective function.

5. The method according to claim 4, characterized in that The preset objective function is as follows: Where F is the preset objective function, x, y and z are weight coefficients, n is the number of tasks, L i is the scheduling length of the i-th task, m is the number of processors, M i is the number of migrations between processors due to the assignment of different task segments to different processor cores, N p N is the flag indicating whether the pth processor is activated or not. p =1 indicates that the pth processor is activated, N p =0 means the pth processor is not activated.

6. The method according to claim 1, characterized in that The static scheduling table is input into the constructed linear programming algorithm model to obtain a time-deterministic task scheduling table, including: Decoding the static scheduling table to obtain a decoded static scheduling table; wherein the decoded static scheduling table contains specific information of time-deterministic threads; The time-deterministic task scheduling table is created according to the decoded static scheduling table and the task execution function list.

7. A device for determining the time division of periodic segmented tasks on a heterogeneous computing platform, characterized in that: A task collection unit, used to obtain heterogeneous platform parameters and task collection parameters; A static scheduling table generating unit, configured to generate a static scheduling table using a static scheduling algorithm according to the heterogeneous platform parameters and the task set parameters; A task scheduling unit is used to input the static scheduling table into the constructed linear programming algorithm model to obtain a time-deterministic task scheduling table, so as to schedule the task processor to execute the task according to the time-deterministic task scheduling table; wherein the linear programming algorithm model is constructed based on preset constraints and preset optimization objective functions, and the preset constraints include task complete execution constraints, task deadline constraints, segmented task timing constraints, segmented task processor partitioning constraints and task execution window constraints; the preset objective function is obtained by optimizing the task scheduling length in the task set, the number of migrations of task segments in different processors and the number of activated cores of the processor platform.

8. A computing device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 6.

10. A computer program product, characterized in that The method comprises a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.