JPS63247852A - Cache memory control method - Google Patents

Cache memory control method

Info

Publication number
JPS63247852A
JPS63247852A JP62079654A JP7965487A JPS63247852A JP S63247852 A JPS63247852 A JP S63247852A JP 62079654 A JP62079654 A JP 62079654A JP 7965487 A JP7965487 A JP 7965487A JP S63247852 A JPS63247852 A JP S63247852A
Authority
JP
Japan
Prior art keywords
area
memory
cache memory
main memory
processor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP62079654A
Other languages
Japanese (ja)
Inventor
Atsuhiko Nishikawa
敦彦 西川
Hiroshi Watanabe
弘 渡辺
Yoshiaki Takahashi
義明 高橋
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 JP62079654A priority Critical patent/JPS63247852A/en
Publication of JPS63247852A publication Critical patent/JPS63247852A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To omit an invalidating process required for deletion of the discordance among plural maps of memories by giving a direct access to a main memory without carrying out a copying action to a cache memory against a common area. CONSTITUTION:A cache memory 4 and a memory control unit (MMU) 6 are provided. The MMU 6 consists of an address conversion buffer (TLB) 600, a TLB hit comparator 610 and an MMU control part 610. The TLB 600 serves as a memory that converts a logical address 85 into a physical address 86 at a high speed. This memory consists of a V bit showing the validity, a directory 602 for detection of the coincidence, a common bit 603 showing a shared area, etc. The MMU 6 also performs the protection check to the area received an access simultaneously with conversion of addresses.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はマルチプロセッサシステムにおけるキャッシュ
メモリの制御方法に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a method for controlling a cache memory in a multiprocessor system.

〔従来の技術〕[Conventional technology]

計算機の処理能力を向上させるために、第2図に示す様
に複数のプロセッサを接続したマルチプロセッサ構成の
システムが考えられている。本構成によればプロセッサ
31,32,33.34の4台のプロセッサが並列に動
作することが可能であり、プロセッサが1台の時に較べ
て4倍の処理能力向上が期待できる。このシステムでは
、プロセッサ間のデータ交換はシステムバス1に接続さ
れた主メモリ2を介して行われる。この場合、各プロセ
ッサの主メモリ2へのアクセスが競合するため、システ
ムバス1のトラヒック量が増大し、等価的にメモリアク
セス時間を増加する結果となり、システムとしてのスル
ープットが低下する。
In order to improve the processing power of a computer, a system with a multiprocessor configuration in which a plurality of processors are connected as shown in FIG. 2 has been considered. According to this configuration, the four processors 31, 32, 33, and 34 can operate in parallel, and it is expected that the processing capacity will be four times higher than when there is only one processor. In this system, data exchange between processors takes place via a main memory 2 connected to a system bus 1. In this case, since each processor competes for access to the main memory 2, the amount of traffic on the system bus 1 increases, equivalently resulting in an increase in memory access time, and the throughput of the system decreases.

そのため、各プロセッサ31,32,33.34は、キ
ャッシュメモリ41,42,43.44を準備し、キャ
ッシュメモリ中に主メモリ2のコピーを持つことにより
システムバス1を介した主メモリ2へのアクセス回数を
減少させる。これによりシステムバス1のトラヒック量
を減らすことができ、スループット低下を防ぐことがで
きると言われている。
Therefore, each processor 31, 32, 33.34 prepares a cache memory 41, 42, 43.44, and has a copy of the main memory 2 in the cache memory so that the processor 31, 32, 33.34 can access the main memory 2 via the system bus 1. Reduce the number of accesses. It is said that this makes it possible to reduce the amount of traffic on the system bus 1 and prevent a decrease in throughput.

この場合の問題点としてキャッシュメモリ41゜42.
43.44に、同じエリアのコピーが存在する時、ある
プロセッサで同エリアの内容を変更した場合、同じエリ
アのコピーにも関わらずキャッシュメモリ間、およびキ
ャッシュメモリと主メモリ2との間に不一致が発生する
問題がある。そのため各プロセッサ31,32,33.
34は、主メモリ2の内容を変更したことを主メモリ2
および他のプロセッサに連絡する。例えば、プロセッサ
31に接続されたキャッシュメモリ41が主メモリ2の
あるエリア201のコピー4101を持ち、プロセッサ
33に接続されたキャッシュメモリ43も同エリア20
1のコピー4301を持っている状況を考える。プロセ
ッサ31がエリア201に書込み動作を行うと、キャッ
シュメモリのコピー4101の内容を書替え、すみやか
にエリア201へのアクセスをして、主メモリのエリア
201とコピーエリア4101の一致化を図る。
The problem in this case is that the cache memory 41°42.
43.44, when a copy of the same area exists and the contents of the same area are changed by a certain processor, there will be a mismatch between the cache memories and between the cache memory and main memory 2 despite the copies of the same area. There is a problem that occurs. Therefore, each processor 31, 32, 33 .
34 indicates that the contents of main memory 2 have been changed.
and contact other processors. For example, the cache memory 41 connected to the processor 31 has a copy 4101 of the area 201 in the main memory 2, and the cache memory 43 connected to the processor 33 also has a copy 4101 of the area 201 in the main memory 2.
Consider the situation where you have a copy 4301 of 1. When the processor 31 performs a write operation to the area 201, it rewrites the contents of the cache memory copy 4101 and immediately accesses the area 201 to make the main memory area 201 and the copy area 4101 coincide.

キャッシュメモリ42,43.44は、常に他のプロセ
ッサが主メモリ2への書込みアクセスをしているか監視
し、同じコピーを自分が持っているときは、その内容を
キャッシュメモリ上から消去する。これをキャッシュの
無効化と呼んでいる。
The cache memories 42, 43, and 44 constantly monitor whether other processors are making write access to the main memory 2, and if they have the same copy, erase the contents from the cache memory. This is called cache invalidation.

