A standby and wake-up processing method for a virtualization system and a virtual machine

By introducing hierarchical standby and wake-up processing for privileged and ordinary user systems in the virtualized system, the problem of long restarts and high power consumption of virtual machines after standby is solved, and the effects of lower power consumption and fast wake-up are achieved.

CN113722044BActive Publication Date: 2024-10-22AUTOCHIPS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010453193.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-26
Publication Date
2024-10-22
Estimated Expiration
2040-05-26

AI Technical Summary

Technical Problem

The virtual machine takes a long time to restart after standby, and cannot achieve fast wake-up and lower power consumption standby state.

Method used

By introducing a hierarchical standby and wake-up processing method for privileged user systems and ordinary user systems into the virtualized system, the privileged user system determines and notifies the ordinary user system to enter the standby state, ensuring that all ordinary user systems enter the standby state before executing the privileged user system standby process, thereby achieving lower power consumption standby and quickly waking up the virtualized system when waking up.

Benefits of technology

It achieves a lower power consumption standby state and quickly wakes up the virtualized system, avoiding long-term standby and wake-up problems caused by the entire virtual machine being on standby together.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113722044B_ABST
    Figure CN113722044B_ABST
Patent Text Reader

Abstract

The present invention provides a standby processing method for a virtualization system. The virtualization system includes a first user system and at least one second user system, wherein the first user system is a privileged user system and the second user system is a common user system, and the method includes: the first user system determines whether there is a second user system in a non-standby state; if there is, the first user system notifies the second user system to execute a standby process to make the second user system enter a standby state; and if there is no or after the second user system enters the standby state, the first user system executes the standby process of the first user system to enter the standby state. The present invention also provides a corresponding wake-up processing method and a virtual machine. The present invention implements targeted standby processing, rather than the entire virtualization system directly performing standby together, thereby achieving lower power consumption standby, and can achieve fast wake-up when the virtualization system wakes up.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The disclosed embodiments of the present invention relate to the field of communication technology, and more specifically, to a standby and wake-up processing method of a virtualization system and a virtual machine. Background Art

[0002] Most of the current solutions for virtual machine startup optimization involve optimizing the time to recreate virtual machines, restart operating systems and applications during horizontal migration and expansion of virtual machines, thereby reducing the overall migration or expansion time.

[0003] As for the standby processing of the virtual machine itself, usually the scheduling of each user (Guest) system on the entire virtual machine is directly stopped, that is, the entire virtual machine is powered off and put into standby. However, after the entire virtual machine is powered off and put into standby, the restart of the entire virtual machine will encounter the problem of long startup time, and it is impossible to achieve fast wake-up and standby with lower power consumption. Summary of the invention

[0004] According to an embodiment of the present invention, the present invention provides a standby and wake-up processing method of a virtualization system and a virtual machine to solve the above problems.

[0005] According to a first aspect of the present invention, an exemplary standby processing method of a virtualization system is disclosed. The virtualization system includes a first user system and at least one second user system, wherein the first user system is a privileged user system and the second user system is a common user system, and the method includes: the first user system determines whether the second user system is in a non-standby state; if so, the first user system notifies the second user system to execute a standby process so that the second user system enters a standby state; and if not or after the second user system enters a standby state, the first user system executes the standby process of the first user system to enter a standby state.

[0006] According to a second aspect of the present invention, an exemplary wake-up processing method for a virtualization system is disclosed, wherein the virtualization system includes a first user system and at least one second user system, wherein the first user system is a privileged user system and the second user system is a common user system, and the method includes: the first user system executes a wake-up process of the first user system; upon receiving a wake-up instruction from one of the at least one second user system, the first user system controls one of the at least one second user system to execute the wake-up process to complete the wake-up process of the second user system.

