# US 2021/0342229 A1 · Persistent memory image capture

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0342229 A1
- Document ID: US20210342229A1
- Status: Published application
- Kind: A1
- Application number: 17/067,150
- Filed: 2020-10-09
- Published: 2021-11-04
- Earliest claimed: 2020-04-29
- Assignees: Memverge, Inc.
- Applicants: MemVerge, Inc.
- Inventors: Ronald S. Niles; Yue Li; Jun Gan; Chenggong Fan; Robert W. Beauchamp
- Web page: https://patentgrep.com/patent/US20210342229A1

## CPC

- G06F 11/1438: {Restarting or rejuvenating}
- G06F 11/1469: {Backup restoration techniques}
- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- G06F 3/0619: {in relation to data integrity, e.g. data losses, bit errors}
- G06F 3/0655: {Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices}
- G06F 3/0656: {Data buffering arrangements}
- G06F 3/0667: {at data level, e.g. file, record or object virtualisation}
- G06F 3/0676: {Magnetic disk device}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F 9/461: {Saving or restoring of program or task context}
- G06F 11/1451: {by selection of backup contents}
- G06F 11/1471: involving logging of persistent data for recovery
- G06F 11/1474: in transactions (updating of structured data in databases G06F16/23)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A memory image can be captured by generating metadata indicative of a state of volatile memory and/or byte-addressable PMEM at a particular time during execution of a process by an application. This memory image can be persisted without copying the in-memory data into a separate persistent storage by storing the metadata and safekeeping the in-memory data in the volatile memory and/or PMEM. Metadata associated with multiple time-evolved memory images captured can be stored and managed using a linked index scheme. A linked index scheme can be configured in various ways including a full index and a difference-only index. The memory images can be used for various purposes including suspending and later resuming execution of the application process, restoring a failed application to a previous point in time, cloning an application, and recovering an application process to a most recent state in an application log.

## Claims

### Claim 1

A method for capturing a memory image, the method comprising:
enabling an application to use persistent memory (PMEM) as volatile-mode memory to store and access in-memory data during execution of a process;
generating metadata indicative of a particular state of the PMEM at a particular time during execution of the process;
storing the metadata in a non-volatile storage; and
safekeeping, in the PMEM, a particular state of the in-memory data as it exists at the particular state of the PMEM.

### Claim 2 (depends on 1)

The method of claim 1, wherein safekeeping the particular state of the in-memory data includes preventing modification of the in-memory data from the particular state to a new state until at least the process has completed execution.

### Claim 3 (depends on 1)

The method of claim 1, wherein safekeeping the particular state of the in-memory does not include copying the in-memory data from the PMEM to a separate non-volatile storage device.

### Claim 4 (depends on 1)

The method of claim 1, wherein the metadata is indicative of mappings between a logical address space associated with the application and the PMEM at the particular time.

### Claim 5 (depends on 1)

The method of claim 1, wherein the metadata includes:
first metadata indicative of a first mapping, at the particular time, from a logical address space associated with the application to a file offset; and
second metadata indicative of a second mapping, at the particular time, from the file offset to a physical address space associated with the PMEM.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
monitoring a state of the PMEM during execution of the process;
wherein the metadata is generated based on the monitored state of the PMEM.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
maintaining a record of mappings between a logical address space associated with the application and the PMEM during execution of the process;
wherein the metadata is generated based on the record of the mappings.

### Claim 8 (depends on 7)

The method of claim 7, further comprising:
receiving a memory call from the application;
in response to receiving the memory call, mapping a portion of the PMEM into the logical address space associated with the application; and
updating the record of mappings to reflect the portion of PMEM mapped into the logical address space associated with the application.

### Claim 9 (depends on 7)

The method of claim 7, wherein maintaining the record of mappings includes:
continually updating the record of mappings as portions of PMEM are mapped into the logical address space associated with the application.

### Claim 10 (depends on 1)

The method of claim 1, further comprising:
causing execution of the process to freeze at the particular time before generating the metadata.

### Claim 11 (depends on 10)

The method of claim 10, further comprising:
flushing data from a cache to the PMEM.

### Claim 12 (depends on 10)

The method of claim 10, wherein safekeeping the particular state of the in-memory data includes:
after causing execution of the process to freeze, write protecting the in-memory data at the particular state of the PMEM.

