Shared memory optimization allocation system based on different virtualization deployment environments

By designing a service deployment configuration module, configuration analysis module, and shared memory self -adaptation adjustment module, the shared memory optimization distribution system is solved, which solves the problem of low -memory distribution efficiency in different virtualized deployment environments, and realizes dynamic adjustment and shared memory The scheme is to improve the operation efficiency of the system.

CN116382853BActive Publication Date: 2025-01-28AUTOCORE INTELLIGENT TECH (NANJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310442220.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-23
Publication Date
2025-01-28
Estimated Expiration
2043-04-23

AI Technical Summary

Technical Problem

The prior art fails to achieve optimal shared memory allocation under different virtualization deployment environments, resulting in low efficiency and programs need to maintain multiple copies of code to adapt to different deployment methods.

Method used

Design a shared memory optimization distribution system based on different virtualized deployment environments, including service deployment configuration modules, configuration analysis modules, and shared memory self -adaptation adjustment modules. By generating JSON files and environment topology, the shared memory allocation scheme is dynamically adjusted.

Benefits of technology

A dynamic selection of the optimal shared memory scheme in different deployment environments, improving the operating efficiency of the system, reducing code maintenance, and being able to achieve shared memory as much as possible.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116382853B_ABST
    Figure CN116382853B_ABST
Patent Text Reader

Abstract

The present invention discloses a shared memory optimization allocation system based on different virtualization deployment environments, including a service deployment configuration module, a configuration parsing module and a shared memory self-adaptive adjustment module; the service deployment configuration module generates a json file based on the current environment configuration to store the environment configuration; the configuration parsing module parses the json file generated by the service deployment configuration module to generate an environment topology map; the shared memory self-adaptive adjustment module determines which shared memory solution to implement based on the topology map generated by the configuration parsing module and according to different json configured environment deployments. The present invention proposes a service deployment mode configuration file, which can configure the environment deployment situation in the system to realize dynamic deployment; based on different deployments, the optimal shared memory solution is selected through judgment to achieve the optimal effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a shared memory technology, and in particular to a shared memory optimization allocation system based on different virtualization deployment environments. Background Art

[0002] As the computing power of SOC increases, a single SOC can undertake more business, and the deployment of multiple business functions of electric vehicles has also changed, from a distributed architecture to a domain-centralized architecture, and then to a centrally centralized architecture. The underlying hardware of automotive electronics can provide stronger capabilities, including assisted driving, intelligent driving, dashboards, and cockpit applications. The underlying systems used in different usage scenarios will also be different. For example, assisted driving with high real-time and reliability requirements needs to run on RTOS and RTLinux systems; some user interface applications need to run on the Android system. Based on the above, multiple systems can be virtually divided on a SOC to isolate various business processes without interfering with each other.

[0003] Common software isolation methods include: process isolation, container isolation, virtualization isolation, etc. The benefits of isolation are obvious, but the disadvantages are also obvious. The amount of data in vehicle communication is increasing, and the data transmission process and data serialization and deserialization process caused by isolation will take longer.

[0004] The current solution is to use shared memory to improve efficiency, including shared memory within a single system, shared memory between Dockers, and shared memory between GuestOS in the Hypervisor.

[0005] However, there is no optimal solution for deploying a program in various isolation modes, resulting in low efficiency and the following disadvantages: (1) The program does not use various deployment methods to dynamically select the optimal shared memory solution; for example, only shared memory between processes is considered, and shared memory within the hypervisor is not considered, which will cause data to be communicated through Ethernet instead of shared memory in this deployment mode; (2) Some programs are written based on specific deployment methods, which may lead to unsuccessful operation in other deployment methods; (3) In order to achieve the best effect, it is necessary to maintain multiple copies of code for different deployment situations, or use switches, which is not reasonable and intelligent. Summary of the invention

[0006] In order to solve the deficiencies in the prior art, the object of the present invention is to provide a shared memory optimization allocation system based on different virtualization deployment environments.

[0007] To achieve the purpose of the present invention, the technical solution adopted by the present invention is:

[0008] A shared memory optimization allocation system based on different virtualization deployment environments, including a service deployment configuration module, a configuration parsing module and a shared memory adaptive adjustment module;

[0009] The service deployment configuration module generates a json file to store the environment configuration based on the current environment configuration;

[0010] The configuration parsing module parses the JSON file generated by the service deployment configuration module to generate an environment topology diagram;

[0011] The shared memory adaptive adjustment module adjusts the shared memory allocation application method based on the topology map generated by the configuration parsing module.

[0012] Furthermore, the service deployment configuration module defines the following fields:

[0013] "class":"hypervisor", indicating that the current environment is configured with a hypervisor;

[0014] "class":"docker", indicating that the current environment is configured with docker;

[0015] "member":"service", indicating that the current environment contains a service;

[0016] The generated json file contains the environment configuration information.

[0017] Furthermore, the environment topology map generated by the configuration parsing module displays the hypervisor, Guest OS, Docker, and service information included in the system configuration.

[0018] Furthermore, the shared memory adaptive adjustment module decides which shared memory solution to implement according to different JSON configuration environment deployments.

[0019] Furthermore, the configuration parsing module parses out the situation where only shared memory communication between processes is required, and the shared memory allocation and use are performed through the shared memory API provided by the operating system.

[0020] Furthermore, the configuration parsing module parses out situations where shared memory communication between Dockers is required, and dynamically configures Docker based on the parsed deployment situation.

[0021] Furthermore, the configuration parsing module parses out situations where shared memory communication between hypervisors is required, and the shared memory is allocated and used according to the shared memory API provided by each hypervisor vendor.

[0022] Furthermore, two or three common implementations of shared memory communication between processes, shared memory communication between Dockers, or shared memory communication between Hypervisors are parsed through the configuration parsing module.

[0023] The beneficial effects of the present invention are that, compared with the prior art, the present invention proposes a service deployment mode configuration file, which can configure the environment deployment situation in the system to achieve dynamic deployment; based on different deployments, the optimal shared memory solution is selected through judgment to achieve the optimal effect; the same code will not have much difference in running efficiency under different deployments, and there is no need to modify the corresponding code for each deployment; shared memory can be realized in the largest possible range to achieve the purpose of improving the running efficiency of the entire system. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a schematic diagram of a shared memory optimization allocation system based on different virtualization deployment environments according to the present invention;

[0025] Figure 2 It is a schematic diagram of the output of each module of the system;

[0026] Figure 3 It is the environment topology diagram of Json1.json;

[0027] Figure 4 It is the environment topology diagram of Json2.json;

[0028] Figure 5 It is a schematic diagram of the shared memory method between processes;

[0029] Figure 6 This is a diagram of shared memory between Dockers and shared memory between GuestOS of the hypervisor;

[0030] Figure 7 This is a diagram of shared memory between Dockers;

[0031] Figure 8 This is a schematic diagram of the shared memory method between each GuestOS of the hypervisor. DETAILED DESCRIPTION

[0032] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of this application.

[0033] like Figure 1As shown, the shared memory optimization allocation system based on different virtualization deployment environments described in the present invention includes three modules: a service deployment configuration module, a configuration parsing module and a shared memory adaptive adjustment module.

[0034] The service deployment configuration module is used to generate a json file to store the environment configuration based on the particularity of the current environment configuration.

[0035] The configuration parsing module parses the JSON file generated by the service deployment configuration module to generate an environment topology diagram.

[0036] The shared memory adaptive adjustment module adjusts the shared memory allocation application method based on the topology map generated by the configuration parsing module.

[0037] The output of each module is as follows Figure 2 shown.

[0038] The service deployment configuration module uses a json file to store environment configuration. The following fields are defined:

[0039] "class":"hypervisor", indicating that the current environment is configured with a hypervisor;

[0040] "class":"docker", indicating that the current environment is configured with docker;

[0041] "member":"service", indicating that the current environment contains a service.

[0042] Specific examples:

[0043] Example 1, Json1.json, indicates that the system is configured with a hypervisor, two dockers are allocated under the hypervisor, and each docker contains two services.

[0044]

[0045]

[0046]

[0047] Example 2, Json2.json, indicates that the system is configured with a hypervisor, and two guest OSs are allocated to the hypervisor, namely Linux and Android. Each system includes two services.

[0048]

[0049]

[0050] The configuration parsing module parses the JSON file generated by the service deployment configuration module to generate an environment topology map. The environment topology map shows how many virtual system Guest OS, service containers Docker, and process services are included under the system configuration hypervisor.

[0051] The above two json files will generate Figure 3 , Figure 4 The environment topology diagram is shown.

[0052] like Figure 3 The figure shows the environment topology diagram of Json1.json, indicating that the system is configured with a hypervisor, docker1 and docker2 are allocated under the hypervisor, and each docker contains two services.

[0053] like Figure 4 The figure shows the environment topology diagram of Json2.json, indicating that the system is configured with a hypervisor, and two guest OSs are allocated to the hypervisor, namely Linux and Android. Each system includes two services.

[0054] The shared memory adaptive adjustment module will decide which shared memory solution to implement based on the environment deployment of different JSON configurations.

[0055] Specific analysis process:

[0056] 1. The configuration parsing module is used to parse out the situation where only shared memory communication between processes is required, and the shared memory allocation and use will be performed through the shared memory API that comes with the operating system.

[0057] 2. The configuration parsing module parses out the situations where shared memory communication between Dockers is required, and dynamically configures Docker based on the parsed deployment situations.

[0058] For example Figure 3 , Docker1 and Docker2's Service have communication requirements, so dynamic commands will be generated when running Docker1:

[0059] docker run --ipc=container: <id>

[0060] <id>That is, the containerid of Docker2.

[0061] 3. The configuration parsing module analyzes the situations where shared memory communication between hypervisors is required, and allocates and uses shared memory according to the shared memory API provided by each hypervisor manufacturer. For example, QNX Hypervisor can add shared memory support by configuring qvm:vdev shmem.

[0062] 4. The configuration parsing module is used to parse out two or three common implementations of shared memory communication between processes, shared memory communication between Dockers, or shared memory communication between Hypervisors.

[0063] The shared memory adaptive adjustment module can generate the best shared memory solution based on different virtualization deployment configurations.

[0064] like Figure 5 , Figure 6 , Figure 7 , Figure 8 It shows how to share memory in various deployment scenarios, including shared memory between processes, shared memory between Dockers, and shared memory between GuestOS of Hypervisor.

[0065] like Figure 5 As shown in the figure, it indicates the shared memory mode between processes. Figure 6 As shown in the figure, it shows the shared memory between dockers and the shared memory between each guestOS of the hypervisor. Figure 7 As shown in the figure, it indicates the shared memory mode between Dockers. Figure 8 As shown in the figure, it shows the shared memory mode between each GuestOS of the hypervisor.

[0066] The beneficial effects of the present invention are that, compared with the prior art, the present invention proposes a service deployment mode configuration file, which can configure the environment deployment situation in the system to achieve dynamic deployment; based on different deployments, the optimal shared memory solution is selected through judgment to achieve the optimal effect; the same code will not have much difference in running efficiency under different deployments, and there is no need to modify the corresponding code for each deployment; shared memory can be realized in the largest possible range to achieve the purpose of improving the running efficiency of the entire system.

[0067] The applicant of the present invention has made a detailed explanation and description of the implementation examples of the present invention in conjunction with the drawings in the specification. However, those skilled in the art should understand that the above implementation examples are only preferred implementation schemes of the present invention, and the detailed description is only to help readers better understand the spirit of the present invention, but not to limit the scope of protection of the present invention. On the contrary, any improvements or modifications based on the inventive spirit of the present invention should fall within the scope of protection of the present invention.< / id> < / id>

Claims

1. A shared memory optimization allocation system based on different virtualization deployment environments, characterized in that: It includes service deployment configuration module, configuration parsing module and shared memory adaptive adjustment module; The service deployment configuration module generates a json file to store the environment configuration based on the current environment configuration; The configuration parsing module parses the JSON file generated by the service deployment configuration module to generate an environment topology diagram; The shared memory adaptive adjustment module adjusts the shared memory allocation application method based on the topology map generated by the configuration parsing module; Specifically, the shared memory adaptive adjustment module decides which shared memory solution to implement based on different JSON configuration environment deployments, including the following process: The configuration parsing module parses out the situation where only shared memory communication between processes is required, and the shared memory allocation and use will be performed through the shared memory API provided by the operating system; The configuration parsing module parses the situations that require shared memory communication between Dockers, and dynamically configures Docker based on the parsed deployment situations; The configuration parsing module parses the situations where shared memory communication between hypervisors is required, and allocates and uses shared memory according to the shared memory API provided by each hypervisor vendor. The configuration parsing module is used to parse out two or three common implementations of shared memory communication between processes, shared memory communication between Dockers, or shared memory communication between Hypervisors.

2. The shared memory optimization allocation system based on different virtualization deployment environments according to claim 1, characterized in that: Service deployment configuration module, define the following fields: "class": "hypervisor", indicating that the current environment is configured with a hypervisor; "class": "docker", indicating that the current environment is configured with docker; "member": "service", indicating that the current environment contains a service; The generated json file contains the environment configuration information.

3. The shared memory optimization allocation system based on different virtualization deployment environments according to claim 1, characterized in that: The environment topology diagram generated by the configuration parsing module shows the hypervisor, Guest OS, Docker, and service information included in the system configuration.

Citation Information

Patent Citations

  • Method, device and equipment for sharing memory by multiple systems and storage medium

    CN114327944A

  • Connectivity management for transport independent architectures

    US20100250722A1