JPH09282226A - Cache memory provided with registration eligible flag - Google Patents

Cache memory provided with registration eligible flag

Info

Publication number
JPH09282226A
JPH09282226A JP8115675A JP11567596A JPH09282226A JP H09282226 A JPH09282226 A JP H09282226A JP 8115675 A JP8115675 A JP 8115675A JP 11567596 A JP11567596 A JP 11567596A JP H09282226 A JPH09282226 A JP H09282226A
Authority
JP
Japan
Prior art keywords
priority
compartment
registration
cache memory
data
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
JP8115675A
Other languages
Japanese (ja)
Inventor
Koichi Matsumoto
浩一 松本
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP8115675A priority Critical patent/JPH09282226A/en
Publication of JPH09282226A publication Critical patent/JPH09282226A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PROBLEM TO BE SOLVED: To prevent the processing speed of a process of lower priority order from becoming slow due to the occupancy of a cache memory by a process of higher priority order by registering main memory data used by the process of higher priority order in a cache memory more preferentially than the process of lower priority order, suppressing main memory access time short and turning the processing speed of the process of higher priority order to a high speed. SOLUTION: A registration right flag (3-x) for holding the priority order for permitting registration is provided for each compartment (2-x) of the cache memory 2, the priority order of the process and the priority orders held by the registration eligible flags of the respective compartments are compared and a registration permission judgment means 5 judge to which compartments registration can be performed. A compartment selection means 6 selects to which compartment the registration is to be performed among the compartments where the registration is permitted.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、キャッシュメモリ
を持つ情報処理装置に関し、特にアクセスした主記憶の
データがキャッシュメモリに登録されていなかった場合
のキャッシュメモリへの登録制御方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing apparatus having a cache memory, and more particularly to a registration control system for a cache memory when the accessed main memory data is not registered in the cache memory.

【0002】[0002]

【従来の技術】従来、情報処理装置では、主記憶アクセ
スを高速化するためにプロセッサと主記憶との間に小容
量で高速のRAM(ランダムアクセスメモリ)で構成さ
れるキャッシュメモリを設け、頻度が高いデータや最近
使用したデータを格納し、これらのデータのアクセスが
速く実行できるようにすることにより、遅い主記憶への
アクセスを少なくして、情報処理装置の性能を向上させ
ている。
2. Description of the Related Art Conventionally, in an information processing apparatus, a cache memory composed of a high-speed RAM (random access memory) having a small capacity is provided between a processor and a main memory in order to speed up a main memory access. By storing high-value data and recently used data so that the access to these data can be performed quickly, the slow access to the main memory is reduced and the performance of the information processing apparatus is improved.

【0003】キャッシュメモリのデータの登録方式とし
ては、従来様々なものが存在するが、その一つに、図2
に示すようなセットアソシアティブ方式がある。
There are various conventional methods for registering data in the cache memory, one of which is shown in FIG.
There is a set associative method as shown in.

【0004】この方式においては、キャッシュメモリ2
を複数に分割して(図2に示した例では4つに分割し、
この分割した一つ一つが、コンパートメント2−1,2
−2,2−3,2−4である)、主記憶のアドレス1の
一部101がそれぞれのコンパートメントのRAMのア
ドレスと対応するようになっている。
In this system, the cache memory 2
Is divided into a plurality (in the example shown in FIG. 2, it is divided into four,
This divided one by one, compartments 2-1 and 2
-2, 2-3, 2-4), a part 101 of the address 1 of the main memory corresponds to the address of the RAM of each compartment.

【0005】キャッシュメモリ2にデータを登録する場
合は、主記憶アドレス1の一部101でそれぞれのコン
パートメント2−1,2−2,2−3,2−4のRAM
のアドレスを指定し、コンパートメント選択手段6が所
定の方法で選択したコンパートメントにのみ、アクセス
した主記憶データを登録する。
When registering data in the cache memory 2, the RAMs of the compartments 2-1, 2-2, 2-3, 2-4 in the part 101 of the main memory address 1 are stored.
Is designated, and the accessed main memory data is registered only in the compartment selected by the compartment selecting means 6 by a predetermined method.

【0006】この時、コンパートメントのRAMのアド
レス指定に使用しなかった主記憶アドレス部分100を
主記憶データと共に格納し、キャッシュメモリ2の内容
が主記憶データと1対1で対応できるようになってい
る。
At this time, the main memory address portion 100 which is not used for addressing the RAM of the compartment is stored together with the main memory data so that the contents of the cache memory 2 can correspond to the main memory data on a one-to-one basis. There is.

【0007】キャッシュメモリ2のデータを格納する部
分を「データアレイ」(図2のキャッシュメモリ2の
b)と呼び、主記憶アクセスアドレスでコンパートメン
トのアドレス指定に使用しなかったものを格納する部分
を「アドレスアレイ」(図2のキャッシュメモリ2の
a)と呼ぶ。
A portion of the cache memory 2 for storing data is called a "data array" (b of the cache memory 2 in FIG. 2), and a portion for storing a main memory access address not used for addressing a compartment is stored. It is called an "address array" (a of the cache memory 2 in FIG. 2).

【0008】主記憶データが登録された後において、そ
の主記憶アドレスをアクセスした時は、主記憶アドレス
1の一部101で各コンパートメントのRAMを指定し
てアドレスアレイaの内容を取り出し、その内容と主記
憶アドレス1の一部100とを比較器8−1,8−2,
8−3,8−4でそれぞれ比較し、一致したコンパート
メントのデータアレイbに登録されていたデータが、該
当する主記憶アドレスのデータとしてセレクタ7を通し
てプロセッサに渡される。
When the main memory address is accessed after the main memory data is registered, the RAM 101 of each compartment is designated by a part 101 of the main memory address 1 and the contents of the address array a are taken out. And a part 100 of the main memory address 1 to comparators 8-1, 8-2,
The data registered in the data array b of the corresponding compartments are compared with each other in 8-3 and 8-4, and are passed to the processor through the selector 7 as the data of the corresponding main memory address.

