<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ep-patent-document PUBLIC "-//EPO//EP PATENT DOCUMENT 1.1//EN" "ep-patent-document-v1-1.dtd">
<ep-patent-document id="EP96102388B1" file="EP96102388NWB1.xml" lang="en" country="EP" doc-number="0727745" kind="B1" date-publ="20020522" status="n" dtd-version="ep-patent-document-v1-1">
<SDOBI lang="en"><B000><eptags><B001EP>......DE....FRGB................................................................</B001EP><B005EP>J</B005EP><B007EP>DIM350 (Ver 2.1 Jan 2001)
 2100000/0</B007EP></eptags></B000><B100><B110>0727745</B110><B120><B121>EUROPEAN PATENT SPECIFICATION</B121></B120><B130>B1</B130><B140><date>20020522</date></B140><B190>EP</B190></B100><B200><B210>96102388.4</B210><B220><date>19960216</date></B220><B240><B241><date>19970218</date></B241><B242><date>20000204</date></B242></B240><B250>en</B250><B251EP>en</B251EP><B260>en</B260></B200><B300><B310>3043595</B310><B320><date>19950220</date></B320><B330><ctry>JP</ctry></B330></B300><B400><B405><date>20020522</date><bnum>200221</bnum></B405><B430><date>19960821</date><bnum>199634</bnum></B430><B450><date>20020522</date><bnum>200221</bnum></B450><B451EP><date>20010423</date></B451EP></B400><B500><B510><B516>7</B516><B511> 7G 06F  12/08   A</B511></B510><B540><B541>de</B541><B542>Cache-Speichersteuervorrichtung und Methode</B542><B541>en</B541><B542>Cache memory control apparatus and method</B542><B541>fr</B541><B542>Dispositif et procédé de commande d'antémémoire</B542></B540><B560><B562><text>COMPUTER ARCHITECTURE NEWS, vol. 21, no. 2, 1 May 1993, pages 76-86, XP000380356 JAI MENON ET AL: "THE ARCHITECTURE OF A FAULT-TOLERANT CACHED RAID CONTROLLER"</text></B562><B562><text>PATENT ABSTRACTS OF JAPAN vol. 017, no. 614 (P-1642), 11 November 1993 &amp; JP-A-05 189314 (HITACHI LTD), 30 July 1993,</text></B562></B560><B590><B598>1</B598></B590></B500><B600><B620EP><parent><cdoc><dnum><anum>01126232.6</anum><pnum>1193600</pnum></dnum><date>20011105</date></cdoc></parent></B620EP></B600><B700><B720><B721><snm>Takahashi, Misako</snm><adr><str>Hitachi Kozu Daiichi Apato 22, 2400</str><city>Kozu,
