Procedures for managing resources of real-time systems

By dynamically allocating resources based on processing time milestones, the method addresses the challenge of coexisting real-time and event-driven applications, enhancing performance and resource utilization in real-time systems.

DE102023211451A1Inactive Publication Date: 2025-05-22CONTINENTAL AUTOMOTIVE TECHNOLOGIES GMBH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
DE102023211451
Authority / Receiving Office
DE · DE
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-11-17
Publication Date
2025-05-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Current resource management systems for real-time systems struggle to efficiently coexist with event-driven applications, leading to poor resource utilization and increased complexity due to the need for physical separation and dedicated resources.

Method used

A method that allocates resources dynamically based on the processing time of program code milestones, allowing for real-time applications to be executed predictably while enabling event-driven applications to utilize resources efficiently.

Benefits of technology

This approach enhances the overall performance and resource utilization of multicore systems, allowing real-time applications to meet their time constraints while enabling event-driven applications to quickly access resources, thereby improving system efficiency and responsiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The invention relates to a method for managing resources of real-time systems. The present invention further relates to a data processing system, a computer program, and a computer-readable medium. To enable an improvement in overall performance compared to methods known from the prior art, the method according to the invention comprises the following: - Allocating 1010 resources to execute a program code, - Starting 1020 a calculation cycle to process the program code and simultaneously starting a timer to determine a current processing time when a milestone in the program code is reached in the processing of the program code: - comparing 1030 a time value specified by the reached milestone with the current processing time obtained from the timer to determine a time difference between the time value of the milestone and the current processing time, and - Perform 1040 an action based on the time difference.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The present invention relates to a computer-implemented method for managing resources of real-time systems. The present invention further relates to a data processing system, a computer program, and a computer-readable medium.

[0002] Today's operating systems, often abbreviated to OS for Operation Systems, have a task and process manager that assigns resources, particularly the CPU, to a specific task or process for a specific time. This allows multiple processes or tasks to be processed in parallel on a single- or multi-processor system, also known as a multicore system. The resource manager, also known as a scheduler, which is part of the OS, ensures that the available resources, particularly one or more processor cores and / or CPUs, i.e. arithmetic processing units, are made available to the tasks or processes at staggered times. The resources are allocated according to certain fixed procedures. Well-known procedures, for example, allow the prioritization of tasks and processes.The higher the priority of a corresponding task or process, the more often or for a longer period of time resources are allocated to such tasks or processes. In Autosar systems, a desired processing time is also specified. In real-time systems, also called "RT systems" for short, care is taken to ensure that a time-critical task or process is always processed within the specified time or faster in the worst case scenario. In this case, an "RT system" is understood to be a combination of hardware and operating system OS that makes it possible to process an application in "real time", i.e. within a foreseeable or estimable time. In this case, an application is understood to be software that has an application-specific use and is processed on an RT system, preferably cyclically.

[0003] Today's resource managers, also called schedulers, allocate resources, particularly one or more processing cores, according to fixed procedures. The allocation procedure is based on the priority of the task or the computing time previously used. The actual progress of an affected application is not taken into account. This means that in the case of an RT application that is to be processed within a specified time period, the "worst case" scenario must always be considered. To reliably achieve this, in today's RT applications, resources are often permanently assigned to the application, i.e., a specific CPU is assigned to each application. A mixing of real-time and event-driven applications is avoided. This results in poor utilization of multi-core systems. In addition, a physical separation of the RT and non-RT applications is necessary, whereby it is well known that the RT applications must be allocated their own CPU cores and resources.The separation is done with multiple OS partitions that are managed by the hypervisor. In addition, resources are currently only partially utilized to ensure that free resources are still available in case of increased demand. This prevents the program code from crashing. However, the free resources remain unused.

[0004] The object of the present invention is to provide a method that enables the coexistence of applications with real-time requirements and event-driven applications in the same environment with shared resources. Furthermore, the invention is based on the object of enabling an improvement in overall performance compared to the approaches known from the prior art. Furthermore, the real-time capability should also be increased compared to the known Autosar systems, while simultaneously increasing resource utilization.

