JPH05204757A - Cache memory - Google Patents

Cache memory

Info

Publication number
JPH05204757A
JPH05204757A JP4010623A JP1062392A JPH05204757A JP H05204757 A JPH05204757 A JP H05204757A JP 4010623 A JP4010623 A JP 4010623A JP 1062392 A JP1062392 A JP 1062392A JP H05204757 A JPH05204757 A JP H05204757A
Authority
JP
Japan
Prior art keywords
column
cache
search
column number
virtual
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP4010623A
Other languages
Japanese (ja)
Inventor
Fumihiro Sawada
文弘 澤田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP4010623A priority Critical patent/JPH05204757A/en
Publication of JPH05204757A publication Critical patent/JPH05204757A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE:To improve the cache hit rate of the cache memory. CONSTITUTION:This cache memory is provided with a cache directory 3 to store addresses from a level '1' to a level '4,' cache directory 4 to store addresses from a level '5' to a level '8,' decoder 2 to convert addresses to column numbers, cache search logics 6 and 7 to search the respective cache directories 3 and 4 based on the column numbers, column conversion register 5 to respectively reload the virtual column numbers and the real column numbers, control part 9 to reload the real column numbers in this column conversion register 5, memory 8 to store the column number retrieved by the cache search logic 7 and the number of times for the retrieval, and used column register 11 to store the MAX used column number and the MIN used column number.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、例えばマッピング方
式のキャッシュメモリに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a mapping type cache memory.

【0002】[0002]

【従来の技術】従来から、例えばハードディスク(HD
D)などより情報を取り出すときにはディスク用のキャ
ッシュメモリが用いられている。このキャッシュメモリ
は、情報アクセスを高速化するために、HDDなど記録
された情報のうち高頻度に利用される情報を一時的に蓄
積しておくもので、所望の情報がこのキャッシュメモリ
内に存在する確立(ヒット率)が高いほどアクセスタイ
ムの短縮効果が大きく、このヒット率の向上が望まれて
いる。
2. Description of the Related Art Conventionally, for example, a hard disk (HD
A disk cache memory is used to retrieve information from D) or the like. This cache memory temporarily stores information frequently used among recorded information such as an HDD in order to speed up information access, and desired information exists in the cache memory. The higher the probability of establishment (hit rate), the greater the effect of shortening the access time, and the improvement of this hit rate is desired.

【0003】ここで、図5および図6を参照して従来の
キャッシュメモリのメモリエリア構成について説明す
る。
A memory area structure of a conventional cache memory will be described with reference to FIGS. 5 and 6.

【0004】図5において、51はキャッシュメモリの
メモリエリアである。このメモリエリア51は、それぞ
れのn個のカラムに分割されている。各カラムにはカラ
ム番号が付されており、それぞれ固定されたレベル数m
の中にキャッシュブロック52が格納されている。この
レベル数mは、キャッシュメモリのサイズ、キャッシュ
ブロックサイズ、カラム数などから決められる。
In FIG. 5, reference numeral 51 is a memory area of the cache memory. The memory area 51 is divided into n columns. A column number is attached to each column, and the fixed number of levels m
The cache block 52 is stored in. The level number m is determined from the cache memory size, the cache block size, the number of columns, and the like.

【0005】このようなメモリエリア51を有するキャ
ッシュメモリにHDDなどのディスクアドレスが入力さ
れると、このディスクアドレスによりサーチ対象カラム
は、一対一に対応して決められる。
When a disk address such as an HDD is input to the cache memory having such a memory area 51, the search target columns are determined in a one-to-one correspondence with the disk address.

【0006】ここで、図6のディスクアドレスの構成図
を参照してサーチ対象カラムの求め方について説明す
る。
Here, how to obtain the search target column will be described with reference to the disk address configuration diagram of FIG.

【0007】ディスクアドレス61は、一つのカラムに
割り当てられているレベル数を越えると新たに異なるカ
ラムに割り当てられ、さらにキャッシュブロック数×カ
ラム数を越えると再び始めのカラムに割り当てられる。
The disk address 61 is newly assigned to a different column when the number of levels assigned to one column is exceeded, and is again assigned to the first column when the number of cache blocks × the number of columns is exceeded.