Odawara-shi</city><ctry>JP</ctry></adr></B721><B721><snm>Asaka, Yoshihiro</snm><adr><str>Garden Court 102, 2-1</str><city>Yahagi,
Odawara-shi</city><ctry>JP</ctry></adr></B721><B721><snm>Kishiro, Shigeru</snm><adr><str>5-5-207, Nakazato</str><city>Odawara-shi</city><ctry>JP</ctry></adr></B721><B721><snm>Yamamoto, Akira</snm><adr><str>5-61, Wakamatsu-6-chome</str><city>Sagamihara-shi</city><ctry>JP</ctry></adr></B721></B720><B730><B731><snm>Hitachi, Ltd.</snm><iid>00204141</iid><irf>EPA-35355</irf><adr><str>6, Kanda Surugadai 4-chome</str><city>Chiyoda-ku,
Tokyo 101</city><ctry>JP</ctry></adr></B731></B730><B740><B741><snm>Strehl Schübel-Hopf &amp; Partner</snm><iid>00100941</iid><adr><str>Maximilianstrasse 54</str><city>80538 München</city><ctry>DE</ctry></adr></B741></B740></B700><B800><B840><ctry>DE</ctry><ctry>FR</ctry><ctry>GB</ctry></B840></B800></SDOBI><!-- EPO <DP n="1"> -->
<description id="desc" lang="en">
<heading id="h0001">BACKGROUND OF THE INVENTION</heading>
<p id="p0001" num="0001">The invention relates to an information processing system constructed by a memory device and a memory control apparatus having a plurality of cache memories and, more particularly, to a memory control apparatus of an information processing system in which a memory device uses a technique of RAID.</p>
<p id="p0002" num="0002">In a conventional memory control apparatus having a cache memory, in response to a write instruction from a central processing unit, an end of writing process is reported to the central processing unit at a time point when write data has been stored into the cache memory in the memory control apparatus. The storage of the write data into a disk device is executed by the memory control apparatus asynchronously with the write instruction from the central processing unit. Such a control is called a write-after control. In the write-after control, when the end of writing process is reported to the central processing unit, since data is not transferred to the disk device, a high-speed response to the central processing unit can be performed.</p>
<p id="p0003" num="0003">In the data stored in the cache memory, the data before it is transferred to the disk device is called dirty data. On the other hand, in the data stored in the cache memory, the data which coincides with the<!-- EPO <DP n="2"> --> data in the disk device is called clean data. In an information processing apparatus for performing the write-after control, the dirty data is data which exists only on the cache memory in the memory control apparatus. Therefore, the dirty data cannot be deleted until the transfer to the disk device is finished.</p>
<p id="p0004" num="0004">A data transfer speed between the cache memory and the disk device is slower than a data transfer speed between the central processing unit and the cache memory. There is, consequently, a case where the cache memory is filled with the dirty data at the time of the write-after control. Therefore, a memory control apparatus disclosed in JP-A-4-264940 monitors an amount of dirty data in the cache, an inflow amount of write data to the cache memory of each memory device, and an outflow amount of dirty data due to the write-after process. When the dirty data amount in the cache reaches a certain threshold value (permission amount), a limitation of the allocation of the cache memory to the write data and a data writing preferential execution to the memory device are executed for the memory device in which (the inflow amount) &gt; (the outflow amount). Owing to the above control, a deterioration in performance of the whole system that is caused since the cache memory enters a full state is avoided and the distribution of the allocation of the cache memory for every memory device can be properly performed.</p>
<p id="p0005" num="0005">In the write-after process, since the cache memory is volatile, there is a possibility such that the<!-- EPO <DP n="3"> --> dirty data is extinguished due to a fault of a power source of a control apparatus or the like, a fault of a hardware of the cache memory, or the like. Therefore, in "Evolution of the DASD storage control" disclosed in IBM SYSTEMS JOURNAL, Vol. 28, No. 2, 1989, a memory control apparatus has therein a cache memory and a non-volatile memory (NVS) of a small capacity for backup of dirty data and the dirty data is duplexed and held in the cache memory and non-volatile memory (NVS), thereby preventing an extinction of the dirty data.</p>
<p id="p0006" num="0006">Further, a memory control apparatus having a plurality of cache memories which are backed up by a battery is disclosed in JP-A-5-189314. The memory control apparatus has a cache memory whose power source is duplexed by a battery backup. The cache memory is divided into N portions and data read out from a memory device by a command from an upper apparatus is stored into an arbitrary one of the N divided portions of the cache memory. Data which is written into the cache memory by an instruction from the upper apparatus is stored into arbitrary two of the N divided portions of the cache memory. Thus, a guarantee performance of the data at the time of a fault is improved and a deterioration of the performance can be prevented.</p>
<p id="p0007" num="0007">In case of using the technique of RAID for the disk device as a memory device, the memory control apparatus needs to form parity data to guarantee data at the time of the write-after process. Therefore, not only the<!-- EPO <DP n="4"> --> dirty data (write data) but also the clean data (data which is updated by the write data) need to be held on the cache memory.</p>
<p id="p0008" num="0008">In case of the memory control apparatus disclosed in JP-A-5-189314 in which data is duplexed and stored into a plurality of cache memories, therefore, there is a case where a balance of an amount of data which cannot be deleted until the data transfer to the disk device is completed is largely broken between the duplexed cache memories in depending on an allocating method of the cache memory for the clean data. When an amount of dirty data (including the clean data to form parity data) in one cache memory reaches a cache memory capacity or a preset dirty data threshold value (permission amount), even in the case where there is a usable area in the other cache memory, the dirty data cannot be duplexed. Thus, a response by the write-after process cannot be performed and the performance deteriorates.</p>
<p id="p0009" num="0009">Fig. 8 shows a case where a cache surface (cache to store clean data and dirty data as updated data of the clean data) and an NVS surface (cache to store the dirty data) of each of a cache A 80 and a cache B 81 of a memory control apparatus are fixedly used.</p>
<p id="p0010" num="0010">In case of using one of the two cache memories as a cache surface and the other as an NVS surface, as shown in Fig. 8(a), an amount of dirty data in the cache A 80 that is used as a cache surface is larger than an amount of dirty data in the cache B 81 that is used as an<!-- EPO <DP n="5"> --> NVS surface. Thus, as shown in Fig. 8(b), when the cache A 80 which is used as a cache surface is filled with the dirty data, in spite of the fact that a new usable area c still remains in the cache B 81, the dirty data cannot be duplexed. Therefore, the write-after process cannot be performed.</p>
<p id="p0011" num="0011">A memory control apparatus with similar disadvantages as the above-discussed prior art is disclosed in Jai Menon et al: "The Architecture of a Fault-Tolerant Cached RAID Controller"; Computer Architecture News, Vol. 21, No. 2, May 1993, pages 76 to 86, from which the first portion of claim 1 starts out. The.apparatus disclosed in this document has two cache memories and a cache memory control unit for controlling the use of the cache memories during data transfer between a central processor and a memory device both connected to the memory control apparatus.</p>
<p id="p0012" num="0012">Updated data from the central processor is received by the memory control apparatus and stored in the two cache memories in duplication. The original data to be updated is read from the memory device always into a predetermined one of the cache memories (if not already there) for use together with the updated data in obtaining updated parity information.</p>
<p id="p0013" num="0013">Hence, the updated data (dirty data) are written in duplication into both cache memories for safety against failure of one of them. And the data to be updated and read from the memory device (clean data) is additionally written always into one predetermined cache memory which will thus overflow easily while a large portion of the other remains unused.</p>
<heading id="h0002">SUMMARY OF THE INVENTION</heading>
<p id="p0014" num="0014">It is therefore an object of the invention to provide a memory control apparatus and method for improved efficiency in using cache memory space.</p>
<p id="p0015" num="0015">This object is solved by the apparatus of claim 1 and the method of claim 5. The subclaims are directed to preferred embodiments of the invention.</p>
<p id="p0016" num="0016">A memory control apparatus according to one embodiment of the invention comprises: a channel control unit, interposed between a central processing unit and a memory device for storing data, for controlling a data transfer to/from the central processing unit; a drive control unit to control a data transfer to/from the memory device; a plurality of cache memories for temporarily storing data that is transferred between the central processing unit and the memory device; and a cache memory control unit having selecting means for selecting the cache memory to store data which is transferred from the memory means. The selecting means arbitrarily selects a first cache memory which is used as a cache surface and a second cache memory which is used as an NVS surface from among a plurality of cache memories. There is a case where the cache memory control unit of<!-- EPO <DP n="6"> --><!-- EPO <DP n="7"> --> the memory control apparatus has memory means for storing control information of the memory control apparatus.</p>
<p id="p0017" num="0017">When the data is read out from the memory device, the memory control apparatus transfers the read data to the central processing unit and stores into the cache memory. In this instance, the memory control apparatus arbitrarily selects the cache memory which is used as a cache surface from a plurality of cache memories and stores the data into the selected cache memory.</p>
<p id="p0018" num="0018">When the data is written into the memory device, on the other hand, the memory control apparatus stores the write data transferred from the central processing unit into the cache memory. In this instance, when the data which is updated by the write data has been stored as clean data in the cache memory, the cache memory is used as a cache surface and clean data and dirty data as updated data for the clean data are stored. The memory control apparatus arbitrarily selects the cache memory which is used as an NVS surface from a plurality of cache memories and stores the dirty data into the cache memory.</p>
<p id="p0019" num="0019">As a specific method when the memory control apparatus selects the cache memory, there is a method of selecting the cache memory on the basis of a virtual or physical address or an identifier of data such as a sequence number or the like in case of dividing into management units.</p>
<p id="p0020" num="0020">As another embodiment,<!-- EPO <DP n="8"> --> there are provided: means for storing usable/unusable state information of each of the unit memories constructing the cache memory into the control memory of the memory control apparatus; and means for calculating the number of usable unit memories of each of the cache memories with reference to the usable/unusable state information of each of the unit memories, and wherein the cache memory is selected by the usable unit memory.</p>
<p id="p0021" num="0021">In another embodiment there are provided: means for storing memory use amount information of each of the cache memories into the control memory of the memory control apparatus; means for arbitrarily selecting the first cache memory and the second cache memory from a plurality of cache memories on the basis of the memory use amount information of each of the cache memories; and means for storing dirty data amount information of each of the cache memories or clean data amount information to form parity data into the control memory, and wherein the cache memory is selected on the basis of the dirty data amount information of each of the cache memories or the clean data amount information to form the parity data.</p>
<p id="p0022" num="0022">When the data is read out from the memory device, the memory control apparatus selects the cache memory which is used as a cache surface from a plurality of cache memories and stores the read data as clean data into the selected cache memory. In case of updating the clean data, the<!-- EPO <DP n="9"> --> memory control apparatus selects the cache memory which is used as an NVS surface from the plurality of cache memories and stores the write data into each of the cache memories which are used as a cache surface and an NVS surface. In this instance, the clean data stored in the cache memory that is used as a cache surface is also held on the cache memory.</p>
<p id="p0023" num="0023">When, as mentioned above, the memory control apparatus arbitrarily selects the cache memories to be used as a cache surface and an NVS surface from the plurality of cache memories, a deviation of the using states among the plurality of cache memories can be reduced.</p>
<p id="p0024" num="0024">In the case where the memory control apparatus selects the cache memory on the basis of an address of the data or a sequence number of the data, the data of a certain group unit having certain characteristics is divided and allocated into the plurality of cache memories by the address or sequence number of the data. Therefore, expect values of probabilities at which the data in the cache memory is updated are averaged among the plurality of cache memories and a cache memory space can be effectively used. That is, the probability of the data to be updated differs depending on the characteristics which the data has. Therefore, by allocating a group of data to the same cache memory, the occurrence of a deviation of the dirty data amounts among the plurality of cache memories in accordance with the data characteristics<!-- EPO <DP n="10"> --> is prevented, so that which cache memory is allocated to the divided data is decided by an identifier of the data.</p>
<p id="p0025" num="0025">In the case where the memory control apparatus selects the cache memory on the basis of the number of requesting times of the allocation of the cache memory, the memory control apparatus has means for holding the number of times of the cache memory selecting process or the number of blocks allocated onto the control memory. The memory control apparatus selects the cache memory on the basis of the number of processing times or the number of blocks. Therefore, since the expect values of the probabilities at which the data in the cache memory is updated are averaged among the plurality of cache memories, the cache memory space can be effectively used.</p>
<p id="p0026" num="0026">Further, in the case where the memory control apparatus selects the cache memory on the basis of the cache memory using state, the memory control apparatus has means for storing the using state information of each of the plurality of cache memories onto the control memory. The memory control apparatus selects which cache memory is allocated in accordance-with the using state of the cache memory. According to the above control method, by averaging the present using states of the cache memories, the cache memory space is effectively used.</p>
<p id="p0027" num="0027">On the other hand, the cache memory in the memory control apparatus of another embodiment is constructed by a plurality of unit memories which can each be closed.<!-- EPO <DP n="11"> --> When a certain unit memory is closed, the cache memory including the closed unit memory is called to be in a degenerate state. When there is a cache memory in the degenerate state, a balance of the capacities among the plurality of cache memories is broken. Therefore, it is necessary to control the memory allocation in consideration of a capacity ratio of the cache memory. For this purpose, the memory control apparatus has means for holding the closed state information of each unit memory as a component element of the plurality of cache memories, calculates the capacity of each cache memory by the closed state information, and selects the cache memory to be allocated in accordance with a capacity ratio. In this instance, the above method can be also commonly used.</p>
<heading id="h0003">BRIEF DESCRIPTION OF THE DRAWINGS</heading>
<p id="p0028" num="0028">
<ul id="ul0001" list-style="none" compact="compact">
<li>Fig. 1 shows a control constructional diagram of an embodiment of the invention;</li>
<li>Fig. 2 shows detailed contents of cache using state information;</li>
<li>Fig. 3 shows detailed contents of cache construction state information;</li>
<li>Fig. 4 shows an example of a selecting process of a cache memory of a cache surface;</li>
<li>Fig. 5 shows an example of the selecting process of the cache memory of the cache surface;</li>
<li>Fig. 6 shows an example of the selecting<!-- EPO <DP n="12"> --> process of the cache memory of the cache surface;</li>
<li>Fig. 7 shows an example of the selecting process of the cache memory of the cache surface; and</li>
<li>Fig. 8 is an explanatory diagram of a subject to be solved by the invention.</li>
</ul></p>
<heading id="h0004">DESCRIPTION OF THE PREFERRED EMBODIMENTS</heading>
<p id="p0029" num="0029">An embodiment of the invention will now be described hereinbelow with reference to the drawings.</p>
<p id="p0030" num="0030">Fig. 1 shows a control construction of an information processing system according to an embodiment of the invention. The information processing system has a processing unit (CPU 1), a memory device 2, and a memory control apparatus 3 connected to the processing unit 1 and memory device 2.</p>
<p id="p0031" num="0031">The memory control apparatus 3 is connected to the processing unit 1 through a channel control 31 and is connected to the memory device 2 through a drive control 32. Further, the memory control apparatus 3 includes therein: non-volatile cache memories A 33 and B 34 which are non-volatilized by a battery power source; a channel control unit 35; a drive control unit 36; a cache control unit 37; a construction control unit 38; and a control memory 39.</p>
<p id="p0032" num="0032">A construction of the memory device 2 and an outline of a flow of data will now be described hereinbelow. The memory device 2 constructs a disk array by a plurality of disk devices 21. In the disk array, data 22<!-- EPO <DP n="13"> --> is divided and divided data 221 is stored into the other different disk devices 21, respectively. Data (parity data) to guarantee the data is formed by the divided data 221 and is stored into the disk device 21 different from the disk device in which the data 221 was stored.</p>
<p id="p0033" num="0033">In the embodiment, the divided data 221 is managed on a slot unit basis. The "slot" includes a plurality of records and is a unit which is managed by a unique number called a slot number. A state in which the data corresponding to a read request and a write request issued from the processing unit 1 have already existed in the cache memory A 33 or B 34 is referred to as a read hit and a write hit, respectively. On the contrary, a state in which the requested data doesn't exist in the cache memory is referred to as a read miss and a write miss, respectively. In the data on the cache memory, the data which coincides with the data in the memory device 2 is called clean data. In the data on the cache memory, the updated data which is not stored in the memory device 2 but has been stored in only the cache memory is called dirty data.</p>
<p id="p0034" num="0034">In the case where the read request for the data 22 in the memory device 2 is issued from the processing unit 1, the data is read out by each disk control unit and, after that, the data 22 is stored into the cache memory A 33 or B 34.</p>
<p id="p0035" num="0035">In the case where the write request for the memory device 2 is issued from the processing unit 1, the<!-- EPO <DP n="14"> --> data as a target to be updated is read out from the memory device 2 into the cache memory at the time of the write miss. At a time point when the updated data is written into the cache memory, the memory control apparatus 3 returns a response indicative of the end of the writing process to the processing unit (write-after control). In the writing process, the data written in the cache memory becomes dirty data. The dirty data is duplexed and stored into the cache memories A 33 and B 34. In this instance, the clean data before updating which was read out from the memory device 2 is held as it is in the cache memory.</p>
<p id="p0036" num="0036">The process to write the dirty data into the memory device 2 is executed asynchronously with the write request from the processing unit 1. New parity data is formed by the dirty data and clean data in the cache memory. The dirty data and the new parity data are written into the memory device 2. At the time point when the writing process is finished, the data as a target of the writing process doesn't need to be duplexed and held as dirty data into the cache memories. This data, accordingly, is held as clean data in either one of the two cache memories. The data can be also deleted from the cache memory.</p>
<p id="p0037" num="0037">As mentioned above, the cache memory to store the clean data and the dirty data in which the clean data was updated is called a cache surface and the cache memory to store the other one of the duplexed dirty data<!-- EPO <DP n="15"> --> is called an NVS surface.</p>
<p id="p0038" num="0038">A control of the memory control apparatus which is used in the invention will now be described. The cache memory A 33 is constructed by n unit cache memories (A-1, A-2, ..., A-n) 331 and can be closed every unit cache memory 331. A state of the cache memory including the closed unit cache memory is referred to as a degenerate state. A state of the cache memory in the case where all of the unit cache memories 331 included in the cache memory is referred to as a closed state. The same shall also similarly applied to the cache memory B 34 and unit cache memories 341.</p>
<p id="p0039" num="0039">The cache control unit 37 has means 371 for allocating the cache memory to store data when the data is stored into the cache memory in association with the reading/writing process from the processing unit 1.</p>
<p id="p0040" num="0040">A construction control unit 38 manages a normal/closed state of each of the unit cache memories 331 and 341 and a normal/degenerate/closed state of each of the cache memories 33 and 34 and holds as cache construction state information 392 onto a control memory 39. The cache control unit 37 manages using states of the cache memories 33 and 34 and holds as cache using state information 391 onto the control memory 39.</p>
<p id="p0041" num="0041">Figs. 2 and 3 show the details of the cache using state information 391 and cache construction state information 392. Using state information 3911 of the cache memory A and using state information 3912 of the<!-- EPO <DP n="16"> --> cache memory B are included in the cache using state information 391. Total capacities 39111 and 39121, total use amounts 39112 and 39122, dirty data amounts 39113 and 39123, and usable memory capacities 39114 and 39124 are recorded in the using state information 3911 and 3912, respectively. The total capacity is a capacity of the cache memory installed. The usable memory capacity is a normal total capacity of the unit cache memory. Cache memory A construction state information 3921 and cache memory B construction state information 3922 are included in the cache construction state information 392. Cache memory usable/unusable information 39211 and 39221 and unit cache memory usable/unusable information 39212 and 39222 are held in the construction state information 3921 and 3922, respectively. Further, the number of executing times of the selecting process of the cache memory of the cache surface, namely, the number of executing times of the allocation of the memory for the clean data is stored into the cache memory of the cache surface by the cache control unit 37. The cache control unit 37 uses those information when the cache memories are allocated.</p>
<p id="p0042" num="0042">An example of a process to select the cache memory which is used as a cache surface from the cache memory A 33 or B 34 when allocating the cache memories will now be described hereinbelow. In the embodiment, since two cache memories are provided, the selecting process of the NVS surface is unnecessary.</p>
<p id="p0043" num="0043">In the case where the read request is issued<!-- EPO <DP n="17"> --> from the processing unit 1 to the memory device 2, the read data is read out from the disk device and, after that, the data 22 is stored into the cache memory selected as a cache surface by the cache control unit 37.</p>
<p id="p0044" num="0044">When the write request is issued from the processing unit 1 to the memory device 2, in case of the write miss, the cache memory which is used as a cache surface is selected by the cache control unit 37. The memory control apparatus 3 stores the updating target data which was read out from the memory device 2 into the cache memory of the cache surface and writes the updated data into the cache memory serving as a cache surface and the other cache memory serving as an NVS surface. In case of the write hit, the dirty data as updated data for the clean data is stored into the cache memory of the cache surface in which the clean data has been stored and the other cache memory as an NVS surface. In this instance, the clean data is held as it is in the cache memory of the cache surface.</p>
<p id="p0045" num="0045">An example of the process to select the cache memory that is used as a cache surface will now be described with reference to a flowchart.</p>
<p id="p0046" num="0046">Fig. 4 shows an example of the selecting process of the cache memory which is used as a cache surface. The cache control unit 37 refers to the slot number of the data which is stored into the cache memory (step 400). A check is made to see if the slot number is an even number or an odd number (step 410). When the<!-- EPO <DP n="18"> --> slot number is an even number, the cache memory A 33 is selected as a cache memory which is used as a cache surface (step 420). When the slot number is an odd number, the cache memory B is selected as a cache memory which is used as a cache surface (step 430). The allocating process of the cache memories is executed (step 440). In the example, although the above judgment has been made on the basis of whether the slot number is an even number or an odd number, so long as a unit in which a deviation of data characteristics is small, it is also possible to distribute the cache surfaces every slot number and to select.</p>
<p id="p0047" num="0047">Fig. 5 shows another example of the cache memory selecting process which is used as a cache surface. The cache control unit 37 refers to the cache memory A dirty data amount 39113 in the control memory 39 and the data amount 39123 that is used as cache memory B dirty (step 500). The dirty data amounts 39113 and 39123 are compared (step 510). The cache memory of a smaller dirty data amount is selected as a cache memory which is used as a cache surface (steps 520, 530). The allocation of the cache memories is performed (step 540).</p>
<p id="p0048" num="0048">Fig. 6 shows still another example of the cache memory selecting process of the cache surface. In step 600, the cache control unit 37 refers to a counter 393. In step 610, a check is made to see if a counter value of the counter 393 is an even number or an odd number, and on the basis of a judgment result, the cache<!-- EPO <DP n="19"> --> surface cache memory is selected (steps 620, 630). The cache memories are allocated in step 640.</p>
<p id="p0049" num="0049">Fig. 7 shows further another example of the cache memory selecting process of the cache surface. The cache control unit 37 refers to the cache construction state information 392 (step 700). The usable memory capacities 39114 and 39124 of the cache memories are calculated, respectively (step 710) and are recorded into the cache using state information 391. Subsequently, a usable memory capacity ratio of every cache memory surface is calculated (step 720). It is now assumed that the capacity ratio (cache memory A : cache memory B) is equal to N : M. In step 730, the slot number is referred in a manner similar to the selecting process shown in Fig. 4. A remainder in the case where the slot number is divided by (N + M) is obtained (step 740). When the remainder is equal to or less than N, the cache memory A is selected as a cache surface (step 750). In the other cases, the cache memory B is selected as a cache surface (step 760). In step 770, the cache memories are allocated. In the example, although the selection of the cache surface by the slot number has been shown, the selecting process by the counter value shown in Fig. 6 can be also used in steps 730 to 750.</p>
<p id="p0050" num="0050">The example of the selecting process of the cache memory of the cache surface has been shown above. In the embodiment, since the two cache memories are provided, the selecting process of the NVS surface is<!-- EPO <DP n="20"> --> unnecessary. In case of providing N cache memories, however, the selecting process is also needed with respect to the selecting process of the NVS surface. In such a case, it will be obviously understood that the selecting process of the cache memory as a cache surface can be applied.</p>
<p id="p0051" num="0051">The memory control apparatus according to the invention can arbitrarily select the cache memory which is used as a cache surface or an NVS surface from among a plurality of cache memories. Therefore, the using states of the cache memories can be preferably balanced and there is an effect such that the using efficiency of the space of the cache memory is improved.</p>
</description><!-- EPO <DP n="21"> -->
<claims id="claims01" lang="en">
<claim id="c-en-01-0001" num="0001">
<claim-text>A memory control apparatus for interposition between a central processing unit (1) and a memory device (2) for storing data, comprising:
<claim-text>a channel control unit (35) for controlling a data transfer to/from said central processing unit (1),</claim-text>
<claim-text>a drive control unit (36) for controlling a data transfer to/from said memory device (2),</claim-text>
<claim-text>a plurality of cache memories (33, 34) for temporarily storing said data, and</claim-text>
<claim-text>a cache memory control unit (37) for controlling said cache memories so as to store updated data from said central processing unit (1) in duplication into two of said cache memories (33, 34),</claim-text>    <b>characterised in that</b> said cache control unit (37) comprises selecting means for selecting either a first or a second one of said cache memories (33, 34) for storing data from said memory device (2) so as to counteract a difference in the used space between said cache memories.</claim-text></claim>
<claim id="c-en-01-0002" num="0002">
<claim-text>An apparatus according to claim 1, comprising a control memory (39) for storing status information of said cache memories (33, 34),<br/>
   wherein a first and a second cache memory (33, 34) are provided and said selecting means stores updated data in duplication into said first and second cache memories (33,<!-- EPO <DP n="22"> --> 34) and selects said first or said second cache memory (33, 34) for storage of data from said memory device (2) based on said status information.</claim-text></claim>
