JPH07248967A - Memory control system - Google Patents

Memory control system

Info

Publication number
JPH07248967A
JPH07248967A JP6040713A JP4071394A JPH07248967A JP H07248967 A JPH07248967 A JP H07248967A JP 6040713 A JP6040713 A JP 6040713A JP 4071394 A JP4071394 A JP 4071394A JP H07248967 A JPH07248967 A JP H07248967A
Authority
JP
Japan
Prior art keywords
processor
cache
memory
cache memory
priority
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
JP6040713A
Other languages
Japanese (ja)
Inventor
Kazuhiko Tanaka
和彦 田中
Kiyokazu Nishioka
清和 西岡
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP6040713A priority Critical patent/JPH07248967A/en
Publication of JPH07248967A publication Critical patent/JPH07248967A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To use many cache memories for a processor which is carrying out the processing of higher priority in a multiprocessor system by changing dynamically the capacity of the cache memory that is allocated to the processor in accordance with the priority of the processing which is carried out by the processor. CONSTITUTION:The priority of a processor 10 and that of a processor 11 are set at '3' and '1' respectively on a priority table contained in a cache controller 30. Under such conditions, a cache memory 40 is preferentially allocated to the processor 10. Then the numbers of cach entries available to both processors 10 and 11 are set at '3' per set for the processor 10 and at '1' per set for the processor 11 respectively. The numbers of cache blocks available to both processors 10 and 11 are proportional to the cache entry numbers. Therefore 3/4 entire capacity of the memory 40 is allocated to the processor 10, and remaining 1/4 capacity is allocated to the processor 11.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、複数のプロセッサを使
用するシステムのメモリ制御方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory control system for a system using a plurality of processors.

【0002】[0002]

【従来の技術】高い処理性能が要求される情報処理シス
テムでは、その要求に応えるために、プロセッサを1個
しか使用しないシングルプロセッサのシステムから、複
数のプロセッサを使用するマルチプロセッサのシステム
へと移行しつつある。マルチプロセッサのシステムで
は、メモリを共有し、これによってプロセッサ間のデー
タのやり取りをする密結合のシステムと、メモリを共有
せずに、通信によってプロセッサ間のデータのやり取り
をする疎結合のシステムがある。疎結合のシステムで
は、各プロセッサが独立したメモリを持つため、システ
ムの小型化や低コスト化といった点で不利となる。
2. Description of the Related Art In an information processing system requiring high processing performance, in order to meet the demand, a single processor system using only one processor is changed to a multiprocessor system using a plurality of processors. I am doing it. In a multiprocessor system, there are a tightly coupled system that shares memory and thereby exchanges data between processors, and a loosely coupled system that exchanges data between processors by communication without sharing memory. . In a loosely coupled system, each processor has an independent memory, which is disadvantageous in terms of system miniaturization and cost reduction.

【0003】これらのシステムでは、性能の向上のため
に、主記憶の他に、キャッシュメモリを使用する場合が
ある。密結合のシステムにおいては、プロセッサごとに
キャッシュメモリを持つ方法と、各プロセッサがキャッ
シュメモリを共有する方法がある。小型化や低コスト化
が重視される用途では、使用するメモリ素子の数を減ら
すために、密結合のシステムで、キャッシュメモリも共
有する方式が有利である。
In these systems, a cache memory may be used in addition to the main memory in order to improve the performance. In a tightly coupled system, there are a method of having a cache memory for each processor and a method of sharing a cache memory among the processors. In applications where downsizing and cost reduction are important, in order to reduce the number of memory elements to be used, a method of sharing a cache memory in a tightly coupled system is advantageous.

【0004】この場合の、システムの動作を図1のシス
テム構成例を用いて説明する。この図において、10,
11はプロセッサ、20はメモリバス、30はキャッシ
ュコントローラ、40はキャッシュメモリ、50は主記
憶である。この例では、プロセッサの数を2つとしてい
るが、3つ以上のプロセッサを使用することも可能であ
る。プロセッサ10とプロセッサ11は、互いに独立し
た処理を実行することが可能である。プロセッサ10,
11は、メモリバス20を介して、主記憶50に対して
アクセスを行う。キャッシュメモリ40は、主記憶50
に比べて容量は小さいが、高速なアクセスが可能であ
る。通常、キャッシュメモリ40には、主記憶50のデ
ータのコピーが格納される。
The operation of the system in this case will be described with reference to the system configuration example of FIG. In this figure, 10,
Reference numeral 11 is a processor, 20 is a memory bus, 30 is a cache controller, 40 is a cache memory, and 50 is a main memory. In this example, the number of processors is two, but it is also possible to use three or more processors. The processor 10 and the processor 11 can execute independent processing. Processor 10,
11 accesses the main memory 50 via the memory bus 20. The cache memory 40 has a main memory 50.
The capacity is smaller than that of, but high-speed access is possible. Usually, the cache memory 40 stores a copy of the data in the main memory 50.

