A Heap-Resident Virtual Machine
Publication Date: 2017-Mar-07
The IP.com Prior Art Database
Disclosed is a method for sharing memory between a virtual machine and a physical machine. The purpose is to provide an interface for a virtual machine guest operating system to perform memory management via the host operating system on which it is running.
A Heap-Resident Virtual Machine
Modern virtual machines (VMs) typically reside in reserved memory regions that are sized according to quotas or expectations , . The address space of a guest operating system is mapped to one or more of these virtual memory regions for management by a host operating system . Because these memory regions are not very flexible, even in the elastic cloud context, resizing a virtual machine tends to involve sophisticated memory reallocation steps  and nontrivial policies . As a result, cloud/virtual machine management involves more complexity and overhead than would be the case if virtual machines were to reside in easily reallocated host memory.
Paravirtualization allows for some component of a guest to be aware of some aspects of the underlying host . However, even those prior art methods that consider virtual resource balancing in light of host-guest awareness turn to Quality of Service (QoS) and other criteria for lack of a better strategy for best exploiting available resources . The result is that even for those prior art solutions that seem elastic enough to provision memory at the granularity of a page at a time , there is no explicit tradeoff made between real host resource sufficiency, provisioned guest resource sufficiency, and maximal resource exploitation.
Prior art heap memory management techniques for virtual machine guests involve ballooning , , use of shared memory pages, memory compression, and swapping , or timely triggering of garbage collection , ,  or of other guest memory cleanup . Although a Java* Virtual Machine’s (JVM’s) heap within a guest environment may vary in size , one or more these prior art techniques is nevertheless needed for memory management. If guest heap memory management were to be more host-directed, the complexity and indirectness associated with these prior art techniques would be simplified; even more so if the guests were to altogether reside in the host’s heap.
The novel solution is to provide an interface for a virtual machine guest operating system to perform memory management via the host operating system on which it is running. In one embodiment, a guest can rely on calls to the host for heap memory allocation, deallocation, and reallocation. In another embodiment, the guest can rely on host memory entirely.
The solution is a method for sharing memory between a virtual machine and a physical machine, comprising: 1. Receiving, by code operable on a virtual machine, a request to allocate memory 2. Invoking, in response to the request, code operable on a physical machine to allocate memory 3. Receiving, in response to the invoking, a reference to allocated memory accessible by the virtual machine
In this context, the memory is heap memory, the memory is usable to contain executable code, and the memory is usable to contain a stack required for the operation of executable code.
Part 1: Heap paravirtualization N...