【0009】この場合、主記憶を直接アクセスせずに高
速なキャッシュメモリ2のみを使用するので、主記憶ア
クセス時間が大幅に改善されることになる。
In this case, since only the high speed cache memory 2 is used without directly accessing the main memory, the main memory access time is greatly improved.

【0010】図2に示す例では、コンパートメントは、
2−1,2−2,2−3,2−4と4個存在するので、
主記憶アドレスの一部101が同じデータは4個までキ
ャッシュメモリ2に登録することができる。
In the example shown in FIG. 2, the compartments are
2-1, 2-2, 2-3, 2-4 exist, so
Up to four pieces of data having the same part 101 of the main memory address can be registered in the cache memory 2.

【0011】以上は、キャッシュメモリの一例である
が、主記憶アドレスの一部101が同じで残りのアドレ
ス100が異なる主記憶データを5以上は登録できず、
既に登録されたデータのうちいずれかを無効化する必要
がある。
The above is an example of the cache memory, but it is not possible to register five or more main memory data in which a part 101 of the main memory address is the same and the remaining address 100 is different,
It is necessary to invalidate any of the registered data.

【0012】キャッシュメモリへのデータ登録に際し
て、使用頻度の高いデータまたは最近に使用したデータ
を、優先的に残すのが一般的とされ、使用頻度の少ない
データまたは最も古いデータはキャッシュメモリから追
い出されて無効化される。
When registering data in the cache memory, it is generally common to preferentially leave frequently used data or recently used data, and infrequently used data or oldest data is expelled from the cache memory. Will be invalidated.

【0013】このように、使用頻度の少ない、または最
も古い、データは、キャッシュメモリから追い出されて
しまうが、このようなデータでも、優先順位の高いプロ
セスが使用するもので、高速にアクセスが行える方が好
ましい場合もある。
As described above, the least frequently used data or the oldest data is expelled from the cache memory. However, even such data is used by a process having a high priority and can be accessed at high speed. In some cases, it may be preferable.

【0014】しかし、上記したような従来のキャッシュ
メモリでは、たとえ優先順位が高くとも、使用頻度が低
い場合には、主記憶に戻されている可能性が高くなり、
このためデータアクセスに時間がかかり、プロセスが高
速に処理されないことがある。
However, in the conventional cache memory as described above, even if the priority is high, if the frequency of use is low, it is highly likely that the cache memory is returned to the main memory.
Therefore, it takes time to access the data, and the process may not be processed at high speed.

【0015】このような問題に対処すべく、例えば特開
平4−84887号公報には、データに優先度を与え、
主記憶からデータを読み出した際に、既にキャッシュメ
モリにデータが登録されている場合には、それぞれのデ
ータの優先度を比較して、優先度が高い方のデータをキ
ャッシュメモリに登録し、優先度の低い方のデータは主
記憶に戻すというキャッシュメモリ入れ換え制御方式が
提案されている。
In order to deal with such a problem, for example, Japanese Unexamined Patent Publication No. 4-84887 gives priority to data,
If the data is already registered in the cache memory when the data is read from the main memory, the priority of each data is compared, and the data with the higher priority is registered in the cache memory and the priority is given. A cache memory replacement control method has been proposed in which the less frequent data is returned to the main memory.

【0016】また、特開平5−73420号公報には、
ソフトウェアがプロセスの優先順位をもとにキャッシュ
メモリ登録の制御できるようにし、主記憶からデータを
読み出した際に、既にキャッシュメモリにデータが登録
されている場合には、ソフトウェアがデータの優先順位
を比較して優先順位の最も低いものを主記憶に戻すよう
にすることにより、優先順位の高いプロセスの処理速度
を向上させるようにした方法が提案されている。
Further, in Japanese Patent Laid-Open No. 5-73420,
Allows software to control cache memory registration based on process priority, and when data is read from main memory and data is already registered in cache memory, software sets the priority of data. A method has been proposed in which the processing with the highest priority is improved by returning the one with the lowest priority in comparison to the main memory.

【0017】[0017]

【発明が解決しようとする課題】上記したように、従来
のキャッシュメモリでは、主記憶アクセスするプロセス
の優先順位に拘らず、使用頻度の低い、あるいは最も古
いデータはキャッシュメモリから主記憶へ追い出される
可能性が高く、その主記憶データが高速処理を必要とす
る、優先順位が高いプロセスが使用するデータである場
合には、遅い主記憶から読み出されなくてはならないた
め、優先順位が高いプロセスの処理速度が低下するとい
った問題がある。
As described above, in the conventional cache memory, regardless of the priority of the process for accessing the main memory, the least frequently used data or the oldest data is expelled from the cache memory to the main memory. If the high-priority process is data that is used by a high-priority process that requires high-speed processing, the high-priority process must be read from the slow main memory. There is a problem that the processing speed of is reduced.

【0018】そして、この問題を解決する方法として、
上記したように、特開平7−84887号公報、あるい
は特開平5−73420号公報等に提案される方式ある
が、これらの方式においては、優先順位のよりも高いも
のがキャッシュメモリに残るため、優先順位の低い主記
憶データはキャッシュメモリに登録される機会が少なく
なる。
As a method for solving this problem,
As described above, there are methods proposed in Japanese Patent Application Laid-Open No. 7-84887, Japanese Patent Application Laid-Open No. 5-73420, etc., but in these methods, the one with higher priority remains in the cache memory. Main memory data with a low priority is less likely to be registered in the cache memory.