[0007] According to a second aspect of the present invention, an exemplary virtual machine is disclosed, having a virtualization system, wherein the virtualization system includes a first user system and at least one second user system, wherein the first user system is a privileged user system, the second user system is a common user system, and the first user system is used to execute the standby processing method of the virtualization system as described in the first aspect or the wake-up processing method of the virtualization system as described in the second aspect.

[0008] The beneficial effects of the present invention are as follows: when there is an ordinary user system in a non-standby state, the privileged user system notifies the ordinary user system to execute the standby process to enter the standby state; when there is no ordinary user system, the privileged user system directly executes the standby process to enter the standby state, thereby realizing targeted standby processing; after all ordinary user systems enter the standby state, the privileged user system starts to execute the standby process to enter the standby state, thereby further realizing targeted standby processing, rather than the entire virtualization system directly entering standby together, thereby realizing lower power consumption standby, and being able to realize fast wakeup when the virtualization system wakes up. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The present invention will be further described below with reference to the accompanying drawings and implementation modes, in which:

[0010] Figure 1 4 is a flowchart of a standby processing method of a virtualization system according to a first embodiment of the present invention.

[0011] Figure 2 It is a partial flow chart of the standby processing method of the virtualization system according to an embodiment of the present invention.

[0012] Figure 3 It is a partial flow chart of the standby processing method of the virtualization system according to an embodiment of the present invention.

[0013] Figure 4 4 is a flowchart of a standby processing method of a virtualization system according to a second embodiment of the present invention.

[0014] Figure 5 The figure is a flowchart of a wake-up processing method of a virtualization system according to an embodiment of the present invention.

[0015] Figure 6 It is a schematic diagram of the structure of a communication device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0016] In order to enable those skilled in the art to better understand the technical solution of the present invention, the technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0017] like Figure 1FIG. 1 is a flowchart of a standby processing method of a virtualization system according to a first embodiment of the present invention. The virtualization system may be a virtualization system of a vehicle computer, and the virtualization system includes a first user system and at least one second user system, wherein the first user system is a privileged user system, such as Dom0, and the second user system is a common user system. The method includes the following steps:

[0018] Step 110: The first user system determines whether there is a second user system that is not in standby state.

[0019] If it exists, execute step 120; if it does not exist, execute step 130.

[0020] The second user system is in a non-standby state, indicating that the second user system is in operation.

[0021] The first user system determines whether there is a second user system in a non-standby state is triggered by an operation. For example, when operation A occurs, the first user system determines whether there is a second user system in a non-standby state.

[0022] Taking the virtualization system of the car computer as an example, the first user system can be an LCD instrument panel display system, using the Linux operating system (OS), and the second user system can be a central control system or a rear display system, using the Android OS.

[0023] Step 120: The first user system notifies the second user system to execute a standby process, so that the second user system enters a standby state.

[0024] After the standby process is completed, the second user system enters the standby state. The standby state (Suspend To RAM) indicates that the second user system enters a low power consumption state. All states of the second user system are stored in RAM.

[0025] After a second user system that is not in the standby state enters the standby state, step 130 may also be executed, that is, after all second user systems that are not in the standby state enter the standby state, step 130 is executed.

[0026] Step 130: The first user system executes the standby process of the first user system to enter the standby state.

[0027] Taking the virtualization system of the vehicle computer as an example, it includes a first user system and two second user systems, where the first user system is the LCD instrument panel display system, one second user system is the central control system, and the other second user system is the rear display system. If the central control system and the rear display system are both in the non-standby state, the LCD instrument panel display system first notifies the central control system and the rear display system to enter the standby state. After the central control system and the rear display system enter the standby state, the LCD instrument panel display system executes its standby process and enters the standby state.

[0028] In this embodiment, when there is an ordinary user system in a non-standby state, the privileged user system notifies the ordinary user system to execute the standby process to enter the standby state; when there is no ordinary user system, the privileged user system directly executes the standby process to enter the standby state, thereby realizing targeted standby processing. After all ordinary user systems enter the standby state, the privileged user system starts to execute the standby process to enter the standby state, thereby further realizing targeted standby processing, rather than the entire virtualization system directly entering standby together, thereby realizing lower power consumption standby and being able to wake up quickly when the virtualization system wakes up.

