US7757034B1ActiveUtility

Expansion of virtualized physical memory of virtual machine

83
Assignee: PARALLELS SOFTWARE INTERNATIONPriority: Jun 29, 2006Filed: Nov 10, 2006Granted: Jul 13, 2010
Est. expiryJun 29, 2026(expired)· nominal 20-yr term from priority
G06F 9/5016G06F 12/08G06F 2212/152G06F 9/45533G06F 2009/45583
83
PatentIndex Score
10
Cited by
6
References
25
Claims

Abstract

A system, method and computer program product for virtualizing a processor and its memory, including a host operating system (OS); and virtualization software that maintains a virtualization environment for running a Virtual Machine (VM) without system level privileges and having a guest operating system running within the Virtual Machine. A plurality of processes are running within the host OS, each process having its own virtual memory, wherein the virtualization software is one of the processes. An image file is stored in persistent storage and maintained by the host operating system. The image file represents virtualized physical memory of the VM. A plurality of memory pages are aggregated into blocks, the blocks being stored in the image file and addressable in block form. The virtualization software manages the blocks so that blocks can be mapped to the virtualization software process virtual memory and released when the blocks are no longer necessary. The host OS swaps the blocks between the image file and physical memory when a block that is not in physical memory is accessed by the VM. The image file size is not subject to limitation on virtual process memory size. A user of the VM can access a larger virtual process memory than the host OS permits.

Claims

