Method for analyzing the consumption of hardware resources by an operating system of an embedded computing system in a motor vehicle, associated device and computer program
Patent Information
- Authority / Receiving Office
- FR · FR
- Patent Type
- Patents
- Current Assignee / Owner
- FAURECIA CLARION ELECTRONICS EUROPE
- Filing Date
- 2023-10-02
- Publication Date
- 2026-06-19
AI Technical Summary
It is challenging to accurately assess the consumption of hardware resources, particularly during the startup phase of an operating system in an on-board calculation system of a motor vehicle, without significantly impacting the resource consumption.
A process for analyzing hardware resource consumption involves initializing an audit connection with the operating system, sending data collection instructions, recovering collected data, and analyzing it to generate a textual and/or graphic description of resource usage, with minimal impact on the startup process.
This process allows for the analysis of hardware resource consumption with minimal additional resource usage during the startup phase, enabling more accurate optimization and distribution of resource consumption.
Abstract
Description
Title of the invention: Method for analyzing the consumption of hardware resources by an operating system of an embedded computing system in a motor vehicle, associated device and computer program
[0001] The present invention relates to a method for analyzing the consumption of material resources by an operating system intended to be implemented by a computing system embedded in a motor vehicle.
[0002] It also relates to an associated device for analyzing the consumption of material resources and an associated computer program.
[0003] The invention lies in the field of the implementation of products, in the form of software services or software applications, embedded on board motor vehicles.
[0004] Hereafter, the term software applications will be used.
[0005] Software applications are installed for execution by an operating system implemented by an embedded computing system, also called an on-board computer.
[0006] The installation of new software applications and their execution by the embedded operating system consume hardware resources of the embedded computing system, whether memory, computing power, or electrical energy. Therefore, for each new software application or each update to an existing software application, it is important to precisely monitor the consumption of one or more of these hardware resources. Furthermore, during the software application development phase, knowledge of resource consumption allows for optimization to reduce or better distribute hardware resource consumption. This makes it possible to improve the integration of software applications providing various functionalities into motor vehicles.
[0007] However, it is difficult to assess the consumption of hardware resources, particularly during the boot phase of an operating system implemented by an embedded computing system, before actual integration. In particular, it is critical to evaluate memory consumption over time during the boot phase, as well as the total duration of the boot phase (boot time) and / or the power consumption during this phase.
[0008] Methods for inserting additional software code to be executed are known. during a development phase to perform the assessment of the consumption of these material resources, but this has the disadvantage of contributing to the consumption of material resources, including memory and computing resources, as well as electrical consumption, during the startup phase.
[0009] The invention aims to provide a method for evaluating the consumption of material resources, particularly during the startup phase of an operating system intended to be implemented by an embedded computing system, with a lesser impact on the consumption of material resources.
[0010] To this end, the invention proposes, according to one aspect, a method for analyzing the consumption of hardware resources by an operating system intended to be implemented by an embedded computing system in a motor vehicle for the execution of at least one software application, implemented by an analysis device comprising a communication interface module configured to communicate with said operating system via a connectivity and interaction protocol. This method comprises the following steps: - initializing a connection to the operating system; - sending to the operating system at least one instruction to collect data representative of the consumption of at least one type of hardware resources by the operating system, said at least one instruction being in the form of at least one command or script executable by said operating system, - retrieval of said data collected by the operating system, and - analysis of said collected data to obtain elaborated data from said collected data and generate a textual and / or graphic description of a consumption of material resources from said elaborated data.
[0011] Advantageously, the proposed method allows for the analysis of hardware resource consumption with minimal impact on the startup of the target operating system, each instruction applied during startup allowing for simple data collection.
[0012] The method for analyzing the consumption of material resources according to the invention may also have one or more of the characteristics below, taken independently or according to all technically feasible combinations.
[0013] Types of hardware resources include memory resources, computing resources, and energy resources.
[0014] The sending step includes sending an initialization file which causes the operating system to start and for the operating system to install and execute at least one data collection instruction, and for storage temporary of said data.
[0015] The data analysis also includes a calculation of statistical information relating to the average, minimum and maximum of material resources of each type consumed during the start-up phase.
[0016] The recovery of data collected by the analysis device includes the recovery of raw data relating to the consumption of at least one type of material resources recorded with a predetermined time frequency.
[0017] The operating system is an Android-type system.
[0018] The connectivity and interaction protocol is the “Android Debug Bridge” protocol, ADB.
[0019] According to another aspect, the invention relates to a device for analyzing the consumption of hardware resources by an operating system intended to be implemented by an embedded computing system in a motor vehicle, for the execution of at least one software application, the analysis device comprising a communication interface module configured to communicate with said operating system via a connectivity and interaction protocol. This analysis device includes: - a module for initializing a connection to the operating system; - a module for sending at least one instruction to the operating system collection of data representative of the consumption of at least one type of hardware resource by the operating system, said at least one instruction being in the form of at least one command or script executable by said operating system, - a module for retrieving said data collected by the operating system and - an analysis module for said collected data to obtain elaborated data from said collected data and to generate a textual and / or graphic description of material resource consumption from said elaborated data.
[0020] According to one feature, the sending module is configured to perform a sending of an initialization file, allowing installation of said at least one data collection instruction by the operating system, and execution of said at least one data collection instruction following the startup of the operating system.
[0021] According to another aspect, the invention relates to a computer program comprising software instructions which, when executed by a programmable electronic device, implement a method for analyzing the consumption of hardware resources as briefly described above.
[0022] The invention will become clearer upon reading the following description, given solely by way of non-limiting example, and made with reference to the drawings in which:
[0023] [Fig-1] [Fig.1] is a schematic representation of the main functional blocks tionals of a system comprising a device for analyzing the consumption of material resources of an operating system according to an embodiment;
[0024] [Fig.2] [Fig.2] is a synoptic diagram of the main steps in an analysis process the consumption of material resources according to a mode of implementation;
[0025] [Fig.3] [Fig.3] represents graphs obtained after consumption analysis of memory resources.
[0026] Fig. 1 schematically illustrates a device for analyzing the consumption of material resources by an operating system intended to be implemented by an embedded computing system.
[0027] The invention finds particular applications in the case of computing systems embedded on motor vehicles (not shown).
[0028] In the illustrated embodiment, the analysis device 2 is configured to communicate with the operating system 6, implemented by a computing system 4.
[0029] In one embodiment, the computing system 4 is a computing system separate from the analysis device 2, and of the same type as a targeted embedded computing system, or in other words, simulating the target embedded computing system.
[0030] In another embodiment, the computing system 4 is virtually reproduced on the analysis device 2, which makes it possible to execute the operating system 6 on the analysis device 2 in the same way as it would be executed on the intended embedded computing system.
[0031] Operating system 6, also called target operating system, is for example an Android ® system, in one of its versions adapted to operate in an embedded computing system.
[0032] The computing system 4 and the operating system 6 form a device executing the target operating system.
[0033] The analysis device 2 is preferably a programmable electronic device and comprises a processing unit 10 including one or more processors (CPU or GPU), a memory unit 12, a human-machine interface 14, including in particular a display screen, and a communication interface module 16. These elements are configured to communicate via a communication bus 18.
[0034] The communication interface module 16 is configured to communicate with the operating system 6 via a connectivity and interaction protocol carried by a communication protocol.
[0035] For example, in one embodiment, the communication protocol is the TCP protocol (for "Transmission Control Protocol") or USB (for "Universal Serial Bus"), and the connectivity and interaction protocol is the ADB software programming interface, short for "Android Debug Bridge".
[0036] The device running operating system 6 includes a background implementation module 20 (or "daemon" module) of the ADB software, and a boot module 22 of the target operating system 6.
[0037] Module 22 is configured to execute a boot phase of operating system 6, also called the BOOT phase, for the initialization of one or more software applications APP1, APP2, for their subsequent use. The software applications APP1, APP2 are loaded as executable code, in a programming language compatible with operating system 6. Each software application APP1, APP2 executes tasks successively or substantially in parallel, and potentially consumes memory, computing, and electrical resources.
[0038] Furthermore, during startup installation, the executable code of the software applications APP1, APP2 must be loaded into RAM (or random access memory) for subsequent execution.
[0039] The computing unit 10 of the hardware resource consumption analysis device 2 implements a module 30 for initializing a connection to the operating system 6, preferably during the startup or restart phase of the operating system. Alternatively, the analysis device 2 connects to and loads the data collection scripts on the operating system 6 while it is running.
[0040] It also includes a module 32 for sending to the operating system at least one instruction for collecting data representative of the operation of the operating system, an instruction being in the form of a command or a script executable by the operating system.
[0041] For example, in the example in [Fig.1], a Scr script is sent to the operating system.
[0042] Alternatively, several scripts are sent to the operating system, for example one script per type of raw data to be collected.
[0043] Preferably, the data collection instruction(s) are sent in an initialization file, which ensures that the instruction(s) will be executed during boot (BOOT) or restart of the operating system.
[0044] Operating system 6 receives and installs the data collection instruction(s) (e.g. scripts), these instructions being executed during operating system initialization.
[0045] For the analysis of resource consumption during operation, it is It is possible to use scripts as well as commands.
[0046] Data D representative of the operation of the operating system, for example memory consumption, are recorded (or stored) temporarily by the operating system 6.
[0047] Data storage is achieved by writing a file containing the data into memory. During the BOOT phase, file writing is not available initially, so the data D is temporarily stored in memory (RAM). Switching to file writing as soon as possible minimizes memory consumption for data retrieval.
[0048] According to one variant, the temporary impact of collecting and storing data D representative of the operation of the operating system is measured and taken into consideration thereafter.
[0049] The analysis device 2 also includes a module 34 for retrieving data D representative of the operating system's consumption of hardware resources, and a module 36 for analyzing the data D and generating a textual and / or graphical description of hardware resource consumption during the startup phase, for example, memory resource consumption and / or computing resource usage by the operating system. The analysis module 36 performs cross-analysis of the data D (or raw data) obtained for several instructions, thereby generating a comprehensive database that fully represents the operating system's consumption of hardware resources.
[0050] In addition, module 38 implements, in one embodiment, a generation of files, recorded in the analysis device, from the database developed, the files containing a graphic or textual description of the consumption of material resources.
[0051] This analysis module 36 is implemented by the analysis device 2 and therefore it has no impact on the operating system 6.
[0052] Optionally, the analysis device 2 includes a module 38 for displaying the textual and / or graphic description on the screen of the human-machine interface 14.
[0053] Alternatively or in addition, the textual and / or graphical description of the consumption of material resources is transmitted to a programmable device, possibly remote, for automatic operation, for example for implementing a rearrangement of the computational tasks of the software applications APP1, APP2, to smooth or reduce the consumption of material resources.
[0054] Modules 30, 32, 34, 36 and 38 are adapted to cooperate, as described in more detail below, to implement the method of analyzing the consumption of hardware resources by an operating system intended to be implemented by a system embedded computing, as described in more detail below, according to various embodiments.
[0055] In one embodiment, modules 30, 32, 34, 36 and 38 are implemented in the form of software instructions forming a computer program, which, when executed by a computer, implements the method of analyzing the consumption of hardware resources by an operating system intended to be implemented by an embedded computing system.
[0056] In an alternative not shown, modules 30, 32, 34, 36 and 38 are each implemented as programmable logic components, such as FPGAs (Field Programmable Gate Arrays), microprocessors, GPGPUs (General-purpose processing on graphics processing) components, or dedicated integrated circuits, such as ASICs (Application-Specific Integrated Circuits).
[0057] The computer program comprising software instructions is further capable of being stored on a computer-readable medium, not shown. A computer-readable medium is, for example, a medium capable of storing electronic instructions and being connected to a bus of a computer system. For example, a readable medium is an optical disc, a magneto-optical disc, ROM, RAM, any type of non-volatile memory (e.g., FLASH, NVRAM), a magnetic card, or an optical card.
[0058] Figure 2 is a synoptic diagram of the main steps in the analysis process of the consumption of hardware resources by an operating system intended to be implemented by an embedded computing system according to an embodiment.
[0059] The method comprises steps 40 implemented by the analysis device 2 and steps 42 implemented by the device executing the operating system, implemented by a computing system 4, physically or virtually separated from the analysis device 2, and simulating the computing system intended to be embedded on a motor vehicle.
[0060] The method includes a connection step 46, 48 between the analysis device and the operating system.
[0061] For example, the connection is initiated by the analysis device and involves several protocol exchanges to establish a secure connection. The connection initialization can be launched during a restart or during a phase of operating system use 6.
[0062] The method then includes sending 50 (in English “push”) at least one data collection instruction, for example in the form of one or more scripts.
[0063] The scripts contain sets of commands to be executed. Preferably, step 50 also includes sending an initialization file, which is installed by Operating System 6. The initialization file allows configuration of Operating System 6, and includes a request to launch scripts during the boot phase (BOOT).
[0064] Following a start or restart of the operating system, the implementation of the initialization file results in the execution of the instruction or instructions for collecting data during this start (or restart) phase.
[0065] Alternatively or in addition, the collection instructions may contain commands for collecting data during the operation phase of the operating system, after it has been started.
[0066] The data collection instruction, for example the script, includes indications of the type of hardware resources being monitored, including memory resources, computing resources, and energy resources.
[0067] The operating system implements steps 52 of installation of the received script(s), performs 54 the startup of the operating system and executes the initialization file, as well as the received script(s).
[0068] Data representative of the operation of the operating system, and more particularly of the consumption of resources of the type indicated by the script, are temporarily recorded (step 56).
[0069] In one embodiment, a script is provided per data to be measured.
[0070] For example, the script contains a command to collect data relating to RAM consumption during the startup phase.
[0071] In this example, a script retrieves data from the "proc / meminfo" directory, which is part of the operating system's file system providing data relating to memory consumption at a predetermined frequency, for example, every second; a script retrieves data relating to memory usage statistics (for example, the "vmstat" command); and a script retrieves data relating to the release of memory resources (for example, the "free -k" command).
[0072] The process includes a step 58 of retrieving raw memory data recorded at a predetermined frequency, as well as additional memory data relating to memory usage statistics (command "vmstat") and the release of memory resources (command "free -k").
[0073] Thus, at the end of step 58, the analysis device retrieves a set of data relating to the consumption of memory resources at each time instant, for example every second, during the startup phase.
[0074] The process then includes a step 60 of analyzing the collected data, and grouping them, for example, into processed data, represented for example in textual form and / or in graph form.
[0075] In particular, the data analysis includes a calculation of statistical information relating to the average, minimum and maximum of material resources of each type consumed during the start-up phase.
[0076] The analysis results are optionally displayed (step 62) on the screen of the human-machine interface of the analysis device, or transmitted to an external system for processing.
[0077] Fig. 3 is an illustration of graphs obtained after analysis of memory resource consumption.
[0078] Each of the graphs Gl, G2 and G3 includes a curve showing on the ordinate the memory resources in Moctects as a function of time (on the abscissa). The graph Gl represents the overall memory usage monitoring values (command "Meminfo"), the graph G2 represents the amount of unused memory using the command "free", and the graph G3 represents the amount of used memory using the command "dumpsys".
[0079] Of course, these graphs are shown as an example, and relate to the consumption of memory resources.
[0080] Alternatively, the consumption of computing and / or energy resources is analyzed.
Claims
Claims
1. Method for analyzing the consumption of hardware resources by an operating system intended to be implemented by a computing system embedded in a motor vehicle, for the execution of at least one software application, implemented by an analysis device (2) comprising a communication interface module (16) configured to communicate with said operating system via a connectivity and interaction protocol, the method being characterized in that it comprises steps of: - initialization (46) of a connection to said operating system;- sending (50) to the operating system at least one instruction for collecting data representative of a consumption of at least one type of hardware resources by the operating system, said at least one instruction being in the form of at least one command or a script executable by said operating system, - retrieving (58) said data collected by the operating system, and - analyzing (60) said collected data to obtain data developed from said collected data and generate a textual and / or graphical description of a consumption of hardware resources from said developed data.;
2. The method of claim 1, wherein the types of hardware resources include memory resources, computational resources, and power resources.
3. The method of claim 1 or 2, wherein the sending step (50) comprises sending an initialization file causing a startup of the operating system and an installation and execution of said at least one data collection instruction by the operating system, and a temporary storage of said data.
4. Method according to one of claims 1 to 3, in which the analysis (60) of the data further comprises a calculation of statistical information relating to the average, the minimum and the maximum of ma- resources materials of each type consumed during the start-up phase.
5. Method according to one of claims 1 to 4, in which the recovery (58) of data collected by the analysis device comprises the recovery of raw data relating to the consumption of at least one type of hardware resources recorded with a predetermined time frequency.
6. Method according to any one of claims 1 to 5, wherein the operating system (6) is an Android type system.
7. The method of claim 6, wherein said connectivity and interaction protocol is the "Android Debug Bridge" protocol, ADB.
8. Computer program comprising software instructions which, when executed by a programmable electronic device, implement a method for analyzing the consumption of hardware resources by an operating system according to one of claims 1 to 7.
9. Device for analyzing the consumption of hardware resources by an operating system intended to be implemented by a computing system embedded in a motor vehicle, for the execution of at least one software application, the analysis device (2) comprising a communication interface module (16) configured to communicate with said operating system (6) via a connectivity and interaction protocol, characterized in that the analysis device (2) comprises: - a module (30) for initializing a connection to said operating system;- a module (32) for sending to the operating system at least one instruction for collecting data representative of a consumption of at least one type of hardware resources by the operating system, said at least one instruction being in the form of at least one command or script executable by said operating system, - a module (34) for recovering said data collected by the operating system and - a module (36) for analyzing said collected data to obtain data developed from said collected data and to generate a textual description and / or; graph of a consumption of material resources from the said data developed.
10. Device according to claim 9, in which the sending module is configured to carry out a sending of an initialization file, allowing an installation of said at least one data collection instruction by the operating system, and an execution of said at least one data collection instruction following the startup of the operating system.