[0029] In some embodiments, in step 120, the first user system notifies the second user system to execute a standby process, so that the second user system executes the standby process to enter a standby state, specifically, as follows: Figure 2 As shown, the second user system executes the standby process including the following steps:

[0030] Step 121: The second user system closes the first process.

[0031] Among them, the first process is a non-critical process.

[0032] Continuing with the example of the virtualization system of the vehicle computer, the first process may be a non-critical application, such as a third-party application that blocks the second user system from being in standby mode. The first process is closed to clear the slow standby mode and the standby mode blocking problem caused by the non-critical process.

[0033] Step 122: The second user system notifies the second process to respond to the standby flow, so that the second process performs state saving, processing and conversion.

[0034] Among them, the second process is the key process.

[0035] Continuing with the example of the virtualization system of the vehicle computer, the second process may be a key system process in the central control system or the rear display system.

[0036] The second user system notifies the second process in the form of callback or broadcast: the second user system currently enters the standby process, the second process responds to the callback or broadcast, that is, responds to the standby process, and then the second process saves, processes and converts the state.

[0037] Step 123: The second user system performs synchronization of the file system.

[0038] The second user system performs synchronization of the file system, that is, writes the content in the cache to the storage device to avoid data loss.

[0039] Step 124: The second user system notifies the first user system to execute the hardware standby process of the second user system to complete the standby process of the second user system.

[0040] The hardware standby process refers to the standby of the hardware module. The second user system notifies the first user system to execute the hardware standby process of the second user system. At this time, the second user system enters the hardware driver layer, and the first user system executes the hardware standby process of the second user system, that is, the hardware standby process of the second user system is performed in the first user system.

[0041] Specifically, in some embodiments, the first user system executes the hardware standby process of the second user system, including: the first user system controls the CPU (central processing unit) to stop scheduling the second user system, then the first user system updates the reference count of the hardware modules involved in the second user system, and then the first user system closes the hardware modules with a reference count of zero. Assuming that there are two hardware modules involved in the second user system, the first user system updates the reference counts of the two hardware modules, and if the reference count of one of the two hardware modules is zero, the hardware module is closed. Among them, the first user system updates the reference count of the hardware module when entering the hardware driver layer. For example, if the number of times a hardware module is referenced by the second user system changes, for example, the number of times the hardware module was originally referenced by the second user system is 5, and the hardware module is referenced by the second user system again, the first user system updates the reference count of the hardware module to 6 times.

[0042] The first user system shuts down the hardware module by powering off the hardware module.

[0043] Continuing with the example of the virtualization system of the vehicle computer, assuming that the second user system is the rear display system, when the reference count of the hardware modules involved in the rear display system is zero, such as the reference count of the rear display screen or the rear display physical control button is zero, the power supply to the rear display screen or the rear display physical control button is stopped to turn off the rear display screen or the rear display physical control button. Assuming that the second user system is the central control system, when the reference count of the hardware modules involved in the central control system is zero, such as the reference count of the central control display screen, audio output or various peripheral circuits is zero, the power supply to the central control display screen, audio output or various peripheral circuits is stopped to turn off the central control display screen, audio output or various peripheral circuits.

[0044] In some embodiments, Figure 3 As shown, step 130 includes:

[0045] Step 131: The first user system notifies the system process of the first user system to respond to the standby process, so that the system process performs state saving, processing and conversion.

[0046] The first user system notifies all system processes through callback or broadcast: the first user system enters the update of the standby state, and each system process responds to the callback or broadcast, that is, responds to the standby process, and then each system process saves, processes and converts the state. For example, if the first user system has n system processes, the n system processes are notified through callback or broadcast, and each system process responds to the callback or broadcast.