上側の場合、キャッシュメモリ43がコピー4301を
有しているため、キャッシュメモリ43は4301の無
効化を行う。
In the upper case, since the cache memory 43 has the copy 4301, the cache memory 43 invalidates the copy 4301.

もうひとつの主メモリ2とキャッシュメモリ41.42
,43.44が不一致となる場合としてDMA (Dy
namic Memory Access)  がある
・第2図において、チャネル70.ファイル装置75が
ファイル装置データ7501を主メモリエリア201に
転送したとき、もしキャッシュメモリ41が主メモリの
エリア201のコピー4101を持っていると、主メモ
リのエリア201がデータ7501に書き替わるのに対
し、そのコピー4101が元のままとなり主メモリ2と
キャッシュメモリ41とが不一致となる。これを防ぐた
めには、各キャッシュメモリ41,42,43゜44は
、上記と同様に、常にシステムバスの監視を行って無効
化処理を行わなくてはならない。
Another main memory 2 and cache memory 41.42
, 43.44 are inconsistent, DMA (Dy
In FIG. 2, channel 70. When the file device 75 transfers the file device data 7501 to the main memory area 201, if the cache memory 41 has a copy 4101 of the main memory area 201, the main memory area 201 will be rewritten to the data 7501. On the other hand, the copy 4101 remains the original, and the main memory 2 and cache memory 41 become inconsistent. In order to prevent this, each of the cache memories 41, 42, 43, and 44 must constantly monitor the system bus and perform invalidation processing, as described above.

以上の問題点および従来技術における解決策は長高・堀
越による「キャッシュ記憶」という論文(情報処理V 
o Q 24 、 Na 4 、 pp332−340
)に詳しく解説されている。
The above-mentioned problems and solutions in the prior art are discussed in the paper "Cache Memory" by Nagataka and Horikoshi (Information Processing V
o Q24, Na4, pp332-340
) is explained in detail.

〔発明が解決しようとする問題点] 上記した従来技術における、マルチプロセッサシステム
のキャッシュメモリ制御方法に関する問題点は、すべて
キャッシュメモリの無効化の必要性から生じるもので、
それは以下の通りである。
[Problems to be Solved by the Invention] All of the problems related to the cache memory control method of a multiprocessor system in the prior art described above arise from the necessity of invalidating the cache memory.
It is as follows.

(1)主メモリの内容を書替える場合、他プロセツサに
対し、キャッシュメモリ中の同一エリアのコピーを無効
化するための連絡アクセスが必要である。これによりシ
ステムバスのトラヒック量が減少せず、メモリアクセス
が他の連絡アクセスにより阻害されるためアクセス時間
が増加し、スループットが制約される。
(1) When rewriting the contents of the main memory, communication access is required to other processors to invalidate copies of the same area in the cache memory. As a result, the amount of traffic on the system bus does not decrease, and memory accesses are blocked by other communication accesses, resulting in an increase in access time and throughput constraints.

(2)他プロセツサおよびDMAを行う入出力機器が主
メモリの内容を書替えるか否かを常に監視し、自分のも
つキャッシュメモリのエリアと同一エリアへの書込みが
行われた時に、該当エリアのコピーを無効化しなければ
ならないから、そのためのハードウェアが必要となり、
またプロセッサ処理時間のオーバーへ、ラドも増大する
(2) It constantly monitors whether or not other processors and input/output devices that perform DMA rewrite the contents of main memory, and when writing is performed to the same area as the area of its own cache memory, the corresponding area is Since the copy must be invalidated, hardware is required to do so,
Furthermore, the processing time of the processor is exceeded, and the rad also increases.

さらに、VLS I化により同一チップにキャッシュメ
モリとプロセッサが実装された場合、同一チップ内の信
号伝搬遅延は、集積度に比例して小さくなる。しかし、
システムバスを監視すると、システムバスのクロックに
同期させる必要があり、VLSI化による効果が薄くな
ってしまう。
Furthermore, when a cache memory and a processor are mounted on the same chip using VLSI, the signal propagation delay within the same chip becomes smaller in proportion to the degree of integration. but,
Monitoring the system bus requires synchronization with the system bus clock, which reduces the effectiveness of VLSI.

(3)無効化のためのキャッシュメモリへのアクセスと
プロセッサのキャッシュメモリアクセスが競合するため
、等価的にプロセッサのキャッシュメモリアクセス時間
が増加する。これによりプロセッサの処理性能が低下す
る。
(3) Since the cache memory access for invalidation and the processor's cache memory access compete with each other, the processor's cache memory access time equivalently increases. This reduces the processing performance of the processor.

本発明の目的は、共有部分が書き換えられたときに無効
化処理を必要とせず、従ってそのために生ずる通信や処
理のオーバーヘッドの生じないキャッシュメモリの制御
方法を提供するにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a cache memory control method that does not require invalidation processing when a shared portion is rewritten, and therefore does not generate communication or processing overheads.

〔問題点を解決するための手段〕[Means for solving problems]

マルチプロセッサシステムにおける各プロセッサの論理
空間の内、テキスト領域(プログラム等)。
A text area (program, etc.) in the logical space of each processor in a multiprocessor system.

データ領域(固定データ等)、及びプライベートワーク
領域の主メモリ上のマツプは、読み出し専用又は1プロ
セツサのみからアクセスされる領域であるから、これら
は複数プロセッサにより共有されかつ書き換えられるこ
とはない。しかしモコン領域は主メモリ上の共有領域が
割り当てられ、プロセッサ間の通信を行う部分であり、
書き換えも行われる。上記の目的は、この点に着目する
ことにより、コモン領域に対してはキャッシュメモリへ
のコピーを行わず、直接主メモリへアクセスすることに
より達成される。
The maps in the main memory of the data area (fixed data, etc.) and the private work area are read-only or accessed by only one processor, so they are shared by multiple processors and are not rewritten. However, the remote control area is a shared area on main memory that is used for communication between processors.
Rewriting is also performed. By focusing on this point, the above object is achieved by directly accessing the main memory without copying the common area to the cache memory.