【0008】例えば、図5に示したメモリエリア51の
全サイズが4MByte、キャッシュブロックサイズが4KByt
e、ディスクのセクタサイズが256Byte 、カラム数が6
4、レベル数が16である場合、4KByteのキャッシュブロ
ックを記憶するためにセクタサイズ256Byte の大きさか
ら16のセクタが割り当てられる。この16のセクタにセク
タ番号を付すためには、ディスクアドレス61の0 bit
から3 bit までの4 bit が必要になり、ディスクアドレ
ス61の端の4 bit はカラム番号に無関係になる。ま
た、カラム数が64ということからディスクアドレス61
が64×16セクタ=1024セクタを越えると、ディスクアド
レス61は、再び同一のカラムに割り当てられるのでデ
ィスクアドレス61の10bit より上位のbit もカラム番
号に無関係になる。すなわち、ディスクアドレス61の
4 bit から9 bit までがカラム番号となるので、カラム
番号は、ディスクアドレス61の一部を取り出しデコー
ドすることにより求められる。
For example, the total size of the memory area 51 shown in FIG. 5 is 4 MByte, and the cache block size is 4 KByt.
e, the sector size of the disk is 256Byte, the number of columns is 6
4. If the number of levels is 16, 16 sectors are allocated from a sector size of 256 bytes to store a 4KByte cache block. To add a sector number to these 16 sectors, 0 bit of the disk address 61
4 bits from 1 to 3 bits are required, and the 4 bits at the end of the disk address 61 are irrelevant to the column number. Since the number of columns is 64, the disk address 61
If the number exceeds 64 × 16 sectors = 1024 sectors, the disk address 61 is again assigned to the same column, so that bits higher than 10 bits of the disk address 61 are also irrelevant to the column number. That is, the disk address 61
Since 4 to 9 bits are the column number, the column number is obtained by extracting a part of the disk address 61 and decoding it.

【0009】例えばディスクアドレス61が(12345)hな
らば、バイナリコードでは、(00010010001101000101)b
なので、カラム番号としては4 bit から9 bit までが取
り出されて(110100)b =(34)h =52となる。
For example, if the disk address 61 is (12345) h, the binary code is (00010010001101000101) b.
Therefore, 4 to 9 bits are extracted as the column number, and (110100) b = (34) h = 52.

【0010】このようにキャッシュメモリでは、ディス
クアドレス61よりカラム番号が導かれこのカラム番号
に基づいて対象カラムがサーチされる。なお、応答時間
を向上させるために、通常、所定のカラム内だけがサー
チされる。
As described above, in the cache memory, the column number is derived from the disk address 61, and the target column is searched based on this column number. In addition, in order to improve the response time, usually, only a predetermined column is searched.

【0011】サーチ結果、つまりキャッシュヒットした
かどうかは、対象カラムの全てのキャッシュブロック5
2を検索して検知する。キャッシュヒットしなかった場
合は、置換アルゴリズムに基づいてあるキャッシュブロ
ック52のデータが捨てられ、HDDより新しいデータ
がそのキャッシュブロック52にロードされる。
The search result, that is, whether or not there is a cache hit is determined by all cache blocks 5 in the target column.
Search for 2 and detect. If there is no cache hit, the data in a certain cache block 52 is discarded based on the replacement algorithm, and newer data from the HDD is loaded into that cache block 52.

【0012】ところで、このキャッシュメモリでは、全
カラムのレベル数mが固定されている(同じである)た
め、使用頻度の高いカラムはレベル数mが不足する一
方、使用頻度の低いカラムはキャッシュブロック52が
有効に使われずに、キャッシュメモリ全体としてキャッ
シュヒット率が低下してしまう。
By the way, in this cache memory, the number m of levels of all columns is fixed (same), so the number m of levels is insufficient for columns that are frequently used, while the number of levels m is low for columns that are not frequently used. 52 is not used effectively, and the cache hit rate decreases as a whole cache memory.

【0013】[0013]

【発明が解決しようとする課題】このように上記した従
来のキャッシュメモリでは、各カラムのレベル数が固定
されていることから所定カラムの使用頻度が高くなると
レベル数が不足する事態が生じ、キャッシュ全体のヒッ
ト率が低下するという問題があった。
As described above, in the conventional cache memory described above, since the number of levels of each column is fixed, the number of levels may become insufficient when the frequency of use of a predetermined column becomes high, and the cache may not be cached. There was a problem that the overall hit rate decreased.

【0014】本発明のキャッシュメモリは上記した目的
を達成するために、各カラムのレベル数を有効に活用し
てキャッシュヒット率を向上させることのできるキャッ
シュメモリを提供することを目的とする。
In order to achieve the above object, it is an object of the cache memory of the present invention to provide a cache memory which can effectively utilize the number of levels of each column to improve the cache hit rate.

【0015】[0015]

