Hot standby memory copy system

Abstract: Disclosed is an electronic exchange with a hot standby memory copy system including main storage devices (2,2′) that are duplexed wherein to improve the processing capacity of a central processing unit (1,1′) and make the best use of the speed of a cache memory (3,3′), in an information processing apparatus provided with central processing units, main storage devices and cache memories all of which are duplexed, first-in first-out memories (4,4′) that are duplexed and connected to the central processing units (1,1′), a unit for simultaneously writing data, when the central processing unit (1,1′) writes the data into the cache memory (3,3′), into the first-in first-out memory (4,4′), and a unit for writing, independently of an operation of the central processing unit (1,1′), the contents of a currently used one of the first-in first-out memories (4,4′) into a standby one of the main storage devices (2,2′) are provided.

Description: BACKGROUND OF THE INVENTION (1) Field of the Invention The present invention relates to an electronic exchange with a hot standby memory copy system including main storage devices that are duplexed. The hot standby system including the duplexed main storage devices (hereinafter called MMs) is a system conventionally used in an electronic exchange. In the hot standby system, a writing operation is carried out by a current central processing unit (hereinafter called the CPU) on both MMs, while a reading operation is made from only one of the MMs. A feature of this system is that the contents of both MMs are guaranteed to be equal to each other. When an abnormality of the MM is detected (for example, detection of a parity error, a two-bit error, etc.,), the read MM is switched to the other MM to enable a process to be continued, and accordingly, compared to a system used in a general computer where a portion after a check point is re-tried, the system can be started quicker. In such a hot standby system, by using elements having high operation speeds, a machine cycle of the CPU may be shortened, but an access time to the s is still long, and thus a problem arises of an unbalance between an operation speed of the CPU and the access time to the MMs. To solve the above-mentioned unbalance, a cache memory is arranged between the CPU and the MM so that, if the cache memory contains address contents requested by the CPU, that is, if the cache memory hits the required contents, data is read from the cache memory but not from the MM, and if it does not hit (miss) the required contents, the contents of the cache memory that are least frequently used are updated. There are two modes of use of the cache memory i.e., a write through mode and a copy back mode. According to the write through mode, whenever the CPU requests an updata of the contents of the memory, the cache memory as well as the MM are updated. Since data is not saved from the MM to the cache memory, control is simple, but a drawback arises that an effect of the cache memory is demonstrated only in a reading operation. According to the copy back mode, whenever the CPU requests an update of the contents of the memory, only the contents of the cache memory are updated, and thus it is appropriate for a high-speed operation. But, a saving operation from the MM with respect to the cache memory is required, and a problem arises in that the control becomes complicated. In the system using the cache memory, a memory copy system is needed to make the best use of the high-speed of the cache memory. (2) Description of the Related Art Figure 16 is a block diagram for explaining a conventional hot standby system with duplexed CPUs and MMs but without a cache memory. In the figure, a CPU 160 and an MM 161 belong to a current system and a CPU 160′ and an MM 161′ belong to a standby system. In this system, there is no cache memory so that, even if a speed of the CPUs is increased, an access speed with respect to the MMs is still slow, and thus a problem arises in that a processing capacity of the system as a whole is not improved. Further, if high speed MMs are prepared to improve the processing capacity of the whole system, the costs will be increased. Figure 17 is a block diagram showing an example of a conventional dual system using duplexed CPUs and MMs with cache memories. In the figure, a CPU 170, a cache memory 171, and an MM 172 belong to a current system, and a CPU 170′, a cache memory 171′, and an MM 172′ belong to a standby system. According to this conventional example, the cache memories constitute part of the CPUs, and the current cache memory 171 is connected to the current MM 172 and standby MM 172′, and similarly, the standby cache memory 171′ is connected to the standby MM 172′ and current MM 172. To use the shown system in the copy back mode, the CPU carries out writing and reading operations to and from the cache memory so that the processing speed is improved. But, in response to a memory contents updating request from the CPU, the contents of only the cache memory are updated so that the cache memory may have data that does not exist in the MMs. Therefore, although the contents of the MMs 172 and 172′ are always the same, the contents of the cache memory 171 may differ from those of the cache memory 171′. Therefore, if the current CPU is switched to the standby CPU due to a fault in the cache memory 171, data existing only in the current cache memory is lost, and thus the hot standby mode is not realized. It is possible to apply the system shown in Fig. 17 to the write through mode. According to the write through mode, a writing operation is carried out simultaneously to both the MMs through the cache memory, so that the problem of the copy back mode wherein data exist only in the cache memory, will not occur. The duplexed CPUs and MMs, however, are generally connected to separate power supply systems so that buffer gates, etc., are inserted in crosses between the cache memories and the MMs. Therefore, to write data from the CPU to both the MMs by passing through the cache memory, a necessary access time for the other system is longer than a necessary access time for the own system, due to delays in the buffer gates and cables, etc., of the crosses. For example, supposing that the main storage comprises a memory having a cycle time of 180 ns and that a cycle time of 200 ns is realized as the main storage for the own system. But, with respect to the other system, the above-mentioned delays are added and, if the delays are 20 ns at the gates and 5 ns at the cables, the actual cycle time will be 225 ns. Namely, a loss due to the crosses will be 10% or more. The delay due to the crosses may not always decrease a processing capacity of the CPU, but if it is supposed that it will affect half thereof, about 5% of the processing capacity is affected. It is very difficult to increase the processing capacity of the CPU by 5%, and therefore, it is very important to prevent a decrease of the processing capacity by the crosses. Figure 18 is a block diagram showing another example of the conventional duel system including duplexed CPUs and MMs employing cache memories. In the figure, a CPU 180, a cache memory 181, and an MM 182 belong to a current system, and a CPU 180′, a cache memory 181′, and an MM 182′ belong to a standby system. In this prior art example, the cache memories constitute part of the MMs, respectively. The current CPU 180 is connected to the current and standby cache memories 181 and 181′, and similarly, the standby CPU 180′ is connected to the standby and current cache memories 181′ and 181. This example is used for the copy back mode and is a hot standby system, but since crosses exist between the CPUs and the cache memories, the high speed of the cache memories is not properly utilized. Namely, it is necessary to synchronize the hits and misses of both cache memories, but due to the length of a bus from the own CPU to the other cache memory and a delay time of a buffer memory at an input portion of the cache memory, an access time from the CPU to the own cache memory is delayed, and as a result, the cache access speed is lowered. Since the speeds of the CPUs and cache memories tend to be increased, the cross delay of the arrangement shown in the figure reaches 20% to 50% of the cache memory access time. GB-A-2 006 488 describes a system including two computers, one being active and the other standing by, each of them including a processor and a memory, both memories being connected for copying the data of the active processor in the stand-by one. According to this system it is necessary to transfer the data from the active system to the standby system. Thus, GB-A-2 006 488 merely discloses two supervisory blocks to supervise the operation of the active system. When the failure occurs in the active system, the active system generates an alarm to the standby system so that the active system is changed to the standby system. Further, the data storage operation is formed through switch units so that a lot of time is required to store the data. SUMMARY OF THE INVENTION An object of the present invention is to provide a hot standby memory copying system that improves the processing capacity of central processing units and makes the best use of the high speed of the cache memories. To attain the above object, there is provided, according to the present invention, a hot standby memory copy system including two computers, one being active and the other standing by, each of them including a central processing unit and a main storage device, both main storage devices being connected for copying the data of the active processor in the stand-by one, characterized in that a cache memory is connected between the central processing unit and the main storage devices of each system, each cache memory including a device for caching the data and a first-in first-out memory, wherein the first-in first-out of the active system is connected to the main storage device of the stand-by system and the first-in first-out of the stand-by system is connected to the main memory of the active system, that, when the CPU of the active system updates a data in its main storage device, this data is also updated in the cache of the active system and copied in the first-in first-out of the active system, and that means are provided for copying said data contained in the first-in first-out into the main storage device stand-by unit after the data of the cache and the first-in first-out of the active system has been updated. The subclaims 2 to 7 show further developments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS The above object and features of the present invention will be more apparent from the following description of the preferred embodiments with reference to the drawings wherein: Fig. 1 is a basic explanatory view of an embodiment of the present invention; Fig. 2 is a block diagram of the embodiment of the present invention; Fig. 3 is a block diagram showing the details of the embodiment of Fig. 2; Fig. 4 is an explanatory block diagram of various control signals used in the embodiment of Fig. 3; Fig. 5 is a timing chart of an example of a transfer operation from an FIFO to an MM; Fig. 6 is a timing chart of another example of the transfer operation from the FIFO to the MM; Fig. 7 is a circuit diagram showing an example of a queuing circuit; Fig. 8 is a principle block diagram of another embodiment of the present invention; Fig. 9 is a principle block diagram of a modification of Fig. 8; Fig. 10 is a block diagram showing the details of the embodiment of Fig. 8; Fig. 11 is an explanatory block diagram of various control signals used in the embodiment of Fig. 10; Fig. 12 is a modified block diagram of Fig. 10; Fig. 13 is an explanatory block diagram of various control signals used in the embodiment of Fig.12; Fig. 14 is a time chart showing differences in an MM access timing of an FIFO at a normal state and at a fault state; Fig. 15 is a time chart showing a data transfer timing from an FIFO to an MM of the other system; Fig. 16 is a block diagram explaining a conventional hot standby system with CPUs and MMs that are duplexed respectively, without cache memories; Fig. 17 is a block diagram showing an example of a conventional dual system with cache memories; and Fig. 18 is a block diagram showing another example of the conventional dual system with cache memories. DESCRIPTION OF THE PREFERRED EMBODIMENTS Figure 1 is a basic explanatory view of an embodiment of the present invention. In the figure, numerals 1 and 1′ are central processing units that are duplexed, 2 and 2′ are main storage devices that are duplexed, and 3 and 3′ are cache memories that are duplexed and disposed between the central processing units 1 and l′ and the main storage devices 2 and 2′. The central processing units 1 and 1′ are connected to first-in first-out memories 4 and 4′ that are duplexed. A means is provided for simultaneously writing data, when the central processing unit 1 writes the data into the cache memory 3, into the first-in first-out memory 4, and a means is provided for writing the contents of the current first-in first-out memory into the standby main storage device, independently of an operation of the central processing unit 1. First-in first-out memories are provided and, according to the autonomous reading mechanisms thereof, the same data as the data written into the own cache memory is written into the first-in first-out memories at a same speed as the writing speed of the own cache memory. Also, according to the autonomous reading mechanism of the first-in first-out memory, the same data as the data written into the own main memory is written into the other main storage device at a data writing speed of the own main storage so that the central processing unit does not need to consider delays due to crosses at the time of data writing to both of the main storage devices, thereby improving the processing speed. Further, it is not necessary to consider the influence of cross delays at the cache memories, so that the high speed of the cache memories is properly utilized well. (1) Copy back mode Figure 2 is a principle block diagram showing a copy back mode memory copy system according to the embodiment of the present invention. In the figure, a CPU 21, a cache memory (a high-speed buffer memory) 22, a selector (SEL) 23, and a main memory (MM) 24 constitute a current system, and a CPU 21′, a cache memory 22′, a selector (SEL) 23′, and a main memory (MM) 24′ constitute a standby system. To the cache memories 22 and 22′, first-in first-out memories (hereinafter called as FIFOs) 25 and 25′ are connected in parallel, respectively. The FIFOs 25 and 25′ have a writing speed substantially equal to that of the cache memories, and may be commercially available FIFOs or formed with gate arrays etc. The FIFOs 25 and 25′ are disposed in the vicinity of the cache memories 22 and 22′, respectively. In Fig. 2, when data must be written in the cache memory 22, the current CPU 21 writes the data into the cache memory 22 and, simultaneously, into the FIFO 25. At the time of a cache hit, the selector (SEL) 23 selects an output of the FIFO 25. The data once written in the FIFO 25 is written in both of the MMs after the FIFO 25 autonomously occupied an MM bus. Data write instructions from the CPU 21 to the cache memory 22 and FIFO 25 are generally not continuous, and the percentage of store instructions to all instructions is only 20% to 30% at the highest. Writing from the FIFO 25 to the MMs 24 and 24′ is periodically carried out by the FIFO 25 in harmony with an access speed of the MMs, and therefore, if an interval of the generated store instructions is longer than a transfer interval of data from the FIFO 25 go the s 24 and 24′, a capacity of each FIFO may be a finite value. Namely, the capacity of the FIFO will not be infinite but can be set to a proper value. The FIFOs having a writing speed substantially equal to that of the cache memories are arranged adjacent to the cache memories, and writing is carried out from the FIFO to both of the MMs in harmony with the access speed of the MMs. Therefore, the difference between the access speeds of the cache memory and the MM can be absorbed. In addition, the same data is written in the cache memory and FIFO. Therefore, even if a failure occurs in the cache memory, the contents of the FIFO are transferred to both of the MMs so that the contents of both of the MMs coincide with each other to prevent a loss of the data. As described above, according to this embodiment, the MMs of the hot standby system can be restarted at a high speed, and the reliability is improved. Figure 3 is a block diagram showing the details of the embodiment of Fig. 2. In the figure, the same parts as those shown in Fig. 2 are represented by the same reference marks. Numerals 31, 32, and 33 are 2-1 selectors that select and output A or B depending on whether signals M, S, and W are 0 or 1, respectively. Numerals 31′ 32′ and 33′ are standby 2-1 selectors. It is supposed that the CPU 21 is in active use and CPU 21′ is on standby; and the MM 24 the main one, and the 24′ a slave one (writing only). The cache memory 22 stores data read from the MM 24. When the CPU 21 reads data out of the cache memory 22 to process the data and when the processed data restored into the original address of the cache memory 22, a write signal WT generated in the CPU 21 is given to the FIFO 25 so that the data is written into the cache memory 22 and into the FIFO 25 simultaneously. As mentioned before, the FIFO 25 is arranged in the vicinity of the cache memory 22 so that a delay time from the CPU 21 to the FIFO 25 is short, and a capacity of the FIFO may be of a proper finite value. When a cache miss occurs at the time of writing data from the CPU 21 into the cache memory 22, namely, when a write address from the CPU 21 does not coincide with an address of each data stored in the cache memory 22, the 2-1 selector (SEL) 23 switches from an FIFO output to a cache memory output to save the data written in the cache memory 22 into the MM 24. At this time, the cache memory 22 generates a bus request signal RQC to request an MM access request competition circuit (MMCTL) shown in Fig. 4 to request the MM bus. After that, if an enabling signal GG is returned as an output of the MMCTL, the cache memory 22 can use the MM bus so that the data are saved from the cache memory 22 into the 24. The way of picking up data to be saved is exactly the same as that of a known copy back mode and thus is omitted from Fig. 3. On the other hand, the data written in the FIFO 25 is autonomously written into the MMs 24 and 24' regardless of a hit or miss in the cache memory 22. A writing operation from the FIFO 25 to the MMs 24 and 24' will be explained with reference to Fig. 4. Figure 4 is an explanatory block diagram showing various control signals used in the embodiment of Fig. 3. In the figure, numerals 41 and 41' are counters that repeat 0,1,... and 5 to generate an output CO at "5," 42 and 42' are D-type flip-flops, 43, 43', 44, 44' 46, 46', 47, and 47' are 2-1 selectors 45 and 45' are memory access competition circuits (MMCTL), and 48 and 48' are OR gates. An example of a data transfer operation from the FIFO 25 to the MM 25 as shown in Figs. 3 and 4 will be explained with reference to a timing chart of Fig. 5. When an enabling signal GF is given to a reset terminal R of the counter (CTR) 41, the counter 41 is cleared. Since the enabling signal GF is given to a n-input of the D-FF 42 through the OR gate 48, the D-FF 42 is in a reset state during the generation of the signal GF. The enabling signal GF becomes a read signal RD of the FIFO 25 through the OR gate 48. After being cleared, the counter 41 counts clock signals CLK to generate an output CO when the count value becomes "5." The signal CO is input to a reset terminal R of the D-FF 42 so that an MM bus request signal RQF is obtained at an output Q of the D-FF 42. The signal RQF passes through the OR gate 48 and is input as a read signal RD to the FIFO 25. An interval 1 during which the signal RQF is being output forms part of a data read cycle from the FIFO 25 so that a delay time will be needed for accessing the FIFO. On the other hand, if the control signal S given to the 2-1 selector 43 is "0" to indicate an own system selection, the signal RQF is input to the access request competition circuit (MMCTL) 45 through the 2-1 selector 43. The MMCTL 45 outputs an enabling signal GF if the MM bus is available. If the control signal W of the 2-1 selector 46 is "0," the signal GF is given to a reset terminal R of the counter 41 through the 2-1 selector 46 to clear the count value of the counter 41, and as a result, the signal CO disappears to turn OFF the signal RQF. But, since the signal GF has become the signal RD through the OR gate 48, the FIFO 25 continues the reading cycle until just before the count value of the counter 41 becomes "5." A predetermined interval 2 in the reading cycle after the signal RQF is turned OFF is a cross delay time between the FIFO and the NM, and thus the address and data are read out of the FIFO 25. In the next reading cycle, a read pointer of the FIFO is advanced. On the other hand, due to the signal RQF given to the MMCTL 45 in the interval 1, the CTL 45 generates the enabling signal GF and, at this time, expects an arrival of read data from the FIFO 25 and starts a writing sequence with respect to the MM 24 and 24′. This writing sequence itself is based on a known technique, and generates a row address strobe (RAS), a column address strobe (CAS) and a write enable (WE) during the generation of the signal GF, to write the address and data. To make the data from the FIFO 25 reach the MMs 24 and 24' simultaneously at the time of writing, control signals S and S' of the 2-1 selectors 32 and 32' are set in advance. The 2-1 selectors 43 and 44 on the input side of the MMCTL 45 distribute request signals RQF and RQC to both the systems, and the 2-1 selectors 46 and 47 on the output side return the enabling signals GF and GC. These 2-1 selectors themselves are well known. In the above explanation, it was supposed that the CPU 21 may write data into the cache memory 22 as well as into the FIFO, but a writing speed with respect to the FIFO 25 is faster than a reading speed with respect to the FIFO 25, so that the contents of the FIFO 25 are not always empty at the time of writing from the CPU 21. If data is to be written into the cache memory 22 when the FIFO 25 is full of data, the data may be written only into the cache memory 22. To avoid this problem, the FIFO 25 outputs a signal FF to warn that the FIFO is full of data. This signal is given as a write waiting signal WW to the CPU 21 so that queuing of the writing operation of the CPU is effected. If the probability of the queuing, i.e., waiting at the CPU, is high, this will be a problem, but it is generally known that the probability can be lowered if the capacity of the FIFO is properly selected. Next, switching the current CPU to the standby CPU' will be described. For example, this switching may be carried out according to a command when a defective package in the current system is replaced, or may be carried out at the time of a fault in the CPU. At first, the switching carried out according to a command will be explained. If the switching is done when data to be written in the MMs 24 and 24' exist in the FIFO 25, the data in the FIFO 25 may be lost. To avoid this, when a switching instruction based on the command is generated, before switching to the CPU' 21 it is checked to see whether or not the FIFO 25 is empty. Namely, when the FIFO 25 is empty, the FIFO 25 outputs an FE signal. The CPU' 21' becomes a current system only after receiving the FE signal as a read completion signal RCMP' of the FIFO. Namely, the CPU' 21' will not be the current system until receiving the signal RCMP'. When the current CPU is changed from the CPU 21 to the CPU' 21' due to a failure, the following procedure will be done. If a watchdog timer (not shown) detects an abnormality in the software of the CPU, a restarting circuit not shown (including microprograms) switches the CPUs. In this case, if a cause of the failure is in the CPU or in the cache memory, data exist in the FIFO 25 so that the data of the FIFO is transferred to both of the MMs in the same manner as that for a normal case, i.e., without a failure. After the completion of the transfer of data, the standby CPU' 21' is started as a new current system. If the cause of the failure is in the FIFO, all data in the cache memory 22 that does not match data in the MM 24 is saved in both the MMs from the cache memory 22 according to a write instruction bit of the cache memory 22. This procedure is the same as that for a single CPU system and is well known. After the completion of the saving, the standby CPU is started as the new current CPU. The reading from the FIFO 25 is suspended when a cache miss occurs to cause the CPU 21 to read the contents of the MM 24. This will be explained with reference to a timing chart of Fig. 6. In Figs. 3, 4, and 6, when the MM bus request signal RQF is output from the D-type flip-flop 42 in response to the output CO from the counter 41, and when the MM bus request signal RQC is simultaneously output from the cache memory 22, the MMCTL 45 gives priority to the signal RQC, to solve the competition, and gives the enabling signal GC to the cache memory 22. After a reading cycle of the MM 24 is completed, the enabling signal GF is output such that the address and data are read from the FIFO 25 into the MMs. Namely, while the enabling signal GC is being output, the reading from the FIFO 25 is suspended. Figure 7 is a circuit diagram showing an example of a queuing circuit for queuing the writing operation of the CPU 21 in response to the write waiting signal WW. In the Figure, 71 is an AND gate, 72 is a microaddress counter, 73 is a microprogram storing ROM, 74 is a microinstruction register, 75 and 76 are decoders, 77 and 78 are AND gates, 79 is an OR gate, and 80 is an inverter. The microinstruction register 74 comprises a microprogram instruction storing portion A, a microprogram memory access specifying portion B, a microprogram instruction head microaddress set specifying portion C, a wait specifying portion D for waiting for an RCMP in a command such as a self-to-standby (SELF TO STB) instruction, and a microprogram head address specifying portion E. When an increment stopping signal is not given from the OR gate 79, the microaddress counter 72 counts up clock signals CLK to sequentially transmit a read address. According to the address, a microprogram is read from the ROM 73 and stored in the register 74. If a wait specifying flag is set in the portion D of the register 74, and if the self-to-standby instruction is output by decoding the portion A, and if the RCMP for indicating that the FIFO 25 is empty is "0", i.e., if the FIFO 25 is not empty, an output of the AND gate G2 is '1." This output "1" passes through the OR gate 79 and becomes an increment stopping signal. Then, the AND gate 71 is closed and the counter 72 stops to count up, and accordingly, execution of the self-to-standby instruction is suspended until the RCMP becomes "1". If a store instruction signal PST for an operand is output as a result of decoding the portion B of the resister 74, and if the WW signal indicating that the FIFO 25 is full of data is given, an output of the AND gate 77 becomes "1", and will be the increment stopping signal through the OR gate 79. In this case, the writing from the CPU 21 to the FIFO 25 and cache memory 22 is suspended until the signal WW becomes "0", namely until the FIFO 25 is not full of data. The increment of the microaddress counter 72 is stopped due to various interrupting operations. In the embodiment of the present invention, a circuit for stopping the increment is provided with a slight addition to carry out the above-mentioned queuing. As described above, when switching the active CPU to the standby CPU, the switching is suspended until the data in the FIFO is saved in both of the MMs, but this waiting time is short compared to the conventional system that has no FIFOs. Namely, if there are no FIFOs, the CPUs are switched from one to another after saving all the contents of the cache memory 22 in both of the MMs, and thus the waiting time is long. On the other hand, in the embodiment of the present invention provided with the FIFOs, the contents of the FIFO 25 are periodically saved in the MMs so that only unprocessed data remaining in the FIFO is saved at the time of switching CPUs, thus shortening the waiting time. But, in case of a switching at the time of a failure of the FIFO 25, the waiting time will be the same as that in the conventional system with no FIFOs. As explained in the above, in the copy back system according to the embodiment of the present invention, FIFOs having a small capacity compared to the cache memories are added, and simple hardware is also added to enable the CPU to monitor the signal FF indicating that the FIFO is full of data and the signal FE indicating that the FIFO is empty. Thus, the MM hot standby system which is capable of starting the system including programs in a short time at the time of a failure is realized. (2) Write through mode Figure 8 is a principle block diagram showing a write through mode memory copy system according to another embodiment of the present invention. In the figure, a CPU 81, a cache memory 82, an FIFO 83, and an 84 constitute an active system, and a CPU 81' a cache memory 82' an FIFO 83', and an MM 84' constitute a standby system. The conventional write through mode has the cross delay problem as described with reference to Fig. 16. To solve this problem, the embodiment has the FIFOs inserted in crossing routes. Accordingly, the CPU 81 writes data according to the write through mode into the cache memory 82 and into the own MM 84 as well as writing the data into the FIFO 83. After that, the data is written autonomously from the FIFO 83 to the other MM 84' according to a control circuit portion of the FIFO 83. In this embodiment, the FiFO itself is in the system of CPU so that the CPU, MM and FIFO are arranged adjacent to each other (for example, in adjacent slots on a backboard). Therefore, data writing from the CPU to the FIFO can be set to exactly quite the same condition as those of data writing from the CPU to the MM, by setting a cycle time of the FIFO as equal to or faster than that of the MM. As a result, the shorter the cycle time of the MM, the greater the improvement of the processing capacity of the CPU. On the other hand, data written in the FIFO of this embodiment is autonomously written in the other MM by a peripheral circuit. Here, strict by speaking, the contents of both MMs may not coincide with each other. But, if a certain time elapses, both will coincide with each other. This is because a frequency of writing operations of the CPU with respect to the MM is about 20% to 30% of all instruction executions and because a cross delay time is covered by a remaining time. It is generally known that, if an average writing interval of the CPU is longer than an autonomous reading cycle time, infinite write data will not be stored in the FIFO. This, however, is not sufficient, because waiting data in the FIFO will be lost if the CPU, MM, cache memory and FIFO are switched due to a failure. Since the capacity of the FIFO is finite, an overrun, i.e., loss of data, will occur when the CPU carries out the writing operations continuously. To cope with this, the embodiment also uses the waiting technique. The CPU 81 writes data into the FIFO 83 by passing the data through the cache memory 82. Therefore, the FIFO may be directly connected to the CPU without passing through the cache memory, as shown in Fig. 9. In Fig. 9, a CPU 91, a cache memory 92, an FIFO 93, and an MM 94 belong to a current system, and a CPU 91', a cache memory 92', an FIFO 93', and an MM 94' belong to a standby system, and these operate in exactly the same manner as those shown in Fig. 8 and thus explanations thereof will be omitted. Figure 10 is a block diagram showing the details of the embodiment of Fig. 8. In the figure, the same parts as those shown in Fig. 8 are represented by the same reference numerals. Numerals 101 and 102 are 2-1 selectors that selectively output A or B in response to whether signals M and S are 0 or 1, respectively, and 101' and 1-2' are 2-1 selectors of the standby system. To write data into the MM 84, the CPU 81 sends an MM request RQP to a memory access competition circuit (MMCTL) 113 of the own system. If an MM access enabling signal GP is returned from the MMCTL 113 to the CPU 81, it executes a writing operation with respect to the MM 84 in the own system. While the writing operation is being executed, a write instruction signal WT is transmitted to the FIFO 83 such that data the same as that written in the MM 84 is written in the FIFO 83. The 2-1 selector 102 at an entrance of the MM 84 selectively receives data from the own CPU 81 or data from the other FIFO 83'. On the current CPU side, A is selected when a control signal S is 0, and on the standby CPU' side, B is selected when the signal S is 1. If the FIFO 83 is filled with data due to continuous data writing from the CPU 81 to the MM 84, a signal FF is output from the FIFO 83 to become a write wait instruction signal WW to be given to the CPU 81, and as a result, the writing operation is suspended. The waiting circuit is the same as that shown in Fig. 7 and thus a detailed explanation thereof will be omitted. Figure 11 is an explanatory block diagram of various control signals used in the embodiment of Fig. 10. In the figure, a counter (CTR) 111, a D-type flip-flop 112, a memory access competition circuit (MMCTL) 113, and an OR gate 114 are the same as those of the embodiment shown in Fig. 4, and thus a detailed explanation thereof will be omitted. For data written in the FIFO 83, the counter (CTR) 111 having a properly set initial value sends an access request RQF to the MMCTL 113' of the other system to obtain an access enabling signal GF from the other MMCTL 113' as a result of competition. In response to the enabling signal GF, the counter (CTR) 111is once reset to be ready for the next FIFO reading. The signal becomes a read signal RD of the FIFO 83 through the OR gate 114, and as a result, the data read out of the FIFO 83 is written in the NM 84' through the 2-1 selector 102, located at an entrance of the other MM. At this time, the other bus MM is secured, and therefore, if the other MM 84' starts a data writing cycle, the same data as that in the MM 84 is written in the other MM 84'. When the enabling signal GF is returned, an output CO of the counter (CTR) 111 becomes 0, and the next CLK is received to reset the D-FF 112. If cross delay is small, the writing from the FIFO 83 to the MM 84' may be carried out at the same timing as that of the data writing from the own CPU to the own MM. If the cross delay is large, the writing operation in the own system may be executed by using two memory cycles, or a longer cycle write timing that differs from the write timing in the own system may be set because it differs from the operation of the own MM. After the completion of the data transfer from the FIFO 83 to the other MM 84' and when not data to be transferred exists in the FIFO 83, the FIFO 83 outputs an empty signal FE to notify the other CPU 81' of this condition. This is referred to by a new active CPU when the active CPU is switched the standby CPU, and accordingly, the new active CPU can confirm that all data in the FIFO of the previous active system has been transferred to the MM of the new active system. As a result, the data will not be lost due to the switching, if the new active CPU starts operation after confirming the signal FE, i.e., a signal RCMP' (read completion). As explained above, in the write through mode shown in Figs.10 and 11, the same contents are secured in both the MMs so that the hot standby system of the MM is realized to improve operations at a time of a failure. Nevertheless, the system shown in Figs. 10 and 11 may cause a difference between the contents of both MMs at the time of a failure of the FIFO, thus causing a disadvantage in that the hot standby is not realized. Namely, if the FIFO fails, a package of the FIFO must be replaced, etc., in an actual operation of the system. But, according to the arrangement shown in Fig. 10, the FIFO and the CPU are in the same system so that the active CPU is switched to the standby CPU when replacing the package. Nevertheless, since the contents of both the MMs are not the same, operation of the system must be once stopped according to the system shown in Figs. 10 and 11, to switch the systems from one to the other. To avoid the problem as shown in Figs. 12 and 13, a route is provided for bypassing an FIFO when the FIFO fails. In Figs. 12 and 13, the same parts as those shown in Figs. 10 and 11 are represented by the same reference numerals. Numerals 121 and 121' are 2-1 selectors for selecting the bypass route. To bypass the FIFO to write data from a CPU 81 directly into a standby MM 84', a cross delay time must be compensated, and therefore, an MM access timing must be extended compared to that of a normal FIFO. Figure 14 is a time chart showing changes in the MM access timing of the FIFO in a normal state and in a failure state. As apparent from the figure, when the FIFO is normal, the CPU 81 outputs a bus request signal RQP, and in response to this, if an enabling signal GP is returned from an MMCTL 45, data is written into an own MM 84 and an own FIFO 83 simultaneously. A writing time as this moment is four cycles of 3 to 6 processor cycles. If the FIFO fails, writing is carried out for the own MM 84 and for the other MM 84' simultaneously, and the writing is not carried out with respect to the FIFO 83 which has failed. For the cross delay time, a processor cycle 7 is allocated. Figure 15 is a time chart showing a data transfer timing from the FIFO 83 to the other MM 84′. This timing is substantially the same as the timing explained with reference to Fig. 5, and thus an explanation thereof will be omitted. The operation of the system shown in Figs.12 and 13 is the same as that of the system shown in Figs. 10 and 11, except for the operation at the time of failure of the FIFO, and therefore, only the operation at the time of FIFO failure will be described. For example, if the FIFO 83 causes a problem such as a parity error, a fault indication signal F will be 1. Accordingly, the 2-1 selector 121 to which the input and output of the FIFO 83 are connected selects B to bypass the FIFO 83. On the other hand, the fault indication signal F is also given to the gate 132 so that an output RQF of the D-type flip-flop cannot pass through the gate 132. Therefore, the standby MMCTL 45′ is not activated, and the FIFO 83 does not autonomously transfer data to the standby MM 84′, because the 2-1 selector 121 selects B in response to the fault indication signal F but does not select the output of the FIFO 83. When the CPU 81 writes data into the active MM 84, the CPU 81 gives a write instruction signal WT to the FIFO 83. The signal WT is given as a write instruction control signal WTC through the 2-1 selector 130 and gate 131 to the MMCTL 45. Also, the signal WT becomes a signal WTC′ through the 2-1 selector 130′ and gate 131′ of the standby system. At this time, the gates 131 and 131′ are in an open state due to a signal G indicating the fault in the FIFO. When the signals WTC and WTC′ enter the MMCTL 45 and MMCTL 45′, the same data is written in the 84 and MM 84′ with the timing shown in Fig.14. If the FIFO fails, the MM access time increases due to the cross delay so that the processing capacity of the CPU decreases, but in this state, the contents of both MMs are compared with each other and, if there is a difference therebetween, data is transferred from the current system to the standby system to make them coincide with each other. As a result, the CPUs can be switched from one to another while the processing is continued. Namely, it is not necessary to once stop the processing as in the embodiment shown in Figs. 10 and 11. If the FIFO 83 is full of data, queuing may be realized with the same circuit as that shown in Fig. 7. As described above with reference to Figs. 8 to 15, according to the write through mode of the other embodiment of the present invention, the provision of the FIFOs and the autonomous reading mechanisms thereof enable data to be written into the MM of the other system at a speed at which the data is written into the MM of the own system. Namely, at the MM access speed at which the data is written into the own MM, the hot memory standby system is realized. As apparent from the above explanations, according to the present invention, in a hot standby memory copy system including main storage devices that are duplexed, FIFOs are provided to eliminate a consideration of cross delay in writing data from a CPU into both the main storage devices to improve a processing speed. In addition, it is not necessary to consider the influence of the cross delay in cache memories, so that the high speed of the cache memories can be properly utilized.