[0005] At least one of the aforementioned objects is achieved by a method, a data processing system, a computer program and a computer-readable medium according to the independent claims.

[0006] According to the invention, the method for managing resources of real-time systems comprises the following: - Allocating resources to execute a program code, - Starting a calculation cycle to process the program code and simultaneously starting a timer to determine a current processing time when a milestone in the program code is reached in the processing of the program code: - comparing a time value specified by the reached milestone with the current processing time obtained from the timer to determine a time difference between the time value of the milestone and the current processing time, and - Perform an action based on the time difference.

[0007] The described method according to the invention represents a type of progress tracking concept within a program code, e.g., the program code of an application. The method monitors the execution of a program code used in an RT application with regard to the runtime of a process or task. The runtime of the process or task is related to the execution of the program code.

[0008] This method allows for both runtime and predictive resource management, monitoring resource allocation and resource allocation. This ensures that an RT application is processed with a nearly homogeneous time distribution, regardless of how many applications are using the same resources in parallel. Even if only one application uses the resources, it is processed within the specified timeframe and not earlier. This also gives event-driven applications the opportunity to quickly obtain a free time slot and resources. The method described also allows for determining how an application behaves on a busy system over time, allowing for appropriate action to be taken based on this behavior. Furthermore, wait times for parallel tasks can be immediately taken into account.

[0009] Furthermore, the method supports cyclic processing of applications that must deliver results at a specific time, but also deliver intermediate results for other applications or expect different results. This is the case, for example, when merging data from different sensors.

[0010] For this purpose, at least one milestone is set in the program code, e.g. in the program code of an RT application, which is compared with the current runtime of the process during execution of the program code. The processing can be divided into several tasks, which are preferably controlled by a scheduler. Milestones are set in the code by a programmer or system architect. For this purpose, the program code is analyzed at least once with regard to runtime. Based on the code analysis, the number of operations and the necessary processing time on the target system are determined in order to be able to set realistic specifications and distribution of milestones. When the processing of the code reaches the milestone, the OS preferably checks whether the time specified by the milestone has been undershot, reached, or exceeded.Measured based on the time difference, which can also be a reference to the total runtime of a complete cycle, the OS preferably takes action. For example, if the milestone is far ahead, the application can wait a little longer for the next allocation of resources (CPU). However, if the milestone is behind, measures must be taken to catch up.

[0011] This method continuously checks the progress of program code execution, for example from an application. This does not happen in a task-specific manner, i.e. at the beginning or end of a task, but rather in a program code-specific manner. This makes it possible to integrate results from another process that is monitored in the same way without delay during program code execution, or to provide intermediate results for data fusion in a timely manner, i.e. punctually and without falling behind schedule. This allows RT applications to run well-coordinated in time, at the expense of non-RT applications. To have an indication of where the program code is in terms of chronology, a timer is used for timing control. This timer can be implemented in software or hardware and is started at the same time as a calculation cycle for executing the program code.The milestones are placed in the program code as time specifications, e.g., in ms / µs / ns or as a percentage of the desired runtime, e.g., as program instructions or compiler instructions. Any number of milestones can be assigned. It must be ensured, for example, by the compiler, that the milestones follow a specified timeline or are in the sequence as a percentage, e.g., 0%...20%...40%...80%...100%.

[0012] In one embodiment of the present invention, if the amount of the time difference falls below a first threshold, performing an action involves maintaining the allocated resources. In other words, a milestone in the program code is reached and the time specification matches the internal timer exactly or at least approximately. In such a case, no further action needs to be taken; the allocated resources are simply maintained, and processing continues until the next milestone in the code. Such a case corresponds to an ideal or desired or expected normal case.

