Patent ID: 8504540

Claim:
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, wherein a root node of the C-SNZI structure exposes an enable operation and a disable operation for enabling and disabling the C-SNZI structure; joining multiple readers to the C-SNZI structure, wherein the multiple readers share acquisition of the lock while joined to the C-SNZI structure; updating a surplus, which is configured to remain greater than zero as long as at least one of the multiple readers is joined to the C-SNZI structure; setting a first flag in the C-SNZI structure in response to a request by a writer; after setting of the first flag, prohibiting an additional reader from joining the C-SNZI structure; and setting a second flag when the writer acquires the lock.