IP Library › Granted Patent US 8,332,594
Granted Patent B2
US 8,332,594 · App. 12/824,297 · Granted Dec 11, 2012

Memory management computer

Assignee: International Business Machines Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,332,594
App. No.
12/824,297
Granted
Dec 11, 2012
Kind
B2
Abstract

Memory management of processing systems running in a virtual computer environment and of processes running in an operating system environment includes identifying a usage pattern of a page in memory. The usage pattern is identified by tracking operations conducted with respect to the page. The memory management also includes designating the page as a candidate for sharing when the usage pattern reflects that a number of updates made to the page does not exceed a predefined threshold value. The candidate page is allocated to a first process or virtual machine. The memory management also includes sharing access to the candidate page with a second process or virtual machine when content in the candidate page matches content of page allocated for the second process or virtual machine to an address space of the candidate page.

Claims (80)

1. A method for memory management of processors running in a virtual computer environment and of processes running in an operating system environment, the method comprising:

identifying a usage pattern of a page in memory, the usage pattern identified by tracking operations conducted with respect to the page;

designating the page as a candidate for sharing when the usage pattern reflects that a number of updates made to the page does not exceed a predefined threshold value, the candidate page allocated to at least one of a first process and a first virtual machine; and

sharing access to the candidate page with at least one of a second process and a second virtual machine when content in the candidate page matches content of a page allocated to the at least one of a second process and second virtual machine by remapping an address space of the page allocated to the at least one of a second process and second virtual machine to an address space of the candidate page.

2. The method of claim 1 , further comprising:

creating a data structure for the candidate page, the data structure including nodes representing instances of each of the updates;

setting a timing component for the page allocated to the at least one of a second process and second virtual machine;

generating a hash value of content of the page allocated to the at least one of a second process and second virtual machine upon expiration of the timing component; and

comparing the hash value of the page allocated to the at least one of a second process and second virtual machine with hash values generated for the updates to the candidate page in the data structure;

wherein sharing access to the candidate page with the at least one of a second process and second virtual machine is implemented in response to an identified match between the hash value and content of the page allocated to the at least one of a second process and second virtual machine and one of the hash values and content generated for the updates to the candidate page.

3. The method of claim 2 , wherein creating the data structure comprises:

initializing the candidate page in the data structure as an empty root page having zero content, wherein children nodes of the empty root page specify the updates to the candidate page, the children nodes added to the data structure as hash values of page content reflecting the updates.

4. The method of claim 2 , further comprising:

downgrading access permission for the page allocated to the at least one of a second process and second virtual machine to read-only upon expiration of the timing component; and

updating the data structure with results of the comparing while the at least one of a second process and second virtual machine is in a read-only state.

5. The method of claim 2 , further comprising:

discarding the updates made to the candidate page when operations on the candidate page and updated pages of the candidate page are completed and the page candidate and updated pages are no longer allocated to any process or virtual machine, the updates discarded in response to a clear operation;

wherein the candidate page is classified for a new use in response to implementation of the clearing operation.

6. The method of claim 5 , wherein discarding the updates made to the candidate and the updated pages include:

discarding corresponding children nodes in the data structure; and

unmapping the candidate page from corresponding at least one of processes and virtual machines.

7. The method of claim 1 , further comprising:

excluding the page as a candidate for sharing when the usage pattern reflecting a number of updates to the page exceeds the predefined threshold;

providing the at least one of a first process and first virtual machine with write access to the excluded page; and

upon completion of operations by the at least one of a first process and first virtual machine, clearing content of the excluded page;

wherein cleared pages are classified for a new use in response to implementation of a clearing operation.

8. A system for memory management of processors running in a virtual computer environment and of processes running in an operating system environment, the system comprising:

a computer processor; and

logic executable on the computer processor, the logic configured to implement a method, the method comprising:

identifying a usage pattern of a page in memory, the usage pattern identified by tracking operations conducted with respect to the page;

designating the page as a candidate for sharing when the usage pattern reflects that a number of updates made to the page does not exceed a predefined threshold value, the candidate page allocated to at least one of a first process and a first virtual machine; and

sharing access to the candidate page with at least one of a second process and a second virtual machine when content in the candidate page matches content of a page allocated to the at least one of a second process and second virtual machine by remapping an address space of the page allocated to the at least one of a second process and second virtual machine to an address space of the candidate page.

9. The system of claim 8 , wherein the method further comprises:

creating a data structure for the candidate page, the data structure including nodes representing instances of each of the updates;

setting a timing component for the page allocated to the at least one of a second process and second virtual machine;

generating a hash value of content of the page allocated to the at least one of a second process and second virtual machine upon expiration of the timing component; and

comparing the hash value of the page allocated to the at least one of a second process and second virtual machine with hash values generated for the updates to the candidate page in the data structure;

