IP Library › Granted Patent US 12,242,394
Granted Patent B2
US 12,242,394 · App. 18/472,511 · Granted Mar 4, 2025

Transitioning between thread-confined memory segment views and shared memory segment views

Inventors: Maurizio Cimadamore (Donabate, IE); James Malcolm Laskey (Lunenburg, CA); Jorn Bender Vernee (Leiden, NL)
Assignee: Oracle International Corporation
G06F12/1458G06F12/0646G06F2212/1052
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 12,242,394
App. No.
18/472,511
Granted
Mar 4, 2025
Kind
B2
Abstract

Techniques for transitioning between memory segment views include: instantiating a first memory segment view that confines access to a memory segment to a first thread; receiving a request to transition ownership of the memory segment to a second thread; responsive to receiving the request to transition ownership of the memory segment to the second thread: instantiating a second memory segment view that permits access to the memory segment by the second thread; copying metadata from the first memory segment view to the second memory segment view; terminating the first memory segment view, to prevent access to the memory segment via the first memory segment view.

Claims (54)

1. One or more non-transitory computer-readable media storing instructions which, when executed by one or more hardware processors, cause performance of operations comprising:

instantiating a first confined memory segment view as a first runtime object, wherein the first confined memory segment view confines access to a memory segment to a first thread, and wherein the memory segment is stored in memory separate from the first runtime object;

receiving a request to change ownership of the first confined memory segment view to a second thread;

responsive to receiving the request to change ownership of the first confined memory segment view to the second thread:

instantiating a second confined memory segment view as a second runtime object, wherein the second confined memory segment view confines access to the memory segment to the second thread, and wherein the memory segment is stored in memory separate from the second runtime object.

2. The one or more non-transitory computer-readable media of claim 1 , wherein instantiating the second confined memory segment view having the second thread as owner comprises:

storing a reference to the second thread in an owner field associated with the second confined memory segment view;

copying a reference to the memory segment from the first confined memory segment view to the second confined memory segment view.

3. The one or more non-transitory computer-readable media of claim 1 , the operations further comprising, responsive to receiving the request to change ownership of the first confined memory segment view to the second thread:

marking the first confined memory segment view as inactive, such that a subsequent attempt to access the memory segment via the first confined memory segment view will fail.

4. The one or more non-transitory computer-readable media of claim 1 , the operations further comprising:

performing, by the first thread prior to receiving the request to change ownership of the first confined memory segment view, one or more operations on the memory segment via the first confined memory segment view.

5. The one or more non-transitory computer-readable media of claim 1 , the operations further comprising:

performing, by the second thread after instantiating the second confined memory segment view, one or more operations on the memory segment via the second confined memory segment view.

6. The one or more non-transitory computer-readable media of claim 1 , the operations further comprising:

closing, by the second thread, the second confined memory segment view.

7. The one or more non-transitory computer-readable media of claim 1 , wherein instantiating the first confined memory segment view comprises storing a reference to the first thread in an owner field associated with the first confined memory segment view.

8. A system comprising:

one or more hardware processors;

one or more non-transitory computer-readable media; and

program instructions stored on the one or more non-transitory computer readable media which, when executed by the one or more hardware processors, cause the system to perform operations comprising:

instantiating a first confined memory segment view as a first runtime object, wherein the first confined memory segment view confines access to a memory segment to a first thread, and wherein the memory segment is stored in memory separate from the first runtime object;

receiving a request to change ownership of the first confined memory segment view to a second thread;

responsive to receiving the request to change ownership of the first confined memory segment view to the second thread:

instantiating a second confined memory segment view as a second runtime object, wherein the second confined memory segment view confines access to the memory segment to the second thread, and wherein the memory segment is stored in memory separate from the second runtime object.

9. The system of claim 8 , wherein instantiating the second confined memory segment view having the second thread as owner comprises:

storing a reference to the second thread in an owner field associated with the second confined memory segment view;

copying a reference to the memory segment from the first confined memory segment view to the second confined memory segment view.

10. The system of claim 8 , the operations further comprising, responsive to receiving the request to change ownership of the first confined memory segment view to the second thread:

marking the first confined memory segment view as inactive, such that a subsequent attempt to access the memory segment via the first confined memory segment view will fail.

11. The system of claim 8 , the operations further comprising:

performing, by the first thread prior to receiving the request to change ownership of the first confined memory segment view, one or more operations on the memory segment via the first confined memory segment view.

12. The system of claim 8 , the operations further comprising:

performing, by the second thread after instantiating the second confined memory segment view, one or more operations on the memory segment via the second confined memory segment view.

13. The system of claim 8 , the operations further comprising:

closing, by the second thread, the second confined memory segment view.

14. The system of claim 8 , wherein instantiating the first confined memory segment view comprises storing a reference to the first thread in an owner field associated with the first confined memory segment view.

15. A method comprising:

instantiating a first confined memory segment view as a first runtime object, wherein the first confined memory segment view confines access to a memory segment to a first thread, and wherein the memory segment is stored in memory separate from the first runtime object;

receiving a request to change ownership of the first confined memory segment view to a second thread;

responsive to receiving the request to change ownership of the first confined memory segment view to the second thread:

instantiating a second confined memory segment view as a second runtime object, wherein the second confined memory segment view confines access to the memory segment to the second thread, and wherein the memory segment is stored in memory separate from the second runtime object;

wherein the method is performed by at least one device including a hardware processor.

16. The method of claim 15 , wherein instantiating the second confined memory segment view having the second thread as owner comprises:

storing a reference to the second thread in an owner field associated with the second confined memory segment view;

