Efficient write-watch mechanism useful for garbage collection in a computer system
First Claim
1. A computer-readable medium having computer-executable instructions, said computer-executable instructions comprising:
- receiving a request from a process for allocation of memory;
allocating at least one page of memory to the process;
maintaining information indicative of whether each page allocated to the process has been modified since last checked, wherein maintaining the information includes maintaining a bitmap having at least one bit per page, wherein maintaining the bitmap includes marking a bit representative of a page when the page is trimmed to disk and modified, and wherein the marking of the bit indicates at least that the page has been modified;
receiving a request to return information on whether a range of at least one page has been modified since last checked; and
returning a result in response to the request identifying each page in the range that has been modified since last checked.
2 Assignments
0 Petitions
Accused Products
Abstract
An efficient write-watch mechanism and process. A bitmap is associated with the virtual address descriptor (VAD) for a process, one bit for each virtual page address allocated to a process having write-watch enabled. As part of the write-watch mechanism, if a virtual address is trimmed to disk and that virtual address page is marked as modified, then the corresponding bit in the VAD is set for that virtual address page. In response to an API call (e.g., from a garbage collection mechanism) seeking to know which virtual addresses in a processs have been modified since last checked, the memory manager walks the bitmap in the relevant VAD for the specified virtual address range for the requested process. If a bit is set, then the page corresponding to that bit is known to have been modified since last asked. If specified by the API, the bit is cleared in the VAD bitmap so that it will reflect the state since this time of asking. If the bit is not set, to determine if the page was modified, the page table entry (PTE) is checked for that page, and if the PTE indicates the page was modified, the page is known to be modified, otherwise that page is known to be unmodified since the last call. One enhancement uses page directory tables to locate a series of trimmed pages, sometimes avoiding the need to access the PTE.
59 Citations
25 Claims
-
1. A computer-readable medium having computer-executable instructions, said computer-executable instructions comprising:
-
receiving a request from a process for allocation of memory;
allocating at least one page of memory to the process;
maintaining information indicative of whether each page allocated to the process has been modified since last checked, wherein maintaining the information includes maintaining a bitmap having at least one bit per page, wherein maintaining the bitmap includes marking a bit representative of a page when the page is trimmed to disk and modified, and wherein the marking of the bit indicates at least that the page has been modified;
receiving a request to return information on whether a range of at least one page has been modified since last checked; and
returning a result in response to the request identifying each page in the range that has been modified since last checked. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A method of write-watching virtual memory pages, comprising:
-
associating a bitmap with a process, the bitmap representing a range of memory wherein each bit in the bitmap represents a page in the range; and
marking the bitmap upon detection of a modified page being trimmed to disk, the marking of the bitmap indicating that the modified page has been modified. - View Dependent Claims (7, 8, 9)
-
-
10. A computer-readable medium having computer-executable instructions, said computer-executable instructions comprising:
-
receiving a request from a process for allocation of memory;
allocating at least one page of memory to the process;
maintaining information indicative of whether each page allocated to the process has been modified since last checked including maintaining a bitmap including one bit per page;
receiving a request to return information on whether a range of at least one page has been modified since last checked; and
returning a result in response to the request identifying each page in the range that has been modified since last checked including evaluating the bitmap to determine if a bit representing a page is marked as modified, and if so, maintaining information that the page is modified, and if not, accessing other information to determine if the page is modified. - View Dependent Claims (11, 12, 13, 14)
-
-
15. A method of write-watching virtual memory pages, comprising:
-
associating a bitmap with a process, the bitmap representing a range of memory wherein each bit in the bitmap represents a page in the range;
marking the bitmap upon detection of a modified page being trimmed to disk;
receiving a request to report information indicative of pages in the range that have been modified;
accessing the bitmap to determine if at least some of the pages have been modified; and
for each bit in the bitmap that is not marked, accessing other information to determine if a page corresponding thereto has been modified. - View Dependent Claims (16, 17, 18, 19)
-
-
20. A computer-readable medium having computer-executable instructions, said computer-executable instructions comprising:
-
maintaining information indicative of whether each page allocated to a process has been modified since last checked;
when the page is trimmed to a storage device, modifying the information to indicate that a page has been modified; and
accessing the information to provide data that indicates that a range that includes at least one page has been modified since last checked. - View Dependent Claims (21, 22, 23, 24, 25)
-
Specification