WO1991020039A1 - Method and apparatus for a load and flag instruction - Google Patents

Method and apparatus for a load and flag instruction Download PDF

Info

Publication number
WO1991020039A1
WO1991020039A1 PCT/US1991/004059 US9104059W WO9120039A1 WO 1991020039 A1 WO1991020039 A1 WO 1991020039A1 US 9104059 W US9104059 W US 9104059W WO 9120039 A1 WO9120039 A1 WO 9120039A1
Authority
WO
WIPO (PCT)
Prior art keywords
memory
resource
load
address
request
Prior art date
Application number
PCT/US1991/004059
Other languages
French (fr)
Inventor
Roger E. Eckert
Richard E. Hessel
Andrew E. Phelps
George A. Spix
Jimmie R. Wilson
Original Assignee
Supercomputer Systems Limited Partnership
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Supercomputer Systems Limited Partnership filed Critical Supercomputer Systems Limited Partnership
Publication of WO1991020039A1 publication Critical patent/WO1991020039A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30076Arrangements for executing specific machine instructions to perform miscellaneous control operations, e.g. NOP
    • G06F9/30087Synchronisation or serialisation instructions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3004Arrangements for executing specific machine instructions to perform operations on memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/52Indexing scheme relating to G06F9/52
    • G06F2209/521Atomic