【課題を解決するための手段】本発明のキャッシュメモ
リは上記した目的を達成するために、メモリエリアに複
数のカラムを有し、これらのカラムのキャッシュブロッ
クを格納するレベル数が固定されたキャッシュメモリに
おいて、前記メモリエリアを複数の領域に区分してそれ
ぞれの領域に対応するアドレスを格納する第1および第
2のキャッシュディレクトリと、アクセス要求としての
アドレスが入力されるとこのアドレスをカラム番号に変
換するデコーダと、このデコーダより出力されたカラム
番号に基づいて前記第1のキャッシュディレクトリにつ
いて第1のサーチを行う第1のサーチロジックと、前記
カラム番号に対応する仮想カラム番号と第2のサーチが
行われる複数の実カラム番号とをそれぞれ格納するカラ
ム変換レジスタと、このカラム変換レジスタに入力され
た前記カラム番号に基づいて前記仮想カラム番号を検索
し、一致した仮想カラム番号に従う複数の実カラム番号
を出力させる手段と、前記複数の実カラム番号に基づき
前記第2のキャッシュディレクトリについて第2のサー
チを行う第2のサーチロジックと、この第2のサーチに
より検索されたカラム番号およびその検索回数のうち検
索回数の少ないカラム番号と検索回数の多いカラム番号
とを記憶する使用カラムレジスタと、この使用カラムレ
ジスタより各カラム番号を読み出し、検索回数の多いカ
ラム番号と一致する前記カラム変換レジスタ内の仮想カ
ラム番号を検索し、前記カラム変換レジスタに前記仮想
カラム番号に従う実カラム番号として前記各カラム番号
を書き込む手段とを具備している。
In order to achieve the above-mentioned object, a cache memory of the present invention has a plurality of columns in a memory area and has a fixed number of levels for storing cache blocks of these columns. In the memory, first and second cache directories that divide the memory area into a plurality of areas and store addresses corresponding to the respective areas, and when an address as an access request is input, this address is used as a column number. A decoder for conversion, a first search logic for performing a first search for the first cache directory based on a column number output from the decoder, a virtual column number corresponding to the column number, and a second search. And a column conversion register that stores each of the multiple real column numbers A means for searching the virtual column number based on the column number input to the column conversion register and outputting a plurality of real column numbers according to the matched virtual column number; and a second means based on the plurality of real column numbers. A second search logic for performing a second search for the cache directory of, and a column number searched by the second search and a column number with a small number of searches and a column number with a large number of searches among the number of searches. The column register to be used and each column number from the column register to be used are searched, the virtual column number in the column conversion register that matches the column number that is searched many times is searched, and the column conversion register is operated according to the virtual column number. And a means for writing each column number as a column number.

【0016】[0016]

【作用】本発明では、アクセス要求としてアドレスが入
力されると、このアドレスはデコーダによりカラム番号
に変換される。そして、変換されたカラム番号に基づき
第1のサーチが行われる。
In the present invention, when an address is input as an access request, this address is converted into a column number by the decoder. Then, the first search is performed based on the converted column number.

【0017】一方、このカラム番号はカラム変換レジス
タにも入力される。このカラム変換レジスタには、使用
回数の多い仮想カラムに従う実カラム番号が複数書き込
まれており、これら複数の実カラム番号が第2のサーチ
ロジックに出力される。
On the other hand, this column number is also input to the column conversion register. In this column conversion register, a plurality of real column numbers according to a virtual column that has been used many times are written, and these plurality of real column numbers are output to the second search logic.

【0018】そして、これら複数の実カラム番号に基づ
き第2のサーチが行われ、この結果メモリエリアの複数
のカラムがサーチされる。
Then, a second search is performed on the basis of these plural real column numbers, and as a result, plural columns of the memory area are searched.

【0019】すなわち、使用回数の多いカラムがアクセ
ス要求されると、第1および第2のサーチによりメモリ
エリアをサーチする対象となるカラム数が増加する。
That is, when an access request is made to a column that has been used a large number of times, the number of columns to be searched in the memory area is increased by the first and second searches.

【0020】この結果、キャッシュメモリのキャッシュ
ヒット率が向上する。
As a result, the cache hit rate of the cache memory is improved.

【0021】[0021]

【実施例】以下、本発明の実施例を図面を参照して詳細
に説明する。
Embodiments of the present invention will now be described in detail with reference to the drawings.

【0022】図1は本発明に係る一実施例のキャッシュ
メモリの構成を示すプロック図である。
FIG. 1 is a block diagram showing the structure of a cache memory according to an embodiment of the present invention.