copying a reference to the memory segment from the first confined memory segment view to the second confined memory segment view.

17. The method of claim 15 , further comprising, responsive to receiving the request to change ownership of the first confined memory segment view to the second thread:

marking the first confined memory segment view as inactive, such that a subsequent attempt to access the memory segment via the first confined memory segment view will fail.

18. The method of claim 15 , further comprising:

performing, by the first thread prior to receiving the request to change ownership of the first confined memory segment view, one or more operations on the memory segment via the first confined memory segment view;

performing, by the second thread after instantiating the second confined memory segment view, one or more operations on the memory segment via the second confined memory segment view.

19. The method of claim 15 , further comprising:

closing, by the second thread, the second confined memory segment view.

20. The method of claim 15 , wherein instantiating the first confined memory segment view comprises storing a reference to the first thread in an owner field associated with the first confined memory segment view.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 27, 2023
From: CIMADAMORE, MAURIZIO; LASKEY, JAMES MALCOLM; VERNEE, JORN BENDER
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 065046/0335 →
Continuity (4)
Continuation 17734597 · May 2, 2022
Continuation 17024209 · Sep 17, 2020
Provisional Application 62931412 · Nov 6, 2019
Related Publication 20240012764A1 · Jan 11, 2024
References Cited (31)
US 3794821A · Hodges et al. · 1974 [cited by applicant]
US 9594752B2 · Shaver et al. · 2017 [cited by applicant]
US 10459849B1 · Shorb et al. · 2019 [cited by applicant]
US 20060090139A1 · Jenni · 2006 [cited by examiner]
US 20070156973A1 · Fleischer et al. · 2007 [cited by applicant]
US 20070169043A1 · Violleau · 2007 [cited by examiner]
US 20080086603A1 · Lahtinen et al. · 2008 [cited by applicant]
US 20090328053A1 · Dice · 2009 [cited by applicant]
US 20120143848A1 · Boehm · 2012 [cited by examiner]
US 20150339139A1 · Lin et al. · 2015 [cited by applicant]
US 20150378939A1 · Mohamed · 2015 [cited by examiner]
US 20160011992A1 · Sandoz et al. · 2016 [cited by applicant]
US 20160378976A1 · Kotary et al. · 2016 [cited by applicant]
US 20180129611A1 · Parker · 2018 [cited by examiner]
US 20190332539A1 · Anderson et al. · 2019 [cited by applicant]
US 20190347211A1 · Bortnikov et al. · 2019 [cited by applicant]
EP 2755129A1 · 2014 [cited by applicant]
Angelbert, “A Post-Apocalyptic sun.ntisc. Unsafe World,” Discover practical strategies to build and operate microservices at InfoQ Live, on Aug 25, available online at <https://www.infoq.com/articles/A-Post-Apocalyptic-… [cited by applicant]
Byte Buffers and Non-Heap Memory, available online at < www.kdgregory.com/index.php?page=java.byteBuffer >, printed on Jul. 30, 2020, 15 pages. [cited by applicant]
Carellan, “Code Sample: Introduction to Java API for Persistent Memory Programming,” available online at < https://software.intel.com/content/www/us/en/develop/articles/code-sample-introduction-to-java-api-for-persisten… [cited by applicant]
Cimadamore M., “JEP 454: Foreign function & Memory, API”, Jun. 22, 2023, pp. 14. [cited by applicant]
Ehn R., “JEP 312: Thread-Local Handshakes” Aug. 1, 2017, pp. 3. [cited by applicant]
Going Off-Heap in Java 14 with Niall Maguire and Ryan Swain, available online at < https://blog.neueda.com/neueda-tech/going-off-heap-in-java-14-with-niall-maguire-and-ryan-swain/ >, Apr. 23, 2020, 12 pages. [cited by applicant]
JEP 370: Foreign-Memory Access API for JDK 14, available online at < https://www.jrebel.com/blog/jep-370-foreign-memory-access-api >, Feb. 18, 2020, 10 pages. [cited by applicant]
Jillegal, “Merge remote-tracking branch ‘origin/master’,” available online at < https://github.com/serkan-ozal/jillegal/commit/8996adf43c81c7f50e362cc01ee0b474adc8cc10#diff-04c6e90faac2675aa89e2176d2eeo7d8L58 >, printed… [cited by applicant]
KDG Commons, Source Forge, Status: Beta, Brought to you by: kdgregory, available online at < https://sourceforge.net/p/kdgcommons/code/HEAD/tree/trunk//src/main/java/net/sf/kdgcommons/buffer/MappedFileBuffer.java >, pri… [cited by applicant]
Managing Off-Heap Memory, available online at < https://gemfire.docs.pivotal.io/910/geode/managing/heap_use/off_heap_management.html >, printed on May 22, 2020, 6 pages. [cited by applicant]
Mechanical Sympathy, Hardware and software working together in harmony, available online at < https://mechanical-sympathy.blogspot.com/2012/10/compact-off-heap-structurestuples-in.html >, Oct. 17, 2012, 22 pages. [cited by applicant]
Memory Package, Data Sketches, available online at < https://datasketches.apache.org/docs/Memory/MemoryPackage.html >, printed on May 22, 2020, 9 pages. [cited by applicant]
Operating Principle and Implementation of Flink: Memory Management, Alibaba Cloud, available online at < https://medium.com/@A ibaba_Cloud/operating-principle-and-implementation-of-flink-memory-management-34dfcf885922 >… [cited by applicant]
RTSJ Chapters 1.0.2, Introduction, available online at < https://www.rtsj.org/specjavadoc/book_index.html >, printed on Jul. 31, 2020, 1 page. [cited by applicant]