### Claim 13 (depends on 12)

The method of claim 12, wherein write protecting the in-memory data includes setting write protection in mappings between a logical address space of the application and the PMEM.

### Claim 14 (depends on 12)

The method of claim 12, wherein write protecting the in-memory data sets up a copy-on-write (CoW) operation, wherein the CoW operation is triggered when the application or another application attempts to modify the particular state of the in-memory data.

### Claim 15 (depends on 12)

The method of claim 12, wherein capturing the memory image further includes:
causing execution of the process to resume after write protecting the in-memory data.

### Claim 16 (depends on 15)

The method of claim 15, wherein at least some of the metadata is generated after execution of the process resumes.

### Claim 17 (depends on 1)

The method of claim 1, wherein the non-volatile storage is the PMEM.

### Claim 18 (depends on 1)

The method of claim 1, wherein storing the metadata includes:
generating a capture file object based on the metadata; and
storing the capture file object in the non-volatile storage.

### Claim 19 (depends on 1)

The method of claim 1, wherein the memory image is a first memory image, the metadata is first metadata, the particular state of the PMEM is a first state of the PMEM, the particular state of the in-memory data is a first state of the in-memory data, and the particular time is a first time, the method further comprising:
capturing a second memory image by:
generating second metadata indicative of a second state of the PMEM at a second time during execution of the process, the second time after the first time; and
storing the second metadata in the non-volatile storage; and
safekeeping, in the PMEM, the second state of the in-memory data as it exists at the second state of the PMEM.

### Claim 20 (depends on 19)

The method of claim 19,
wherein the first metadata includes:
a first family pointer indicative that the second memory image is a child to the first memory image; and
a first chunk index and pointer indicative of a plurality of chunks of the PMEM mapped to a logical address space associated with the application;
wherein the second metadata includes:
a second family pointer indicative that the first memory image is a parent to the second memory image; and
a second chunk index and pointer indicative of one or more of the plurality of chunks that differ from the first chunk index associated with the first memory image.

### Claim 21 (depends on 1)

The method of claim 1,
wherein the memory image is one of a plurality of memory images captured at different times during execution of the process; and
wherein the metadata associated with the memory image includes a linked difference-only index and/or a linked full-index.

### Claim 22 (depends on 1)

The method of claim 1, wherein enabling the application to use the PMEM as volatile-mode memory includes:
virtualizing a memory object as anonymous byte-addressable memory for use by the application.

### Claim 23 (depends on 22)

The method of claim 22, wherein the memory object is a distributed memory object.

### Claim 24 (depends on 1)

The method of claim 1, further comprising:
enabling the application to use the memory image to resume execution of the process after an interruption in the execution of the process.

### Claim 25 (depends on 24)

The method of claim 24, wherein the interruption is due to any of:
a loss of power by a computer system in which the process is executing;
a processing failure in the computer system;
a temporary pause to free computing resources in the computer system; or
migration of the process from the computer system to a different computer system.

### Claim 26 (depends on 1)

The method of claim 1, further comprising:
generating a copy of the memory image;
storing the copy of the memory image in the PMEM; and
enabling the application to use the copy of the memory image in the PMEM to initiate execution of a second instance of the process; wherein the process and the second instance of the process execute in parallel.

### Claim 27 (depends on 1)

The method of claim 1, wherein the particular time is a first time, the method further comprising:
causing execution of the application process to resume after write protecting the in-memory data as it exists at the frozen process state; and
at a second time after capturing the memory image, recovering the process by:
restoring the process to a restore point based on the memory image;
generating a catch-up log based on a full log associated with the process, the full log including records indicative of the execution of the process up to the second time, the catch-up log including a subset of the records from the full log that are beyond the restore point; and
causing the application to replay the catch-up log.

### Claim 28 (depends on 1)

The method of claim 1,
wherein the application is an asynchronous replica application instance of a primary application instance;
wherein the process executed by the replica application instance is an asynchronous replica process of a primary process executed by the primary application instance; and
wherein the replica application instance executes the replica process by:
accessing records from a full log associated with the primary application instance; and
performing transactions indicated in the full log associated with the primary application instance.

### Claim 29 (depends on 28)

