Memory access method and apparatus

Abstract: This disclosure relates to a memory access method and apparatus and, more particularly, to a memory access method and apparatus used in a multiprocessor system. An object of the invention to provide a memory access method and apparatus in a multiprocessor system wherein each processor is capable of accessing the local memories of other processors and accessing of a shared memory is capable of being performed via an address space shared by the system. Accessing of the local memory of another processor or accessing of the shared memory from each processor of the multiprocessor system is carried out first by executing an address conversion into an intermediate real address forming the address space shared by the system, and then executing an address conversion from the intermediate real address into a real address of the memory which is the object of the accessing operation.

Description: BACKGROUND OF THE INVENTION Field of the Invention: This invention relates to a memory access method and apparatus and, more particularly, to a memory access method and apparatus used in a multiprocessor system. Description of the Prior Art: In the prior art, a multiprocessor system (hereinafter referred to simply as "the system") generally possesses a configuration having a shared memory accessed from all of the processors or a configuration in which local memories dedicated to respective processors are provided in addition to the shared memory in order to raise processing efficiency. The shared memory is of a centralized configuration, in which the entirety of the memory is centralized in one memory unit, a decentralized configuration, in which the shared memory is decentralized among a plurality of memory units corresponding to the respective processors, or a configuration intermediate the two mentioned above. However, in the system wherein the shared memory is centralized, memory access conflict among the plurality of processors occurs and processing efficiency declines since the system bus and memory cannot cope with the conflict. In order to solve this problem, the general practice is to use a system in which a local memory dedicated to each processor is added to each processor. However, since a local memory dedicated to one processor cannot be accessed by another processor, a problem which arises is that common data cannot be stored in the local processor. Even if common data is stored in a local processor, interprocessor communication would need to be performed frequently in order to maintain consistency with common data that may be present in the local memory dedicated to another processor. This would give rise to another problem, namely the fact that the system would be subjected to an excessive load. In the case where the shared memory is decentralized, there are many instances in which a processor and a memory are paired together as a single unit [hereinafter referred to as a "PU" ( p rocessor u nit)]. Each PU is provided with a unit number (hereinafter referred to as a "PU-ID"), and a shared-memory address of the system is decided from the PU-ID and the memory address within the PU so that memory access conflict will not occur between PUs. In other words, at system start-up, the memories are arranged in accordance with the system configuration in such a manner that an address of the shared memory will be an address shared by the entire system. However, with a system configuration of this kind, a drawback is that if addresses run consecutively in the entirety of the memory in a system composed of, say, eight PUs, a malfunction in one PU will cause a discontinuity to occur in the physical memory space. This will make it necessary to re-configure or restart the system. In addition, management of the shared memory becomes more complicated. Furthermore, in a case where an external unit such as a disk storage unit is connected to the system and a large quantity of information is exchanged, even more complicated memory management becomes necessary. WO90/07154 discloses a memory access mechanism in a distributed memory architecture. A memory map unit (MMU) translates a node logical address issued by an industry standard digital computer (ISC) into a node physical address. Where a memory location corresponding to the translated node physical address does not exist in a local memory, the node physical address is further translated into a system physical address by use of a partition map, and the translated system physical address is sent to an interconnect bus so that the ISC can access a remote global memory or another node's local memory. The architecture of W090/07154 requires a number of address translations to access a remote global memory or another node's memory and these translations are executed sequentially. GB-A-2221066 discloses an address translation system for an I/0 (input/output) controller in which a memory management unit (MMU) translates a virtual address issued by a CPU into a physical address of a main memory so that the CPU can access the main memory. A separate MMU also translates a virtual address issued by an I/O controller into a physical address of the main memory so that the I/O controller can access the main memory (see Fig. 1 of D2). According to one aspect of the present invention, there is provided a memory access method for a system in which first and second processing apparatuses are interconnected via a common transmission medium, said method comprising: a request step for requesting an access by outputting a virtual address from a processor of the first processing apparatus; a first address converting step of converting the virtual address from the processor into a first real address for accessing a local memory medium connected to the processor of the first processing apparatus without the intermediary of the transmission medium; an output step of outputting an intermediate address from the first processing apparatus to the transmission medium; and a second address converting step of converting the intermediate address supplied via the transmission medium to the second processing apparatus from the first processing apparatus, into a second real address for accessing a local memory medium of second processing apparatus, characterised in that the method further comprises a third address converting step of converting the virtual address from the processor into the intermediate address, and in that the first and third address converting step are performed in parallel. Thus the present invention provides a memory access method in a multiprocessor system wherein each processor is capable of accessing the local memories of other processors and accessing of an external unit or shared memory is capable of being performed more efficiently. According to another aspect of the present invention, there is provided a processing apparatus for a system in which a plurality of processing apparatuses are interconnected via a common transmission medium, the apparatus comprising: a processing means for requesting an access by outputting a virtual address; local memory means connected to the processing means without the intermediary of the common transmission medium; first address converting means for converting the virtual address from the processing means into a first real address for accessing the local memory means; and second address converting means for converting a first intermediate address supplied via said transmission medium to the processing apparatus from a first processing apparatus of the plurality of processing apparatuses into a second real address for accessing the local memory means, characterised in that the apparatus further comprises third address converting means for converting the virtual address from the processing means into a second intermediate address for accessing local memory means included in a second processing apparatus of the plurality of processing apparatuses, and outputting the second intermediate address to the transmission medium, both the first and third address converting means are arranged to receive the virtual address from the processing means and arranged to convert the received virtual address in parallel. Thus the present invention provides a memory apparatus in a multiprocessor system wherein each processing means is capable of accessing local memories of other processing means and accessing of an external unit or shared memory is capable of being performed more efficiently. In accordance with the present invention, each processing means accesses its own local memory means via the first address converting means and accesses the local memory means possessed by the other processing means via the common transmission medium as well as the second and third address converting means. The present invention is particularly advantageous since the accessing of an external unit, such as a shared memory or disk storage unit, by each processing apparatus can be executed using the address space shared by the system. This simplifies address-space management. Embodiments of the invention will now be described, by way of example, with reference to the accompanying drawings, in which like reference characters designate the same or similar parts throughout and in which: Fig. 1 is a block diagram illustrating the configuration of a multiprocessor system according to a typical embodiment of the present invention; Fig. 2 is a diagram showing the mapping of address space; Fig. 3 is a block diagram showing the configuration of a shared memory according to another embodiment; Fig. 4 is a diagram showing the mapping of address space according to this embodiment; and Fig. 5 is a block diagram showing the configuration of an I/O processor subsystem. DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings. Fig. 1 is a block diagram illustrating the configuration of a multiprocessor system according to a typical embodiment of the present invention. The system shown in Fig. 1 includes a shared memory 1 accessed from each processor, a common bus 2 to which each processor unit (hereinafter referred to as a "PU"), the shared memory 1 and an I/O system (not shown) are connected, and PUs 3a, 3b. Each PU comprises a CPU 4, a cache memory (hereinafter referred to simply as a "cache") 5, a translation lookaside buffer (hereinafter referred to as a "TLB") 6, a page map ii 7, which converts a virtual address into a local memory address (hereinafter referred to as an "internal address"), a page map ie 8 for converting a virtual address into an intermediate address shared by the system, a page map ei 9 for converting the intermediate address shared by the system into an internal address, an arbiter 10 for arbitrating memory access generated by a request from within the PU and memory access generated by a request from outside, and a local memory 11 to which other PUs are capable of referring. It is assumed that the cache 5 includes units, such as a cache tag and comparator, that are necessary to construct a cache system. In this embodiment, the arrangement is such that the cache 5 is externally mounted on the CPU 4. However, it is also possible to use a cache-integrated CPU. A virtual address issued by the CPU 4 is applied to the cache 5, the TLB 6, the page map ii 7 and the page map ie 8. The virtual address issued by the CPU 4 is then discriminated by the cache 5 to determine whether there is a hit in the cache 5. If there is a hit in the cache 5, the address conversion by the TLB 6, page map ii 7 and page map ie 8 is halted and the data constituting the hit is transferred to the CPU 4. When there is a write hit, information in accordance with a cache coherency protocol is transmitted to the common bus 2. On the other hand, if there is no cache hit in the cache 5, whether or not the virtual address is present in the local memory 11 is determined by the TLB 6, which possesses the internal address thereof. If the TLB 6 has an entry corresponding to the virtual address, the virtual address is converted into an internal address by the TLB 6, and the internal address is applied to the local memory 11 via the arbiter 10. At this time, the page map ii 7 is informed of the foregoing simultaneously and the address conversion to the internal address is inhibited. Furthermore, the page map ie 8 is similarly informed, and the address conversion by the page map ie 8 is inhibited. In a case where an entry corresponding to the virtual address does not exist in the entry of TLB 6, address conversion is carried out using the page map ii 7. This conversion can be executed in hardware fashion by a memory management unit (MMU) or in software fashion via the CPU 4. Fig. 2 is a diagram showing the state of address mapping in this embodiment. In Fig. 2, virtual space is mapped based upon a 24 bits addressing architecture. Fig. 2 illustrates, in order from the left side, the address mapping of each of the following: the virtual space of a process currently being executed by the PU 3a, the internal space (the address space of local memory 11) of PU 3a, an intermediate real space, the internal space (the address space of the local memory of PU 3b) of PU 3b, and the real space of the shared memory 1. In accordance with Fig. 2, the arrow group a illustrates that several portions of the virtual space address of the process being executed by the PU 3a are mapped to the internal space corresponding to the local memory 11 of PU 3a. The arrow group a indicates that an address conversion is being carried out between the virtual space and the internal space via the TLB 6 or page map ii 7. The page map ie 8 maps the virtual space of the process currently being executed by the CPU 4 to the intermediate space shared by the entire system. The local memory in each PU, the shared memory 1 and the I/O space of the I/O system (not shown) are mapped in the intermediate real space. As illustrated by the arrow group b in Fig. 2, the virtual space addresses and the other spaces of the process being executed by the PU 3a are mapped as consecutive addresses in the intermediate real space by the action of the page map ie 8. Thus, if a virtual address issued by the CPU 4 does not exist in the local memory 11, the local address is converted into an address in the intermediate real space through the page map ie 8, and the intermediate real address is outputted on the common bus 2, which is external to the PU 3a, for the first time. The intermediate real address outputted on the common bus 2 is accepted by the shared memory 1 or by another CPU. This is indicated by arrow groups c and d in Fig. 2. The arrow group c indicates that the intermediate real space is mapped in the local memory of each PU (PUs 3a and 3b in this example) by the action of the page map ei 9. The arrow group d indicates that the real space addresses of the shared memory 1 are treated as having the same addresses as the intermediate real-space addresses. First, a case will be described in which an area of a portion corresponding to an address of the shared memory 1 exists in the shared memory. The virtual address issued by the CPU 4 is converted by the page map ie 8 into an intermediate real-space address which indicates an area determined by the space mapped by the shared memory 1 in the intermediate real space. The intermediate real-space address is applied to the shared memory 1 through the common bus 2. Next, a case will be considered in which the area of a portion corresponding to a virtual address issued by a certain PU exists in the local memory of another PU (PU 3b in this example). In a manner similar to that of the local memory 11 of PU 3a, the local memory of PU 3b is mapped in the intermediate real space by the page map ei contained in the PU 3b. Accordingly, addresses mapped in the intermediate real space by the page map ei of the PU 3b are prepared beforehand in the page map ie 8 of PU 3a. Under these conditions, a virtual address generated by the CPU 4 is converted by the page map ie 8 of the PU 3a into an intermediate real-space address which indicates an area determined by the space mapped by the PU 3b in the intermediate real space. The intermediate real-space address is applied to the PU 3b through the common bus 2. On the other hand, in the page map ei of PU 3b, the applied intermediate real-space address is converted into an internal address of PU 3b and applied to the local memory. Thus, the local memory of the PU 3b can be accessed via the page map ie 8 of PU 3a and the page map ei of PU 3b by the virtual address issued by PU 3a. As described above, the local memory 11 is accessed through the three paths constituted by the TLB 6, the page map ii 7 and the page map ei 9. However, since access from the TLB 6 and page map ii 7 is generated exclusively, the local memory 11 has an access path from within the PU through the TLB 6 or page map ii 7 and an access path from the outside by means of the page map ei 9. In this embodiment, the arbiter 10 is used so as to give precedence to access from within the PU. Even if external accessing is in progress, internal accessing is executed preferentially by application of an interrupt immediately after the conclusion of the current cycle. Then, when the internal accessing operation ends, access priority to the local memory is controlled in such a manner that external accessing is resumed. Therefore, in accordance with this embodiment, the shared memory 1 and the local memory of the PU 3b can be accessed by preparing beforehand, in the page map ie 8 of the PU 3a, the address indicating the area determined by the space mapped by the shared memory 1 and the address indicating the intermediate space mapped by the local memory (not shown) of the PU 3b. Furthermore, by arranging it so that access to a local memory from its own processor is given precedence over access from other processors, a decline in processing efficiency within the processor of this local memory can be prevented. [Other Embodiments] In the foregoing embodiment, it has been described that in order to map a shared memory to an address the same as that of the intermediate real space and effect an address conversion from the intermediate real space to the internal space of each PU, only the base address of each area is shifted and each of the areas are themselves mapped as continuous address spaces. In this embodiment, an example will be described in which a separate page map is placed between the shared memory and the common bus, whereby an intermediate real space is handled for every predetermined small processing unit (hereinafter referred to as a "page") and any intermediate real space is mapped to a real space of the shared memory or the internal space of each PU on a unit by unit basis. Also, an example will be described in which information is exchanged with an external unit such as a disk storage unit. In this embodiment, an apparatus having the same construction as that of the memory access apparatus used in the first embodiment is employed except for the fact that a separate page map is provided between the shared memory and,the common bus or the fact that an input/output processor connected to the common bus is provided in order to perform an information exchange with an external unit. Accordingly, reference characters identical with those shown in Fig. 1 are used and a description of elements similar to those in the first embodiment is deleted. First, a case will be described in which a shared memory having its own page map (local page map) is connected to the common bus. Fig. 3 is a diagram showing the configuration of a shared memory 12 used in this embodiment. Here a page map em 13 is provided between a memory unit 14 and the common bus 2. In order to access the memory unit 14, the intermediate real address on the common bus 2 is converted into an internal address of the memory unit 14 by the page map em 13. Fig. 4 is a diagram showing the mapping of an address space according this embodiment. Reference will be had to Fig. 4 to describe a case in which a process being executed by the PU 3a accesses the shared memory 12 and a case in which this process accesses the local memory of the PU 3b. First, the page of the virtual space of the process being executed by the PU 3a is address-converted by the page map ie 8 into an area of intermediate real-space addresses C 0 ∼ C max . Next, the intermediate real-space addresses are converted into internal addresses of the memory unit 14 by the page map em 13 within the shared memory 12. At this time the conversion to the internal addresses of the memory unit 14 is executed in page units. Therefore, if consecutive addresses exist in the memory unit 14 in page-size units, the address conversion will be executed correctly. Accordingly, even if a malfunction occurs in part of the shared memory 12 and accessing become impossible (i.e., even if a malfunction occurs at a location indicated by "xxxxx" in the memory space of the shared memory in Fig. 4), the intermediate real space can be mapped without using this location. Next, a case will be described in which the local memory of the PU 3b is accessed. First, the address of a page (SA) which is part of the text of a process being executed by the PU 3a shown in Fig. 4 is converted into an address of an area (SC) in the intermediate real space by means of an address conversion performed by the page map ie 8. Next, the area SC is mapped to an area (SB), which is in the local memory of the PU 3b, by the page map ei of the PU 3b. In this embodiment, the page which is the portion of the process being executed by the PU 3a, particularly the shared area for process execution, is mapped to the respective internal spaces of the PU 3a and PU 3b, as indicated by the hatched areas in Fig. 4. As a result, use is made of the internal memories, which are capable of high-speed response. A case will now be described in which information is exchanged with an external unit. In a computer system, processing for input/output with an external unit such as a disk storage unit often is executed to achieve transfer of a large quantity of data between the disk and a memory. A case will be considered in which an I/O processor subsystem 15 having a construction of the kind shown in Fig. 5 is connected to the system of Fig. 1 through the common bus 2. The I/O processor subsystem 15 (hereinafter referred to as an "I/O processor") comprises an I/O processor-dedicated CPU (hereinafter referred to as an "I/O CPU") 16, an I/O processor-dedicated local memory (hereinafter referred to as a "local memory"), a DMAC ( d irect m emory a ccess c ontroller) 18, a communication interface (hereinafter referred to as a "communication I/F") 19 for serial communication with the external unit, and a disk I/F 20 which executes processing control for input/output with a disk storage unit 21. The transfer of a large quantity of data between the exterior of the system and the shared memory 1 and local memory 11 via the communication I/F 19 and disk I/F interface 20 using the I/O processor 15 of the aforementioned kind is executed via the local memory 17 by the action of the I/O CPU 16 and DMAC 18. By way of example, in a case where four pages of consecutive data is inputted to the shared memory 1 from the disk 21, the I/O CPU 16 sets the initial values of the disk I/F 20 and DMAC 18 and writes the four pages of data from the disk 21 to the local memory 17 through control performed by the DMAC 18. Next, transfer instructions, which are executable instructions, are executed continuously by the I/O CPU 16, whereby the four pages of data are transferred from the local memory 17 to the shared memory 1. As already described, the memory space becomes a continuous area in accordance with access by intermediate real addresses on the common bus. Therefore, the I/O CPU 16 is capable of executing transfer instructions continuously without taking page boundaries into consideration. This illustrates that the DMAC 18 may execute these instructions without the intermediate intervention of the I/O CPU 16. Furthermore, depending upon the capabilities of the I/O CPU 16 and DMAC 18, it is possible for the communication I/F 19 or disk I/F 20 to execute the transfer of data to the shared memory 1 or local memory 11 without the intervention of the local memory 17. Therefore, in accordance with this embodiment, even if there is a malfunction in a portion of the shared memory 1 and this portion becomes unusable, the page map em is capable of mapping the intermediate real space without using the malfunctioning portion. As seen from the processor, therefore, the processor is capable of accessing the shared memory 1 while being aware only of its own virtual space. In addition, since memory space can be dealt with continuously by using intermediate real addresses, a large quantity of data from an external unit can be inputted at high speed by DMA ( d irect m emory a ccess) without the intervention of a CPU. As many apparently widely different embodiments of the present invention can be made, it is to be understood that the invention is not limited to the specific embodiments thereof except as defined in the appended claims.