[0013] In one embodiment of the present invention, if the current processing time is greater than the time value of the milestone, the execution of an action involves the allocation of additional resources. This means that a milestone is reached in the program code and the processing of the code has not progressed as far as it should. For example, the determined time difference between the time value of the milestone and the current processing time results in half a task being behind in processing. In such a case, the lost time is accelerated and thus made up for by allocating additional resources. This has the advantage that it is possible to react individually depending on the state of the processing time.

[0014] In one embodiment of the present invention, if the current processing time is less than the time value of the milestone, the execution of an action involves the release of allocated resources. Thus, if the milestone is reached in the code and it is determined that processing has progressed faster than expected, allocated resources can be released and assigned to other processes or applications to handle the corresponding program code. This can occur, for example, if the determined time difference suggests that a task can be skipped. The program is then processed using the remaining, unreleased, allocated resources until the next milestone. This offers the advantage of a sensible distribution of resources.

[0015] In one embodiment of the present invention, performing a measure involves extending the runtime for a task or process, e.g., of an RT application. This gives the corresponding task or process more time to complete its processing. This also means that the runtime or processing of the corresponding process or task is not interrupted or aborted, for example in order to transfer the resources used by the process or task to be processed to other processes or tasks. The extent to which more runtime needs to be allocated can be observed in an additional observation step. The knowledge of the extent to which the runtime of the process changes can then be additionally taken into account in a subsequent distribution of a milestone for the corresponding process or task. Additional resources are thus allocated.

[0016] In one embodiment of the present invention, performing an action involves deferring another task or process of an RT application. This prevents resources from being allocated to another process or task that might otherwise be given a higher priority. This results in more even processing of processes or tasks. Thus, additional resources are allocated.

[0017] In one embodiment of the present invention, performing a measure involves dynamically allocating additional processing cores. By allocating additional processing cores, processes or tasks can be processed more quickly thanks to more computing power, thus reducing their runtime. Furthermore, an improvement in the utilization of the processing cores can be achieved. Thus, additional resources are allocated.

[0018] In one embodiment of the present invention, the implementation of a measure comprises dynamically allocating additional bandwidths, in particular dynamically allocating memory bandwidths and / or dynamically allocating cache memory. This can accelerate the processing of processes or tasks, possibly at the expense of another process or task. This can be exploited to enable temporal homogenization in the processing of an application. This can be used as a tool to ensure that an application is processed within a specified time and not earlier. Furthermore, an improvement in the utilization of memory bandwidths can be achieved. Additional resources are thus allocated.

[0019] In one embodiment of the present invention, performing an action comprises postponing all actions if, upon reaching a subsequent milestone, the temporal situation returns to normal. It is understood that if the temporal situation returns to normal, no further action is required to make up for lost time in a process or task. This ensures that no unnecessary actions are taken once the temporal situation has returned to normal. The temporal situation returns to normal when a normal case occurs. As described above, a normal case occurs when a milestone is reached and the time difference falls below a first limit.

[0020] In one embodiment of the present invention, the execution comprises the execution of at least two, preferably at least three, measures. This can be particularly advantageous when a process or task needs to be processed particularly quickly for homogenization in the processing of an application.

[0021] According to one aspect of the invention, a computer program comprises instructions which, when the program is executed by a computer, cause the computer to carry out the method according to the invention.

[0022] According to a further aspect of the invention, a computer-readable medium comprises instructions which, when executed by a computer, cause the computer to carry out the method according to the invention.

[0023] According to yet another aspect of the invention, a data processing system comprises means for carrying out the method according to the invention.

[0024] The invention can be used in all systems requiring RT applications, in particular in industrial systems of all kinds, in avionics and in vehicles.

[0025] Further variants and their advantages can also be found in the following description of exemplary embodiments using an illustration.

[0026] Fig. 1 shows schematically an embodiment of a method according to the invention.

[0027] In Fig.1 schematically shows an embodiment of a method 1000 according to the invention for managing resources of real-time systems. The method provides for the allocation 1010 of resources for executing a program code. Furthermore, a calculation cycle for executing the program code is started 1020 and a timer for determining a current processing time is started simultaneously. When a milestone present in the program code is reached in the execution of the program code, a comparison 1030 takes place between a time value specified by the reached milestone and the current processing time obtained from the timer. Based on these values, a time difference between the time value of the milestone and the current processing time is determined. Based on the determined time difference, an action is carried out 1040.

