Virtualization system, working method, working device and readable storage medium

By designing a virtualization system, real-time virtual machines exclusively occupy the isolated hardware resources, solving the problem of insufficient real-time performance of existing virtualization solutions and achieving high real-time and real-time data communication.

WO2025123890A1PCT designated stage expired Publication Date: 2025-06-19SHENZHEN INOVANCE TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/123458
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-14
Filing Date
2024-10-08
Publication Date
2025-06-19

AI Technical Summary

Technical Problem

The real-time real-time nature of existing virtualization solutions is weak and cannot meet the high real-time needs of industrial control.

Method used

A virtualization system is designed, including the physical hardware resource layer, the virtualization layer and the virtual machine layer. The virtual machine layer runs real-time operating systems and non-real-time operating systems, and the real-time virtual machine exclusively occupies isolated hardware resources in the virtual hardware resources, including isolated processor cores and isolated caches.

Benefits of technology

By exclusively isolating hardware resources, real-time virtual machines avoid the competition for hardware resources with non-real-time virtual machines, ensure real-time performance, and realize real-time data communication between different virtual machines through shared memory and virtual interrupts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024123458_19062025_PF_FP_ABST
    Figure CN2024123458_19062025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of automation. Disclosed are a virtualization system, a working method, a working device and a readable storage medium. The virtualization system of the present application comprises a physical hardware resource layer; a virtualization layer configured to virtualize physical hardware resources in the physical hardware resource layer into virtual hardware resources; and a virtual machine layer configured to run different types of operating systems, wherein the operating systems comprise real-time operating systems and non-real-time operating systems; real-time virtual machines where the real-time operating systems are located exclusively occupy isolated hardware resources among the virtual hardware resources; and the isolated hardware resources comprise isolated processor cores and isolated caches.
Need to check novelty before this filing date? Find Prior Art

Description

Virtualization system, working method, working device and readable storage medium

[0001] This application claims priority to Chinese patent application No. 202311727371.5 filed on December 14, 2023, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of automation technology, and in particular to a virtualization system, a working method, a working device, and a readable storage medium. Background Art

[0003] With the digitalization and intelligent development of smart manufacturing, traditional industrial control systems, characterized by single functions and the stacking of multiple systems for motion control, visual analysis, and human-machine interaction, have gradually revealed their drawbacks. While virtualization solutions exist to address these shortcomings, current virtualization solutions offer limited real-time performance and fall far short of the high-performance requirements of industrial control. Technical issues

[0004] The main purpose of this application is to provide a virtualization method, which aims to solve the technical problem that the current virtualization solution has weak real-time performance and is far from meeting the high real-time requirements of industrial control. Technical Solutions

[0005] To achieve the above objectives, the present application provides a virtualization system, which includes:

[0006] Physical hardware resource layer;

[0007] The virtualization layer is used to virtualize the physical hardware resources in the physical hardware resource layer into virtual hardware resources;

[0008] A virtual machine layer is used to run different types of operating systems, wherein the operating systems include real-time operating systems and non-real-time operating systems. The real-time virtual machine where the real-time operating system is located exclusively uses isolated hardware resources in the virtual hardware resources, and the isolated hardware resources include isolated processor cores and isolated caches.

[0009] In one embodiment, when multiple real-time virtual machines are configured in the virtual machine layer, different real-time virtual machines respectively exclusively occupy different isolated hardware resources in the virtual hardware resources.

[0010] In one embodiment, the isolation cache exclusively used by the real-time virtual machine includes a first sub-area and a second sub-area, the first sub-area is bound to the key code of the real-time application in the real-time virtual machine, and the second sub-area is bound to the key data of the real-time application.

[0011] In one embodiment, the physical hardware resources include physical processor cores, and the isolated processor cores include virtual processor cores virtualized after hyperthreading is enabled on the physical processor cores, wherein any physical processor core is virtualized into multiple virtual processor cores after hyperthreading is enabled.

[0012] In one embodiment, the virtual hardware resources also include shared memory, which allows operating systems running on different virtual machines to write or read data. A doorbell register is configured in the shared memory, and the virtual machine identifier written in the doorbell register is used to trigger the generation of a virtual interrupt, which is used to notify the target virtual machine pointed to by the virtual machine identifier to read the data in the shared memory.