Definitions

  • This invention relates generally to the field of memory systems and memory management for computer and electronic logic systems. More particularly, the present invention relates to a method and apparatus for providing a resource lockout mechanism through execution of a load and flag instruction on a memory location. The resource lockout is accomplished by performing both a read and write operation to the same memory location during the same memory operating cycle.
  • MULTIPROCESSOR SYSTEM PCT Serial No. PCT/US90/07655 describes a new cluster architecture for high-speed computer processing systems, referred to as supercomputers.
  • supercomputers For most supercomputer applications, the objective is to provide a computer processing system with the fastest processing speed and the greatest processing flexibility, i.e., the ability to process a large variety of traditional application programs.
  • the cluster architecture for highly parallel multiprocessors described in the previously identified parent application provides an architecture for supercomputers wherein a multiple number of processors and external interface means can make multiple and simultaneous requests to a common set of shared hardware resources, such as main memory, secondary memory, global registers, interrupt mechanisms, or other shared resources present in the system.
  • resource lockout mechanism must not only work with the registers and interrupt hardware for the system, it must also work on all of the locations of main memory.
  • the resource lockout mechanism must operate in a distributed environment where there is no central scheduler and where requestors other than processors (e.g., a distributed I/O controller) are also allowed direct access to shared resources without processor intervention.
  • a new method and apparatus is needed that provides for an indication to all other requestors in the multiprocessor system when a particular shared resource is being utilized.
  • a new method and apparatus is needed for requestors to manage their own requests for shared resource access, responsive to an indication that a resource is or is not available.
  • the present invention is a method and apparatus for providing a resource lockout mechanism in a shared resource, multiple requestor system that is capable of performing both a read and write function during the same resource operation.
  • the present invention comprises a load and flag instruction that can execute a read operation, immediately followed by a write operation of a preselected flag value to the same resource location during the same resource operating cycle.
  • the preselected flag value is one that is recognized by the requestors as not being valid data, thus indicating to the requestor that the resource they attempted to read from is locked.
  • the present invention can operate on every memory location in main memory in a multiprocessor or a distributed I/O environment that has fully distributed and democratic access to all shared resources by all possible requestors.
  • the load and flag instruction is initiated by presenting both an address to a targeted memory location in a memory bank, along with a delayed write pulse.
  • the write pulse is delayed just long enough to allow the data to be read from the targeted memory location, after which the write pulse overwrites a preselected flag value into the targeted memory location.
  • the memory bank of the present invention is provided with both load data and store data ports that allow a given operation access to read and write data paths to memory locations in the memory bank respectively.
  • the preselected flag value is placed on the store data port and the data value in the targeted memory location is accessed in the memory bank and placed onto the load port.
  • the load and flag instruction is completed during a single memory operation, thereby making the present invention an atomic operation, i.e., an operation that is an uninterruptable one-step process.
  • One of the more useful applications of the present invention is as a resource lockout mechanism for use in Monte Carlo applications.
  • Monte Carlo refers to the random nature of the requested memory addresses created by certain applications as the application attempts to update various memory locations determined by pseudo-random techniques.
  • the preselected flag value is chosen to be a floating point not-a-number (NaN) value.
  • NaN floating point not-a-number
  • the various processors in a multiprocessor or distributed I/O system running a Monte Carlo application can quickly and easily determine whether any given random memory access has encountered a memory location that is subject to resource lockout because another requestor is presently updating that memory location.
  • the present invention allows the processor to continue processing in a pipelined fashion without interrupting the Monte Carlo process because a resource lockout was encountered. Instead, the processor notes the flagged location and returns to request that memory location again at a later time.
  • a further objective of the present invention is to provide a load and flag instruction that can execute a read operation, followed by a write operation of a preselected flag value to the same memory location as an atomic memory operation.
  • Still another objective of the present invention is to provide a resource lockout mechanism that can effectively indicate memory lockout conditions for a multiprocessor Monte Carlo application in such a way as to allow continued pipelined processing of the Monte Carlo application.
  • Fig. 1 is a block diagram of a multiprocessor memory system incorporating the load and flag instruction.
  • Fig. 2 is a timing diagram for the load, store, and load and flag
  • the load and flag instruction of the present invention is accomplished by issuing a load and flag command operation to a location in the main memory.
  • Logic at the selected memory bank of the main memory interprets this command operation as a read of the data value in the memory location, followed by a write of a predefined flag value to the memory location. Because the address for the memory location is set up prior to the issue of the write of the predefined flag value, this logic can read the data currently at the memory location prior to issuing the write operation as part of a single atomic memory operation. The data value that is read is returned to the requestor using the normal read mechanisms.
  • FIG. 1 shows a multiprocessor memory system, having M processors 10 that may issue memory requests.
  • Each of the processors 10 has a two-bit command that is part of a memory instruction which specifies the type of memory operation occurring: no-op, store to memory, load from memory, and load and flag.
  • no-op the type of memory operation occurring: no-op
  • store to memory the type of memory operation occurring: no-op
  • load from memory load from memory
  • load and flag load and flag.
  • the embodiment shown in Fig. 1 will be described in terms of requests issued by a processor 10 to main memory, it will be understood that in the preferred embodiment, other requestors, such as an input/ output controller may also make similar memory requests.
  • the multiple requestors need not be physically distinct, but may be multiple logical requestors from a single physical source, such as in time division multiplexing.
  • a processor 10 When a processor 10 has a request to memory, it generates a command, an address and store data to an arbitration network 30.
  • the arbitration network 30 is used as a steering mechanism for the memory request.
  • the arbitration network 30 for each memory bank 20 selects which processor 10 will have access to the bank 20.
  • the arbitration network 30 is described in terms of a switching mechanism, it will be understood that the present invention would also work with a system of multiplexers having any number of mechanisms for resolving conflicting requests, such as FIFO systems, revolving switches, etc.
  • a bank cycle control means 40 accepts the memory command inputs, decodes the memory command and starts an operation on the memory bank 20.
  • the bank cycle control means 40 is used to keep track of the state of the memory bank 20 as the operation progresses.
  • the bank cycle control means 40 also maintains a busy condition for the memory bank 20.
  • a set of multiplexers 50 provide the processors 10 with a bank busy signal, thereby allowing the processors 10 to examine which memory banks 20 are busy and which are not.
  • This mechanism 50 is strictly a hardware interlock means that is used to prevent the processors 10 from overrunning the bank cycle control 40.
  • a switching mechanism 60 For load and loadf operation, a switching mechanism 60 enables load data to be returned from the memory banks 20 to the processors 10.
  • the switching mechanism 60 is implemented using a single multiplexer per processor 10 which selects data from the appropriate memory bank 20.
  • the predetermined flag value is loaded onto the store data lines for the appropriate memory bank 20 by using the switching mechanism 30.
  • the switching mechanism 30 selects a predetermined flag value stored in a memory or latch associated with the switching mechanism 30 and loads the predetermined flag value on the store data lines.
  • the processor 10 could load a predetermined flag value onto the store data lines for the appropriate memory bank 20 in the same manner as performed by the switching mechanism.
  • a floating point not-a-number (NaN) number is defined as the predefined flag value.
  • the floating point NaN value chosen is a value that has the least possibility of interfering with useful data patterns.
  • the value used for the flag value is hexadecimal (FFF4000000000000).
  • FFF4000000000000 When interpreted as a signed integer the value is a very large negative number, specifically, -3,377,699,720,527,872.
  • an unsigned integer the value is a very large positive number, specifically, 18,443,366,373,989,023,744.
  • the load and flag command requires a slightly longer interval to complete than the load or store commands.
  • the WR ENABLE signal is asserted by the bank cycle control means 40 a fixed amount of time after the start of the load and flag operation. This amount of time is the minimum amount necessary to ensure that the load data has been accessed from the memory bank 20 and captured by the switching mechanism 60.
  • the load and flag mechanism of the present invention is an atomic memory operation that simultaneously returns the current value of a memory location and stores a predefined pattern in its place.
  • the preferred embodiment of the load and flag instruction in accordance with the present invention is set forth as the loadf instruction in Appendix A.
  • the loadf instruction can be used as a method for synchronizing shared memory variables in a multiprocessor application.
  • the loadf instruction operates somewhat like a self-setting semaphore register.
  • a first requestor uses the loadf instruction to retrieve a shared data item that is held in a given memory location, that requestor reads the value in the memory location and then locks the memory location by writing the preselected flag value in mat location. In essence, this memory location is now checked out to the requestor who issued the loadf instruction. When other requestors attempt to access the data in this memory location, they are locked out from the memory location because they will retrieve the preselected flag value and not the data associated with that memory location.
  • each memory location is treated as an independent resource in that the memory location can be locked without affecting other memory locations.
  • the original data value "stored" in the memory location is not actually present in the memory location for the duration of the flagged operation.
  • the only copy of the data value is the copy in the processor or requestor that first retrieved the data using the loadf instruction.
  • the load and flag mechanism can also be used as a method of pipelining memory references with conflicts. This applies to both vector and parallel codes.
  • the load and flag mechanism especially provides a solution to the problem of how to vectorize random access to memory while sustaining the memory pipeline.
  • the load and flag mechanism By providing the software running in a multiprocessor environment with a predefined flag value that indicates when a memory location is presently being used by another requestor, the load and flag mechanism supports distributed control over resource lockout. In this manner, the load and flag mechanism provides a powerful means for multithreading, vectorizing, and pipelining of traditionally scalar "Monte Carlo" applications.
  • the term “Monte Carlo” refers to the random nature of the requested memory address stream created by these applications as they attempt to update various memory locations determined by pseudo-random techniques. In prior art, this random address stream prevented the use of pipelines, vectorization, and multithreading because address conflicts might occur. In this invention, the load and flag mechanism does not eliminate these conflicts, rather it supports pipelining of the detection and processing of these conflicts. Because the software running in a multiprocessor can detect when a resource conflict occurred, the hardware does not have to stop the pipeline in order to resolve these conflicts.
  • memory conflicts for a pipelined application can occur when only a single processor is working on an application, as well as when multiple processors are working on the application.
  • the present invention operates as a self- checking resource lockout mechanism to prevent one part of the application from getting ahead of another part of the application.
  • Sk contains a signed number which is added to the address after each element is loaded to form the address of the next load.
  • element e will load from address (sj) + (e * (sk)) and then write FFF4000000000000 into that address.
  • Elements O through (VL)- 1 will be loaded.
  • the VS and VM registers have no effect on this operation.
  • Time to completion Load port busy TBD + (VL) cycles. Vi reserved for writing: TBD + (VL) cycles. Vi reserved for reading: at least TBD cycles. Sj, sk to be read or written: One cycle.
  • Si may be used as an operand: At least TBD cycles, depending on memory conflicts.
  • an Operand Range Error will set Si to NaN and may optionally cause an exception.
  • Element e will load from address (sj) + q + e.
  • TBD + (VL) cycles Vi reserved for reading: at least TBD cycles.
  • Operand Range Error will set that element to NaN and may optionally cause an exception.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)

