JPH02253358A - Cache memory - Google Patents

Cache memory

Info

Publication number
JPH02253358A
JPH02253358A JP1075307A JP7530789A JPH02253358A JP H02253358 A JPH02253358 A JP H02253358A JP 1075307 A JP1075307 A JP 1075307A JP 7530789 A JP7530789 A JP 7530789A JP H02253358 A JPH02253358 A JP H02253358A
Authority
JP
Japan
Prior art keywords
value
block
priority
reference area
processor
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.)
Pending
Application number
JP1075307A
Other languages
Japanese (ja)
Inventor
Takio Maeda
多吉生 前田
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP1075307A priority Critical patent/JPH02253358A/en
Publication of JPH02253358A publication Critical patent/JPH02253358A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To set the cache hit rate in accordance with the priority of a process by increasing the value of a reference area for the data to which a process having high priority had an access. CONSTITUTION:When one of processors 1-4 produces an access request to a certain address, the value is produced in accordance with the priority of the processor that is carried out by the processor. When a cache has a hit, an access is given to the necessary data and at the same time the value added with the value corresponding to the priority is written into a reference area 53 in a block where the data is stored. Then the value of the reference area of each block is periodically decreased. When the value of the reference area is equal to 0, the corresponding block is defined as a candidate for replacement. However it is hard to define the data to which a process of high priority had an access as a candidate for replacement since the value of the reference area is large. As a result, the hit rate is increased for a cache memory of a process having high priority.

Description

【発明の詳細な説明】 産業上の利用分野 本発明はキャッシュメモリに関するものである0従来の
技術 従来のキャッシュメモリにおいて、ブロック置き換え方
法としてはFIFO(First−IN First−
Out)方法やLRU(Least Recently
 Used )方法等があるが、経費と効率の点から実
