SCALABLE READER-WRITER LOCK
First Claim
1. A method of facilitating acquisition of a reader-writer lock by multiple readers, the method comprising:
- constructing a hierarchical C-SNZI (Conditioned Scalable Non-Zero Indicator) structure within the lock;
joining multiple readers to the C-SNZI structure, wherein the multiple readers share acquisition of the lock while joined to the C-SNZI structure; and
updating a surplus configured to remain greater than zero as long as at least one of the multiple readers is joined to the C-SNZI structure.
2 Assignments
0 Petitions
Accused Products
Abstract
A reader-writer lock is provided that scales to accommodate multiple readers without contention. The lock comprises a hierarchical C-SNZI (Conditioned Scalable Non-Zero Indicator) structure that scales with the number readers seeking simultaneous acquisition of the lock. All readers that have joined the C-SNZI structure share concurrent acquisition, and additional readers may continue to join until the structure is disabled. The lock may be disabled by a writer, at which time subsequent readers will wait (e.g., in a wait queue) until the lock is again available. The C-SNZI structure may be implemented in a lockword or in reader entries within a wait queue. If implemented in reader entries of a wait queue, the lockword may be omitted, and new readers arriving at the queue may be able join an existing reader entry even if the reader entry is not at the tail of the queue.
54 Citations
20 Claims
-
1. A method of facilitating acquisition of a reader-writer lock by multiple readers, the method comprising:
-
constructing a hierarchical C-SNZI (Conditioned Scalable Non-Zero Indicator) structure within the lock; joining multiple readers to the C-SNZI structure, wherein the multiple readers share acquisition of the lock while joined to the C-SNZI structure; and updating a surplus configured to remain greater than zero as long as at least one of the multiple readers is joined to the C-SNZI structure. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
-
-
18. A computer-readable medium storing instructions that, when executed by a computer, cause the computer to perform a method of facilitating acquisition of a reader-writer lock by multiple readers, the method comprising:
-
constructing a hierarchical C-SNZI (Conditioned Scalable Non-Zero Indicator) structure within the lock; joining multiple readers to the C-SNZI structure, wherein the multiple readers share acquisition of the lock while joined to the C-SNZI structure; and updating a surplus configured to remain greater than zero as long as at least one of the multiple readers is joined to the C-SNZI structure.
-
-
19. A computing device, comprising:
-
a resource that is readable by read requesters and writable by write requesters; and a lock configured to arbitrate access to the resource by the read requesters and the write requesters, the lock including a conditioned scalable non-zero indicator (C-SNZI) object comprising a root node and a set of non-root nodes, wherein one or more of the non-root nodes comprise; arrive logic configured to join one or more read requesters to the C-SNZI object; and depart logic configured to sever a joined read requester from the C-SNZI object; wherein read requesters joined to the C-SNZI object share acquisition of the lock; wherein multiple read requesters invoke said arrive logic of different non-root nodes to join the C-SNZI object without contention. - View Dependent Claims (20)
-
Specification