The method of claim 28, further comprising:
positioning the memory image to enable the primary application instance to access the memory image for recovery.

### Claim 30 (depends on 28)

The method of claim 28, the method further comprising:
at periodic intervals during execution of the primary process by the primary application instance:
generating a catch-up log based on the full log associated with the primary application instance, the catch-up log including a subset of records from the full log; and
causing the replica application instance to replay the catch-up log;
wherein the memory image is captured after the replica application instance has completed replaying a respective catch-up log.

### Claim 31 (depends on 1)

The method of claim 1, wherein the in-memory data is first in-memory data, the method further comprising:
enabling the application to use volatile memory to store and access second in-memory data during execution of the process; and
copying the second in-memory data from the volatile memory to the non-volatile storage.

### Claim 32 (depends on 31)

The method of claim 31, where the non-volatile storage is the PMEM.

### Claim 33 (depends on 31)

The method of claim 31, wherein enabling the application to use the PMEM and the volatile memory includes:
virtualizing a memory object as anonymous byte-addressable memory for use by the application;
wherein the memory object is based on the PMEM and the volatile memory.

### Claim 34 (depends on 31)

The method of claim 31, wherein the volatile memory is DRAM.

### Claim 35

A system comprising:
a persistent memory (PMEM) configured for use as volatile-mode memory to enable an application to store and access in-memory data during execution of a process; and
a memory controller configured to:
generate metadata indicative of a particular state of the PMEM at a particular time during execution of the process;
store the metadata in a non-volatile storage; and
safekeep, in the PMEM, a particular state of the in-memory data as it exists at the particular state of the PMEM.

### Claim 36

A method for storing and managing time-evolved memory images, the method comprising:
enabling an application to use memory to execute a process;
capturing a plurality of memory images at various times during execution of the process, wherein a particular memory image of the plurality of memory images is indicative of a state of the memory at a particular time during execution of the process; and
storing metadata associated with the plurality of memory images using a linked index scheme, wherein metadata associated with the particular memory image includes:
a chunk index data structure indicative of chunks that are owned by the particular memory image, wherein the chunks that are owned by the particular memory image include one or more chunks, of a plurality of chunks, that differ from a parent of the particular memory image;
wherein each of the plurality of chunks represents a portion of the memory mapped to an address space associated with the application; and
wherein the parent of the particular memory image is one of the plurality of memory images captured earlier than the particular time.

### Claim 37 (depends on 36)

The method of claim 36, wherein the chunk index data structure is configured as a full index.

### Claim 38 (depends on 37)

The method of claim 37, wherein the full index includes chunk pointers to all of the plurality of chunks, and wherein the full index is associated with chunk status indicators that are indicative of the chunks that are owned by the particular memory image.

### Claim 39 (depends on 38)

The method of claim 38,
wherein each of the chunk status indicators is stored with an associated chunk pointer in the full index; and/or
wherein the chunk status indicators are stored separately from the full index.

### Claim 40 (depends on 36)

The method of claim 36, wherein the chunk index data structure is configured as a difference-only index.

### Claim 41 (depends on 40)

The method of claim 40, wherein the difference-only index includes chunk pointers to only the chunks that are owned by the particular memory image.

### Claim 42 (depends on 41)

The method of claim 41, wherein each of the chunk pointers indicate a location in the memory that is mapped to the address space associated with the application.

### Claim 43 (depends on 41)

The method of claim 41, wherein the chunk pointers are stored as part of a key-value data structure, a hash-map data structure, or a tree data structure.

### Claim 44 (depends on 41)

The method of claim 41, further comprising:
reconfiguring the chunk index data structure as a full index by:
obtaining, from one or more of the other plurality of memory images, chunk pointers to chunks that are not owned by the particular memory image;
updating the chunk index data structure to include the chunk pointers to chunks that are not owned by the particular memory image.

### Claim 45 (depends on 36)

The method of claim 36, wherein the metadata associated with the plurality of memory images includes a plurality of chunk index data structures, each of the plurality of chunk index data structures associated with a different one of the plurality of memory images.

### Claim 46 (depends on 45)

The method of claim 45,
wherein a first chunk index data structure of the plurality of chunk index data structures is configured as a full index; and
wherein a second chunk index data structure of the plurality of chunk index data structures is configured as a difference-only index.

