1. Field
The embodiments discussed herein are directed to procedure calling in a shared-memory multiprocessor.
2. Description of the Related Art
Generally, in a computer system, using plural processors, methods of performing parallel processing by a procedure call include a local procedure calling scheme and a remote procedure calling scheme.
This local procedure calling scheme has an advantage in that communication between the processors 2 and 3 can be performed at a high speed. However, since plural processors 2 and 3 use the same memory area, this scheme has a problem in that as the number of processors increases, conflicts in memory access increase memory access latency and improvements in computer processing efficiency become difficult. As this scheme requires a configuration for controlling coherence of a cache, there is also a problem in that this coherence control mechanism becomes complicated as the number of processors increases.
On the other hand, as shown in
However, in the remote procedure calling scheme, in order for the processor 8 in the client machine 5 to make the procedure call to the processor 10 in the server machine 6, the processor 8 in the client machine 5 must specify the address of the corresponding procedure in the memory 11 of the server machine 6. Since the client machine 5 and the server machine 6 are independent of each other, the processor 8 in the client machine 5 is not capable of knowing the corresponding address in the memory 11 in the server machine 6.
Accordingly, in the conventional remote procedure calling scheme, configuration is such that description about the hardware, such as the memory, is abstracted and the procedure to be called is specified by an identifier such as an ID number. In this case, such as the address space of the memory 11 in the server machine 6 shown in
In the remote procedure calling scheme, since communication between the machines 5 and 6 is performed using a network 7, the speed of communication between the processors 8 and 10 is considerably slow as compared with the case of using a local procedure calling scheme. Furthermore, on the server machine 6 side, since it is necessary to search for the address corresponding to the identifier such as the ID number, the procedure initiation processing takes time. This causes a problem, as shown in
The embodiments were conceived in light of the above and an object of the embodiments is to provide a procedure calling method in a shared-memory multiprocessor, whereby a remote procedure calling scheme is applied for communication between plural processors sharing memory and the procedure calling method is capable of reducing memory utilization in a server machine and of improving procedure initiation processing speed. Another object of the embodiments is to provide a procedure calling program that causes a computer to execute such a procedure calling method and a computer-readable recording medium on which such a program is recorded.
It is an aspect of the embodiments discussed herein to provide a procedure calling method in a shared-memory multiprocessor having processors that are capable of inter-processor communication using a bus, share a memory and each have an address space that is respectively independent in the memory, whereby a first processor of the shared-memory multiprocessor makes a procedure call to a second processor thereof includes making the procedure call by the first processor specifying an address in the address space of the second processor; and initiating and executing, by the second processor, a procedure located at the address specified by the first processor.
According to another aspect of the embodiments, a procedure calling method in a shared-memory multiprocessor having processors that are capable of inter-processor communication using a bus, share a memory and each have an address space that is respectively independent in the memory, whereby a first processor of the shared-memory multiprocessor makes a procedure call to a second processor thereof includes specifying, by the first processor, an address in the address space of the second processor; and making the procedure call to the second processor by the first processor.
According to still another aspect of the embodiments, a procedure calling method in a shared-memory multiprocessor having processors that are capable of inter-processor communication using a bus, share a memory and each have an address space that is respectively independent in the memory, whereby a first processor of the shared-memory multiprocessor makes a procedure call to a second processor thereof includes reading, by the second processor, an address in the address space of the second processor and specified by the first processor; initiating, by the second processor, a procedure located at the address specified by the first processor; and executing, by the second processor, the procedure initiated.
The other objects, features, and advantages of the present invention are specifically set forth in or will become apparent from the following detailed description of the invention when read in conjunction with the accompanying drawings.
With reference to the accompanying drawings, exemplary embodiments are explained in detail below. The present invention is not limited by the embodiments and the multiprocessor in the embodiments includes configurations in which plural processors are provided on one IC chip and in which among plural IC chips, one or more processors is/are provided on each of the IC chips.
This configuration enables a procedure call to be made by applying the remote procedure calling method between the first processor 22 and the second processor 23. For such a procedure call, it is not necessary to abstract an address of the memory by an identifier as is required in the conventional remote procedure calling scheme. Therefore, the first processor 22, by specifying an address of the address space 26 managed by the second processor 23, makes the remote procedure call by way of inter-processor communication hardware 27. The use of a bus for the inter-processor communication similarly enhances the speed of the communication between the processors as with a local procedure call.
Since the second processor 23 called by the procedure call is not required to search for the address corresponding to the identifier during procedure initiation processing, the time required for such processing is reduced. The higher communication speed and the shorter time for the procedure initiation processing shortens the initiation overhead from the first processor 22 making the procedure call to the second processor 23 until the second processor 23 initiates execution of the corresponding procedure, thereby enabling high speed initiation of the execution of the remote procedure.
Since a table indicating correspondence between the identifier and the address is not necessary, utilization of the shared memory 24 can be reduced. Furthermore, as the independence of the address spaces 25 and 26 simplifies control of cache memory coherence and control of memory access conflicts, processing efficiency of the computer is enhanced even if the number of processors sharing the same memory is increased to 3 or more.
The transmitting communication register 35 and the receiving communication register 36 are connected to inter-processor communication hardware 37 for data communication using a bus. This inter-processor communication hardware 37 for data communication has queued data buffers 38 provided therein and is designed so that plural data items can be communicated between the transmitting communication register 35 and the receiving communication register 36. The first processor 31 and the second processor 32 are connected to inter-processor communication hardware 39 for initiation notification using a bus.
Contents written to the transmitting communication register 35 are sequentially stored in data buffers 38 provided in the inter-processor communication hardware 37 for data communication. The address firstly stored in the data buffers 38 is transferred to and written to the receiving communication register 36 of the second processor 32. Then, the remote-procedure-call library 42 in the first processor 31 makes the procedure call to the second processor 32 (step S4).
The second processor 32, upon receipt of the procedure call from the first processor 31, stops the processing being executed (step S5). Then, the second processor 32 reads the address of the procedure from the receiving communication register 36 (step S6) and by doing so, the argument data stored in the data buffers 38 subsequent to the address is transferred to and written to the receiving communication register 36 of the second processor 32. The second processor 32 reads the argument data of the procedure from the receiving communication register 36 (step S7). By recursively performing this process, the second processor 32 reads all of the argument data. The second processor 32 sets the argument data read as arguments for the procedure (step S8), performs procedure initiation processing (step S9), and executes the procedure (step S10).
The remote-procedure-call library 42 of the first processor 31 makes the procedure call to the second processor 32 (step S13). The second processor 32, upon receipt of the procedure call from the first processor 31, stops the processing being executed (step S14). Then, the second processor 32 reads the address of the procedure from the receiving communication register 36 (step S15). The second processor 32 performs processing to initiate the procedure located at the address read (step S16) and executes the procedure (step S17).
As the hardware configuration and the software configuration according to the third embodiment are identical to that of the second embodiment, description thereof is omitted.
The remote-procedure-call library 42 of the first processor 31 makes the procedure call to the second processor 32 of the procedure call (step S24). The second processor 32, upon receipt of the procedure call from the first processor 31, releases the procedure-call waiting state and reads the address of the procedure from the receiving communication register 36 (step S25). The second processor 32 performs processing to initiate the procedure located at the address read (step S26) and executes the procedure (step S27).
The remote-procedure-call library 42 of the first processor 31 makes the procedure call to the second processor 32 (step S33). The second processor 32, upon receipt of the procedure call from the first processor 31, stops the processing being executed (step S34) and reads the address of the procedure from the data communication area 51 of the shared memory 34 (step S35). The second processor 32 performs processing to initiate the procedure located at the address read (step S36) and executes the procedure (step S37).
According to the embodiments, a processor called by the procedure call can directly initiate the procedure located at the address specified by the calling processor, thereby enabling a shortening of the time required for the procedure initiation processing and high speed initiation of the procedure, without a need for processing to search for the address corresponding to an identifier as is required in the procedure initiation processing of the conventional remote procedure calling scheme. Also, the embodiments, which do not require a table indicating correspondence between the address of the procedure and the identifier, enable a reduction in memory utilization.
Although embodiment has been described with respect to a specific embodiment for a complete and clear disclosure, the appended claims are not to be thus limited but are to be construed as embodying all modifications and alternative constructions that may occur to one skilled in the art which fairly fall within the basic teaching herein set forth.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/JP2006/301532 | Jan 2006 | US |
Child | 12184000 | US |