【0019】このため、優先順位の高い主記憶データが
キャッシュメモリ中にある場合は、これよりも低い優先
順位のデータがキャッシュに登録されず、これらを使用
するプロセスは主記憶アクセスに時間がかかり処理が遅
くなる。
Therefore, if the main memory data having a higher priority is in the cache memory, the data having a lower priority than this is not registered in the cache, and the process using them takes time to access the main memory. Processing is slow.

【0020】キャッシュメモリにデータが無い場合(キ
ャッシュミス時)のプロセスの処理時間は、データが有
る場合(キャッシュヒット時)と比較して、通常、数倍
以上遅くなり、優先順位が低いとはいえ、キャッシュメ
モリにデータが無い場合にはプロセスの処理速度が非常
に遅くなり、処理時間が数倍以上も長くなってしまうこ
とは問題である。
The processing time of the process when there is no data in the cache memory (at the time of cache miss) is usually several times or more slower than that when there is data (at the time of cache hit), and the priority is low. However, if there is no data in the cache memory, the processing speed of the process becomes very slow, and the processing time becomes several times longer or more, which is a problem.

【0021】従って、本発明は、上記問題点に鑑みて為
されたものであって、その目的は、優先順位の高いプロ
セスが使用する主記憶データを優先順位の低いプロセス
が使用するものよりも優先的にキャッシュメモリに登録
するようにすることで、主記憶アクセス時間を小さく抑
え、優先順位の高いプロセスの処理速度を高速にするキ
ャッシュメモリを提供することにある。
Therefore, the present invention has been made in view of the above problems, and its object is to make main memory data used by a process having a high priority higher than that used by a process having a low priority. By preferentially registering in the cache memory, it is possible to provide a cache memory that keeps the main memory access time small and speeds up the processing speed of a process with a high priority.

【0022】[0022]

【課題を解決するための手段】前記目的を達成するた
め、本発明は、キャッシュメモリを備えた情報処理装置
において、前記キャッシュメモリが、複数のコンパート
メントを含むセットアソシアティブ方式として構成さ
れ、前記キャッシュメモリのコンパートメント毎に該コ
ンパートメントへの主記憶データの登録が許可されるプ
ロセスの優先順位の範囲を保持する登録資格判定フラグ
と、主記憶アクセスを実行しようとするプロセスの優先
順位と、前記コンパートメント毎の前記登録資格判定フ
ラグに保持されている優先順位と、を比較する優先順位
比較手段と、プロセスがアクセスしようとする主記憶デ
ータが前記キャッシュメモリに登録されていない時に、
前記優先順位比較手段で比較した結果からプロセスがア
クセスしようとする主記憶データをいずれのコンパート
メントに登録することが許可されるかを判定する登録資
格判定手段と、前記登録資格判定手段にて登録を許可す
ると判定されたコンパートメントのうちのいずれのコン
パートメントにプロセスがアクセスした主記憶データを
登録するかを選択するコンパートメント選択手段と、を
備え、前記コンパートメント選択手段で選択されたコン
パートメントにプロセスがアクセスした主記憶データを
登録することを特徴とする登録資格フラグ付きキャッシ
ュメモリを提供する。
In order to achieve the above object, the present invention provides an information processing apparatus having a cache memory, wherein the cache memory is configured as a set associative system including a plurality of compartments. A registration qualification determination flag that holds a range of priority of a process that is allowed to register main memory data in each compartment, a priority of a process that attempts to perform main memory access, and When the priority held in the registration qualification determination flag is compared with priority comparison means, and main memory data to be accessed by a process is not registered in the cache memory,
Registration qualification determining means for determining in which compartment the main memory data to be accessed by the process is permitted to be registered, based on the result of the comparison by the priority comparison means, and registration by the registration qualification determination means. Compartment selecting means for selecting which compartment of the compartments determined to allow the process to register the main memory data accessed by the process, and the main compartment that the process accesses to the compartment selected by the compartment selecting means. A cache memory with a registration qualification flag characterized by registering stored data.

【0023】本発明は、優先順位の高いプロセスがキャ
ッシュメモリを占有して優先順位の低いプロセスがキャ
ッシュメモリを利用することができず、非常に処理速度
が遅くなるという事態の発生を回避するようにしたキャ
ッシュメモリを提供するものである。
The present invention avoids a situation in which a process with a high priority occupies the cache memory and a process with a low priority cannot use the cache memory, resulting in a very slow processing speed. It provides a cache memory that has been set.

【0024】[0024]

【発明の実施の形態】本発明の実施の形態を以下に説明
する。本発明の実施の形態においては、キャッシュメモ
リ2のコンパートメント(図1の2−1〜2−4)毎に
登録を許可する優先順位を示すフラグ(図1の3−1〜
3−4)を設け、各コンパートメントではそのフラグが
示す優先順位以上のプロセスが使用する主記憶データし
か登録しないようにすることによって、優先順位の低い
プロセスが使用する主記憶データが優先順位の高いプロ
セスが使用する主記憶データをキャッシュメモリから追
い出すことを少なくして優先順位の高いプロセスの主記
憶アクセスに対するキャッシュメモリのヒット率を向上
させ、高速な処理を行うことを可能としたものである。
Embodiments of the present invention will be described below. In the embodiment of the present invention, a flag (3-1 to 3-1 in FIG. 1) indicating a priority order for permitting registration for each compartment (2-1 to 2-4 in FIG. 1) of the cache memory 2 is used.
3-4) is provided so that in each compartment, only main memory data used by a process having a priority higher than that indicated by the flag is registered, so that main memory data used by a process having a lower priority has a higher priority. The main memory data used by a process is less evacuated from the cache memory, the hit rate of the cache memory for the main memory access of a process with a high priority is improved, and high-speed processing can be performed.

