JPH02226449A - Cache memory control system - Google Patents
Cache memory control systemInfo
- Publication number
- JPH02226449A JPH02226449A JP1047217A JP4721789A JPH02226449A JP H02226449 A JPH02226449 A JP H02226449A JP 1047217 A JP1047217 A JP 1047217A JP 4721789 A JP4721789 A JP 4721789A JP H02226449 A JPH02226449 A JP H02226449A
- Authority
- JP
- Japan
- Prior art keywords
- cache
- memory
- write
- processor
- 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
Links
- 230000015654 memory Effects 0.000 title claims abstract description 196
- 238000000034 method Methods 0.000 claims description 21
- 238000001514 detection method Methods 0.000 description 15
- 230000004044 response Effects 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000006073 displacement reaction Methods 0.000 description 1
Landscapes
- Multi Processors (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
【発明の詳細な説明】
[発明の目的]
(産業上の利用分野)
この発明は、マルチプロセッサシステムにおけるキャッ
シュメモリ制御方式に関する。DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Field of Industrial Application) The present invention relates to a cache memory control method in a multiprocessor system.
(従来の技術)
複数のプロセッサが主記憶を共有使用するキャッシュメ
モリ制御方式のマルチプロセッサシステムでは、メモリ
ライト時のキャッシュメモリ制御としてライトスルー方
式を適用するのが一般的である。マルチプロセッサシス
テムでライトスルー方式が適用される理由は、以下に述
べるように各プロセッサ毎に用意されるキャッシュメモ
リと主記憶との間のデータの一致がとり易いためである
。即ち、マルチプロセッサシステムにおけるライトスル
ー方式では、成るプロセッサからのメモリライト要求が
あった場合、このプロセッサのキャッシュメモリは勿論
、主記憶にもデータが書込まれる。これと同時に他のプ
ロセッサの(キャッシュメモリをそれぞれ管理するため
の)各キャソシュタグメモリがチエツクされ、もし他の
プロセッサのキャッシュメモリに同一アドレス(同一ブ
ロックアドレス)の内容が格納されていた場合、対応す
るキャッシュタグメモリのタグを無効状態にする操作が
行われる。この結果、各プロセッサのキャッンユメモリ
と主記憶との間でデータを一致させることか可能となる
。(Prior Art) In a multiprocessor system using a cache memory control method in which a plurality of processors share a main memory, a write-through method is generally applied as cache memory control at the time of memory write. The reason why the write-through method is applied in a multiprocessor system is that it is easy to match data between the cache memory prepared for each processor and the main memory, as described below. That is, in the write-through method in a multiprocessor system, when there is a memory write request from a processor, data is written not only to the cache memory of this processor but also to the main memory. At the same time, each cache tag memory (for managing each cache memory) of other processors is checked, and if the contents of the same address (same block address) are stored in the cache memory of another processor, An operation is performed to invalidate the tag in the corresponding cache tag memory. As a result, it becomes possible to match data between the cache memory and main memory of each processor.
さて、メモリライト時のキャッシュメモリ制御方式とし
て、上記のライトスルー方式の他にライトバック方式が
知られている。このライトバック方式は、通常はメモリ
ライトを要求したプロセッ→ノ゛のキャッシュメモリへ
の書込みを行うだけのため、処理は簡単11つ高速とな
るものの、キャッシュメモリと主記憶との間のデータの
一致はとれない。したがって、主記憶を複数のプロセッ
サで共qするマルチプロセッサシステムでは、採用され
ていなかった。Now, in addition to the write-through method described above, a write-back method is known as a cache memory control method during memory write. This write-back method normally only writes to the cache memory of the processor that requested the memory write, so the processing is simpler and faster, but the data between the cache memory and main memory is There is no consensus. Therefore, it has not been adopted in multiprocessor systems in which the main memory is shared by a plurality of processors.
(発明が解決しようとする課題)
上記したように従来のマルチプロセッサシステムにおけ
るキャッシュメモリ制御方式では、各プロセッサのキャ
ッシュメモリと主記憶との間のデータの一致をとり品く
するためにライトスルー方式が適用されていた。しかし
、ライトスルー方式では、成るプロセッサからメモリラ
イト要求が出された場合、主記憶への書込み動作、およ
び他のプロセッサのキャッシュタグメモリを対象とする
タグチエツクが必ず必要となるため、システム性能の低
下を招くという問題があった。(Problems to be Solved by the Invention) As described above, in the conventional cache memory control method in a multiprocessor system, a write-through method is used to ensure data consistency between the cache memory and main memory of each processor. was applied. However, in the write-through method, when a memory write request is issued from a processor, a write operation to the main memory and a tag check for the cache tag memory of other processors are always required, which reduces system performance. There was the problem of inviting
したがってこの発明の解決すべき課題は、マルチプロセ
ッサシステムにおける各プロセッサのキャッシュメモリ
と主記憶との間のデータ一致を図りながら、システム性
能の向上が図れるようにすることである。Therefore, an object of the present invention is to improve system performance while ensuring data consistency between the cache memory and main memory of each processor in a multiprocessor system.
[発明の構成]
(課題を解決するための手段)
この発明は、複数のプロセッサが主記憶を共有使用する
キャッシュメモリ制御方式のマルチプロセッサシステム
に、上記プロセッサから主記憶アクセス要求が発せられ
た際に、その要求先の主記憶領域が他プロセッサとの間
で共有使用される共有領域であるか否かを判別する判別
手段を設け、主記憶アクセス要求がライトアクセス要求
の場合には、土肥tll別手段の判別結果に応じてライ
トスルー方式またはライトバック方式によるキャッシュ
メモリ制御を行うようにしたことを特徴とする。[Structure of the Invention] (Means for Solving the Problems) This invention provides a multiprocessor system using a cache memory control method in which a plurality of processors share a main memory, when a main memory access request is issued from the processor. A determination means is provided for determining whether the main memory area of the request destination is a shared area shared with other processors, and if the main memory access request is a write access request, the Doi tll The present invention is characterized in that the cache memory is controlled by a write-through method or a write-back method depending on the determination result of the separate means.
(作用)
この発明は、マルチプロセッサシステムにおいて谷プロ
セッサのキャッシュメモリと主J己憶との間でデータの
一致をとる必要がある領域は、主記憶の全領域ではなく
、各プロセッサで実際に共a使用される共a領域だけで
あることに右目してなされており、プロセッサからのラ
イトアクセス要求先が主記憶の共有領域でないことが上
記判別手段によって判別された場合に、ライトバック方
式によるキャッシュメモリ制御に切換えることにより、
従来は避けられなかった不用な主記憶へのライト動作や
他プロセッサのタグチエツクの発生を防止することがで
きるようになる。なお、プロセッサからのライトアクセ
ス要求先が主記憶の共有領域である場合には、各プロセ
ッサのキャッシュメモリと主記憶との間でデータの一致
をとるためにライトスルー方式のキャッシュメモリ制御
を行う必要がある。(Operation) In a multiprocessor system, the area in which it is necessary to match data between the cache memory of the valley processor and the main memory is not the entire area of the main memory, but is actually shared by each processor. If the determination means determines that the write access request from the processor is not the shared area of the main memory, the write-back cache is By switching to memory control,
It is now possible to prevent unnecessary write operations to the main memory and tag checks of other processors, which were unavoidable in the past. Note that if the destination of a write access request from a processor is a shared area of main memory, it is necessary to perform write-through cache memory control to ensure data consistency between each processor's cache memory and main memory. There is.
(実施例)
第1図はこの発明を適用するマルチプロセッサシステム
の一実施例を示すブロックもη成因である。同図におい
て、11は主記憶、+2−0.12−1は主記憶I+を
共有使用するプロセッサである。この実施例において1
.プロセッサ+2−0.12−1は論理アドレスによっ
て主記憶11をアクセスするようになっている。主記憶
11の領域は、主としてプログラム領域、プロセッサ1
2−0.12−1に固有のローカルデータ領域、および
プロセッサ12−0.12−1が相互のデータ交換等の
ために共有使用する共有領域に分けて用いられ、各領域
はページを単位に管理される。13は主記憶tiのメモ
リバスである。このメモリバス13は、アドレス、デー
タ、リード/ライト信号等の他に、主記憶11の共有領
域へのアクセスであるか否かを示す共有領域アクセス信
号の転送に供される。なお、メモリバス13に代えてシ
ステムバスを用いることも可能である。(Embodiment) FIG. 1 shows a block diagram of an embodiment of a multiprocessor system to which the present invention is applied. In the figure, 11 is a main memory, and +2-0.12-1 is a processor that shares the main memory I+. In this example 1
.. Processor +2-0.12-1 accesses main memory 11 using logical addresses. The area of the main memory 11 is mainly a program area, a processor 1
It is divided into a local data area specific to 2-0.12-1, and a shared area used by processors 12-0.12-1 for mutual data exchange, etc., and each area is divided into a page unit. managed. 13 is a memory bus for the main memory ti. This memory bus 13 is used for transferring address, data, read/write signals, etc., as well as a shared area access signal indicating whether or not a shared area of the main memory 11 is to be accessed. Note that it is also possible to use a system bus instead of the memory bus 13.
14−0.14−1はプロセッサ12−0.12−1の
主記憶11に対するアクセスを管理するためのメモリ管
理ユニットである。メモリ管理ユニット14−0. 1
4−1は、プロセッサ+2−0. 12−1から出力さ
れる論理アドレスのうち、ページ内オフセット(ディス
プレイスメント)を示す下位ビットを除くアドレス(論
理アドレス情報)を、物理アドレス情報(ページ内オフ
セットを除く上位物理アドレス)PAに変換するだめの
アドレス変換テーブル15−0.15−1を持つ。アド
レス変換テーブル15−0.15−1は、論理アドレス
情報で指定可能な段数のエントリを有しており、各エン
トリには対応する論理アドレス情報で指定される論理ペ
ージ領域が割付けられる上記+f5.11の物理ページ
領域を示す物理アドレス情報PA、主記憶保護情報Pな
どの周知の情報、および上記物理ページ領域が共有領域
に属しているか否かを示す共有フラグSF (SF−1
で共有領域を示す)を有するアドレス変換情報が登録さ
れる。14-0.14-1 is a memory management unit for managing access to the main memory 11 of the processor 12-0.12-1. Memory management unit 14-0. 1
4-1 is a processor +2-0. Among the logical addresses output from 12-1, the address (logical address information) excluding the lower bits indicating the intra-page offset (displacement) is converted into physical address information (upper physical address excluding the intra-page offset) PA. It has a useless address translation table 15-0.15-1. The address conversion table 15-0.15-1 has entries in the number of stages that can be specified by the logical address information, and each entry is allocated a logical page area specified by the corresponding logical address information. Well-known information such as physical address information PA indicating the physical page area of No. 11 and main memory protection information P, and a shared flag SF (SF-1) indicating whether the physical page area belongs to a shared area or not.
(indicating a shared area) is registered.
なお、主記憶保護情報Pについては、この発明に直接関
係しないため説明を省略する。Note that the description of the main memory protection information P will be omitted since it is not directly related to this invention.
1B−0,16−1はキャッシュブロックである。キャ
ー/ シュ”:f o ツク16−0. 16−1ハ、
上記tall(7)一部の写しが所定サイズのブロック
単位で置かれるキャッシュデータメモリ、このキャッシ
ュデータメモリに置かれている上記各ブロックに対応す
るアドレス領域を示すアドレスタグ並びに同タグが有効
であるか否かを示すバリッドビットを含むタグ情報が登
録されるキャッシュタグメモリ、およびプロセッサ12
−0.12−1がアクセスしようとする主記憶11の領
域のデータがキャッシュデータメモリに存在するか否か
(即ちヒツト/ミスヒツト)を検出するためのヒツト検
出器(いずれも図示せず)を有する。17−0.17−
1はキャッシュブロック18−0゜18−1 (内のヒ
ツト検出器)からのヒツト/ミスヒツトを示すヒツト検
出信号である。If!−0,fli−■はキャッシュブ
ロック+6−0.18−1内のキャッシュタグメモリと
は別に設けられたキャッシュタグメモリ、+9−0.1
9−1は他プロセッサからの主記憶アクセス要求時に上
記[11に対する(ライトスルーによる)書込みが行わ
れた場合に、その領域のデータがキャッシュブロックI
G−0,ie−を内のキャッシュデータメモリに存在す
るか否かを、メモリバス13上のメモリアドレス(ライ
トアドレス)の所定フィールドと、同アドレスで指定さ
れるキャッシュタグメモリ17−0.17−1内エント
リのアドレスタグとを比較することでチエツクする比較
器、20−0゜20刊は比較器+9−0.19−1の比
較結果を示す一致検出信号である。1B-0 and 16-1 are cache blocks. Kya/Sh”: f o Tsuk16-0. 16-1ha,
The above tall (7) cache data memory in which a copy of a part is placed in blocks of a predetermined size, the address tag indicating the address area corresponding to each of the above blocks placed in this cache data memory, and the same tag are valid. a cache tag memory in which tag information including a valid bit indicating whether the
-0.12-1 A hit detector (none of which is shown) for detecting whether or not the data in the area of the main memory 11 that the 1-1 attempts to access exists in the cache data memory (i.e., hit/miss). have 17-0.17-
1 is a hit detection signal indicating a hit/miss from the cache block 18-0.degree. 18-1 (the hit detector therein). If! -0,fli-■ is a cache tag memory provided separately from the cache tag memory in the cache block +6-0.18-1, +9-0.1
9-1 indicates that when a write is performed (by write-through) to the above [11] at the time of a main memory access request from another processor, the data in that area is transferred to the cache block I.
Whether G-0, ie- exists in the cache data memory in the cache tag memory 17-0.17 specified by the predetermined field of the memory address (write address) on the memory bus 13 and the same address. The comparator that checks by comparing the address tag of the entry in -1, 20-0.20, is a match detection signal that indicates the comparison result of comparator +9-0.19-1.
21−0. 21−1はメモリ管理ユニット14−0.
14−1から出力されるメモリアドレス(主記憶アド
レス)またはメモリバス13上のメモリアドレス(ライ
トアドレス)のいずれか一方をキャッシュブロック16
−0. 16−1に選択出力するセレクタ、22−0.
22−1はメモリ管理ユニット14−0. 14−1か
ら出力されるメモリアドレス(主記憶アドレス)または
メモリバス13上のメモリアドレス(ライトアドレス)
のいずれか一方をキャッシュタグメモリts−o、 t
s−tに選択出力するセレクタである。23−0.23
−1はキャッシュメモリ制御を司るキャッシュ制御部で
ある。このキャッシュ制御部23−0.23−1はメモ
リバス13、メモリ管理ユニット14−0.14−1、
キャッシュブロックte−o、 te−tおよび比較器
19−0.19−1などと接続されており、同制御部2
3−0.23−1には、メモリ管理ユニット14−0.
14−1でのアドレス変換時に参照されるアドレス変換
テーブル15−0.15−1のエントリ中の共有フラグ
SF、キャッシュブロック16−0.18−1 (内の
ヒツト検出器)からのヒツト検出信号17−0. 17
−Lおよび比較器19−0.19−1からの一致検出信
号20−0.20−1などが供給されるようになってい
る。21-0. 21-1 is a memory management unit 14-0.
Either the memory address (main memory address) output from 14-1 or the memory address (write address) on the memory bus 13 is stored in the cache block 16.
-0. A selector for selectively outputting to 16-1, 22-0.
22-1 is a memory management unit 14-0. Memory address output from 14-1 (main memory address) or memory address on memory bus 13 (write address)
cache tag memory ts-o, t
This is a selector that selectively outputs to st. 23-0.23
-1 is a cache control unit that controls cache memory control. This cache control unit 23-0.23-1 includes a memory bus 13, a memory management unit 14-0.14-1,
It is connected to the cache blocks te-o, te-t and the comparator 19-0.19-1, etc., and the control unit 2
3-0.23-1 includes a memory management unit 14-0.
Shared flag SF in the entry of address translation table 15-0.15-1 that is referenced during address translation in 14-1, hit detection signal from cache block 16-0.18-1 (hit detector within) 17-0. 17
-L and a coincidence detection signal 20-0.20-1 from a comparator 19-0.19-1, etc. are supplied.
次に、第1図の構成の動作を説明する。Next, the operation of the configuration shown in FIG. 1 will be explained.
まずプロセッサ12−0で主記憶アクセス要求が発生さ
れ、同プロセッサ12−0からアクセス先を示す論理ア
ドレスが出力されたものとする。この論理アドレスはメ
モリ管理ユニット14−0に供給される。First, it is assumed that a main memory access request is generated in processor 12-0, and that processor 12-0 outputs a logical address indicating an access destination. This logical address is provided to memory management unit 14-0.
メモリ管理ユニット14−0は、プロセッサ12−0か
らの論理アドレスの上位アドレス(論理アドレス情報)
の指定するアドレス変換テーブル15−0のエントリを
参照し、同エントリ中の物理アドレス情報FAと上記論
理アドレスのページ内オフセットとにより、上記論理ア
ドレスに対応する物理アドレスを求める。即ちメモリ管
理ユニット14−0は、プロセッサ12−0からの論理
アドレスを物理アドレスに変換する。この物理アドレス
はセレクタ21−0゜22−0の一方の入力に供給され
る。セレクタ21−0゜22−0の他方の入力にはメモ
リバス13(のアドレスバス)上のアドレスが供給され
るようになっている。The memory management unit 14-0 receives the upper logical address (logical address information) from the processor 12-0.
Refers to the entry in the address translation table 15-0 specified by , and finds the physical address corresponding to the logical address based on the physical address information FA in the entry and the in-page offset of the logical address. That is, the memory management unit 14-0 converts the logical address from the processor 12-0 into a physical address. This physical address is supplied to one input of the selectors 21-0 and 22-0. The other inputs of the selectors 21-0 and 22-0 are supplied with addresses on (the address bus of) the memory bus 13.
セレクタ21−0.22−0は、通常状態では、メモリ
管理ユニット14−0から出力されるアドレスを選択す
る。セレクタ21−0によって選択されたアドレスはキ
ャッシュブロック16−0に供給され、セレクタ22−
0によって選択されたアドレスはキャッシュタグメモリ
18−Oに供給される。キャッシュブロック16−0で
は、セレクタ21−0によって選択出力されたメモリ管
理ユニット14−0からのアドレスが属する主記憶11
のブロックのデータが、キャッシュブロック16−0内
のキャッシュデータメモリに存在するか否かが、周知の
方式で1凋べられ、その結果を示すヒツト検出信号17
−0がキャッシュブロック1G−0(のヒツト検出回路
)からキャッシュ制御部23−0に供給される。このキ
ャッシュ制御部23−0には、上記した物理アドレスへ
の変換に際して参照されたアドレス変換テーブル15−
0内エントリの共有フラグSFがメモリ管理ユニット1
4−0から供給される。またキャッシュ制御部23−0
には、プロセッサ12−0からの主記憶アクセス要求が
リードアクセス要求であるかライトアクセス要求である
かを示すアクセス種別も通知される。キャッシュ制御部
23−0は、上記共有フラグSFおよびアクセス種別等
に応じてキャッシュメモリ制御を行う。このキャッシュ
メモリ制御について以下に詳述する。In the normal state, the selector 21-0.22-0 selects the address output from the memory management unit 14-0. The address selected by the selector 21-0 is supplied to the cache block 16-0, and the address selected by the selector 22-0 is supplied to the cache block 16-0.
The address selected by 0 is provided to cache tag memory 18-O. In the cache block 16-0, the main memory 11 to which the address from the memory management unit 14-0 selected and output by the selector 21-0 belongs
Whether or not the data of the block exists in the cache data memory in the cache block 16-0 is checked using a well-known method, and a hit detection signal 17 indicating the result is detected.
-0 is supplied from (the hit detection circuit of) cache block 1G-0 to cache control unit 23-0. This cache control unit 23-0 has an address translation table 15-0 that is referenced when converting to the above-mentioned physical address.
The shared flag SF of the entry in 0 is memory management unit 1
Supplied from 4-0. Also, the cache control unit 23-0
The access type indicating whether the main memory access request from the processor 12-0 is a read access request or a write access request is also notified. The cache control unit 23-0 performs cache memory control according to the shared flag SF, access type, and the like. This cache memory control will be explained in detail below.
第1図のマルチプロセッサシステムでは、上記tati
の領域は、前記したように主としてプログラム領域、ロ
ーカルデータ領域および共有領域に割当てられる。この
3種の領域の中で、プログラム領域およびローカルデー
タ領域は、必ずしも他プロセッサのキャッシュデータメ
モリとの間でブタの一致をる必要はない。このような場
合をケスaと呼ぶ。これに対して共釘領域は、各プロセ
ッサで共有使用されデータ交換等に供されることから、
各プロセッサのキャッシュメモリ同士の間でデータの一
致をとる必要がある。このような場合を、ケースbと呼
ぶ。本実施例におけるキャッシュメモリ制御は、上記の
ケース(a/b)とプロセッサからの主記憶アクセス要
求の種別(ライトアクセス/リードアクセス)との組合
わせにより、■ケースaにおけるキャッシュメモリ制御
(タイプ1のキャッシュメモリ制御と呼ぶ)■ケースb
で且つリードアクセス時におけるキャッシュメモリ制御
(タイプ2のキャッシュメモリ制御と呼ぶ)、■ケース
bで且つライトアクセス時におけるキャッシュメモリ制
御(タイプ3のキャッシュメモリ制御と呼ぶ)の3種に
大別される。In the multiprocessor system of FIG. 1, the above tati
As described above, this area is mainly allocated to the program area, local data area, and shared area. Among these three types of areas, the program area and the local data area do not necessarily have to match the cache data memory of other processors. Such a case is called case a. On the other hand, the shared area is shared by each processor and used for data exchange, etc.
It is necessary to match data between the cache memories of each processor. Such a case is called case b. The cache memory control in this embodiment is based on the combination of the above cases (a/b) and the type of main memory access request from the processor (write access/read access). (called cache memory control) ■Case b
Case B and cache memory control during read access (referred to as type 2 cache memory control); Case b and cache memory control during write access (referred to as type 3 cache memory control) .
そこで、この■〜■のキャッシュメモリ制御について順
に説明する。Therefore, the cache memory control of (1) to (4) will be explained in order.
■タイプ1のキャッシュメモリ制御
キャッシュ制御部23−〇は、プロセッサ12−0から
の主記憶アクセス要求時にメモリ管理ユニット14−0
から供給される共HフラグSFが“0“の場合、即ち主
記憶アクセス要求先が共H8fj域でない場合、ライト
バック方式のキャッシュメモリ制御を適用す−る。■Type 1 cache memory control The cache control unit 23-0 controls the memory management unit 14-0 when a main memory access request is made from the processor 12-0.
When the shared H flag SF supplied from the shared H8fj area is "0", that is, when the main memory access request destination is not the shared H8fj area, write-back type cache memory control is applied.
まず、キャッシュブロック1G−0(内のヒツト検出器
)からのヒツト検出信号17−0が“O”であれば、即
ち上記tall内の要求先のデータがキャッシュブロッ
ク1G−0のキャッシュデータメモリに存在しないキャ
ッシュミス(ミスヒツト)の場合であれば、キャッシュ
制御部23−0はアクセス種別に無関係に、メモリバス
13を介して主記憶11から該当ブロックのデータをリ
ードして、そのリードブロックをキャッシュブロック1
6−0内のキャッシュデータメモリに書込むブロックリ
ード(コピー)動作を行う。この後キャッシュ制御部2
3−0は、主記憶アクセス要求がライトアクセス要求の
場合に限り、キャッシュブロック16−〇内のキャッシ
ュデータメモリに書込んだリードブロックのうち要求先
に対応するデータを、プロセッサ12−0からのライト
データに書換える。上記ブロックリードに際し、そのリ
ード先のキャッシュデータメモリのブロックが白゛効で
且つ既に書換え済みであれば、キャッシュ制御部23−
0はそのブロックの内容を主記憶11の元の領域に書込
む(ライトバックする)。またキャッシュ制御部23−
0は、上記のブロックリードを行った場合、キャッシュ
タグメモリ18−ロとキャッシュブロック16−0内の
キャッシュタグメモリの各対応エントリに、6効なタグ
情報を登録する。First, if the hit detection signal 17-0 from the cache block 1G-0 (the hit detector therein) is "O", that is, the requested data in the tall is stored in the cache data memory of the cache block 1G-0. In the case of a non-existing cache miss (miss), the cache control unit 23-0 reads the data of the corresponding block from the main memory 11 via the memory bus 13, regardless of the access type, and caches the read block. block 1
A block read (copy) operation is performed to write to the cache data memory in 6-0. After this, cache control unit 2
3-0 transfers the data corresponding to the request destination from the read block written to the cache data memory in the cache block 16-0 from the processor 12-0 only when the main memory access request is a write access request. Rewrite to write data. At the time of the above block read, if the block of the cache data memory to which the read is to be read is white and has already been rewritten, the cache control unit 23-
0 writes the contents of the block to the original area of the main memory 11 (writes back). In addition, the cache control unit 23-
0 registers valid tag information in each corresponding entry of the cache tag memory 18-row and the cache tag memory in the cache block 16-0 when the above block read is performed.
なお、キャッシュタグメモリ18−0へのタグ情報登録
は、この例のように主記憶アクセス要求先が共存領域で
ない場合には不用あるが、ここではキャソンユ制御部2
3−0の制御を簡略化するためにキャッシュタグメモリ
18−0にに・1してもキャッシュブロック16−0内
のキャッシュタグメモリと同様の処理を行うようにして
いる。Note that tag information registration in the cache tag memory 18-0 is unnecessary when the main memory access request destination is not a coexistence area as in this example, but here, the tag information registration in the cache tag memory 18-0 is unnecessary.
In order to simplify the control of the cache tag memory 18-0, the cache tag memory 18-0 is configured to perform the same processing as the cache tag memory in the cache block 16-0.
次に、キャッシュブロック16−Oからのヒツト検出信
号l7−0が“1″の場合、即ち主記憶11内の要求先
のデータがキャッシュブロック16−0のキャッシュデ
ータメモリに存在するキャツシュヒツトの場合には、キ
ャッシュ制御部23−0は主記憶アクセス要求がライト
アクセス要求であれば、キャッシュブロック16−0内
のキャッシュデータメモリの該当データブロックのうち
要求先に対応するデータを、プロセッサ12−0からの
ライトデータに書換える。なお、主記憶アクセス要求が
リードアクセス要求であれば、ヒツト/ミスに無関係に
、キャッシュデータメモリの該当データブロックのうち
要求先に対応するデータがプロセッサ12−0に転送さ
れる。Next, when the hit detection signal l7-0 from the cache block 16-O is "1", that is, when the requested data in the main memory 11 is a cache hit existing in the cache data memory of the cache block 16-0, If the main memory access request is a write access request, the cache control unit 23-0 transfers the data corresponding to the request destination from the corresponding data block of the cache data memory in the cache block 16-0 from the processor 12-0. Rewrite to the write data. Note that if the main memory access request is a read access request, data corresponding to the request destination out of the relevant data block in the cache data memory is transferred to the processor 12-0, regardless of hits/misses.
■タイプ2のキャッシュメモリ制御
キャッシュ制御部23−0は、プロセッサ12−0から
の主記憶アクセス要求時にメモリ管理ユニット14−0
から供給される共有フラグSFが“1″であり、即ち主
記憶アクセス要求先が共有領域であり、その要求がリー
ドアクセス要求の場合には、キャッシュブロック16−
〇からのヒツト検出信号17−0に応じてブロックリー
ド動作を行う。即ちキャッシュ制御部23−Oは、ヒツ
ト検出信号17−0によってキャッシュミスが示されて
いれば、主記憶11から該当ブロックのデータをリード
して、そのリードブロックをキャッシュブロック16−
0内のキャッシュデータメモリに書込む。そしてキャッ
シュ制御部23−0は、キャンシュタグメモリ18−0
およびキャッシュブロック16−0内のキャッシュタグ
メモリの各対応エントリに、a効なタグ情報を登録する
。なお、キャッシュデータメモリの該当データブロック
のうち要求先に対応するデータがプロセッサ120に転
送されることは言うまでもない。■Type 2 cache memory control The cache control unit 23-0 controls the memory management unit 14-0 when a main memory access request is received from the processor 12-0.
If the shared flag SF supplied from the cache block 16- is "1", that is, the main memory access request destination is a shared area, and the request is a read access request, the cache block 16-
A block read operation is performed in response to the hit detection signal 17-0 from 〇. That is, if the hit detection signal 17-0 indicates a cache miss, the cache control unit 23-O reads the data of the corresponding block from the main memory 11 and stores the read block in the cache block 16-0.
Write to cache data memory in 0. The cache control unit 23-0 then controls the cache tag memory 18-0.
Then, valid tag information is registered in each corresponding entry of the cache tag memory in the cache block 16-0. It goes without saying that the data corresponding to the request destination among the corresponding data blocks in the cache data memory is transferred to the processor 120.
■タイプ3のキャッシュメモリ制御
キャッシュ制御部23−0は、プロセッサ12−Oから
の主記憶アクセス要求時にメモリ管理ユニット14−0
から供給される共有フラグSFが“1″であり、即ち主
記憶アクセス梁求先が共有領域であり、その要求がライ
トアクセス要求の場合には、ライトスルー方式のキャッ
ンユメモリ制御を適用する。■Type 3 cache memory control The cache control unit 23-0 controls the memory management unit 14-0 at the time of a main memory access request from the processor 12-O.
If the shared flag SF supplied from the main memory access point is "1", that is, the main memory access target is a shared area and the request is a write access request, write-through type catch-memory control is applied.
但し、この際の制御は、キャッシュブロック16−0か
らのヒツト検出信号17−0の状態、即ちキャッシュミ
スかヒツトかにより、次の2つに分けられる。However, the control at this time is divided into the following two types depending on the state of the hit detection signal 17-0 from the cache block 16-0, that is, whether it is a cache miss or a hit.
まずキャッシュミスの場合、キャッシュ制御部23−0
は主記憶11から該巴ブロックのデータをり一ドして、
そのリードブロックをキャッシュブロック16−〇内の
キャッシュデータメモリに書込むブロックリード動作を
行う。この後キャッシュ制御部23−0は、キャッシュ
ブロック1ト0内のキャッシュデータメモリに書込んだ
リードブロックのうち要求先に対応するデータを、プロ
セッサ!2−0からのライトデータに書換えると共に、
このライトデータをメモリ管理ユニット14−0からの
アドレスの指定する主記憶11の領域に書込む。この主
記憶11への書込みは、メモリ管理ユニット14−0か
らのアドレス、ライトデータおよびライトアクセスを示
すリード/ライト信号等を、キャッシュ制御部23−0
がメモリバス13上に出力することにより行われる。First, in the case of a cache miss, the cache control unit 23-0
reads the data of the Tomoe block from the main memory 11,
A block read operation is performed to write the read block to the cache data memory in cache block 16-0. Thereafter, the cache control unit 23-0 transfers the data corresponding to the request destination from among the read blocks written to the cache data memory in cache block 1 to 0 to the processor! Along with rewriting the write data from 2-0,
This write data is written to the area of the main memory 11 specified by the address from the memory management unit 14-0. This writing to the main memory 11 involves writing the address, write data, read/write signal indicating write access, etc. from the memory management unit 14-0 to the cache control unit 23-0.
This is done by outputting it onto the memory bus 13.
この際、キャッシュ制御部23−0は、書込み先が共有
領域であることを示す共有領域アクセス信号もメモリバ
ス13上に出力する。At this time, the cache control unit 23-0 also outputs a shared area access signal on the memory bus 13 indicating that the write destination is a shared area.
プロセッサ12−0に対応して設けられたキャッシュ制
御部23−0からメモリバス13上に送出された共有領
域アクセス信号は、他のプロセッサ12−1に対応して
設けられたキャッシュ制御部23−1に導かれる。この
キャッシュ制御部23−1には、キャッシュ制御部23
−0からメモリバス13に送出されたライトアクセスを
示すリード/ライト信号も導かれる。The shared area access signal sent onto the memory bus 13 from the cache control unit 23-0 provided corresponding to the processor 12-0 is transmitted to the cache control unit 23-0 provided corresponding to the other processor 12-1. I am guided by 1. This cache control unit 23-1 includes a cache control unit 23-1.
A read/write signal indicating a write access sent to the memory bus 13 from -0 is also led.
この場合、キャッシュ制御部23−1は、他のキャッシ
ュ制御部23−0によってライトスルー方式のキャッシ
ュメモリ制御が行われていることを判断し、セレクタ2
2−1をメモリバス13側に切換える。またキャッシュ
制御部23−1は、キャッシュブロック16−1が動作
中でなければ直ちに、動作中であればその動作終了を待
って、セレクタ21−1をメモリバス13側に切換える
。これにより、キャッシュ制御部23−0から上記+f
5.11への書込みのためにメモリバス13上に送出さ
れたアドレスは、セレクタ21−1によってキャッシュ
ブロックIG−1に、セレクタ22−1によってキャッ
シュタグメモリ18−1に、それぞれ選択出力される。In this case, the cache control unit 23-1 determines that write-through cache memory control is being performed by another cache control unit 23-0, and selects the selector 23-1.
2-1 to the memory bus 13 side. Further, the cache control unit 23-1 switches the selector 21-1 to the memory bus 13 side immediately if the cache block 16-1 is not in operation, or waits for the end of the operation if it is in operation. As a result, the above +f is sent from the cache control unit 23-0.
The address sent onto the memory bus 13 for writing to 5.11 is selectively output to the cache block IG-1 by the selector 21-1, and to the cache tag memory 18-1 by the selector 22-1. .
キャッシュタグメモリ18−1は、メモリバス13から
のアドレスの所定フィールドでアクセスされ、これによ
りキャッシュタグメモリ18−1の対応エントリ中のア
ドレスタグおよびバリッドビットが比較器19−1に読
出される。比較S 19−1は、キャッシュタグメモリ
18−1から読出されたアドレスタグと、メモリバス1
3からのアドレス中の上記とは別の所定フィールドとを
比較し、両者が等しく且つバリッドビットがオン(真)
の場合だけ、即ちキャッシュ制御部23−0によってラ
イトされる主記憶11の領域が属するブロックのデータ
がキャッシュブロック1G−1内のキャッシュデータメ
モリに存在するヒツトの場合だけ、論理“1”の一致検
出信号20−1を出力する。キャッシュ制御部23−1
は、ヒツトを示す論理“1”の一致検出信号20−1に
応し、キャッシュタグメモリ18−1およびキャッシュ
ブロックte−を内のキャッシュタグメモリの該肖エン
トリのバリッドビットをいずれもオフする無効化処理を
行う。これに対して、一致検出信号20がミスヒツトを
示す論理“0”の場合には、その時点でキャッシュ制御
部23−1の動作は終了する。Cache tag memory 18-1 is accessed with a predetermined field of the address from memory bus 13, thereby reading the address tag and valid bit in the corresponding entry in cache tag memory 18-1 to comparator 19-1. Comparison S 19-1 compares the address tag read from the cache tag memory 18-1 and the memory bus 1.
Compare the address from 3 with a predetermined field other than the above, and if both are equal and the valid bit is on (true)
Only in this case, that is, only if the data of the block to which the area of the main memory 11 written by the cache control unit 23-0 belongs exists in the cache data memory in the cache block 1G-1, a logical "1" match occurs. A detection signal 20-1 is output. Cache control unit 23-1
In response to the coincidence detection signal 20-1 of logic "1" indicating a hit, the cache tag memory 18-1 and the cache block te- are invalidated by turning off the valid bits of the relevant entry in the cache tag memory 18-1 and the cache block te-. Perform conversion processing. On the other hand, if the coincidence detection signal 20 is logic "0" indicating a miss, the operation of the cache control unit 23-1 ends at that point.
次に、プロセッサ12−0からの共有領域へのライトア
クセス要求に対して、キャッシュブロック1B−0(ヒ
ツト検出器)からキャツシュヒツトを示す論理“1″の
ヒツト検出信号17−0が出力された場合について説明
する。この場合、キャッシュ制御部23−0はキャッシ
ュミス時とは異なってブロックリード動作を行わず、直
ちにキャッシュブロック16−0内のキャッシュデータ
メモリの該当ブロックデータのうち要求先にχ・I応す
るデータを、プロセッサ12−0からのライトデータに
書換える。この書換えの後の動作は、上記のキャッシュ
ミスの場合と同様となる。Next, in response to a write access request to the shared area from the processor 12-0, a hit detection signal 17-0 of logic "1" indicating a cache hit is output from the cache block 1B-0 (hit detector). I will explain about it. In this case, unlike in the case of a cache miss, the cache control unit 23-0 does not perform a block read operation, but immediately reads the data corresponding to is rewritten to the write data from the processor 12-0. The operation after this rewriting is the same as in the case of a cache miss described above.
なお、前記実施例では、プロセッサ数が2台のマルチプ
ロセッサシステムに実施した場合について説明したが、
この発明は3台以上のプロセッサを持つマルチプロセッ
サシステムにも同様に適用できる。In addition, in the above embodiment, a case was explained in which the implementation was performed on a multiprocessor system with two processors.
The present invention is equally applicable to multiprocessor systems having three or more processors.
[発明の効果]
以上詳述したようにこの発明によれば、マルチプロセッ
サシステムにおける主記憶の領域のうち共有領域以外で
は、各プロセッサのキャッシュデータメモリの間でデー
タの一致は必ずしも必要でないことに着目し、プロセッ
サからのライトアクセス要求先が主記憶の共有領域であ
るか否かを判別して、共存領域でない場合にはライトス
ルー方式からライトバック方式のキャッシュメモリ制御
に切換えるようにしたので、従来は避けられなかった主
記憶へのライト動作や他プロセッサのタグチエツクが不
用に発生するのを防止でき、システム性能が向上する。[Effects of the Invention] As detailed above, according to the present invention, it is realized that data matching between cache data memories of each processor is not necessarily required in areas other than the shared area of the main memory in a multiprocessor system. Focusing on this, we determined whether the write access request destination from the processor was a shared area of the main memory or not, and if it was not a coexisting area, we switched from the write-through method to the write-back method of cache memory control. It is possible to prevent unnecessary write operations to the main memory and tag checks of other processors, which were unavoidable in the past, and improve system performance.
第1図はこの発明を適用するマルチプロセッサシステム
の一実施例を示すブロック構成図である。
11・・・主記憶、12−0.12−1・・・プロセッ
サ、13・・・メモリバス、14−0. 14−1・・
・メモリ管理ユニット、15−0.15−1・・・アド
レス変換テーブル、1B−0,16=1・・・キャッシ
ュブロック、19−0.19−1・・・比較器、21−
0.21−1.22−0. 22−1・・・セレクタ、
23−0. 23−1・・・キャッシュ制御部、SF・
・・共有フラグ。
出願人代理人 弁理士 鈴江武彦FIG. 1 is a block diagram showing an embodiment of a multiprocessor system to which the present invention is applied. 11... Main memory, 12-0.12-1... Processor, 13... Memory bus, 14-0. 14-1...
-Memory management unit, 15-0.15-1...Address translation table, 1B-0, 16=1...Cache block, 19-0.19-1...Comparator, 21-
0.21-1.22-0. 22-1...Selector,
23-0. 23-1...Cache control unit, SF/
...Shared flag. Applicant's agent Patent attorney Takehiko Suzue
Claims (1)
モリ制御方式を適用するマルチプロセッサシステムにお
いて、 上記プロセッサから主記憶アクセス要求が発せられた場
合に、その要求先の上記主記憶の領域が他プロセッサと
共有使用される共有領域であるか否かを判別する判別手
段を設け、 上記主記憶アクセス要求がライトアクセス要求の場合に
、上記判別手段により上記要求先が上記共有領域である
ことが判別されたならばライトスルー方式によるキャッ
シュメモリ制御を行い、上記要求先が上記共有領域でな
いことが判別されたならばライトバック方式によるキャ
ッシュメモリ制御を行うようにしたことを特徴とするキ
ャッシュメモリ制御方式。[Claims] In a multiprocessor system in which a plurality of processors share a main memory and apply a cache memory control method, when a main memory access request is issued from the processor, the request destination main memory A determination means is provided for determining whether or not the area is a shared area shared with other processors, and when the main memory access request is a write access request, the determination means determines whether the request destination is the shared area. If it is determined that the request destination is not the shared area, the cache memory control is performed using a write-back method. Cache memory control method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP1047217A JPH02226449A (en) | 1989-02-28 | 1989-02-28 | Cache memory control system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP1047217A JPH02226449A (en) | 1989-02-28 | 1989-02-28 | Cache memory control system |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH02226449A true JPH02226449A (en) | 1990-09-10 |
Family
ID=12769003
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP1047217A Pending JPH02226449A (en) | 1989-02-28 | 1989-02-28 | Cache memory control system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH02226449A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04347749A (en) * | 1991-05-24 | 1992-12-02 | Nec Corp | Information processor |
JPH05241954A (en) * | 1991-10-11 | 1993-09-21 | Intel Corp | Processor |
US5524234A (en) * | 1992-11-13 | 1996-06-04 | Cyrix Corporation | Coherency for write-back cache in a system designed for write-through cache including write-back latency control |
US6480940B1 (en) | 1998-10-30 | 2002-11-12 | Nec Corporation | Method of controlling cache memory in multiprocessor system and the multiprocessor system based on detection of predetermined software module |
EP2053519A1 (en) | 2007-10-22 | 2009-04-29 | Denso Corporation | Data processing apparatus and program for same |
US7960878B2 (en) | 2008-06-26 | 2011-06-14 | Denso Corporation | Electric rotating machine with means for feeding cooling liquid to its stator winding |
JP2012504792A (en) * | 2009-02-17 | 2012-02-23 | 株式会社日立製作所 | Storage control device and control method of storage control device |
-
1989
- 1989-02-28 JP JP1047217A patent/JPH02226449A/en active Pending
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04347749A (en) * | 1991-05-24 | 1992-12-02 | Nec Corp | Information processor |
JPH05241954A (en) * | 1991-10-11 | 1993-09-21 | Intel Corp | Processor |
US5524234A (en) * | 1992-11-13 | 1996-06-04 | Cyrix Corporation | Coherency for write-back cache in a system designed for write-through cache including write-back latency control |
US6480940B1 (en) | 1998-10-30 | 2002-11-12 | Nec Corporation | Method of controlling cache memory in multiprocessor system and the multiprocessor system based on detection of predetermined software module |
EP2053519A1 (en) | 2007-10-22 | 2009-04-29 | Denso Corporation | Data processing apparatus and program for same |
US7960878B2 (en) | 2008-06-26 | 2011-06-14 | Denso Corporation | Electric rotating machine with means for feeding cooling liquid to its stator winding |
JP2012504792A (en) * | 2009-02-17 | 2012-02-23 | 株式会社日立製作所 | Storage control device and control method of storage control device |
US8527710B2 (en) | 2009-02-17 | 2013-09-03 | Hitachi, Ltd. | Storage controller and method of controlling storage controller |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4445174A (en) | Multiprocessing system including a shared cache | |
JP2833062B2 (en) | Cache memory control method, processor and information processing apparatus using the cache memory control method | |
US4484267A (en) | Cache sharing control in a multiprocessor | |
US5987571A (en) | Cache coherency control method and multi-processor system using the same | |
KR930004430B1 (en) | Apparatus for maintaining consistency in a multiprocessor computer system using caching | |
US5394555A (en) | Multi-node cluster computer system incorporating an external coherency unit at each node to insure integrity of information stored in a shared, distributed memory | |
EP1019840B1 (en) | Look-up table and method of storing data therein | |
AU608447B2 (en) | Data memory system | |
JPH11506852A (en) | Reduction of cache snooping overhead in a multi-level cache system having a large number of bus masters and a shared level 2 cache | |
JPS6135584B2 (en) | ||
JPS629942B2 (en) | ||
JPH04227552A (en) | Store-through-cache control system | |
US20050198441A1 (en) | Multiprocessor system | |
US7171520B2 (en) | Cache flush system and method thereof | |
US6766434B2 (en) | Method for sharing a translation lookaside buffer between CPUs | |
US5361342A (en) | Tag control system in a hierarchical memory control system | |
JP3295436B2 (en) | Microprocessor cache consistency | |
JPH0551937B2 (en) | ||
JPH02226449A (en) | Cache memory control system | |
US7496713B1 (en) | Method and apparatus for maintaining cache coherency in a memory system with shared only cache memories | |
JP3116215B2 (en) | How to control double directory virtual cache | |
US20040059871A1 (en) | Local invalidation buses for a highly scalable shared cache memory hierarchy | |
JP3733604B2 (en) | Cache memory | |
JPS60237553A (en) | Cash coherence system | |
US6826655B2 (en) | Apparatus for imprecisely tracking cache line inclusivity of a higher level cache |