Hibernate mechanism for virtualized java virtual machines
First Claim
1. A method for managing memory of a runtime environment executing in a virtual machine, the method comprising:
- receiving an indication of an idle state of a runtime environment executing in a virtual machine;
suspending operation of a plurality of threads associated with the runtime environment, wherein the plurality of threads is configured to run program code within the runtime environment;
determining a plurality of memory pages associated with the runtime environment based on the indication of the idle state;
transmitting, to a virtualization layer, a request to page out and compress the plurality of memory pages into a compression cache; and
executing a listener thread configured to monitor for a refresh request for the runtime environment.
2 Assignments
0 Petitions
Accused Products
Abstract
Methods, systems, and computer programs manage memory of a runtime environment executing on a virtual machine. A controller acts as an intermediary layer between the runtime environment and outside clients. The runtime environment coordinates with the controller to “hibernate” during idle periods to more efficiently utilize memory, and to quickly “refresh” state upon receiving an access attempt. A hypervisor may perform memory page compression on one or more guest “physical” memory pages utilized by an idle runtime environment. While hibernating, the runtime environment may use a listener thread to monitor for refresh requests and awaken the runtime environment when needed.
-
Citations
21 Claims
-
1. A method for managing memory of a runtime environment executing in a virtual machine, the method comprising:
-
receiving an indication of an idle state of a runtime environment executing in a virtual machine; suspending operation of a plurality of threads associated with the runtime environment, wherein the plurality of threads is configured to run program code within the runtime environment; determining a plurality of memory pages associated with the runtime environment based on the indication of the idle state; transmitting, to a virtualization layer, a request to page out and compress the plurality of memory pages into a compression cache; and executing a listener thread configured to monitor for a refresh request for the runtime environment. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A non-transitory computer-readable storage medium comprising instructions that, when executed in a computing device, manage memory of a runtime environment executing in a virtual machine by performing the steps of:
-
receiving an indication of an idle state of a runtime environment executing in a virtual machine; suspending operation of a plurality of threads associated with the runtime environment, wherein the plurality of threads is configured to run program code within the runtime environment; determining a plurality of memory pages associated with the runtime environment based on the indication of the idle state; transmitting, to a virtualization layer, a request to page out and compress the plurality of memory pages into a compression cache; and executing a listener thread configured to monitor for a refresh request for the runtime environment. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A computer system for executing an application on a host computer executing a plurality of virtual machines therein, comprising:
-
a system memory comprising a plurality of memory pages; a virtualization layer, executing on one or more processors, configured to manage sharing of the system memory among a plurality of virtual machines; a first virtual machine of the plurality of virtual machines having a runtime environment and a listener thread executing therein, wherein the runtime environment comprises a plurality of threads configured to run program code within the runtime environment, wherein the listener thread is configured to monitor for hibernate requests and refresh requests for the runtime environment; a controller configured to determine an idle state of the runtime environment, and transmit a hibernate request to the runtime environment indicating the idle state;
wherein the runtime environment configured to;responsive to receiving the hibernate request, suspend operation of the plurality of threads associated with the runtime environment, determine a plurality of memory pages associated with the runtime environment based on the hibernate request, and transmit, to the virtualization layer, a request to page out and compress the plurality of memory pages into a compression cache. - View Dependent Claims (16, 17, 18, 19, 20, 21)
-
Specification