JPH03210645A - Cache control system - Google Patents

Cache control system

Info

Publication number
JPH03210645A
JPH03210645A JP2005356A JP535690A JPH03210645A JP H03210645 A JPH03210645 A JP H03210645A JP 2005356 A JP2005356 A JP 2005356A JP 535690 A JP535690 A JP 535690A JP H03210645 A JPH03210645 A JP H03210645A
Authority
JP
Japan
Prior art keywords
cache
store
control information
cpu
write
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
JP2005356A
Other languages
Japanese (ja)
Inventor
Ryoichi Tanaka
亮一 田中
Tomohito Saitou
知人 斉藤
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2005356A priority Critical patent/JPH03210645A/en
Publication of JPH03210645A publication Critical patent/JPH03210645A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To set the cache control information through execution of an instruction via a CPU by providing a page table containing the control information that shows whether each main storage page is equal to a specific area or not and can be designated by a CPU. CONSTITUTION:A page table 10 contains the control information that can be set by a program showing whether each main storage page is equal to a specific area or not, i.e., can receive an access with an instruction to be carried out by a CPU. Then the reference is given to the control information of the table 10 at execution of a write instruction. That is, the control information of the table 10 that discriminates the areas from each other is set by the instructions which are carried out by a CPU 1a and 1b. At the same time, the control information of the table 10 is referred to in a write operation state so that the cache control systems are switched between a store-through system in a write operation state of a specific area and a store-in system in a write operation state of other areas respectively to actuate the caches 2a and 2b. Thus the store-through or store-in system can be flexibly designated.

Description

【発明の詳細な説明】 [産業上の利用分野1 この発明は、主記憶装置と中央処理装置(以下CPUと
呼ぶ)とキャッシュ機構からなり、キャッシュへの書き
込み時に、ストアイン方式かストアスルー方式かを切り
賛えることができるキャッシュの制御方式に関するもの
である。
[Detailed Description of the Invention] [Industrial Application Field 1] This invention consists of a main storage device, a central processing unit (hereinafter referred to as CPU), and a cache mechanism, and when writing to the cache, either a store-in method or a store-through method is used. This article concerns a cache control method that can be highly praised.

[従来の技術] 従来、この種のシステムにおけるキャッシュの制御方式
を説明するものとして第4図に示すようなものがあった
[Prior Art] Conventionally, there has been a method as shown in FIG. 4 to explain a cache control method in this type of system.

この図はH,S、5tone著v高性能コンピユータア
ーキテクチヤJ pp、7l−75t 1989  年
3月30日 丸善株式会社発行)に示されたもので9図
において(1)はCPU、(2)はキャッシュ、(3)
は主記憶装置、(4)は入出カプロセッサ、(5)は外
部記憶装置、(6)はキャッシュディレクトリ、(7)
はキャッシュディレクトリのコピ(8)はシステムバス
、(9)は人出力バスである。
This diagram is from H, S, 5tone, v High Performance Computer Architecture J pp, 7l-75t, March 30, 1989, published by Maruzen Co., Ltd.) In Figure 9, (1) is the CPU, (2) is cache, (3)
is the main memory, (4) is the input/output processor, (5) is the external storage, (6) is the cache directory, (7)
Copy of the cache directory (8) is the system bus, and (9) is the human output bus.

周知のように、キャッシュの書き込み制御方式にはスト
アイン方式とストアスルー方式があり。
As is well known, there are two types of cache write control methods: store-in method and store-through method.

システムに応じて使い分けられているが、最近になって
いるが、最近になって、低速大容量の主記憶装置を持っ
た大規模なマルチプロセッサシステムにはストアイン方
式の方が適していることが分かった。というのは、スト
アスルー方式を用いた場合に比べて主記憶装置のアクセ
ス回数が少なくてすみ、したがってシステム全体のパフ
ォーマンスが上がるからである。
It is used differently depending on the system, but recently it has become clear that the store-in method is more suitable for large-scale multiprocessor systems with low-speed, large-capacity main memory. I understand. This is because the number of accesses to the main storage device is reduced compared to when the store-through method is used, thus improving the performance of the entire system.

しかし、ストアイン方式で管理されている記憶システム
では、データの最新更新結果は必ずしも主記憶装置に格
納されているわけではない。したがって、データを外部
記憶装置に出力する場合や複数のCPU間で共有メモリ
中に設けた通信用領域を用いてデータの受は渡しを行う
場合には、入出カプロセッサからキャッシュへあるいは
他系のCPUからキャッシュへのアクセスを行う必要が
生じる。
However, in a storage system managed using a store-in method, the latest data update results are not necessarily stored in the main storage device. Therefore, when outputting data to an external storage device, or when receiving or passing data between multiple CPUs using a communication area provided in a shared memory, it is necessary to It becomes necessary to access the cache from the CPU.

