Method and apparatus for a multiprocessor resource lockout instruction
AssigneeCray Research, Inc.
InventorsRoger E. Eckert, Richard E. Hessel, Andrew E. Phelps, George A. Spix, Jimmie R. Wilson
Life of this patent
Estimating the term…
Abstract
A method and apparatus for providing a resource lockout mechanism in a shared memory, multiprocessor system that is capable of performing both a read and write operation during the same memory operation. The load and flag instruction of the present invention can execute a read operation, followed by a write operation of a preselected flag value to the same memory location during the same memory operation. The load and flag instruction is particularly useful as a resource lockout mechanism for use in Monte Carlo applications.
Claims7
In a computer system a method of protecting data accessed by more than one requestor the method comprising the steps of:
- (a) defining a set of data values and a set of lock values, wherein the sets of data values and lock values are mutually exclusive;
- (b) reading a protected memory location, wherein the step of reading the protected memory location comprises atomically swapping a lock value selected from the set of lock values with information at the protected memory location;
- (c) determining whether the information read from the protected memory location is within the set of data values;
- and
- (d) if the information read from the protected memory location is within the set of data values, then operating on the information to form a result, else repeating steps (b)-(d).
A resource-lockout apparatus for a computer system having a shared memory, wherein a plurality of requestors may each request access to a selected memory location in the shared memory, and wherein a set of data values and a set of defined flag values are defined, wherein the set of data values and the set of defined flag values are mutually exclusive, the resource-lockout apparatus comprising:
- (a) means for atomically swapping a lock value selected from the set of lock values with information at the protected memory location;
- (b) means for determining whether the information read from the protected memory location is within the set of data values;
- (c) means for operating on the information to form a result if the information read from the protected memory location is within the set of data values;
- and
- (d) means for transferring control to means (a) if the information read from the protected memory location is not within the set of data values.
Dependencies are inferred from the claim text.