exact text as granted — not AI-modified
1. A virtualization system comprising:
 a host operating system (OS); 
 virtualization software that maintains a virtualization environment for running a Virtual Machine (VM) without system level privileges; 
 a plurality of processes running within the host OS, each process having its own virtual memory, wherein the virtualization software is one of the processes; 
 at least one image file stored in persistent storage and maintained by the host OS, wherein the image file represents virtualized physical memory of the VM; and 
 a plurality of memory pages of the VM aggregated into blocks, the blocks being stored in the image file and addressable in block form, 
 wherein the virtualization software manages the blocks so that blocks can be mapped to the virtualization software process virtual memory and released when the blocks are no longer necessary, 
 wherein the host OS swaps the blocks between the image file and physical memory using memory mapped file mechanism of the host OS, when a block that is not in physical memory is accessed by the VM, 
 wherein the VM physical memory size corresponds to image file size and is not subject to limitation on virtual process memory size set by the host OS. 
 
     
     
       2. The system of  claim 1 , wherein the virtualization software comprises:
 a Virtual Machine Monitor (VMM) that manages VM's behavior and has system level privileges; and 
 a host OS driver for interfacing to underlying hardware. 
 
     
     
       3. The system of  claim 2 , wherein the VMM maps, in the VMM and VM address spaces, pages of virtualized physical memory by using real physical pages; and wherein corresponding blocks are locked in the physical memory. 
     
     
       4. The system of  claim 1 , wherein a counter is associated with each block, such that when the block is accessed, the counter is incremented, when the block is not accessed in the predetermined period of time, the counter is decremented, and when the counter becomes a predetermined value, the block is designated as a free block. 
     
     
       5. The system of  claim 4 , wherein the free block remains as a mapped element, but the free block not used by the Virtual Machine. 
     
     
       6. The system of  claim 5 , wherein, when Virtual Machine attempts to access a block that is not in the virtual process memory, a new block is allocated from free virtual process memory region, and is pushed to the hash table. 
     
     
       7. The system of  claim 6 , wherein, if all of the virtual memory allocated to the Virtual Machine has been used up, then the free block is swapped out to the image file. 
     
     
       8. The system of  claim 7 , wherein a new block that the Virtual Machine is trying to access is brought into the physical memory. 
     
     
       9. The system of  claim 1 , wherein a block comprises multiple memory pages. 
     
     
       10. The system of  claim 1 , wherein different blocks share at least one guest physical page. 
     
     
       11. The system of  claim 1 , wherein the blocks are of different size. 
     
     
       12. The system of  claim 1 , further comprising a direct access hash table for addressing blocks. 
     
     
       13. The system of  claim 12 , wherein the direct access hash table includes a plurality of hash keys, each hash key based on a portion of a guest physical address of its corresponding block. 
     
     
       14. The system of  claim 13 , wherein overlapping blocks have the same hash key. 
     
     
       15. A method for managing memory in a virtualization system comprising:
 initiating a host operating system (OS); 
 starting virtualization software that maintains a virtualization environment for running a Virtual Machine (VM) without system level privileges and having a guest operating system running within the Virtual Machine; 
 starting a plurality of processes running within the host OS, each process having its own virtual memory, wherein the virtualization software is at least one of the processes; 
 allocating at least one image file in persistent storage, the image file maintained by the host OS and representing virtualized physical memory of the VM; and 
 aggregating a plurality of memory pages into blocks, the blocks being stored in the image file and addressable in block form, 
 wherein the virtualization software manages the blocks so that blocks can be mapped to the virtualization software process virtual memory and released when the blocks are no longer necessary, 
 wherein the host OS swaps the blocks between the image file and physical memory when a block that is not in physical memory is accessed by the VM, 
 wherein the image file size is not subject to limitation on virtual process memory size, and 
 wherein a user of the VM can access a larger virtual process memory than the host OS permits. 
 
     
     
       16. The method of  claim 15 , wherein the VMM maps, in the VMM and VM address spaces, pages of virtualized physical memory by using real physical pages; and wherein corresponding blocks are locked in the physical memory. 
     
     
       17. The method of  claim 15 , wherein a counter is associated with each block, such that when the block is accessed, the counter is incremented, when the block is not accessed in the predetermined period of time, the counter is decremented, and when the counter becomes a predetermined value, the block is designated as a free block. 
     
     
       18. The method of  claim 17 , wherein the free block remains as a mapped element, but the free block not used by the Virtual Machine. 
     
     
       19. The method of  claim 18 , wherein, when Virtual Machine attempts to access a block that is not in the virtual process memory, a new block is allocated from free virtual process memory region, and is pushed to the hash table. 
     
     
       20. The method of  claim 19 , wherein, if all of the virtual memory allocated to the Virtual Machine has been used up, then the free block is swapped out to the image file. 
     
     
       21. The method of  claim 15 , wherein different blocks share at least one guest physical page. 
     
     
       22. The method of  claim 15 , further comprising a direct access hash table for addressing blocks. 
     
     
       23. The method of  claim 22 , wherein the direct access hash table includes a plurality of hash keys, each hash key based on a portion of a guest physical address of its corresponding block. 
     
     
       24. The method of  claim 23 , wherein overlapping blocks have the same hash key. 
     
     
       25. A computer useable software medium having computer program logic stored thereon for executing on a processor for managing a process virtual memory, the computer program logic comprising:
 computer program code means for initiating a host operating system (OS); 
 computer program code means for starting virtualization software that maintains a virtualization environment for running a Virtual Machine (VM) without system level privileges and having a guest operating system running within the Virtual Machine; 
 computer program code means for starting a plurality of processes running within the host OS, each process having its own virtual memory, wherein the virtualization software is at least one of the processes; 
 computer program code means for allocating at least one image file in persistent storage, the image file maintained by the host OS and representing virtualized physical memory of the VM; and 
 computer program code means for aggregating a plurality of memory pages into blocks, the blocks being stored in the image file and addressable in block form, 
 wherein the virtualization software manages the blocks so that blocks can be mapped to the virtualization software process virtual memory and released when the blocks are no longer necessary, 
 wherein the host OS swaps the blocks between the image file and physical memory when a block that is not in physical memory is accessed by the VM, 
 wherein the image file size is not subject to limitation on virtual process memory size, and 
 wherein a user of the VM can access a larger virtual process memory than the host OS permits.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.