### Claim 47 (depends on 45)

The method of claim 45, wherein the metadata associated with the plurality of memory images further includes family pointers indicative of familial links between memory images in an ancestry chain.

### Claim 48 (depends on 36)

The method of claim 36, wherein the metadata associated with the particular memory image further includes:
a parent pointer indicative of a link to the parent of the particular memory image;
a child pointer indicative of a link to a child of the particular memory image, wherein the child of the particular memory image is one of the plurality of memory images captured later than the particular time; and/or
a sibling pointer indicative of a link to a sibling of the particular memory image, wherein the sibling is an additional child of the parent of the particular memory image.

### Claim 49 (depends on 36)

The method of claim 36, further comprising:
maintaining a record of memory mappings associated with process, during execution of the process;
wherein capturing the particular memory image includes:
causing, at the particular time, execution of the process to freeze;
after freezing the process, setting write protection in the memory mappings associated with the process;
generating, based on the record of the memory mappings, at least some of the metadata associated with the particular memory image; and
causing execution of the process to resume.

### Claim 50 (depends on 49)

The method of claim 49, wherein write protecting the mapping sets up a copy-on-write (CoW) operation that is triggered when the process attempts to modify the memory mappings.

### Claim 51 (depends on 49)

The method of claim 49, wherein the at least some metadata associated with the particular memory image is generated after causing execution of the process to resume.

### Claim 52 (depends on 49)

The method of claim 49, wherein the particular memory image is a first memory image, wherein the metadata associated with the particular memory image is first metadata, and wherein capturing the particular memory image further includes:
before causing execution of the process to resume, creating a second memory image that is child to the first memory image by:
storing second metadata associated with the second memory image, wherein the second metadata includes:
a parent pointer indicative of a link to the first memory image; and
a second chunk index data structure indicative that no chunks are owned by the second memory image;
detecting a change in the memory mappings associated with the process after execution of the process has resumed; and
updating the second chunk index data structure based on the change in the memory mappings;
wherein the second chunk index data structure is updated to be indicative of one or more chunks that are owned by the second memory image, wherein the chunks that are owned by the second memory image include one or more chunks, of the plurality of chunks, that differ from the first memory image.

### Claim 53 (depends on 36)

The method of claim 36, further comprising:
deleting the particular memory image;
wherein deleting the memory image includes freeing the chunks that are owned by the particular memory image.

### Claim 54 (depends on 36)

The method of claim 36, further comprising:
deleting the particular memory image;
wherein deleting the memory image includes:
freeing a first mapped chunk that is owned by the particular memory image and that is also owned by a child of the particular memory image; and
merging, into the child of the particular memory image, a second mapped chunk that is owned by the particular memory image and not owned by the child of the particular memory image;
wherein the child of the particular memory image is one of the plurality of memory images captured later than the particular time.

### Claim 55 (depends on 36)

The method of claim 36, further comprising:
copying the particular memory object;
wherein copying the memory object includes:
creating a new memory image;
designating the parent of the particular memory image as a parent of the new memory image;
copying, to the new memory image, the chunks that are owned by the particular memory image.

### Claim 56 (depends on 36)

The method of claim 36, wherein the particular memory image is a current memory image, the method further comprising:
detecting a change in memory mappings associated with the process during execution of the process; and
updating the chunk index data structure based on the change in the memory mappings.

### Claim 57 (depends on 56)

The method of claim 56, wherein updating the chunk index data structure includes:
adding a chunk pointer to the chunk index data structure, wherein the chunk pointer is indicative of a location in the memory that is mapped to the address space associated with the application; or
associating a chunk status identifier with an existing chunk pointer in the chunk index data structure, wherein the chunk status identifier is indicative that a mapped chunk associated with the existing chunk pointer is owned by the particular memory image.

### Claim 58 (depends on 36)

The method of claim 36, wherein the memory includes volatile memory and/or byte-addressable persistent memory (PMEM).

### Claim 59 (depends on 36)

The method of claim 36, wherein enabling the application to use the memory to execute the process includes:
virtualizing a memory object as anonymous byte-addressable memory for access by one or more applications,
wherein the memory object includes the memory.

### Claim 60 (depends on 59)

The method of claim 59, wherein the memory object is a distributed memory object (DMO).