【0005】プロセッサ10が、主記憶50に対してリ
ードアクセスを行う場合、アクセス対象のデータが、キ
ャッシュメモリ40の中に存在していれば、主記憶50
へのアクセスを行わず、キャッシュメモリ40に対して
アクセスが行われる。このとき、キャッシュがヒットし
たという。逆に、アクセス対象のデータが、キャッシュ
メモリ40の中に存在していなければ、主記憶50に対
してアクセスが行われる。このとき、キャッシュがミス
したという。キャッシュメモリ40は、主記憶50より
も、高速なアクセスが可能であるため、キャッシュがヒ
ットしたときにはメモリアクセスに要する時間が短くな
り、システムの処理性能が向上する。キャッシュがミス
した場合、主記憶50から読み出されたデータはキャッ
シュメモリ40にも書き込まれる。この結果、次に同じ
データに対してアクセスが行われた場合には、キャッシ
ュはヒットすることになる。
When the processor 10 makes a read access to the main memory 50, if the data to be accessed exists in the cache memory 40, the main memory 50.
The cache memory 40 is accessed without accessing the cache memory 40. At this time, the cache was hit. On the contrary, if the data to be accessed does not exist in the cache memory 40, the main memory 50 is accessed. At this time, the cache missed. Since the cache memory 40 can be accessed faster than the main memory 50, the time required for memory access is shortened when the cache hits, and the processing performance of the system is improved. When the cache misses, the data read from the main memory 50 is also written in the cache memory 40. As a result, the cache is hit when the same data is accessed next time.

【0006】データのライトを行う場合には、キャッシ
ュのヒット,ミスにかかわらず、キャッシュメモリ40
と主記憶50の双方にデータを書き込む。これは、キャ
ッシュメモリ40と、主記憶50に格納されているデー
タの整合性を保つためである。
When data is written, the cache memory 40 is irrespective of whether the cache hits or misses.
And write data to both the main memory 50. This is for maintaining the consistency between the cache memory 40 and the data stored in the main memory 50.

【0007】キャッシュメモリ40は、主記憶50より
も容量が小さいため、主記憶50のデータを全て記憶す
ることはできない。このため、キャッシュメモリ40に
新たにデータを書き込む場合には、データの重ね書きが
必要となる場合がある。キャッシュメモリ40は複数個
のブロック単位で管理されており、主記憶50からのデ
ータの書き込みは、このブロック単位で行われる。
Since the cache memory 40 has a smaller capacity than the main memory 50, it cannot store all the data in the main memory 50. Therefore, when new data is written in the cache memory 40, it may be necessary to overwrite the data. The cache memory 40 is managed in units of a plurality of blocks, and writing of data from the main memory 50 is performed in units of these blocks.

【0008】図2に、従来のキャッシュコントローラ3
0の内部構成の一例を示す。この図において31は、キ
ャッシュメモリ40の各ブロックに格納されているデー
タに関する情報を格納するためのタグメモリである。タ
グメモリ31の構成例を図3に示す。この図において、
320はタグアドレスであり、321は有効フラグであ
る。一組のタグアドレス320と有効フラグ321は、
キャッシュメモリ40中の1つのブロックに対応してい
る。以下の説明では、この組をエントリーと呼ぶ。32
は、メモリバス20から入力されるアドレス300の一
部と、タグメモリ31中のタグアドレス320を、比較
するためのアドレス比較器である。33はメモリバス2
0に接続されるデータ信号310と、キャッシュメモリ
40に接続されるデータ信号311と、主記憶50に接
続されるデータ信号312を、相互に切り換えて接続す
るためのセレクタである。34はキャッシュヒット判定
信号である。
FIG. 2 shows a conventional cache controller 3
An example of the internal configuration of 0 is shown. In this figure, 31 is a tag memory for storing information regarding the data stored in each block of the cache memory 40. A configuration example of the tag memory 31 is shown in FIG. In this figure,
320 is a tag address and 321 is a valid flag. The set of tag address 320 and valid flag 321 is
It corresponds to one block in the cache memory 40. In the following description, this set is called an entry. 32
Is an address comparator for comparing a part of the address 300 input from the memory bus 20 with the tag address 320 in the tag memory 31. 33 is the memory bus 2
It is a selector for switching and connecting the data signal 310 connected to 0, the data signal 311 connected to the cache memory 40, and the data signal 312 connected to the main memory 50. Reference numeral 34 is a cache hit determination signal.

【0009】図2のキャッシュコントローラ30を使用
した図1のシステムの動作を、プロセッサ10からのリ
ードアクセスを例に説明する。リードアクセスの際に
は、まずプロセッサ10が、メモリバス20を介してキ
ャッシュコントローラ30へアクセス対象のアドレス3
00を出力する。キャッシュコントローラ30では、キ
ャッシュのヒット判定を行うために、このアドレス30
0を図4のように分解する。キャッシュのヒット判定は
以下のようにして行われる。
The operation of the system of FIG. 1 using the cache controller 30 of FIG. 2 will be described by taking a read access from the processor 10 as an example. At the time of read access, the processor 10 first accesses the address 3 of the access target to the cache controller 30 via the memory bus 20.
00 is output. The cache controller 30 uses this address 30 in order to determine the cache hit.
0 is decomposed as shown in FIG. The cache hit determination is performed as follows.

【0010】(1)アクセスアドレス300の中のイン
デックス302の値を使用して、タグメモリ31の中か
ら、該当するエントリーを全て選択する。この例では、
インデックス302の値は「000011」であるの
で、図3の太枠部分330で示される4つのエントリー
が選択される。以下の説明では、1つのインデックス3
02で指定される4つのエントリーを、セットと呼ぶ。
(1) Using the value of the index 302 in the access address 300, all the corresponding entries are selected from the tag memory 31. In this example,
Since the value of the index 302 is “000011”, the four entries shown by the thick frame portion 330 in FIG. 3 are selected. In the following description, one index 3
The four entries specified by 02 are called a set.

【0011】(2)アドレス比較器32を用いて、
(1)で選択された4つのエントリー中の全てのタグ領
域320を、アクセスアドレス300中のタグ領域30
2と比較する。一致するものが1つも無い場合にはキャ
ッシュミスとなる。
(2) Using the address comparator 32,
All the tag areas 320 in the four entries selected in (1) are replaced with the tag areas 30 in the access address 300.
Compare with 2. If there is no match, a cache miss will occur.