Claims: A memory access method for a system in which first and second processing apparatuses (3a,3b) are interconnected via a common transmission medium (2), said method comprising: a request step of requesting an access by outputting a virtual address from a processor (4) of the first processing apparatus (3a); a first address converting step of converting the virtual address from the processor (4) into a first real address for accessing a local memory medium (11) connected to the processor (4) of the first processing apparatus without the intermediary of the transmission medium (2); an output step of outputting an intermediate address from the first processing apparatus (3a) to the transmission medium (2); and a second address converting step of converting the intermediate address supplied via the transmission medium (2) to the second processing apparatus (3b) from the first processing apparatus (3a) into a second real address for accessing a local memory medium of second processing apparatus (3b), characterised in that the method further comprises a third address converting step of converting the virtual address from the processor (4) into the intermediate address, and in that the first and third address converting steps are performed in parallel. A method according to claim 1, wherein the system is provided with a shared memory medium (1) connected to the first and second processing apparatus (3a,3b) via the transmission medium (2), and the method further comprises a fourth address converting step of converting an address from the transmission medium (2) into an address for accessing the shared memory medium (1) in order that the shared memory medium (1) may be accessed by the address from the transmission medium (2). A method according to claim 1 or 2, further comprising a data input/output step of controlling access by the addresses for transmission via the common transmission medium (2) from external devices to the system. A method according to claim 1, 2 or 3, further comprising controlling access-priority in such a manner that the processor (4) of the first processing apparatus takes precedence over the other processors with respect to access to the local memory medium (11) of that processor (4). A method according to claim 1, wherein the system is provided with a shared memory medium (11) connected to the first and second processing apparatuses (3a,3b) via the transmission medium (2), and the method further comprises accessing the shared memory medium (11) by the address converted in the second converting step. A processing apparatus (3a) for a system in which a plurality of processing apparatuses (3a,3b) are interconnected via a common transmission medium (2), the apparatus comprising: a processing means (4) for requesting an access by outputting a virtual address; local memory means (11) connected to the processing means (4) without the intermediary of the common transmission medium (2); first address converting means (7) for converting the virtual address from the processing means (4) into a first real address for accessing the local memory means (11); and second address converting means (9) for converting a first intermediate address supplied via said transmission medium (2) to the processing apparatus (3a) from a first processing apparatus of the plurality of processing apparatuses into a second real address for accessing the local memory means (11), characterised in that the apparatus (3a) further comprises third address converting means (8) for converting the virtual address from the processing means (4) into a second intermediate address for accessing local memory means included in a second processing apparatus of the plurality of processing apparatuses, and outputting the second intermediate address to the transmission medium (2), and in that both the first and third address converting means (7,8) are arranged to receive the virtual address from the processing means (4) and arranged to convert the received virtual address in parallel. An apparatus according to claim 6, wherein the processing means has a cache memory that is dedicated to the processing means. An apparatus according to claim 6 or 7, further comprising access-priority control means (10) for performing control in such a manner that accessing of the local memory means (11) by the first address converting means (7) takes precedence over accessing of the local memory means (11), by the third address converting means (8). A system comprising a plurality of processing apparatuses in accordance with claim 6, 7 or 8 interconnected via the common transmission medium (2). A system according to claim 9, wherein the system is provided with shared memory means (1) connected to the plurality of processing apparatus (3a,3b) via the transmission medium (2). A system according to claim 10, wherein the shared memory means (1) is capable of being accessed directly by an address from the transmission medium (2). A system according to claim 11, wherein the address for transmission is allocated to a continuous address area including area of real addresses of the shared memory means (1). A system according to claim 10, wherein the system is provided with fourth address converting means (13) for converting an address from the transmission medium (2) into an address for accessing the shared memory means (1). A system according to claim 13, wherein the fourth address converting means (13) is arranged to convert the address from said transmission medium (2) using a continuous address area, which has a prescribed width, as a unit when the shared memory means (1) is accessed. A system according to claim 13, further comprising input/output control means (15) connected thereto via the transmission medium (2) and accessible by an address from the transmission medium (2). A system according to claim 15, wherein the input/output control means (15) comprises: first external input/output control means (20) for accessing a large-capacity auxiliary memory medium (21); and second external input/output control means (19) for implementing access via a communication line. A system according to claim 16, wherein the large-capacity auxiliary memory medium (21) is a disk storage unit. A system according to any one of claims 9 to 17, wherein all addresses corresponding to each of the local memory means (11) possessed by respective ones of the plurality of processing means (4) are arranged to be mapped as consecutive addresses in the address space used by the transmission medium (2). A system according to any one of claims 9 to 17, wherein addresses corresponding to each of the local memory means (11) possessed by respective ones of the plurality of processing means (4) are arranged to be mapped in the address space used by the transmission medium (2), with a continuous address area having a prescribed width serving as a unit.

Inventors: DEI KATSUHITO, DEI, KATSUHITO, Dei, Katsuhito, c/o Canon Kabushiki Kaisha
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1992
Main classification: G06F12
IPC codes: G06F12, G06F15