〔作用〕[Effect]

コモン領域はキャッシュメモリにはコピーされずに、主
メモリだけに存在するから、複数のメモリ上でのマツプ
間に不一致が生じることはなく、従ってその不一致除去
のための無効化処理を一切必要としない。また、コモン
領域は主メモリ内の一部の領域にすぎないから、これに
対してキャッシュメモリを用いないことによるメモリア
クセスの速度低下やバスのスループットに与える影響は
小さい。
Since the common area is not copied to the cache memory and exists only in the main memory, there will be no mismatch between maps on multiple memories, and therefore no invalidation processing is required to remove the mismatch. do not. Furthermore, since the common area is only a part of the main memory, not using the cache memory has little effect on memory access speed reduction or bus throughput.

〔実施例〕〔Example〕

まず、本発明の前提となるメモリ管理方式について、第
3図を使って説明する。同図において、論理空間310
0はプロセッサ31の論理空間、すなわちプログラムか
ら見えるメモリのイメージを示し、同じく論理空間33
00はプロセッサ33の論理空間を示している。これら
の論理空間と、実際の主メモリにおけるロケーション2
00とが対応している。
First, the memory management system that is the premise of the present invention will be explained using FIG. In the figure, logical space 310
0 indicates the logical space of the processor 31, that is, the memory image visible to the program;
00 indicates the logical space of the processor 33. These logical spaces and locations 2 in actual main memory
00 corresponds.

論理空間3100はテキスト領域3110.データ領域
3120.プライベートワーク領域3130、コモン領
域3140から構成されており、論理空間3300も同
様に、テキスト領域3310、データ領域3320.プ
ライベートワーク領域3330.コモン領域334oか
ら構成されている。ここでテキスト領域3110゜33
10は、プログラムの命令コードが格納されているエリ
ア、データ領域3120,3320は、プログラムで使
用する固定データが格納されているエリアである。これ
らテキスト領域3110゜3310もデータ領域312
0,3320もどちらもプログラムで書替えることのな
いリードオンリのエリアである。
Logical space 3100 includes text area 3110. Data area 3120. It consists of a private work area 3130, a common area 3140, and the logical space 3300 similarly includes a text area 3310, a data area 3320. Private work area 3330. It consists of a common area 334o. Here the text area 3110°33
Reference numeral 10 denotes an area where the instruction code of the program is stored, and data areas 3120 and 3320 are areas where fixed data used in the program are stored. These text areas 3110°3310 are also data areas 312
Both areas 0 and 3320 are read-only areas that cannot be rewritten by a program.

プライベートワーク領域3130.3330は、プログ
ラムにおいて使用するスタック領域などの読出し/書込
みを行う領域である。コモン領域3140.3340は
プロセッサ31とプロセッサ33が互いにパラメータ受
渡しなどの連絡に使用する領域である。これらのプライ
ベートワーク領域3130.3330およびコモン領域
3140 。
Private work areas 3130 and 3330 are read/write areas such as stack areas used in programs. The common areas 3140 and 3340 are areas used by the processor 31 and the processor 33 for communication such as passing parameters to each other. These private work areas 3130, 3330 and common areas 3140.

3340は、プログラムから見れば読み出し、書込みの
どちらも行う領域である。
3340 is an area for both reading and writing from the perspective of the program.

以上の論理空間上の各領域は、システムプログラムの管
理するアドレス変換機構により、主メモリへ下記の様に
割付られている。
Each area in the above logical space is allocated to the main memory as follows by an address translation mechanism managed by the system program.

テキスト領域3110,3310は、主メモリ上のテキ
スト領域210に割付られている。データ領域3120
.3320は主メモリ上のデータ領域220に割付られ
ている。テキスト領域とデータ領域は、読出し専用であ
り、書替えられる恐れがないため、プロセッサ31と3
3に対しオーバーラツプして割付られている。プライベ
ートワーク領域・3130.3330は各々主メモリの
ワ−り領域231,233に割付られている。本領域は
各プロセッサ31.33により非同期に書替えられるた
め独立した領域に割付られでいる。しかしコモン領域3
140.3340は、主メモリのコモン領域240に割
付られている。この領域はプロセッサ31と33との間
で制御情報を交換するためのエリアであり両者から読み
書きされるエリアである。
Text areas 3110 and 3310 are allocated to text area 210 on main memory. Data area 3120
.. 3320 is allocated to the data area 220 on the main memory. The text area and data area are read-only and there is no risk of them being rewritten, so the processors 31 and 3
It is allocated so that it overlaps with 3. Private work areas 3130 and 3330 are allocated to main memory work areas 231 and 233, respectively. Since this area is rewritten asynchronously by each processor 31, 33, it is allocated to an independent area. However, common area 3
140.3340 is allocated to the common area 240 of the main memory. This area is an area for exchanging control information between the processors 31 and 33, and is an area that is read and written by both processors.