【0023】同図において、1はディスクアドレスレジ
スタであり、ディスクアドレスが格納されている。2は
デコーダであり、ディスクアドレスレジスタ1より出力
されたディスクアドレスをデコードしてカラム番号を出
力する。3、4はキャッシュディレクトリであり、ソフ
トウェアにより予めメモリエリアが複数の領域に区分さ
れており、それぞれの領域に対応するディスクアドレス
および各キャッシュブロックの状態フラグが格納されて
いる。例えば本実施例では、一方のキャッシュディレク
トリ3には、カラムのレベル数のうち1 〜4 レベルまで
のディスクアドレスが格納され、他のキャッシュディレ
クトリ4には、カラムのレベル数のうち5 〜8 レベルま
でのディスクアドレスが格納されている。5はカラム変
換レジスタであり、デコードされたカラム番号に対応す
る仮想カラムと、この仮想カラム番号に従う複数、例え
ば2 つの実カラム番号がそれぞれ格納されている。6は
第1のキャッシュサーチロジックであり、デコードされ
たカラム番号に基づきキャッシュディレクトリ3につい
て第1のサーチを行う。7は第2のキャッシュサーチロ
ジックであり、カラム変換レジスタよりの実カラム番号
に基づきキャッシュディレクトリ4について第2のサー
チを行う。また、このキャッシュサーチロジック7は、
カラム変換レジスタ5より出力される実カラム番号の個
数(本実施例では実カラム番号は2 つなので2 回)だけ
キャッシュディレクトリ4をサーチする。8はメモリで
あり、キャッシュサーチロジック7がキャッシュディレ
クトリ4を検索した回数およびカラム番号が記憶され
る。9は制御部であり、各レジスタに対するディスクア
ドレス制御およびカラム番号の割り付けおよび書き込み
などを行う。10はリザルトレジスタであり、各キャッ
シュサーチロジック6、7の検索結果、一方あるいは互
いにミスヒットが生じた場合、制御部9により優先度の
低い方のカラムのレベル数が格納される。11は使用カ
ラムレジスタであり、検索回数の最も多いカラム番号お
よびその検索回数(MAX 使用カラム)と、検索回数の最
も少ないカラム番号および検索回数(MIN 使用カラム)
とをそれぞれ一時記憶する。
In the figure, 1 is a disk address register, which stores a disk address. Reference numeral 2 is a decoder which decodes the disk address output from the disk address register 1 and outputs a column number. Reference numerals 3 and 4 denote cache directories, in which the memory area is divided into a plurality of areas in advance by software, and the disk address and the status flag of each cache block corresponding to each area are stored. For example, in the present embodiment, one cache directory 3 stores disk addresses of 1 to 4 levels out of the number of column levels, and another cache directory 4 stores 5 to 8 levels out of the number of column levels. The disk addresses up to are stored. A column conversion register 5 stores a virtual column corresponding to the decoded column number and a plurality of, for example, two real column numbers according to the virtual column number. A first cache search logic 6 performs a first search for the cache directory 3 based on the decoded column number. A second cache search logic 7 performs a second search for the cache directory 4 based on the actual column number from the column conversion register. Also, this cache search logic 7
The cache directory 4 is searched by the number of real column numbers output from the column conversion register 5 (twice because the real column number is two in this embodiment). A memory 8 stores the number of times the cache search logic 7 has searched the cache directory 4 and the column number. Reference numeral 9 denotes a control unit, which performs disk address control for each register, allocation of column numbers, and writing. Reference numeral 10 is a result register, and the search results of the cache search logics 6 and 7, and when one or a mutual hit occurs, the control unit 9 stores the level number of the column having the lower priority. Reference numeral 11 is a used column register, which is the column number with the largest number of searches and the number of times that it was searched (MAX used columns), and the column number with the smallest number of searches and the number of searches (MIN used columns)
And are temporarily stored.

【0024】次に、図2のフローチャートを参照してこ
のキャッシュメモリの動作を説明する。
Next, the operation of this cache memory will be described with reference to the flow chart of FIG.

【0025】このキャッシュメモリでは、アクセス要求
によりディスクアドレスがディスクアドレスレジスタ1
に入力されると(ステップ201 )、制御部9はディスク
アドレスレジスタ1よりディスクアドレスをデコーダ2
に出力させる。そして、このデコーダ2によってディス
クアドレスがカラム番号に変換されてサーチ対象カラム
が決定される(ステップ202 )。カラム番号はデコーダ
2より出力されてキャッシュサーチロジック6とカラム
変換レジスタ5にそれぞれ入力される(ステップ203
)。キャッシュサーチロジック6では、入力されたカ
ラム番号に基づいてキャッシュディレクトリ3のディス
クアドレスの有無を検出するための第1のサーチが行わ
れる。
In this cache memory, the disk address is transferred to the disk address register 1 by an access request.
(Step 201), the controller 9 outputs the disk address from the disk address register 1 to the decoder 2
To output. Then, the decoder 2 converts the disk address into a column number to determine the search target column (step 202). The column number is output from the decoder 2 and input to the cache search logic 6 and the column conversion register 5 (step 203).
). The cache search logic 6 performs a first search for detecting the presence or absence of the disk address of the cache directory 3 based on the input column number.

