IP Library Granted Patent US 7,047,387
Granted Patent B2
US 7,047,387 · App. 10/620,938 · Granted May 16, 2006

Block cache size management via virtual memory manager feedback

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 7,047,387
App. No.
10/620,938
Granted
May 16, 2006
Kind
B2
Abstract

A method for calculating a block cache size for a host process or application on a computer based at least upon virtual memory page evictions and/or virtual memory page reclamations for the computer. A virtual memory page eviction is the act of removing the contents of a physical memory page for the purpose of loading it with the contents of another virtual memory page. A virtual memory page reclamation is the return of a page to a working set that was previously removed by the operating system due to memory constraints. The page must not have been evicted. Additional fundamental properties of the application and the computer may be used, such as available physical memory on the computer, total physical memory, and block evictions. A block eviction is the act of removing the contents of a block from the block cache for the purpose of loading it with new contents.

Claims (142)

1. A computer-implemented method, comprising:

accessing information about virtual memory page evictions for a computer, wherein the virtual memory page evictions correspond to virtual memory pages that are managed by an operating system of the computer, and wherein a virtual page eviction includes removal of contents of a virtual memory page for a purpose of loading the virtual memory page with contents of another virtual memory page;

accessing information about block evictions for an application on the computer, wherein the block evictions correspond to blocks of memory utilized by the application;

accessing information about virtual memory page reclamations for a computer, wherein a virtual memory page reclamation includes a return of a virtual memory page to a working set after the virtual memory page was previously removed (taken out from the working set) due to memory constraints; and

determining a target size for a block cache for the application based at least upon the information about the virtual memory page reclamations.

2. The method of claim 1 , further comprising, sizing the block cache in accordance with the target size.

3. The method of claim 1 , further comprising determining the target size for the block cache based at least upon information about the virtual page evictions and the block evictions.

4. The method of claim 3 , wherein said accessing information about virtual memory page reclamations comprises maintaining presence information regarding the presence of a block in a working set for the application.

5. The method of claim 4 , wherein the presence information is maintained for each block via a flag associated with the block.

6. The method of claim 1 , wherein said accessing information about virtual memory page reclamations comprises resetting a dirty flag for each virtual memory page underlying the block upon accessing or allocating the block.

7. The method of claim 1 , wherein determining a target size comprises calculating a change in target size per unit time.

8. The method of claim 7 , wherein the change in target size is calculated according to the following algorithm:

dCM/dt=AM/TM*dBE/dt−CM/TM*dPE/dt−dPR/dt

Where:

CM comprises size of the memory of the block cache

AM comprises available physical memory or available quota memory on the computer

TM comprises total physical memory or total quota memory on the computer

BE comprises Block Evictions

PE comprises Virtual Memory Page Evictions

PR comprises Virtual Memory Page Reclamations

t comprises time.

9. The method of claim 7 , wherein the change in target size is added to the smallest of an actual size of the block cache and a previous target size to produce a new target size.

10. The method of claim 9 , wherein change from a previous target size to the new target size is maintained within a threshold.

11. A computer-readable medium having computer-executable instructions for performing the method of claim 1 .

12. A computer-implemented method, comprising:

accessing information about virtual memory page reclamations for a computer, wherein the virtual memory page reclamations correspond to virtual memory pages that are managed by an operating system of the computer, and wherein a virtual memory page reclamation includes a return of a virtual memory page to a working set after the virtual memory page was previously removed (taken out from the working set) by the operating system due to memory constraints;

accessing information about block evictions for an application on the computer, wherein the block evictions correspond to blocks of memory utilized by the application; and

determining a target size for a block cache of the application based at least upon the information about the virtual memory page reclamations and the information about the block evictions.

13. The method of claim 12 , further comprising, sizing the block cache in accordance with the target size.

14. The method of claim 12 , wherein said accessing information about virtual memory page reclamations comprises maintaining presence information regarding the presence of a block in a working set for the application.

15. The method of claim 14 , wherein the presence information is maintained via a flag associated with each block.

16. The method of claim 12 , wherein said accessing information about virtual memory page reclamations comprises resetting a dirty flag for each virtual memory page underlying the block upon accessing or allocating the block.

17. The method of claim 12 , wherein determining a target size comprises calculating a change in target size per unit time.

18. The method of claim 12 , wherein the change in target size is calculated according to the following algorithm:

dCM/dt=AM/TM*dBE/dt−CM/TM*dPE/dt−dPR/dt

Where:

CM comprises size of the memory of the block cache

AM comprises available physical memory or available quota memory on the computer

TM comprises total physical memory or total quota memory on the computer

BE comprises Block Evictions

PE comprises Virtual Memory Page Evictions

PR comprises Virtual Memory Page Reclamations

t comprises time.

19. The method of claim 17 , wherein the change in target size is added to the smallest of an actual size of the block cache and a previous target size to produce a new target size.