[0028] When a milestone is reached, three events can occur: i) The milestone is reached and the time specified by the milestone matches exactly or approximately the started internal timer. The time difference thus falls below a first threshold. ii) The milestone in the code is reached, and the OS detects that processing is completed much too early. The determined time difference allows, for example, a task to be skipped. The current processing time is therefore less than the time value of the milestone. iii) The milestone in the code is reached, and the OS detects that processing is behind schedule. The current processing time is therefore greater than the time value of the milestone.

[0029] If an event under i) occurs, then a normal case exists and no further action needs to be initiated, only the allocated resources are retained 1220. If an event under ii) occurs, then allocated resources can be released 1210. If an event under iii) occurs, then measures must be taken to make up for the lost time and additional resources are allocated 1200.

[0030] Optionally, performing 1040 an action that results in allocating 1200 additional resources may include extending 1050 the runtime for a task or process. Optionally or additionally, performing 1040 an action that results in allocating 1200 additional resources may include postponing 1060 another task or process. Optionally or additionally, performing 1040 an action that results in allocating 1200 additional resources may include dynamically allocating 1070 additional computing cores. Optionally or additionally, performing 1040 an action that results in allocating 1200 additional resources may include dynamically allocating 1080 additional bandwidths, in particular dynamically allocating 1090 memory bandwidths and / or dynamically allocating 1100 cache memory.Optionally or additionally, the implementation 1040 of an action may include a postponement 1110 of all actions if a normalization of the temporal situation is achieved upon reaching a subsequent milestone.

Claims

[1] Method (1000) for managing resources of real-time systems with: - Allocating (1010) resources to execute a program code, - Starting (1020) a calculation cycle to process the program code and simultaneously starting a timer to determine a current processing time when a milestone in the program code is reached in the processing of the program code: - comparing (1030) a time value specified by the reached milestone with the current processing time obtained from the timer to determine a time difference between the time value of the milestone and the current processing time, and - Perform (1040) an action based on the time difference. [2] Method (1000) according to claim 1, characterized by that in the event that the amount of the time difference falls below a first limit value, the implementation (1040) of a measure comprises: - Maintain (1220) allocated resources. [3] Method according to one of claims 1, characterized by that in case the current processing time is greater than the time value of the milestone, performing (1040) an action has: - Allocating (1200) additional resources. [4] Method according to claim 1, characterized by that in case the current processing time is less than the time value of the milestone, the execution (1040) of an action has: - Release (1210) of allocated resources. [5] Method according to claim 3, characterized by that carrying out (1040) a measure has: - Dynamic allocation (1070) of additional processing cores. [6] Method according to one of claims 3 or 5, characterized by that carrying out (1040) a measure has: - Extending (1050) the runtime for a task or process and / or - Postpone (1060) another task or process. [7] Method according to one of the preceding claims 3, 5 or 6, characterized by that carrying out (1040) a measure has: - Dynamic allocation (1080) of additional bandwidths, in particular dynamic allocation (1090) of memory bandwidths and / or dynamic allocation (1100) of cache memory. [8] Method according to one of the preceding claims, characterized by that carrying out (1040) a measure has: - Postponement (1110) of measures if a normalization of the time situation is achieved upon reaching a subsequent milestone. [9] A data processing system comprising means for carrying out the method according to any one of claims 1 to 8. [10] A computer program comprising instructions which, when executed by a computer, cause the computer to carry out a method according to any one of claims 1 to 7. [11] A computer-readable medium comprising instructions which, when executed by a computer, cause the computer to carry out a method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for controlling processes

    DE102017206626A1

  • Method for operating a computing unit

    DE102021203061A1

  • System and information processing method

    EP3316132B1

  • Cognitive scheduling engine

    US20210173706A1