[0047] Step 132: Update the reference count of the hardware module involved in the first user system.

[0048] The first user system updates the reference count of the hardware module when entering the hardware driver layer. Assuming that there are m hardware modules involved in the first user system, the first user system updates the reference count of the m hardware modules. For example, if the number of times a certain hardware module is referenced by the first user system changes, for example, the number of times the hardware module was originally referenced by the first user system is 3, and the hardware module is referenced by the first user system again, the first user system updates the reference count of the hardware module to 4 times.

[0049] Step 133: shut down the hardware modules with reference counts of zero among the hardware modules involved in the first user system.

[0050] The hardware module with a reference count of zero is shut down by stopping power supply to the hardware module with a reference count of zero. Continuing with the example of the virtualization system of the vehicle computer, the shut down hardware module does not include DRAM.

[0051] Step 134: Notify the CPU to stop scheduling the first user system, so that the CPU stops scheduling, thereby putting the first user system into a standby state.

[0052] like Figure 4 FIG. 1 is a flowchart of a standby processing method for a virtualization system according to a second embodiment of the present invention. This embodiment is based on the first embodiment, and the method further includes:

[0053] Step 140: The first user system notifies the system process to respond to the standby process, so that all system processes perform state saving, processing and conversion.

[0054] The first user system notifies all system processes through callback or broadcast: the first user system enters the update of the standby state, and each system process responds to the callback or broadcast, that is, responds to the standby process, and then each system process saves, processes and converts the state. For example, if there are n system processes, the n system processes are notified through callback or broadcast, and each system process responds to the callback or broadcast.

[0055] Step 150: Update the reference count of the hardware module involved in the first user system.

[0056] The first user system updates the reference count of the hardware module when entering the hardware driver layer. Assuming that there are m hardware modules involved in the first user system, the first user system updates the reference counts of the m hardware modules, that is, updates the reference counts of all hardware modules.

[0057] Step 160: Close the hardware modules whose reference counts are zero.

[0058] The hardware module with a reference count of zero is shut down by stopping power supply to the hardware module with a reference count of zero. Continuing with the example of the virtualization system of the vehicle computer, the shut down hardware module does not include DRAM.

[0059] Step 170: Notify the CPU to stop scheduling the first user system, so that the CPU stops scheduling, thereby putting the first user system into a standby state.

[0060] The other steps of the method are the same as those of the first embodiment. For detailed descriptions, please refer to the descriptions of the first embodiment, which will not be described again here.

[0061] Wherein, step 140 and step 120 are not performed in the order shown in the figure, but step 140 and step 120 are performed in parallel by the first user system, that is, the first user system performs step 140 and step 120 at the same time, at this time, steps 150-170 are performed after step 120, so that the first user system enters the standby state. That is to say, when there is a second user system in a non-standby state, the standby process response of the execution system process in the first user system, and the standby process is executed in the second user system at the same time, and then the hardware standby process of the first user system is executed. In this way, while achieving targeted standby processing, the standby processing time of the virtualization system is shortened.

[0062] In other embodiments, step 140 is performed before step 110, that is, after the first user system performs step 140, step 110 is performed, and then, if it exists, the first user system performs step 120, and then, the first user system performs steps 150-170, and if it does not exist, the first user system performs step 130. In this way, while achieving targeted standby processing, the standby processing time of the virtualization system is shortened.

[0063] like Figure 5 FIG. 1 is a flowchart of a wake-up processing method for a virtualization system according to an embodiment of the present invention. The method is based on the standby processing method for a virtualization system in the above embodiment, that is, after the virtualization system performs standby processing according to the method in the above embodiment, the wake-up processing method in this embodiment is used to wake up the virtualization system. The method includes the following steps:

[0064] Step 210: The first user system executes a wake-up process of the first user system.