20. The method of claim 19 , wherein change from a previous target size to the new target size is maintained within a threshold.

21. A computer-readable medium having computer-executable instructions for performing the method recited in claim 12 .

22. A computer-implemented method, comprising:

accessing information about virtual memory page evictions on a computer;

accessing information about virtual memory page reclamations for the computer, wherein the virtual memory page reclamations and evictions correspond to virtual memory pages that are managed by an operating system of the computer, and wherein a virtual memory page reclamation includes a return of a virtual memory page to a working set after the virtual memory page was previously removed (taken out from the working set) by the operating system due to memory constraints;

accessing information about block evictions for an application on the computer, wherein the block evictions correspond to blocks of memory utilized by the application; and

determining a target size for a block cache of the application based at least upon the information about the virtual memory page reclamations, the information about the virtual memory page evictions, and the information about the block evictions by using the following algorithm:

dCM/dt=AM/TM*dBE/dt−CM/TM*dPE/dt−dPR/dt

Where:

CM comprises size of the memory of the block cache

AM comprises available physical memory the computer

TM comprises total physical memory the computer

BE comprises Block Evictions

PE comprises Virtual Memory Page Evictions

PR comprises Virtual Memory Page Reclamations

t comprises time.

23. A computer-implemented method, comprising:

accessing information about virtual memory page evictions on a computer;

accessing information about virtual memory page reclamations for the computer, wherein the virtual memory page reclamations and evictions correspond to virtual memory pages that are managed by an operating system of the computer; and wherein a virtual memory page reclamation includes a return of a virtual memory page to a working set after the virtual memory page was previously removed (taken out from the working set) by the operating system due to memory constraints;

accessing information about block evictions for an application on the computer, wherein the block evictions correspond to blocks of memory utilized by the application; and

determining a target size for a block cache of the application based at least upon the information about the virtual memory page reclamations, the information about the virtual memory page evictions, and the information about the block evictions by using the following algorithm:

dCM/dt=AQ/TQ*dBE/dt−CM/TM*dPE/dt−dPR/dt

Where:

CM comprises size of the memory of the block cache

AQ comprises available quota memory on the computer

TQ comprises total quota memory on the computer

BE comprises Block Evictions

PE comprises Virtual Memory Page Evictions

PR comprises Virtual Memory Page Reclamations

t comprises time.

24. A computer-readable medium having computer-executable instructions for performing a method, the method comprising:

accessing information about at least (1) virtual memory page reclamations and (2) virtual memory page evictions for a computer, wherein the virtual memory page evictions and reclamations correspond to virtual memory pages that are managed by an operating system of the computer, and wherein a virtual memory page reclamation includes a return of a virtual memory page to a working set after the virtual memory page was previously removed (taken out from the working set) by the operating system due to memory constraints, and wherein a virtual page eviction includes removal of contents of a virtual memory page for a purpose of loading the virtual memory page with contents of another virtual memory page;

accessing information about block evictions for an application on the computer, wherein the block evictions correspond to blocks of memory utilized by the application; and

determining a target size for a block cache of the application based at least upon (a) the information about the virtual memory page reclamations and (b) the information about the block evictions.

25. The computer-readable medium of claim 24 , wherein the method further comprises sizing the block cache in accordance with the target size.

26. The computer-readable medium of claim 24 , wherein said accessing information about virtual memory page reclamations comprises maintaining presence information regarding the presence of a block in a working set for the application.

27. The computer-readable medium of claim 26 , wherein the presence information is maintained for each block via a flag associated with the block.

28. The computer-readable medium of claim 26 , wherein said accessing information about virtual memory page reclamations comprises resetting a dirty flag for each virtual memory page underlying the block upon accessing or allocating the block.

29. The computer-readable medium of claim 24 , wherein said determining a target size for a block cache of the application comprises determining the target size based at least upon (a) information about the virtual memory page reclamations for the computer, (b) information about the virtual memory page evictions for the computer, and (c) the information about the block evictions.

30. The computer-readable medium of claim 29 , wherein determining a target size comprises calculating a change in target size per unit time.

31. The computer-readable medium of claim 30 , wherein the change in target size is calculated according to the following algorithm:

dCM/dt=AM/TM*dBE/dt−CM/TM*dPE/dt−dPR/dt

Where:

CM comprises size of the memory of the block cache

AM comprises available physical memory or total quota memory on the computer

TM comprises total physical memory or total quota memory on the computer

BE comprises Block Evictions

PE comprises Virtual Memory Page Evictions

PR comprises Virtual Memory Page Reclamations

t comprises time.

32. The computer-readable medium of claim 31 , wherein the change in target size is added to the smallest of an actual size of the block cache and a previous target size to produce a new target size.

33. The computer-readable medium of claim 31 , wherein the change from a previous target size to the new target size is maintained within a threshold.