【0026】制御部9は、入力されたカラム番号と一致
する仮想カラム番号があるかどうかカラム変換レジスタ
5内を検索する(ステップ204 )。一致する仮想カラム
番号があると、制御部9によりこの仮想カラム番号に従
う複数、例えば2 つの実カラム番号が読み出されてキャ
ッシュサーチロジック7に入力される(ステップ20
5)。キャッシュサーチロジック7では、2 つの実カラ
ム番号に基づいてキャッシュディレクトリ4のディスク
アドレスの有無を検出するための第2のサーチが行われ
る。なお、2 つの実カラム番号の数値は、それぞれ0 か
らn までの数値であり、0 の場合は、サーチ対象が無い
ことを示しキャッシュディレクトリ4について第2のサ
ーチは行われない。
The control unit 9 searches the column conversion register 5 for a virtual column number that matches the input column number (step 204). When there is a matching virtual column number, a plurality of, for example, two real column numbers according to this virtual column number are read by the control unit 9 and input to the cache search logic 7 (step 20).
Five). The cache search logic 7 performs a second search for detecting the presence or absence of the disk address of the cache directory 4 based on the two real column numbers. Note that the numerical values of the two real column numbers are numerical values from 0 to n, and if 0, it means that there is no search target, and the second search is not performed for the cache directory 4.

【0027】このようにして、2 つのキャッシュサーチ
ロジック6、7によりそれぞれのキャッシュディレクト
リ3、4が同時にサーチされる(ステップ206 )。
In this way, the two cache search logics 6 and 7 simultaneously search the respective cache directories 3 and 4 (step 206).

【0028】各キャッシュサーチロジック6、7のサー
チ結果はメモリ8およびリザルトレジスタ10にそれぞ
れ格納される(ステップ207 )。メモリ8には、キャッ
シュサーチロジック7がサーチしたカラム番号およびそ
の検索回数が格納される。また、リザルトレジスタ10
には、2 つのキャッシュサーチロジック6、7のサーチ
結果がOR結合されてそれぞれのサーチ結果に応じたレ
ベル数が格納される。例えば互いがミスヒットの場合、
優先度の低い方のレベル数が格納される。
The search results of the cache search logics 6 and 7 are stored in the memory 8 and the result register 10 (step 207). The memory 8 stores the column number searched by the cache search logic 7 and the number of times of searching. In addition, the result register 10
In, the search results of the two cache search logics 6 and 7 are OR-combined and the number of levels corresponding to each search result is stored. For example, when each other is a hit,
The number of levels with lower priority is stored.

【0029】続いて、キャッシュサーチロジック7は、
ある時点、例えば最もサーチされた回数の多いカラムの
サーチ回数と、サーチ回数が最も少ないカラムのサーチ
回数との差が10:1になった時点で、メモリ8に格納され
ているカラム番号およびその検索回数を読み出し、その
時点のサーチ回数情報の中から複数、例えば2 つのカラ
ムの情報を取り出し使用カラムレジスタ11に格納する
(ステップ208 )。例えば最もサーチされた回数の多い
カラム(MAX 使用カラム)のカラム番号のサーチ回数
と、サーチ回数が最も少ないカラム(MIN 使用カラム)
のカラム番号のサーチ回数とをそれぞれ使用カラムレジ
スタ11に格納する。なお、実際にサーチされた実カラ
ム番号と仮想カラム番号とが違う場合のサーチ回数情報
と、実カラム番号と仮想カラム番号とが同じ場合のサー
チ回数情報とは別々に取り出される。使用カラムレジス
タ11に各サーチ回数情報が入力されると、制御部9は
使用カラムレジスタ11より各サーチ回数情報を読み出
し、これらのカラム番号のうち、MAX 使用カラム番号に
基づいてカラム変換レジスタ5内を検索し、MAX 使用カ
ラム番号と一致する仮想カラム番号に従う実カラムの欄
にMAX 使用カラム番号およびMIN 使用カラム番号とを書
き込む(ステップ209 )。また、MIN 使用カラム番号と
一致する仮想カラム番号に従う実カラムの欄には、0 、
0 を書き込む。
Subsequently, the cache search logic 7
At a certain point of time, for example, when the difference between the number of searches for the column with the largest number of searches and the number of searches for the column with the smallest number of searches becomes 10: 1, the column number stored in the memory 8 and its column number are stored. The number of times of retrieval is read out, and information of a plurality of columns, for example, two columns is taken out from the information on the number of times of retrieval at that time and is stored in the used column register 11 (step 208). For example, the number of searches for the column number of the column with the highest number of searches (MAX used column) and the column with the least number of searches (MIN used column)
And the number of searches for the column numbers are stored in the used column register 11, respectively. Note that the search count information when the actually searched real column number and virtual column number are different and the search count information when the real column number and virtual column number are the same are extracted separately. When each search count information is input to the use column register 11, the control unit 9 reads each search count information from the use column register 11, and the column conversion register 5 in the column conversion register 5 based on the MAX use column number among these column numbers. And writes the MAX used column number and the MIN used column number in the column of the real column according to the virtual column number that matches the MAX used column number (step 209). Also, in the column of the real column that follows the virtual column number that matches the column number used by MIN, 0,
Write 0.