[0013] To achieve the above-mentioned object, the present application further provides a working method of a virtualization system, wherein the virtualization system is the virtualization system described above, and the working method comprises:

[0014] In response to a user operation based on managing virtual machines in the virtualization system, configuration management is performed on each virtual machine in the virtualization layer of the virtualization system.

[0015] In one embodiment, the user operation includes a first operation, a second operation, and a third operation, and the step of configuring and managing each virtual machine in the virtual machine layer of the virtualization system further includes:

[0016] Based on the first operation, configuring exclusive virtual hardware resources of the real-time virtual machine in the virtual machine layer;

[0017] Based on the second operation, controlling the start and stop of each virtual machine in the virtual machine layer;

[0018] Based on the third operation, the application running on each of the virtual machines is configured.

[0019] In one embodiment, the working method further includes:

[0020] For any virtual machine in the virtual machine layer, after the operating system running on the virtual machine writes data to the shared memory in the virtualization system, a virtual interrupt is triggered based on the virtual machine identifier corresponding to the written data;

[0021] The virtual interrupt is injected into the target virtual machine pointed to by the virtual machine identifier to notify the target virtual machine to read data from the shared memory.

[0022] To achieve the above-mentioned purpose, the present application also provides a working device of a virtualization system, which includes: a memory, a processor, and a working program of the virtualization system stored in the memory and runnable on the processor. When the working program of the virtualization system is executed by the processor, the steps of the working method of the virtualization system as described above are implemented.

[0023] To achieve the above objectives, the present application also provides a readable storage medium, on which a working program of the virtualization system is stored. When the working program of the virtualization system is executed by a processor, the steps of the working method of the virtualization system as described above are implemented. Beneficial effects

[0024] The embodiment of the present application proposes a virtualization system, working method, working device and readable storage medium. The system includes a physical hardware resource layer; a virtualization layer, which is used to virtualize the physical hardware resources in the physical hardware resource layer into virtual hardware resources; a virtual machine layer, which is used to run different types of operating systems, wherein the operating systems include real-time operating systems and non-real-time operating systems, and the real-time virtual machine where the real-time operating system is located exclusively occupies the isolated hardware resources in the virtual hardware resources, and the isolated hardware resources include isolated processor cores and isolated caches. It can be understood that in the embodiment of the present application, since the real-time virtual machine exclusively occupies the isolated hardware resources in the virtual hardware resources, the real-time virtual machine does not have to compete with other non-real-time virtual machines for hardware resources, thereby ensuring the real-time performance of the real-time virtual machine, and in addition to exclusively occupying part of the processor core resources, the real-time virtual machine will also exclusively occupy part of the cache resources, thereby further improving the real-time performance of the real-time virtual machine, so that the real-time performance of the real-time virtual machine in the present application is better. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] FIG1 is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application;

[0026] FIG2 is a schematic diagram of the framework of the virtualization system of the present application;

[0027] FIG3 is a schematic diagram of a first scenario of the virtualization system of the present application;

[0028] FIG4 is a schematic diagram of a second scenario of the virtualization system of the present application;

[0029] FIG5 is a schematic diagram of a third scenario of the virtualization system of the present application;

[0030] FIG6 is a schematic diagram of a fourth scenario of the virtualization system of the present application;

[0031] FIG7 is a flowchart of a first embodiment of the working method of the virtualization system of the present application;

[0032] FIG8 is a flow chart of a second embodiment of the working method of the virtualization system of the present application.

[0033] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. Modes for Carrying Out the Invention

[0034] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.

[0035] As shown in FIG1 , FIG1 is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.

[0036] The device in the embodiment of the present application can be an electronic terminal device with network communication function, such as a PC, a smart phone, a tablet computer, or a portable computer.

[0037] As shown in Figure 1, the device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display and an input unit such as a keyboard. The user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as a disk storage device. The memory 1005 may also be a storage device independent of the processor 1001.

