Method for optimizing processes
By optimizing the implementation timetable and application allocation strategy of the processor unit, the problem of processing task allocation in a multiprocessor environment is solved, and efficient resource utilization and processing time are achieved.
Patent Information
- Application Number
- CN202280093438.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-01-10
- Filing Date
- 2022-12-05
- Publication Date
- 2024-11-01
AI Technical Summary
In a multiprocessor environment, it is difficult to effectively utilize processor resources when optimizing the allocation of processing tasks and parallel execution of multiple applications, resulting in extended processing time and waste of resources.
By determining the optimized processor unit implementation schedule, the application is allocated to each processor unit according to the order and parallelism of the application and the processor is sleepy during the idle period to achieve the shortest processing duration and resource optimization.
The optimal utilization of processor resources is achieved, the processing time is shortened, the processing efficiency is improved, and the resource consumption is reduced.
Smart Images

Figure CN118891612A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for optimizing the execution of a process comprising a plurality of applications by a plurality of processor units. Background Art
[0002] When implementing computer-based processes, efforts are usually made to implement the process as quickly and resource-efficiently as possible. When using multiple processor units, there is the possibility of implementing applications of the process in parallel if the structure of the process allows for parallel implementation. In complex processes with multiple applications and multiple processor units for implementing the applications, dividing the process onto different processor units so that the applications of the process are implemented by the processor units can be a complex task to set up. Summary of the invention
[0003] It is therefore an object of the present invention to provide an improved method for optimizing the execution of a process comprising a plurality of applications by a plurality of processor units.
[0004] This object is achieved by a method for optimizing the execution of a process comprising a plurality of applications by a plurality of processor units according to independent claim 1. Advantageous embodiments are the subject matter of the dependent claims.
[0005] According to one aspect of the present invention, there is provided a method for optimizing the implementation of a process comprising a plurality of applications by a plurality of processor units, comprising:
[0006] receiving a plurality of applications to be executed on a plurality of processor units of a process to be executed, wherein the order of execution of the applications is defined by the process;
[0007] The implementation of the processing is optimized by determining an optimized implementation schedule for the multiple processor units, wherein, in the optimized implementation schedule for the processor units, a time sequence of implementation of applications to be implemented by the processor units according to the implementation sequence of the processing is defined starting from a start time point of the implementation of the processing, and wherein the optimized implementation schedule is characterized in that, in the parallel implementation of the processing applications by the processing units according to the optimized implementation schedule, the implementation duration of the processing is minimized.
[0008] The technical advantage can be achieved in that a high-performance method can be provided for optimizing the implementation of a process. By determining an optimized implementation schedule for each processor unit available for implementing an application (the implementation schedule defines the time sequence of the implementation of the application of the process by the corresponding processor unit, wherein the total duration of the implementation of all applications of the implementation schedule by the processor unit is minimized in each case), it is possible to achieve optimal full utilization of processor resources and optimal and shortest possible implementation of the complete process by the available processor units. By implementing the process according to the implementation schedule determined for the processor unit, it is possible to achieve an optimized implementation of the process, in which the optimal full utilization of the processor resources is achieved. In turn, it is possible to achieve an implementation method for the process that saves as much resources as possible.
[0009] In the sense of the present application, a process is a computer-controlled process that can be implemented by multiple processor units. A process can include multiple subordinate sub-processes. The process or the sub-process includes at least two applications to be implemented in series, a first application (the process starts with the first application) and a last application (the process ends with the implementation of the last application). Each application involves different calculations, which are to be implemented by the corresponding processor units and which together constitute the whole of the process. The calculation results of a single application can be further used in the implementation of other applications of the process (the other applications are implemented one after another in time). Applications using the calculation results of other applications are implemented in series. Applications that can be implemented without the calculation results of other applications can be implemented in parallel with other applications.
[0010] According to one specific embodiment, the plurality of applications are arranged in a directed acyclic graph, wherein the applications are designed as nodes in the directed graph and the order in which the applications are executed is defined by the edges connecting the nodes.
[0011] This makes it possible to achieve the technical advantage that a compact representation of the process is achieved.
[0012] According to one embodiment, the optimization includes:
[0013] Assigning a first application of the directed acyclic graph to the first processor unit so that the first application is executed by the first processor unit starting from a start time point of execution of the processing, and defining an end point of execution of the application as a first decision time point;
[0014] assigning the idle applications to the other processor units in each case so as to be executed by the processor units from a start time of the execution of the processing until a first decision time, wherein the corresponding processor units are placed in a dormant state during the execution of the idle applications;
[0015] Starting from a first application of the directed acyclic graph, calculating an execution path through the directed acyclic graph having the shortest execution duration, wherein the execution path includes applications that are connected to the first application in the directed acyclic graph and are connected to one another in each case via corresponding edges, and wherein the execution duration for the execution path is formed as the sum of the execution durations of the applications of the execution path;
[0016] allocating a second application directly connected to the first application in an execution path having the shortest execution duration to the first processor unit so as to be executed by the first processor unit starting from a first decision time point, and defining an end point of execution of the second application as a second decision time point;
[0017] In the case where the directed acyclic graph includes, in addition to the execution path with the shortest execution duration, a further execution path starting from the first application and arranged in parallel with the execution path with the shortest execution duration, the further application which is directly connected to the first application in the directed acyclic graph and does not belong to the execution path with the shortest execution duration is assigned to a further processor unit so as to be executed by the further processor unit starting from the first decision time point, and an end point of execution of the further application is defined as the further decision time point;
[0018] If the directed acyclic graph does not include any further execution paths other than the execution path with the shortest execution duration, which further execution paths start from the first application and are arranged in parallel with the execution path with the shortest execution duration, or if the number of further processor units is greater than the number of further execution paths, the idle application is allocated to the further processor unit so that the idle application is executed by the further processor unit starting from the first decision time until the second decision time or until the earliest decision time in the group of the second decision time and the further decision time;
[0019] For a second application to be executed by the first processor unit and another application to be executed by another processor unit in parallel with the second application, starting from the second application or another application of the directed acyclic graph, respectively, an execution path having the shortest execution duration through the directed acyclic graph is calculated, and the other application directly connected to the second application or another application in the execution path having the shortest execution duration is assigned to the first processor unit or another processor unit so that it is executed by the first processor unit or another processor unit starting from a second decision time point or another decision time point, and an end point of execution of the other application is defined as the other decision time point;
[0020] assigning the idle application to all processor elements to which no application was assigned for the respective decision point in time, so as to execute the idle application until the decision point in time which follows immediately in time from the respective decision point in time;
[0021] Continue: Calculate an implementation path for further applications, and assign the further applications of the calculated implementation path to corresponding processor units for implementing the applications, and assign idle applications to processor units until the last application of the directed non-cyclic graph is reached, and for each processor unit, define such a sequence of applications to be implemented by the corresponding processor unit and idle applications sought for the processor unit as an implementation schedule for the corresponding processor unit.
[0022] Thus, the technical advantage can be achieved: a structured calculation of an optimized execution schedule can be achieved. By assigning applications to the respective processor units so that they can be executed by the respective processor units (wherein, taking into account that such parallel execution is carried out when the parallel execution of the applications can be realized by the processing), an optimal degree of load of the plurality of processor units can be achieved and an optimized execution of the processing associated therewith can be achieved. By calculating the execution path of the application with the corresponding execution path with the shortest execution duration in time, an accurate estimation of the execution duration for the application selected and assigned to the respective processor unit can be achieved. Thus, an accurate determination of the shortest total execution time of the plurality of applications assigned to the respective processor units can be achieved. By assigning idle applications, it can be achieved that if no application to be executed is found for the respective processor unit for any determinable period of time, the processor unit is temporarily placed in a dormant state for this period of time. By the dormant state, the execution of an application by one processor unit can be coordinated in time with the execution of other applications by other processor units. By this coordination, on the one hand, the order of execution of the applications defined in the processing can be followed, and on the other hand, a shorter total execution duration can be achieved than when direct execution of the applications occurs. Overall, an improved optimization of the execution of the process can thereby be achieved.
[0023] In the sense of the present application, an execution path is an application of a process to be executed serially one after the other within the graphical representation of the process. An execution path can be, for example, a sub-process of a process.
[0024] According to one specific embodiment, when assigning the applications to be executed to the processor units, it is taken into account that all applications of the directed acyclic graph are executed.
[0025] This makes it possible to achieve the technical advantage that a complete process is carried out and all applications of the process are assigned to the corresponding processor units for execution.
[0026] According to one specific embodiment, when assigning the application to be executed to the processor units and when calculating the shortest execution path, it is taken into account whether the application can be executed by any processor unit or is to be executed by a specific processor unit, in particular when the plurality of processor units includes processor units of different processor types.
[0027] This can achieve the following technical advantages: if necessary, different applications may only be implemented by specific processor units or should be implemented according to the process. For example, it can be provided that a single application should be implemented by a graphics processor GPU instead of a central processing unit CPU. By taking this into account when calculating the implementation path, these applications can be assigned to the corresponding CPU or GPU. The limitation that certain applications can only be implemented on specific processors is a limitation on the possible implementation schedule and a limitation on the optimization of the implementation of the process in general. Therefore, by taking into account the limitations of the implementation of a single application, an improved optimization of the implementation of the process can be achieved.
[0028] According to one embodiment, the optimization is performed by applying an optimization algorithm to a directed acyclic graph.
[0029] This achieves the technical advantage that a precise and rapid optimization can be achieved.
[0030] According to one specific embodiment, the optimization is carried out by applying a search algorithm, in particular the A* algorithm, to a directed acyclic graph.
[0031] This can achieve the technical advantage that a precise and fast optimization can be achieved. Here, the A* algorithm is configured to find an optimized execution schedule for each of the processor units, which has the minimum execution duration of the application to be executed. To this end, the A* algorithm finds for each processor unit an execution path with the shortest execution duration via a directed acyclic graph.
[0032] According to one embodiment, the plurality of processors include a central processing unit CPU and / or a graphics processor GPU.
[0033] This makes it possible to achieve the technical advantage that the processing in which an application is to be executed on a CPU and / or a GPU can be optimized.
[0034] According to one embodiment, the process is a control process of the vehicle.
[0035] The technical advantage can thereby be achieved that a precise vehicle control can be provided which requires reduced computing power due to an optimized control process.
[0036] According to a further aspect of the present invention, a computing unit is provided, which is configured to implement a method according to any one of the above embodiments for optimizing the execution of a process including a plurality of applications by a plurality of processor units.
[0037] According to another aspect of the present invention, there is provided a computer program product comprising instructions, which, when the program is implemented by a data processing unit, cause the data processing unit to implement a method according to any one of the above embodiments for optimizing the implementation of processing including multiple applications by multiple processor units. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] An embodiment of the present invention is explained with reference to the following drawings. In the drawings:
[0039] Figure 1 A schematic diagram showing a process with multiple applications;
[0040] Figure 2 A diagram showing a graph of a method for optimizing a process with multiple applications according to one embodiment;
[0041] Figure 3 A flow chart showing a method for optimizing a process with multiple applications according to one embodiment; and
[0042] Figure 4 A schematic diagram shows a computer program product. DETAILED DESCRIPTION
[0043] Figure 1 A schematic diagram of a process 200 having a plurality of applications 201 , 202 , 203 , 204 , 205 , 206 , 207 is shown.
[0044] exist Figure 1 The process 200 shown in the figure comprises a plurality of applications 201, 202, 203, 204, 205, 206, 207, which are arranged relative to each other in the graphical representation. For example, the process 200 may be a control process of a vehicle, wherein different applications 201, 202, 203, 204, 205, 206, 207 represent different processing steps within the process 200.
[0045] In the shown Figure 1In the embodiment shown, the process 200 is represented in the form of a directed and acyclic graph 211. Here, the individual applications 201, 202, 203, 204, 205, 206, 207 are shown as nodes 209 of the directed, acyclic graph 211, which are connected to each other via directed edges 210. Here, the directed edges 210 are shown as arrows, which indicate the direction of data processing by the different applications 201, 202, 203, 204, 205, 206, 207. Here, the direction of the arrows of the directed edges 210 indicates the direction of data processing starting from the first application 201 of the process 200 to the last application 207. In the embodiment shown, the directed graph 211 has two execution paths 215, 216. Here, the execution paths 215, 216 extend between the first application 201 and the seventh application 207 in a parallel arrangement. Here, execution path 215 includes the second, fourth and sixth applications, while execution path 216 includes the third and fifth applications. The parallel arrangement of execution paths 215, 216 means that applications 201, 202, 203, 204, 205, 206, 207 of the two execution paths 215, 216 can be executed in parallel.
[0046] The process 200 shown and in particular the graphical representation shown are merely exemplary and should not limit the invention. In particular, the invention can be applied to any process 200 with any number of applications, which are arranged relative to each other in any number of execution paths.
[0047] Figure 2 A graphical illustration of a method 100 for optimizing a process 200 having a plurality of applications 201 , 202 , 203 , 204 , 205 , 206 , 207 according to one specific embodiment is shown.
[0048] Below, according to Figure 2 Figures a to d illustrate the method 100 according to the present invention for Figure 1 The method 100 is used to optimize the implementation of a process 200 having a plurality of applications 201, 202, 203, 204, 205, 206, 207 by a plurality of processor units.
[0049] The following is based on Figure 1 The exemplary process 200 of 201 , 202 , 203 , 204 , 205 , 206 , 207 explains the working principle of the method 100 according to the invention. However, the method 100 according to the invention should not be limited to such a process 200 and, rather, can be implemented on any process 200 with any number of applications 201 , 202 , 203 , 204 , 205 , 206 , 207 .
[0050] In the example shown, the implementation of process 200 by three different processor units is described. Here, the processor unit can be configured as a central processing unit CPU and / or a graphics processor GPU, for example. In the example shown, two processor units are configured as CPUs and one processor unit is configured as a GPU.
[0051] In order to optimize the execution of process 200, an optimized execution schedule is generated for each processor unit, in which the time sequence of applications 201, 202, 203, 204, 205, 206, 207 of process 200 to be executed by the corresponding processor unit is defined. For this purpose, each processor unit is first assigned an execution schedule 212, 213, 214, and the execution time of the applications 201, 202, 203, 204, 205, 206, 207 to be executed by the processor unit is optimized accordingly by the execution of method 100.
[0052] In figure a, three execution schedules 212, 213, 214 for three processor units are graphically shown. Here, the execution schedules 212, 213, 214 show time scales on which the execution durations of the applications 201, 202, 203, 204, 205, 206, 207 to be respectively executed by the processor units can be read.
[0053] In order to optimize the execution of the process 200, according to the method 100 according to the present invention, the first application 201 of the process 200 is assigned to the first processor unit for executing the first application 201. In the figure a, the first processor unit is represented by the execution schedule 212. In addition to the assignment of the first application 201 to the first processor unit, the end point of the execution of the first application 201 is further defined as a first decision time point T1.
[0054] The method 100 according to the invention for optimizing the execution of the process 200 is essentially provided that as many parallel-executable applications 201, 202, 203, 204, 205, 206, 207 of the process 200 as possible are executed in parallel by a plurality of processor units. However, since the first application 201 of the process 200 arranged as a directed and acyclic graph 211 does not include any application that can be executed in parallel with the first application 201, for the period in which the first application 201 is executed by the first processor unit, the corresponding idle application 208 is allocated to another processor unit. The idle application 208 has the same length as the first application 201, and therefore has the same execution duration as the first application 202, and starts from the start time of the execution of the process 200 and ends at the first decision time T1 of the first application 201.
[0055] Starting from the execution schedule 212, 213, 214 of the graph a for the first processor unit, starting from the first decision time, the execution path with the shortest execution time via the directed acyclic graph 211 is calculated, and further applications of the process 200 that are directly connected to the first application 201 according to the calculated execution path with the shortest execution time are determined and assigned to the first processor unit. Figure 1 In the directed acyclic graph 211 of the process 200 in FIG. 2 , starting from the first application 201, the implementation path 215 is the implementation path having the shortest implementation duration through the directed acyclic graph 211. Although the implementation path 215 has more applications than the implementation path 216, the implementation durations of the individual applications are generally shorter in the implementation path 215, thereby resulting in a shorter total implementation duration of the implementation path 215 relative to the implementation path 216.
[0056] In the implementation path 215, the second application 202 is directly connected to the first application 201 via the corresponding edge 210 of the directed acyclic graph 211. Therefore, in the graph b, the second application 202 is assigned to the first processor unit represented by the implementation schedule 212. In addition, the end point of the implementation of the second application 202 by the first processor unit is defined as the second decision time point T2.
[0057] Similarly to the first processor unit, when the corresponding process 200 has corresponding parallel execution paths, for the other processor units, starting from the first application 201 and starting from the first decision time T1, the corresponding execution paths are calculated by the directed acyclic graph 211, and the other applications directly connected to the first application 201 are found and assigned to the corresponding processor units. In the example shown, the process 200 has parallel execution paths 215, 216, so that for the second processor unit represented by the execution schedule 213, the third application 203 is identified as an application that can be executed in parallel with the second application 202 and is directly connected to the first application 201, and is assigned to the second processor unit. In addition, the end point of the execution of the third application 203 is defined as the third decision time T3.
[0058] For the case where the corresponding process 200 does not have any parallel execution paths 215, 216, or for the case where the number of available processor units exceeds the number of parallel execution paths 215, 216, an idle application 208 is respectively assigned to the remaining processor units. Here, an idle application 208 is not an application of the process 200 to be optimized, but represents the sleep state of the processor unit that respectively executes the idle application 208. Figure 1 In the example shown in , the process 200 includes only two execution paths 215, 216 that can be executed in parallel and therefore has other applications that can be executed in parallel with the two applications 202, 203 in addition to the applications 202, 203 that can be executed in parallel. Therefore, the idle application 208 is assigned to the third processor unit. Here, the execution duration of the idle application 208 is defined based on the earliest decision time point of the two decision time points of the second application 202 or the third application 203. In the example shown, the execution duration of the third application 203 is shorter than the execution duration of the second application 202, so that the third decision time point T3 is arranged closer to the first decision time point T1 than the second decision time point T2 of the second application 204. Accordingly, the idle application 208 to be executed by the third processor unit is limited to the third decision time point T3 in its execution.
[0059] In the diagram c, since the second application 202 has a longer execution time than the third application 203, additional idle applications 208 are also assigned to the second and third processor units. Therefore, according to the present invention, the idle applications 208 are assigned to the processor units in such a way that until the decision time point, either the actual application 201, 202, 203, 204, 205, 206, 207 of the process 200 or the corresponding idle application 208 is respectively assigned to the processor unit.
[0060] Analogously to the previously described method steps, after the applications 202, 203 have been allocated and the execution schedules 212, 213, 214 have been filled with free applications 208 until the second decision time T2 of the second application 202, for which second decision time T2, starting from the second application 202, the execution path with the shortest execution time via the directed acyclic graph 211 of the process 200 is calculated, and the application directly connected to the second application 202 on the calculated execution path with the shortest execution duration is identified and assigned to one of the processor units. Figure 1 In the example shown in , starting from the second application 202, an implementation path with the shortest implementation duration is given via the implementation path 215 of the graph 211. On the implementation path 215, the fourth application 204 is directly connected to the second application 202. However, the fourth application 204 is characterized by the graphics processor GPU relative to the other applications and in particular relative to the first to third applications 201 to 203 in that the fourth application 204 is to be implemented by the graphics processor GPU, which is represented by the third processor unit in the example shown. Correspondingly, in the graph c, the fourth application 204 is assigned to the third processor unit represented by the implementation schedule 214, and the end point of the implementation of the fourth application 204 is defined as the fourth decision time point T4.
[0061] Similarly, for the other processor units, starting from the second decision time T2 for the third application 203, the corresponding execution path with the shortest execution duration is calculated, and the other applications directly connected to the third application 202 are identified. Figure 1 In the illustrated embodiment, the fifth application 205 of the implementation path 216 is directly connected to the third application 203 and can therefore theoretically be implemented in parallel with the fourth application 204. However, in the illustrated example, similar to the fourth application 204, the fifth application 205 is also characterized in that it can also only be implemented by the graphics processor GPU of the third processor unit, which is represented by the implementation schedule 214. Therefore, parallel implementation of the applications 204, 205 is not possible.
[0062] Therefore, the directed acyclic graph 211 does not have any further applications that can be executed in parallel with the fourth application 204. Therefore, according to what has been mentioned above, starting from the second decision time T2, the idle application 208 is respectively assigned to a further processor unit, which is represented by the execution schedule 212, 213. Here, the idle application 208 is limited to the fourth decision time T4 of the fourth application 204, so that the three processor units again do not seem to be executing any further applications at the fourth decision time T4.
[0063] Analogously to the above-mentioned embodiments, for the fourth decision time T4, the execution path with the shortest execution duration is calculated starting from the third application 203 via the directed acyclic graph 211, and further applications arranged on the calculated processing graph and directly connected to the third application 203 are identified. As already explained, the fifth application 205 is thereby identified, which, however, can only be executed by the third processor unit. Therefore, in the graph d, starting from the fourth decision point T4, the fifth application 205 is assigned to the third processor unit and thus to the execution schedule 214, and the corresponding fifth decision time T5 is defined.
[0064] Furthermore, for the fourth application 204, a corresponding execution path with the shortest execution time is calculated, which execution path is based on Figure 1 An example of is given by implementation path 215, and identifies another application arranged in the implementation path and directly connected to fourth application 204. Therefore, the sixth application 206 directly connected to the fourth application 204 in the implementation path 215 is assigned to the first processor unit represented by the implementation schedule 212, and the corresponding sixth decision time point T6 is defined as the end point of the implementation of the sixth application 206.
[0065] Since the process 200 has only two implementation paths 215, 216 that can be implemented in parallel, a corresponding idle application 208 is assigned to the second processor unit represented by the implementation schedule 213, which, on the one hand, runs from the decision time point T4 to the sixth decision time point T6 of the sixth application 206 and, on the other hand, runs from the sixth decision time point T6 to the fifth decision time point T5 of the fifth application 205.
[0066] According to the method described above, then, for the sixth application 206, the corresponding implementation path having the shortest implementation duration via the directed and acyclic graph 211 is calculated, and the application arranged on the calculated implementation path and directly connected to the sixth application 206 is identified. According to the illustrated example, the calculated implementation path having the shortest implementation duration is given by the implementation path 215, and, therefore, the seventh application 207 arranged on the implementation path 215 and directly connected to the sixth application 206 is assigned to the first processor unit, and the end point of the implementation of the seventh application 207 is identified as the seventh decision time point T7.
[0067] Since the seventh application 207 is the last application of the process 200 and the process 200 therefore does not have any further applications that can be executed in parallel with the seventh application 207, the execution schedules 213, 214 are each filled with idle applications 208 from the fifth decision time T5 until the seventh decision time T7 of the seventh application 207. Since the seventh application 207 is the last application of the process 200, the method 100 ends. Here, such optimized execution schedules 212, 213, 214 created for a plurality of processor units in their entirety constitute Figure 1 An optimized implementation of process 200 is provided.
[0068] The method 100 according to the present invention can be executed, for example, in the programming or realization of the process 200 to be respectively carried out, and can create corresponding optimized implementation schedules 212, 213, 214. Subsequently, such created optimized implementation schedules 212, 213, 214 can be stored in a corresponding database or directly in the implementation code of the process 200, so that when the process 200 is carried out, for example, when the process is carried out by a vehicle control device, the process 200 can be directly carried out according to the calculated, optimized implementation schedules 212, 213, 214.
[0069] When executing the process 200 according to the calculated optimized execution schedule 212, 213, 214, an optimized degree of utilization of the available processor units can be achieved. This allows a resource-saving execution of the process 200 to be achieved by minimizing the possible waiting times of the different applications 201, 202, 203, 204, 205, 206, 207 for executing the process 200 through the full degree of utilization of the available processor units and thereby reducing the occupation of the processor units for executing the process 200 to a minimum duration.
[0070] Figure 3 A flow chart of a method 100 for optimizing a process 200 having a plurality of applications 201 , 202 , 203 , 204 , 205 , 206 , 207 according to one specific embodiment is shown.
[0071] According to the method 100 of the present invention, in order to optimize the implementation of a process 200 comprising a plurality of applications 201, 202, 203, 204, 205, 206, 207 by a plurality of processor units, in a first method step 101, a plurality of applications 201, 202, 203, 204, 205, 206, 207 to be implemented on a plurality of processor units of the process 200 to be implemented are first received.
[0072] In a further method step 103, the execution of the process 200 is optimized by determining an optimized execution schedule 212, 213, 214 for a plurality of processor units, wherein in the optimized execution schedule for the processor units, starting from the start time of the execution of the process, the time sequence of the execution of the applications 201, 202, 203, 204, 205, 206, 207 to be executed by the processor units according to the execution sequence of the process 200 is defined. The optimized execution schedule 212, 213, 214 is characterized in that the execution duration of the process 200 is minimized when the applications 201, 202, 203, 204, 205, 206, 207 of the process 200 are executed in parallel by the processor units.
[0073] To this end, in method step 105 , first application 201 of process 200 is assigned to the first processor unit so that first application 201 is executed from the start time of execution of process 200 and the end point of execution of first application 201 is defined as a first decision time.
[0074] In a further method step 107 , idle applications 208 are respectively assigned to further processor units in order to be executed by these processor units starting from the start time of the execution of process 200 until the first decision time T1 .
[0075] In a further method step 109 , starting from the first application 201 and the first decision time T1 , an implementation path with the shortest implementation duration is calculated via the directed acyclic graph 211 , wherein the implementation duration of the implementation path is formed as the sum of the implementation durations of the applications 201 , 202 , 203 , 204 , 205 , 206 , 207 of the implementation path.
[0076] In a further method step 111, a second application 202 directly connected to the first application 201 of the calculated execution path is defined and allocated to the first processor unit for execution thereof. Furthermore, the end point of the execution of the second application 202 is defined as a second decision time T2.
[0077] In a further method step 113, when the directed non-cyclic graph 211 has further implementation paths in addition to the determined implementation path, further applications that are directly connected to the first application 201 and can be implemented in parallel with the second application 202 and do not belong to the implementation path with the shortest implementation duration are identified for further processor units and assigned to the further processor units, and the end points of the implementation of the correspondingly assigned applications are defined as further decision time points T3, T4, T5, T6, T7.
[0078] In a further method step 115, idle applications 208 are assigned to further processor units for execution by the processor units if directed acyclic graph 211 of process 200 does not have any further execution paths besides the identified execution path with the shortest execution duration, or if the number of execution paths is less than the number of available processor units. In this case, the execution of idle applications 208 is limited to the period between the first decision time T1 and the second decision time T2.
[0079] In a further method step 117, for the second application 202, starting from the second decision time T2, an execution path with the shortest execution duration is calculated via the directed acyclic graph 211, further applications 203, 204, 205, 206, 207 arranged on the calculated execution path and directly connected to the second application 202 are identified and assigned to the first processor unit or a further processor unit for execution. Here, the end points of the execution of the further applications 201, 202, 203, 204, 205, 206, 207 are identified as further decision times T3 to T7.
[0080] In a further method step 119 , all processor units to which no application is assigned at the respective decision time are assigned the respective idle application 208 , in order to execute the idle application until the decision time that follows in time from the respective decision time.
[0081] In a further method step 121, the following steps are continued: calculation of execution paths for the identified and assigned further applications; corresponding assignment of further applications directly connected to the assigned applications to the respective processor units; definition of further decision times; assignment of idle applications 208 to the respective processor units for which no application to be executed can be identified, until reaching the last application 207 of the directed acyclic graph 211 of the process 200. Subsequently, such a sequence of applications 201, 202, 203, 204, 205, 206, 207 to be executed by the respective processor units and idle applications 208 to be executed, which is determined for the respective processor units, is indicated as an optimized execution schedule 212, 213, 214 for the respective processor units.
[0082] Figure 4 A schematic diagram of a computer program product 300 is shown, which includes instructions which, when the program is executed by a computing unit, cause the computing unit to implement a method 100 for optimizing the implementation of a process 200 including a plurality of applications 201, 202, 203, 204, 205, 206, 207 by a plurality of processor units.
[0083] In the embodiment shown, computer program product 300 is stored on a storage medium 301. In this case, storage medium 301 may be any desired storage medium known from the prior art.
Claims
1. A method (100) for optimizing the implementation of a process (200) comprising a plurality of applications (201, 202, 203, 204, 205, 206, 207) by a plurality of processor units, the method comprising: - receiving (101) a plurality of applications (201, 202, 203, 204, 205, 206, 207) to be executed on a plurality of processor units of a process (200) to be executed, wherein the order of execution of the applications (201, 202, 203, 204, 205, 206, 207) is defined by the process (200); - Optimizing (103) the implementation of the process (200) by determining an optimized implementation schedule (212, 213, 214) for the multiple processor units, wherein, in the optimized implementation schedule for one processor unit, starting from the start time point of the implementation of the process, a time sequence of the implementation of the applications (201, 202, 203, 204, 205, 206, 207) to be implemented by the processor units according to the implementation sequence of the process (200) is defined, and wherein the optimized implementation schedule (212, 213, 214) is characterized in that when the applications (201, 202, 203, 204, 205, 206, 207) of the process (200) are implemented in parallel by the processor units according to the optimized implementation schedule (212, 213, 214), the implementation duration of the process (200) is minimized.
2. The method (100) according to claim 1, wherein: The plurality of applications (201, 202, 203, 204, 205, 206, 207) are arranged in a directed acyclic graph, wherein in the directed acyclic graph (211), the applications (201, 202, 203, 204, 205, 206, 207) are constructed as nodes (209), and the order in which the applications (201, 202, 203, 204, 205, 206, 207) are executed is defined by edges (210) connecting the nodes (209).
3. The method (100) according to claim 2, wherein: The optimization (103) includes: - assigning (105) the first application (201) of the directed acyclic graph to a first processor unit so that the first processor unit starts to execute the first application (201) from the start time point of the execution of the process (200), and defining the end point of the execution of the first application (200) as a first decision time point (T1); - assigning (107) an idle application (208) to another processor unit in each case, so that it is executed by the processor unit from the start time of the execution of the process (200) until the first decision time (T1), wherein during the execution of the idle application (208), the corresponding processor unit is placed in a dormant state; - starting from a first application (201) of the directed acyclic graph, calculating (109) an execution path through the directed acyclic graph (211) having the shortest execution duration, wherein the execution path comprises applications (201, 202, 203, 204, 205, 206, 207) which are connected to the first application (201) and to one another in each case via corresponding edges (210) in the directed acyclic graph (211), and wherein the execution duration of the execution path is formed as the sum of the execution durations of the applications (201, 202, 203, 204, 205, 206, 207) of the execution path; - assigning (111) a second application (202) directly connected to the first application (201) in the execution path with the shortest execution duration to the first processor unit so that the first processor unit starts executing the second application (202) from the first decision time point (T1), and defining the end point of the execution of the second application (202) as a second decision time point (T2); - in the case where the directed acyclic graph (211) includes, in addition to the execution path with the shortest execution duration, a further execution path starting from the first application (201) and arranged in parallel with the execution path with the shortest execution duration, a further application (203, 204, 205, 206, 207) directly connected to the first application (201) in the directed acyclic graph (211) and not belonging to the execution path with the shortest execution duration is assigned (113) to the further processor unit so that the further processor unit executes the further application (203, 204, 205, 206, 207) starting from the first decision time point (T1), and the end point of the execution of the further application (203, 204, 205, 206, 207) is defined as a further decision time point (T3, T4, T5, T6, T7); - when the directed acyclic graph (211) does not include any further execution paths other than the execution path with the shortest execution duration, which start from the first application and are arranged in parallel with the execution path with the shortest execution duration, or when the number of the further processor units is greater than the number of the further execution paths, the idle application (208) is allocated (115) to the further processor units so that the idle application (208) is executed by the further processor units starting from the first decision time point (T1) until a second decision time point or until the earliest decision time point in time in the group of the second decision time point (T2) and the further decision time points (T3, T4, T5, T6, T7); - for the second application (202) to be executed by the first processor unit and the other application to be executed by the other processor unit in parallel with the second application, respectively, starting from the second application or the other application of the directed acyclic graph, an execution path having the shortest execution duration via the directed acyclic graph (211) is calculated (117), and the other application directly connected to the second application or the other application in the execution path having the shortest execution duration is allocated to the first processor unit or the other processor unit so that it is executed by the first processor unit or the other processor unit from the second decision time point or the other decision time point, and the end point of the execution of the other application is defined as the other decision time point; - assigning (119) an idle application (208) to all processor elements for which no application was assigned for the respective decision point in time, so that the idle application is executed until the decision point in time which follows immediately after the respective decision point in time; -Continue (121): calculate an implementation path for the additional application; and assign the additional application of the calculated implementation path to the corresponding processor unit for implementing the application; and assign idle applications (208) to the processor unit until the last application (207) of the directed acyclic graph (211) is reached; and for each processor unit, define the order of applications (201, 202, 203, 204, 205, 206, 207) to be implemented by the corresponding processor unit and idle applications (208) as an implementation schedule (212, 213, 214) for the corresponding processor unit.
4. The method (100) according to claim 3, wherein: When assigning the applications (201, 202, 203, 204, 205, 206, 207) to be executed to the processor units, it is taken into account that all applications (201, 202, 203, 204, 205, 206, 207) of the directed acyclic graph (211) are executed.
5. The method (100) according to claim 3 or 4, wherein: When assigning the applications (201, 202, 203, 204, 205, 206, 207) to be executed to the processor units and when calculating the shortest execution path, it is taken into account whether the applications (201, 202, 203, 204, 205, 206, 207) can be executed by any processor unit or are to be executed by a specific processor unit, in particular when the plurality of processor units include processor units of different processor types.
6. The method (100) according to any one of the preceding claims, wherein: The optimization is achieved by applying an optimization algorithm to the directed acyclic graph (201, 202, 203, 204, 205, 206, 207).
7. The method (100) according to any one of the preceding claims, wherein: The optimization is carried out by applying a search algorithm, in particular an A* algorithm, to the directed acyclic graph (201, 202, 203, 204, 205, 206, 207).
8. The method (100) according to any one of the preceding claims, wherein: The plurality of processors include a central processing unit CPU and / or a graphics processor GPU.
9. The method (100) according to any one of the preceding claims, wherein: The process is a control process of the vehicle.
10. A computing unit configured to implement a method (100) according to any one of the preceding claims 1 to 9 for optimizing the execution of a processing comprising a plurality of applications (201, 202, 203, 204, 205, 206, 207) by a plurality of processor units.
11. A computer program product (300), comprising instructions which, when executed by a data processing unit, cause the data processing unit to implement a method (100) according to any one of claims 1 to 9 for optimizing the implementation of processing comprising a plurality of applications (201, 202, 203, 204, 205, 206, 207) by a plurality of processor units.
