WO2019028854A1 - 一种虚拟机的状态管理方法、装置和智能终端 - Google Patents

一种虚拟机的状态管理方法、装置和智能终端 Download PDF

Info

Publication number
WO2019028854A1
WO2019028854A1 PCT/CN2017/097154 CN2017097154W WO2019028854A1 WO 2019028854 A1 WO2019028854 A1 WO 2019028854A1 CN 2017097154 W CN2017097154 W CN 2017097154W WO 2019028854 A1 WO2019028854 A1 WO 2019028854A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual machine
wake
signal
virtual
source
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2017/097154
Other languages
English (en)
French (fr)
Inventor
李岩刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Cloudminds Shenzhen Robotics Systems Co Ltd
Original Assignee
Cloudminds Shenzhen Robotics Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Cloudminds Shenzhen Robotics Systems Co Ltd filed Critical Cloudminds Shenzhen Robotics Systems Co Ltd
Priority to PCT/CN2017/097154 priority Critical patent/WO2019028854A1/zh
Priority to CN201780001819.1A priority patent/CN107810488A/zh
Publication of WO2019028854A1 publication Critical patent/WO2019028854A1/zh
Priority to US16/786,691 priority patent/US20200174823A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked
    • G06F9/4831Task transfer initiation or dispatching by interrupt, e.g. masked with variable priority
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45583Memory management, e.g. access or allocation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the field of virtualization technologies, and in particular, to a method, an apparatus, and an intelligent terminal for managing a state of a virtual machine.
  • the virtual central processing unit (CPU) of the virtual machine may execute an idle instruction to suspend the virtual machine. Entering the sleep state, waiting for the wake-up signal to wake up; when the virtual machine receives the interrupt signal, the virtual machine is woken up, and the virtual machine can be restored to the running state before being suspended after being woken up.
  • CPU central processing unit
  • the inventors have found that at least the following problems exist in the prior art: in the state management technology of the existing virtual machine, the suspension of the virtual machine is implemented by executing the idle instruction by the virtual CPU, whereby the virtual machine is still suspended after being suspended. In the schedulable state, the virtual clock of the virtual machine can still operate normally. When the virtual clock sends an interrupt signal, the virtual machine is triggered to exit the sleep state. If the virtual machine that is awake still meets the suspended condition, It is re-suspended, so that the virtual machine has been continually performing suspend and wake-up, which makes it difficult to truly save energy consumption of the system, and the energy saving effect is not good.
  • the embodiment of the present application provides a method for managing a state of a virtual machine, which is applied to an intelligent terminal, including:
  • the embodiment of the present application further provides a state management device for a virtual machine, which is applied to an intelligent terminal, and includes:
  • a sleeping unit configured to: put the virtual machine into hibernation according to the suspending instruction, and acquire a sleep phase registration value of the virtual machine in real time;
  • a suspending unit configured to suspend operation of the virtual CPU of the virtual machine when the sleep phase registration value matches the target sleep state.
  • At least one processor and,
  • the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform a state management method of a virtual machine as described above.
  • the embodiment of the present application further provides a non-transitory computer readable storage medium, where the non-transitory computer readable storage medium stores computer executable instructions for using a smart terminal.
  • the state management method of the virtual machine as described above is executed.
  • the embodiment of the present application further provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program When the instruction is executed by the smart terminal, the smart terminal is caused to execute the state management method of the virtual machine as described above.
  • the method for the state management of the virtual machine provided by the embodiment of the present application and the intelligent terminal provide the suspension instruction according to the suspend instruction when receiving the suspend instruction including the target sleep state of the virtual machine.
  • the virtual machine enters hibernation and acquires the sleep phase registration value of the virtual machine in real time.
  • the sleep phase registration value matches the target sleep state, the virtual CPU of the virtual machine is suspended, and the virtual machine can be completely suspended. To avoid virtual machine wake-up by mistake, thus effectively saving the system's energy consumption.
  • FIG. 1 is a schematic diagram of one application environment of a state management method of a virtual machine according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a method for suspending a virtual machine according to an embodiment of the present application
  • FIG. 3 is a schematic flowchart of a wake-up method of a virtual machine according to an embodiment of the present application
  • FIG. 4 is a schematic flowchart of another state management method of a virtual machine according to an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a state management apparatus of a virtual machine according to an embodiment of the present disclosure
  • the method for managing the state of the virtual machine provided by the embodiment of the present application includes a method for suspending the virtual machine and a method for waking up the virtual machine, wherein the virtual machine is suspended after the virtual machine is suspended by the suspending method of the virtual machine provided by the embodiment of the present application.
  • the user space and the process of the kernel space are completely frozen, and the virtual device such as the virtual central processing unit (CPU) and the virtual clock of the virtual machine are suspended, that is, the virtual device of the virtual machine stops responding to the main operation.
  • the state management method and apparatus of the virtual machine provided by the embodiment of the present application can be applied to any type of smart terminal, such as a robot, a smart phone, a server, a personal computer, a tablet computer, a wearable smart device, a smart home appliance, and the like.
  • a robot a smart phone
  • server a personal computer
  • tablet computer a wearable smart device
  • smart home appliance a smart home appliance
  • the physical hardware device 10 is a physical device that actually exists, and may include any suitable device component that constitutes a complete computer system, including but not limited to: a processor 101, a storage medium 102, an input/output device 103, and a communication module 104. Wait.
  • the processor 101 may be any suitable type of processor having a certain logic operation capability, such as a CPU, a graphics processor, or the like.
  • Processor 101 may also include multiple cores for multi-threading or parallel processing.
  • the storage medium 102 may include a memory module such as a ROM, a RAM, a flash memory module, and a mass storage such as an optical disk and a hard disk.
  • Computer programs are stored in the storage medium 102, and when the processor 101 executes the computer programs, various corresponding method steps or processes can be implemented.
  • the input/output device 103 can be any suitable type of peripheral device that provides one or more user interaction modes, such as a mouse, keyboard or touch input screen that receives user action instructions, a somatosensory camera for acquiring image information, A microphone for collecting sound information or a display screen for displaying image information to a user or a speaker for outputting audio.
  • the input/output device 103 can choose to connect to other physical hardware devices using wired or wireless peripheral devices.
  • Communication module 104 may include some network interface devices that establish connections through a wired or wireless communication network. For example, a network cable interface, a bus interface, a USB interface, a WiFi module, or a Bluetooth communication module.
  • the main operating system 11 and the guest operating system 12 belong to the management and control physical hardware device. 10 and the corresponding software resources of the computer program, is the most basic system software running directly on the "bare metal", any other software must be supported by the main operating system 11 or the guest operating system 12 to run.
  • the main operating system 11 and the guest operating system 12 may be any suitable type of operating system, such as: Linux, Unix, IOS, Android, Windows, etc., for receiving user instructions and outputting corresponding data accordingly. The processing results are shown to the user.
  • the physical hardware device 10 is shared between the main operating system 11 and a number of guest operating systems 12.
  • the host operating system 11 can directly use the hardware devices in the physical hardware device 10, while the guest operating system 12 uses the virtual devices provided by the virtual machines that drive the guest operating system 12.
  • the “virtual machine” refers to a computer system that is simulated by software and has a complete hardware system function and runs in a completely isolated environment.
  • the virtual machine may form a plurality of simulated hardware devices (ie, "virtual devices" described in the embodiments of the present application) for use by the guest operating system based on the physical hardware device 10 or a software program.
  • a virtual machine corresponds to drive a guest operating system, and each of the virtual machines can be run as one of the applications in the main operating system 11. Therefore, it can be considered that suspending/waking up the virtual machine suspends/wakes up the guest operating system corresponding to the virtual machine.
  • the smart terminal when the user inputs an instruction to suspend a certain guest operating system 12 in the smart terminal, or the current running state of a certain guest operating system 12 satisfies the smart terminal preset for the guest operating system 12
  • the suspend condition for example, when a guest operating system 12 has no active tasks for a preset period of time, triggers a suspend instruction to suspend the guest operating system 12.
  • the smart terminal receives the suspend command, the virtual machine corresponding to the guest operating system 12 may be suspended by using the suspending method of the virtual machine as shown in FIG. 2 provided by the embodiment of the present application, that is, the virtual machine is received.
  • target sleep state refers to a sleep state in which the system of the smart terminal expects the virtual machine to enter, and the target sleep state may be acquired from a suspend instruction of the virtual machine.
  • the sleep state of the virtual machine may include, but is not limited to, shallow sleep, moderate sleep, deep sleep, hibernation, etc., and each sleep state may be awakened in different manners, and the deeper the sleep degree, the virtual machine is The more difficult it is to wake up.
  • the process of the virtual machine entering the dormant process is a phased process from shallow to deep, and each dormant phase corresponds to a different dormant phase registration value.
  • the “sleep phase registration value” is used to represent The virtual machine currently enters the sleep phase, and the virtual CPU of the virtual machine is suspended after the virtual machine completely enters the target sleep state. After the virtual CPU is suspended, it no longer responds to the scheduling of the host operating system 11, thereby achieving a complete hang of the virtual machine, i.e., the guest operating system 12 is completely stopped.
  • the wake-up signal of the guest operating system 12 may be input to the smart terminal, or when the smart terminal detects that the guest operating system 12 satisfies the pre-
  • the wake-up signal can also be automatically triggered when the wake-up condition is set, and the smart terminal can wake up the virtual machine corresponding to the guest operating system 12 by using any wake-up mode after receiving the wake-up signal, so that the virtual machine can be restored to the state before it is suspended.
  • Operating status In particular, in order to further prevent the virtual machine from being awake by some invalid wake-up signals, the virtual machine may be woken up by the wake-up method of the virtual machine as shown in FIG.
  • the embodiment of the present application that is, after receiving the wake-up signal, First determining whether the wake-up signal is an effective wake-up source of the virtual machine; if yes, recovering operation of the virtual CPU of the virtual machine according to the wake-up signal; if not, maintaining a sleep state of the virtual machine. Since the virtual CPU is the core virtual device in the virtual machine, when the virtual CPU is resumed, the virtual machine is woken up and enters the operational state before the virtual machine is suspended. Based on the above manner, it can be further avoided that the virtual machine is woken up by some invalid wake-up signals.
  • FIG. 2 is a schematic flowchart of a method for suspending a virtual machine according to an embodiment of the present application. Referring to FIG. 2, the method includes:
  • the “suspend instruction” refers to an instruction to put the virtual machine into a sleep state, where the suspend instruction includes a target sleep state of the virtual machine, and the “target sleep state” refers to the smart terminal. The system expects the virtual machine to enter a sleep state.
  • the smart terminal When the smart terminal receives the suspend instruction of a certain virtual machine, it first determines the target sleep state of the virtual machine according to the suspend instruction, and then performs the following steps 120-130.
  • each virtual machine corresponds to a sleep status register, and the value recorded on the sleep status register is The sleep state registration value of the virtual machine is used to characterize the target sleep state of the virtual machine. Therefore, the specific implementation manner of determining the virtual machine target sleep state according to the suspending instruction may be: directly extracting a sleep state registration value of the virtual machine from the suspend instruction, and updating the sleep state registration value to the sleep state. In the status register; or, after setting the sleep status register of the virtual machine according to the suspend instruction, the sleep status registration value of the virtual machine is read from the sleep status register.
  • the virtual machine enters hibernation according to the suspending instruction, and acquires a sleep phase registration value of the virtual machine in real time.
  • the sleep phase registration value of the virtual machine is also obtained in real time to determine the sleep phase into which the virtual machine enters.
  • the suspension method of the virtual machine provided by the embodiment of the present application can suspend the operation of the virtual CPU after the virtual machine completely enters the target sleep state, thereby completely suspending the virtual machine and saving energy consumption of the smart terminal. .
  • the embodiment of the present application further proposes a virtual machine wake-up method for any virtual machine in a certain sleep state.
  • the method includes:
  • the execution priority of the virtual machine may be A wake-up signal corresponding to a virtual machine is configured with a priority level.
  • virtual machine A and virtual machine B exist in the smart terminal.
  • the execution priority of virtual machine A is higher than that of virtual machine B.
  • the effective wake-up source of virtual machine A is wake-up signal a
  • the effective wake-up source of virtual machine B is wake-up.
  • the signal b can determine that the wake-up signal a has a higher priority than the wake-up signal b; if both the virtual machine A and the virtual machine B are in the sleep state, and the smart terminal receives the same at the same time
  • the wake-up signal a and the wake-up signal b can be extracted from the two wake-up signals
  • the wake-up signal a (the highest priority wake-up signal) is output, and then the following steps 220-230 are performed based on the wake-up signal a, wherein for the virtual machine A: the wake-up signal a is its effective wake-up source, so that it can be recovered according to the wake-up signal a
  • the virtual CPU A of the virtual machine A runs; and for the virtual machine B: the wake-up signal a is not a valid wake-up source of the virtual machine B, thereby maintaining the sleep state of the virtual machine B unchanged. Therefore, at the same time, the smart terminal wakes up only one virtual machine (such as virtual machine A)
  • the "effective wake-up source” refers to a specific wake-up signal capable of waking up a certain virtual machine from the current sleep state.
  • the same virtual machine may be configured with different effective wake-up sources in different sleep states, and the number of valid wake-up sources may not be limited to one.
  • the wake-up signal when the wake-up signal is received, the wake-up signal is first analyzed to determine whether it is a valid wake-up source for the virtual machine. Wherein, if the received wake-up signal includes at least two, and each wake-up signal has a priority level, the wake-up signal with the highest priority among the wake-up signals is analyzed to determine whether it is an effective wake-up source of the virtual machine. If the wake-up signal is a valid wake-up source for the virtual machine, step 230 is performed to maintain the sleep state of the virtual machine unchanged if the wake-up signal is not a valid wake-up source for the virtual machine.
  • the smart terminal may number all possible wake-up signals, and each wake-up signal corresponds to a unique wake-up number.
  • a wake-up source setting register is correspondingly set in each virtual machine, and the value recorded in the wake-up source setting register is called “wake-up source registered value”, and is used for recording a valid wake-up source of the virtual machine in the current sleep state.
  • the "awake source registration value" may be configured in the wake-up source setting register by the smart terminal according to the sleep state entered by the virtual machine after the virtual machine is suspended.
  • the specific implementation manner of determining whether the wake-up signal is a valid wake-up source of the virtual machine may be: first acquiring a wake-up number corresponding to the wake-up signal; and then determining whether the wake-up number and the wake-up source registration value of the virtual machine match. And if so, determining that the wake-up signal is a valid wake-up source for the virtual machine; if not, determining that the wake-up signal is not a valid wake-up source for the virtual machine.
  • the virtual machine since the virtual machine may have multiple valid wake-up sources in the same sleep state, in order to improve the response speed and accuracy of the virtual machine after being awake, in the embodiment, the virtual machine is restored according to the wake-up signal.
  • the specific implementation of the operation of the virtual CPU may be: first acquiring the wake-up source type of the wake-up signal, and then restoring the virtual CPU running of the virtual machine according to the wake-up source type. For example, if the wakeup source type of the currently obtained wakeup information is a phone, the virtual CPU of the virtual machine is first resumed according to the wakeup information, that is, the task of freezing the user space when the virtual machine is suspended is suspended. Schedule tasks related to "telephone" in the operating system of the virtual machine.
  • the waking method of the virtual machine provided by the embodiment of the present application can further prevent the virtual machine from being erroneously awake by restoring the operation of the virtual CPU after the virtual machine receives the valid wake-up source.
  • a state lock service is also set on the main operating system of the smart terminal, and the state lock service may be A software program for recording the operational status of a virtual machine present on a smart terminal.
  • the state lock service When starting or waking up a virtual machine, you can apply for the state machine of the virtual machine in the main operating system to indicate that the virtual machine enters the running state; when the virtual machine is shut down or suspended, it can be in the main operating system.
  • the state lock service of the virtual machine is revoked to indicate that the virtual machine enters a shutdown or hibernation state; the main operating system corresponds to updating and counting the number of virtual machines using the state lock service.
  • the number of virtual machines using the state lock service is the number of running virtual machines.
  • the number of virtual machines using the state lock service is zero, all virtual machines/client operating systems on the smart terminal are in a sleep or shutdown state. At this time, the smart terminal can be allowed to suspend the main operating system. Similarly, if the number of virtual machines currently using the state lock service is not 0, then the virtual machine is currently running. The smart terminal cannot suspend the main operating system.
  • the embodiment of the present application further provides another state management method for a virtual machine, which is different from the suspension method of the virtual machine shown in FIG. 2 and the wake-up method of the virtual machine shown in FIG. 3.
  • the step of suspending the virtual machine further includes: revoking the state lock service of the virtual machine in the main operating system of the smart terminal
  • the step of waking up the virtual machine further includes: Apply for the state lock service of the virtual machine in the operating system.
  • the virtual machine is put into hibernation according to the suspending instruction, and the dormant phase registration value of the virtual machine is obtained in real time;
  • the state management method of the virtual machine revokes the state lock service of the virtual machine in the main operating system when the virtual machine is suspended, and applies in the main operating system when the virtual machine is woken up.
  • the state machine lock service of the virtual machine can facilitate the synchronization of the running state of the virtual machine. To the main operating system, to avoid the sudden interruption of the virtual machine operation caused by the hang of the main operating system, which may cause the operation failure after the virtual machine is woken up.
  • FIG. 5 is a schematic structural diagram of a state management apparatus for a virtual machine according to an embodiment of the present application.
  • the device 5 includes:
  • Suspending the instruction receiving unit 51 configured to receive a suspend instruction of the virtual machine, where the suspend instruction includes a target sleep state of the virtual machine;
  • the suspending unit 53 is configured to suspend operation of the virtual CPU of the virtual machine when the sleep phase registration value matches the target sleep state.
  • the hibernation unit 52 when the suspend instruction receiving unit 51 receives the suspend instruction including the target sleep state of the virtual machine, the hibernation unit 52 causes the virtual machine to enter the sleep according to the suspend instruction, and acquires in real time.
  • the sleep phase of the virtual machine registers a value; when the sleep phase registration value matches the target sleep state, the operation of the virtual CPU of the virtual machine is suspended by the suspending unit 53.
  • the device 5 further includes:
  • the wake-up signal receiving unit 54 is configured to receive a wake-up signal
  • the apparatus 5 further includes: when the sleep phase registration value matches the target sleep state, canceling the virtual in the main operating system The revocation unit 57 of the state lock service of the machine, and/or for applying for the state lock service of the virtual machine in the main operating system if the wakeup signal is a valid wakeup source of the virtual machine Unit 58.
  • the determining unit 55 is specifically configured to: acquire a wake-up number corresponding to the wake-up signal; Whether the wakeup number and the wakeup source registration value of the virtual machine match; if yes, determining that the wakeup signal is a valid wakeup source of the virtual machine.
  • the recovery unit 56 is specifically configured to: acquire a wake-up source type of the wake-up signal, and resume operation of the virtual CPU of the virtual machine according to the wake-up source type.
  • the apparatus 5 further includes: a selecting unit 59, configured to extract a wake-up signal with the highest priority among the wake-up signals.
  • the determining unit 55 is specifically configured to: determine whether the wake-up signal with the highest priority is the valid wake-up source of the virtual machine; the restoring unit 56 is specifically configured to: restore the virtual according to the wake-up signal with the highest priority The virtual CPU of the machine is running.
  • FIG. 6 is a schematic diagram of a hardware structure of an intelligent terminal according to an embodiment of the present disclosure.
  • the smart terminal 600 may be any type of smart terminal, such as a mobile phone, a tablet computer, a server, a robot, etc., capable of executing the virtual machine as described above.
  • State management method sustained method of virtual machine and/or wakeup method of virtual machine.
  • One or more processors 601 and memory 602, one processor 601 is taken as an example in FIG.
  • the processor 601 and the memory 602 may be connected by a bus or other means, as exemplified by a bus connection in FIG.
  • the one or more modules are stored in the memory 602, and when executed by the one or more processors 601, perform a state management method of the virtual machine in any of the above method embodiments, for example, performing the above described
  • the method steps 110 to 130 in FIG. 2, the method steps 210 to 230 in FIG. 3, and the method steps 310 to 380 in FIG. 4 implement the functions of the units 51-59 in FIG.
  • the embodiment of the present application further provides a non-transitory computer readable storage medium storing computer executable instructions executed by one or more processors, for example,
  • a processor 601 in FIG. 6 may be configured to cause the one or more processors to perform a state management method of a virtual machine in any of the foregoing method embodiments, for example, to perform the method steps 110 to 130 in FIG. 2 described above, Method steps 210 through 230 in FIG. 3, method steps 310 through 380 in FIG. 4, implement the functions of units 51-59 in FIG.
  • the various embodiments can be implemented by means of software plus a general hardware platform, and of course, by hardware.
  • One of ordinary skill in the art can understand that all or part of the process of implementing the above embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a non-transitory computer.
  • the program when executed, may include the flow of an embodiment of the methods as described above.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Power Sources (AREA)