[0038] In one embodiment, the device may also include a camera, RF (Radio Frequency) circuits, sensors, audio circuits, a WiFi module, and the like. These sensors include light sensors, motion sensors, and other sensors. Light sensors may include ambient light sensors and proximity sensors. The ambient light sensor can adjust the brightness of the display based on ambient light levels, while the proximity sensor can turn off the display and / or backlight when the mobile terminal is brought to the ear. A gravity accelerometer, a type of motion sensor, can detect acceleration in all directions (typically three axes) and, when stationary, can detect the magnitude and direction of gravity. This can be used for applications that recognize the mobile terminal's posture (e.g., switching between landscape and portrait modes, related games, magnetometer posture calibration), vibration recognition-related functions (e.g., pedometers and tapping). Mobile terminals may also be equipped with other sensors, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, which are not detailed here.

[0039] Those skilled in the art will understand that the device structure shown in FIG1 does not constitute a limitation on the device, and may include more or fewer components than shown, or a combination of certain components, or a different arrangement of components.

[0040] As shown in FIG1 , the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a working program of a virtualization system.

[0041] In the device shown in FIG1 , the network interface 1004 is primarily used to connect to a backend server and perform data communication with the backend server; the user interface 1003 is primarily used to connect to a client (user end) and perform data communication with the client; and the processor 1001 can be used to call a working program of the virtualization system stored in the memory 1005 and perform the following operations:

[0042] In response to a user operation based on managing virtual machines in the virtualization system, configuration management is performed on each virtual machine in the virtualization layer of the virtualization system.

[0043] In one embodiment, the processor 1001 may call a working program of the virtualization system stored in the memory 1005, and further perform the following operations:

[0044] The user operation includes a first operation, a second operation, and a third operation, and the step of configuring and managing each virtual machine in the virtual machine layer of the virtualization system further includes:

[0045] Based on the first operation, configuring exclusive virtual hardware resources of the real-time virtual machine in the virtual machine layer;

[0046] Based on the second operation, controlling the start and stop of each virtual machine in the virtual machine layer;

[0047] Based on the third operation, the application running on each of the virtual machines is configured.

[0048] In one embodiment, the processor 1001 may call a working program of the virtualization system stored in the memory 1005, and further perform the following operations:

[0049] The working method further comprises:

[0050] For any virtual machine in the virtual machine layer, after the operating system running on the virtual machine writes data to the shared memory in the virtualization system, a virtual interrupt is triggered based on the virtual machine identifier corresponding to the written data;

[0051] The virtual interrupt is injected into the target virtual machine pointed to by the virtual machine identifier to notify the target virtual machine to read data from the shared memory.

[0052] Referring to Figure 2, which is a framework diagram of the virtualization system of the present application, the virtualization system includes: a physical hardware resource layer; a virtualization layer, which is used to virtualize the physical hardware resources in the physical hardware resource layer into virtual hardware resources; and a virtual machine layer, which is used to run different types of operating systems, wherein the operating systems include real-time operating systems and non-real-time operating systems, and the real-time virtual machine where the real-time operating system is located exclusively occupies isolated hardware resources in the virtual hardware resources, and the isolated hardware resources include isolated processor cores and isolated caches.