【0030】ここで、図3を参照してメモリエリアのカ
ラムがサーチされた状態について説明する。
Here, a state in which the memory area column is searched will be described with reference to FIG.

【0031】同図に示すように、メモリエリア31内に
は、複数、例えば1 〜8 のカラムが設けられている。こ
れらのカラムはレベル数が固定されており、例えば1 〜
8 のレベルを有し、この中にハードディスク(HDD)
などから局所的にコピーしたキャッシュブロックが格納
されている。例えば1 〜 4のレベルには、キャッシュサ
ーチロジック6がキャッシュディレクトリ3をサーチし
た結果、導き出されたディスクアドレスに対応するキャ
ッシュブロックが格納されている。
As shown in the figure, a plurality of, for example, 1 to 8 columns are provided in the memory area 31. These columns have a fixed number of levels, for example 1 ~
It has 8 levels, in which hard disk (HDD)
Stores the cache block copied locally from the. For example, at the levels 1 to 4, the cache block corresponding to the disk address derived as a result of the cache search logic 6 searching the cache directory 3 is stored.

【0032】一方、5 から8 までのレベルには、キャッ
シュサーチロジック7がキャッシュディレクトリ4をサ
ーチした結果、導き出されたディスクアドレスに対応す
るキャッシュブロックが格納されている。
On the other hand, at the levels 5 to 8, the cache block corresponding to the disk address derived as a result of the cache search logic 7 searching the cache directory 4 is stored.

【0033】ここで、アクセスがある程度行われた後の
ある時点におけるカラム変換レジスタ5の内容が、図4
に示すようになっていた場合の各サーチ動作について説
明する。なお、カラム変換レジスタ5の実カラム欄の下
段は、第1のサーチが行われるカラム欄、上段は第2の
サーチが行われるカラム欄を示す。また、その数値の0
はサーチ対象が存在しないことを示し、1 〜8 はサーチ
対象カラムの実カラム番号を示す。さらに、仮想カラム
欄の数字は仮想カラム番号を示し、この仮想カラム番号
が制御部9による検索対象となる。1 〜8 の仮想カラム
番号のうち、例えば 2の仮想カラムに従う実カラム番号
は、2 つ(2 、3 )の実カラム番号である。
Here, the contents of the column conversion register 5 at a certain point in time after the access is performed to some extent are shown in FIG.
Each search operation in the case shown in FIG. The lower column of the actual column column of the column conversion register 5 shows the column column in which the first search is performed, and the upper column shows the column column in which the second search is performed. Also, the number 0
Indicates that there is no search target, and 1 to 8 indicates the actual column number of the search target column. Further, the number in the virtual column column indicates the virtual column number, and this virtual column number is the search target by the control unit 9. Of the virtual column numbers 1 to 8, the real column numbers that follow the virtual column of 2, for example, are two (2, 3) real column numbers.

【0034】この場合、アクセス要求が2 のカラム番号
について行われると、制御部9によりカラム変換レジス
タ5が検索されて2 のカラム番号と一致する2 の仮想カ
ラムに従う2 、3 の実カラム番号がキャッシュサーチロ
ジック7に出力され第2のサーチが行われる。
In this case, when the access request is made with respect to the column number of 2, the control unit 9 searches the column conversion register 5 and the real column numbers of 2 and 3 which follow the virtual column of 2 matching the column number of 2 are obtained. It is output to the cache search logic 7 and the second search is performed.

【0035】一方、第1のサーチ結果から2 のカラムの
1 〜4 レベルがサーチされ、これと同時に、第2のサー
チ結果から2 のカラムの5 〜8 レベルがサーチされ、こ
れに続き、3 のカラムの5 〜8 レベルがサーチされるの
で、第1および第2のサーチ結果によりサーチされたレ
ベル数の合計は12レベルになる。
On the other hand, from the first search result, the second column
The first to fourth levels are searched, and at the same time, the second search result is searched for the fifth to fifth levels in the second column, followed by the fifth to eighth levels in the third column. And the total number of levels searched by the second search result is 12 levels.

【0036】また、アクセス要求段階でカラム番号3 を
要求した場合、仮想カラム番号3 には、実カラム番号0
、0 が格納されておりキャッシュサーチロジック7の
サーチ対象が無くディスクアドレスはサーチされない。
したがって、実際にメモリエリア31のカラムがサーチ
されるのは、第1のサーチによる3 のカラムの中の1 〜
4 レベルまでの計4 レベルのみである。なお、カラム変
換レジスタ5の実カラム番号は、アクセス回数が増すご
とに使用カラムレジスタ11のMAX 使用カラムおよびMI
N 使用カラムが書き換えられるので変化してゆく。
Further, when the column number 3 is requested at the access request stage, the virtual column number 3 has the real column number 0
, 0 are stored, there is no search target of the cache search logic 7, and the disk address is not searched.
Therefore, the columns of the memory area 31 are actually searched for from 1 to 3 of the 3 columns by the first search.
There are only 4 levels in total, up to 4 levels. Note that the actual column number of the column conversion register 5 is set to the MAX used column and MI of the used column register 11 each time the access count increases.
N The used column is rewritten, so it changes.