Claims: A hot standby memory copy system including two computers, one being active and the other standing by, each of them including a central processing unit (1, 1') and a main storage device (2, 2'), both main storage devices being connected for copying the data of the active processor in the stand-by one, characterized in that a cache memory (3, 4, 3', 4') is connected between the central processing unit and the main storage devices of each system, each cache memory including a device (3, 3') for caching the data and a first-in first-out memory (4, 4'), wherein the first-in first-out of the active system is connected to the main storage device of the stand-by system and the first-in first-out of the stand-by system is connected to the main memory of the active system, that, when the CPU of the active system updates a data in its main storage device, this data is also updated in the cache of the active system and copied in the first-in first-out of the active system, and that means (23, 23') are provided for copying said data contained in the first-in first-out into the main storage device stand-by unit after the data of the cache and the first-in first-out of the active system has been updated. A hot standby memory copy system as claimed in claim 1, wherein, when the cache memory connected to a currently used one of the central processing units (1, 1') accessed to the main storage devices (2, 2'), data writing is carried out on both of the duplexed main storage devices while data reading is carried out from one of the duplexed main storage devices. A hot standby memory copy system as claimed in any of the preceding claims, wherein means (45) is provided to periodically send a request (RQF, RQC) for securing a bus connected to the main storage devices and, after securing the bus, read out the contents of said first-in first-out memory (25) and write the read data into both of the duplexed main storage devices (24, 24'). A hot standby memory copy system as claimed in any of the preceding claims, wherein a means (FE) is provided for referring to an empty indication of said first-in first-out memory (25) connected to one of the duplexed central processing units and, when the central processing units are switched from one to the other, the other system is started as a new current system after confirming that the empty indication (RCMP) exists. A hot standby memory copy system as claimed in any of the preceding claims, wherein, when data is written from the central processing unit (21) into the cache memory (22), the same data is simultaneously written into the main storage device (24) to realize a write through mode. A hot standby memory copy system as claimed in any of the preceding claims, wherein means (WW) is provided to put the central processing unit (21) in a queue in writing data from the central processing unit into the cache memory (22) and into said first-in first-out memory (25), if said first-in first-out memory is full at the time when the central processing unit is going to write the data into said first-in first-out memory. A hot standby memory copy system as claimed in any of the preceding claims, wherein means (F) are provided for detecting and indicating that a fault is caused in said first-in first-out memories (83, 83'), and for an occurence of the fault, there are provided means for transferring data from one of the duplexed central processing units (81, 81') directly to the other of the duplexed main storage devices by bypassing a failed one of said first-in first-out memories, means for extending a memory access cycle with respect to the main storage devices (84, 84') and means for stopping an autonomous transferring operation of said first-in first-out memory.

Inventors: SHIBATA YUJI, URUSHIHARA TETSUO, SHIBATA, YUJI, URUSHIHARA, TETSUO
Applicants: FUJITSU LTD, FUJITSU LIMITED
Application year: 1988
Main classification: G06F11
IPC codes: G06F11, G06F12, G06F5