【0025】さらに、優先順位の高いプロセスが使用す
る主記憶データのみがキャッシュメモリに多く登録され
ると優先順位の低いプロセスが登録できなくなり、優先
順位が低いとはいえキャッシュメモリにヒットしないと
処理速度が数倍程度遅くなるという問題に対しても、本
発明の実施の形態においては、コンパートメント毎に優
先順位を指定可能とすることで、いくつかのコンパート
メントは優先順位の低いプロセスに対しても登録許可す
るように設定しておくことにより、優先順位の高いプロ
セスで使用する主記憶データがキャッシュメモリを占有
してしまい、優先順位の低いプロセスがキャッシュメモ
リにほとんど登録できないといった事態を避けることが
でき、優先順位の低いプロセスの処理速度が非常に遅く
なることはない。
Furthermore, if only main memory data used by a process with a high priority is registered in the cache memory in a large amount, a process with a low priority cannot register, and processing is performed unless the cache memory is hit even though the priority is low. Even with respect to the problem that the speed becomes several times slower, in the embodiment of the present invention, it is possible to specify the priority order for each compartment, so that some of the compartments even for a process having a low priority order. By setting to allow registration, it is possible to avoid a situation in which main memory data used by a process with a high priority occupies the cache memory, and a process with a low priority can hardly register in the cache memory. Yes, low-priority processes do not become very slow.

【0026】このように、本発明の実施の形態は、情報
処理装置において、プロセスの優先順位によって登録が
許可されるか否かをキャッシュメモリのコンパートメン
ト毎に設定可能としている。このため、優先順位の高い
プロセスが使用する主記憶データが、優先順位の低いプ
ロセスが使用する主記憶データによりキャッシュメモリ
から追い出されることを少なくすることが可能とされ、
優先順位の高いプロセスの処理速度が低下するのを抑え
ることを可能としている。そして、キャッシュメモリに
登録が許可される優先順位をコンパートメント毎に設定
できるようにしたことから、優先順位の高いプロセスが
使用するデータがキャッシュメモリを占有し、優先順位
の低いプロセスが使用するデータを登録できないという
状態を回避している。このため、優先順位が低いとはい
え、キャッシュメモリを使用できず、処理速度が非常に
遅くなるということを回避することができる。
As described above, according to the embodiment of the present invention, in the information processing apparatus, it is possible to set, for each compartment of the cache memory, whether registration is permitted or not depending on the priority of the process. Therefore, it is possible to prevent the main memory data used by the process having the high priority from being evicted from the cache memory by the main memory data used by the process having the low priority.
It is possible to prevent the processing speed of a process with a high priority from decreasing. Then, because the priority that is allowed to be registered in the cache memory can be set for each compartment, the data used by the process with the higher priority occupies the cache memory and the data used by the process with the lower priority is saved. Avoids the situation where you cannot register. Therefore, although the priority is low, it is possible to prevent the cache memory from being used and the processing speed from becoming very slow.

【0027】[0027]

【実施例】上記した本発明の実施の形態をより詳細に説
明すべく、本発明の実施例について図面を参照して説明
する。図1は本発明に係る登録資格フラグ付きキャッシ
ュメモリの一実施例の構成をブロック図にて示したもの
である。図1において、図2の要素と同一又は同等の機
能を有する要素には同一の参照符号が付されている。
EXAMPLES Examples of the present invention will be described with reference to the drawings in order to describe the above-described embodiments of the present invention in more detail. FIG. 1 is a block diagram showing the configuration of an embodiment of a cache memory with a registration qualification flag according to the present invention. In FIG. 1, elements having the same or equivalent functions as those of FIG. 2 are designated by the same reference numerals.

【0028】図1を参照して、本実施例は、プロセッサ
から送られてくる主記憶アドレス1の一部101を使っ
てキャッシュメモリ2の各コンパートメント2−1,2
−2,2−3,2−4を索引するアドレスとし、各コン
パートメント2−1,2−2,2−3,2−4のアドレ
スアレイaから索引された内容と、主記憶アドレス1の
残りの部分100と、を比較し、これらが互いに一致す
るか否かを比較する比較器8−1,8−2,8−3,8
−4を備え、比較器8−1,8−2,8−3,8−4に
て一致したものがあれば、そのコンパートメントにアク
セスしようとした主記憶データが登録されているため
(キャッシュメモリがヒット)、セレクタ7で当該コン
パートメントのデータアレイbに格納されているデータ
を選択して、プロセッサに渡す。
With reference to FIG. 1, this embodiment uses each part 2-1 and 2-2 of the cache memory 2 by using a part 101 of the main memory address 1 sent from the processor.
The contents indexed from the address array a of each compartment 2-1, 2-2, 2-3, 2-4 and the rest of the main memory address 1 are used as the indexing addresses -2, 2-3, 2-4. , 100, and comparators 8-1, 8-2, 8-3, 8 for comparing whether or not they match each other.
-4, and if there is a match in the comparators 8-1, 8-2, 8-3, 8-4, it means that the main memory data trying to access the compartment is registered (the cache memory Is hit), the data stored in the data array b of the relevant compartment is selected by the selector 7 and passed to the processor.

