IP Library › Granted Patent US 11,972,777
Granted Patent B2
US 11,972,777 · App. 18/174,520 · Granted Apr 30, 2024

Reader bias based locking technique enabling high read concurrency for read-mostly workloads

Inventors: David Dice (Foxboro, MA); Alex Kogan (Needham, MA)
Assignee: Oracle International Corporation
G11B20/10268G06F9/526G06F16/2343G06F16/2365G11B20/105G11C16/26
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 11,972,777
App. No.
18/174,520
Granted
Apr 30, 2024
Kind
B2
Abstract

A data object has a lock and a condition indicator associated with it. Based at least partly on detecting a first setting of the condition indicator, a reader stores an indication that the reader has obtained read access to the data object in an element of a readers structure and reads the data object without acquiring the lock. A writer detects the first setting and replaces it with a second setting, indicating that the lock is to be acquired by readers before reading the data object. Prior to performing a write on the data object, the writer verifies that one or more elements of the readers structure have been cleared.

Claims (51)

1. A computer-implemented method, comprising:

storing respective sets of locking-related metadata pertaining to individual ones of one or more data objects, wherein a set of locking-related metadata pertaining to a first data object of the one or more data objects comprises (a) a first lock and (b) a first read-related condition indicator;

determining, by a first reader of a plurality of accessors of the first data object, based at least in part on examining the first read-related condition indicator, that a read operation on the first data object can be performed without acquiring the first lock; and

initiating the read operation by the first reader without acquiring the first lock.

2. The computer-implemented method as recited in claim 1 , further comprising:

identifying, by the first reader using one or more selection functions prior to initiating the read operation, a particular element within a readers data structure; and

storing, by the first reader in the particular element, an indication that the first reader has obtained read access to the first data object.

3. The computer-implemented method as recited in claim 2 , wherein a particular selection function of the one or more selection functions comprises a hash function, and wherein an input provided to the hash function by the first reader comprises one or more of: (a) an identifier of the first reader, (b) an identifier of the first data object or (c) an identifier of the first lock.

4. The computer-implemented method as recited in claim 2 , wherein a particular selection function of the one or more selection functions comprises a time-based mapping function to which a timestamp associated with the read operation is provided as input.

5. The computer-implemented method as recited in claim 2 , wherein a particular selection function of the one or more selection functions comprises a random-number based element selection function.

6. The computer-implemented method as recited in claim 2 , wherein the one or more selection functions comprise a first selection function and a second selection function, and wherein said identifying the particular element within the readers data structure by the first reader using the one or more selection functions comprises:

invoking the first selection function by the first reader;

determining, by the first reader, that another element of the readers structure, identified by the first selection function, is occupied; and

invoking the second selection function by the first reader in response to determining that the other element of the readers structure is occupied, wherein the particular element is identified by the second selection function.

7. The computer-implemented method as recited in claim 1 , further comprising:

storing, by the first reader in a readers structure prior to initiating the read operation, an indication in a readers structure that the first reader has acquired read access to the first data object; and

verifying, by the first reader, after storing the indication and prior to initiating the read operation, that the first read-related condition indicator has not been modified since the first read-related condition indicator was examined by the first reader.

8. A system, comprising:

one or more computing devices;

wherein the one or more computing devices include instructions that upon execution on or across one or more processors:

store respective sets of locking-related metadata pertaining to individual ones of one or more data objects, wherein a set of locking-related metadata pertaining to a first data object of the one or more data objects comprises (a) a first lock and (b) a first read-related condition indicator; and

cause a first reader of a plurality of accessors of the first data object to:

determine, based at least in part on examining the first read-related condition indicator by the first reader, that a read operation on the first data object can be performed without acquiring the first lock; and

initiate the read operation without acquiring the first lock.

9. The system as recited in claim 8 , wherein the one or more computing devices store further instructions that upon execution on or across the one or more processors further cause the first reader to:

identify, using one or more selection functions prior to initiating the read operation, a particular element within a readers data structure; and