Abstract

A method and apparatus for providing a resource lockout mechanism in a shared memory, multiprocessor system (10) that is capable of performing both a read and write operation during the same memory operation. The load and flag instruction (load f) 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.

Description

METHOD AND APPARATUS FOR A
LOAD AND FLAG INSTRUCTION
TECHNICAL FIELD This invention relates generally to the field of memory systems and memory management for computer and electronic logic systems. More particularly, the present invention relates to a method and apparatus for providing a resource lockout mechanism through execution of a load and flag instruction on a memory location. The resource lockout is accomplished by performing both a read and write operation to the same memory location during the same memory operating cycle.
BACKGROUND ART
The previously filed parent application entitled CLUSTER ARCHITECTURE FOR A HIGHLY PARALLEL SCALAR/VECTOR
MULTIPROCESSOR SYSTEM, PCT Serial No. PCT/US90/07655 describes a new cluster architecture for high-speed computer processing systems, referred to as supercomputers. For most supercomputer applications, the objective is to provide a computer processing system with the fastest processing speed and the greatest processing flexibility, i.e., the ability to process a large variety of traditional application programs. In an effort to increase the processing speed and flexibility of supercomputers, the cluster architecture for highly parallel multiprocessors described in the previously identified parent application provides an architecture for supercomputers wherein a multiple number of processors and external interface means can make multiple and simultaneous requests to a common set of shared hardware resources, such as main memory, secondary memory, global registers, interrupt mechanisms, or other shared resources present in the system.
One of the important considerations in designing such shared resource multiprocessor systems, is how to indicate that a particular resource is presently being used by one of the processors and to provide a resource lockout mechanism so that another processor does not simultaneously use the same resource. The problem of resource lockout is further compounded by two additional factors associated with the cluster architecture for highly parallel multiprocessors that is described in the parent application identified above. First, the resource lockout mechanism must not only work with the registers and interrupt hardware for the system, it must also work on all of the locations of main memory. Second, the resource lockout mechanism must operate in a distributed environment where there is no central scheduler and where requestors other than processors (e.g., a distributed I/O controller) are also allowed direct access to shared resources without processor intervention.
In essence, the problem of resource lockout has been managed in prior art supercomputers by assigning a single, central scheduling processor to keep track of what resources are currently being used by which processor. In a distributed access architecture, access to all shared resources is equal and democratic and there is no central scheduler. Hence, each requestor to a common shared resource must be provided with the information necessary to determine whether that resource is presently being used by another requestor in the multiprocessor system. Present methods and systems for resource lockout mechanism for use in a shared memory, multiprocessor environment do not allow for fully distributed and democratic access to the common shared main memory by all of the possible requestors in the multiprocessor environment. Consequently, a new method and apparatus is needed that provides for an indication to all other requestors in the multiprocessor system when a particular shared resource is being utilized. In addition, a new method and apparatus is needed for requestors to manage their own requests for shared resource access, responsive to an indication that a resource is or is not available.
SUMMARY OF THE INVENTION
The present invention is a method and apparatus for providing a resource lockout mechanism in a shared resource, multiple requestor system that is capable of performing both a read and write function during the same resource operation. The present invention comprises a load and flag instruction that can execute a read operation, immediately followed by a write operation of a preselected flag value to the same resource location during the same resource operating cycle. The preselected flag value is one that is recognized by the requestors as not being valid data, thus indicating to the requestor that the resource they attempted to read from is locked. Unlike prior art resource lockout mechanisms, the present invention can operate on every memory location in main memory in a multiprocessor or a distributed I/O environment that has fully distributed and democratic access to all shared resources by all possible requestors.
In a preferred embodiment, the load and flag instruction is initiated by presenting both an address to a targeted memory location in a memory bank, along with a delayed write pulse. The write pulse is delayed just long enough to allow the data to be read from the targeted memory location, after which the write pulse overwrites a preselected flag value into the targeted memory location. The memory bank of the present invention is provided with both load data and store data ports that allow a given operation access to read and write data paths to memory locations in the memory bank respectively. During the load and flag operation, the preselected flag value is placed on the store data port and the data value in the targeted memory location is accessed in the memory bank and placed onto the load port. By controlling the timing signals that are being presented to the memory by the bank cycle control logic, the load and flag instruction is completed during a single memory operation, thereby making the present invention an atomic operation, i.e., an operation that is an uninterruptable one-step process.
One of the more useful applications of the present invention is as a resource lockout mechanism for use in Monte Carlo applications. The term Monte Carlo refers to the random nature of the requested memory addresses created by certain applications as the application attempts to update various memory locations determined by pseudo-random techniques. In the preferred embodiment, the preselected flag value is chosen to be a floating point not-a-number (NaN) value. As the NaN value is not a valid number for purposes of the Monte Carlo application, the various processors in a multiprocessor or distributed I/O system running a Monte Carlo application can quickly and easily determine whether any given random memory access has encountered a memory location that is subject to resource lockout because another requestor is presently updating that memory location. Because Monte Carlo operations are most efficiently performed as a pipeline or vector operation, the present invention allows the processor to continue processing in a pipelined fashion without interrupting the Monte Carlo process because a resource lockout was encountered. Instead, the processor notes the flagged location and returns to request that memory location again at a later time.
An objective of the present invention is to provide a method and apparatus for a resource lockout mechanism in a shared resource, multiple requestor system that is capable of performing both a read function and a write function as a single operation. Another objective of the present invention is to provide a resource lockout mechanism that can operate on every memory location in main memory in a multiprocessor or distributed I/O environment that has fully distributed and democratic access to all shared resources by all possible requestors. A further objective of the present invention is to provide a load and flag instruction that can execute a read operation, followed by a write operation of a preselected flag value to the same memory location as an atomic memory operation.
Still another objective of the present invention is to provide a resource lockout mechanism that can effectively indicate memory lockout conditions for a multiprocessor Monte Carlo application in such a way as to allow continued pipelined processing of the Monte Carlo application.
These and other objectives of the present invention will become apparent with reference to the drawings, the detailed description of the preferred embodiment and the appended claims.
DESCRIPTION OF THE DRAWINGS
Fig. 1 is a block diagram of a multiprocessor memory system incorporating the load and flag instruction. Fig. 2 is a timing diagram for the load, store, and load and flag
(loadf) instructions as executed in the multiprocessor memory system of Fig. l. DESCRIPTION OF THE PREFERRED EMBODIMENT
In the preferred embodiment, the load and flag instruction of the present invention is accomplished by issuing a load and flag command operation to a location in the main memory. Logic at the selected memory bank of the main memory interprets this command operation as a read of the data value in the memory location, followed by a write of a predefined flag value to the memory location. Because the address for the memory location is set up prior to the issue of the write of the predefined flag value, this logic can read the data currently at the memory location prior to issuing the write operation as part of a single atomic memory operation. The data value that is read is returned to the requestor using the normal read mechanisms.
Referring now to Fig. 1, one embodiment of the present invention will be described. Fig. 1 shows a multiprocessor memory system, having M processors 10 that may issue memory requests. Each of the processors 10 has a two-bit command that is part of a memory instruction which specifies the type of memory operation occurring: no-op, store to memory, load from memory, and load and flag. Although the embodiment shown in Fig. 1 will be described in terms of requests issued by a processor 10 to main memory, it will be understood that in the preferred embodiment, other requestors, such as an input/ output controller may also make similar memory requests. It will also be understood that the multiple requestors need not be physically distinct, but may be multiple logical requestors from a single physical source, such as in time division multiplexing.
When a processor 10 has a request to memory, it generates a command, an address and store data to an arbitration network 30. The arbitration network 30 is used as a steering mechanism for the memory request. The arbitration network 30 for each memory bank 20 selects which processor 10 will have access to the bank 20. For a more detailed description of the operation of the arbitration network 30 of the preferred embodiment, reference is made to the previously identified parent application. Although the arbitration network 30 is described in terms of a switching mechanism, it will be understood that the present invention would also work with a system of multiplexers having any number of mechanisms for resolving conflicting requests, such as FIFO systems, revolving switches, etc.
Once the memory instruction is presented to the proper memory bank 20, a bank cycle control means 40 accepts the memory command inputs, decodes the memory command and starts an operation on the memory bank 20. The bank cycle control means 40 is used to keep track of the state of the memory bank 20 as the operation progresses. The bank cycle control means 40 also maintains a busy condition for the memory bank 20. In the embodiment shown in Fig. 1, a set of multiplexers 50 provide the processors 10 with a bank busy signal, thereby allowing the processors 10 to examine which memory banks 20 are busy and which are not. This mechanism 50 is strictly a hardware interlock means that is used to prevent the processors 10 from overrunning the bank cycle control 40.
For load and loadf operation, a switching mechanism 60 enables load data to be returned from the memory banks 20 to the processors 10. In the embodiment shown in Fig. 1, the switching mechanism 60 is implemented using a single multiplexer per processor 10 which selects data from the appropriate memory bank 20.
In the preferred embodiment, the predetermined flag value is loaded onto the store data lines for the appropriate memory bank 20 by using the switching mechanism 30. In response to the loadf instruction decode, the switching mechanism 30 selects a predetermined flag value stored in a memory or latch associated with the switching mechanism 30 and loads the predetermined flag value on the store data lines. In an alternate embodiment, the processor 10 could load a predetermined flag value onto the store data lines for the appropriate memory bank 20 in the same manner as performed by the switching mechanism.
In the preferred embodiment of the load and flag command, a floating point not-a-number (NaN) number is defined as the predefined flag value. The floating point NaN value chosen is a value that has the least possibility of interfering with useful data patterns. In the preferred embodiment, the value used for the flag value is hexadecimal (FFF4000000000000). When interpreted as a signed integer the value is a very large negative number, specifically, -3,377,699,720,527,872. When interpreted as an unsigned integer, the value is a very large positive number, specifically, 18,443,366,373,989,023,744. Referring now to Fig. 2, the relative timing of the memory operations for the load, store, and load and flag commands of the present invention are shown. As shown, the load and flag command requires a slightly longer interval to complete than the load or store commands. In the preferred embodiment, the WR ENABLE signal is asserted by the bank cycle control means 40 a fixed amount of time after the start of the load and flag operation. This amount of time is the minimum amount necessary to ensure that the load data has been accessed from the memory bank 20 and captured by the switching mechanism 60. The load and flag mechanism of the present invention is an atomic memory operation that simultaneously returns the current value of a memory location and stores a predefined pattern in its place. The preferred embodiment of the load and flag instruction in accordance with the present invention is set forth as the loadf instruction in Appendix A. The loadf instruction can be used as a method for synchronizing shared memory variables in a multiprocessor application.
In use, the loadf instruction operates somewhat like a self-setting semaphore register. When a first requestor uses the loadf instruction to retrieve a shared data item that is held in a given memory location, that requestor reads the value in the memory location and then locks the memory location by writing the preselected flag value in mat location. In essence, this memory location is now checked out to the requestor who issued the loadf instruction. When other requestors attempt to access the data in this memory location, they are locked out from the memory location because they will retrieve the preselected flag value and not the data associated with that memory location. When the original requestor is finished with the data associated with the flagged location, a subsequent store is issued to the flagged location, loading the data back into the memory location, which also serves to "clear", i.e., unlock, the resource. It will be observed that in this embodiment of the present invention, each memory location is treated as an independent resource in that the memory location can be locked without affecting other memory locations.
It will also be observed that by using the loadf instruction, the original data value "stored" in the memory location is not actually present in the memory location for the duration of the flagged operation. During this time, the only copy of the data value is the copy in the processor or requestor that first retrieved the data using the loadf instruction. As the data value is generally updated or otherwise modified during the duration of the flagged operation, it will be recognized that the consequence of loss of significant data in the event of a system failure is negligible because the data is in the process of being updated. The load and flag mechanism can also be used as a method of pipelining memory references with conflicts. This applies to both vector and parallel codes. The load and flag mechanism especially provides a solution to the problem of how to vectorize random access to memory while sustaining the memory pipeline. By providing the software running in a multiprocessor environment with a predefined flag value that indicates when a memory location is presently being used by another requestor, the load and flag mechanism supports distributed control over resource lockout. In this manner, the load and flag mechanism provides a powerful means for multithreading, vectorizing, and pipelining of traditionally scalar "Monte Carlo" applications. The term "Monte Carlo" refers to the random nature of the requested memory address stream created by these applications as they attempt to update various memory locations determined by pseudo-random techniques. In prior art, this random address stream prevented the use of pipelines, vectorization, and multithreading because address conflicts might occur. In this invention, the load and flag mechanism does not eliminate these conflicts, rather it supports pipelining of the detection and processing of these conflicts. Because the software running in a multiprocessor can detect when a resource conflict occurred, the hardware does not have to stop the pipeline in order to resolve these conflicts.
It should be noted that memory conflicts for a pipelined application, such as a Monte Carlo application, can occur when only a single processor is working on an application, as well as when multiple processors are working on the application. In the event that a single processor makes a second request to a memory location before it has restored a new data value and, thereby, reset the flag, the present invention operates as a self- checking resource lockout mechanism to prevent one part of the application from getting ahead of another part of the application.
Appendix A
LOADF (v+s) vb6 π JJ kk Gather Vi from Main Memory, addresses from Vj and Sk
Assembly syntax loadf (vj+sk) vi
Hold issue Sk reserved, conditions
Hold init conditions Vj reserved for reading.
Vi reserved for writing.
Memory vector load port unavailable.
VL or VS reserved.
Scatter/Gather address port unavailable.
Function Load each element of vi from main memory from the address in (sk) plus the corresponding element of vj and then write FFF4000000000000 into that memory location. Elements O through (VL)- 1 will be loaded. VM has no effect on this operation.
Time to completion Load port busy, and scatter/gather address port busy: TBD + (VL) cycles.
Vi reserved for reading: TBD.
Vi reserved for writing: TBD + (VL) cycles.
Sk to be read or written: One cycle.
Exceptions If any of the (VL) addresses are not mapped, an Operand Range Error will set that element to NaN and may optionally cause an exception.
Comments The VS register affects the address vector but not the data vector. LOADF (v+q) v b7πjjqq
Gather Vi from Main Memory, addresses from Vj plus constant Assembly syntax loadf (vj+q) vi
Where q is a signed 8-bit number.
Hold issue None conditions
Hold init conditions Vj reserved for reading.
Vi reserved for writing.
Memory vector load port unavailable.
VL or VS reserved.
Scatter/Gather address port unavailable.
Function Load each element of vi from main memory from the address q plus the corresponding element of vj and then write FFF4000000000 into that memory location. Elements O through (VL)- 1 will be loaded. VM has no effect on this operation.
Time to completion Load port busy, and scatter/gather address port busy: TBD + (VL) cycles.
Vi reserved for reading: TBD.
Vi reserved for writing: TBD + (VL) cycles.
Exceptions If any of the (VL) addresses are not mapped, an Operand Range Error will set that element to NaN and may optionally cause an exception.
Comments The VS register affects the address vector but not the data vector. LOADF (s),sv bδlljj kk
Load Vi from Main Memory, address (sj), stride (sk) Assembly syntax loadf (s/),sfc vi
Hold issue Sj, sk reserved, conditions
Hold init conditions Vi reserved for writing.
Memory vector load port unavailable.
VL reserved.
Function Load (vi) from main memory at address (sj) and then write FFF4000000000000 into that memory location.
Sk contains a signed number which is added to the address after each element is loaded to form the address of the next load. Thus element e will load from address (sj) + (e * (sk)) and then write FFF4000000000000 into that address. Elements O through (VL)- 1 will be loaded. The VS and VM registers have no effect on this operation.
Time to completion Load port busy: TBD + (VL) cycles. Vi reserved for writing: TBD + (VL) cycles. Vi reserved for reading: at least TBD cycles. Sj, sk to be read or written: One cycle.
Exceptions If any of the (VL) addresses are not mapped, an Operand Range Error will set that element to NaN and may optionally cause an exception. LOADF (s+q)s D9 U j j xx
Load Si from Main Memory, address (sj) + q
Assembly syntax loadf (sj q si
Hold issue Si, sj reserved conditions Memory scalar load port unavailable. Function Load (si) from main memory at address (sj) + q and then write FFF4000000000000 into that memory location.
Time to completion Load port busy: One cycle.
Si may be used as an operand: At least TBD cycles, depending on memory conflicts.
Exceptions If the address is not mapped, an Operand Range Error will set Si to NaN and may optionally cause an exception.
LOADF (s+q) v b9Hjjkk
Load Vi from Main Memory, address (sj)+q, stride 1
Assembly syntax loadf (sj)+ q vi Where q is an 8-bit signed number.
Hold issue Sj reserved, conditions
Hold init conditions Vi reserved for writing.
Memory vector load port unavailable. VL reserved.
Function Load (vi) from main memory at address (sj) + q, stride 1.
Element e will load from address (sj) + q + e.
After each read, write FFF4000000000000 to that location.
Elements O through (VLH will be loaded. The
VS and VM registers have no effect on this operation.
Time to completion Load port busy: TBD + (VL) cycles.
Vi reserved for writing: TBD + (VL) cycles. Vi reserved for reading: at least TBD cycles. Sj to be read or written: One cycle.
Exceptions If any of the (VL) addresses are not mapped, an
Operand Range Error will set that element to NaN and may optionally cause an exception.
Although the description of the preferred embodiment has been presented, it is contemplated that various changes could be made without deviating from the spirit of the present invention. Accordingly, it is intended that the scope of the present invention be dictated by the appended claims rather than by the description of the preferred embodiment.
We claim:

Claims

CLAIMS 1. A method for providing a resource lockout mechanism in a shared resource for a multiple requestor system comprising the steps of:
(a) in response to a resource request, routing the request to a resource as requested by an address of the resource request;
(b) decoding a command in the resource request to determine if the command is for an atomic read and write resource operation; and
(c) if the command is for the atomic read and write resource operation, issuing a read operation to the resource, followed by a write operation to the resource as part of the same resource operation, wherein a data value stored in the resource is returned to the requestor, and a predefined flag value is written into the resource.
2. A method for providing a resource lockout mechanism in a shared memory for a multiprocessor system comprising the steps of:
(a) in response to a memory request, routing the memory request to a memory bank in the shared memory as requested by an address in the memory request; (b) decoding a command in the memory request to determine if the command is for an atomic read and write memory operation; and (c) if the command is for the atomic read and write memory operation, issuing a read operation to the address in the memory bank, followed by a write operation to the same address in the memory bank as part of the same memory operation, wherein a data value stored at the address is returned to the processor and a predefined flag value is written into the memory at the address.
3. The method of claim 1 wherein the predefined flag value is a floating point not-a-number value.
4. The method of claim 1 wherein step (c) comprises the following substeps: (cO) issuing a bank busy signal for the memory bank;
(cl) placing the address on an address line for the memory bank; (c2) placing the predefined flag value on a store data bus for the memory bank; (c3) reading the data value onto a load data bus for the memory bank; (c4) issuing a write enable signal to the memory bank; and
(c5) clearing the bank busy signal to the value associated with any subsequent reference.
5. A resource lockout mechanism for a shared memory in a multiprocessor system, wherein each of a plurality of requestors in the multiprocessor system includes means for issuing a memory request, the memory request having means for identifying the type of memory operation being issued, and wherein the shared memory comprises a plurality of memory banks, each memory bank having switching means associated therewith for routing the memory request to the requested memory bank and separate store port means and load port means for providing data access to and from the memory bank, the resource lockout mechanism comprising: address means operably connected to each memory bank for receiving an address for a memory location in the memory bank as part of the memory request and for placing the address on an address port for the memory bank; control means operably connected to each memory bank for generating a plurality of control signals to the memory bank in response to the memory request, including: means for issuing a load operation to the memory bank in response to a load request; means for issuing a store operation to the memory bank in response to a store request and for placing a data value to be stored at the address on the store port means; and means for issuing both a load and a store operation to the memory bank in response to a load and flag request and for placing a predefined flag value to be stored at the address on the store port means, the load and store operation being issued such that the write enable signal is delayed until after the load operation has caused a data value stored at the address to be placed on the load port means.
6. The resource lockout mechanism of daim 4 wherein the predefined flag value is a floating point not-a-number value.
7. A resource lockout mechanism for a shared memory wherein a plurality of requestors may each request access to a preselected memory location in the shared memory, comprising: a load and flag command for issuing in a single memory cyde a load memory operation for providing the data in the selected memory location to the first requestor requesting access to the memory location, and a store command for storing during the same memory operating cyde a predetermined flag value so that subsequent requestors cannot access the data in the selected memory location while it is being utilized by the first requestor.
PCT/US1991/004059 1990-06-11 1991-06-10 Method and apparatus for a load and flag instruction WO1991020039A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US53621790A 1990-06-11 1990-06-11
US536,217 1990-06-11

Publications (1)

Publication Number Publication Date
WO1991020039A1 true WO1991020039A1 (en) 1991-12-26

Family

ID=24137636

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US1991/004059 WO1991020039A1 (en) 1990-06-11 1991-06-10 Method and apparatus for a load and flag instruction

Country Status (2)

Country Link
JP (1) JPH05508496A (en)
WO (1) WO1991020039A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE4421229A1 (en) * 1994-06-17 1996-01-11 Siemens Ag Access to data held in common memory by multiprocessor system
EP0913767A2 (en) * 1997-11-03 1999-05-06 Motorola, Inc. A method and apparatus for affecting subsequent instruction processing in a data processor

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4123795A (en) * 1971-09-07 1978-10-31 Texas Instruments Incorporated Control system for a stored program multiprocessor computer
US4399504A (en) * 1980-10-06 1983-08-16 International Business Machines Corporation Method and means for the sharing of data resources in a multiprocessing, multiprogramming environment
US4604694A (en) * 1983-12-14 1986-08-05 International Business Machines Corporation Shared and exclusive access control
US4794516A (en) * 1985-10-31 1988-12-27 International Business Machines Corporation Method and apparatus for communicating data between a host and a plurality of parallel processors
US4837676A (en) * 1984-11-05 1989-06-06 Hughes Aircraft Company MIMD instruction flow computer architecture
US4847754A (en) * 1985-10-15 1989-07-11 International Business Machines Corporation Extended atomic operations

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4123795A (en) * 1971-09-07 1978-10-31 Texas Instruments Incorporated Control system for a stored program multiprocessor computer
US4399504A (en) * 1980-10-06 1983-08-16 International Business Machines Corporation Method and means for the sharing of data resources in a multiprocessing, multiprogramming environment
US4604694A (en) * 1983-12-14 1986-08-05 International Business Machines Corporation Shared and exclusive access control
US4837676A (en) * 1984-11-05 1989-06-06 Hughes Aircraft Company MIMD instruction flow computer architecture
US4847754A (en) * 1985-10-15 1989-07-11 International Business Machines Corporation Extended atomic operations
US4794516A (en) * 1985-10-31 1988-12-27 International Business Machines Corporation Method and apparatus for communicating data between a host and a plurality of parallel processors

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
K. HWANG et al., "Computer Architecture and Parallel Processing", Published by MCGRAW HILL, in 1984, see pages 526-528, and 565-572. *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE4421229A1 (en) * 1994-06-17 1996-01-11 Siemens Ag Access to data held in common memory by multiprocessor system
EP0913767A2 (en) * 1997-11-03 1999-05-06 Motorola, Inc. A method and apparatus for affecting subsequent instruction processing in a data processor
EP0913767A3 (en) * 1997-11-03 2000-01-26 Motorola, Inc. A method and apparatus for affecting subsequent instruction processing in a data processor
US6237089B1 (en) 1997-11-03 2001-05-22 Motorola Inc. Method and apparatus for affecting subsequent instruction processing in a data processor

Also Published As

Publication number Publication date
JPH05508496A (en) 1993-11-25

Similar Documents

Publication Publication Date Title
US5499356A (en) Method and apparatus for a multiprocessor resource lockout instruction
US6141734A (en) Method and apparatus for optimizing the performance of LDxL and STxC interlock instructions in the context of a write invalidate protocol
Dubois et al. Memory access buffering in multiprocessors
Dubois et al. Memory access dependencies in shared-memory multiprocessors
US6466988B1 (en) Multiprocessor synchronization and coherency control system
CA1322058C (en) Multi-processor computer systems having shared memory and private cache memories
JP5404574B2 (en) Transaction-based shared data operations in a multiprocessor environment
US5421022A (en) Apparatus and method for speculatively executing instructions in a computer system
US5381536A (en) Method and apparatus for separate mark and wait instructions for processors having multiple memory ports
JP3209205B2 (en) Inherit device of register contents in processor
EP0432075B1 (en) Multiprocessor with relatively atomic instructions
US5257354A (en) System for monitoring and undoing execution of instructions beyond a serialization point upon occurrence of in-correct results
JP3701814B2 (en) Multiprocessor system and system serialization method thereof
JP2937485B2 (en) Method and apparatus for detecting and executing traps in a superscalar processor
US5428807A (en) Method and apparatus for propagating exception conditions of a computer system
JP2005141780A (en) Computer system
EP0372751B1 (en) Pipelined data-processing apparatus
JP2003029986A (en) Inter-processor register succeeding method and device therefor
US20040123078A1 (en) Method and apparatus for processing a load-lock instruction using a scoreboard mechanism
KR100738777B1 (en) Coarse grained determination of data dependence between parallel executed jobs in an information processing system
JPH0622035B2 (en) Vector processor
KR100335744B1 (en) Load/load detection and reorder method
US5696939A (en) Apparatus and method using a semaphore buffer for semaphore instructions
JPH03116234A (en) Multi-processor system with a plurality of instruction sources
US6725365B1 (en) Branching in a computer system

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): JP KR

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): AT BE CH DE DK ES FR GB GR IT LU NL SE