<claim id="c-en-01-0003" num="0003">
<claim-text>An apparatus according to claim 2, wherein said status information includes the number of allocations of a cache memory to data from said memory device (2), or the number of blocks of a cache memory allocated to data from said memory device (2), or the amount of updated data in each cache memory, or the used space in each cache memory, or the usable space in each cache memory.</claim-text></claim>
<claim id="c-en-01-0004" num="0004">
<claim-text>An apparatus according to any of claims 1 to 3, wherein the data in said cache memories have an identifier indicative of a storing location in each cache memory, and the selecting means is adapted to select the cache memory based on said identifier.</claim-text></claim>
<claim id="c-en-01-0005" num="0005">
<claim-text>A method for controlling a memory control apparatus (3) having a plurality of cache memories (33, 34) for temporarily storing data transferred to/from a central processing unit (1) and to/from a memory device (2), comprising the following steps:
<claim-text>obtaining updated data from said central processing unit (1),</claim-text>
<claim-text>storing said updated data in duplication into two cache memories (33, 34),<!-- EPO <DP n="23"> --></claim-text>
<claim-text>reading data from said memory device (2), <b>characterised by</b> the step of</claim-text>
<claim-text>selecting either a first or a second one of said cache memories to store said read data so as to counteract a difference in the used space of said cache memories (33, 34).</claim-text></claim-text></claim>
<claim id="c-en-01-0006" num="0006">
<claim-text>A method according to claim 5, wherein the selecting step includes the following substeps:
<claim-text>comparing the amount of updated data in a first one of said cache memories with the amount of updated data in a second one of said cache memories (33, 34), and</claim-text>
<claim-text>selecting the cache memory having the smaller amount of updated data.</claim-text><!-- EPO <DP n="24"> --></claim-text></claim>
<claim id="c-en-01-0007" num="0007">
<claim-text>A method according to claim 5, wherein said data stored in said cache memory are managed as slots and the selecting step includes the following substeps:
<claim-text>calculating usable memory capacities N and M of first and second cache memories (33, 34),</claim-text>
<claim-text>calculating the ratio of N/M</claim-text>
<claim-text>obtaining a slot number of said data read from the memory device (2),</claim-text>
<claim-text>comparing N and the remainder resulting from dividing the slot number by N + M, and</claim-text>
<claim-text>selecting the first cache memory if said remainder is not greater than N and the second cache memory if said remainder is greater than N.</claim-text><!-- EPO <DP n="25"> --></claim-text></claim>
<claim id="c-en-01-0008" num="0008">
<claim-text>A method according to claim 5, wherein said data stored in said cache memory are managed as slots and the selecting step comprises the following substeps:
<claim-text>deciding whether a slot number of said read data is odd or even, and</claim-text>
<claim-text>selecting one cache memory if the slot number is even and another cache memory if the slot number is odd.</claim-text></claim-text></claim>
<claim id="c-en-01-0009" num="0009">
<claim-text>A method according to claim 5, wherein the selecting step comprises the following substeps:
<claim-text>deciding whether a counter (393) for the data read from the memory device (2) is odd or even, and</claim-text>
<claim-text>selecting one cache memory if the counter is even and selecting another cache memory if the counter is odd.</claim-text></claim-text></claim>
</claims><!-- EPO <DP n="26"> -->
<claims id="claims02" lang="de">
<claim id="c-de-01-0001" num="0001">
<claim-text>Speichersteuervorrichtung zum Einfügen zwischen einer zentralen Verarbeitungseinheit (1) und einer Speichereinrichtung (2) zum Speichern von Daten, aufweisend:
<claim-text>eine Kanalsteuereinheit (35) zum Steuern einer Datenübertragung zu bzw. von der zentralen Verarbeitungseinheit (1),</claim-text>
<claim-text>eine Laufwerksteuereinheit (36) zum Steuern einer Datenübertragung zu bzw. von der Speichereinrichtung (2),</claim-text>
<claim-text>mehrere Cache-Speicher (33, 34) zum vorübergehenden Speichern der Daten, und</claim-text>
<claim-text>eine Cache-Steuereinheit (37) zum Steuern der Cache-Speicher, so daß aktualisierte Daten von der zentralen Verarbeitungseinheit (1) doppelt in zwei der Cache-Speicher (33, 34) gespeichert werden,</claim-text>    <b>dadurch gekennzeichnet, daß</b> die Cache-Steuereinheit (37) eine Auswahleinrichtung aufweist, um entweder einen ersten oder einen zweiten der Cache-Speicher (33, 34) zur Speicherung von Daten von der Speichereinrichtung (2) auszuwählen, um einer Differenz im verwendeten Platz zwischen den Cache-Speichern entgegenzuwirken.</claim-text></claim>
<claim id="c-de-01-0002" num="0002">
<claim-text>Vorrichtung nach Anspruch 1 mit einem Steuerspeicher (39) zum Speichern von Statusinformationen über die Cache-Speicher (33, 34),<br/>
   wobei ein erster und ein zweiter Cache-Speicher (33, 34) vorgesehen sind und die Auswahleinrichtung aktualisierte Daten doppelt in den ersten und den zweiten Cache-Speicher (33, 34) speichert, und aufgrund der Statusinformationen den ersten oder den zweiten Cache-Speicher (33, 34) zum Speichern von Daten von der Speichereinrichtung auswählt.</claim-text></claim>