このようなストアイン方式で管理される記憶システムを
持つシステムの動作を、データの出力操作を行なう場合
を例に説明すると次のようになる。CP U (1)か
ら主記憶装置(3)にデータの書き込み要求があった場
合には、CPU(1)はキャッシュ(2)だけを更新し
、主記憶装置(3)の実際の更新は変化があったデータ
がキャッシュ(2)から捨てられるまで遅らされる。し
たがって、データの最新の更新結果は主記憶装置(3)
に保存されている場合もあれば、キャッシュ(2)に保
存されている場合もある。データの出力を行うためには
、キャッシュ(2)と主記憶装置(3)のどちら茫に保
存されているのかに応じて2通りの操作を行う。出力し
ようとするデータの最新の更新結果が主記憶装置(3)
に保存されている場合には、入出カプロセッサ(4)は
主記憶装置(3)からデータを取り出して外部記憶装置
! (5)に出力するが、最新の更新結果がキャッシュ
(2)に保存されている場合には、入出カプロセッサ(
4)はキャッシュ(2)からデータを取り出して、外部
記憶袋!! (5)に出力する。このようなキャッシュ
からのデータの取り出しの操作は、入出カプロセッサ(
4)から目的とするデータが保存されているキャッシュ
(2)の制御部に対してデータ送出の要求信号を送り、
その信号を受は取ったキャッシュ(2)の制御部は目的
のデータをバス(8)に出力し、そのデータを入出カプ
ロセッサ(4)が取り込むことによって行なわれる。出
力しようとするデータの最新の更新結果が主記憶装置(
3)とキャッシュ(2)のどちら鉢に保存されているの
かは入出カプロセッサ(4)がキャッシュのディレクト
リのコピー(7)を検査することで識別する。キャッシ
ュディレクトリのコピー(7)は、CPtJ(1)の動
作を妨害せずに入出カプロセッサ(4)がディレクトリ
の内容を検査することが出来るように用意されたもので
あり、マルチプロセッサシステムで、CPUおよびキャ
ッシュが複数あるシステムでは、すべてのキャッシュデ
ィレクトリのコピーを格納している。このコピー(7)
を元の各キャッシュディレクトリと常に′一致させてお
くことにより、cpuはオリジナルのキャッシュディレ
クトリを、入出カプロセッサ(4)はキャッシュディレ
クトリのコピー(7)を各々独立して検査することで互
いの操作を妨害する\ ことなしにデータの最新更新結果の所在を調べることが
出来るようになっている。
The operation of a system having a storage system managed using the store-in method will be explained below using an example in which a data output operation is performed. When there is a data write request from the CPU (1) to the main memory (3), the CPU (1) updates only the cache (2), and the actual update of the main memory (3) does not change. is delayed until the data that was present is discarded from cache (2). Therefore, the latest data update results are stored in the main memory (3).
In some cases, it is stored in the cache (2), and in other cases it is stored in the cache (2). In order to output data, two types of operations are performed depending on whether the data is stored in the cache (2) or the main memory (3). The latest updated result of the data to be output is stored in the main memory (3)
If the data is stored in the external storage device, the input/output processor (4) retrieves the data from the main storage device (3) and transfers it to the external storage device! (5), but if the latest update result is stored in the cache (2), the input/output processor (
4) Take out the data from cache (2) and store it in an external storage bag! ! (5) Output. This operation of retrieving data from the cache is performed by the I/O processor (
4) sends a data transmission request signal to the control unit of the cache (2) where the target data is stored;
The control section of the cache (2) that receives the signal outputs the target data to the bus (8), and the input/output processor (4) takes in the data. The latest updated result of the data to be output is stored in the main storage (
The input/output processor (4) identifies whether the data is stored in the cache (3) or the cache (2) by checking the cache directory copy (7). The cache directory copy (7) is prepared so that the input/output processor (4) can inspect the contents of the directory without interfering with the operation of the CPtJ (1), and in a multiprocessor system, Systems with multiple CPUs and caches store copies of all cache directories. This copy (7)
By always keeping them consistent with each original cache directory, the CPU independently inspects the original cache directory, and the input/output processor (4) independently inspects the copy (7) of the cache directory, thereby preventing mutual operations. It is now possible to check the location of the latest data updates without interfering with the data.

第5図は複数のCPUを持つマルチプロセッサシステム
の例であり、複数CPU間で共有メモリ中に設けられた
通信領域を用いて通信を行う例を説明する。
FIG. 5 is an example of a multiprocessor system having a plurality of CPUs, and an example will be described in which communication is performed between the plurality of CPUs using a communication area provided in a shared memory.

あるC P U (la)が通信用領域のデータに対し
て変更を行うと、その領域の最新の更新結果はキャッシ
ュ(2a)のみに保存されることになる。したがって、
そのようなデータを他系のCP U (lb)が読み込
もうとする場合には、そのCP U (lb)は主記憶
袋!! (3)からではな(、最新の更新結果が保存さ
れているキャッシュ(2a)から取り出す、この取り出
しの操作は、入出カプロセッサ(4)のようにすべての
キャッシュディレクトリ(6a) 、 (6b)を自分
自身で検査することはできないため、すべての他系キャ
ッシュ(2a)の制御部に対してデータ送出の要求信号
を送り、その結果対応するデータの最新の更新結果が保
存されているキャッシュ(2a)からバス(8)に出力
されたデータを取り込むことによって達成される。
When a certain CPU (la) changes data in a communication area, the latest updated result of that area is stored only in the cache (2a). therefore,
When a CPU (lb) of another system tries to read such data, that CPU (lb) is stored in the main memory bag! ! (3) (This retrieval operation is to retrieve the latest update results from the cache (2a) where they are stored, from all cache directories (6a) and (6b) like the input/output processor (4). Since it is not possible to check the data by itself, a data sending request signal is sent to the control unit of all other caches (2a), and as a result, the cache (2a) that stores the latest updated results of the corresponding data is sent. This is achieved by taking in the data output from 2a) to the bus (8).

以上のようなキャッシュの制御方式においては、出力し
ようとするデータや通信に使用するメツセージデータの
最新更新結果がキャッシュに保存されている場合には、
そのデータを取り出そうとする入出カプロセッサや他系
CPUによるキャッシュアクセスが生じることになり、
その操作が行われている間はCPUからキャッシュへの
アクセス操作が妨害され、それによってCP tJの処
理効率の低下の原因になるという問題点があった。
In the cache control method described above, if the latest update result of the data to be output or the message data used for communication is stored in the cache,
Cache access will occur by input/output processors and other CPUs trying to retrieve the data.
While this operation is being performed, the access operation from the CPU to the cache is obstructed, which causes a problem in that the processing efficiency of the CP tJ decreases.

この点がストアイン方式によるキャッシュ制御方式の欠
点であり、この点のみについて言えば、他からのキャッ
シュアクセスがなくなるストアスルー方式の方が優れて
いる。
This point is a drawback of the cache control method based on the store-in method, and in this point alone, the store-through method, which eliminates cache access from others, is superior.

したがって、2種類のキャッシュの書き込み制御方式、
すなわちストアイン方式とストアイン方式の各々の短所
を補うように、書き込み制御方式を適宜切り替えながら
動作するシステムを構成することが考えられる。
Therefore, there are two types of cache write control methods,
That is, it is conceivable to configure a system that operates while appropriately switching the write control method so as to compensate for the shortcomings of each of the store-in method and the store-in method.

このような、2種類のキャッシュ制御方式のいずれも可
能な書き込み機構を備えたキャッシュ制御装置を開示し
たものに特開昭62−203252号公報がある。それ
によれば、各々のキャッシュブロック毎にどちらの方式
で書き込みを行うのかを示すマルチコピービットと呼ば
れる制御情報をキャッシュのタグメモリ中に設け、その
制御情報にしたがって書き込み方式をストアイン方式と
ストアスルー方式の間で切り替えて動作する。このマル
チコピービットは、キャッシュの制御部が他系のCPU
から主記憶装置へのアクセス操作を監視することによっ
て自分のキャッシュに保存されているデータのコピーが
他系のキャッシュにも作られたことが検出されるとキャ
ッシュ制御部のハードウェアによって”オン”にされる
ものである。
Japanese Patent Laid-Open No. 62-203252 discloses a cache control device equipped with a write mechanism capable of using both of these two types of cache control methods. According to this, control information called a multi-copy bit indicating which method to write to each cache block is provided in the tag memory of the cache, and the writing method can be set to store-in or store-through according to the control information. It operates by switching between methods. This multi-copy bit means that the cache control unit is controlled by the CPU of another system.
When it is detected that a copy of the data stored in the own cache has also been created in another system's cache by monitoring access operations to the main memory, the hardware of the cache control unit turns the switch on. It is something that is done.

第6図は同公報に示されたものであり、マルチコピービ
ットがセットされる様子を示している。
FIG. 6 is shown in the same publication and shows how the multi-copy bit is set.

(21)はCPU−Aのキャッシュ、 (22)はCP
U−Bのキャッシュ、 (23)は主記憶装置、 (2
4)はバスである。
(21) is CPU-A cache, (22) is CP
U-B cache, (23) is main storage, (2
4) is a bus.

動作1:cPU−Aが主記憶装置(23)からデータを
キャッシュ(21)にロードする。
Operation 1: cPU-A loads data from the main memory (23) into the cache (21).

動作2 : CPU−Bが主記憶装置(23)から同じ
データをキャッシュ(22)にロードする。このロード
動作をCPU−Aのキャッシュ(21)の制御部がバス
(24)を監視し、CPU−Bからバス(24)に送出
されたアドレスとタグメモリ中のアドレスを比較するこ
とによって一致が検出されれば同じコピーが作られたと
判断して、対応するキャッシュブロックのマルチコピー
ビットを”オン”にする。
Operation 2: CPU-B loads the same data from the main memory (23) into the cache (22). The control unit of the cache (21) of CPU-A monitors the bus (24) for this load operation, and compares the address sent from CPU-B to the bus (24) with the address in the tag memory to find a match. If detected, it is determined that the same copy has been created, and the multi-copy bit of the corresponding cache block is turned on.

このようにマルチコピービットは他系CPUの動作に応
じてセットされるものであり、自分のCPUで特定の命
令を実行することによって明示的にセットできるもので
はない。もし、目的のキャッシュデータを指定して特定
の命令を実行することでマルチコピービットをセットで
きるような機構を設けたとしても、キャッシュに格納さ
れるデータは主記憶領域のほんの一部分のみであるため
、目的とするデータがキャッシュ上にあるのか否かを意
識しながら命令実行を行なわねばならない。このような
判断をプログラムで行なわせるのは現実問題として不可
能であり、キャッシュ本来の目的から見ても矛盾した考
え方である。本来キャッシュは、CPUで実行中のプロ
グラムからはあたかも主記憶に直接アクセスしているか
のように見えるようにするために、プログラムからは意
識する必要がないように設計されるものである。
In this way, the multi-copy bit is set according to the operation of the other system's CPU, and cannot be explicitly set by executing a specific instruction in the own CPU. Even if a mechanism was provided to set the multi-copy bit by specifying the desired cache data and executing a specific instruction, the data stored in the cache would only occupy a small portion of the main storage area. , the instruction must be executed while being aware of whether or not the target data is on the cache. In reality, it is impossible to make such a judgment by a program, and it is a contradictory idea even from the point of view of the original purpose of the cache. Originally, a cache is designed so that it appears to the program running on the CPU as if it were directly accessing main memory, so that the program does not need to be aware of it.

したがって、このようにタグメモリ中に制御情報を設け
る方式では、制御情報は実行中のプログラムからは隠蔽
されてしまうことになり、命令実行によってその制御情
報に直接アクセスすることは不可能になってしまう。し
たがって、この方式では確保する主記憶領域が入出力用
領域や通信用領域などの他系からのアクセスが生じる特
定領域であることがあらかじめ分かつている場合でも。
Therefore, in this method of providing control information in the tag memory, the control information is hidden from the running program, making it impossible to directly access the control information by executing instructions. . Therefore, with this method, even if it is known in advance that the main storage area to be secured is a specific area that will be accessed from other systems, such as an input/output area or a communication area.

それによって制御情報の”オン”、”オフ”を行うこと
はできないことになる。
This means that the control information cannot be turned on or off.

[発明が解決しようとする課11?!]以上のような従
来のキャッシュ制御方式においては、キャッシュの書き
込み制御方式すなわちストアイン方式で動作するのかあ
るいはストアスルー方式で動作するのかを示す制御情報
はキャッシュの制御部が検出し設定するもので、cpu
での命令実行によって設定や参照をすることはできない
。したがって、プログラムの実行中に確保する記憶領域
が他系からのアクセスが生じる特定領域であることがあ
らかじめ分かっている場合でも。
[Lesson 11 that the invention attempts to solve? ! ] In the conventional cache control method described above, the cache control unit detects and sets the control information indicating the write control method of the cache, that is, whether the cache operates in the store-in method or the store-through method. , cpu
It cannot be set or referenced by executing instructions in . Therefore, even if it is known in advance that the storage area to be secured during program execution is a specific area that will be accessed from other systems.

それによってキャッシュの制御情報の設定を行うことが
できないという問題があった。
As a result, there was a problem in that cache control information could not be set.

この発明は上記のような問題点を解決するためになされ
たもので、CPUでの命令実行によるキャッシュの制御
情報の設定を可能にし、その情報に基づいてキャッシュ
の書き込み制御方式を切り替えることを可能にする方法
を提供することを目的とするものである。
This invention was made to solve the above-mentioned problems, and it is possible to set cache control information by executing instructions on the CPU, and to switch the cache write control method based on that information. The purpose is to provide a method for

[課題を解決するための手段] この発明に関わるキャッシュ制御方式は、各主記憶ペー
ジが特定領域であるのが、それ以外の領域であるのかを
示すプログラムで設定可能な、つまりCPUで実行する
命令でアクセス可能な制御情報を保持するページテーブ
ルを設け、書き込み命令実行時にこのページテーブルの
制御情報を参照するようにした。
[Means for Solving the Problems] The cache control method according to the present invention can be set by a program that indicates whether each main memory page is a specific area or another area, that is, executed by a CPU. A page table that holds control information that can be accessed by commands is provided, and the control information in this page table is referenced when a write command is executed.

[作用1 この発明においては、領域を区別するためのページテー
ブル中の制御情報はCPUで実行する命令で設定され、
かつ書き込み操作時に参照して。
[Effect 1] In this invention, the control information in the page table for distinguishing between areas is set by an instruction executed by the CPU,
and referenced during write operations.

特定領域に対する書き込み操作であればキャッシュをス
トアスルー方式で、特定領域に対してではない書き込み
操作であればストアイン方式で動作するようキャッシュ
制御方式を切替える。
The cache control method is switched so that if the write operation is to a specific area, the cache operates in the store-through method, and if the write operation is not to a specific region, the cache operates in the store-in method.

[実施例1 第1図はこの発明の一実施例を示すブロック図であり、
 (la)〜(9)は第5図に示した従来装置と同一の
ものである。(lO)はページテーブル、 (11)は
信号線である。
[Embodiment 1 FIG. 1 is a block diagram showing an embodiment of the present invention,
(la) to (9) are the same as the conventional device shown in FIG. (lO) is a page table, and (11) is a signal line.

ページテーブル(10)は仮想記憶機能を提供するコン
ピュータシステムにおいて、主記憶領域へのアクセスを
行う場合に使用される仮想アドレスを実アドレスに変換
するためのアドレス情報を保存しているテーブルであり
、複数のページテーブルエントリより構成される。この
テーブルは仮想記憶機構を持つコンピュータシステムは
必ず具備しているものである。ページテーブルエントリ
は仮想記憶空間を構成する基本単位であるページ毎に用
意されるもので、対応するページのアドレス変換のため
のアドレス情報を格納する。
The page table (10) is a table that stores address information for converting a virtual address used when accessing the main storage area into a real address in a computer system that provides a virtual storage function. Consists of multiple page table entries. This table is always provided in a computer system having a virtual storage mechanism. A page table entry is prepared for each page, which is a basic unit of virtual storage space, and stores address information for address conversion of the corresponding page.

第2図はページテーブルエントリ中にキャッシュの制御
情報ビットを保存する方法の一例である。(12)はペ
ージフレーム番号、 (13)は制御情報ビットである
。制御情報ビットは”オン”オフ”のみを示すことがで
きればよいので1ビツトあれば十分である。したがって
、このようにページテーブルエントリ中の空きビットを
使用できる可能性は高く、さらに制御情報ビットを格納
するための特別なテーブルを用意する必要がないため、
記憶領域を節約することができる。
FIG. 2 is an example of a method for storing cache control information bits in page table entries. (12) is the page frame number, and (13) is the control information bit. Since the control information bit only needs to be able to indicate "on" or "off", one bit is sufficient.Therefore, there is a high possibility that the empty bits in the page table entry can be used in this way, and the control information bit can also be used. There is no need to prepare a special table to store
Storage space can be saved.

ページフレーム番号(12)は仮想記憶領域のページが
実記憶領域上に格納されている場所を示すもので、コン
ピュータシステム全体を制御・管理する制御プログラム
であるオペレーティングシステムによって管理される。
The page frame number (12) indicates the location where the page of the virtual storage area is stored on the real storage area, and is managed by the operating system, which is a control program that controls and manages the entire computer system.

制御情報ビット(13)は記憶領域が確保される時にそ
の使用目的に応じて例えばオペレーティングシステムの
記憶管理機構が制御情報を格納する。オペレーティング
システムの記憶管理機構が制御情報ビット(13)を管
理する方法として例えば第3図に示す次のようなものが
ある。入出力や通信に使用するための主記憶領域、すな
わち特定領域を確保する場合には必ずCPUの特定のレ
ジスタに特定領域の確保要求であることが識別できるよ
うな値をセットしてから確保要求を行なうようにし、記
憶管理機構はその要求を受は取った時には必ずそのレジ
スタを検査するようにしてその領域が特定領域であるか
否かを識別する。その結果、その領域が特定領域である
ことを示す値が格納されているならば記憶管理機構はペ
ージテーブル(10)中の制御情報ビット(13)を”
オン“にする。
The control information bit (13) stores control information, for example, by a storage management mechanism of an operating system, depending on the purpose of use when a storage area is secured. As a method for the storage management mechanism of the operating system to manage the control information bit (13), there is the following method shown in FIG. 3, for example. When allocating a main memory area for use in input/output or communication, that is, a specific area, be sure to set a value in a specific CPU register to identify that the request is for a specific area before making the allocation request. When the storage management mechanism receives the request, it always checks the register to identify whether the area is a specific area or not. As a result, if a value indicating that the area is a specific area is stored, the storage management mechanism sets the control information bit (13) in the page table (10) to "
turn on.

また、記憶領域を解放する場合には、対応する制御情報
ビット(13)をリセットする。
Furthermore, when releasing the storage area, the corresponding control information bit (13) is reset.

このような管理を行なうことによって、主記憶ページの
すべてのページに対して、そのページはストアイン方式
で管理するのかあるいはストアスルー方式で管理するの
かを示すキャッシュの制御情報を付加することが可能に
なる。
By performing this kind of management, it is possible to add cache control information to every page in the main memory page, indicating whether the page is managed using the store-in method or the store-through method. become.

キャッシュへの制御方式切替えの指令は以下のように行
なう。第1図において、主記憶装置(3)への書き込み
操作を行うためにCP U (la)がアドレス変換操
作を行う時に、CPU(la)は主記憶装置(3)に格
納されているページテーブル(10)を使用し、格納し
であるアドレス情報を使用してアドレス変換操作を行う
ことに加え0Mき込み操作の対象となる主記憶領域の制
御情報ビット(13)を読む。CP U (la)は読
み込んだ制御情報ビット(13)からその領域が上記特
定用途のために確保されたものか否かを判断し、そうで
ある場合は信号線(11)を使用してこれから行う書き
込み操作はスト・アスル一方式で行うことをキャッシュ
(2a)に伝える。この信号がキャッシュ(2a)に伝
えられると。
A command to switch the control method to the cache is given as follows. In FIG. 1, when the CPU (la) performs an address translation operation to perform a write operation to the main memory (3), the CPU (la) converts the page table stored in the main memory (3). Using (10), in addition to performing an address conversion operation using the stored address information, the control information bit (13) of the main storage area that is the target of the 0M write operation is read. The CPU (la) determines from the read control information bit (13) whether or not the area is reserved for the above-mentioned specific purpose, and if so, uses the signal line (11) to The cache (2a) is informed that the write operation to be performed will be performed in a store/asle format. When this signal is conveyed to the cache (2a).

キャッシュ(2a)の制御部によってその操作に対する
書き込み制御方式がストアスルー方式に切り替えられる
The control unit of the cache (2a) switches the write control method for that operation to the store-through method.

システムによってはCPU中にページテーブルの一部を
保存し、アドレス変換操作時の主記憶アクセスの回数を
削減するためのアドレス変換バッファを設けているもの
もある。このようなシステムでは、アドレス変換バッフ
ァ中にもアドレス情報の一部として制御情報ビット(1
3)を保存し、アドレス変換バッファを使用してアドレ
スの変換を行う場合にも同様の操作すなわちアドレス変
換バッファ中の制御情報ビットを調べ、キャッシュに書
き込み制御方式を伝える。
Some systems are provided with an address translation buffer to store a portion of the page table in the CPU and reduce the number of main memory accesses during address translation operations. In such systems, the control information bit (1 bit) is also stored in the address translation buffer as part of the address information.
3) is stored and the address is translated using the address translation buffer, the same operation is performed, that is, the control information bits in the address translation buffer are checked and the write control method is transmitted to the cache.

このような制御方式では従来の方式と比較して、書き込
み操作時にページテーブル中あるいはアドレス変換バッ
ファ中の制御情報ビットを読んでキャッシュに伝えると
いう操作が増えることになる。しかし、主記憶アクセス
を行なう場合にはアドレス変換を行なうために必ずCP
Uからページテーブルあるいはアドレス変換バッファへ
の参照の操作が生じるため、その時に同時に制御情報ビ
ットを参照するようにすれば、操作が増えることによる
オーバヘッドは非常に小さなものになる。
In such a control method, compared to the conventional method, an operation of reading control information bits in a page table or an address translation buffer and transmitting them to the cache during a write operation increases. However, when accessing main memory, the CP must be used to perform address translation.
Since a reference operation from U to the page table or address translation buffer occurs, if the control information bits are referenced at the same time, the overhead caused by the increased number of operations will be extremely small.

このように制御することによって、上記特定用途のため
に確保された主記憶領域のデータはキャッシュ(2a)
、 (2b)に書き込まれると同時に主記憶装置(3)
にも書き込まれることになるため、特定領域の最新の更
新結果は常に主記憶装置に保存されていることになる。
By controlling in this way, the data in the main storage area reserved for the above-mentioned specific purpose is stored in the cache (2a).
, (2b) and at the same time the main memory (3)
Therefore, the latest updated results of the specific area are always stored in the main storage device.

このように制御情報の管理をプログラムで行なうので9
例えば、入出力やCPU間の通信に使用される特定の主
記憶領域に対してのみストアスルー方式で、その他の領
域に対してはストアインで書き込むといった制御を行な
うことが可能となり、その結果それら特定領域のデータ
の最新更新結果は常に主記憶装置に記憶させておくこと
ができる。したがって、入出カプロセッサや他系のCP
Uによるデータの取り出しは常に主記憶装置から行なえ
るようになり、入出カプロセッサや他系のCPUによる
キャッシュへのアクセス操作の妨害がなくなるため、C
PUの処理効率の低下を避けることができる。
In this way, control information is managed by a program, so 9
For example, it is possible to perform control such as writing only to a specific main storage area used for input/output and communication between CPUs using the store-through method, and writing to other areas using the store-in method. The latest updated results of data in a specific area can always be stored in the main storage device. Therefore, input/output processors and other CPs
Data retrieval by U can always be performed from the main memory, and there is no interference with cache access operations by input/output processors or CPUs of other systems.
A decrease in the processing efficiency of the PU can be avoided.

すなわち、ストアイン方式とストアスルー方式の各々の
短所を補うように、書き込み制御方式を適宜切替えなが
ら動作するシステムを構成することができる。
That is, it is possible to configure a system that operates while appropriately switching the write control method so as to compensate for the disadvantages of each of the store-in method and the store-through method.

[発明の効果] 以上のようにこの発明によれば、キャッシュの書き込み
制御方式を切替える制御情報をプログラムで、つまりC
PUの命令実行により設定および参照可能なページテー
ブル中に設け、書き込み命令実行時にこれを参照するよ
うにしたので、ストアイン方式かストアスルー方式かの
指定を柔軟に行なえる。
[Effects of the Invention] As described above, according to the present invention, the control information for switching the cache write control method is transmitted by a program, that is, by C
It is provided in a page table that can be set and referenced by executing a PU instruction, and is referenced when a write instruction is executed, so that it is possible to flexibly specify whether to use the store-in method or the store-through method.

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

第1図はこの発明の一実行例を示すブロック図、第2図
は第1図で示す実施例で使用するページテーブルエント
リに格納される情報を示す構成図、第3図は記憶管理機
構の動作を示す流れ図。 第4図、第5図は従来のキャッシュ制御装置を示すブロ
ック図、第6図は従来のキャッシュ書き込み制御情報の
管理方法を示す図である。 図において、 (la) 、 (lb) 、 (1)は
CPU、 (2al。 2b)、 (2)はキャッシュ、(3)は主記憶装置。 4)は入出カプロセッサ、(5)は外部記憶装置。 6a)、  (6b)、  (61はキャッシュディレ
クトリ。 7)はキャッシュディレクトリのコピー、(8)はシス
テムバス、(9)は入出力バス、 (10)はページテ
ーブル、 (11)は信号線、 (12)はページフレ
ーム番号、 (13)は主記憶領域の制御情報ビット、
 (21)はCPU−Aのキャッシュ、 [22)はC
PU−Bのキャッシュ、 (23)は主記憶装置、 (
24)はバスである。 なお、各図中同一符号は同−又は相当部分を示す。 第 図 第 図
FIG. 1 is a block diagram showing an implementation example of the present invention, FIG. 2 is a configuration diagram showing information stored in page table entries used in the embodiment shown in FIG. 1, and FIG. Flowchart showing the operation. FIGS. 4 and 5 are block diagrams showing a conventional cache control device, and FIG. 6 is a diagram showing a conventional cache write control information management method. In the figure, (la), (lb), (1) are CPUs, (2al. 2b), (2) are caches, and (3) are main storage devices. 4) is an input/output processor, and (5) is an external storage device. 6a), (6b), (61 is a cache directory. 7) is a cache directory copy, (8) is a system bus, (9) is an input/output bus, (10) is a page table, (11) is a signal line, (12) is the page frame number, (13) is the main storage area control information bit,
(21) is the cache of CPU-A, [22] is the cache of C
PU-B cache, (23) is the main storage device, (
24) is a bus. Note that the same reference numerals in each figure indicate the same or corresponding parts. Figure Figure

