IP Library Granted Patent US 9,135,183
Granted Patent B2
US 9,135,183 · App. 13/975,022 · Granted Sep 15, 2015

Multi-threaded memory management

Inventors: Chen Tian (Union City, CA); Daniel G. Waddington (Morgan Hill, CA)
Assignee: Samsung Electronics Co., Ltd.
G06F12/10G06F12/1027
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,135,183
App. No.
13/975,022
Granted
Sep 15, 2015
Kind
B2
Abstract

Memory management includes maintaining a first mapping structure for each thread of a multi-threaded process. A second mapping structure is maintained for each core of a multi-core processing device. A global mapping structure for shared memory mappings is maintained. During thread context switches, copying thread context entries without modifying a page-mapping base address register of each core of the multi-core processing device.

Claims (45)

1. A method for memory management comprising:

maintaining a first mapping structure for each thread of a multi-threaded process;

maintaining a second mapping structure for each core of a multi-core processing device;

maintaining a global mapping structure for shared memory mappings; and

during thread context switches, copying thread context entries without modifying a page-mapping base address register of each core of the multi-core processing device.

2. The method of claim 1 , wherein the first mapping structure comprises a per-thread virtual-physical address mapping structure (VPMS), and the second mapping structure comprises a per-core local VPMS.

3. The method of claim 2 , wherein translation lookaside buffer (TLB) flushing is avoided based on the copy during thread context switches.

4. The method of claim 3 , wherein each page-mapping base address register comprises a VPMS base address register (BAR).

5. The method of claim 4 , wherein each VPMS BAR points to an address of a corresponding per-core local VPMS.

6. The method of claim 4 , further comprising:

partitioning virtual memory used by each thread of the multi-threaded process into an instruction region, a private memory region, and a shared memory region.

7. The method of claim 6 , wherein each instruction region comprises a plurality of instructions for the multi-threaded process and is shared by each of the threads.

8. The method of claim 7 , wherein each private memory region comprises a corresponding thread-local heap and stack data.

9. The method of claim 8 , wherein the global mapping structure comprises a global VPMS that comprises mapping entries for each shared memory region.

10. The method of claim 9 , wherein lock synchronization is required when accessing shared memory entries in both the global VPMS and a local VPMS.

11. The method of claim 10 , further comprising:

synchronizing the local VPMS and the global VPMS based on a thread page-fault that occurs upon a particular thread attempting to access a particular shared memory region.

12. A system comprising:

a multi-core processor having a plurality of processor cores each coupled to a page-mapping base address register; and

a memory including a mapping architecture comprising:

a first mapping structure for each thread of a multi-threaded process executed by the plurality of cores;

a second mapping structure for each core of the plurality of cores; and

a global mapping structure for shared memory mappings of each thread of the multi-threaded process; and

a page-fault handler that synchronizes data in the global mapping structure and a particular second mapping structure.

13. The system of claim 12 , wherein the first mapping structure comprises a per-thread virtual-physical address mapping structure (VPMS), and the second mapping structure comprises a per-core local VPMS.

14. The system of claim 13 , wherein each core of the plurality of processor cores is coupled to a translation lookaside buffer (TLB), and TLB flushing is avoided based on performing a copy process performed during thread context switches without modifying the page-mapping base address register of each core of the plurality of processor cores.

15. The system of claim 14 , wherein each page-mapping base address register comprises a VPMS base address register (BAR), and each VPMS BAR points to an address of a corresponding per-core local VPMS.

16. The system of claim 15 , wherein virtual memory used by each thread of the multi-threaded process comprises an instruction region, a private memory region, and a shared memory region.

17. The system of claim 16 , wherein each instruction region comprises a plurality of instructions for the multi-threaded process and is shared by each of the threads, and each private memory region comprises a corresponding thread-local heap and stack data.

18. The system of claim 17 , wherein the global mapping structure comprises a global VPMS that comprises mapping entries for each shared memory region.

19. The system of claim 18 , wherein lock synchronization is required when accessing shared memory entries in both the global VPMS and a local VPMS.

20. The system of claim 19 , wherein the page-fault handler synchronizes the particular local VPMS and the global VPMS based on a thread page-fault that occurs upon a particular thread attempting to access a particular shared memory region.

21. A non-transitory processor computer readable medium that includes a program that when executed by a processor performs a method comprising:

creating a first mapping structure for each thread of a multi-threaded process;

creating a second mapping structure for each core of a multi-core processing device;

creating a global mapping structure for maintaining shared memory mappings; and

performing a copy of thread context entries during thread context switches without modifying a page-mapping base address register of each core of the multi-core processing device.

22. The non-transitory processor-readable medium of claim 21 , wherein the first mapping structure comprises a per-thread virtual-physical address mapping structure (VPMS), and the second mapping structure comprises a per-core local VPMS.

23. The non-transitory processor-readable medium of claim 22 , wherein each core of the multi-core processing device includes a translation lookaside buffer (TLB), and TLB flushing is avoided based on the copy during thread context switches.

24. The non-transitory processor-readable medium of claim 23 , wherein each page-mapping base address register comprises a VPMS base address register (BAR), and each VPMS BAR points to an address of a corresponding per-core local VPMS.

25. The non-transitory processor-readable medium of claim 24 , further comprising:

partitioning virtual memory used by each thread of the multi-threaded process into an instruction region, a private memory region, and a shared memory region, wherein each instruction region comprises a plurality of instructions for the multi-threaded process and is shared by each of the threads, and each private memory region comprises a corresponding thread-local heap and stack data.

26. The non-transitory processor-readable medium of claim 25 , wherein the global mapping structure comprises a global VPMS that comprises mapping entries for each shared memory region, and lock synchronization is required when accessing shared memory entries in both the global VPMS and a particular local VPMS.

27. The non-transitory processor-readable medium of claim 26 , further comprising:

synchronizing the particular local VPMS and the global VPMS based on a thread page-fault that occurs upon a particular thread attempting to access a particular shared memory region.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 23, 2013
From: TIAN, CHEN; WADDINGTON, DANIEL G.
To: SAMSUNG ELECTRONICS CO., LTD.
Reel/Frame 031073/0599 →
Continuity (2)
Provisional Application 61779763 · Mar 13, 2013
Related Publication 20140281363A1 · Sep 18, 2014