[0053] It should be noted that the virtualization system described above can be deployed on a computer, and the physical hardware resources in the physical hardware resource layer are the relevant hardware configurations in the computer, such as the CPU (Central Processing Unit), for example, CPU0 through CPU3 in Figure 2. Furthermore, the physical hardware resource layer may also include memory and cache (such as LLC, last-level cache). The virtualization layer described above, also known as HYPERVIOR, is used to virtualize the physical hardware resources in the physical hardware resource layer into virtual hardware resources, such as VCPU0 through VCPU7 in Figure 2. The virtualization layer is an intermediate software layer running between the underlying physical hardware and the operating system, allowing multiple operating systems and applications to access the underlying physical hardware resources. It is worth noting that other virtualization tools, such as VMX (Virtual Machine Extension), VT-d (Virtualization Technology for Direct I / O), EPT (Enhanced Page Table), hypercalls, and vINT, can also be used when virtualizing hardware resources to ensure real-time performance of virtual machines. The virtual machine layer includes different virtual machines, on which different operating systems can run. The types of operating systems can be divided into real-time operating systems and non-real-time operating systems according to the requirements for real-time performance. For example, the types of real-time operating systems can include VxWorks, xenomai Linux, Preempt-RT Linux, RT-Thread, SylixOS, LiteOS, Threadx, Zephyr, FreeRTOS and other general-purpose operating systems with high requirements for real-time performance, and the types of non-real-time operating systems can include Windows, Ubuntu, Debian and other general-purpose operating systems with low requirements for real-time performance. According to the type of operating system running, virtual machines can also be divided into real-time virtual machines, such as RTVM (0) to RTVM (N) in Figure 2, and non-real-time virtual machines, such as NRTVM (0) to NRTVM (N) in Figure 2. In addition, management virtual machines MVM can also be included to manage other virtual machines. For real-time virtual machines running real-time operating systems, it should be noted that the real-time performance jitter of virtual machines in current virtualization solutions reaches more than 50us, which is difficult to meet the real-time requirements of real-time operating systems.Therefore, in this application, in order to ensure the real-time performance of the real-time operating system running in the real-time virtual machine, the real-time virtual machine in this embodiment will be configured to exclusively occupy isolated hardware resources in the virtual hardware resources, and the isolated hardware resources include isolated processor cores and isolated caches. For example, referring to Figure 3, which is a schematic diagram of the first scenario of the virtualization system of this application, the virtual machine layer includes a management virtual machine MVM, a non-real-time virtual machine running Windows, and a real-time virtual machine running RTLinux. The real-time virtual machine running RTLinux exclusively occupies virtual resources VCPU5 to VCPU7, while the management virtual machine and the non-real-time virtual machine running Windows share virtual resources VCPU0 to VCPU4, which also indicates that the virtual resources VCPU5 to VCPU7 are isolated. At the same time, the isolated LLC (i.e., the isolated cache) is exclusively occupied by the real-time virtual machine running RTLinux, while the shared LLC is shared by the management virtual machine and the non-real-time virtual machine running Windows. It can be understood that since the real-time virtual machine exclusively occupies the isolated hardware resources in the virtual hardware resources, the real-time virtual machine does not have to compete with other non-real-time virtual machines for hardware resources, thereby ensuring the real-time performance of the real-time virtual machine. In addition, in addition to exclusively occupying some processor core resources, the real-time virtual machine will also exclusively occupy some cache resources, thereby further improving the real-time performance of the real-time virtual machine. In this application, the real-time performance jitter of the real-time virtual machine can be less than 50us or even achieve better real-time performance.

[0054] In one embodiment, when multiple real-time virtual machines are configured in the virtual machine layer, different real-time virtual machines respectively exclusively occupy different isolated hardware resources in the virtual hardware resources.

[0055] In one embodiment, the above-mentioned virtualization system in this embodiment can support the deployment of multiple real-time virtual machines. That is, when allocating exclusive isolated hardware resources to real-time virtual machines, multiple isolated hardware resources can be isolated, and different real-time virtual machines can respectively monopolize different isolated hardware resources in the virtual hardware resources. Therefore, it is ensured that different real-time virtual machines will not compete for isolated hardware resources, and the real-time performance of each real-time virtual machine can be guaranteed while multiple real-time virtual machines are deployed. For example, referring to Figure 4, which is a schematic diagram of the second scenario of the virtualization system of the present application, the virtual machine layer in the figure includes a management virtual machine MVM, a non-real-time virtual machine running Windows, a real-time virtual machine running RTLinux, and a real-time virtual machine running RT-Thread. Among them, virtual resources VCPU0 to VCPU3 are shared by the management virtual machine and the non-real-time virtual machine running Windows, virtual resources VCPU4 to VCPU5 are exclusively occupied by the real-time virtual machine running RTLinux, and virtual resources VCPU6 to VCPU7 are exclusively occupied by the real-time virtual machine running RT-Thread. That is, the real-time virtual machine running RTLinux and the real-time virtual machine running RT-Thread respectively monopolize different isolated hardware resources in the virtual hardware resources.

[0056] In one embodiment, the isolation cache exclusively used by the real-time virtual machine includes a first sub-area and a second sub-area, the first sub-area is bound to the key code of the real-time application in the real-time virtual machine, and the second sub-area is bound to the key data of the real-time application.

[0057] It should be noted that, in order to further improve the real-time performance of the real-time virtual machine, in this embodiment, the hardware resources are deeply isolated.