【0029】そして、図1に示すように、本実施例にお
いては、各コンパートメント2−1,2−2,2−3,
2−4毎にそれぞれのコンパートメントへの登録が許可
される優先順位を保持する登録資格フラグ3−1,3−
2,3−3,3−4を設け、プロセッサから送られてく
るプロセスの優先順位(又は資格)を、各コンパートメ
ントの登録資格フラグ3−1,3−2,3−3,3−4
が保持している優先順位と比較し、どのコンパートメン
トに主記憶データを登録することができるかを判定する
登録許可判定手段5と、登録許可判定手段5が登録した
登録が許可されたコンパートメントの中でどのコンパー
トメントに登録するかを選択するコンパートメント選択
手段6と、を備えている。なお、プロセッサは、実行中
のプロセスの優先順位をプロセス制御用のブロック(レ
ジスタ)等に保持し、この情報が登録許可判定手段5に
入力される。
Then, as shown in FIG. 1, in the present embodiment, each compartment 2-1, 2-2, 2-3,
Registration qualification flags 3-1 and 3 that hold the priority order in which registration to each compartment is permitted for each 2-4
2,3,3,3-4 are provided, and the priority (or qualification) of the process sent from the processor indicates the registration qualification flag 3-1, 3-2, 3-3, 3-4 of each compartment.
Of the registration permission judgment means 5 for judging in which compartment the main memory data can be registered by comparing with the priority order held by the registration permission judgment means 5 and the registration-permitted compartment registered by the registration permission judgment means 5. And compartment selection means 6 for selecting which compartment to register. The processor holds the priority order of the processes being executed in a process control block (register) or the like, and this information is input to the registration permission determination means 5.

【0030】次に本発明の一実施例の動作について説明
する。
Next, the operation of the embodiment of the present invention will be described.

【0031】図1において、登録を許可する優先順位を
示す登録資格フラグ3−1,3−2,3−3,3−4に
それぞれ登録許可優先順位を、仮に、「0」,「2」,
「5」,「7」と設定した場合について説明する。ここ
で、数字の小さい方が優先順位が高いものとする
(「0」が最も優先順位が高い)。
In FIG. 1, the registration qualification flags 3-1, 3-2, 3-3 and 3-4, which indicate the priority order of registration permission, respectively have the registration permission priority order of "0" and "2". ,
The case where "5" and "7" are set will be described. Here, the smaller the number, the higher the priority (“0” has the highest priority).

【0032】本実施例においても、主記憶アクセスデー
タがキャッシュメモリ2に登録されている場合(キャッ
シュヒット時)には、上記した従来技術と同様に、キャ
ッシュメモリ2からデータが取り出されてプロセッサに
渡されるので、説明は省略する。
Also in this embodiment, when the main memory access data is registered in the cache memory 2 (at the time of a cache hit), the data is fetched from the cache memory 2 and sent to the processor as in the prior art described above. Since it is passed, the description is omitted.

【0033】また、以下のキャッシュメモリ2の動作説
明では、キャッシュメモリ2の全てのコンパートメント
2−1〜2−4には既にデータが登録されており、新た
にデータを登録するには、既に登録されているデータを
無効化しなければならない状態にあるものとする。
Further, in the following description of the operation of the cache memory 2, data has already been registered in all the compartments 2-1 to 2-4 of the cache memory 2, and in order to register new data, it has already been registered. It is assumed that the stored data must be invalidated.

【0034】優先順位が「0」のプロセスが主記憶アド
レスをアクセスをし、その主記憶アドレスのデータがキ
ャッシュメモリ2を索引した結果、キャッシュメモリ2
内に登録されていないことが判り、キャッシュメモリ2
にデータを登録する際、登録資格フラグ3−1,3−
2,3−3,3−4にそれぞれ保持されている登録許可
優先順位「0」,「2」,「5」,「7」と、プロセス
優先順位「0」とが、登録資格判定手段5で比較される
が、優先順位「0」はどの登録許可優先順位よりも低く
ないので、アクセスした主記憶データは、コンパートメ
ント2−1〜2−4のいずれのコンパートメントにも登
録することが許可される。
As a result of the process of the priority "0" accessing the main memory address and the data of the main memory address indexing the cache memory 2, the cache memory 2
It is found that it is not registered in the cache memory 2
Registration qualification flags 3-1 and 3-when registering data in
Registration permission priority levels “0”, “2”, “5” and “7” and process priority levels “0” held in 2, 3, 3 and 3-4, respectively, are used to determine the registration qualification determining means 5. However, since the priority "0" is not lower than any registration permission priority, the accessed main memory data is permitted to be registered in any of the compartments 2-1 to 2-4. It

【0035】登録資格判定手段5は、この判定結果を、
コンパートメント選択手段6に出力し、コンパートメン
ト選択手段6は、登録許可されたコンパートメント(こ
の場合は全てのコンパートメント)の中から登録するコ
ンパートメントを選択する。
The registration qualification judging means 5 gives this judgment result to
The data is output to the compartment selecting means 6, and the compartment selecting means 6 selects a compartment to be registered from the compartments that are permitted to be registered (in this case, all compartments).

【0036】コンパートメント選択手段6におけるコン
パートメント選択の方法としては、従来から採用されて
きた、最も昔に使用されたデータや最も使用頻度が低い
データを主記憶に追い出して、その代りに登録するとい
った方法を取ってもよい。
As a method of selecting a compartment in the compartment selecting means 6, a method which has been conventionally adopted, such as expelling the oldest used data or the least frequently used data to the main memory and registering it instead, is used. You may take

