Scalable rundown protection for object lifetime management
First Claim
1. A computer memory device including a data structure stored therein, wherein the data structure is arranged to represent a cache-aware per-processor rundown reference count in a shared-memory multiprocessor computer system, the data structure comprising at least a first data field representing an integer count of positive references and negative dereferences taken on an object for preventing the object from being destroyed or otherwise rendered inaccessible in a multiprocessor environment with a shared memory while at least one reference on the object exists, wherein requests for new references on the object and releases of existing references on the object are managed based on the integer count and a global reference count, wherein a least significant bit of the first data field is used to indicate whether a rundown wait is in progress, and wherein the requests for the new references are managed by:
- refusing to grant a new reference if a rundown wait is in progress; and
updating the integer count associated with the processor by atomically replacing the integer count with a new integer count reflecting an addition of the at least one new reference if a rundown wait is not in progress and a processor executes a request for at least one new reference.
1 Assignment
0 Petitions
Accused Products
Abstract
Object rundown protection that scales with the number of processors in a shared-memory computer system is disclosed. Prior to object rundown, a cache-aware reference count data structure is used to prevent cache-pinging that would otherwise result from data sharing across processors in a multiprocessor computer system. In this data structure, a counter of positive references and negative dereferences, aligned on a particular cache line, is maintained for each processor. When an object is to be destroyed, a rundown wait process is begun, during which new references on the object are prohibited, and the total number of outstanding references is added to an on-stack global counter. Destruction is delayed until the global reference count is reduced to zero. In an implementation on non-uniform memory access multiprocessor machines, each processor'"'"'s reference count is additionally allocated in a region of main memory that is physically close to that processor.
40 Citations
15 Claims
-
1. A computer memory device including a data structure stored therein, wherein the data structure is arranged to represent a cache-aware per-processor rundown reference count in a shared-memory multiprocessor computer system, the data structure comprising at least a first data field representing an integer count of positive references and negative dereferences taken on an object for preventing the object from being destroyed or otherwise rendered inaccessible in a multiprocessor environment with a shared memory while at least one reference on the object exists, wherein requests for new references on the object and releases of existing references on the object are managed based on the integer count and a global reference count, wherein a least significant bit of the first data field is used to indicate whether a rundown wait is in progress, and wherein the requests for the new references are managed by:
-
refusing to grant a new reference if a rundown wait is in progress; and updating the integer count associated with the processor by atomically replacing the integer count with a new integer count reflecting an addition of the at least one new reference if a rundown wait is not in progress and a processor executes a request for at least one new reference. - View Dependent Claims (2, 3, 4, 10, 11, 12, 13, 14, 15)
-
-
5. A computer-readable medium having stored thereon a data structure comprising:
-
a first data field storing a count of processors in a shared-memory multiprocessor computer system; a second data field having size large enough to ensure that a third data field begins at a point aligned on a cache line boundary for the processors in the system; and the third data field containing at least one pointer to a plurality of per-processor reference count objects, wherein each object represents at least an integer count of positive references and negative dereferences taken on an object pursuant to requests executed by a particular processor in the system, and there are at least as many objects as there are processors. - View Dependent Claims (6, 7)
-
- 8. A computer-readable medium representing a rundown wait block, having stored thereon a data structure comprising at least a first data field storing a global count of outstanding references taken on an object by processors in a shared-memory multiprocessor computer system, further comprising a second data field storing a synchronization primitive permitting a rundown wait process to block indefinitely until the process is signaled to wake up.
Specification