[0058] In one embodiment, for the isolation cache exclusively occupied by the real-time virtual machine, further isolation can be performed in the exclusive isolation cache to obtain a first sub-area and a second sub-area. The first sub-area is bound to the key code of the real-time application running on the real-time virtual machine, while the second sub-area is bound to the key data of the real-time application, that is, the first sub-area is only used for the storage and retrieval of key codes, while the second sub-area is only used for the storage and retrieval of key data, ensuring that the two do not interfere with each other, further improving the determinism of the real-time program, that is, the real-time performance of the real-time virtual machine. For example, referring to FIG5 , which is a schematic diagram of the third scenario of the virtualization system of the present application, as shown in the figure, in addition to the exclusive isolation LLC of the real-time virtual machine running RTLinux, the key code and key data of the real-time application running on RTLinux respectively occupy the first sub-area and the second sub-area in the isolation LLC. Among them, the key code and key data can be configured by the technician according to the real-time program. For example, in the scenario where the application is a robot control program, the key code can be the program code corresponding to the robot motion algorithm, and correspondingly, the key data can be the robot motion algorithm input or input parameter.

[0059] Furthermore, it should be noted that to isolate the cache in the physical hardware resource layer to obtain the isolated cache, first sub-region, or second sub-region, RDT (Resource Director Technology) can be used in conjunction with the aforementioned HYERVISOR to deeply segment and isolate the system's shared cache resources. RDT is a shared resource allocation technology that spans the hardware / virtualization layer / OS layer (operation layer) / application layer. It can resolve competition for shared hardware resources among businesses of different priority levels, which can cause critical business programs to be affected by interference from non-critical businesses, thereby reducing the determinism of real-time systems.

[0060] In one embodiment, the physical hardware resources include physical processor cores, and the isolated processor cores include virtual processor cores virtualized after hyperthreading is enabled on the physical processor cores, wherein any physical processor core is virtualized into multiple virtual processor cores after hyperthreading is enabled.

[0061] In one embodiment, the physical hardware resources include physical processor cores. To further improve the performance of the virtualized system, the hyperthreading function of the physical processor cores is enabled, and the isolated processor cores include virtual processor cores that have hyperthreading enabled and are virtualized. It should be noted that after the hyperthreading function of the physical processor cores is enabled, a physical processor core is allowed to execute multiple threads simultaneously (typically, a physical processor core is allowed to execute two threads simultaneously). Therefore, a physical processor core can be virtualized into multiple virtual processor cores (typically, into two virtual processor cores), thereby improving the performance of the virtualized system. For example, referring to Figure 3, CPU3 in the physical hardware resource layer is virtualized into VCPU6 and VCPU7, and is exclusively used by a real-time virtual machine running RTLinux.

[0062] In one embodiment, the virtual hardware resources also include shared memory, and the virtual hardware resources also include shared memory. The shared memory allows operating systems running on different virtual machines to write or read data. A doorbell register is configured in the shared memory. The virtual machine identifier written in the doorbell register is used to trigger the generation of a virtual interrupt, and the virtual interrupt is used to notify the target virtual machine pointed to by the virtual machine identifier to read the data in the shared memory.

[0063] In one embodiment, the virtual hardware resources also include shared memory, and the shared memory allows operating systems running on different virtual machines to write data to and read data from the shared memory, thereby enabling data communication between different virtual machines. In this embodiment, to ensure the real-time performance of data communication between different virtual machines, a doorbell register is provided in the shared memory. After data is written to the shared memory, the doorbell register is also written with the virtual machine identifier corresponding to the written data. The virtual machine identifier is used to trigger HYERVISOR to generate a virtual interrupt. HYERVISOR then injects the virtual interrupt into the target virtual machine, notifying the target virtual machine to read data from the shared memory. This enables data communication between different virtual machines and ensures real-time data communication. For example, in actual applications, shared memory is often abstracted as a virtual PCIe device (e.g., a graphics card device, a solid-state drive device, etc.). Referring to Figure 6, which is a schematic diagram of the fourth scenario of the virtualization system of the present application, a Doorbell register (i.e., a doorbell register) is set in the PCIe device (shared memory). After virtual machine A writes data to the shared memory and writes the virtual machine identifier of the data recipient (assuming that the virtual machine identifier points to virtual machine B) into the doorbell register, the virtualization layer HYERVISOR generates a virtual interrupt and injects the virtual interrupt into virtual machine B, thereby notifying virtual machine B to read data from the shared memory, that is, to read the data written by virtual machine A, thereby completing real-time data communication between virtual machines A and B.