以上のマルチプロセッサシステムにおける多重仮想記憶
の性質をキャッシュメモリ制御にあてはめて考えると、
第3図におけるコモン領域240のコピーが複数のキャ
ッシュメモリ41.43に存在した場合、主メモリとの
不一致が発生する可能性があることがわかる。読出し専
用で共通に使用するテキスト領域210と、データ領域
220は書替えられる可能性がないため、不一致は発生
せず、またプライベートワーク領域231 、233は
、他のプロセッサからアクセスされないので不一致は発
生しない。そこで本発明では、コモン領域240に対す
るアクセスは、主メモリからキャッシュメモリにコピー
を行わず、常に主メモリにアクセスすることにより、主
メモリとキャッシュメモリの不一致の発生をなくし、キ
ャッシュメモリの無効化処理を不必要としたものである
Applying the above characteristics of multiple virtual memory in a multiprocessor system to cache memory control, we get the following:
It can be seen that if copies of the common area 240 in FIG. 3 exist in a plurality of cache memories 41, 43, a mismatch with the main memory may occur. The read-only and commonly used text area 210 and data area 220 are unlikely to be rewritten, so no mismatch occurs, and the private work areas 231 and 233 are not accessed by other processors, so no mismatch occurs. . Therefore, in the present invention, when accessing the common area 240, the main memory is always accessed without copying from the main memory to the cache memory, thereby eliminating the occurrence of mismatch between the main memory and the cache memory, and processing the invalidation of the cache memory. This made it unnecessary.

次に本発明の実施例についてのべる。まず、本発明を適
用するシステムの1つのプロセッサ部分の構成を第4図
に示す。この1つのプロセッサは。
Next, examples of the present invention will be described. First, FIG. 4 shows the configuration of one processor portion of a system to which the present invention is applied. This one processor.

