COMPUTER-IMPLEMENTED METHOD FOR MANAGING MEMORY AREAS OF A MEMORY UNIT IN A PROCESSING UNIT

20230222061 ยท 2023-07-13

    Inventors

    Cpc classification

    International classification

    Abstract

    A computer-implemented method for managing memory areas of a memory unit in a processing unit. The method includes determining, upon occurrence of a predefined event, a memory configuration profile according to which individual processes are in each case allowed to access individual memory areas of the memory unit, configuring the memory unit according to the determined memory configuration profile in such a way that the individual processes are in each case allowed to access individual memory areas of the memory unit, analyzing a performance of the processing unit while the particular processes are being executed in the processing unit and are accessing the individual memory areas according to the determined memory configuration profile, and providing a result of the analysis which describes the performance of the processing unit as a function of the determined memory configuration profile.

    Claims

    1-14. (canceled)

    15. A computer-implemented method for managing memory areas of a memory unit in a processing unit, the method comprising the following steps: determining, upon occurrence of a predefined event, a memory configuration profile according to which individual processes are each allowed to access respective individual memory areas of the memory unit; configuring the memory unit according to the determined memory configuration profile in such a way that the individual processes are each allowed to access the respective individual memory areas of the memory unit; analyzing a performance of the processing unit while the individual processes are being executed in the processing unit and are accessing the respective individual memory areas according to the determined memory configuration profile; and providing a result of the analysis which describes the performance of the processing unit as a function of the determined memory configuration profile.

    16. The method as recited in claim 15, wherein the determining of the memory configuration profile is carried out as a function of: process information that describes a relevance of the individual processes to be executed on the processing unit, and/or an access profile that describes accesses of the memory unit by the individual processes to be executed on the processing unit.

    17. The method as recited in claim 15, wherein the occurrence of the predefined event includes: receiving a request for executing one or multiple processes, and/or ending the execution of one or multiple of the individual processes, and/or expiration of a predefined time interval and/or occurrence of a predefined criterion relating to the performance.

    18. The method as recited in claim 15, wherein the analyzing of the performance of the processing unit includes: determining performance properties that describe a performance of the execution of the individual processes and/or a performance of operation of the overall processing unit, and comparing the determined performance properties to predefined performance conditions that describe a predefined performance for the execution of the individual processes and/or a predefined performance for the operation of the overall processing unit.

    19. The method as recited in claim 18, further comprising: providing the result of the analysis for taking it into account for determining the memory configuration profile upon a next occurrence of the predefined event, and/or redetermining, upon a next occurrence of the predefined event, the memory configuration profile as a function of a most recently determined memory configuration profile and as a function of the provided result of the analysis.

    20. The method as recited in claim 19, wherein the redetermining of the memory configuration profile includes: using the most recently determined memory configuration profile when as the result of the analysis, it is determined that the performance properties match the predefined performance conditions, and/or adapting the most recently determined memory configuration profile when as the result of the analysis it is determined that the performance properties deviate from the predefined performance conditions.

    21. The method as recited in claim 15, wherein the performance of the processing unit relates to: a response time of the individual processes, and/or errors when accessing data of the individual processes.

    22. The method as recited in claim 15, wherein at least one partition index value is associated with each of the individual processes to be executed in the processing unit, and the determining of the memory configuration profile includes: associating each partition index value with the individual memory areas of the memory unit to assign the individual memory areas in a process of the individual processes which the same partition index value is associated.

    23. The method as recited in claim 15, wherein the determining of the memory configuration profile includes: associating at least one partition index value with each of the individual processes, associating a partition index value with each of the individual memory areas of the memory unit in order to assign each of the individual memory areas to a particular process of the individual processes with which the same partition index value is associated.

    24. The method as recited in claim 15, wherein a partition index value is associated with certain of the individual processes to be executed in the processing unit, and the determining of the memory configuration profile includes: associating at least one partition index value to each of the individual memory areas of the memory unit to assign each of the individual memory areas to a particular process of the individual processes with which the same partition index value is associated, and/or directly assigning individual memory areas to particular processes of the individual processes with which no partition index value is associated.

    25. The method as recited in claim 15, wherein the determining of the memory configuration profile is carried out as a function of: partition information that describes an association of each of the individual processes to be executed in the processing unit with a partition index value.

    26. A processing unit configured to manage memory areas of a memory unit in the processing unit, the processing unit configured to: determine, upon occurrence of a predefined event, a memory configuration profile according to which individual processes are each allowed to access respective individual memory areas of the memory unit; configure the memory unit according to the determined memory configuration profile in such a way that the individual processes are each allowed to access the respective individual memory areas of the memory unit; analyze a performance of the processing unit while the individual processes are being executed in the processing unit and are accessing the respective individual memory areas according to the determined memory configuration profile; and provide a result of the analysis which describes the performance of the processing unit as a function of the determined memory configuration profile.

    27. A non-transitory machine-readable memory medium on which is stored a computer program for managing memory areas of a memory unit in a processing unit, the computer program, when executed by a computer, causing the computer to perform the following steps: determining, upon occurrence of a predefined event, a memory configuration profile according to which individual processes are each allowed to access respective individual memory areas of the memory unit; configuring the memory unit according to the determined memory configuration profile in such a way that the individual processes are each allowed to access the respective individual memory areas of the memory unit; analyzing a performance of the processing unit while the individual processes are being executed in the processing unit and are accessing the respective individual memory areas according to the determined memory configuration profile; and providing a result of the analysis which describes the performance of the processing unit as a function of the determined memory configuration profile.

    Description

    BRIEF DESCRIPTION OF THE DRAWINGS

    [0052] FIG. 1 schematically shows one preferred example embodiment of a processing unit according to the present invention, which is configured to carry out one preferred specific example embodiment of a method according to the present invention.

    [0053] FIG. 2 schematically shows one preferred specific example embodiment of a method according to the present invention as a block diagram.

    DETAILED DESCRIPTION OF EXAMPLE EMBODIMENTS

    [0054] A processing unit is schematically illustrated in FIG. 1 and denoted by reference numeral 100. For example, processing unit 100 may be used in a (motor) vehicle and designed as a control unit. Control unit 100 executes safety-critical processes that are used for safe operation and for controlling the vehicle, for example in the course of engine control or in the course of autonomous or automated driving.

    [0055] Control unit 100 includes a processor unit 110 that may be designed, for example, as a multicore processor with a plurality of processor cores on which a plurality of processes 111, 112, 113, 114 are executed in each case.

    [0056] For example, processor unit 100 may execute time-critical processes or real-time processes that are to meet a real-time condition, as well as best effort processes that are to be executed as quickly as possible according to the so-called best effort principle.

    [0057] Control unit 100 also includes a memory unit 120 that is designed as a cache memory, for example. Memory unit 120 includes a plurality of memory areas 121, 122, 123, 124, for example memory pages in the form of virtual or logical memory areas, which may be addressed with the aid of virtual or logical memory addresses. These virtual memory addresses may be translated into actual, physical memory addresses in order to map virtual memory areas 121, 122, 123, 124 onto actual, physical memory areas (so-called memory frames).

    [0058] The illustration of executed processes 111, 112, 113, 114 and of memory areas 121, 122, 123, 124 is purely schematic and by way of example. It is understood that an even greater number of processes may be executed on the individual processor cores, and that memory unit 120 may also include a greater number of memory areas. Furthermore, it is understood that processing unit 100 may include even further components, for example further memory units, terminals for connection to peripheral devices, etc.

    [0059] Individual processes 111, 112, 113, 114 executed in processor unit 100 may temporally and jointly access memory unit 120 as well as individual memory areas 121, 122, 123, 124 of memory unit 120. To prevent the occurrence of memory collisions and to prevent the processes from influencing one another's execution, processing unit 100 is configured, in particular by programming, to carry out one preferred specific embodiment of a method according to the present invention, schematically illustrated as a block diagram in FIG. 2 and explained in greater detail below.

    [0060] Process information concerning individual processes 111, 112, 113, 114 to be executed in processing unit 100 or properties of these processes is determined in a step 201. This process information may describe a relevance, priority, or criticality of the individual processes. For example, the process information describes whether the individual processes are in each case a time-critical process. In addition, the process information may describe requirements of the individual processes, for example assigned priority values and a required quality of service or QoS requirements.

    [0061] In addition, an access profile that describes accesses of individual processes 111, 112, 113, 114 to memory unit 120 is determined in step 201. For example, this access profile describes the number or size of data which the individual processes access in the course of their execution or which the processes cache during their execution. For example, the access profile also describes the particular number of memory areas accessed by the individual processes in each case, and whether or how often the individual processes in each case re-access the same memory area.

    [0062] For example, the determining of the process information and of the access profile may be carried out offline prior to an initial start-up of processing unit 100 in the course of step 201, or for example also during a manufacturing or programming process of the processing unit or the software that is to be executed in processing unit 100. For example, the process information and the access profile may be predefined by a corresponding software manufacturer and stored in processing unit 100.

    [0063] Furthermore, the process information and the access profile may also be determined during an offline phase or a calibration phase or test phase after initial start-up of processing unit 100. For example, the process information and the access profile may also be determined with the aid of statistical methods, for example by use of a surrogate model. In addition, the process information and the access profile may also be determined, for example, by analyzing a code underlying the processes, for example with the aid of static analysis tools.

    [0064] Processing unit 100 is put into operation or the regular operation of processing unit 100 is started in a step 202.

    [0065] It is checked in a step 203 whether a predefined event occurs. For example, this predefined event may be the expiration of a predefined time interval, the start of a new process, or the receipt of a request to execute a new process, or also the end of an executed process. In addition, the predefined event may include a predefined criterion, for example reaching a threshold value of an error counter, for example reaching a threshold value of a number of failed memory accesses, memory lapses, or cache misses.

    [0066] Upon occurrence of the predefined event, a memory configuration profile according to which individual processes 111, 112, 113, 114 are in each case allowed to access individual memory areas 121, 122, 123, 124 of memory unit 120 is determined in step 204.

    [0067] The determining of this memory configuration profile takes place as a function of the process information determined in step 201 and the access profile determined in step 201. For example, particular memory areas 121, 122, 123, 124 may in general be reserved for access by particular processes 111, 112, 113, 114, without specific assignments.

    [0068] In addition, individual memory areas 121, 122, 123, 124 may also be specifically assigned to particular processes 111, 112, 113, 114. For this purpose, in general it may be initially determined how many memory areas are assigned to a particular process. It is subsequently determined in particular which specific memory areas are assigned to this process. A memory area in question is assigned to a particular process in such a way that only one of these processes is allowed exclusive access to this memory area.

    [0069] The assignment of the individual memory areas takes place in such a way that no conflicts or collisions can occur when the memory areas are being accessed, and that requirements of the individual processes, for example real-time conditions or best effort-conditions, may be met.

    [0070] The individual memory areas may, for example, be directly assigned to the particular processes. In addition, the assignment may also take place with the aid of software-based partitioning, for example. For this purpose, in each case at least one partition index value may be associated with each process 111, 112, 113, 114 to be executed in processing unit 100, for example a color or a color value (coloring, cache coloring, or page coloring). For example, this association may be made a priori, or the association may take place online in the course of determining the memory configuration profile.

    [0071] Within the scope of the memory configuration profile, a memory area is assigned to a process, for example by associating the same partition index value to this memory area as for the particular process.

    [0072] Furthermore, for example at least one partition index value may be associated in each case with only a portion of processes 111, 112, 113, 114 to be executed in processing unit 100. Thus, within the scope of the memory configuration profile, an appropriate partition index value may be associated with a portion of memory areas 121, 122, 123, 124, and another portion may be directly assigned to processes.

    [0073] Moreover, the memory configuration profile may be determined as a function of partition information that is determined, for example, during an offline phase or a calibration phase or test phase, in the course of which processing unit 100 is operated with appropriate software-based partitioning and examined in order to learn the memory access behavior of processes 111, 112, 113, 114. The assignment of memory areas 121, 122, 123, 124 may thus be determined as a function of partitioning that takes place offline, without carrying out specific partitioning online.

    [0074] In a step 205, memory unit 120 is configured so that in general, individual processes 111, 112, 113, 114 are each allowed to access particular individual memory areas 121, 122, 123, 124 according to the determined memory configuration profile, or in the special case of cache coloring, so that individual memory areas 121, 122, 123, 124 are assigned to particular processes 111, 112, 113, 114 according to the determined memory configuration profile. Thus, the memory configuration profile is implemented in memory unit 120 in step 205. For example, for this purpose entries in a memory management table may be changed, or for example a bit in an operating system of processing unit 100 may be set or changed.

    [0075] Individual processes 111, 112, 113, 114 are now executed in processing unit 100, and access assigned memory areas 121, 122, 123, 124 according to the memory configuration profile, in a step 206.

    [0076] A performance of processing unit 100 is analyzed in a step 207 while processes 111, 112, 113, 114 are accessing assigned memory areas 121, 122, 123, 124 according to the memory configuration profile. In the course of this analysis, for example present performance properties are determined which describe a performance of executed processes 111, 112, 113, 114 and of overall processing unit 100, for example execution time, latency, or waiting times as well as successful or unsuccessful memory accesses (cache hits, cache misses). These present performance properties are compared to predefined performance conditions which represent, for example, setpoint values, limiting values, or threshold values for the performance properties.

    [0077] In step 208 a result of this analysis 207 is provided which states, for example, whether the present performance properties at least essentially match the predefined performance conditions, or how greatly the present performance properties deviate from the predefined performance conditions.

    [0078] Steps 204 through 208 may be iteratively repeated during operation of processing unit 100, in each case triggered by occurrence of the predefined event. The analysis result determined in step 208 is provided for taking it into account for determining the memory configuration profile upon a next occurrence of the predefined event. If the predefined event according to step 203 reoccurs, the memory configuration profile is redetermined in step 204, in particular as a function of the determined analysis result.

    [0079] If a process that has already been executed in processing unit 100 is now re-executed, based on the analysis result the effectiveness of the assignment of the particular memory areas to this process may be assessed. For example, if the performance property of this process, for example its execution time, essentially matches the associated performance condition or the associated setpoint value, the most recent assignment of memory areas to this process may be maintained. However, if the performance property of this process deviates from the performance condition, a new assignment of memory areas may be determined. In contrast, if a new process which has not yet been executed in processing unit 100 is to be executed, a completely new memory configuration profile may also be determined.

    [0080] By such iterative determination and analysis of the memory configuration profile, the assignment of memory areas may be dynamically adapted online and improved, so that over time a best possible allocation of the memory areas may be learned.