[0064] 7 , a first embodiment of a working method of a virtualization system is proposed based on the virtualization system of the present application. The same or similar contents as those in the above embodiments can be referred to above and will not be described in detail. The working method includes:

[0065] Step S10 , in response to a user operation based on managing virtual machines in the virtualization system, configuration management is performed on each virtual machine in the virtualization layer in the virtualization system.

[0066] In one embodiment, a management virtual machine is set up by default in the virtualization system, and the management virtual machine is responsible for the configuration and management of the entire virtual machine. The virtualization system can configure and manage each virtual machine in the virtual machine layer of the virtualization system in response to user operations based on the management virtual machine, for example, the configuration of exclusive resources of real-time virtual machines, the start and stop management of virtual machines, and the configuration of the number of virtual machines, etc. Therefore, users can use the management virtual machine to personalize the deployment of virtual machines in the above-mentioned virtualization system to adapt to different industrial automation control scenarios.

[0067] In one embodiment, the user operation includes a first operation, a second operation, and a third operation, and the step of configuring and managing each virtual machine in the virtual machine layer of the virtualization system further includes:

[0068] Step S110: configuring exclusive virtual hardware resources for the real-time virtual machine in the virtual machine layer based on the first operation;

[0069] Step S120: Controlling the start and stop of each virtual machine in the virtual machine layer based on the second operation;

[0070] Step S130: Based on the third operation, configure the application running on each of the virtual machines.

[0071] In one embodiment, the user operation may include a first operation, a second operation, and a third operation. Based on the first operation, the virtualization system configures the exclusive virtual hardware resources of the real-time virtual machine in the virtual machine layer, for example, configuring the size of the specific exclusive virtual hardware resources (the exclusive virtual hardware resources will be isolated and used only by the real-time virtual machine). Based on the second operation, the virtualization system may control the start and stop of each virtual machine in the virtual machine layer. Based on the third operation, the virtualization system may configure the applications running on each virtual machine, etc.

[0072] It is understandable that, in this embodiment, personalized configuration of the virtualization system can be achieved by setting a default management virtual machine, thereby meeting the needs of different industrial automation control scenarios.

[0073] Referring to FIG8 , a second embodiment of a working method of a virtualization system is proposed based on the above embodiment of the present application. The same or similar contents as those in the above embodiment can be referred to above and will not be described in detail. The working method further includes:

[0074] Step S01: for any virtual machine in the virtual machine layer, after the operating system running on the virtual machine writes data to the shared memory in the virtualization system, a virtual interrupt is triggered based on the virtual machine identifier corresponding to the written data;

[0075] Step S02: injecting the virtual interrupt into the target virtual machine to notify the target virtual machine to read data from the shared memory.

[0076] In one embodiment, for any virtual machine in the virtual machine layer, when the operating system running on the virtual machine writes data to the shared memory in the virtualization system, HYERVISOR triggers the generation of a virtual interrupt based on the virtual machine identifier corresponding to the written data, and injects the virtual interrupt into the target virtual machine, thereby notifying the target virtual machine to read data from the shared memory. For example, the shared memory can be abstracted as a virtual PCIe device. A Doorbell register is provided in the PCIe device. If virtual machine A writes data to the PCIe device and writes the virtual machine identifier corresponding to the data (assuming that the virtual machine identifier points to virtual machine B) into the Doorbell register, HYERVISOR will generate a virtual interrupt and inject the virtual interrupt into virtual machine B, thereby notifying virtual machine B to read the data from the shared memory, that is, to read the data written by virtual machine A, thereby completing real-time data communication between virtual machines A and B.

[0077] In addition, an embodiment of the present application also proposes a virtualization device, which includes: a memory, a processor, and a working program of a virtualization system stored in the memory and capable of running on the processor. When the working program of the virtualization system is executed by the processor, the steps of the virtualization method as described above are implemented.

[0078] The specific implementation of the virtualization device of the present application is basically the same as the embodiments of the above-mentioned virtualization method, and will not be repeated here.