<claim id="c-de-01-0003" num="0003">
<claim-text>Vorrichtung nach Anspruch 2, wobei die Statusinformationen die Zahl an Zuweisungen von Cache-Speicher zu Daten von der Speichereinrichtung (2) oder die Zahl an Blöcken eines<!-- EPO <DP n="27"> --> Cache-Speichers, die Daten von der Speichereinrichtung (2) zugeordnet sind, oder die Menge an aktualisierten Daten in jedem Cache-Speicher oder den verwendeten Platz in jedem Cache-Speicher oder den verwendbaren Platz in jedem Cache-Speicher beinhalten.</claim-text></claim>
<claim id="c-de-01-0004" num="0004">
<claim-text>Vorrichtung nach einem der Ansprüche 1 bis 3, wobei die Daten in den Cache-Speichern eine Kennung aufweisen, die einen Speicherplatz in einem jeweiligen Cache-Speicher angibt, und die Auswahleinrichtung eingerichtet ist, den Cache-Speicher aufgrund der Kennung auszuwählen.</claim-text></claim>
<claim id="c-de-01-0005" num="0005">
<claim-text>Verfahren zur Steuerung einer Speichersteuereinrichtung (3) mit mehreren Cache-Speichern (33, 34) zum vorübergehenden Speichern von Daten, die zu bzw. von einer zentralen Verarbeitungseinheit (1) und zu bzw. von einer Speichereinrichtung (2) übertragen werden, mit folgenden Schritten:
<claim-text>Erhalten von aktualisierten Daten von der zentralen Verarbeitungseinheit (1),</claim-text>
<claim-text>Speichern der aktualisierten Daten doppelt in zwei Cache-Speichern (33, 34),</claim-text>
<claim-text>Lesen von Daten von der Speichereinrichtung (2),<br/>
   <b>gekennzeichnet durch</b> einen Schritt zum Auswählen entweder eines ersten oder eines zweiten der Cache-Speicher, um die genannten gelesenen Daten zu speichern und um einer Differenz in dem verwendeten Platz der Cache-Speicher (33, 34) entgegenzuwirken.</claim-text></claim-text></claim>