store, in the particular element, an indication that the first reader has obtained read access to the first data object.

10. The system as recited in claim 9 , wherein a particular selection function of the one or more selection functions comprises a hash function, and wherein an input provided to the hash function by the first reader comprises one or more of: (a) an identifier of the first reader, (b) an identifier of the first data object or (c) an identifier of the first lock.

11. The system as recited in claim 9 , wherein a particular selection function of the one or more selection functions comprises a time-based mapping function to which a timestamp associated with the read operation is provided as input.

12. The system as recited in claim 9 , wherein a particular selection function of the one or more selection functions comprises a random-number based element selection function.

13. The system as recited in claim 9 , wherein the one or more selection functions comprise a first selection function and a second selection function, wherein to cause the first reader to identify the particular element within the readers data structure, the one or more computing devices store further instructions that upon execution on or across the one or more processors further cause the first reader to:

invoke the first selection function;

determine that another element of the readers structure, identified by the first selection function, is occupied; and

invoke the second selection function in response to determining that the other element of the readers structure is occupied, wherein the particular element is identified by the second selection function.

14. The system as recited in claim 8 , wherein the one or more computing devices store further instructions that upon execution on or across the one or more processors further cause the first reader to:

store, prior to initiating the read operation, an indication in a readers structure that the first reader has acquired read access to the first data object; and

verify, after storing the indication and prior to initiating the read operation, that the first read-related condition indicator has not been modified since the first read-related condition indicator was examined by the first reader.

15. One or more non-transitory computer-accessible storage media storing program instructions that when executed on or across one or more processors:

store respective sets of locking-related metadata pertaining to individual ones of one or more data objects, wherein a set of locking-related metadata pertaining to a first data object of the one or more data objects comprises (a) a first lock and (b) a first read-related condition indicator; and

cause a first reader of a plurality of accessors of the first data object to:

determine, based at least in part on examining the first read-related condition indicator by the first reader, that a read operation on the first data object can be performed without acquiring the first lock; and

initiate the read operation without acquiring the first lock.

16. The one or more non-transitory computer-accessible storage media as recited in claim 15 , storing further program instructions that when executed on or across one or more processors further cause the first reader to:

identify, using one or more selection functions prior to initiating the read operation, a particular element within a readers data structure; and

store, in the particular element, an indication that the first reader has obtained read access to the first data object.

17. The one or more non-transitory computer-accessible storage media as recited in claim 16 , wherein a particular selection function of the one or more selection functions comprises a hash function, and wherein an input provided to the hash function by the first reader comprises one or more of: (a) an identifier of the first reader, (b) an identifier of the first data object or (c) an identifier of the first lock.

18. The one or more non-transitory computer-accessible storage media as recited in claim 16 , wherein a particular selection function of the one or more selection functions comprises a time-based mapping function to which a timestamp associated with the read operation is provided as input.

19. The one or more non-transitory computer-accessible storage media as recited in claim 16 , wherein a particular selection function of the one or more selection functions comprises a random-number based element selection function.

20. The one or more non-transitory computer-accessible storage media as recited in claim 15 , storing further program instructions that when executed on or across one or more processors further cause the first reader to:

store, prior to initiating the read operation, an indication in a readers structure that the first reader has acquired read access to the first data object; and

verify, after storing the indication and prior to initiating the read operation, that the first read-related condition indicator has not been modified since the first read-related condition indicator was examined by the first reader.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 27, 2023
From: DICE, DAVID; KOGAN, ALEX
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 062807/0899 →
Continuity (6)
Continuation 17507714 · Oct 21, 2021
Continuation 17020655 · Sep 14, 2020
Continuation 16739851 · Jan 10, 2020
Continuation 16290431 · Mar 1, 2019
Provisional Application 62734197 · Sep 20, 2018
Related Publication 20230206953A1 · Jun 29, 2023
Cited By (2)
US 12,254,900 US 12,322,414