【0037】このように本実施例のキャッシュメモリに
よれば、カラム変換レジスタ5には、最も使用回数の多
いカラム番号と一致する仮想カラム番号に従う2 つの実
カラム番号、例えば最も使用回数の多いカラム番号と最
も使用回数の少ないカラム番号とが書き込まれて、最も
使用回数の多いカラムの5 〜8 のレベルに続き最も使用
回数の少ないカラムの5 〜8 のレベルがサーチされるの
で使用回数の最も多いカラムのレベル数を増加させるこ
とができる。また、使用回数の最も少ないカラムのレベ
ル数は、必要最低限になる。
As described above, according to the cache memory of the present embodiment, the column conversion register 5 has two real column numbers according to the virtual column number that coincides with the column number used most frequently, for example, the column used most frequently. The number and the least used column number are written, and the 5 to 8 levels of the most used column are followed by the 5 to 8 levels of the least used column so that the most used column is searched. The number of levels for many columns can be increased. In addition, the number of levels of the column that is used the least is the minimum required.

【0038】この結果、キャッシュメモリ全体としてキ
ャッシュヒット率を向上することができる。
As a result, the cache hit rate can be improved for the entire cache memory.

【0039】なお、本発明は、応用例としてハードディ
スク(HDD)の他、フロッピーディスク、光ディスク
などのキヤッシュメモリとして用いることができる。
The present invention can be used as a cache memory such as a floppy disk and an optical disk in addition to a hard disk (HDD) as an application example.

【0040】また、本発明は、最大(MAX )、最小(MI
N )だけでなく使用カラムレジスタを細分化しこの数だ
けカラム変換レジスタの欄数を設ければ、各カラムのレ
ベル数をよりキャッシュヒット率が高くなるように増減
させることが可能である。
Further, according to the present invention, the maximum (MAX) and the minimum (MI
Not only N) but also subdividing the used column register and providing the number of columns of the column conversion register by this number, it is possible to increase or decrease the number of levels of each column so that the cache hit rate becomes higher.

【0041】[0041]

【発明の効果】以上説明したように本発明のキャッシュ
メモリによれば、各カラムの使用回数に応じて各カラム
のレベル数が増減できるので各カラムのレベル数を有効
に活用できる。この結果、キャッシュヒット率を向上す
ることができる。
As described above, according to the cache memory of the present invention, the number of levels in each column can be increased or decreased according to the number of times each column is used, so that the number of levels in each column can be effectively utilized. As a result, the cache hit rate can be improved.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明に係る一実施例のキャッシュメモリのハ
ードウェア構成を説明するためのブロック図である。
FIG. 1 is a block diagram for explaining a hardware configuration of a cache memory according to an embodiment of the present invention.

【図2】図1のキャッシュメモリの動作を説明するため
のフローチャート。
FIG. 2 is a flowchart for explaining the operation of the cache memory shown in FIG.

【図3】本発明に係る一実施例のキャッシュメモリのメ
モリエリアの状態を示す図である。
FIG. 3 is a diagram showing a state of a memory area of a cache memory according to an embodiment of the present invention.

【図4】アクセスがある程度行われた後のある時点にお
けるカラム変換レジスタの内容である。
FIG. 4 shows the contents of a column conversion register at a certain point in time after access has been performed to some extent.

【図5】従来のキャッシュメモリのメモリエリアの状態
を示す図である。
FIG. 5 is a diagram showing a state of a memory area of a conventional cache memory.

【図6】従来のキャッシュメモリのディスクアドレスの
構成を示す図である。
FIG. 6 is a diagram showing a configuration of a disk address of a conventional cache memory.

【符号の説明】[Explanation of symbols]