【0037】コンパートメント選択手段6にて選択され
たコンパートメントはキャッシュメモリ2に選択信号2
01を介して通知され、該当するコンパートメントの該
当するアドレスのデータを無効化して、プロセスがアク
セスした主記憶データが登録される。
The compartment selected by the compartment selecting means 6 is sent to the cache memory 2 through the selection signal 2
The data of the corresponding address of the corresponding compartment is invalidated, and the main memory data accessed by the process is registered.

【0038】次に、優先順位「3」のプロセスが主記憶
アクセスして、その主記憶アドレスのデータがキャッシ
ュメモリに登録されていない場合、登録資格フラグ3−
1,3−2,3−3,3−4に保持されている登録許可
優先順位「0」,「2」,「5」,「7」と、プロセス
優先順位「3」とが登録資格判定手段5により比較され
るが、優先順位「3」は登録資格フラグ3−1と3−2
に保持されている優先順位「0」,「2」よりも低いの
で、コンパートメント2−1,2−2には登録すること
ができない。一方、優先順位「3」は、登録資格フラグ
3−3,3−4に保持されている優先順位「5」,
「7」よりは高いことから、このプロセスがアクセスし
たデータはコンパートメント2−3,2−4にのみ登録
することができる。同様にして、優先順位「7」のプロ
セスは、コンパートメント2−4にしか登録することが
できない。
Next, if the process of priority "3" accesses the main memory and the data of the main memory address is not registered in the cache memory, the registration qualification flag 3-
Registration permission priority levels “0”, “2”, “5” and “7” and process priority levels “3” held in 1, 3-2, 3-3 and 3-4 and registration qualification determination. The comparison is made by the means 5, but the priority "3" has the registration qualification flags 3-1 and 3-2.
Since it is lower than the priorities “0” and “2” stored in the compartment 2, it cannot be registered in the compartments 2-1 and 2-2. On the other hand, the priority order “3” is the priority order “5” held in the registration qualification flags 3-3 and 3-4.
Since it is higher than “7”, the data accessed by this process can be registered only in compartments 2-3 and 2-4. Similarly, the process with the priority "7" can be registered only in the compartments 2-4.

【0039】優先順位の高いプロセスは登録することの
できるコンパートメントが多く、また、優先順位の低い
プロセスがアクセスする主記憶データにより追い出され
ることがないコンパートメントが存在することから、優
先順位の高いプロセスは、そのキャッシュメモリのヒッ
ト率が向上し、処理も高速に実行されることになる。
Since a process with a high priority has many compartments that can be registered, and there is a compartment that is not evicted by main memory data accessed by a process with a low priority, a process with a high priority is , The cache memory hit rate is improved, and the processing is executed at high speed.

【0040】また、本実施例においては、全てのコンパ
ートメント2−1〜2−4が、優先順位の高いプロセス
が使用する主記憶データに占められた場合においても、
登録許可優先順位が低く設定されたコンパートメントに
は優先順位の低いプロセスが使用する主記憶データを登
録することが可能とされているため、優先順位の低いプ
ロセスがキャッシュメモリ2を使用することができず、
非常に処理が遅くなってしまうという事態を回避するこ
とができる。
Further, in this embodiment, even when all the compartments 2-1 to 2-4 are occupied by the main memory data used by the process having a high priority,
Since it is possible to register main memory data used by a process with a low priority in a compartment set with a low registration priority, a process with a low priority can use the cache memory 2. No
It is possible to avoid a situation where the processing becomes extremely slow.

【0041】本実施例においては、コンパートメント毎
に設定する登録許可優先順位は個々に設定可能で、オペ
レータから設定する機構やソフトウェアから設定す機構
を設ければ、各プロセスの実行処理時間状況を見ながら
最適な状況となるようにコンパートメント毎の登録許可
優先順位を設定することもできる。
In the present embodiment, the registration permission priority order set for each compartment can be set individually. If a mechanism set by the operator or a mechanism set by software is provided, the execution processing time status of each process can be checked. However, it is also possible to set the registration permission priority order for each compartment so that the optimal situation is obtained.

【0042】上記実施例では、登録資格フラグ3−1〜
3−4には優先順位の下限を設定する構成を説明した
が、本発明はこれに限定されるものでないことは勿論で
ある。例えば、登録資格フラグに優先順位の上限及び下
限からなる範囲を設定するような構成としてもよい。
In the above embodiment, the registration qualification flag 3-1.
Although the configuration in which the lower limit of the priority order is set has been described in 3-4, it goes without saying that the present invention is not limited to this. For example, the registration qualification flag may be configured to have a range of upper and lower priority levels.

【0043】[0043]

【発明の効果】以上説明したように、本発明によれば、
下記記載の各種効果を奏する。
As described above, according to the present invention,
The following effects are obtained.

【0044】本発明の第1の効果として、優先順位の高
いプロセスがアクセスする主記憶データは、優先順位の
低いプロセスに比べて、キャッシュメモリに優先的に登
録されるので、キャッシュメモリのヒット率を向上さ
せ、主記憶アクセスに要する時間を短縮することが可能
となり、その結果、優先順位の高いプロセスの処理速度
を高速にすることが可能となる。
As a first effect of the present invention, the main memory data accessed by a process with a high priority is registered in the cache memory with priority over a process with a low priority, so the hit rate of the cache memory is high. Can be improved and the time required for main memory access can be shortened, and as a result, the processing speed of a process with a high priority can be increased.