Abstract

一种虚拟机的状态管理方法、装置和智能终端。其中,所述方法包括:接收虚拟机的挂起指令,所述挂起指令中包括所述虚拟机目标休眠状态(110);根据所述挂起指令使所述虚拟机进入休眠,并实时获取所述虚拟机的休眠阶段寄存值(120);当所述休眠阶段寄存值与所述目标休眠状态匹配时,暂停所述虚拟机的虚拟CPU的运行(130)。本方法能够实现虚拟机的完全挂起,避免虚拟机被其虚拟时钟产生的中断信号错误唤醒,提升系统的节能效果。

Description

一种虚拟机的状态管理方法、装置和智能终端 技术领域
本申请涉及虚拟化技术领域,尤其涉及一种虚拟机的状态管理方法、装置和智能终端。
背景技术
随着硬件成本的持续增长,以虚拟机为代表的虚拟化技术因其具有成本低、安全性高等特点得到了长足发展。
当前,为了节省系统的总能耗,在虚拟机没有活动的任务时,可以使该虚拟机的虚拟中央处理器(Central Processing Unit,CPU)执行空闲(idle)指令,将该虚拟机挂起以进入休眠状态,等待被中断信号唤醒;当该虚拟机接收到中断信号时,唤醒该虚拟机,该虚拟机被唤醒之后可以恢复到被挂起之前的运行状态。
然而,发明人发现现有技术至少存在以下问题:在现有的虚拟机的状态管理技术中,虚拟机的挂起通过虚拟CPU执行idle指令来实现,由此,虚拟机被挂起后仍然处于可调度的状态,虚拟机的虚拟时钟仍能够正常运行,当该虚拟时钟发出中断信号时,会触发该虚拟机退出休眠状态,若被唤醒后的虚拟机仍然满足被挂起的条件,则会被重新被挂起,从而使得虚拟机一直循环执行挂起和唤醒,难以真正实现节省系统的能量消耗,节能效果不佳。
发明内容
本申请实施例提供一种虚拟机的状态管理方法、装置和智能终端,能够解决现有的虚拟机的状态管理技术的节能效果不佳的问题。
第一方面,本申请实施例提供了一种虚拟机的状态管理方法,应用于智能终端,包括:
接收虚拟机的挂起指令,所述挂起指令中包括所述虚拟机的目标休眠状态;
根据所述挂起指令使所述虚拟机进入休眠,并实时获取所述虚拟机的休眠阶段寄存值;
当所述休眠阶段寄存值与所述目标休眠状态匹配时,暂停所述虚拟机的虚拟CPU的运行。
第二方面,本申请实施例还提供了一种虚拟机的状态管理装置,应用于智能终端,包括:
挂起指令接收单元,用于接收虚拟机的挂起指令,所述挂起指令中包括所述虚拟机的目标休眠状态;
休眠单元,用于根据所述挂起指令使所述虚拟机进入休眠,并实时获取所述虚拟机的休眠阶段寄存值;
暂停单元,用于当所述休眠阶段寄存值与所述目标休眠状态匹配时,暂停所述虚拟机的虚拟CPU的运行。
第三方面,本申请实施例还提供了一种智能终端,包括:
至少一个处理器;以及,
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如上所述的虚拟机的状态管理方法。
第四方面,本申请实施例还提供了一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使智能终端执行如上所述的虚拟机的状态管理方法。
第五方面,本申请实施例还提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被智能终端执行时,使所述智能终端执行如上所述的虚拟机的状态管理方法。
本申请实施例的有益效果在于:本申请实施例提供的虚拟机的状态管理方法、装置和智能终端通过在接收到包括虚拟机的目标休眠状态的挂起指令时,根据该挂起指令使该虚拟机进入休眠,并实时获取该虚拟机的休眠阶段寄存值,当该休眠阶段寄存值与所述目标休眠状态匹配时,暂停该虚拟机的虚拟CPU的运行,能够实现虚拟机的完全挂起,避免虚拟机被错误唤醒,从而有效节省系统的能量消耗。
附图说明
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。
图1是本申请实施例提供的虚拟机的状态管理方法的其中一种应用环境的示意图;
图2是本申请实施例提供的一种虚拟机的挂起方法的流程示意图;
图3是本申请实施例提供的一种虚拟机的唤醒方法的流程示意图;
图4是本申请实施例提供的另一种虚拟机的状态管理方法的流程示意图;
图5是本申请实施例提供的一种虚拟机的状态管理装置的结构示意图;
图6是本申请实施例提供的一种智能终端的硬件结构示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。
需要说明的是,如果不冲突,本申请实施例中的各个特征可以相互结合,均在本申请的保护范围之内。另外,虽然在装置示意图中进行了功能模块划分,在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于装置示意图中的模块划分,或流程图中的顺序执行所示出或描述的步骤。
本申请实施例提供的虚拟机的状态管理方法包括虚拟机的挂起方法和虚拟机的唤醒方法,其中,采用本申请实施例提供的虚拟机的挂起方法挂起虚拟机之后,该虚拟机的用户空间和内核空间的进程均完全被冻结,该虚拟机的虚拟中央处理器(Central Processing Unit,CPU)、虚拟时钟等虚拟设备均暂停工作,即,该虚拟机的虚拟设备停止响应主操作系统的调度,从而能够有效避免虚拟机因被其虚拟时钟产生的中断信号错误唤醒而不断循环挂起和唤醒的过程,进而有效节省系统的能量消耗;进一步地,在本申请实施例提供的虚拟机的唤醒方法中,处于休眠状态下的虚拟机需在接收到有效的唤醒源的情况下才可以被唤醒(即:恢复运行虚拟机的虚拟CPU以恢复到虚拟机挂起之前的运行状态),能够进一步避免虚拟机被错误唤醒,进一步节省系统的能量消耗。
本申请实施例提供的虚拟机的状态管理方法和装置能够应用于任意类型的智能终端,比如:机器人、智能手机、服务器、个人电脑、平板电脑、可穿戴智能设备、智能家电等等。通过使用本申请实施例提供的虚拟机的状态管理方法、装置和智能终端,能够实现虚拟机的完全挂起,避免虚拟机被错误唤醒,从而有效节省系统的能量消耗。
具体地,下面结合附图,对本申请实施例作进一步阐述。
图1是本申请实施例提供的虚拟机的状态管理方法的其中一种应用环境的示意图。该应用环境可以是运行在某一智能终端上的计算机系统环境。具体地,如图1所示,该应用环境中包括:物理硬件设备10、主操作系统11以及若干个客户操作系统12。
其中,物理硬件设备10是实际存在的硬件设备,可以包括任何合适的,组成完整计算机系统的设备组件,包括但不限于:处理器101、存储介质102、输入/输出设备103以及通信模组104等。
具体地,处理器101可以是任何合适类型的,具有一定逻辑运算能力的处理器,例如:CPU、图形处理器等。处理器101还可以包括用于多线程或并行处理的多个核心。
存储介质102可以包括内存模块,例如:ROM、RAM、闪存模块,以及大容量存储器,例如光盘和硬盘。存储介质102中存储有计算机程序,当处理器101执行这些计算机程序时,可以实现各种相应方法步骤或流程。
输入/输出设备103可以是任何合适类型的,提供一种或者多种用户交互方式的外围设备,例如接收用户动作操作指令的鼠标、键盘或者触摸输入屏,用于采集图像信息的体感摄像机、用于采集声音信息的麦克风或者向用户展示图像信息的显示屏或者用于输出音频的扬声器。所述输入/输出设备103可以选择使用有线或者无线的外围设备与其他物理硬件设备连接。
通信模组104可以包括某些通过有线或者无线通信网络建立连接的网络接口设备。例如,网线接口、总线接口、USB接口、WiFi模组或者蓝牙通信模组等。
在实际应用过程中,所述物理硬件设备10还可以添加或者减省一个或者多个设备,用以满足不同的实际应用情况需求,例如增加数据库或者服务器设备。
其中,主操作系统11和客户操作系统12均属于管理和控制物理硬件设备 10以及相应的软件资源的计算机程序,是直接运行在“裸机”上的最基本的系统软件,任何其他软件都必须在主操作系统11或客户操作系统12的支持下才能运行。在本申请实施例中,主操作系统11和客户操作系统12均可以是任何合适类型的操作系统,如:Linux、Unix、IOS、Android、Windows等,用以接收用户指令并据此输出对应的处理结果向用户展示。
主操作系统11以及若干个客户操作系统12之间共享所述物理硬件设备10。在实际运行时,主操作系统11可以直接使用所述物理硬件设备10中的硬件设备,而客户操作系统12则使用由驱动该客户操作系统12的虚拟机提供的虚拟设备。其中,所述“虚拟机”是指通过软件模拟的具有完整硬件系统功能的,运行在一个完全隔离环境中的计算机系统。所述虚拟机可以基于物理硬件设备10或者软件程序形成多个模拟出来的硬件设备(即,本申请实施例中所述的“虚拟设备”)供客户操作系统使用。一个虚拟机对应驱动一个客户操作系统,每一所述虚拟机可以作为主操作系统11中的其中一个应用程序运行。因此,可以认为挂起/唤醒虚拟机即挂起/唤醒与该虚拟机对应的客户操作系统。
不同的操作系统之间存在有内存隔离,即便是主操作系统11也不能够访问客户操作系统12的内存空间。这样,当计算机系统中存在两个或以上的客户操作系统12时,若其中一个客户操作系统12因为异常重新启动,主操作系统11和其它客户操作系统12还可以正常运行,相互隔离。然而,由于虚拟机是作为主操作系统中的应用程序运行的,因此,若主操作系统11因为异常重新启动,那么所有的客户操作系统12都需要重新启动才可以运行,同理,若主操作系统11被挂起,所有的客户操作系统12也都会被挂起,由此,当系统中存在多个客户操作系统12时,需要所有客户操作系统12都进入休眠状态之后,主操作系统11才可以进入休眠状态。
在本申请实施例中,可以在用户在智能终端中输入挂起某一客户操作系统12的指令时;或者,某一客户操作系统12当前的运行状态满足智能终端针对该客户操作系统12预设的挂起条件时,比如,当某一客户操作系统12在预设时间段内没有活动的任务时,触发挂起该客户操作系统12的挂起指令。而该智能终端在接收到该挂起指令时,可以采用本申请实施例提供的如图2所示的虚拟机的挂起方法挂起该客户操作系统12对应的虚拟机,即:接收虚拟机的挂起指令,其中,所述挂起指令中包括所述虚拟机的目标休眠状态;根据所述挂起指 令进入休眠,并实时获取所述虚拟机的休眠阶段寄存值;当所述休眠阶段寄存值与所述目标休眠状态匹配时,暂停所述虚拟机的虚拟CPU的运行。基于上述方式,虚拟机被挂起后不会因为虚拟时钟或者其他虚拟设备的中断而被错误唤醒,能够实现虚拟机的完全挂起,节省智能终端的能量消耗。
其中,需要说明的是,所述“目标休眠状态”是指智能终端的系统期望该虚拟机进入的休眠状态,该目标休眠状态可以从该虚拟机的挂起指令中获取。其中,虚拟机的休眠状态可以包括但不限于:浅度睡眠、中度睡眠、深度睡眠、冬眠等等,针对每一休眠状态可以通过不同的方式唤醒,并且,休眠程度越深,虚拟机被唤醒的难度越大。又,虚拟机进入休眠的过程是由浅到深的具有阶段性的过程,每一休眠阶段对应有不同的休眠阶段寄存值,因此,在本申请实施例中,采用“休眠阶段寄存值”来表征虚拟机当前进入到的休眠阶段,当虚拟机完全进入目标休眠状态之后,才暂停虚拟机的虚拟CPU的运行。虚拟CPU被暂停之后,不再响应主操作系统11的调度,从而实现虚拟机的完全挂起,即,客户操作系统12完全停止运行。
客户操作系统12进入休眠状态之后,当用户需要继续使用上述客户操作系统12时,可以向智能终端输入唤醒该客户操作系统12的唤醒信号,或者,当智能终端检测到该客户操作系统12满足预设的唤醒条件时,也可以自动触发唤醒信号,而智能终端在接收到唤醒信号之后可以采用任意唤醒方式唤醒该客户操作系统12对应的虚拟机,使该虚拟机恢复到其被挂起之前的运行状态。特别地,为了进一步防止虚拟机被一些无效的唤醒信号错误唤醒,也可以采用本申请实施例提供的如图3所示的虚拟机的唤醒方法唤醒虚拟机,即:在接收到唤醒信号之后,首先判断所述唤醒信号是否为所述虚拟机的有效唤醒源;若是,则根据所述唤醒信号恢复所述虚拟机的虚拟CPU的运行;若否,则维持虚拟机的休眠状态。由于虚拟CPU是虚拟机中的核心虚拟设备,因此,当恢复虚拟CPU的运行时,该虚拟机被唤醒,并且进入该虚拟机被挂起之前的运行状态。基于上述方式,可以进一步避免虚拟机被一些无效的唤醒信号唤醒。
其中,需要说明的是,所述“唤醒信号”是指能够使某一虚拟机退出休眠状态/挂起状态的信号,该唤醒信号可以包括多种类型/表现形式,比如,其可以为启动该虚拟机对应的虚拟电源、智能终端充电、客户操作系统之间的切换、通话等等,其可以根据客户操作系统12的功能进行配置,当虚拟机接收到配置 给该客户操作系统12的唤醒信号之后,恢复其虚拟CPU的运行。此外,在一些实施例中,还通知客户操作系统12唤醒信号的类型(即,虚拟机的底层向虚拟机的上层应用程序广播接收到的唤醒信号的类型),以方便客户操作系统12根据该唤醒信号的类型执行相应的任务。
此外,可以理解的是,当该智能终端的计算机系统中所有的客户操作系统12均处于休眠状态时,同样可以采用本申请实施例提供的虚拟机的挂起方法挂起主操作系统11对应的物理主机;而在主操作系统11处于休眠状态时,也可以采用本申请实施例提供的虚拟机的唤醒方法唤醒主操作系统11对应的物理主机。
再者,需要说明的是,本申请实施例提供的虚拟机的状态管理方法包括虚拟机的挂起方法和虚拟机的唤醒方法,这两种方法可以相互配合使用,也可以单独使用。并且,本申请实施例提供的虚拟机的状态管理方法还可以进一步的拓展到其他合适的应用环境中,而不限于图1中所示的应用环境。在实际应用过程中,该应用环境还可以包括更多或者更少的客户操作系统以及更多或者更少物理硬件设备类型。
具体地,图2是本申请实施例提供的一种虚拟机的挂起方法的流程示意图,请参阅图2,该方法包括:
110、接收虚拟机的挂起指令,所述挂起指令中包括所述虚拟机的目标休眠状态。
在本实施例中,所述“挂起指令”是指使虚拟机进入休眠状态的指令,在该挂起指令中包括虚拟机的目标休眠状态,而所述“目标休眠状态”是指智能终端的系统期望该虚拟机进入的休眠状态。
在本实施例中,可以通过任意合适的方式触发期望某一虚拟机进入某一休眠状态的挂起指令,比如:用户输入“将虚拟机A挂起,并进入浅度睡眠的休眠状态”的命令;又如,虚拟机B在20分钟内都没有活动的任务,且智能终端当前的电量只剩50%,智能终端自动触发“使虚拟机B进入深度睡眠的休眠状态”的挂起指令。
当智能终端接收到某一虚拟机的挂起指令时,首先根据该挂起指令确定该虚拟机的目标休眠状态,然后执行下述步骤120~130。其中,在本实施例中,每一虚拟机都对应有一个休眠状态寄存器,该休眠状态寄存器上记录的数值即该 虚拟机的休眠状态寄存值,用于表征该虚拟机的目标休眠状态。由此,根据该挂起指令确定该虚拟机目标休眠状态的具体实施方式可以是:直接从挂起指令中提取出该虚拟机的休眠状态寄存值,并将该休眠状态寄存值更新到该休眠状态寄存器中;或者,根据该挂起指令设置该虚拟机的休眠状态寄存器之后,从该休眠状态寄存器中读取出该虚拟机的休眠状态寄存值。
120、根据所述挂起指令使所述虚拟机进入休眠,并实时获取所述虚拟机的休眠阶段寄存值。
在本实施例中,每一虚拟机还对应有一个休眠阶段寄存器,该休眠阶段寄存器上记录的数值即虚拟机的“休眠阶段寄存值”,用于表征虚拟机当前进入到的休眠阶段,不同休眠阶段对应有不同的休眠阶段寄存值。
在本实施例中,在接收到针对某一虚拟机的挂起指令之后,根据该挂起指令确定该虚拟机的目标休眠状态/休眠状态寄存值,同时,根据该挂起指令使该虚拟机进入休眠。又,由于虚拟机进入休眠的过程是由浅到深的具有阶段性的过程,虚拟机的休眠阶段寄存器上记录的数值也随着虚拟机进入到的休眠阶段而实时更新,因此,在本步骤120中,还实时获取该虚拟机的休眠阶段寄存值以确定该虚拟机进入到的休眠阶段。
130、当所述休眠阶段寄存值与所述目标休眠状态匹配时,暂停所述虚拟机的虚拟CPU的运行。
在本实施例中,若获取到的休眠阶段寄存值与该虚拟机的目标休眠状态匹配,则说明虚拟机当前已经完全进入了目标休眠状态,该虚拟机已经为此次挂起做好准备,即,已经将相关的文件或者数据备份至虚拟机挂起状态(.vmss或.vmem)文件集,此时,可以暂停该虚拟机的虚拟CPU的运行。在暂停虚拟CPU的运行之后,该虚拟机完全被挂起,不再响应主操作系统的调度。
其中,判断获取到的休眠阶段寄存值与该虚拟机的目标休眠状态是否匹配可以通过比较步骤120获取到的休眠阶段寄存值和步骤110确定的休眠状态寄存值来确定,若该休眠阶段寄存值与该休眠状态寄存值相同(比如,休眠状态寄存值为010100,休眠阶段寄存值也为010100),或者,若该休眠阶段寄存值与该休眠状态寄存值相对应(比如,休眠状态寄存值为010100,休眠阶段寄存值为101011),则可以认为获取到的休眠阶段寄存值与该虚拟机的目标休眠状态匹配。当然,可以理解的是,在实际应用中,也可以根据其他预设的规则判断 获取到的休眠阶段寄存值与该虚拟机的目标休眠状态是否匹配,本申请实施例对此不作具体限定。
通过上述技术方案可见,本申请实施例提供的虚拟机的挂起方法通过在虚拟机完全进入目标休眠状态之后暂停其虚拟CPU的运行,能够实现虚拟机的完全挂起,节省智能终端的能量消耗。
进一步地,本申请实施例还针对处于某一休眠状态的任一虚拟机提出了一种虚拟机的唤醒方法,请参阅图3,该方法包括:
210、接收唤醒信号。
在本实施例中,所述“唤醒信号”是指能够使虚拟机中断/退出休眠状态/挂起状态的信号,该唤醒信号可以包括多种类型/表现形式,比如,其可以为:用户启动该虚拟机对应的虚拟电源、智能终端充电、客户操作系统之间的切换、通话等等,其也可以根据客户操作系统的功能进行配置。
在本实施例中,处于任一休眠状态的虚拟机都可以通过其后端程序持续接收唤醒信号,当接收到任意类型的唤醒信号时,执行下述步骤220。
特别地,当智能终端中存在多个虚拟机(客户操作系统)时,多个虚拟机之间共用相同的物理硬件设备,若在某一时刻多个虚拟机同时被唤醒,并且同时调用某一物理硬件设备,容易造成系统运行故障。因此,在本实施例中,当智能终端中存在多个虚拟机(客户操作系统)时,为了避免在同一时刻唤醒多个虚拟机而导致系统运行故障,可以根据虚拟机的执行优先级为每一虚拟机对应的唤醒信号配置优先级别。相应地,当某一时刻接收到的唤醒信号包括两个或者以上时,首先从这些唤醒信号中提取出优先级最高的唤醒信号,然后再基于该优先级最高的唤醒信号执行下述步骤220和230,即:判断所述优先级最高的唤醒信号是否为所述虚拟机的有效唤醒源;若是,则根据所述优先级最高的唤醒信号恢复所述虚拟机的虚拟CPU的运行。其中,虚拟机的执行优先级可以由用户自定义,也可以根据其功能进行配置,在本申请实施例中不作具体限定。
举例说明:假设智能终端中存在虚拟机A和虚拟机B,虚拟机A的执行优先级高于虚拟机B,虚拟机A的有效唤醒源为唤醒信号a,虚拟机B的有效唤醒源为唤醒信号b,根据虚拟机A和虚拟机B的执行优先级可确定唤醒信号a的优先级高于唤醒信号b;若此时虚拟机A和虚拟机B均处于休眠状态,并且智能终端同时接收到唤醒信号a和唤醒信号b,则可以从这两个唤醒信号中提取 出唤醒信号a(优先级最高的唤醒信号),然后基于该唤醒信号a执行下述步骤220~230,其中,对于虚拟机A:唤醒信号a是其有效唤醒源,从而可以根据唤醒信号a恢复虚拟机A的虚拟CPU的运行;而对于虚拟机B:唤醒信号a不是虚拟机B的有效唤醒源,从而维持虚拟机B的休眠状态不变。从而,在同一时刻,智能终端仅唤醒了执行优先级最高的一个虚拟机(如,虚拟机A),避免了因同时启动多个虚拟机而造成系统运行故障的问题。
220、判断所述唤醒信号是否为虚拟机的有效唤醒源;
在本实施例中,所述“有效唤醒源”是指能够将某一虚拟机从当前的休眠状态唤醒的特定的唤醒信号。同一虚拟机在不同的休眠状态下可以对应设置有不同的有效唤醒源,并且该有效唤醒源的数量也可以不限于1个。
在本实施例中,当接收到唤醒信号时,首先对该唤醒信号进行分析,判断其是否为该虚拟机的有效唤醒源。其中,若接收到的唤醒信号包括至少两个,并且每一唤醒信号具有优先级别,则对这些唤醒信号中优先级最高的唤醒信号进行分析,判断其是否为该虚拟机的有效唤醒源。如果该唤醒信号是该虚拟机的有效唤醒源,则执行下述步骤230,如果该唤醒信号不是该虚拟机的有效唤醒源,则维持该虚拟机的休眠状态不变。
其中,在本实施例中,为了简化该判断的流程,智能终端可以为所有可能存在的唤醒信号进行编号,每一唤醒信号对应一个唯一的唤醒编号。并且,在每一虚拟机中对应设置一个唤醒源设置寄存器,记录于该唤醒源设置寄存器中的数值称为“唤醒源寄存值”,用于记录处于当前休眠状态下的虚拟机的有效唤醒源的编号。其中,该“唤醒源寄存值”可以在该虚拟机被挂起之后,由智能终端根据该虚拟机进入的休眠状态配置在其唤醒源设置寄存器中。基于此,判断所述唤醒信号是否为虚拟机的有效唤醒源的具体实施方式可以是:首先获取所述唤醒信号对应的唤醒编号;然后判断所述唤醒编号和虚拟机的唤醒源寄存值是否匹配;若是,则确定所述唤醒信号为所述虚拟机的有效唤醒源;若否,则确定所述唤醒信号不是所述虚拟机的有效唤醒源。
230、根据所述唤醒信号恢复所述虚拟机的虚拟CPU的运行。
在本实施例中,在确定接收到的唤醒信号(或者,多个唤醒信号中优先级最高的唤醒信号)是该虚拟机的有效唤醒源之后,根据该唤醒信号恢复该虚拟机的虚拟CPU的运行。其中,根据该唤醒信号恢复该虚拟机的虚拟CPU的运行 的具体实施方式可以是:直接根据唤醒信号将该虚拟机的虚拟CPU的运行状态恢复到其被挂起之前的运行状态。
此外,由于虚拟机在同一休眠状态下对应的有效唤醒源可以有多个,为了提升虚拟机被唤醒后的响应速度和准确度,在本实施例中,根据所述唤醒信号恢复所述虚拟机的虚拟CPU的运行的具体实施方式还可以是:首先获取该唤醒信号的唤醒源类型,然后根据该唤醒源类型恢复该虚拟机的虚拟CPU的运行。比如:当前获取到的唤醒信息的唤醒源类型为电话,则首先根据该唤醒信息恢复该虚拟机的虚拟CPU的运行,即:解冻该虚拟机被挂起时被冻结的用户空间的任务,同时,在虚拟机的操作系统中调度与“电话”相关的任务。
通过上述技术方案可见,本申请实施例提供的虚拟机的唤醒方法通过在虚拟机在接收到有效唤醒源之后才恢复其虚拟CPU的运行,能够进一步避免该虚拟机被错误唤醒。
此外,由于采用本申请实施例提供的虚拟机的挂起方法挂起虚拟机之后,虚拟机完全被挂起,不再响应主操作系统的调度,从而无法将该虚拟机(客户操作系统)的运行状态同步至主操作系统。当将物理主机(主操作系统)挂起以进入休眠状态时,若当前某一虚拟机(客户操作系统)处于工作状态,此时该虚拟机(客户操作系统)就会被中断并强制进入休眠状态,其上运行的内容有可能无法及时地同步到内存或者外存中,从而,该虚拟机(客户操作系统)被唤醒之后,有可能会遇到运行故障。
基于此,为了便于将虚拟机(客户操作系统)的运行状态同步至主操作系统,在一些实施例中,还在该智能终端的主操作系统上设置有状态锁服务,该状态锁服务可以是一个用于记录存在于智能终端上的虚拟机的运行状态的软件程序。当启动或者唤醒某一虚拟机时,可以在主操作系统中申请该虚拟机的状态锁服务,用于表示该虚拟机进入运行状态;当关闭或者挂起该虚拟机时,可以在主操作系统中撤销该虚拟机的状态锁服务,用于表示该虚拟机进入关机或者休眠的状态;主操作系统则对应更新和统计使用状态锁服务的虚拟机的数量。使用状态锁服务的虚拟机的数量即正在运行的虚拟机的数量,当使用状态锁服务的虚拟机的数量为零时,说明智能终端上的所有虚拟机/客户操作系统均处于休眠或者关机状态,此时,可以允许智能终端挂起主操作系统。同理可知,若当前使用状态锁服务的虚拟机的数量不为0,则说明当前有虚拟机正在运行,此 时,智能终端不可以挂起主操作系统。
由此,本申请实施例还提供了另一种虚拟机的状态管理方法,该方法与如图2所示的虚拟机的挂起方法以及如图3所示的虚拟机的唤醒方法的不同之处在于:在本实施例中,挂起虚拟机的步骤还包括:在智能终端的主操作系统中撤销该虚拟机的状态锁服务,以及,唤醒虚拟机的步骤还包括:在智能终端的主操作系统中申请该虚拟机的状态锁服务。
具体地,请参阅图4,该方法包括:
310、接收虚拟机的挂起指令,所述挂起指令中包括所述虚拟机的目标休眠状态;
320、根据所述挂起指令使所述虚拟机进入休眠,并实时获取所述虚拟机的休眠阶段寄存值;
330、当所述休眠阶段寄存值与所述目标休眠状态匹配时,暂停所述虚拟机的虚拟CPU的运行;
340、在主操作系统中撤销所述虚拟机的状态锁服务;
350、接收唤醒信号;
360、判断所述唤醒信号是否为所述虚拟机的有效唤醒源;若是,则执行下述步骤370~380,若否,则维持所述虚拟机的休眠状态不变;
370、根据所述唤醒信号恢复所述虚拟机的虚拟CPU的运行;
380、在主操作系统中申请所述虚拟机的状态锁服务。
在本实施例中,上述步骤310~330以及步骤350~370分别与上述实施例中的步骤110~130和步骤210~230具有相同的技术特征,其具体的实施方式同样适用于本实施例,因此,在本实施例中便不再赘述。
此外,需说明的是,在本实施例中,所述“虚拟机的状态锁服务”用于在主操作系统中标记该虚拟机正在处于运行状态,而非用于将该虚拟机锁定于运行状态。所述“状态锁”的数量可以是一个,所有处于运行状态的虚拟机共用一个状态锁;或者,也可以是多个,每一虚拟机对应一个状态锁,在本申请实施例中不作具体限定。
通过上述技术方案可见,本申请实施提供的虚拟机的状态管理方法通过在挂起虚拟机时在主操作系统中撤销该虚拟机的状态锁服务,在唤醒虚拟机时在主操作系统中申请该虚拟机的状态锁服务,能够便于将虚拟机的运行状态同步 至主操作系统,避免因主操作系统的挂起而导致虚拟机运行的突然中断,进而导致虚拟机被唤醒后出现运行故障的问题。
图5是本申请实施例提供的一种虚拟机的状态管理装置的结构示意图,请参阅图5,该装置5包括:
挂起指令接收单元51,用于接收虚拟机的挂起指令,所述挂起指令中包括所述虚拟机的目标休眠状态;
休眠单元52,用于根据所述挂起指令使所述虚拟机进入休眠,并实时获取所述虚拟机的休眠阶段寄存值;以及,
暂停单元53,用于当所述休眠阶段寄存值与所述目标休眠状态匹配时,暂停所述虚拟机的虚拟CPU的运行。
在本申请实施例中,当挂起指令接收单元51接收到包括虚拟机的目标休眠状态的挂起指令时,通过休眠单元52根据所述挂起指令使所述虚拟机进入休眠,并实时获取所述虚拟机的休眠阶段寄存值;当所述休眠阶段寄存值与所述目标休眠状态匹配时,通过暂停单元53暂停所述虚拟机的虚拟CPU的运行。
其中,在一些实施例中,装置5还包括:
唤醒信号接收单元54,用于接收唤醒信号;
判断单元55,用于判断所述唤醒信号是否为所述虚拟机的有效唤醒源;以及,
恢复单元56,用于若所述唤醒信号为所述虚拟机的有效唤醒源,则根据所述唤醒信号恢复所述虚拟机的虚拟CPU的运行。
在该实施例中,当虚拟机处于某一休眠状态下时,通过唤醒信号接收单元54接收唤醒信号;然后通过判断单元55判断所述唤醒信号是否为所述虚拟机的有效唤醒源;若所述唤醒信号为所述虚拟机的有效唤醒源,则利用恢复单元56根据所述唤醒信号恢复所述虚拟机的虚拟CPU的运行。
当所述智能终端的主操作系统设置有状态锁服务时,装置5还包括:用于当所述休眠阶段寄存值与所述目标休眠状态匹配时,在所述主操作系统中撤销所述虚拟机的状态锁服务的撤销单元57,和/或,用于若所述唤醒信号为所述虚拟机的有效唤醒源,则在所述主操作系统中申请所述虚拟机的状态锁服务的申请单元58。
其中,判断单元55具体用于:获取所述唤醒信号对应的唤醒编号;判断所 述唤醒编号和所述虚拟机的唤醒源寄存值是否匹配;若是,则确定所述唤醒信号为所述虚拟机的有效唤醒源。
其中,恢复单元56具体用于:获取所述唤醒信号的唤醒源类型,根据所述唤醒源类型恢复所述虚拟机的虚拟CPU的运行。
其中,当所述唤醒信号包括至少两个,并且每一唤醒信号具有优先级别时,装置5还包括:选择单元59,用于提取所述唤醒信号中优先级最高的唤醒信号。此时,判断单元55具体用于:判断所述优先级最高的唤醒信号是否为所述虚拟机的有效唤醒源;恢复单元56具体用于:根据所述优先级最高的唤醒信号恢复所述虚拟机的虚拟CPU的运行。
需要说明的是,由于所述虚拟机的状态管理装置与上述方法实施例中的虚拟机的状态方法基于相同的发明构思,因此,上述方法实施例的相应内容以及有益效果同样适用于本装置实施例,此处不再详述。
通过上述技术方案可知,本申请实施例提供的虚拟机的状态管理装置的有益效果在于:通过在挂起指令接收单元51接收到包括虚拟机的目标休眠状态的挂起指令时,由休眠单元52根据所述挂起指令使所述虚拟机进入休眠,并实时获取所述虚拟机的休眠阶段寄存值;当所述休眠阶段寄存值与所述目标休眠状态匹配时,通过暂停单元53暂停所述虚拟机的虚拟CPU的运行,能够实现虚拟机的完全挂起,避免虚拟机被其虚拟时钟产生的中断信号错误唤醒,提升系统的节能效果。
图6是本申请实施例提供的一种智能终端的硬件结构示意图,该智能终端600可以是任意类型的智能终端,如:手机、平板电脑、服务器、机器人等,能够执行如上所述的虚拟机的状态管理方法(虚拟机的挂起方法和/或虚拟机的唤醒方法)。
具体地,请参阅图6,该智能终端600包括:
一个或多个处理器601以及存储器602,图6中以一个处理器601为例。
处理器601和存储器602可以通过总线或者其他方式连接,图6中以通过总线连接为例。
存储器602作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序、非暂态性计算机可执行程序以及模块,如本申请实施例中的虚拟机的状态管理方法对应的程序指令/模块(例如,附图5所示的挂起指令接收单元51、 休眠单元52、暂停单元53、唤醒信号接收单元54、判断单元55、恢复单元56、撤销单元57、申请单元58以及选择单元59)。处理器601通过运行存储在存储器602中的非暂态软件程序、指令以及模块,从而执行智能终端的各种功能应用以及数据处理,即实现上述任一方法实施例的虚拟机的状态管理方法。
存储器602可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据虚拟机的状态管理装置的使用所创建的数据等。此外,存储器602可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施例中,存储器602可选包括相对于处理器601远程设置的存储器,这些远程存储器可以通过网络连接至智能终端600。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
所述一个或者多个模块存储在所述存储器602中,当被所述一个或者多个处理器601执行时,执行上述任意方法实施例中的虚拟机的状态管理方法,例如,执行以上描述的图2中的方法步骤110至步骤130,图3中的方法步骤210至230,图4中的方法步骤310至380,实现图5中的单元51-59的功能。
本申请实施例还提供了一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令被一个或多个处理器执行,例如图6中的一个处理器601,可使得上述一个或多个处理器执行上述任意方法实施例中的虚拟机的状态管理方法,例如,执行以上描述的图2中的方法步骤110至步骤130,图3中的方法步骤210至230,图4中的方法步骤310至380,实现图5中的单元51-59的功能。
以上所描述的系统实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
通过以上的实施方式的描述,本领域普通技术人员可以清楚地了解到各实施方式可借助软件加通用硬件平台的方式来实现,当然也可以通过硬件。本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非暂态计算机可 读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
上述产品可执行本申请实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本申请实施例所提供的方法。
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;在本申请的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,步骤可以以任意顺序实现,并存在如上所述的本申请的不同方面的许多其它变化,为了简明,它们没有在细节中提供;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (16)

  1. 一种虚拟机的状态管理方法,应用于智能终端,其特征在于,包括:
    接收虚拟机的挂起指令,所述挂起指令中包括所述虚拟机的目标休眠状态;
    根据所述挂起指令使所述虚拟机进入休眠,并实时获取所述虚拟机的休眠阶段寄存值;
    当所述休眠阶段寄存值与所述目标休眠状态匹配时,暂停所述虚拟机的虚拟CPU的运行。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    接收唤醒信号;
    判断所述唤醒信号是否为所述虚拟机的有效唤醒源;
    若是,则根据所述唤醒信号恢复所述虚拟机的虚拟CPU的运行。
  3. 根据权利要求1所述的方法,其特征在于,当所述智能终端的主操作系统设置有状态锁服务时,所述方法还包括:
    在所述主操作系统中撤销所述虚拟机的状态锁服务。
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:
    接收唤醒信号;
    判断所述唤醒信号是否为所述虚拟机的有效唤醒源;
    若是,则根据所述唤醒信号恢复所述虚拟机的虚拟CPU的运行,并且,在所述主操作系统中申请所述虚拟机的状态锁服务。
  5. 根据权利要求2或4所述的方法,其特征在于,所述判断所述唤醒信号是否为所述虚拟机的有效唤醒源,包括:
    获取所述唤醒信号对应的唤醒编号;
    判断所述唤醒编号和所述虚拟机的唤醒源寄存值是否匹配;
    若是,则确定所述唤醒信号为所述虚拟机的有效唤醒源。
  6. 根据权利要求2或4所述的方法,其特征在于,所述根据所述唤醒信号恢复所述虚拟机的虚拟CPU的运行,包括:
    获取所述唤醒信号的唤醒源类型,根据所述唤醒源类型恢复所述虚拟机的 虚拟CPU的运行。
  7. 根据权利要求2或4所述的方法,其特征在于,所述唤醒信号包括至少两个,并且每一唤醒信号具有优先级别;
    所述判断所述唤醒信号是否为所述虚拟机的有效唤醒源的步骤之前,所述方法还包括:
    提取所述唤醒信号中优先级最高的唤醒信号;
    则,所述判断所述唤醒信号是否为所述虚拟机的有效唤醒源,具体为:
    判断所述优先级最高的唤醒信号是否为所述虚拟机的有效唤醒源;
    所述根据所述唤醒信号恢复所述虚拟机的虚拟CPU的运行,具体为:
    根据所述优先级最高的唤醒信号恢复所述虚拟机的虚拟CPU的运行。
  8. 一种虚拟机的状态管理装置,应用于智能终端,其特征在于,包括:
    挂起指令接收单元,用于接收虚拟机的挂起指令,所述挂起指令中包括所述虚拟机的目标休眠状态;
    休眠单元,用于根据所述挂起指令使所述虚拟机进入休眠,并实时获取所述虚拟机的休眠阶段寄存值;
    暂停单元,用于当所述休眠阶段寄存值与所述目标休眠状态匹配时,暂停所述虚拟机的虚拟CPU的运行。
  9. 根据权利要求8所述的装置,其特征在于,所述装置还包括:
    唤醒信号接收单元,用于接收唤醒信号;
    判断单元,用于判断所述唤醒信号是否为所述虚拟机的有效唤醒源;
    恢复单元,用于若所述唤醒信号为所述虚拟机的有效唤醒源,则根据所述唤醒信号恢复所述虚拟机的虚拟CPU的运行。
  10. 根据权利要求9所述的装置,其特征在于,当所述智能终端的主操作系统设置有状态锁服务时,所述装置还包括:
    撤销单元,用于当所述休眠阶段寄存值与所述目标休眠状态匹配时,在所述主操作系统中撤销所述虚拟机的状态锁服务;
    申请单元,用于若所述唤醒信号为所述虚拟机的有效唤醒源,则在所述主 操作系统中申请所述虚拟机的状态锁服务。
  11. 根据权利要求9或10所述的装置,其特征在于,所述判断单元具体用于:
    获取所述唤醒信号对应的唤醒编号;
    判断所述唤醒编号和所述虚拟机的唤醒源寄存值是否匹配;
    若是,则确定所述唤醒信号为所述虚拟机的有效唤醒源。
  12. 根据权利要求9或10所述的装置,其特征在于,所述恢复单元具体用于:
    获取所述唤醒信号的唤醒源类型,根据所述唤醒源类型恢复所述虚拟机的虚拟CPU的运行。
  13. 根据权利要求9或10所述的装置,其特征在于,所述唤醒信号包括至少两个,并且每一唤醒信号具有优先级别,所述装置还包括:
    选择单元,用于提取所述唤醒信号中优先级最高的唤醒信号;
    则,所述判断单元具体用于:
    判断所述优先级最高的唤醒信号是否为所述虚拟机的有效唤醒源;
    所述恢复单元具体用于:
    根据所述优先级最高的唤醒信号恢复所述虚拟机的虚拟CPU的运行。
  14. 一种智能终端,其特征在于,包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求1-7任一项所述的方法。
  15. 一种非暂态计算机可读存储介质,其特征在于,所述非暂态计算机可读存储介质存储有计算机可执行指令,所述计算机可执行指令用于使智能终端执行如权利要求1-7任一项所述的方法。
  16. 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储在 非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被智能终端执行时,使所述智能终端执行如权利要求1-7任一项所述的方法。