wherein sharing access to the candidate page with the at least one of a second process and second virtual machine is implemented in response to an identified match between the hash value and content of the page allocated to the at least one of a second process and second virtual machine and one of the hash values and content generated for the updates to the candidate page.

10. The system of claim 9 , wherein creating the data structure comprises:

initializing the candidate page in the data structure as an empty root page having zero content, wherein children nodes of the empty root page specify the updates to the candidate page, the children nodes added to the data structure as hash values of page content reflecting the updates.

11. The system of claim 9 , wherein the method further comprises:

downgrading access permission for the page allocated to the at least one of a second process and second virtual machine to read-only upon expiration of the timing component; and

updating the data structure with results of the comparing while the at least one of a second process and second virtual machine is in a read-only state.

12. The system of claim 9 , wherein the method further comprises:

discarding the updates made to the candidate page when operations on the candidate page and updated pages of the candidate page are completed and the page candidate and updated pages are no longer allocated to any process or virtual machine, the updates discarded in response to a clear operation;

wherein the candidate page is classified for a new use in response to implementation of the clearing operation.

13. The system of claim 12 , wherein discarding the updates made to the candidate and the updated pages include:

discarding corresponding children nodes in the data structure; and

unmapping the candidate page from corresponding processes or virtual machines.

14. The system of claim 9 , wherein the method further comprises:

excluding the page as a candidate for sharing when the usage pattern reflecting a number of updates to the page exceeds the predefined threshold;

providing the at least one of a first process and first virtual machine with write access to the excluded page; and

upon completion of operations by the at least one of a first process and first virtual machine, clearing content of the excluded page;

wherein cleared pages are classified for a new use in response to implementation of a clearing operation.

15. A computer program product for memory management of processors running in a virtual computer environment and processes running in an operating system environment, the computer program product comprising a non-transitory computer-readable storage medium having computer program code embodied thereon, which when executed by a computer, cause the computer to implement a method, the method comprising:

identifying a usage pattern of a page in memory, the usage pattern identified by tracking operations conducted with respect to the page;

designating the page as a candidate for sharing when the usage pattern reflects that a number of updates made to the page does not exceed a predefined threshold value, the candidate page allocated to at least one of a first process and a first virtual machine; and

sharing access to the candidate page with at least one of a second process and a second virtual machine when content in the candidate page matches content of a page allocated to the at least one of a second process and second virtual machine by remapping an address space of the page allocated to the at least one of a second process and second virtual machine to an address space of the candidate page.

16. The computer program product of claim 15 , wherein the method further comprises:

creating a data structure for the candidate page, the data structure including nodes representing instances of each of the updates;

setting a timing component for the page allocated to the at least one of a second process and second virtual machine;

generating a hash value of content of the page allocated to the at least one of a second process and second virtual machine upon expiration of the timing component; and

comparing the hash value of the page allocated to the at least one of a second process and second virtual machine with hash values generated for the updates to the candidate page in the data structure;

wherein sharing access to the candidate page with the at least one of a second process and second virtual machine is implemented in response to an identified match between the hash value and content of the page allocated to the at least one of a second process and second virtual machine and one of the hash values and content generated for the updates to the candidate page.

17. The computer program product of claim 16 , wherein creating the data structure comprises:

initializing the candidate page in the data structure as an empty root page having zero content, wherein children nodes of the empty root page specify the updates to the candidate page, the children nodes added to the data structure as hash values of page content reflecting the updates.

18. The computer program product of claim 16 , wherein the method further comprising:

downgrading access permission for the page allocated to the at least one of a second process and second virtual machine to read-only upon expiration of the timing component; and

updating the data structure with results of the comparing while the at least one of a second process and second virtual machine is in a read-only state.

19. The computer program product of claim 16 , wherein the method further comprises:

discarding the updates made to the candidate page when operations on the candidate page and updated pages of the candidate page are completed and the page candidate and updated pages are no longer allocated to any process or virtual machine, the updates discarded in response to a clear operation;

wherein the candidate page is classified for a new use in response to implementation of the clearing operation.

20. The computer program product of claim 19 , wherein discarding the updates made to the candidate and the updated pages include:

discarding corresponding children nodes in the data structure; and

unmapping the candidate page from corresponding processes or virtual machines.

21. The computer program product of claim 15 , wherein the method further comprises:

excluding the page as a candidate for sharing when the usage pattern reflecting a number of updates to the page exceeds the predefined threshold;

providing the at least one of a first process and first virtual machine with write access to the excluded page; and

upon completion of operations by the at least one of a first process and first virtual machine, clearing content of the excluded page;

wherein cleared pages are classified for a new use in response to implementation of a clearing operation.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 28, 2010
From: BORNTRAEGER, CHRISTIAN; EHRHARDT, CHRISTIAN; OTTE, CARSTEN; SCHWIDEFSKY, MARTIN; WEIGAND, ULRICH
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 024600/0591 →
Continuity (1)
Related Publication 20110320681A1 · Dec 29, 2011