Claims (1)

【特許請求の範囲】  主記憶装置と中央処理装置とキャッシュ機構を持つシ
ステムにおいて、 中央処理装置より書き込み命令されたときにキャッシュ
に書き込むのみで主記憶装置にはすぐには書き込まない
ストアイン方式か、主記憶装置に同時に書き込むストア
スルー方式のいずれも可能な書き込み機構を持つキャッ
シュ制御装置と、各主記憶ページが特定領域であるかそ
れ以外の領域であるのかを示す中央処理装置より指定可
能な制御情報を含んだページテーブルを設け、 中央処理装置により書き込み命令を実行したときに上記
ページテーブルを参照し、特定領域に対する書き込み操
作である場合にはキャッシュをストアスルー方式で動作
させ、特定領域でない場合にはストアイン方式で動作す
るように書き込み制御方式を切り替えることを特徴とす
るキャッシュ制御方式。
[Scope of Claims] In a system having a main memory, a central processing unit, and a cache mechanism, a store-in method that only writes to the cache when a write command is issued from the central processing unit, but does not immediately write to the main memory. , a cache control unit that has a write mechanism that can write to the main memory at the same time using either the store-through method, and a central processing unit that indicates whether each main memory page is a specific area or another area. A page table containing control information is provided, and when the central processing unit executes a write command, the page table is referred to, and if the write operation is to a specific area, the cache operates in a store-through method, and if the write operation is not a specific area, A cache control method characterized by switching the write control method to operate in a store-in method in some cases.
JP2005356A 1990-01-12 1990-01-12 Cache control system Pending JPH03210645A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005356A JPH03210645A (en) 1990-01-12 1990-01-12 Cache control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005356A JPH03210645A (en) 1990-01-12 1990-01-12 Cache control system