PCT/CN2017/097154 2017-08-11 2017-08-11 一种虚拟机的状态管理方法、装置和智能终端 Ceased WO2019028854A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/CN2017/097154 WO2019028854A1 (zh) 2017-08-11 2017-08-11 一种虚拟机的状态管理方法、装置和智能终端
CN201780001819.1A CN107810488A (zh) 2017-08-11 2017-08-11 一种虚拟机的状态管理方法、装置和智能终端
US16/786,691 US20200174823A1 (en) 2017-08-11 2020-02-10 State management method and apparatus for virtual machine, and smart terminal thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/097154 WO2019028854A1 (zh) 2017-08-11 2017-08-11 一种虚拟机的状态管理方法、装置和智能终端

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/786,691 Continuation US20200174823A1 (en) 2017-08-11 2020-02-10 State management method and apparatus for virtual machine, and smart terminal thereof

Publications (1)

Publication Number Publication Date
WO2019028854A1 true WO2019028854A1 (zh) 2019-02-14

Family

ID=61590058

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/097154 Ceased WO2019028854A1 (zh) 2017-08-11 2017-08-11 一种虚拟机的状态管理方法、装置和智能终端

Country Status (3)

Country Link
US (1) US20200174823A1 (zh)
CN (1) CN107810488A (zh)
WO (1) WO2019028854A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116321384A (zh) * 2023-05-18 2023-06-23 深圳市新蕾电子有限公司 一种tc10在车载以太网中的休眠唤醒方法

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108701033A (zh) * 2018-05-08 2018-10-23 深圳前海达闼云端智能科技有限公司 客户操作系统唤醒方法、装置、电子设备及可读介质
CN109032327A (zh) * 2018-07-26 2018-12-18 郑州云海信息技术有限公司 一种虚拟机能耗管理方法及装置
CN109189523B (zh) * 2018-08-08 2022-03-15 广东微云科技股份有限公司 一种判断空闲虚拟机的方法、系统及关闭虚拟机的方法
CN111240749B (zh) * 2018-11-28 2023-07-21 中国移动通信集团浙江有限公司 一种集群系统中实例的挂起控制方法、装置、设备、存储介质
CN111324432B (zh) * 2020-01-21 2024-06-25 腾讯科技(深圳)有限公司 处理器调度方法、装置、服务器及存储介质
CN112306643B (zh) * 2020-11-30 2023-12-29 深信服科技股份有限公司 一种虚拟机配置方法、装置及设备,一种云平台
CN112601272B (zh) * 2020-12-08 2023-06-06 上海金智晟东电力科技有限公司 一种物联网智能感知终端无线电唤醒的实现方法
US12222790B2 (en) * 2020-12-22 2025-02-11 Intel Corporation Power management for Universal Serial Bus (USB) type-C port
CN119415214A (zh) * 2023-07-27 2025-02-11 杭州阿里云飞天信息技术有限公司 虚拟机管理方法、设备及存储介质
CN120295676A (zh) * 2024-01-11 2025-07-11 华为云计算技术有限公司 云桌面休眠方法、装置、设备以及计算机可读存储介质
CN118965341B (zh) * 2024-08-13 2026-02-06 亿咖通(湖北)技术有限公司 虚拟化平台生命周期监控方法和设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101876921A (zh) * 2009-04-29 2010-11-03 华为技术有限公司 一种虚拟机迁移决策方法、装置及系统
CN104202419A (zh) * 2014-09-18 2014-12-10 温武少 一种云计算系统动态分配虚拟机的方法
CN104268005A (zh) * 2014-10-22 2015-01-07 华为技术有限公司 虚拟机唤醒方法和装置
US20150089261A1 (en) * 2013-09-24 2015-03-26 Kabushiki Kaisha Toshiba Information processing device and semiconductor device

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101635636B (zh) * 2008-07-23 2012-06-06 联想(北京)有限公司 一种控制服务器的方法及装置
CN103809727B (zh) * 2012-11-14 2016-12-21 重庆重邮信科通信技术有限公司 一种移动终端的省电处理方法、系统和移动终端
CN104077195B (zh) * 2013-03-29 2017-11-24 广州华多网络科技有限公司 状态检测方法、装置及终端
CN105022659B (zh) * 2014-04-30 2018-05-11 中国电信股份有限公司 虚拟机状态控制方法与系统
US20160062780A1 (en) * 2014-08-27 2016-03-03 Lenovo (Singapore) Pte. Ltd. Pausing virtual machine based on idle state
CN104391736B (zh) * 2014-11-25 2018-04-10 杭州华为数字技术有限公司 虚拟机的休眠模式设置方法和装置
CN106227582B (zh) * 2016-08-10 2019-06-11 华为技术有限公司 弹性伸缩方法及系统
WO2018107354A1 (zh) * 2016-12-13 2018-06-21 深圳前海达闼云端智能科技有限公司 用于多操作系统的显示方法、装置和电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101876921A (zh) * 2009-04-29 2010-11-03 华为技术有限公司 一种虚拟机迁移决策方法、装置及系统
US20150089261A1 (en) * 2013-09-24 2015-03-26 Kabushiki Kaisha Toshiba Information processing device and semiconductor device
CN104202419A (zh) * 2014-09-18 2014-12-10 温武少 一种云计算系统动态分配虚拟机的方法
CN104268005A (zh) * 2014-10-22 2015-01-07 华为技术有限公司 虚拟机唤醒方法和装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116321384A (zh) * 2023-05-18 2023-06-23 深圳市新蕾电子有限公司 一种tc10在车载以太网中的休眠唤醒方法
CN116321384B (zh) * 2023-05-18 2023-08-18 深圳市新蕾电子有限公司 一种tc10在车载以太网中的休眠唤醒方法