34. A computer system, comprising:

physical memory;

an application stored within the computer system; and a cache memory manager configures and adapted to:

access information about at least (1) virtual memory page reclamations and (2) virtual memory page evictions for the computer, wherein the virtual memory page evictions and reclamations correspond to virtual memory pages that are managed by an operating system of the computer, and wherein a virtual memory page reclamation includes a return of a virtual memory page to a working set after the virtual memory page was previously removed (taken out from the working set) by the operating system due to memory constraints, and wherein a virtual page eviction includes removal of contents of a virtual memory page for a purpose of loading the virtual memory page with contents of another virtual memory page;

access information block evictions for the application, wherein the block evictions correspond to blocks of memory utilized by the application; and

determining a target size for a block cache of the application based at least upon (a) the information about the virtual memory page reclamations and (b) the information about the block evictions.

35. The computer system of claim 34 , wherein said accessing information about virtual memory page reclamations comprises maintaining presence information regarding the presence of a block in a working set for the application.

36. The computer system of claim 35 , wherein the presence information is maintained for each block via a flag associated with the block.

37. The computer system of claim 35 , wherein said accessing information about virtual memory page reclamations comprises resetting a dirty flag for each virtual memory page underlying the block upon accessing or allocating the block.

38. The computer system of claim 34 , wherein said determining a target size for a block cache of the application comprises determining the target size based at least upon (a) information about the virtual memory page reclamations for the computer, (b) information about the virtual memory page evictions for the computer, and (c) the information about the block evictions.

39. The computer system of claim 38 , wherein determining a target size comprises calculating a change in target size per unit time.

40. The computer system of claim 39 , wherein the change in target size is calculated according to the following algorithm:

dCM/dt=AM/TM*dBE/dt−CM/TM*dPE/dt−dPR/dt

Where:

CM comprises size of the memory of the block cache

AM comprises available physical memory or total quota memory on the computer

TM comprises total physical memory or total quota memory on the computer

BE comprises Block Evictions

PE comprises Virtual Memory Page Evictions

PR comprises Virtual Memory Page Reclamations

t comprises time.

41. The computer system of claim 40 , wherein the change in target size is added to the smallest of an actual size of the block cache and a previous target size to produce a new target size.

42. The computer system of claim 41 , wherein the change from previous target size to the new target size is maintained within a threshold.

43. A computer system, comprising:

physical memory;

an application stored within the computer system; and

means for accessing information about at least (1) virtual memory page reclamations and (2) virtual memory page evictions for the computer , wherein the virtual memory page evictions and reclamations correspond to virtual memory pages that are managed by an operating system of the computer, and wherein a virtual memory page reclamation includes a return of a virtual memory page to a working set after the virtual memory page was previously removed (taken out from the working set) by the operating system due to memory constraints, and wherein a virtual page eviction includes removal of contents of a virtual memory page for a purpose of loading the virtual memory page with contents of another virtual memory page;

means for accessing information about block evictions for the application, wherein the block evictions correspond to blocks of memory utilized by the application; and

means for determining a target size for a block cache of the application based at least upon (a) the information about the virtual memory page reclamations and (b) the information about the block evictions.

44. The computer system of claim 43 , wherein said accessing information about virtual memory page reclamations comprises maintaining presence information regarding the presence of a block in a working set for the application.

45. The computer system of claim 44 , wherein the presence information is maintained for each block via a flag associated with the block.

46. The computer system of claim 44 , wherein said accessing information about virtual memory page reclamations comprises resetting a dirty flag for each virtual memory page underlying the block upon accessing or allocating the block.

47. The computer system of claim 43 , wherein said determining a target size for a block cache of the application comprises determining the target size based at least upon (a) information about virtual memory page reclamations for the computer, (b) information about the virtual memory page evictions for the computer, and (c) the information about the block evictions.

48. The computer system of claim 47 , wherein determining a target size comprises calculating a change in target size per unit time.

49. The computer system of claim 48 , wherein the change in target size is calculated according to the following algorithm:

dCM/dt=AM/TM*dBE/dt−CM/TM*dPE/dt−dPR/dt

Where:

CM comprises size of the memory of the block cache

AM comprises available physical memory or total quota memory on the computer

TM comprises total physical memory or total quota memory on the computer

BE comprises Block Evictions

PE comprises Virtual Memory Page Evictions

PR comprises Virtual Memory Page Reclamations

t comprises time.

50. The computer system of claim 49 , wherein the change in target size is added to the smallest of an actual size of the block cache and a previous target size to produce a new target size.

51. The computer system of claim 50 , wherein the change from a previous target size to the new target size is maintained within a threshold.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 9, 2014
From: MICROSOFT CORPORATION
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 034541/0477 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 16, 2003
From: GOODSELL, ANDREW E.
To: MICROSOFT CORPORATION
Reel/Frame 014311/0130 →