Shared lease instruction support for transient blocking synchronization
AssigneeSun Microsystems, Inc.
InventorsDaniel S. Nussbaum, Mark S. Moir, Nir N. Shavit, Guy L. Steele
Life of this patent
Estimating the term…
Abstract
A computer system implementing transient blocking synchronization allows a memory location leased by a first process to be read-accessible to another process. In other words, more than one thread may have read-only type leases on a given memory location at a given time. Such “shared” leases expire when respective lease periods of the shared leases elapse.
Claims3
A method of performing computer system operations, comprising:
- obtaining a shared lease to a first memory location in a shared memory, wherein the shared lease is for a first predetermined period of time, and wherein an exclusive bit associated with the shared lease is not set;
- extending the shared lease to the first memory location for a second predetermined amount of time;
- setting the exclusive bit responsive to an attempt to obtain an exclusive lease to the first memory location, wherein the attempt is made within the second predetermined period of time;
- denying the attempt to obtain the exclusive lease;
- attempting to extend the shared lease to the first memory location, wherein the attempt is made within the second predetermined period of time;
- denying the attempt to extend the shared lease when the exclusive bit associated with the shared lease is set;
- and
- releasing the shared lease after the second predetermined amount of time.
A shared-memory multiprocessor computer system having instructions for synchronizing operations on memory, the instructions comprising instructions to:
- obtain a shared lease to a first memory location in a shared memory, wherein the shared lease is for a first predetermined period of time, and wherein an exclusive bit associated with the shared lease is not set;
- extend the shared lease to the first memory location for a second predetermined amount of time;
- set the exclusive bit responsive to an attempt to obtain an exclusive lease to the first memory location, wherein the attempt is made within the second predetermined period of time;
- deny the attempt to obtain the exclusive lease;
- attempt to extend the shared lease to the first memory location, wherein the attempt is made within the second predetermined period of time;
- deny the attempt to extend the shared lease when the exclusive bit associated with the shared lease is set;
- and
- release the shared lease after the second predetermined amount of time.
A computer system, comprising:
- at least one processor;
- a shared memory operatively connected to the at least one processor and comprising at least a first memory location and a second memory location shared by a plurality of processes;
- and
- a controller configured to:
- obtain a shared lease to the first memory location for a first predetermined period of time,
- wherein a first value in the first memory location is used to calculate a second value,
- wherein the second value is stored in the second memory location, and
- wherein an exclusive bit associated with the shared lease is not set;
- extend the shared lease to the first memory location for a second predetermined amount of time;
- set the exclusive bit responsive to an attempt to obtain an exclusive lease to the first memory location, wherein the attempt is made within the second predetermined period of time;
- deny the attempt to obtain the exclusive lease;
- attempt to extend the shared lease to the first memory location, wherein the attempt is made within the second predetermined period of time;
- deny the attempt to extend the shared lease when the exclusive bit associated with the shared lease is set;
- and
- release the shared lease after the second predetermined amount of time.
Dependencies are inferred from the claim text.