Computer-implemented method and system for determining the maximum execution time of a computer program on a designated hardware unit
The method analytically determines the maximum execution time of computer programs on hardware units, ensuring real-time performance by calculating program paths and allocating tasks to appropriate hardware, addressing inaccuracies in existing methods and enhancing reliability in critical applications.
Patent Information
- Application Number
- DE102024201630
- Authority / Receiving Office
- DE · DE
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-02-22
- Publication Date
- 2025-08-28
AI Technical Summary
Existing methods for determining the maximum execution time of a computer program on hardware units are inaccurate and do not guarantee real-time performance, particularly in critical applications like autonomous driving, due to reliance on empirical measurements and arbitrary code fragment selection.
A method that analytically determines the maximum execution time of a computer program by identifying atomic instructions and calculating the execution time of program paths, considering input values, hardware states, and external events, and allocating the program to hardware units capable of executing within a guaranteed time window.
Ensures reliable real-time execution of critical functions by accurately determining and assigning computer programs to hardware units with sufficient computing capacity, enhancing safety and reliability in systems with real-time requirements.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[0001] The invention relates to a computer-implemented method and a system for determining the maximum execution time of a computer program on a given hardware unit.
[0002] The following definitions, descriptions and statements retain their respective meaning for and apply to the entire disclosed subject matter of the invention.
[0003] The maximum execution time is also called the worst-case execution time. Several factors must be considered when determining the execution times of services on specific hardware units. For example, real-time requirements: Many vehicle functions, especially in the area of autonomous driving, require real-time responses. This means that services must be executed within guaranteed time windows to ensure the safety and reliability of the system. The allocation of these services must consider the capabilities and limitations of the respective hardware to achieve optimal performance. It is important to know the maximum execution times of the services on the respective hardware units, especially to meet real-time requirements.
[0004] A maximum execution time must be determined in advance before the assignment and execution of the respective program code on the designated hardware is started.
[0005] The problem with determining the maximum execution time of a program code is that the execution time varies depending on which program path the program code is executed on. A program path refers to the sequence of instructions or commands that are processed during the execution of a program based on a specific input or set of conditions. Each program path represents a potential execution flow of the program, which is influenced by the input values, internal states, or external events. The challenge in determining the maximum execution time is to analyze all possible program paths, especially in complex programs with many conditional branches and loops, since the execution time can vary greatly depending on the path traversed.
[0006] In the current art, the maximum execution time of a given program code on a specific hardware is determined through a combination of static code analysis of selected program code fragments. This involves testing the execution of the program code on the specific computer hardware with a varying set of conditions as input parameters to execute program paths. The underlying steps are: a.) static code analysis of selected program code fragments; b.) Measuring the execution time of selected conditions that lead to specific program paths.
[0007] For example, US 2013 / 0139131 A1 discloses a method for reducing program execution time in a multiprocessor system through parallel processing. The critical path of a program whose execution time is to be reduced is shortened by splitting it into multiple processes. The resulting processes are then assigned to individual processors. A processing program whose execution time is to be reduced loads the source code of the program consisting of multiple process blocks. The processing program then tests all possible cuts for a critical path and then finds a cut that enables the processing time of the process blocks after determining the cut as the shortest. However, such tests are more of an estimate based on empirically generated measurement data than an analytical determination. However, such an estimate for optimization does not guarantee the maximum possible execution time.
[0008] Further prior art is disclosed in US 7,886,272 B1.
[0009] For static code analysis, the results depend heavily on how arbitrarily or purposefully the code fragments were selected. For testing and measurement, the conditions and parameters of the executed code should be chosen to cover the longest possible program path and the longest execution time.
[0010] In this technical context, one object of the invention was to determine how the maximum execution time of a program code on a designated computer hardware can be determined in an improved manner.
[0011] The subject matter of the independent and subordinate claims each solves this problem. Advantageous embodiments of the invention emerge from the definitions, the subclaims, the drawings, and the description of preferred embodiments.
[0012] According to one aspect, the invention provides a computer-implemented method for determining the maximum execution time of a computer program on a designated hardware unit.
[0013] The hardware unit can be, for example, an integrated circuit, an application-specific integrated circuit, or a system-on-chip. The hardware unit can, for example, comprise one or more CPUs, GPUs, FPGAs, memory units, and other electronic components. Intended, or also designated, hardware unit refers to the fact that some computer programs, such as services, can only be executed on specially designed hardware due to their computationally intensive nature or specific performance requirements. For example, certain data processing or analysis services could run on high-performance servers or clusters, while other services operate on standard hardware.For services that must meet strict security or compliance requirements, the dedicated hardware unit can ensure physical isolation from other systems or data, for example, through specialized security modules. In other cases, services can be designed to utilize specific hardware capabilities, such as GPU acceleration for machine learning or FPGAs for highly specialized data processing tasks. In such cases, the dedicated hardware unit will maximize the efficiency and performance of these services.
[0014] The method is not just about measuring time. It involves allocating the execution of the computer program to a hardware unit based on the maximum execution time, so that the hardware unit, depending on its computing capacity, can meet real-time requirements when executing the computer program in order to ensure the safety and reliability of a system comprising the hardware unit. The method also includes reallocating the computer program among several hardware units with different computing capacities. The method thus makes a technical contribution, in particular increasing the safety and reliability of hardware units under real-time requirements. The computer program provides a specific technical function. The technical function can, for example, include controlling a vehicle.Such control functions are critical functions that must be reliably performed in real time. The invention provides a corresponding technical contribution to this by determining the maximum execution time of a computer program and assigning it to the corresponding hardware unit. Execution of the computer program is assigned to the hardware unit if, based on its computing capacity and the maximum execution time, it can implement the technical function within a guaranteed time window. This fulfills real-time requirements, for example, in motor control systems, electric drive system control systems, or telecommunications applications.
[0015] In one step of the method, atomic instructions of the computer program are determined. For example, the source code of the computer program can be examined for atomic instructions using static program code analysis without executing the source code. Alternatively, atomic instructions can be determined during the execution of the computer program. An atomic instruction is an instruction in the computer program that can be executed by the hardware unit in one step without interruption and to which an individual execution time is assigned. The atomic instruction is a fundamental operation or instruction in a computer program that is considered an indivisible unit. Such instructions are the most elementary execution units that cannot be divided into smaller operations, which qualifies them for the assignment of individual execution times.
[0016] In a further step of the method, the respective execution times of the program paths of the computer program are determined as a function of the parameters. A program path is the sequence of atomic instructions that, depending on the computer program parameters, are processed by the hardware unit during the execution of the computer program. The computer program can, for example, include conditional decisions such as "if" and "else" statements, resulting in several possible program paths that can be followed depending on which conditions are met at runtime. The execution time of a program path is equal to the sum of the execution times of the atomic instructions in this program path.
[0017] In a further step, the maximum of the function is calculated by optimizing the parameters. The program path with the maximum execution time, and thus the maximum execution time of the computer program, is obtained. In contrast to the current state of the art, the execution time is therefore not determined by empirical tests, but calculated analytically.
[0018] According to a further aspect, the execution of the computer program is assigned to the hardware unit if, based on its computing capacity and maximum execution time, it can implement the technical function within a guaranteed time window. The guaranteed time window relates to the respective real-time requirements and can depend on the respective technical function. For example, if the computer program provides a function for controlling a vehicle, the guaranteed time window can be on the order of milliseconds. If, based on its computing capacity and maximum execution time, the hardware unit cannot implement the technical function within the guaranteed time window, the execution of the computer program is reallocated, comprising assigning another hardware unit.This procedural step as well as the preceding procedural steps each represent instructions that serve to solve a concrete technical problem, namely executing a technical function, for example vehicle control, within real-time requirements, using technical means, for example the hardware unit and the allocation of services using middleware.
[0019] According to a further aspect, the parameters of the computer program include input values, states of the hardware unit and / or external events.
[0020] According to another aspect, optimizing the parameters comprises varying the values of the parameters across respective value ranges of the parameters and / or combining individual parameters. According to one aspect, combining the parameters comprises the existence of dependencies between input values, for example, dependencies that influence the respective value range of the other input value.
[0021] According to another aspect, the computer program is a service within a service-oriented architecture. A service provides a specific technical function and makes it accessible, for example, via a network. The service can be used across different technology and platform boundaries of hardware units, provided a suitable execution environment for the program code exists on that same platform and hardware unit. Services have the advantage of functioning with minimal dependencies on other services and can therefore be flexibly integrated and reused in applications, such as software-defined vehicles. This creates a flexible, reusable service landscape.
[0022] According to another aspect, the computer program is a service of a software-defined vehicle (SDV). In a software-defined vehicle (SDV), the allocation and reallocation of services, where a service is a computer-executable program code, is a central process that determines how and where various software components and services are executed in the vehicle system. These components are critical to the vehicle's functionality, including, for example, infotainment, autonomous driving, and telematics systems. The allocation of these services must be carefully managed to ensure efficiency, safety, and performance.
[0023] According to a further aspect, the computer program provides an infotainment function of the vehicle, a function for longitudinal and / or lateral control of the vehicle and / or a function for a telematics system of the vehicle.
[0024] According to another aspect, an orchestrator assigns the execution of the computer program to the hardware unit. Middleware serves as a communication layer between the various software components and, for example, the vehicle hardware. The orchestrator is responsible, among other things, for managing service allocation by deciding which services are executed on which hardware units based, for example, on maximum execution times and computing capacity. Middleware functions as a platform within a complex software system. It acts as an additional layer between the operating system and the applications.
[0025] According to one aspect, the invention provides a system for determining the maximum execution time of a computer program on a designated hardware unit. The hardware unit may, for example, comprise one or more CPUs, GPUs, FPGAs, memory units, and other electronic components. The computer program provides a specific technical function. Execution of the computer program is assigned to the hardware unit if, based on its computing capacity and the maximum execution time, it can implement the technical function within a guaranteed time window. The system comprises a processor configured to perform the steps of the method described above.
[0026] The invention is illustrated in the following exemplary embodiments. They show: Fig. 1 a schematic representation of a computer program with three program paths and Fig. 2 a schematic representation of a method disclosed here.
[0027] In the figures, identical reference symbols designate identical or functionally similar reference parts. For clarity, only the relevant reference parts are highlighted in the individual figures.
[0028] Fig. Figure 1 shows a computer program 10. The computer program 10 reads input values as parameters I. The computer program 10 is, for example, a service for a software-defined vehicle. For example, the computer program 10 is provided via middleware. The computer program 10 itself provides a technical function, for example, a driving function. The computer program 10 is executed on a hardware unit H.
[0029] The computer program 10 comprises several atomic instructions A0, A1, ..., A4, B2, C1, ..., C5. During execution, the computer program 10 executes the atomic instructions A0, A1, ..., A4, B2, C1, ..., C5 in program paths A, B, C, for example, three program paths. The atomic instructions A0, A1, ..., A4 form a program path A, the atomic instructions A0, A1, B2 form a program path B, and the atomic instructions A0, C1, ..., C5 form a program path C.
[0030] Given the parameters I and the hardware H, the program path C includes most of the atomic instructions A0, C1, ..., C5.
[0031] The maximum execution time of the computer program 10 is determined by means of the Fig.2. The execution of the computer program 10 is assigned to the hardware unit H if, based on its computing capacity and maximum execution time, it can realize the technical function of the computer program within a guaranteed time window to meet real-time requirements.
[0032] In a step V1, the atomic instructions A0, ..., A4, B2, C1, ..., C5 are determined. In a step V2, the respective execution times of the program paths A, B, C are determined as a function of the parameters I for the program paths A, B, C. The execution time of a program path A, B, C is equal to the sum of the execution times of the atomic instructions A0, ..., A4, B2, C1, ..., C5 in this program path A, B, C. For example, the execution time of the program path C is equal to the sum of the execution times of the atomic instructions A0, C1, ..., C5. In a step V3, the maximum of the function is calculated by optimizing the parameters I, whereby the program path A, B, C with the maximum execution time is obtained. Reference symbol V1-V3 process steps 10 computer program A0, ..., A4, B2, C1, ..., C5 atomic instruction H Hardware unit I Parameter A, B, C program path QUOTES CONTAINED IN THE DESCRIPTION
[0000] This list of documents submitted by the applicant was generated automatically and is included solely for the convenience of the reader. This list is not part of the German patent or utility model application. The DPMA assumes no liability for any errors or omissions. Cited patent literature
[0000] US 2013 / 0139131 A1
[0007] US 7,886,272 B1
[0008]
Claims
[1] Computer-implemented method for determining the maximum execution time of a computer program (10) on a designated hardware unit (H), wherein the computer program (10) provides a specific technical function and an execution of the computer program (10) is assigned to the hardware unit (H) if, based on its computing capacity and the maximum execution time, the hardware unit (H) can realize the technical function within a guaranteed time window, the method comprising the steps: • Determining atomic instructions (A0, ..., A4, B2, C1, ..., C5) of the computer program (10), wherein an atomic instruction (A0, ..., A4, B2, C1, ..., C5) is a command in the computer program (10) that can be executed by the hardware unit (H) in one step without interruption and to which an individual execution time is assigned (V1); • for program paths (A, B, C) of the computer program (10), wherein a program path (P) is the sequence of atomic instructions (A0, ..., A4, B2, C1, ..., C5) which, depending on parameters (I) of the computer program (10), are processed by the hardware unit (H) during the execution of the computer program (10), determining the respective execution times of the program paths (A, B, C) as a function of the parameters (I), wherein the execution time of a program path (A, B, C) is equal to the sum of the execution times of the atomic instructions (A0, ..., A4, B2, C1, ..., C5) in this program path (A, B, C) (V2); • Calculating the maximum of the function by optimizing the parameters (I), whereby the program path (A, B, C) with the maximum execution time is obtained (V3). [2] Method according to claim 1, wherein the execution of the computer program (10) is assigned to the hardware unit (H) if, based on its computing capacity and the maximum execution time, it can realize the technical function within a guaranteed time window. [3] Method according to one of the preceding claims, wherein the parameters of the computer program (10) comprise input values, states of the hardware unit and / or external events. [4] Method according to one of the preceding claims, wherein the optimization of the parameters comprises varying the values of the parameters (I) over respective value ranges of the parameters (I) and / or combining individual ones of the parameters (I). [5] Method according to one of the preceding claims, wherein the computer program (10) is a service of a service-oriented architecture. [6] Method according to one of the preceding claims, wherein the computer program (10) is a service of a software-defined vehicle. [7] Method according to claim 6, wherein the computer program (10) provides an infotainment function of the vehicle, a function for longitudinal and / or lateral control of the vehicle and / or a function for a telematics system of the vehicle. [8] Method according to one of the preceding claims, wherein a middleware assigns the execution of the computer program (10) to the hardware unit (H). [9] System for determining the maximum execution time of a computer program (10) on a designated hardware unit (H), wherein the computer program (10) provides a specific technical function and an execution of the computer program (10) is assigned to the hardware unit (H) if, based on its computing capacity and the maximum execution time, it can realize the technical function within a guaranteed time window, wherein the system comprises a processor which is designed to carry out the steps of the method according to one of the preceding claims.
Citation Information
Patent Citations
Simulation of real-time software components based on logical execution time
DE102009027627B3
Programming real-time systems using data flow diagrams
GB2425622A
Supplying instruction to operational stations
US20060268967A1
Method and system for processing data queries
US20130262443A1