IP Library Granted Patent US 9,916,095
Granted Patent B2
US 9,916,095 · App. 15/076,561 · Granted Mar 13, 2018

Fork-safe memory allocation from memory-mapped files with anonymous memory behavior

Inventors: Timothy A. Stabrawa (Lombard, IL); Andrew S. Poling (Lombard, IL); Zachary A. Cornelius (Chicago, IL); Jesse I. Taylor (Glenside, PA); John Overton (Chicago, IL)
Assignee: Kove IP, LLC
G06F3/0605G06F3/067G06F3/0614G06F3/0643G06F3/0667G06F3/0673G06F9/5016G06F12/08G06F12/10G06F2212/1004G06F2212/1048G06F2212/154G06F2212/50G06F2212/657Y02B60/1225
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 9,916,095
App. No.
15/076,561
Granted
Mar 13, 2018
Kind
B2
Abstract

Methods and systems are provided for fork-safe memory allocation from memory-mapped files. A child process may be provided a memory mapping at a same virtual address as a parent process, but the memory mapping may map the virtual address to a different location within a file than for the parent process.

Claims (43)

1. A system comprising:

a memory comprising a mapping of a first portion of a memory-mapped file to a virtual address for a first process, wherein the memory-mapped file comprises virtual memory backed by a file; and

a processor configured to:

map a second portion of the memory-mapped file to the virtual address for a second process based on the second process being forked from the first process, wherein the first and second portions of the memory-mapped file are backed by the file; and

write data from the first and second portions of the memory-mapped file to corresponding first and second portions of the file that backs the memory-mapped file.

2. The system of claim 1 , wherein the processor is configured to create a copy of data associated with the first portion of the memory-mapped file in response to a write to the virtual address by the first process or the second process.

3. The system of claim 1 , wherein the processor is configured to create a copy of data associated with the first portion of the memory-mapped file when the second process is forked from the first process.

4. The system of claim 1 , wherein the processor is configured to create a copy of data associated with the first portion of the memory-mapped file in response to a memory access operation on the virtual address by the first process or the second process.

5. The system of claim 1 , wherein the file is a pseudo file.

6. A method for providing fork-safe memory allocation from memory-mapped files, the method comprising:

allocating a first portion of a memory-mapped file to a virtual address for a first process;

allocating a second portion of the memory-mapped file to the virtual address for a second process based on the second process being a child of the first process, wherein the first portion of the memory-mapped file and the second portion of the memory-mapped file are mapped to a first offset and a second offset, respectively, of a file that backs the memory-mapped file; and

writing contents of the first and second portions of the memory-mapped file to corresponding first and second portions of the file that backs the memory-mapped file.

7. The method of claim 6 , further comprising selecting the second offset of the file for the second portion of the memory-mapped file when the virtual address is accessed and/or written by the child of the first process.

8. The method of claim 6 , wherein the file includes a first file and a second file, and wherein the first portion of the memory-mapped file is mapped to the first offset of the first file and the second portion is mapped to the second offset of the second file.

9. The method of claim 6 , further comprising encrypting file data stored in a primary memory in response to a write to the virtual address before writing the encrypted file data from the primary memory to the file that backs the memory-mapped file.

10. The method of claim 6 further comprising mapping the memory-mapped file to a pseudo file, and translating reads and writes to the pseudo file into reads and writes over a network to a memory appliance instead of accessing data in a file system.

11. The method of claim 10 , wherein the translating comprises reading from and/or writing to memory of the memory appliance via a memory access protocol independently of a central processing unit of the memory appliance.

12. The method of claim 6 , wherein the file includes an interface that provides access over a network to a corresponding area of primary memory of a memory appliance.

13. An apparatus comprising:

a processor; and

a memory, the memory comprising:

a first virtual address space for a first process executed by the processor;

a second virtual address space for a second process executed by the processor, wherein a virtual address in the first virtual address space is also in the second virtual address space;

at least a subset of a memory-mapped file, the memory-mapped file comprising a first portion and a second portion that include virtual memory backed by a file; and

a memory allocation module configured to map the virtual address in the first virtual address space for the first process to the first portion of the memory-mapped file and to map the virtual address in the second virtual address space for the second process to the second portion of the memory-mapped file based on the second process being a child of the first process, wherein the memory allocation module is further configured to write contents of the first and second portions of the memory-mapped file to corresponding first and second portions of the file that backs the memory-mapped file.

14. The apparatus of claim 13 , wherein the memory allocation module is further configured to encrypt data associated with the first portion or the second portion of the memory-mapped file before or as the data is written to the memory-mapped file, wherein the memory-mapped file includes virtual memory assigned to a pseudo file.

15. The apparatus of claim 14 wherein the memory allocation module is further configured to read the encrypted data from the memory-mapped file and decrypt the encrypted data after or as the encrypted data is read from the memory-mapped file.

16. The apparatus of claim 13 , wherein the memory allocation module comprises executable instructions included in an operating system.

17. The apparatus of claim 13 , wherein the memory allocation module comprises executable instructions included in a kernel or kernel module.

18. The apparatus of claim 13 , wherein the memory allocation module comprises executable instructions included in a user library.

19. The apparatus of claim 13 , wherein the memory-mapped file is mapped to an interface configured to provide access over a network to a corresponding area of primary memory of a memory appliance.

20. The apparatus of claim 19 , wherein access over the network to the corresponding area of primary memory of the memory appliance is via a Remote Direct Memory Access (RDMA) protocol and is independent of a central processing unit of the memory appliance.

21. The apparatus of claim 13 , wherein the first process and/or the second process are included in a container, a jail, and/or a zone.

22. An apparatus comprising:

a processor; and

a memory, the memory comprising:

a first virtual address space for a first process executed by the processor;

a second virtual address space for a second process executed by the processor, wherein a virtual address in the first virtual address space is also in the second virtual address space;

at least a subset of a memory-mapped file, the memory-mapped file comprising a first portion and a second portion that include virtual memory backed by a file; and

a memory allocation module configured to map the virtual address in the first virtual address space for the first process to the first portion of the memory-mapped file and to map the virtual address in the second virtual address space for the second process to the second portion of the memory-mapped file based on the second process being a child of the first process,

wherein the memory allocation module is further configured to encrypt data associated with the first portion or the second portion of the memory-mapped file before or as the data is written to the memory-mapped file, wherein the memory-mapped file includes virtual memory assigned to a pseudo file, and

wherein the memory allocation module is further configured to read the encrypted data from the memory-mapped file and decrypt the encrypted data after or as the encrypted data is read from the memory-mapped file.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 22, 2016
From: STABRAWA, TIMOTHY A.; POLING, ANDREW S.; CORNELIUS, ZACHARY A.; TAYLOR, JESSE I.; OVERTON, JOHN
To: KOVE IP, LLC
Reel/Frame 038059/0371 →
Continuity (2)
Provisional Application 62139310 · Mar 27, 2015
Related Publication 20160283127A1 · Sep 29, 2016