<claim id="c-de-01-0006" num="0006">
<claim-text>Verfahren nach Anspruch 5, wobei der Auswahlschritt außerdem folgende Unterschritte aufweist:
<claim-text>Vergleichen der Menge aktualisierter Daten in einem ersten der Cache-Speicher mit der Menge aktualisierter Daten in einem zweiten der Cache-Speicher (33, 34), und</claim-text>
<claim-text>Auswählen des Cache-Speichers mit der kleineren Menge aktualisierter Daten.</claim-text><!-- EPO <DP n="28"> --></claim-text></claim>
<claim id="c-de-01-0007" num="0007">
<claim-text>Verfahren nach Anspruch 5, wobei die in dem Cache-Speicher gespeicherten Daten als Slots verwaltet werden, und der Auswahlschritt folgende Unterschritte aufweist:
<claim-text>Berechnen verwendbarer Speicherkapazitäten N und M eines ersten und eines zweiten Cache-Speichers (33, 34),</claim-text>
<claim-text>Berechnen des Verhältnisses N/M,</claim-text>
<claim-text>Erhalten einer Slot-Nummer der aus der Speichereinrichtung (2) gelesenen Daten,</claim-text>
<claim-text>Vergleichen von N mit dem sich aus der Division der Slot-Nummer durch N + M ergebenden Rest, und</claim-text>
<claim-text>Auswählen des ersten Cache-Speichers, wenn der genannte Rest nicht größer als N ist, und des zweiten Cache-Speichers, wenn der genannte Rest größer als N ist.</claim-text></claim-text></claim>
<claim id="c-de-01-0008" num="0008">
<claim-text>Verfahren nach Anspruch 5, wobei die in dem Cache-Speicher gespeicherten Daten als Slots verwaltet werden, und der Auswahlschritt die folgenden Unterschritte aufweist:
<claim-text>Entscheiden, ob eine Slot-Nummer der gelesenen Daten gerade oder ungerade ist, und</claim-text>
<claim-text>Auswählen eines Cache-Speichers, wenn die Slot-Nummer gerade ist, und eines anderen Cache-Speichers, wenn die Slot-Nummer ungerade ist.</claim-text></claim-text></claim>
<claim id="c-de-01-0009" num="0009">
<claim-text>Verfahren nach Anspruch 5, wobei der Auswahlschritt folgende Unterschritte umfaßt:
<claim-text>Entscheiden, ob ein Zähler (393) für die von der Speichereinrichtung (2) gelesenen Daten gerade oder ungerade ist, und</claim-text>
<claim-text>Auswählen eines Cache-Speichers, wenn der Zähler gerade ist, und Auswählen eines anderen Cache-Speichers, wenn der Zähler ungerade ist.</claim-text></claim-text></claim>
</claims><!-- EPO <DP n="29"> -->
<claims id="claims03" lang="fr">
<claim id="c-fr-01-0001" num="0001">
<claim-text>Dispositif de commande de mémoire destiné à être interposé entre une unité centrale de traitement (1) et un dispositif de mémoire (2) pour y mémoriser des données, comportant :
<claim-text>une unité de commande de canal (35) pour commander un transfert de données vers ladite unité centrale de traitement (1) et à partir de celle-ci,</claim-text>
<claim-text>une unité de commande d'unité (36) pour commander un transfert de données vers ledit dispositif de mémoire (2) et à partir de celui-ci,</claim-text>
<claim-text>une pluralité de mémoires caches (33, 34) pour mémoriser temporairement lesdites données, et</claim-text>
<claim-text>une unité de commande de cache (37) pour commander lesdites mémoires caches de manière à mémoriser en double des données mises à jour par ladite unité centrale de traitement (1) dans deux mémoires parmi lesdites mémoires caches (33, 34),</claim-text>    <b>caractérisé en ce que</b> ladite unité de commande de cache (37) comporte des moyens de sélection pour sélectionner une première ou une seconde mémoire parmi lesdites mémoires caches (33, 34) pour y mémoriser des données provenant dudit dispositif de mémoire (2) de manière à contrecarrer une différence dans l'espace utilisé entre lesdites mémoires cache.</claim-text></claim>
<claim id="c-fr-01-0002" num="0002">
<claim-text>Dispositif selon la revendication 1, comportant une mémoire de commande (39) pour mémoriser des informations d'état desdites de mémoires caches (33, 34),<br/>
   dans lequel une première et une seconde mémoire cache (33, 34) sont fournies et lesdits moyens de sélection mémorisent en double des données mises à jour dans lesdites première et seconde mémoires caches (33, 34) et sélectionnent ladite première ou ladite seconde mémoire cache (33, 34) pour y mémoriser des<!-- EPO <DP n="30"> --> données provenant dudit dispositif de mémoire (2) sur la base desdites informations d'état.</claim-text></claim>