[0079] In addition, an embodiment of the present application further proposes a readable storage medium, on which a working program of a virtualization system is stored. When the working program of the virtualization system is executed by a processor, the steps of the virtualization method as described above are implemented.

[0080] The specific implementation of the medium of the present application is basically the same as the embodiments of the above-mentioned virtualization method, and will not be repeated here.

[0081] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.

[0082] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0083] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device (which can be a PLC, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0084] The above are merely embodiments of the present application and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A virtualization system, wherein: The virtualization system comprises: Physical hardware resource layer; The virtualization layer is used to virtualize the physical hardware resources in the physical hardware resource layer into virtual hardware resources; A virtual machine layer is used to run different types of operating systems, wherein the operating systems include real-time operating systems and non-real-time operating systems. The real-time virtual machine where the real-time operating system is located exclusively occupies isolated hardware resources in the virtual hardware resources, and the isolated hardware resources include isolated processor cores and isolated caches.

2. The virtualization system according to claim 1, wherein: When multiple real-time virtual machines are configured in the virtual machine layer, different real-time virtual machines respectively occupy different isolated hardware resources in the virtual hardware resources.

3. The virtualization system according to claim 1, wherein: The isolation cache exclusively used by the real-time virtual machine includes a first sub-area and a second sub-area. The first sub-area is bound to the key code of the real-time application in the real-time virtual machine, and the second sub-area is bound to the key data of the real-time application.

4. The virtualization system according to claim 3, wherein: The physical hardware resources include physical processor cores, and the isolated processor cores include virtual processor cores virtualized by the physical processor cores after hyperthreading is enabled, wherein any physical processor core is virtualized into multiple virtual processor cores after hyperthreading is enabled.

5. The virtualization system according to claim 1, wherein: The virtual hardware resources also include shared memory, which allows operating systems running on different virtual machines to write or read data. A doorbell register is configured in the shared memory, and the virtual machine identifier written in the doorbell register is used to trigger the generation of a virtual interrupt, which is used to notify the target virtual machine pointed to by the virtual machine identifier to read data in the shared memory.

6. A method for operating a virtualization system, wherein: The virtualization system is a virtualization system as described in any one of claims 1 to 5 above, and the working method comprises: In response to a user operation based on managing virtual machines in the virtualization system, configuration management is performed on each virtual machine in the virtualization layer of the virtualization system.

7. The working method of the virtualization system according to claim 6, wherein: The user operation includes a first operation, a second operation and a third operation, and the step of configuring and managing each virtual machine at the virtual machine layer in the virtualization system also includes: Based on the first operation, configuring exclusive virtual hardware resources of the real-time virtual machine in the virtual machine layer; Based on the second operation, controlling the start and stop of each virtual machine in the virtual machine layer; Based on the third operation, the application program running on each of the virtual machines is configured.

8. The working method of the virtualization system according to claim 6, wherein: The working method also includes: For any virtual machine in the virtual machine layer, after the operating system running on the virtual machine writes data to the shared memory in the virtualization system, a virtual interrupt is triggered based on the virtual machine identifier corresponding to the written data; The virtual interrupt is injected into the target virtual machine pointed to by the virtual machine identifier to notify the target virtual machine to read data from the shared memory.

9. A working device of a virtualization system, wherein: The working device of the virtualization system includes: a memory, a processor, and a working program of the virtualization system stored in the memory and executable on the processor. When the working program of the virtualization system is executed by the processor, the steps of the working method of the virtualization system as described in any one of claims 6 to 8 are implemented.

10. A readable storage medium, wherein: The readable storage medium is a computer-readable storage medium, on which a working program of a virtualization system is stored. When the working program of the virtualization system is executed by a processor, the steps of the working method of the virtualization system as described in any one of claims 6 to 8 are implemented.

Citation Information

Patent Citations

  • Management method, device, medium and system for virtual machine on computer equipment

    CN111427669A

  • Resource allocation method of virtual machine, server and computer readable storage medium

    CN113032101A

  • Embedded cloud platform management monitoring system

    CN115525391A

  • Domestic processor virtualization adaptation tuning method

    CN117215718A

  • Virtualization system, working method, working equipment and readable storage medium

    CN117742889A