1…ディスクアドレスレジスタ、2…デコーダ、3、4
…キャッシュディレクトリ、5…カラム変換レジスタ、
6、7…キャッシュサーチロジック、8…メモリ、9…
制御部、10…リザルトレジスタ、11…使用カラムレ
ジスタ。
1 ... Disk address register, 2 ... Decoder, 3, 4
... cache directory, 5 ... column conversion register,
6, 7 ... Cache search logic, 8 ... Memory, 9 ...
Control unit, 10 ... Result register, 11 ... Used column register.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 メモリエリアに複数のカラムを有し、こ
れらのカラムのキャッシュブロックを格納するレベル数
が固定されたキャッシュメモリにおいて、 前記メモリエリアを複数の領域に区分してそれぞれの領
域に対応するアドレスを格納する第1および第2のキャ
ッシュディレクトリと、 アクセス要求としてのアドレスが入力されるとこのアド
レスをカラム番号に変換するデコーダと、 このデコーダより出力されたカラム番号に基づいて前記
第1のキャッシュディレクトリについて第1のサーチを
行う第1のサーチロジックと、 前記カラム番号に対応する仮想カラム番号と第2のサー
チが行われる複数の実カラム番号とをそれぞれ格納する
カラム変換レジスタと、 このカラム変換レジスタに入力された前記カラム番号に
基づいて前記仮想カラム番号を検索し、一致した仮想カ
ラム番号に従う複数の実カラム番号を出力させる手段
と、 前記複数の実カラム番号に基づき前記第2のキャッシュ
ディレクトリについて第2のサーチを行う第2のサーチ
ロジックと、 この第2のサーチにより検索されたカラム番号およびそ
の検索回数のうち検索回数の少ないカラム番号と検索回
数の多いカラム番号とを記憶する使用カラムレジスタ
と、 この使用カラムレジスタより各カラム番号を読み出し、
検索回数の多いカラム番号と一致する前記カラム変換レ
ジスタ内の仮想カラム番号を検索し、前記カラム変換レ
ジスタに前記仮想カラム番号に従う実カラム番号として
前記各カラム番号を書き込む手段とを具備したことを特
徴とするキャッシュメモリ。
1. In a cache memory having a plurality of columns in a memory area and having a fixed number of levels for storing cache blocks of these columns, the memory area is divided into a plurality of areas, and each area is associated with each area. First and second cache directories for storing the addresses to be stored, a decoder for converting the addresses into column numbers when an address as an access request is input, and the first cache directory based on the column numbers output from the decoder. A first search logic for performing a first search for the cache directory of, and a column conversion register for storing a virtual column number corresponding to the column number and a plurality of real column numbers for which a second search is performed, respectively. Based on the column number input to the column conversion register, the virtual A means for searching a RAM number and outputting a plurality of real column numbers according to the matched virtual column number; and a second search logic for performing a second search on the second cache directory based on the plurality of real column numbers. , A column number retrieved by this second search and a column number used for storing a column number having a small number of retrievals and a column number having a large number of retrievals among the number of retrievals, and each column number read from the column column used ,
A means for searching a virtual column number in the column conversion register that matches a column number that is frequently searched and writing each column number as an actual column number according to the virtual column number in the column conversion register. And cache memory.
JP4010623A 1992-01-24 1992-01-24 Cache memory Withdrawn JPH05204757A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4010623A JPH05204757A (en) 1992-01-24 1992-01-24 Cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4010623A JPH05204757A (en) 1992-01-24 1992-01-24 Cache memory

Publications (1)

Publication Number Publication Date
JPH05204757A true JPH05204757A (en) 1993-08-13

Family

ID=11755351

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4010623A Withdrawn JPH05204757A (en) 1992-01-24 1992-01-24 Cache memory

Country Status (1)

Country Link
JP (1) JPH05204757A (en)

Similar Documents

Publication Publication Date Title
JP2831602B2 (en) Compressed data management device and compressed data management method
JP4717130B2 (en) Generating a full hash using an offset table
US6115787A (en) Disc storage system having cache memory which stores compressed data
JP3371044B2 (en) Area allocation method and disk array access method for disk array
JP3399520B2 (en) Virtual uncompressed cache in compressed main memory
JP2534465B2 (en) Data compression apparatus and method
US8122216B2 (en) Systems and methods for masking latency of memory reorganization work in a compressed memory system
US8621134B2 (en) Storage tiering with minimal use of DRAM memory for header overhead
KR980010784A (en) Compressed Data Cache Storage System
JP2009510552A (en) Data management method in flash memory media
US4821171A (en) System of selective purging of address translation in computer memories
WO2011049051A1 (en) Cache memory and control method thereof
JPH1131096A (en) Data storage/retrieval system
US7509473B2 (en) Segmented storage system mapping
US10754786B2 (en) Memory access method using simplified mapping table requiring smaller memory space
JP2002014776A (en) Disk control system and data rearranging method
JPH07261938A (en) Storage control method and disk system with compressing function using the storage control method
JPH05204757A (en) Cache memory
CN108304331B (en) NorFlash-based circular queue type data storage method and device
GB2391350A (en) Non-volatile memory which can be directly overwritten
US6742077B1 (en) System for accessing a memory comprising interleaved memory modules having different capacities
JPH0863397A (en) Method for controlling disk cache
KR20080112069A (en) System and method for writing data using a pram in a device based on input-output of block unit
JPH0614325B2 (en) Replacement method
JPS6331808B2 (en)

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19990408