【0045】これは、本発明においては、キャッシュメ
モリのコンパートメント毎に登録許可する優先順位を設
定できるため、一定の優先順位の高さを有しないプロセ
スがアクセスする主記憶データを登録許可しないコンパ
ートメントを存在させることにより、優先順位の低いプ
ロセスによって、優先順位の高いプロセスのデータがキ
ャッシュメモリから追い出されるという確率を低減した
ことによる。
This is because in the present invention, since the priority level of registration permission can be set for each compartment of the cache memory, the main memory data accessed by a process which does not have a certain priority level can be registered in a compartment which is not permitted to be registered. This is because the existence of the low-priority process reduces the probability that the data of the high-priority process is evicted from the cache memory.

【0046】本発明の第2の効果として、上記した第1
の効果を得るために、優先順位の高いプロセスがキャッ
シュメモリを占有して優先順位の低いプロセスがアクセ
スする主記憶データがキャッシュメモリに登録できず、
処理速度が非常に遅くなることを回避することができ
る。
As the second effect of the present invention, the above-mentioned first effect is obtained.
In order to obtain the effect of, the high-priority process occupies the cache memory and the main memory data accessed by the low-priority process cannot be registered in the cache memory.
It is possible to prevent the processing speed from becoming very slow.

【0047】すなわち、優先順位が低いとはいえ、キャ
ッシュメモリに使用するデータを登録することができな
いための、数倍以上処理速度が遅くなるというのは全体
の処理性能の点で問題であり、本発明はこの問題の発生
を回避している。本発明においては、登録許可する優先
順位がコンパートメント毎に設定できるため、いくつか
のコンパートメントには優先順位の低いプロセスでも登
録許可するように設定しておくことにより、優先順位の
低いプロセスであっても当該コンパートメントにはデー
タを登録することができる。
That is, although the priority is low, it is not possible to register the data to be used in the cache memory, so that the processing speed becomes several times slower, which is a problem in the overall processing performance. The present invention avoids the occurrence of this problem. In the present invention, since the priority order for which registration is permitted can be set for each compartment, it is set as a process with a low priority order by setting that a process with a low priority order is also permitted for registration in some compartments. Can also register data in the compartment.

【0048】そして、本発明によれば、情報処理装置の
オペレータやソフトウェアからコンパートメント毎の登
録を許可する優先順位を設定できる手段を備えた場合、
各プロセスの実行処理時間状況を見ながら最適な状況と
なるようにコンパートメント毎の登録許可優先順位を設
定することもできる。
Further, according to the present invention, when the means for setting the priority order for permitting the registration for each compartment from the operator of the information processing apparatus or the software,
It is also possible to set the priority order of registration permission for each compartment so that the optimum status can be obtained while checking the execution processing time status of each process.

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

【図1】本発明の一実施例の構成を示すブロック図であ
る。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention.

【図2】従来のキャッシュメモリの一例を示すブロック
図である。
FIG. 2 is a block diagram showing an example of a conventional cache memory.

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

