Reader bias based locking technique enabling high read concurrency for read-mostly workloads
AssigneeOracle International Corporation
InventorsDavid Dice, Alex Kogan
Life of this patent
Estimating the term…
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.
Claims20
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.
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.
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.
Dependencies are inferred from the claim text.