Publications (1)

Publication Number Publication Date
JPH03210645A true JPH03210645A (en) 1991-09-13

Family

ID=11608902

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005356A Pending JPH03210645A (en) 1990-01-12 1990-01-12 Cache control system

Country Status (1)

Country Link
JP (1) JPH03210645A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
JP2005149290A (en) * 2003-11-18 2005-06-09 Seiko Epson Corp Information processing device and cache memory control method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
JP2005149290A (en) * 2003-11-18 2005-06-09 Seiko Epson Corp Information processing device and cache memory control method

Similar Documents

Publication Publication Date Title
JP2662603B2 (en) Method and apparatus for filtering invalidation requests
JPH11232173A (en) Data processing system provided with remote cache incorporated in local memory and cc-numa (cache consistent type non-uniform memory access) architecture
EP0777183B1 (en) Computer cache system
CN108153683A (en) For transmitting the device and method of data between address range in memory
JPH04353947A (en) Memory-page-characteristic tagging system
JP3236287B2 (en) Multiprocessor system
JPH0997214A (en) Information-processing system inclusive of address conversion for auxiliary processor
US5524225A (en) Cache system and method for providing software controlled writeback
US6092170A (en) Data transfer apparatus between devices
JP2021530028A (en) Methods and equipment for using the storage system as main memory
JPH04230550A (en) Information processing network and information processing method
EP0533427A1 (en) Computer memory control system
US6952761B2 (en) Bus interface selection by page table attributes
JP2746530B2 (en) Shared memory multiprocessor
JP3626609B2 (en) Multiprocessor system
JPH03210645A (en) Cache control system
JPH01213732A (en) Extended storage system
KR20070049677A (en) A virtual address cache and method for sharing data using a unique task identifier
JPS63253448A (en) Multi-computer device
JPH0529943B2 (en)
GB2221066A (en) Address translation for I/O controller
JPH03230238A (en) Cache memory control system
JP2636760B2 (en) Multiprocessor system
JP2637853B2 (en) Cache memory device
JPH0553912A (en) Control method for cache memory