1 プロセッサからの主記憶アクセスアドレス 2 キャッシュメモリ 2−1,2−2,2−3,2−4 キャッシュメモリの
コンパートメント 3−1,3−2,3−3,3−4 登録資格フラグ 5 登録資格判定手段 6 コンパートメント選択手段 7 セレクタ 8−1,8−2,8−3−8−4 比較器
1 main memory access address from processor 2 cache memory 2-1, 2-2, 2-3, 2-4 compartment of cache memory 3-1, 3-2, 3-3, 3-4 registration qualification flag 5 registration Qualification judging means 6 Compartment selecting means 7 Selector 8-1, 8-2, 8-3-8-4 Comparator

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】キャッシュメモリを備えた情報処理装置に
おいて、 前記キャッシュメモリが、複数のコンパートメントを含
むセットアソシアティブ方式として構成され、 前記キャッシュメモリのコンパートメント毎に該コンパ
ートメントへの主記憶データの登録が許可されるプロセ
スの優先順位の範囲を保持する登録資格判定フラグと、 主記憶アクセスを実行しようとするプロセスの優先順位
と、前記コンパートメント毎の前記登録資格判定フラグ
に保持されている優先順位と、を比較する優先順位比較
手段と、 プロセスがアクセスしようとする主記憶データが前記キ
ャッシュメモリに登録されていない時に、前記優先順位
比較手段で比較した結果からプロセスがアクセスしよう
とする主記憶データをいずれのコンパートメントに登録
することが許可されるかを判定する登録資格判定手段
と、 前記登録資格判定手段にて登録を許可すると判定された
コンパートメントのうちのいずれのコンパートメントに
プロセスがアクセスした主記憶データを登録するかを選
択するコンパートメント選択手段と、 を備え、 前記コンパートメント選択手段で選択されたコンパート
メントにプロセスがアクセスした主記憶データを登録す
ることを特徴とする登録資格フラグ付きキャッシュメモ
リ。
1. An information processing apparatus having a cache memory, wherein the cache memory is configured as a set associative system including a plurality of compartments, and main memory data is allowed to be registered in each compartment of the cache memory. A registration qualification determination flag that holds a range of priority levels of processes, a priority of a process that attempts to execute main memory access, and a priority that is retained in the registration qualification determination flag of each compartment. Which of the priority comparison means to compare and the main memory data to be accessed by the process is selected from the result of comparison by the priority comparison means when the main memory data to be accessed by the process is not registered in the cache memory. Can be registered in a compartment And a registration qualification determining unit that determines whether or not is permitted, and which one of the compartments determined to permit registration by the registration qualification determining unit to select the main memory data accessed by the process is selected. A cache memory with a registration qualification flag, characterized in that the main memory data accessed by the process is registered in the compartment selected by the compartment selecting means.
【請求項2】前記登録資格判定フラグが、前記コンパー
トメントへの主記憶データの登録が許可されるプロセス
の優先順位の下限値を保持し、前記下限値に等しいか又
は上回る優先順位を有するプロセスのみが、前記コンパ
ートメントへの主記憶データの登録が可能とされたこと
を特徴とする請求項1記載の登録資格フラグ付きキャッ
シュメモリ。
2. The registration qualification determination flag holds a lower limit value of the priority of a process permitted to register main memory data in the compartment, and only a process having a priority equal to or higher than the lower limit value. 2. The cache memory with a registration qualification flag according to claim 1, wherein the main memory data can be registered in the compartment.
【請求項3】前記登録資格判定フラグが、前記コンパー
トメント毎にその値が可変に設定可能とされたことを特
徴とする請求項1記載の登録資格フラグ付きキャッシュ
メモリ。
3. The cache memory with a registration qualification flag according to claim 1, wherein the value of the registration qualification determination flag can be variably set for each compartment.
【請求項4】複数のコンパートメントからなるセットア
ソシアティブ方式のキャッシュメモリにおいて、 前記コンパートメント毎に該コンパートメントへの主記
憶データの登録が許可されるプロセスの優先順位の範囲
を保持する記憶手段を備え、更に、 プロセスからアクセスされるデータがヒットしない時
に、該プロセスの優先順位と、前記コンパートメントの
各々において前記記憶手段に保持されている優先順位
と、を比較し、前記プロセスの優先順位と各コンパート
メントの許可範囲との比較結果に基づき、いずれのコン
パートメントに主記憶からのデータを登録することが許
可されるかを判定し、データ登録が許可された一又は複
数のコンパートメントのうちのいずれかのコンパートメ
ントに前記プロセスがアクセスした主記憶のデータを登
録することを特徴とする登録資格フラグ付きキャッシュ
メモリ。
4. A set associative cache memory including a plurality of compartments, further comprising storage means for holding, for each of the compartments, a priority range of a process permitted to register main memory data in the compartment. When the data accessed from the process does not hit, the priority of the process is compared with the priority held in the storage means in each of the compartments, and the priority of the process and the permission of each compartment are compared. Based on the result of the comparison with the range, it is determined in which compartment the data from the main memory is permitted to be registered, and the compartment is registered in any one of the one or more compartments for which the data registration is permitted. Main memory data accessed by the process Registration qualification flagged cache memory, characterized in that to register the data.
JP8115675A 1996-04-12 1996-04-12 Cache memory provided with registration eligible flag Pending JPH09282226A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8115675A JPH09282226A (en) 1996-04-12 1996-04-12 Cache memory provided with registration eligible flag

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8115675A JPH09282226A (en) 1996-04-12 1996-04-12 Cache memory provided with registration eligible flag

Publications (1)

Publication Number Publication Date
JPH09282226A true JPH09282226A (en) 1997-10-31

Family

ID=14668510

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8115675A Pending JPH09282226A (en) 1996-04-12 1996-04-12 Cache memory provided with registration eligible flag

Country Status (1)

Country Link
JP (1) JPH09282226A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008525919A (en) * 2004-12-29 2008-07-17 インテル・コーポレーション Method for programmer-controlled cache line eviction policy
JP2010170272A (en) * 2009-01-21 2010-08-05 Toyota Motor Corp Control unit
JP2014146366A (en) * 2014-04-03 2014-08-14 Fujitsu Ltd Multi-core processor system, and control method and control program of multi-core processor system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008525919A (en) * 2004-12-29 2008-07-17 インテル・コーポレーション Method for programmer-controlled cache line eviction policy
JP2010170272A (en) * 2009-01-21 2010-08-05 Toyota Motor Corp Control unit
JP2014146366A (en) * 2014-04-03 2014-08-14 Fujitsu Ltd Multi-core processor system, and control method and control program of multi-core processor system

Similar Documents

Publication Publication Date Title
US6381676B2 (en) Cache management for a multi-threaded processor
US5787490A (en) Multiprocess execution system that designates cache use priority based on process priority
EP0472879B1 (en) Method and apparatus for dynamic detection and routing of non-uniform traffic in parallel buffered multistage interconnection networks
US4467414A (en) Cashe memory arrangement comprising a cashe buffer in combination with a pair of cache memories
US5140682A (en) Storage control apparatus
CN110442463B (en) Data transmission method and device in TEE system
US6493791B1 (en) Prioritized content addressable memory
KR20080075910A (en) Memory access request arbitration
US20050240731A1 (en) Managing a multi-way associative cache
US20120030430A1 (en) Cache control apparatus, and cache control method
US6629195B2 (en) Implementing semaphores in a content addressable memory
CN110023916B (en) Method and device for reducing read/write competition in cache
US20080016282A1 (en) Cache memory system
EP0730237A1 (en) Multi-processor system with virtually addressable communication registers and controlling method thereof
US6915406B2 (en) Address translation apparatus, address translation method, and two-layer address translation apparatus
JPH09282226A (en) Cache memory provided with registration eligible flag
JPH07248967A (en) Memory control system
US6839806B2 (en) Cache system with a cache tag memory and a cache tag buffer
US8423719B2 (en) Apparatus, processor and method of controlling cache memory
US6279082B1 (en) System and method for efficient use of cache to improve access to memory of page type
US20230129791A1 (en) Memory controller system and a method of pre-scheduling memory transaction for a storage device
JPS629945B2 (en)
JPH04324194A (en) Rom circuit
JP3180724B2 (en) Cash system
JPH09146839A (en) Cache memory controller

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19981110