際に多く用いられている方法はLRUを近似した方法で
ある。第2図はそのI、RUを近似した方法の例を示し
たものであり、1はプロセッサにより発生されるアドレ
ス、2は前記アドレス内のアドレスタグ部、3はバッフ
ァ、4はバッファ内のブロック、6は前記ブロック内の
アドレスタグ、6は前記ブロック内のデータ、7は前記
ブロック内の参照ビット、8は置き換え用ポインタを示
す。
DETAILED DESCRIPTION OF THE INVENTION Field of Industrial Application The present invention relates to a cache memory.0 Prior Art In a conventional cache memory, a method for replacing blocks is FIFO (First-in-First-Input).
Out) method and LRU (Least Recently
There are several methods such as ``Used'', but the method that is actually most used from the viewpoint of cost and efficiency is a method that approximates LRU. FIG. 2 shows an example of the method of approximating I and RU, where 1 is the address generated by the processor, 2 is the address tag part in the address, 3 is the buffer, and 4 is the block in the buffer. , 6 indicates an address tag within the block, 6 indicates data within the block, 7 indicates a reference bit within the block, and 8 indicates a replacement pointer.

以上のように構成された従来のキャッシュメモリにおい
て、プロセッサからの要求に応じてアクセスされたブロ
ックの参照ビット7は1に設定される。一方、置き換え
用ポインタ8の示すブロック4の参照ビット7を0にさ
れ、置き換え用ポインタ8は次のブロックに進められる
。ある時点であるブロックの参照ビットが0であったと
すると、この参照ビットが0にされてからこのブロック
は参照されたことがないことを示しており、置き換えの
候補とされる。
In the conventional cache memory configured as described above, reference bit 7 of a block accessed in response to a request from a processor is set to 1. On the other hand, the reference bit 7 of the block 4 indicated by the replacement pointer 8 is set to 0, and the replacement pointer 8 is advanced to the next block. If the reference bit of a certain block is 0 at a certain point in time, this indicates that this block has never been referenced since the reference bit was set to 0, and is made a candidate for replacement.

発明が解決しようとする課題 しかしながら上記の置き換え方法では一つのキャッシュ
を参照する複数のプロセッサが各々プロセスを実行中で
あり、前記プロセスが各々優先度を有するとき、実行さ
れるプロセスのキャッシュのヒツト率は各プロセスのプ
ログラムの局所性の大小と、前記プロセスが実行されて
いるとき同時にその他どの様なプロセスが実行されてい
るかに依存し、前記プロセスの優先度に依存しない。
Problem to be Solved by the Invention However, in the above replacement method, when a plurality of processors that refer to one cache are each executing a process, and each of the processes has a priority, the cache hit rate of the executed process is depends on the locality of the program of each process and what other processes are being executed at the same time as the process is being executed, and does not depend on the priority of the process.

本発明はかかる点に鑑み、上記のような一つのキャッシ
ュを参照する複数のプロセッサが、実行中の各々のプロ
セスのキャッシュのヒツト率を前記プロセスの優先度に
依存させることを可能にするキャッシュメモリを提供す
ることを目的とする。
In view of this, the present invention provides a cache memory that allows a plurality of processors that refer to one cache as described above to make the cache hit rate of each executing process dependent on the priority of the process. The purpose is to provide

課題を解決するための手段 本発明は複数のブロックからなるバッファと、各ブロッ
クのデータ置き換えを制御する制御回路とを備え、複数
のプロセッサよシアクセス可能なキャッシュメモリにお
いて、前記バッファの各ブロックごとに複数個の参照ビ
ットを備えた参照領域を有し、プロセッサからの要求に
よりアクセスされたブロックの前記参照領域に、前記プ
ロセッサで実行中のプロセスの優先度に応じた値を書き
込む手段と、前記参照領域の値を減じる手段とを備えた
制御回路を有することを特徴とするキャッシュメモリ。
Means for Solving the Problems The present invention provides a cache memory that includes a buffer made up of a plurality of blocks and a control circuit that controls data replacement in each block, and that can be accessed by a plurality of processors. means having a reference area provided with a plurality of reference bits in the block, and writing a value corresponding to the priority of a process being executed by the processor into the reference area of a block accessed in response to a request from the processor; A cache memory characterized in that it has a control circuit equipped with means for subtracting a value of a reference area.

作用 本発明は前記した構成により、キャッシュメモリと結合
された複数のプロセッサの中の一つのプロセッサが、あ
るアドレスに対してアクセスの要求を発生するとき、同
時に前記プロセッサで実行中のプロセスの優先度に応じ
た値を発生し、もしキャッシュがヒツトすると必要なデ
ータへのアクセスと同時にデータが格納されたブロック
内の参照領域に優先度に応じた値を加えた値を書き込み
、もしキャッシュがヒツトしなければ、メインメモリか
ら必要なデータブロックを前記キャッシュメモリ内のバ
ッフ1メモリに読み込み、必要なデータへのアクセスと
同時に前記データが格納されたブロック内の参照領域に
優先度に応じた値を書き込む。各ブロックの前記参照領
域の値は定期的に減らされ、前記参照領域の値が0であ
ると、そのブロックは置き換えの候補とされるが、優先
度の高いプロセスがアクセスしたデータは参照領域の値
が高いため置き換えの候補となりに<<、逆に優先度の
低いプロセスのアクセスするデータは置き換えられ安い
ため優先度の高いプロセスの前記キャッシュメモリへの
ヒツト率が高まる。
According to the above-described configuration, when one processor among a plurality of processors connected to a cache memory issues an access request to a certain address, the priority of the process being executed by the processor is determined at the same time. Generates a value according to the priority, and if the cache is hit, a value corresponding to the priority is written to the reference area in the block where the data is stored at the same time as the necessary data is accessed. If not, read the necessary data block from the main memory into the buffer 1 memory in the cache memory, and at the same time as accessing the necessary data, write a value according to the priority to the reference area in the block where the data is stored. . The value of the reference area of each block is periodically decremented, and if the value of the reference area is 0, the block is considered a replacement candidate, but the data accessed by a high priority process is Since the value is high, it becomes a candidate for replacement. Conversely, since data accessed by a low priority process is easily replaced, the hit rate of the high priority process to the cache memory increases.

実施例 第1図は本発明の実施例におけるキャッシュメモリが複
数の10セツサと結合されているときの概略構成図を示
すものである。1,2,3.4はそれぞれプロセッサで
、11はプロセッサ1により発生されるアドレス、12
は前記アドレス内のアドレスタグ、13は前記アドレス
内の語選択部、14は前記プロセッサにより実行されて
いるプロセスの優先度、6はバッファ、61は前記バッ
ファ内のアドレスタグ、52は前記バッファ内のデータ
ブロック、63は前記バッファ内の参照領域、6はヒツ
ト信号、7はデータ線、8はプロセッサとのインターフ
ェイス部を示す。
Embodiment FIG. 1 shows a schematic configuration diagram of a cache memory in an embodiment of the present invention in which it is combined with a plurality of 10 setters. 1, 2, 3.4 are processors, 11 is an address generated by processor 1, and 12 is an address generated by processor 1.
is an address tag in the address, 13 is a word selection part in the address, 14 is the priority of the process being executed by the processor, 6 is a buffer, 61 is an address tag in the buffer, 52 is a word selection part in the buffer 63 is a reference area in the buffer, 6 is a hit signal, 7 is a data line, and 8 is an interface section with the processor.

以上のように構成された本実施例のキャッシュメモリに
ついて以下その動作を説明する。キャッシュメモリとイ
ンターフェイス部8を通じて結合された複数のプロセッ
サの中の一つのプロセッサ1が、あるアドレス11に対
してアクセスの要求を発生するとき、同時に前記プロセ
ッサで実行中のプロセスの優先度に応じた値14を発生
する。
The operation of the cache memory of this embodiment configured as described above will be described below. When one processor 1 among a plurality of processors connected to a cache memory through an interface section 8 issues an access request to a certain address 11, a request is made for access to a certain address 11 according to the priority of the process currently being executed by the processor. Generates a value of 14.

前記アドレス内のアドレスタグとキャッシュメモリ内の
アドレスタグが比較され、もしキャッシュがヒツトする
とヒツト信号が出力され、語選択部13によシヒットし
たブロックのデータブロックから必要なデータがデータ
線7から出力され、出力されたデータを含むブロックに
対応する参照領域6の値が読まれ、前記値と前記プロセ
ッサ1から発生された優先度14に応じた値とが加えら
れ、前記参照領域6にその値が書き込まれる。もしキャ
ッシュがヒツトしなければ、図には記していないデータ
置き換えを制御する制御回路によシ参照領域が0である
ブロックを探し、前記ブロックのデータを必要なものに
置き換え、前記プロセッサ1から発生された優先度14
に応じた値を前記ブロックの参照領域6に前記プロセッ
サから発生された優先度14に応じた値が書き込まれる
。各ブロックの前記参照領域の値は前記制御回路により
定期的に減らされ、前記参照領域の値がOであると、そ
のブロックは置き換えの候補とされる。
The address tag in the address is compared with the address tag in the cache memory, and if there is a hit in the cache, a hit signal is output, and the necessary data from the data block of the hit block is output from the data line 7 to the word selection unit 13. The value of the reference area 6 corresponding to the block containing the output data is read, the value and the value corresponding to the priority level 14 generated from the processor 1 are added, and the value is added to the reference area 6. is written. If the cache is not hit, a control circuit (not shown in the diagram) that controls data replacement searches for a block whose reference area is 0, replaces the data in the block with the necessary data, and Priority 14
A value corresponding to the priority 14 generated from the processor is written into the reference area 6 of the block. The value of the reference area of each block is periodically decreased by the control circuit, and when the value of the reference area is O, that block is made a candidate for replacement.

発明の詳細 な説明したように、本発明によれば優先度の高いプロセ
スがアクセスしたデータは参照領域の値が高いため置き
換えの候補となりに〈<、逆に優先度の低いプロセスの
アクセスするデータは置き換えられ安いため優先度の高
いプロセスの前記キャッシュメモリへのヒツト率が高ま
り、実行中の各々のプロセスのキャッシュのヒツト率を
前記プロセスの優先度に依存させることを可能にする。
As described in detail, according to the present invention, data accessed by a process with a high priority becomes a replacement candidate because the value of the reference area is high, and conversely, data accessed by a process with a low priority Since it is easy to replace, the cache memory hit rate of a high priority process increases, making it possible to make the cache hit rate of each executing process dependent on the priority of the process.

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

第1図は本発明の一実施例におけるキャッシュメモリが
複数のプロセッサと結合されているときの概略構成図、
第2図はキャッシュメモリのバッファ内のブロックの従
来の置き換え方法の例を示す図である。 1.2,3.4・・・・・・プロセッサ、11・・・・
・・プロセッサ1によ多発生されるアドレス、12・・
・・・・アドレス内のアドレスタグ、13・・・・・・
アドレス内ノ語選択部、14・・・・・・プロセッサに
よシ実行されているプロセスの優先度、6・・・・・・
バッフ7.51・・・・・・バッファ内のアドレスタグ
、62・・・・・・バッファ内のデータブロック、53
・・・・・・バッファ内の参照領域、6・・・・・・ヒ
ツト信号、7・・・・・・データ線、8・・・・・・プ
ロセッサとのインターフェイス部。 代理人の氏名 弁理士 粟 野 重 孝 ほか1基筒 図
FIG. 1 is a schematic configuration diagram when a cache memory is combined with a plurality of processors in an embodiment of the present invention;
FIG. 2 is a diagram illustrating an example of a conventional method for replacing blocks in a buffer of a cache memory. 1.2, 3.4... Processor, 11...
...Address frequently generated by processor 1, 12...
・・・Address tag in address, 13・・・・・・
Address word selection section, 14...Priority of the process being executed by the processor, 6...
Buffer 7.51...Address tag in the buffer, 62...Data block in the buffer, 53
... Reference area in the buffer, 6 ... Hit signal, 7 ... Data line, 8 ... Interface section with processor. Name of agent: Patent attorney Shigetaka Awano and 1 other figure

Claims (1)

【特許請求の範囲】[Claims] 複数のブロックからなるバッファと、各ブロックのデー
タ置き換えを制御する制御回路とを備え、複数のプロセ
ッサよりアクセス可能な構成であるとともに、前記バッ
ファの各ブロックごとに複数個の参照ビットを備えた参
照領域を有し、プロセッサからの要求によりアクセスさ
れたブロックの前記参照領域に、前記プロセッサで実行
中のプロセスの優先度に応じた値を書き込む手段と、前
記参照領域の値を減じる手段とを備えた制御回路を有す
ることを特徴とするキャッシュメモリ。
The reference buffer includes a buffer consisting of a plurality of blocks and a control circuit that controls data replacement of each block, and is accessible by a plurality of processors, and has a plurality of reference bits for each block of the buffer. The block having a memory area and accessed by a request from a processor includes means for writing a value corresponding to the priority of a process being executed in the processor into the reference area, and means for subtracting the value of the reference area. A cache memory characterized by having a control circuit.
JP1075307A 1989-03-27 1989-03-27 Cache memory Pending JPH02253358A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1075307A JPH02253358A (en) 1989-03-27 1989-03-27 Cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1075307A JPH02253358A (en) 1989-03-27 1989-03-27 Cache memory

Publications (1)

Publication Number Publication Date
JPH02253358A true JPH02253358A (en) 1990-10-12

Family

ID=13572466

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1075307A Pending JPH02253358A (en) 1989-03-27 1989-03-27 Cache memory

Country Status (1)

Country Link
JP (1) JPH02253358A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100460142B1 (en) * 2002-07-09 2004-12-03 삼성전자주식회사 Optimum Method for Reference of Cache Memory

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100460142B1 (en) * 2002-07-09 2004-12-03 삼성전자주식회사 Optimum Method for Reference of Cache Memory

Similar Documents

Publication Publication Date Title
JP3281893B2 (en) Method and system for implementing a cache coherency mechanism utilized within a cache memory hierarchy
JPS58102381A (en) Buffer memory
US7080220B2 (en) Page replacement with a re-reference indicator
EP0315194A2 (en) Microcomputer capable of accessing continuous addresses for a short time
JPH02253358A (en) Cache memory
JP2000047942A (en) Device and method for controlling cache memory
JPH01288940A (en) Logical address cache control system
JPH03232034A (en) Cache controller
JPH07152650A (en) Cache control unit
JPH0883213A (en) Storage device including cache memory
JPH04288647A (en) Substitution controller for cache memory
JPH04195563A (en) Controller for memory system
JPH09282231A (en) Write-back type cache device
JPH06282487A (en) Cache device
JP3074897B2 (en) Memory circuit
JPS63106849A (en) Control method for cache memory
EP0652520A1 (en) Cache control system for managing validity status of data stored in a cache memory
JPH045739A (en) Disk cache controlling system
JPS5894182A (en) Buffer memory managing system
JPS6063650A (en) Buffer memory coincidence control system
JPH05120139A (en) Cache memory device
JP2000066946A (en) Memory controller
JPH04291642A (en) Cache control system
JPH04125748A (en) Cache memory control system
JPH02165354A (en) Auxiliary storage device