[0065] Step 220: upon receiving a wake-up instruction from one of the at least one second user systems, the first user system controls one of the at least one second user systems to execute a wake-up procedure to complete the wake-up procedure of the second user system.

[0066] In this embodiment, the first user system directly executes the wake-up process of the first user system, and when a wake-up instruction of the second user system is received, the second user system is controlled to execute the wake-up process, thereby realizing fast wake-up according to actual needs.

[0067] In some embodiments, the first user system executes the wake-up process of the first user system including: after the CPU scheduling of the first user system starts, powering on all hardware modules involved in the first user system, then updating the reference counts of the hardware modules, and then restoring the system process to complete the wake-up process of the first user system. Assuming that there are m hardware modules involved in the first user system and n system processes, the first user system updates the reference counts of the m hardware modules and restores the n system processes.

[0068] The first user system notifies all system processes through callback or broadcast: the first user system enters the wake-up process, at this time, a system process responds to the callback or broadcast, that is, responds to the wake-up process to switch the state, so that the first user system restores the system process and the system process works.

[0069] In some embodiments, the first user system controls at least one of the second user systems to execute a wake-up process to complete the wake-up process of the second user system, including: the first user system powers on a hardware module involved in at least one of the second user systems, then updates the reference count of the hardware module, and then controls the CPU to start scheduling at least one of the second user systems so that at least one of the second user systems performs a hardware wake-up process, notifies the second process to respond to the wake-up process, and starts the first process, wherein the first process is a non-critical process and the second process is a critical process. Assuming that there are two hardware modules involved in a second user system, the first user system powers on the two hardware modules and updates the reference counts of the two hardware modules, that is, the first user system powers on all the hardware modules involved in the second user system and updates their reference counts.

[0070] Hardware wake-up processing refers to waking up from the hardware driver layer and processing the driver wake-up process of the relevant hardware module. The second user system notifies the second process in the form of callback or broadcast: the second user system enters the wake-up process, and the second process responds to the callback or broadcast, that is, responds to the wake-up process, and then resumes the second process.

[0071] like Figure 6 As shown, it is a schematic diagram of the structure of a communication device according to an embodiment of the present invention. The communication device 300 may be a vehicle-mounted device, and is equipped with a virtualization system. The virtualization system includes a first user system and at least one second user system, wherein the first user system is a privileged user system and the second user system is a common user system. The communication device includes a memory 310 and a processor 320. The memory 310 is connected to the processor 320.

[0072] The memory 310 may include a read-only memory and / or a random access memory, etc., and provides instructions and data to the processor 320. A portion of the memory 310 may also include a non-volatile random access memory (NVRAM). The memory 310 stores instructions, which, when executed, implement the standby processing method or wake-up processing method of the virtualization system provided by any one of the above embodiments of the present invention and any non-conflicting combination.

[0073] When the instructions in the memory 310 are executed, the processor 320 is used to execute the standby processing method or the wake-up processing method of the virtualization system according to the above-mentioned embodiment of the present invention.

[0074] The processor 320 may be an integrated circuit chip including a CPU and having signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 320 or instructions in the form of software. The above processor 320 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The disclosed methods, steps, and logic block diagrams in the embodiments of the present invention may be implemented or executed.

[0075] The present invention also provides a virtual machine, which can be the above-mentioned vehicle equipment, and is equipped with a virtualization system. The virtualization system includes a first user system and at least one second user system, wherein the first user system is a privileged user system and the second user system is a common user system. The first user system is used to execute the standby processing method of the above-mentioned virtualization system or the wake-up processing method of the above-mentioned virtualization system.

[0076] It is easy for a person skilled in the art to realize that many modifications and changes can be made to the apparatus and method while maintaining the teaching content of the present invention. Therefore, the above disclosure should be considered as limited only by the scope of the appended claims.

Claims