【0012】(3)(2)で一致したエントリー中の有
効フラグ321の内容を調べる。このフラグの内容が
「有効」であったときには、キャッシュはヒットしてお
り、アクセス対象のデータはキャッシュメモリ40の中
にある。このフラグの内容が「無効」であったときには
キャッシュミスとなる。
(3) Check the contents of the valid flag 321 in the entry matched in (2). When the content of this flag is "valid", the cache is hit and the data to be accessed is in the cache memory 40. When the content of this flag is "invalid", a cache miss occurs.

【0013】以上の手順でキャッシュのヒット判定が行
われる。キャッシュがヒットしているときには、キャッ
シュヒット判定信号34が「ヒット」になる。このと
き、データ信号311はセレクタ33によってデータ信
号310へ接続され、キャッシュメモリ40のデータ
は、この経路を通ってプロセッサ10へ読み出される。
キャッシュがミスしているときには、キャッシュヒット
判定信号34は「ミス」となり、データ信号312はセ
レクタ33によってデータ信号310へ接続され、主記
憶50のデータは、この経路を通ってプロセッサ10へ
読み出される。主記憶50から読み出されたデータは、
キャッシュメモリ40にも書き込まれ、この時に、タグ
メモリ31中の対応するエントリーの内容も更新され
る。インデックス302で指定される4つのエントリー
の中に、有効フラグ321の内容が「無効」のものがあ
った場合には、その内の1エントリーが更新され、キャ
ッシュメモリ40の対応するブロックにデータが書き込
まれる。有効フラグ321が全て「有効」である場合に
は、その中から1つを選択して重ね書きする必要があ
る。この時に、どのエントリーを重ね書きの対象として
選択するかは、「コンピュータアーキテクチャ:雨宮,
田中著(発行所(株)オーム社,発行日 昭和63年8
月30日)」などの文献にLRU法,FIFO法などが
記載されている。これらの手法は、単一のプロセッサを
用いたシステムを対象として考えられており、複数のプ
ロセッサを使用するシステムにおいて、プロセッサごと
に優先度を持たせることについては考慮されていない。
The cache hit determination is performed by the above procedure. When the cache is hit, the cache hit determination signal 34 becomes "hit". At this time, the data signal 311 is connected to the data signal 310 by the selector 33, and the data in the cache memory 40 is read to the processor 10 through this path.
When the cache is missed, the cache hit determination signal 34 becomes "miss", the data signal 312 is connected to the data signal 310 by the selector 33, and the data in the main memory 50 is read to the processor 10 through this path. . The data read from the main memory 50 is
It is also written in the cache memory 40, and at this time, the content of the corresponding entry in the tag memory 31 is also updated. If the content of the valid flag 321 is "invalid" among the four entries specified by the index 302, one entry is updated and the data is stored in the corresponding block of the cache memory 40. Written. When all the valid flags 321 are "valid", it is necessary to select one of them and overwrite it. At this time, as to which entry to be selected for overwriting, "Computer Architecture: Amemiya,
Written by Tanaka (Publishing Office, Ohmsha Co., Ltd., date of issue 1988 8
LRU method, FIFO method, etc. are described in documents such as "March 30th". These methods are considered for a system using a single processor, and in a system using a plurality of processors, giving priority to each processor is not considered.

【0014】また、特開平2−16654号公報の「キ
ャッシュメモリ制御方式」では、主記憶を、大きさが固
定された複数個の領域に分割し、これに対応してキャッ
シュメモリも大きさが固定された複数個の領域に分割す
ることにより、複数のプログラムを、実行する際にキャ
ッシュの更新の発生頻度を減少させる方法が記載されて
いる。
Further, in the "cache memory control method" of Japanese Patent Laid-Open No. 2-16654, the main memory is divided into a plurality of areas having a fixed size, and the cache memory also has a corresponding size. There is described a method of reducing the frequency of occurrence of cache update when executing a plurality of programs by dividing the program into a plurality of fixed areas.

【0015】ライトアクセスの場合も、ヒット判定やキ
ャッシュへの書き込み方法はリードアクセスと同様であ
る。ただし、ライトアクセスでは、キャッシュがヒット
している場合でも、キャッシュメモリ40にデータを書
き込むと共に、主記憶50にもデータを書き込む。
In the case of the write access, the hit determination and the method of writing to the cache are the same as the read access. However, in the write access, even when the cache is hit, the data is written in the cache memory 40 and the data is also written in the main memory 50.

【0016】この例では、1セットが4エントリーで構
成されているので、アクセスアドレス300中のインデ
ックス302が同じ場合でも、タグアドレス301が異
なる4種類のアドレスに対するアクセスがキャッシュに
ヒットできる。この場合、キャッシュは4ウェイである
という。ウェイ数は4以外にもいろいろな値をとること
ができる。キャッシュに関する他のパラメータが同じで
あれば、このウェイ数が多いほどキャッシュがヒットす
る確率が大きくなり、システムの処理性能が向上する。
In this example, since one set consists of four entries, even if the index 302 in the access address 300 is the same, access to four types of addresses with different tag addresses 301 can hit the cache. In this case, the cache is said to be 4-way. The number of ways can take various values other than four. If the other parameters related to the cache are the same, the larger the number of ways, the higher the probability of hitting the cache, and the better the processing performance of the system.

【0017】以上の説明は、プロセッサ10からのアク
セスに関するものであるが、プロセッサ11からのアク
セスに関しても同様である。
The above description relates to the access from the processor 10, but the same applies to the access from the processor 11.

【0018】[0018]

【発明が解決しようとする課題】キャッシュメモリを共
有するマルチプロセッサシステムでは、各プロセッサは
実行している処理の優先度にかかわらず、同じ条件でキ
ャッシュメモリを使用することになる。このため、メモ
リのアクセスパターンによっては、優先度の低い処理を
実行中のプロセッサが、多くのキャッシュメモリを占有
してしまい、優先度の高い処理を実行中のプロセッサに
対するキャッシュメモリの割り当てが、少なくなってし
まう可能性がある。この場合には、優先度の高い処理を
実行するプロセッサが十分な処理性能を得られないこと
になる。
In a multiprocessor system sharing a cache memory, each processor uses the cache memory under the same condition regardless of the priority of the processing being executed. Therefore, depending on the memory access pattern, a large number of cache memories are occupied by a processor executing low-priority processing, and the allocation of cache memory to the processor executing high-priority processing is small. There is a possibility of becoming. In this case, the processor that executes the high-priority processing cannot obtain sufficient processing performance.

【0019】[0019]

【課題を解決するための手段】この問題を解決するため
に、本発明では、タグメモリの各エントリー中に、タグ
アドレス,有効フラグなどの他に、プロセッサの識別情
報も格納する。また、キャッシュコントローラ内に、各
プロセッサの優先度を格納するための優先度テーブルを
設ける。キャッシュコントローラは、これらの情報か
ら、アクセス中のプロセッサの優先度および、キャッシ
ュの使用状況を調べ、これに従ってキャッシュの更新方
法を制御することにより、優先度の高い処理を実行中の
プロセッサに多くのキャッシュメモリが割り当てられる
ようにする。
In order to solve this problem, the present invention stores the identification information of the processor in each entry of the tag memory in addition to the tag address and the valid flag. In addition, a priority table for storing the priority of each processor is provided in the cache controller. From this information, the cache controller checks the priority of the processor being accessed and the usage status of the cache, and controls the cache update method accordingly, so that the processor executing the high-priority processing can obtain many information. Allow cache memory to be allocated.

【0020】[0020]

【作用】本発明によれば、キャッシュメモリを共有する
マルチプロセッサシステムにおいて、優先度の高い処理
を実行中のプロセッサが多くのキャッシュメモリを使用
することが可能となる。
According to the present invention, in a multiprocessor system sharing a cache memory, it becomes possible for a processor executing a high priority process to use a large amount of cache memory.

【0021】[0021]

【実施例】本発明の実施例を、図1のシステム構成例を
用いて説明する。この図において、10,11はプロセ
ッサ、20はメモリバス、30はキャッシュコントロー
ラ、40はキャッシュメモリ、50は主記憶である。こ
の例では、プロセッサの数を2つとしているが、3つ以
上のプロセッサを使用することも可能である。プロセッ
サ10とプロセッサ11は、互いに独立した処理を実行
することが可能である。プロセッサ10,11は、メモ
リバス20を介して、主記憶50に対してアクセスを行
う。キャッシュメモリ40は、主記憶50に比べて容量
は小さいが、高速なアクセスが可能である。通常キャッ
シュメモリ40には、主記憶50に格納されているデー
タの一部のコピーが格納される。
EXAMPLE An example of the present invention will be described with reference to the system configuration example of FIG. In this figure, 10 and 11 are processors, 20 is a memory bus, 30 is a cache controller, 40 is a cache memory, and 50 is a main memory. In this example, the number of processors is two, but it is also possible to use three or more processors. The processor 10 and the processor 11 can execute independent processing. The processors 10 and 11 access the main memory 50 via the memory bus 20. Although the cache memory 40 has a smaller capacity than the main memory 50, it can be accessed at high speed. The normal cache memory 40 stores a copy of part of the data stored in the main memory 50.

【0022】図5に、本発明で使用するキャッシュコン
トローラ30の内部構成の一例を示す。この図において
31は、キャッシュメモリ40の各ブロックに対応した
情報を格納するためのタグメモリである。本発明におけ
るタグメモリ31の構成例を図6に示す。本発明で使用
しているタグメモリ31の各エントリーは、タグアドレ
ス320,有効フラグ321の他に、そのエントリーを
使用しているプロセッサを示すプロセッサ識別子322
を格納する領域を持つ。32は、メモリバス20から入
力されるアドレス300の一部と、タグメモリ31中の
タグアドレス320を、比較するためのアドレス比較器
である。33はメモリバス20に接続されたデータ信号
310と、キャッシュメモリ40に接続されたデータ信
号311と、主記憶50に接続されたデータ信号312
を、相互に切り換えて接続するためのセレクタである。
34はキャッシュヒット判定信号である。35は、それ
ぞれのプロセッサの優先度を格納するための優先度テー
ブルである。
FIG. 5 shows an example of the internal configuration of the cache controller 30 used in the present invention. In this figure, 31 is a tag memory for storing information corresponding to each block of the cache memory 40. FIG. 6 shows a configuration example of the tag memory 31 in the present invention. Each entry of the tag memory 31 used in the present invention has a tag address 320, a valid flag 321, and a processor identifier 322 indicating a processor using the entry.
Has an area to store. Reference numeral 32 is an address comparator for comparing a part of the address 300 input from the memory bus 20 with the tag address 320 in the tag memory 31. 33 is a data signal 310 connected to the memory bus 20, a data signal 311 connected to the cache memory 40, and a data signal 312 connected to the main memory 50.
Is a selector for switching and connecting to each other.
Reference numeral 34 is a cache hit determination signal. Reference numeral 35 is a priority table for storing the priority of each processor.

【0023】この例では、キャッシュのヒット判定につ
いては、従来例で説明したものと同様の手順を用いる。
次に、本発明のポイントであるキャッシュの更新方法に
ついて説明する。
In this example, the cache hit determination uses the same procedure as that described in the conventional example.
Next, a method of updating the cache, which is a feature of the present invention, will be described.

【0024】キャッシュコントローラ30内の優先度テ
ーブル35において、プロセッサ10の優先度が3で、
プロセッサ11の優先度が1である場合を例に、各プロ
セッサに対するキャッシュメモリ40の割り当て方法を
説明する。ここで、優先度テーブル35は数値が大きい
ほど、対応するプロセッサの優先度が高いものとする。
この場合には、キャッシュメモリ40は、プロセッサ1
0に対して優先的に割り当てられるべきである。これ
は、各プロセッサが使用可能なキャッシュのエントリー
数を、プロセッサ10が1セットあたり3エントリー、
プロセッサ11が1セットあたり1エントリーというよ
うに設定することによって実現される。各プロセッサが
使用可能なキャッシュのブロック数は、エントリー数に
比例するため、キャッシュメモリ40の全容量のうち、
3/4がプロセッサ10に割り当てられ、残りの1/4
がプロセッサ11に割り当てられることになる。エント
リーの割り当ては、キャッシュの更新時に、該当するセ
ットの各エントリー中のプロセッサ識別子322を参照
し、これに従って更新するエントリーを決定することで
実現される。プロセッサ10がキャッシュを更新する手
順を図7のフローチャートに示す。キャッシュ更新時に
は、まず、該当するセットに、無効なエントリーが存在
するかを調べる(400)。無効なエントリーが存在す
る場合には、このエントリーに新しいデータが書き込ま
れる(401)。無効なエントリーが無い場合には、該
当するセットの中にプロセッサ11が使用中のエントリ
ーが2つ以上あるか調べる(410)。2つ以上あった
場合には、その内の1つが書き換えの対象となる(41
1)。2つ未満であった場合には、プロセッサ10が使
用中のエントリーの内の1つが書き換えられる(41
2)。同様に、プロセッサ11がキャッシュを更新する
手順を図8のフローチャートに示す。
In the priority table 35 in the cache controller 30, the priority of the processor 10 is 3,
A method of allocating the cache memory 40 to each processor will be described by taking the case where the priority of the processor 11 is 1 as an example. Here, it is assumed that the larger the numerical value of the priority table 35, the higher the priority of the corresponding processor.
In this case, the cache memory 40 is the processor 1
It should be assigned to 0 preferentially. This is because the number of cache entries that each processor can use is 3 entries per set by the processor 10.
It is realized by the processor 11 setting one entry per set. Since the number of cache blocks that can be used by each processor is proportional to the number of entries, of the total capacity of the cache memory 40,
3/4 is allocated to processor 10 and the remaining 1/4
Will be assigned to the processor 11. The assignment of the entry is realized by referring to the processor identifier 322 in each entry of the corresponding set when updating the cache and determining the entry to be updated according to this. The procedure for the processor 10 to update the cache is shown in the flowchart of FIG. When updating the cache, it is first checked whether or not an invalid entry exists in the corresponding set (400). If an invalid entry exists, new data is written to this entry (401). If there is no invalid entry, it is checked if there are two or more entries being used by the processor 11 in the corresponding set (410). If there are two or more, one of them is the target of rewriting (41
1). If the number is less than 2, one of the entries being used by the processor 10 is rewritten (41
2). Similarly, the procedure for the processor 11 to update the cache is shown in the flowchart of FIG.

【0025】プロセッサの優先度テーブル35の内容
は、システムの動作中にも変更することが可能である。
前の例において、プロセッサ11の優先度が3に変更さ
れた場合、各プロセッサが使用可能な1セットあたりの
エントリー数は、プロセッサ10,プロセッサ11共
に、2に変更される。この場合の、プロセッサ10がキ
ャッシュを更新する手順を図9のフローチャートに示
す。キャッシュ更新時には、まず、該当するセットに、
無効なエントリーが存在するかを調べる(400)。無
効なエントリーが存在する場合には、このエントリーに
新しいデータが書き込まれる(401)。無効なエント
リーが無い場合には、該当するセットの中にプロセッサ
11が使用中のエントリーが3つ以上あるか調べる(4
30)。3つ以上あった場合には、その内の1つが書き
換えの対象となる(411)。2つ未満であった場合に
は、プロセッサ10が使用中のエントリーの内の1つが
書き換えられる(412)。同様に、プロセッサ11が
キャッシュを更新する手順を図10のフローチャートに
示す。この結果、2つのプロセッサは、キャッシュメモ
リ40の全容量を1/2ずつ使用することになる。
The contents of the processor priority table 35 can be changed even while the system is operating.
In the previous example, when the priority of the processor 11 is changed to 3, the number of entries per set usable by each processor is changed to 2 for both the processor 10 and the processor 11. The procedure for the processor 10 to update the cache in this case is shown in the flowchart of FIG. When updating the cache, first,
It is checked if there is an invalid entry (400). If an invalid entry exists, new data is written to this entry (401). If there is no invalid entry, it is checked whether there are three or more entries in use by the processor 11 in the corresponding set (4
30). If there are three or more, one of them becomes the rewriting target (411). If there are less than two, then one of the entries being used by processor 10 is rewritten (412). Similarly, the procedure for the processor 11 to update the cache is shown in the flowchart of FIG. As a result, the two processors use the entire capacity of the cache memory 40 by 1/2.

【0026】また、このように、各プロセッサの優先度
がほぼ等しい場合には、プロセッサごとにエントリー数
の管理を行わない、従来方式を使用することも可能であ
る。さらに、あるプロセッサの処理の優先度が他のプロ
セッサと比較して非常に高い場合には、キャッシュメモ
リ40の全容量を、そのプロセッサに割り当てることも
可能である。
Further, as described above, when the priorities of the processors are substantially equal to each other, it is possible to use the conventional method in which the number of entries is not managed for each processor. Furthermore, when the processing priority of a certain processor is very high compared to other processors, it is possible to allocate the entire capacity of the cache memory 40 to that processor.

【0027】ここまでの説明では、優先度テーブル35
内の数値の総和が、キャッシュの1セットあたりのエン
トリー数と等しい場合について説明を行ったが、必ずし
もこのようになっている必要はない。等しくない場合に
は、それぞれのプロセッサの優先度に応じた容量のキャ
ッシュが、各プロセッサに割り当てられる。
In the above description, the priority table 35
Although the case where the sum of the numerical values in the above is equal to the number of entries per set of the cache has been described, it is not necessary that this is the case. If they are not equal, a cache having a capacity according to the priority of each processor is assigned to each processor.

【0028】なお、プロセッサの優先度の他に、実行中
のプロセスの優先度など、キャッシュの更新方法の決定
に他のパラメータを使用することも可能である。
In addition to the processor priority, other parameters such as the priority of the process being executed can be used to determine the cache update method.

【0029】さらに、プロセッサ識別子322の特定パ
ターンがキャッシュの無効状態も表現できるようにして
おくことで、有効フラグ321を省略することが可能で
ある。例えば、プロセッサ数が7個の場合、プロセッサ
識別子「001」から「111」を各プロセッサに割り
当て、プロセッサの識別に使用されていない「000」
のパターンを、キャッシュの無効状態に割り当てること
で、図11に示すように、タグメモリ31の各エントリ
ーを、タグアドレス320とプロセッサ識別子322だ
けで構成することも可能である。
Further, the valid flag 321 can be omitted by allowing the specific pattern of the processor identifier 322 to express the invalid state of the cache. For example, when the number of processors is 7, processor identifiers “001” to “111” are assigned to each processor and “000” which is not used for processor identification is assigned.
It is possible to configure each entry of the tag memory 31 with only the tag address 320 and the processor identifier 322, as shown in FIG.

【0030】なお、これらの実施例は、システムを構成
しているプロセッサ内の幾つか、あるいは全てが一次キ
ャッシュを持っている場合の、二次キャッシュの制御に
も適用することが可能である。
Note that these embodiments can also be applied to the control of the secondary cache when some or all of the processors making up the system have the primary cache.

【0031】また、図12に示すように、メモリバス2
0を使用せずに、プロセッサ10とプロセッサ11をキ
ャッシュコントローラ30に直接接続することも可能で
ある。この場合には、キャッシュコントローラ30の入
出力ピン数は増加するが、データの転送バンド幅を大き
くすることができる。
Further, as shown in FIG. 12, the memory bus 2
It is also possible to directly connect the processors 10 and 11 to the cache controller 30 without using 0. In this case, the number of input / output pins of the cache controller 30 increases, but the data transfer bandwidth can be increased.

【0032】また、キャッシュコントローラ30とプロ
セッサ10,11を、1つのモジュールに集約すること
により、両者を接続する信号を駆動するために必要な電
力を削減することができ、システムの低消費電力化が可
能となる。
Further, by consolidating the cache controller 30 and the processors 10 and 11 into one module, it is possible to reduce the power required to drive the signal connecting the two, thereby reducing the system power consumption. Is possible.

【0033】また、キャッシュコントローラ30とキャ
ッシュメモリ40を、1つのモジュールに集約した場合
には、LSIのピン数などの制約が無くなるため、これ
らを接続するための信号線を増加させることができる。
これにより、これらの相互間のデータ転送速度を上げる
ことができ、システム全体の処理能力を向上させること
ができる。
Further, when the cache controller 30 and the cache memory 40 are integrated into one module, there are no restrictions on the number of pins of the LSI, so that the number of signal lines for connecting these can be increased.
As a result, the data transfer rate between them can be increased, and the processing capacity of the entire system can be improved.

【0034】以上の実施例では、説明を簡単にするため
に、プロセッサの数を2つとして説明を行ったが、プロ
セッサの数が3つ以上の場合にも同様の方式を使用する
ことが可能である。
In the above embodiment, the number of processors is two in order to simplify the description, but the same method can be used when the number of processors is three or more. Is.

【0035】[0035]

【発明の効果】本発明によれば、キャッシュメモリを共
有するマルチプロセッサシステムにおいて、優先度の高
い処理を実行中のプロセッサが、優先的に多くのキャッ
シュメモリを使用することが可能となる。
According to the present invention, in a multiprocessor system sharing a cache memory, a processor executing a high priority process can preferentially use a large number of cache memories.

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

【図1】キャッシュメモリを使用したマルチプロセッサ
システムの構成例を示す図である。
FIG. 1 is a diagram illustrating a configuration example of a multiprocessor system using a cache memory.

【図2】従来方式で使用するキャッシュコントローラの
内部構成の一例を示す図である。
FIG. 2 is a diagram showing an example of an internal configuration of a cache controller used in a conventional method.

【図3】従来方式で使用するタグメモリの構成例を示す
図である。
FIG. 3 is a diagram showing a configuration example of a tag memory used in a conventional method.

【図4】アクセスアドレスの分割方法の説明図である。FIG. 4 is an explanatory diagram of a method of dividing an access address.

【図5】本発明で使用するキャッシュコントローラの内
部構成の一例を示す図である。
FIG. 5 is a diagram showing an example of an internal configuration of a cache controller used in the present invention.

【図6】本発明で使用するタグメモリの構成例を示す図
である。
FIG. 6 is a diagram showing a configuration example of a tag memory used in the present invention.

【図7】プロセッサ10のキャッシュ更新方法を示した
フローチャートである。
FIG. 7 is a flowchart showing a cache update method of the processor 10.

【図8】プロセッサ11のキャッシュ更新方法を示した
フローチャートである。
FIG. 8 is a flowchart showing a cache updating method of the processor 11.

【図9】プロセッサ10のキャッシュ更新方法を示した
フローチャートである。
FIG. 9 is a flowchart showing a cache updating method of the processor 10.

【図10】プロセッサ11のキャッシュ更新方法を示し
たフローチャートである。
10 is a flowchart showing a cache updating method of the processor 11. FIG.

【図11】本発明で使用するタグメモリの別の構成例を
示す図である。
FIG. 11 is a diagram showing another configuration example of the tag memory used in the present invention.

【図12】本発明を使用したマルチプロセッサシステム
の他の構成例を示す図である。
FIG. 12 is a diagram showing another configuration example of a multiprocessor system using the present invention.

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

10…プロセッサ、20…メモリバス、30…キャッシ
ュコントローラ、31…タグメモリ、32…アドレス比
較器、33…セレクタ、34…キャッシュヒット判定信
号、35…プロセッサ優先度テーブル、40…キャッシ
ュメモリ、50…主記憶、320…タグアドレス、32
1…有効フラグ、322…プロセッサ識別子。
10 ... Processor, 20 ... Memory bus, 30 ... Cache controller, 31 ... Tag memory, 32 ... Address comparator, 33 ... Selector, 34 ... Cache hit determination signal, 35 ... Processor priority table, 40 ... Cache memory, 50 ... Main memory, 320 ... Tag address, 32
1 ... Valid flag, 322 ... Processor identifier.

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】少なくとも2つ以上のプロセッサと、それ
らが共有するキャッシュメモリおよび主記憶とそれらを
制御する制御回路から構成されるシステムにおいて、各
プロセッサが実行している処理の優先度に応じて、それ
ぞれのプロセッサに対して割り当てるキャッシュメモリ
の容量を動的に変更することにより、優先度の高い処理
を実行中のプロセッサに対して、多くのキャッシュメモ
リを割り当てることが可能であることを特徴としたメモ
リ制御方式。
1. In a system including at least two or more processors, a cache memory shared by them, a main memory, and a control circuit for controlling them, depending on the priority of processing executed by each processor. By dynamically changing the capacity of the cache memory allocated to each processor, it is possible to allocate a large amount of cache memory to the processor that is executing a high priority process. Memory control method.
【請求項2】少なくとも2つ以上のプロセッサと、それ
らが共有するキャッシュメモリおよび主記憶とそれらを
制御する制御回路から構成されるシステムにおいて、各
プロセッサが実行している処理の優先度に応じて、それ
ぞれのプロセッサに対して割り当てられるキャッシュメ
モリの容量を変更可能とするために、各プロセッサが使
用可能なキャッシュのエントリー数を、動的に変更でき
ることを特徴としたメモリ制御方式。
2. In a system including at least two or more processors, a cache memory shared by them, a main memory, and a control circuit for controlling them, according to the priority of processing executed by each processor. , A memory control method characterized in that the number of cache entries that can be used by each processor can be dynamically changed in order to change the capacity of the cache memory allocated to each processor.
【請求項3】複数のプロセッサが、キャッシュメモリを
共用するシステムにおいて、各プロセッサが実行してい
る処理の優先度に応じて、それぞれのプロセッサに対し
て割り当てられるキャッシュメモリの容量を変更可能と
するために、接続されているプロセッサの優先度を格納
するための手段を持つことを特徴としたキャッシュメモ
リのコントローラ。
3. In a system in which a plurality of processors share a cache memory, the capacity of the cache memory assigned to each processor can be changed according to the priority of the processing executed by each processor. A cache memory controller characterized in that it has means for storing the priority of the connected processor.
【請求項4】請求項3記載のキャッシュメモリのコント
ローラとプロセッサを、1つに集約したことを特徴とし
たプロセッサモジュール。
4. A processor module in which the controller and the processor of the cache memory according to claim 3 are integrated into one.
【請求項5】複数のプロセッサが、キャッシュメモリを
共用するシステムにおいて、各プロセッサが実行してい
る処理の優先度に応じて、それぞれのプロセッサに対し
て割り当てられるキャッシュメモリの容量を変更可能と
するために、キャッシュエントリーごとに、そのエント
リーを使用しているプロセッサを識別するための情報も
格納しておくことを特徴としたタグメモリ。
5. In a system in which a plurality of processors share a cache memory, the capacity of the cache memory assigned to each processor can be changed according to the priority of the processing executed by each processor. For this reason, the tag memory is characterized in that for each cache entry, information for identifying the processor using the entry is also stored.
【請求項6】請求項5記載のタグメモリを、内蔵したこ
とを特徴としたキャッシュメモリのコントローラ。
6. A cache memory controller having the tag memory according to claim 5 built therein.
【請求項7】請求項6記載のキャッシュメモリのコント
ローラとキャッシュメモリを、1つに集約したことを特
徴としたメモリモジュール。
7. A memory module in which the controller of the cache memory according to claim 6 and the cache memory are integrated into one.
JP6040713A 1994-03-11 1994-03-11 Memory control system Pending JPH07248967A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6040713A JPH07248967A (en) 1994-03-11 1994-03-11 Memory control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6040713A JPH07248967A (en) 1994-03-11 1994-03-11 Memory control system

Publications (1)

Publication Number Publication Date
JPH07248967A true JPH07248967A (en) 1995-09-26

Family

ID=12588231

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6040713A Pending JPH07248967A (en) 1994-03-11 1994-03-11 Memory control system

Country Status (1)

Country Link
JP (1) JPH07248967A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008544366A (en) * 2005-06-15 2008-12-04 フリースケール セミコンダクター インコーポレイテッド Cache having flexible configuration, data processing system using the same, and method therefor
US7493448B2 (en) 2002-06-24 2009-02-17 Nec Corporation Prevention of conflicting cache hits without an attendant increase in hardware
JP2012022616A (en) * 2010-07-16 2012-02-02 Panasonic Corp Shared memory system and control method thereof
WO2012026034A1 (en) * 2010-08-27 2012-03-01 富士通株式会社 Scheduler, multi-core processor system, and scheduling method
JP2013502645A (en) * 2009-08-21 2013-01-24 エンパイア テクノロジー ディベロップメント エルエルシー Allocation of processor cores with cache memory connectivity
JP2014021774A (en) * 2012-07-19 2014-02-03 Fujitsu Ltd Arithmetic processing unit and arithmetic processing method
US8868835B2 (en) 2009-04-08 2014-10-21 Panasonic Corporation Cache control apparatus, and cache control method
US9535845B2 (en) 2012-10-19 2017-01-03 Renesas Electronics Corporation Cache control device and cache control method
US9547576B2 (en) 2011-07-13 2017-01-17 Fujitsu Limited Multi-core processor system and control method
WO2019188176A1 (en) * 2018-03-30 2019-10-03 株式会社デンソー Cache memory
US11914521B1 (en) * 2021-08-31 2024-02-27 Apple Inc. Cache quota control

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7493448B2 (en) 2002-06-24 2009-02-17 Nec Corporation Prevention of conflicting cache hits without an attendant increase in hardware
JP2008544366A (en) * 2005-06-15 2008-12-04 フリースケール セミコンダクター インコーポレイテッド Cache having flexible configuration, data processing system using the same, and method therefor
US8868835B2 (en) 2009-04-08 2014-10-21 Panasonic Corporation Cache control apparatus, and cache control method
JP2013502645A (en) * 2009-08-21 2013-01-24 エンパイア テクノロジー ディベロップメント エルエルシー Allocation of processor cores with cache memory connectivity
JP2012022616A (en) * 2010-07-16 2012-02-02 Panasonic Corp Shared memory system and control method thereof
WO2012026034A1 (en) * 2010-08-27 2012-03-01 富士通株式会社 Scheduler, multi-core processor system, and scheduling method
CN103080903A (en) * 2010-08-27 2013-05-01 富士通株式会社 Scheduler, multi-core processor system, and scheduling method
JP5516744B2 (en) * 2010-08-27 2014-06-11 富士通株式会社 Scheduler, multi-core processor system, and scheduling method
US8996811B2 (en) 2010-08-27 2015-03-31 Fujitsu Limited Scheduler, multi-core processor system, and scheduling method
US9430388B2 (en) 2010-08-27 2016-08-30 Fujitsu Limited Scheduler, multi-core processor system, and scheduling method
US9547576B2 (en) 2011-07-13 2017-01-17 Fujitsu Limited Multi-core processor system and control method
JP2014021774A (en) * 2012-07-19 2014-02-03 Fujitsu Ltd Arithmetic processing unit and arithmetic processing method
US9535845B2 (en) 2012-10-19 2017-01-03 Renesas Electronics Corporation Cache control device and cache control method
WO2019188176A1 (en) * 2018-03-30 2019-10-03 株式会社デンソー Cache memory
JP2019179413A (en) * 2018-03-30 2019-10-17 株式会社デンソー Cache memory
US11914521B1 (en) * 2021-08-31 2024-02-27 Apple Inc. Cache quota control

Similar Documents

Publication Publication Date Title
EP0557050B1 (en) Apparatus and method for executing processes in a multiprocessor system
US7676632B2 (en) Partial cache way locking
US6877067B2 (en) Shared cache memory replacement control method and apparatus
US7216201B2 (en) Parallel cachelets
JP2002140234A (en) Cache device
US5860101A (en) Scalable symmetric multiprocessor data-processing system with data allocation among private caches and segments of system memory
US20110208916A1 (en) Shared cache controller, shared cache control method and integrated circuit
US6038642A (en) Method and system for assigning cache memory utilization within a symmetric multiprocessor data-processing system
JPH07248967A (en) Memory control system
US6952761B2 (en) Bus interface selection by page table attributes
US20080016282A1 (en) Cache memory system
US6094710A (en) Method and system for increasing system memory bandwidth within a symmetric multiprocessor data-processing system
US20020049889A1 (en) Data processing apparatus with a cache memory and method of using such an apparatus
US7293144B2 (en) Cache management controller and method based on a minimum number of cache slots and priority
US8266379B2 (en) Multithreaded processor with multiple caches
US6598050B1 (en) Apparatus and method for limited data sharing in a multi-tasking system
US6915406B2 (en) Address translation apparatus, address translation method, and two-layer address translation apparatus
US6901450B1 (en) Multiprocessor machine and cache control method for providing higher priority to shared cache that is accessed by multiprocessors
JP3964821B2 (en) Processor, cache system and cache memory
JP2001290704A (en) Device and method for controlling multiprocess
JP2685455B2 (en) Data processing device
JP2008152571A (en) Cache memory device and multiprocessor system
CN116166606B (en) Cache control architecture based on shared tightly coupled memory
US5412790A (en) High-throughput data processing system equipped with cache memory system for achieving high hit ratio
JPH07282023A (en) Data transfer amount variable processor and system using the same