<claim id="c-fr-01-0003" num="0003">
<claim-text>Dispositif selon la revendication 2, dans lequel lesdites informations d'état incluent le nombre d'allocations d'une mémoire cache à des données provenant dudit dispositif de mémoire (2), ou le nombre de blocs d'une mémoire cache alloués à des données provenant dudit dispositif de mémoire (2), ou la quantité de données mises à jour dans chaque mémoire cache, ou l'espace utilisé dans chaque mémoire cache, ou l'espace utilisable dans chaque mémoire cache.</claim-text></claim>
<claim id="c-fr-01-0004" num="0004">
<claim-text>Dispositif selon l'une quelconque des revendications 1 à 3, dans lequel les données se trouvant dans lesdites mémoires caches ont un identificateur indicatif d'un emplacement de mémorisation dans chaque mémoire cache, et les moyens de sélection sont adaptés pour sélectionner la mémoire cache sur la base dudit identificateur.</claim-text></claim>
<claim id="c-fr-01-0005" num="0005">
<claim-text>Procédé pour commander un dispositif de commande de mémoire (3) ayant une pluralité de mémoires caches (33, 34) pour y mémoriser temporairement des données transférées vers une unité centrale de traitement (1) et à partir de celle-ci et vers un dispositif de mémoire (2) et à partir de celui-ci, comportant les étapes suivantes consistant à :
<claim-text>obtenir des données mises à jour à partir de ladite unité centrale de traitement (1),</claim-text>
<claim-text>mémoriser en double lesdites données mises à jour dans deux mémoires caches (33, 34),</claim-text>
<claim-text>lire des données à partir dudit dispositif de mémoire (2), <b>caractérisé par</b> l'étape consistant à</claim-text>
<claim-text>sélectionner une première ou une seconde mémoire parmi lesdites mémoires caches pour y mémoriser lesdites données lues de manière à contrecarrer une<!-- EPO <DP n="31"> --> différence dans l'espace utilisé desdites mémoires caches (33, 34).</claim-text></claim-text></claim>
<claim id="c-fr-01-0006" num="0006">
<claim-text>Procédé selon la revendication 5, dans lequel l'étape de sélection inclut les sous-étapes suivantes consistant à :
<claim-text>comparer la quantité de données mises à jour dans une première mémoire parmi lesdites mémoires caches à la quantité de données mises à jour dans une seconde mémoire parmi lesdites mémoires caches (33, 34), et</claim-text>
<claim-text>sélectionner la mémoire cache ayant la plus petite quantité de données mises à jour.</claim-text></claim-text></claim>
<claim id="c-fr-01-0007" num="0007">
<claim-text>Procédé selon la revendication 5, dans lequel lesdites données mémorisées dans ladite mémoire cache sont gérées sous forme de sections et l'étape de sélection inclut les sous-étapes suivantes consistant à :
<claim-text>calculer les capacités de mémoire utilisables N et M des première et seconde mémoires caches (33, 34),</claim-text>
<claim-text>calculer le rapport N/M,</claim-text>
<claim-text>obtenir un numéro de section desdites données lues à partir du dispositif de mémoire (2),</claim-text>
<claim-text>comparer N et le reste résultant de la division du numéro de section par N + M, et</claim-text>
<claim-text>sélectionner la première mémoire cache si ledit reste n'est pas supérieur à N et la seconde mémoire cache si ledit reste est supérieur à N.</claim-text></claim-text></claim>
<claim id="c-fr-01-0008" num="0008">
<claim-text>Procédé selon la revendication 5, dans lequel lesdites données mémorisées dans ladite mémoire cache sont gérées sous forme de sections et l'étape de sélection comporte les sous-étapes suivantes consistant à :
<claim-text>déterminer si un numéro de section desdites données lues est impair ou pair, et</claim-text>
<claim-text>sélectionner une mémoire cache si le numéro de section est pair et l'autre mémoire cache si le numéro de section est impair.</claim-text><!-- EPO <DP n="32"> --></claim-text></claim>
<claim id="c-fr-01-0009" num="0009">
<claim-text>Procédé selon la revendication 5, dans lequel l'étape de sélection comporte les sous-étapes suivantes consistant à :
<claim-text>déterminer si un compteur (393) se rapportant aux données lues à partir du dispositif de mémoire (2) est impair ou pair, et</claim-text>
<claim-text>sélectionner une mémoire cache si le compteur est pair et sélectionner l'autre mémoire cache si le compteur est impair.</claim-text></claim-text></claim>
</claims><!-- EPO <DP n="33"> -->
<drawings id="draw" lang="en">
<figure id="f0001" num=""><img id="if0001" file="imgf0001.tif" wi="167" he="242" img-content="drawing" img-format="tif"/></figure><!-- EPO <DP n="34"> -->
<figure id="f0002" num=""><img id="if0002" file="imgf0002.tif" wi="165" he="246" img-content="drawing" img-format="tif"/></figure><!-- EPO <DP n="35"> -->
<figure id="f0003" num=""><img id="if0003" file="imgf0003.tif" wi="173" he="184" img-content="drawing" img-format="tif"/></figure><!-- EPO <DP n="36"> -->
<figure id="f0004" num=""><img id="if0004" file="imgf0004.tif" wi="174" he="196" img-content="drawing" img-format="tif"/></figure><!-- EPO <DP n="37"> -->
<figure id="f0005" num=""><img id="if0005" file="imgf0005.tif" wi="175" he="198" img-content="drawing" img-format="tif"/></figure><!-- EPO <DP n="38"> -->
<figure id="f0006" num=""><img id="if0006" file="imgf0006.tif" wi="176" he="223" img-content="drawing" img-format="tif"/></figure><!-- EPO <DP n="39"> -->
<figure id="f0007" num=""><img id="if0007" file="imgf0007.tif" wi="179" he="232" img-content="drawing" img-format="tif"/></figure>
</drawings>
</ep-patent-document>