1. A standby processing method for a virtualization system, characterized in that: The virtualization system includes a first user system and at least one second user system, wherein the first user system is a privileged user system and the second user system is a common user system, and the method includes: In response to the trigger operation, the first user system determines whether the second user system is in a non-standby state; If so, the first user system notifies the second user system to execute a standby process, so that the second user system enters a standby state; If not present or after the second user system enters the standby state, the first user system executes the standby process of the first user system to enter the standby state; The first user system executing the standby process of the first user system includes: The first user system notifies the system process of the first user system to respond to the standby process, so that the system process of the first user system performs state saving, processing and conversion; Updating the reference count of the hardware module involved in the first user system; Closing the hardware modules with reference counts of zero among the hardware modules involved in the first user system; Notifying the CPU to stop scheduling the first user system, so that the CPU stops scheduling, thereby putting the first user system into a standby state; The second user system executes the standby process including: The second user system closes the first process, wherein the first process is a non-critical process; The second user system notifies the second process to respond to the standby process so that the second process performs state saving, processing and conversion, wherein the second process is a critical process; The second user system performs synchronization of the file system; The second user system notifies the first user system to execute a hardware standby process of the second user system to complete the standby process of the second user system; The hardware standby process of the first user system executing the second user system includes: The first user system controls the CPU to stop scheduling the second user system; The first user system updates a reference count of a hardware module involved in the second user system; The first user system closes the hardware modules whose reference counts are zero among the hardware modules.

2. The method according to claim 1, characterized in that Further including: While the first user system notifies the second user system to execute the standby process, the first user system notifies the system process to respond to the standby process so that the system process performs state saving, processing and conversion; After the second user system enters the standby state, the first user system updates the reference counts of the hardware modules involved in the first user system, closes the hardware modules whose reference counts are zero, and notifies the CPU to stop scheduling the first user system, so that the CPU stops scheduling, thereby putting the first user system into the standby state.

3. The method according to claim 1, characterized in that Further including: Before the first user system determines whether the second user system is in a non-standby state, the first user system notifies the system process to respond to the standby process so that the system process performs state saving, processing and conversion; After the second user system enters the standby state, the first user system updates the reference counts of the hardware modules involved in the first user system, closes the hardware modules whose reference counts are zero, and notifies the CPU to stop scheduling the first user system, so that the CPU stops scheduling, thereby putting the first user system into the standby state.

4. A wake-up processing method for a virtualized system, characterized in that: The virtualization system includes a first user system and at least one second user system, wherein the first user system is a privileged user system and the second user system is a common user system, and the method includes: The first user system executes a wake-up process of the first user system; Upon receiving a wake-up instruction from one of the at least one second user system, the first user system controls one of the at least one second user system to execute a wake-up process to complete the wake-up process of the second user system; The wake-up processing method of the virtualization system is executed after the standby processing method of the virtualization system according to any one of claims 1 to 3.

5. The method as claimed in claim 4, characterized in that The first user system executing a wake-up process of the first user system includes: After the CPU scheduling of the first user system starts, powering on the hardware modules involved in the first user system; Update the reference count of the hardware module; The system process is restored to complete the wake-up process of the first user system.

6. The method as claimed in claim 4, characterized in that The first user system controls one of the at least one second user system to execute a wake-up process, so that the wake-up process of the second user system is completed, including: The first user system powers on a hardware module involved in the at least one second user system; Update the reference count of the hardware module; The control CPU starts scheduling one of the at least one second user system so that one of the at least one second user system executes a hardware wake-up process, notifies the second process to respond to the wake-up process, and starts the first process, wherein the first process is a non-critical process and the second process is a critical process.

7. A virtual machine, characterized in that: A virtualization system is provided, wherein the virtualization system includes a first user system and at least one second user system, wherein the first user system is a privileged user system, the second user system is a common user system, and the first user system is used to execute the standby processing method of the virtualization system as described in any one of claims 1 to 3 or the wake-up processing method of the virtualization system as described in any one of claims 4 to 6.