プロセッサ3とキャッシュメモリ4とから構成され、プ
ロセッサ3は、基本処理ユニット5 (BasicPr
ocessing Llnit 、以下BPtJと略す
)と、メモリ管理ユニット6 (Memory Man
agement Unit、以下MMUと略す)とから
構成されている。BPO4から出力される論理アドレス
85は、MMU6により物理アドレス86に変換され、
キャッシュメモリ4に接続されている。また、BPO4
のデータバス75は、直接キャッシュメモリ4に接続さ
れている。キャッシュメモリ4は、BPO4からのアク
セスエリアのコピーが自分の中にあれば、そのデータを
データバス75を介してBPO4に送出し、なければア
ドレス出力84.データ人出カフ4を介してシステムバ
ス1に所望のアクセス情報をオンバスし、主メモリ2へ
のコピーアクセスを行う。
It is composed of a processor 3 and a cache memory 4, and the processor 3 has a basic processing unit 5 (BasicPr).
cessing Llnit (hereinafter abbreviated as BPtJ) and memory management unit 6 (Memory Man
management unit (hereinafter abbreviated as MMU). The logical address 85 output from the BPO 4 is converted into a physical address 86 by the MMU 6,
It is connected to the cache memory 4. Also, BPO4
The data bus 75 is directly connected to the cache memory 4. If the cache memory 4 has a copy of the access area from the BPO 4 in itself, it sends the data to the BPO 4 via the data bus 75; otherwise, it outputs an address 84. Desired access information is transferred to the system bus 1 via the data output cuff 4, and copy access to the main memory 2 is performed.

本発明の方法は、この構成のうちで、キャッシュメモリ
4およびMMU6により実現されるもので、第1図はこ
の部分の実施例である。MMU6は、アドレス変換バッ
ファ600 (TranslationLookasi
de Buffer、以下TLBと略す)とTLBヒツ
トコンパレータ610とMMU制御部610とから構成
されている。TLB600は、論理アドレス85を高速
に物理アドレス86に変換するためのメモリであり、有
効か否かを示すVビット601、論理アドレス上位ビッ
トとの一致検出を行うためのディレクトリ602.アク
セスしたエリアが共有エリアか否かを示すコモンビット
603゜アクセスエリアが読出し可か否かを示すリード
イネーブルビット604.アクセスしたエリアが書込み
可か否かを示すライトイネーブルビット605、および
物理アドレスを記憶している部分606とから構成され
ている。
The method of the present invention is realized by the cache memory 4 and MMU 6 in this configuration, and FIG. 1 shows an example of this part. The MMU 6 has an address translation buffer 600 (Translation Lookaside).
The MMU control section 610 includes a TLB hit comparator 610, and a TLB hit comparator 610. The TLB 600 is a memory for converting a logical address 85 into a physical address 86 at high speed, and includes a V bit 601 indicating whether it is valid or not, a directory 602 . Common bit 603 indicating whether the accessed area is a shared area; Read enable bit 604 indicating whether the accessed area can be read. It consists of a write enable bit 605 that indicates whether the accessed area is writable or not, and a portion 606 that stores a physical address.

BPO4からメモリアクセスが行われると、発行された
論理アドレス85のうち、中間部分85Mを使ってTL
B600の内容を読み出し、上位部分85Uとディレク
トリ602の内容が一致しているかをコンパレータ61
0を使って判定し、また、Vビット601が立っている
かを制御部620で判定する。ディレクトリ602が一
致しており。
When a memory access is performed from BPO4, the intermediate part 85M of the issued logical address 85 is used to access the TL.
The comparator 61 reads the contents of B600 and checks whether the upper part 85U and the contents of the directory 602 match.
The determination is made using 0, and the control unit 620 determines whether the V bit 601 is set. The directories 602 match.

Vビットが立っている時TLBヒツトと判定し、読み出
した物理アドレス606と、論理アドレスの下位部85
L及びオフセット850とをマージして物理アドレス8
6を生成する。判定した結果TLBがミスヒツトならば
、主メモリ2に格納されたアドレス変換テーブルを読出
して新たにTLB600に格納して、上記変換動作を行
う。
When the V bit is set, it is determined that there is a TLB hit, and the read physical address 606 and the lower part 85 of the logical address
L and offset 850 are merged to obtain physical address 8.
Generate 6. If the determined result is that the TLB is a miss, the address conversion table stored in the main memory 2 is read out and newly stored in the TLB 600, and the above conversion operation is performed.

MMU6は、物理アドレス変換と同時にアクセスしたエ
リアに対するプロテクションチェックも行う。リードイ
ネーブルビット604がオフしたエリアへの読出しアク
セス、ライトイネーブルビット605がオフしたエリア
への書込みアクセスであった場合は、プロテクションエ
ラーとじてBPO4に報告する。
The MMU 6 also performs a protection check on the accessed area at the same time as converting the physical address. If there is a read access to an area where the read enable bit 604 is off, or a write access to an area where the write enable bit 605 is off, it is reported to the BPO 4 as a protection error.

キャッシュメモリ4は、キャッシュエントリが有効か否
かを示すVビット401.キャッシュエントリの物理ア
ドレスを記憶するディレクトリ402、該当エントリの
主メモリ2のコピーを記憶するデータ406.キャッシ
ュエントリとアクセスアドレスとの一致検出を行うコン
パレータ410、およびキャッシュメモリ制御部420
とから構成されている。
The cache memory 4 stores a V bit 401 . A directory 402 that stores the physical address of a cache entry, data 406 that stores a copy of the main memory 2 of the corresponding entry. A comparator 410 that detects a match between a cache entry and an access address, and a cache memory control unit 420
It is composed of.

BPO4からメモリアクセスが行われると、その物理ア
ドレス下位部分86Lを使ってキャッシュメモリのディ
レクトリ402とVビット401を読出す。読出したデ
ィレクトリ402と物理アドレス上位部分86Uとの一
致をコンパレータ410を使って判定する。もしvビッ
トがオンでコンパレータ410出力が一致ならば、該当
エントリはキャッシュメモリ中に登録されている。すな
わちキャツシュヒツトであると制御部420で判定し、
読出しアクセスならば出力イネーブル信号423をオン
して出力ゲート430を開き、BPO4にキャッシュメ
モリのデータ406を送り出す。もしミスヒツトならば
主メモリ2の該当エリアをコピーした後に、BPO4に
データを送り出す。
When a memory access is performed from BPO4, the directory 402 and V bit 401 of the cache memory are read using the lower part 86L of the physical address. A comparator 410 is used to determine whether the read directory 402 matches the upper part 86U of the physical address. If the v bit is on and the comparator 410 outputs match, the corresponding entry has been registered in the cache memory. In other words, the control unit 420 determines that it is a catch hit,
If it is a read access, the output enable signal 423 is turned on, the output gate 430 is opened, and the data 406 of the cache memory is sent to the BPO4. If there is a miss, the relevant area of the main memory 2 is copied and the data is sent to the BPO 4.

第5図はリードアクセス時におけるキャッシュメモリ制
御部420の動作をフローチャートで示したものである
FIG. 5 is a flowchart showing the operation of the cache memory control unit 420 during read access.

まずアクセスするエリアがキャッシュエントリにあるか
をステップ101で判定する。この判定はコンパレータ
410の出力およびVビット401出力によって行う。
First, in step 101, it is determined whether the area to be accessed is in the cache entry. This determination is made based on the output of the comparator 410 and the V bit 401 output.

もしキャツシュヒツトであればステップ102に進み、
否であればステップ103に進む。ここでアクセスエリ
アが第3図で説明したコモン領域240の時は、本方式
ではキャッシュメモリ上にはないので必ずミスビットと
なり、ステップ103へ進む。
If it is, proceed to step 102;
If not, proceed to step 103. Here, when the access area is the common area 240 explained in FIG. 3, in this method, since it is not on the cache memory, a miss bit is always generated, and the process proceeds to step 103.

ステップ102では、読出したデータ部406の出力を
、出力イネーブル信号423をオンにして出力ゲート4
30を開くことにより、データバス75を介してBPO
4へ送出する。
In step 102, the output of the read data section 406 is transferred to the output gate 4 by turning on the output enable signal 423.
BPO via data bus 75 by opening 30
Send to 4.

ステップ103ではTLB600のコモンビット603
を判定し、これがオン、つまりコモンエリアであればス
テップ107に進み、プライベートエリアであればステ
ップ104に進む。ステップ107では、コモンエリア
が読出し専用エリアか否かをTLB600のリードイネ
ーブルビット604と書込みイネーブルビット605の
オン/オフを判定することにより行う。もし、読出しイ
ネーブルで、書込みディセーブルならば、今アクセス中
のコモンエリアが、第3図のテキスト又はデータのコモ
ン部分のような読出し専用エリアであると判定してステ
ップ104に進み、読出し専用エリアでなければステッ
プ108に進む。
In step 103, the common bit 603 of TLB 600
If this is on, that is, if it is a common area, the process proceeds to step 107, and if it is a private area, the process proceeds to step 104. In step 107, whether or not the common area is a read-only area is determined by determining whether the read enable bit 604 and write enable bit 605 of the TLB 600 are on/off. If read is enabled and write is disabled, it is determined that the common area currently being accessed is a read-only area such as the common part of text or data in FIG. If not, proceed to step 108.

ステップ104以下は普通のミスヒツトのときの処理で
あって、キャッシュメモリ4は該当エリアの主メモリ2
のコピーを持っておらず、このコピー動作を行う。即ち
まずステップ104で第4図におけるアドレス出力84
に、所望のアドレスを出力し、主メモリ2からの応答デ
ータをデータ入出カフ4を介して読込む。次のステップ
105では、読出したデータのキャッシュメモリへの登
録を行う、キャッシュメモリ制御部420は、ライトイ
ネーブル信号421と、Vピット人力422をオンして
、ディレクトリ402に物理アドレス86Uを書込み、
Vビット401をオンにし、読出しデータをデータ部4
06に書込む1次のステップ106では、出力ゲート4
30を開いてデータをBPO4に送出する。
Step 104 and subsequent steps are normal miss processing, in which the cache memory 4 stores the main memory 2 of the corresponding area.
perform this copy operation. That is, first, in step 104, the address output 84 in FIG.
Then, the desired address is output, and response data from the main memory 2 is read through the data input/output cuff 4. In the next step 105, the cache memory control unit 420 registers the read data in the cache memory, turns on the write enable signal 421 and the V-pit power 422, writes the physical address 86U to the directory 402, and
Turn on the V bit 401 and transfer the read data to data section 4.
In the primary step 106 of writing to 06, the output gate 4
30 and sends the data to BPO4.

一方、ステップ107で、コモンエリアでかつリード、
ライト領域である。つまり第3図のコモン領域240へ
のアクセスと判定されたときは、ステップ108へ進み
、キャッシュメモリ4への登録は行わず、読出したデー
タを直接BPU5に送出する。このように、本発明では
、コモン領域へのリードアクセス時には直接主メモリへ
アクセスし、キャッシュメモリ4ヘコピーを作らない。
On the other hand, in step 107, if the common area and lead
This is a light area. That is, if it is determined that the common area 240 in FIG. As described above, in the present invention, when reading access to the common area, the main memory is directly accessed, and no copy is made to the cache memory 4.

これによってキャッシュメモリと主メモリ間の不一致の
発生をなくしている。
This eliminates the occurrence of mismatch between the cache memory and main memory.

第6図はライトアクセス時におけるキャッシュメモリ制
御部420の動作をフローチャートで示したものである
FIG. 6 is a flowchart showing the operation of the cache memory control unit 420 during write access.

まず第5図のステップ101と同様に、ステップ110
でキャツシュヒツトか否かの判定を行う。
First, in step 110, similar to step 101 in FIG.
It is determined whether it is a catch hit or not.

もしキャツシュヒツトならばステップ111に進み、ミ
スセットならばステップ113に進む。ステップ111
では、キャッシュメモリ4の中のデータを更新し、次の
ステップ112で主メモリ2のデータを更新する。
If it is a hit, the process proceeds to step 111, and if it is a misset, the process proceeds to step 113. Step 111
Then, the data in the cache memory 4 is updated, and in the next step 112, the data in the main memory 2 is updated.

ステップ110でキャッシュミスヒツトと判定すると、
次のステップ113にて、該当エリアがコモンエリアか
否かを判定する。この判定にはTLB600のコモンビ
ット603出力を用いる。
If it is determined in step 110 that there is a cache miss,
In the next step 113, it is determined whether the corresponding area is a common area. The common bit 603 output of the TLB 600 is used for this determination.

該当エリアが、第3図の領域240に相当するコモンエ
リアである場合は、ステップ117に進み、コモンエリ
アではない場合、第3図のプライベートエリア231,
233相当のエリアと判断してステップ114に進む、
なρ第5図のリードアクセスの場合は、コモンエリアで
も読出し専用エリアならば、キャッシュメモリ上にデー
タをコピーしたが、読出し専用エリアへのライトアクセ
スは。
If the area in question is a common area corresponding to area 240 in FIG. 3, the process proceeds to step 117; if the area is not a common area, the area corresponds to private area 231 in FIG.
It is determined that the area is equivalent to 233, and the process proceeds to step 114.
In the case of the read access in FIG. 5, if the common area is a read-only area, the data is copied onto the cache memory, but in the case of a write access to the read-only area.

MMU6でプロテクトチェックを行っているので、キャ
ッシュメモリ4ではチェックは行わない。
Since the MMU 6 performs the protection check, the cache memory 4 does not perform the check.

ステップ114では、まず該当エリアを主メモリ2から
コピーし、ディレクトリ402とVビット401をセッ
トしてキャッシュに登録する。これは、アクセスするサ
イズよりキャッシュの1エントリサイズの方が大きいた
め、書込みを行わない部分のデータをキャッシュデータ
部406にセットする目的で行われる。次のステップ1
15、およびステップ116では、キャツシュヒツト時
のステップ111および112と同様に、キャッシュメ
モリ4の内容の更新および主メモリ2の内容の更新をそ
れぞれ行う。
In step 114, the corresponding area is first copied from the main memory 2, the directory 402 and the V bit 401 are set, and the area is registered in the cache. This is done for the purpose of setting data that will not be written into the cache data section 406 because the size of one entry in the cache is larger than the size to be accessed. Next step 1
In steps 15 and 116, the contents of the cache memory 4 and the main memory 2 are updated, respectively, similarly to steps 111 and 112 at the time of cache hit.

ステップ117へ進んだ場合は、第3図のコモン領域2
40への書込みを意味する。このときはキャッシュメモ
リ4への登録は行わず、主メモリ2の内容を更新するの
みであり、リードアクセスの時と同様に、この処理によ
ってキャッシュと主メモリの不一致が生じないようにし
ている。
If you proceed to step 117, common area 2 in FIG.
40. At this time, the data is not registered in the cache memory 4, but only the contents of the main memory 2 are updated, and as in the case of read access, this process prevents mismatch between the cache and the main memory.

次に、第2図において、プロセッサ31がチャネル70
.ファイル装置75を起動してファイル¥11175の
中のデータ501を主メモリ2の所望のエリア201に
口゛−ディングする場合を考える。
Next, in FIG. 2, the processor 31
.. Let us consider the case where the file device 75 is activated and the data 501 in the file ¥11175 is accessed into a desired area 201 of the main memory 2.

この時、プロセッサ31に接続されたキャッシュメモリ
41の中に主メモリエリア201のコピー4101が存
在する時、プロセッサ31はローディング終了後に誤っ
てローディングする以前のデータを読込む可能性がある
。これを防ぐためには、主メモリエリア201をコモン
エリア書込み可として、キャッシュメモリ41に登録し
ない方法が考えられるが、ファイルからロードするデー
タは各種のものが含まれ、これらにキャッシュメモリを
使わないとプロセッサの性能を著しく低下させるので、
現実的な方法ではない。
At this time, when a copy 4101 of the main memory area 201 exists in the cache memory 41 connected to the processor 31, the processor 31 may erroneously read the data before loading after the loading is completed. To prevent this, it is possible to make the main memory area 201 writable as a common area and not register it in the cache memory 41, but the data to be loaded from the file includes various types of data, and it is necessary to use the cache memory for these. This will significantly reduce the performance of the processor.
It's not a realistic method.

そこで本発明では第7図に示す方法を用いる。Therefore, in the present invention, a method shown in FIG. 7 is used.

第7図は、プロセッサ31上で実行されるプログラムと
、ファイル装置75およびチャネル70の動作をフロー
チャートで表わしたものである。プロセッサ31がファ
イル装置75のデータ7501を主メモリ2の所望のエ
リア201にローディングする場合、まずステップ12
0でプロセッサ31自身のアドレス変換テーブルのリー
ドイネーブルビット604.ライトイネーブルビット6
05をオフにする0次のステップ121において、キャ
ッシュメモリ4の該当するエントリのVビット401を
オフにする。終了後にステップ123にて、チャネル7
0.ファイル装置75に対しリード起動を行う。起動後
、プロセッサ31はウェイト状態12“4とをり、ファ
イル装置75のデータ転送が終了するまで別のタスクを
実行する。もしプログラムミス等で、誤って主メモリエ
リア201にアクセスしたとしてもリードイネーブル6
04゜ライトイネーブル605をオフしているため、プ
ロテクションエラーを検出し誤動作を防ぐことができる
。リード起動を受取ったチャネル70.ファイル装置7
5は、ステップ127でデータ転送を行った後ステップ
128でプロセッサ31に対し終了報告を行う、プロセ
ッサ31は、終了報告を受取ると、ウェイト状態124
にあった本タスクを起動状態125にして、ステップ1
26の処理に進む。ステップ126においては、該当エ
リアのリードイネーブルビット604およびライトイネ
ーブルビット605をオンし、該当エリアへのアクセス
を可能にする。然る後に該当エリアへのアクセスが行わ
れると、ステップ121でVビット401をオフしてい
るので主メモリ2からのコピーを行い、最新のデータを
キャッシュメモリ41に取込むことができる。
FIG. 7 is a flowchart showing the program executed on the processor 31 and the operations of the file device 75 and channel 70. When the processor 31 loads the data 7501 of the file device 75 into the desired area 201 of the main memory 2, first step 12 is performed.
0, the read enable bit 604 of the address translation table of the processor 31 itself. Write enable bit 6
In the next step 121, the V bit 401 of the corresponding entry in the cache memory 4 is turned off. After finishing, in step 123, channel 7
0. A read start is performed on the file device 75. After startup, the processor 31 enters the wait state 12 "4" and executes another task until the data transfer from the file device 75 is completed. Even if the main memory area 201 is accessed by mistake due to a programming error, the enable 6
Since the 04° write enable 605 is turned off, protection errors can be detected and malfunctions can be prevented. Channel 70 that received the read trigger. File device 7
5 transfers data in step 127 and then reports completion to processor 31 in step 128. Upon receiving the completion report, processor 31 enters wait state 124.
Set this task that was in the startup state to 125 and proceed to step 1.
Proceed to step 26. In step 126, the read enable bit 604 and write enable bit 605 of the corresponding area are turned on to enable access to the corresponding area. When the corresponding area is subsequently accessed, since the V bit 401 is turned off in step 121, the data can be copied from the main memory 2 and the latest data can be taken into the cache memory 41.

・〔発明の効果〕 本発明によれば、他プロセツサや入出力機器が書込む可
能性のある主メモリエリアのコピーがキャッシュメモリ
中に存在しないので、キャッシュメモリと主メモリの内
容が不一致となることはない。そのため、他のプロセッ
サに対するキャッシュ無効化のための連絡アクセスが不
要となり、システムバスのトラヒック量を低く抑えるこ
とができ、システムバスのトラヒック量増加によるアク
セス時間の低下を防ぎ、スループットを向上できる。ま
た他のプロセッサや入出力機器が自分のキャッシュメモ
リのエリアを書替えるか否かを監視し、もし書替えれば
そのエントリを無効化するという必要もなくなるため、
プロセッサの性能低下を防ぎ、プロセッサ性能を最大限
に引出すことが可能となる。
- [Effects of the Invention] According to the present invention, there is no copy of the main memory area that may be written by other processors or input/output devices in the cache memory, so the contents of the cache memory and the main memory do not match. Never. Therefore, communication access to other processors for cache invalidation is not required, the amount of traffic on the system bus can be kept low, the decrease in access time due to an increase in the amount of traffic on the system bus can be prevented, and throughput can be improved. In addition, there is no need to monitor whether other processors or input/output devices rewrite their own cache memory area, and if they do, invalidate the entry.
It is possible to prevent processor performance from deteriorating and maximize processor performance.

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

第1図はメモリ管理ユニットおよびキャッシュメモリの
構成図、第2図はマルチプロセッサシステムの構成図、
第3図は論理空間と主メモリの関係を示した図、第4図
はひとつのプロセッサの構成図、第5図、第6図はそれ
ぞれリードアクセス。 ライトアクセス時におけるキャッシュメモリ制御動作を
示すフローチャート、第7図は入出力機器を起動する時
のプロセッサ上のプログラムと入出力機器の動作を示す
フローチャートである。 2・・・主メモリ、4,41〜44・・・キャッシュメ
モリ、6・・・メモリ管理ユニット(MMU)、31〜
34・・・プロセッサ、70・・・チャネル、75・・
・ファイル装置、600・・・アドレス変換バッファ(
TLB) 、603・・・コモンビット、604・・・
リードイネーブルビット、605・・・ライトイネーブ
ルビット。
Figure 1 is a configuration diagram of a memory management unit and cache memory, Figure 2 is a configuration diagram of a multiprocessor system,
Figure 3 shows the relationship between logical space and main memory, Figure 4 shows the configuration of one processor, and Figures 5 and 6 each show read access. FIG. 7 is a flowchart showing the cache memory control operation during write access. FIG. 7 is a flowchart showing the operation of the program on the processor and the input/output device when starting the input/output device. 2... Main memory, 4, 41-44... Cache memory, 6... Memory management unit (MMU), 31-
34...processor, 70...channel, 75...
・File device, 600...Address translation buffer (
TLB), 603...Common bit, 604...
Read enable bit, 605...Write enable bit.

Claims (1)

【特許請求の範囲】 1、主メモリを共有する複数個のプロセッサから構成さ
れる仮想記憶方式のマルチプロセッサシステムにおける
キャッシュメモリ制御方法において、プロセッサがメモ
リアクセス時に出力する論理アドレスを主メモリ上の物
理アドレスへ変換するアドレス変換手段に、各アドレス
対応のデータが複数プロセッサに共有されるときのみオ
ンとなるコモンフラグ及び上記データが書き込み可能な
エリアのデータのときのみオンとなるライトフラグを有
せしめるとともに、上記コモンフラグ及びライトフラグ
がともにオンの時は当該データのコピーをキャッシュメ
モリ上に作らずに主メモリ上の対応アドレスへ直接アク
セスするようにしたことを特徴とするキャッシュメモリ
制御方法。 2、前記マルチプロセッサシステムに、各プロセッサか
らの入出力要求により主メモリとの間でデータ転送を行
う入出力機器が設けられている場合に、各プロセッサは
、上記入出力機器に対して入出力要求を行うときに、主
メモリ上の当該エリアのコピーを当該プロセッサ対応の
キャッシュメモリから消去するようにしたことを特徴と
する、特許請求の範囲第1項記載のキャッシュメモリ制
御方法。
[Claims] 1. In a cache memory control method in a virtual memory multiprocessor system consisting of a plurality of processors that share a main memory, a logical address output by a processor when accessing the memory is set to a physical address on the main memory. The address conversion means for converting into an address is provided with a common flag that is turned on only when data corresponding to each address is shared by multiple processors, and a write flag that is turned on only when the data is in a writable area. . A cache memory control method characterized in that when both the common flag and the write flag are on, the corresponding address on the main memory is accessed directly without making a copy of the data on the cache memory. 2. If the multiprocessor system is provided with an input/output device that transfers data to and from the main memory in response to an input/output request from each processor, each processor performs input/output to the input/output device. 2. The cache memory control method according to claim 1, wherein when a request is made, a copy of the area on the main memory is erased from the cache memory corresponding to the processor.
JP62079654A 1987-04-02 1987-04-02 Cache memory control method Pending JPS63247852A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62079654A JPS63247852A (en) 1987-04-02 1987-04-02 Cache memory control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62079654A JPS63247852A (en) 1987-04-02 1987-04-02 Cache memory control method

Publications (1)

Publication Number Publication Date
JPS63247852A true JPS63247852A (en) 1988-10-14

Family

ID=13696121

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62079654A Pending JPS63247852A (en) 1987-04-02 1987-04-02 Cache memory control method

Country Status (1)

Country Link
JP (1) JPS63247852A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03127146A (en) * 1989-10-12 1991-05-30 Koufu Nippon Denki Kk Information processor
JPH04230550A (en) * 1990-10-12 1992-08-19 Internatl Business Mach Corp <Ibm> Information processing network and information processing method
JPH05274222A (en) * 1992-03-26 1993-10-22 Toshiba Corp Cache coinciding system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03127146A (en) * 1989-10-12 1991-05-30 Koufu Nippon Denki Kk Information processor
JPH04230550A (en) * 1990-10-12 1992-08-19 Internatl Business Mach Corp <Ibm> Information processing network and information processing method
JPH05274222A (en) * 1992-03-26 1993-10-22 Toshiba Corp Cache coinciding system

Similar Documents

Publication Publication Date Title
JP3067112B2 (en) How to reload lazy push into copy back data cache
US6920521B2 (en) Method and system of managing virtualized physical memory in a data processing system
US6711653B1 (en) Flexible mechanism for enforcing coherency among caching structures
EP0347040A1 (en) Data memory system
US6904490B2 (en) Method and system of managing virtualized physical memory in a multi-processor system
US20040073765A1 (en) Method and system of managing virtualized physical memory in a memory controller and processor system
US4831581A (en) Central processor unit for digital data processing system including cache management mechanism
US7117338B2 (en) Virtual memory address translation control by TLB purge monitoring
US5148526A (en) Data processing system with an enhanced cache memory control
US5168560A (en) Microprocessor system private split cache tag stores with the system tag store having a different validity bit for the same data line
US5671231A (en) Method and apparatus for performing cache snoop testing on a cache system
CA2127081A1 (en) Processor interface chip for dual-microprocessor processor system
EP0303661A1 (en) Central processor unit for digital data processing system including write buffer management mechanism.
JPS62145340A (en) Cache memory control system
JP3295436B2 (en) Microprocessor cache consistency
US20050091459A1 (en) Flexible mechanism for enforcing coherency among caching structures
KR100380674B1 (en) Method and system for maintaining cache coherency for write-through store operations in a multiprocessor system
US5950227A (en) CPU write-back cache coherency mechanism that transfers data from a cache memory to a main memory after access of the main memory by an alternative bus master
JPH1091521A (en) Duplex directory virtual cache and its control method
JPS63247852A (en) Cache memory control method
JPH01288940A (en) Logical address cache control system
US5276892A (en) Destination control logic for arithmetic and logic unit for digital data processor
JPS6113261B2 (en)
JP2680293B2 (en) Data processing device and cache memory control method
JPH0630074B2 (en) Processor