Also Published As

Publication number Publication date
US20200174823A1 (en) 2020-06-04
CN107810488A (zh) 2018-03-16

Similar Documents

Publication Publication Date Title
WO2019028854A1 (zh) 一种虚拟机的状态管理方法、装置和智能终端
KR102048329B1 (ko) 애플리케이션 프로그램 실행 방법 및 장치
EP3210093B1 (en) Configurable volatile memory data save triggers
US11467650B2 (en) Selecting a low power state in an electronic device
TWI573075B (zh) 持續及有彈性之工作處理
CN105940375B (zh) 针对多操作系统设备的动态再分配
US9645625B2 (en) System and method for power management of computing devices in a virtual desktop infrastructure
CN107003891A (zh) 虚拟机切换方法、装置、电子设备和计算机程序产品
CN102819291A (zh) 用于一异质性电脑系统的桥接逻辑装置
WO2015172283A1 (zh) 一种降低功耗的方法、装置及移动终端
CN112463342A (zh) 一种多核cpu运行模式的平台架构设计方法
TW201423400A (zh) 用於超管理器系統之針對雙直列記憶體模組節能的系統與方法
CN107015847A (zh) 电子装置及其工作模式切换方法
CN108401453B (zh) 一种控制显示屏的方法、装置和智能终端
US20170308154A1 (en) Fast system setting changes
US11243800B2 (en) Efficient virtual machine memory monitoring with hyper-threading
US11366679B2 (en) Guest operating system wake-up method, device, electronic apparatus, and readable medium
US10121001B1 (en) System and method for monolithic scheduling in a portable computing device using a hypervisor
CN103246342B (zh) 电子设备及其电源管理方法
EP3391213A1 (en) Method and arrangement for utilization of a processing arrangement
CN112462926B (zh) 移动终端中的电源管理方法、装置、电子设备及计算机存储介质
WO2025124464A1 (zh) 设备唤醒方法及相关装置
CN119604852A (zh) 计算机系统、任务调度装置、等待进程唤醒方法以及程序
Chuang et al. Modified Packing Algorithm for Dynamic Energy-Saving in Cloud Computing Servers

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17921368

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 17.07.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17921368

Country of ref document: EP

Kind code of ref document: A1