JPH0661065B2 - Cache memory control method - Google Patents
Cache memory control methodInfo
- Publication number
- JPH0661065B2 JPH0661065B2 JP63159699A JP15969988A JPH0661065B2 JP H0661065 B2 JPH0661065 B2 JP H0661065B2 JP 63159699 A JP63159699 A JP 63159699A JP 15969988 A JP15969988 A JP 15969988A JP H0661065 B2 JPH0661065 B2 JP H0661065B2
- Authority
- JP
- Japan
- Prior art keywords
- central processing
- data
- cache memory
- processing unit
- processing units
- 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.)
- Expired - Lifetime
Links
Landscapes
- Memory System Of A Hierarchy Structure (AREA)
Description
【発明の詳細な説明】 [産業上の利用分野] この発明は主記憶装置を共有するマルチプロセッサシス
テムにおけるキャッシュメモリ制御方式に関するもので
ある。The present invention relates to a cache memory control system in a multiprocessor system sharing a main memory.
[従来の技術] 第4図は例えば“COMPUTER DESIGN”,
Glen G.Langdon ,Jr.著(COMPUTEACH P
RESS INC.1982)に示されたキャッシュメ
モリ制御方式の構成を示すブロック図である。図におい
て、1はデータ処理に必要なデータを格納する主記憶装
置、2はこの主記憶装置1を共有しデータ処理に関する
演算・制御を行う中央処理装置(CPU)、3は中央処
理装置2と主記憶装置1間のデータ転送を高速化するた
めのキャッシュメモリ、4は読み出しデータパス、5は
主記憶読み出しパス、6は書き込みデータパス、7はロ
ードスルーパス、8はストアスルーパスである。[Prior Art] FIG. 4 shows, for example, "COMPUTER DESIGN",
Glen G. Langdon, Jr. By (COMPUTEACH P
RESS INC. 1982) is a block diagram showing the configuration of the cache memory control system shown in FIG. In the figure, 1 is a main memory device for storing data necessary for data processing, 2 is a central processing unit (CPU) which shares the main memory device 1 and performs arithmetic / control for data processing, and 3 is a central processing unit 2. A cache memory for speeding up data transfer between the main memory devices 1, 4 is a read data path, 5 is a main memory read path, 6 is a write data path, 7 is a load through path, and 8 is a store through path.
次に動作について説明する。キャッシュメモリ3は、中
央処理装置2が主記憶装置1からデータをアクセスする
時にそのデータを格納しておく。一般に、一度使用され
たデータは、再び使用される可能性が高いといわれてお
り、以後のデータのアクセス時に、このキャッシュメモ
リ3からデータがアクセスできる場合が多くなる。ま
た、このキャッシュメモリ3は、通常主記憶装置1より
かなり高速にアクセスできるものなので、したがって、
アクセスしたいデータがキャッシュメモリ3内にある場
合には、かなり高速にデータのアクセスができる。デー
タがキャッシュメモリ3内にない時には、主記憶装置1
へデータをアクセスする必要があるので、遅くなってし
まう。Next, the operation will be described. The cache memory 3 stores the data when the central processing unit 2 accesses the data from the main memory 1. Generally, it is said that once used data is highly likely to be used again, there are many cases where the data can be accessed from the cache memory 3 when accessing the data thereafter. Further, since the cache memory 3 can be accessed much faster than the main memory 1, the cache memory 3 is
If the data to be accessed is in the cache memory 3, the data can be accessed at a considerably high speed. When the data is not in the cache memory 3, the main memory 1
Since it needs to access the data to, it will be slow.
中央処理装置2がデータをアクセスする時には、まず、
必要なデータに対するリクエストを出し、このリクエス
トされたアクセスのデータがキャッシュメモリ3内に存
在しているか否かをテストする。もしあれば、そのキャ
ッシュメモリ3内のデータを読み出し、データパス4か
らそのままとりだす。もしキャッシュメモリ3内に必要
なデータがない場合には、主記憶読み出しパス5によっ
てデータを一度主記憶装置1からキャッシュメモリ3内
へ読み出してきて、その後にキャッシュメモリ3を読み
出す。あるいは、主記憶読み出しパス5からキャッシュ
メモリ3へ読み出すと同時にロードスルーパス7を介し
て中央処理装置2へも読み出す。書き込み動作の時にも
同様のテストを行い、データはデータ書き込みデータパ
ス6よりキャッシュメモリ3、あるいはストアスルーパ
ス8より主記憶装置1へ書き込まれる。When the central processing unit 2 accesses data, first,
A request for necessary data is issued, and it is tested whether the requested access data exists in the cache memory 3. If there is, the data in the cache memory 3 is read out and taken out from the data path 4 as it is. If there is no necessary data in the cache memory 3, the data is read once from the main memory 1 into the cache memory 3 by the main memory read path 5, and then the cache memory 3 is read. Alternatively, the data is read from the main memory read path 5 to the cache memory 3 and simultaneously to the central processing unit 2 via the load through path 7. The same test is performed during the write operation, and the data is written to the cache memory 3 through the data write data path 6 or the main memory 1 through the store through path 8.
したがって、主記憶装置1と比較して、かなり小さい容
量のキャッシュメモリ3には、最も使用頻度の高いデー
タをおいておくのが望ましい。通常キャッシュメモリ3
内において最も新しく使用されたデータは長くキャッシ
ュメモリ3内におけるように、キャッシュメモリ3内の
データの置き換えは最も古くに使用されたデータを主記
憶装置1へ返すように行われる。Therefore, it is desirable to store the most frequently used data in the cache memory 3 having a considerably smaller capacity than the main memory 1. Normal cache memory 3
The data most recently used in the cache memory 3 is long, and the data in the cache memory 3 is replaced so that the oldest used data is returned to the main memory 1.
また、第5図に示すように、このようなキャッシュメモ
リをそれぞれ持つ中央処理装置を複数台結合し主記憶装
置1を共有するマルチプロセッサシステムにおいては、
更に複雑な問題がある。マルチプロセッサシステムで
は、同一の主記憶装置1を共有するので、その主記憶装
置1のコピーであるキャッシュメモリ3a〜3dには、
複数台の中央処理装置2a〜2dに対応した同じ主記憶
装置1のデータのコピーが存在する場合がある。もし、
いずれかの中央処理装置がそのキャッシュメモリの内容
を書き換えた時には、全ての中央処理装置2a〜2d中
のキャッシュメモリ3a〜3dの更新前のデータのコピ
ーは、もはや正しくないので誤って使用しないように無
効なものとする必要がある。これをキャッシュメモリの
無効化という。このキャッシュメモリの無効化は、通常
中央処理装置の書き込みの度毎に発生するものである。Further, as shown in FIG. 5, in a multiprocessor system in which a plurality of central processing units each having such a cache memory are coupled and the main storage device 1 is shared,
There is a more complicated problem. In the multiprocessor system, since the same main storage device 1 is shared, the cache memories 3a to 3d which are copies of the main storage device 1,
There may be a copy of the data in the same main storage device 1 corresponding to a plurality of central processing units 2a to 2d. if,
When one of the central processing units rewrites the contents of its cache memory, the copy of the data before update of the cache memories 3a to 3d in all the central processing units 2a to 2d is no longer correct and should not be used by mistake. It should be invalid. This is called invalidation of cache memory. This invalidation of the cache memory usually occurs each time writing is performed by the central processing unit.
第6図は、マルチプロセッサシステムにおける1つの中
央処理装置2におけるデータのストア動作(書き込み動
作)を表したものである。このフローチャートでは、ス
トア時には、キャッシュヒットした時にも主記憶装置1
への書き込みを行うストアスルー方式を仮定して記述し
ている。第6図において、ステップS1ではあるキャッ
シュメモリにデータがあるか否かを判断し、データがあ
ればステップS3へ移りキャッシュメモリ3にデータを
ストアし、データがなければステップS2へ移り主記憶
装置1にデータをストアする。また、ステップS4では
目的データが他の中央処理装置のキャッシュメモリにあ
るか否かを判断し、目的データがあればステップS6へ
移り他の中央処理装置のキャッシュメモリの内容を無効
化し、目的データがなければステップS5へ移り何の処
理もしない。FIG. 6 shows a data store operation (write operation) in one central processing unit 2 in the multiprocessor system. In this flowchart, the main storage device 1 is stored even when a cache hit occurs at the time of store.
It is described assuming a store-through method for writing to. In FIG. 6, in step S1, it is determined whether or not there is data in a certain cache memory, and if there is data, the process proceeds to step S3 to store the data in the cache memory 3, and if there is no data, the process proceeds to step S2 and the main storage device. Store the data in 1. In step S4, it is determined whether or not the target data is in the cache memory of another central processing unit. If there is the target data, the process proceeds to step S6 to invalidate the contents of the cache memory of the other central processing unit. If there is not, the process proceeds to step S5 and no process is performed.
ここに示すように、データのストアに対しては、キャッ
シュヒットの場合、あるいはキャッシュミスの場合にお
いても別の(他系)中央処理装置のキャッシュメモリの
内容をテストして目的データが他系の中央処理装置にも
あった場合には、そのキャッシュメモリを無効化する必
要がある。As shown here, for the data store, even in the case of a cache hit or a cache miss, the contents of the cache memory of another (other system) central processing unit are tested and the target data is If it is also in the central processing unit, its cache memory must be invalidated.
近年のマルチプロセッサシステムにおいては、従来から
行われている複数のジョブを複数の中央処理装置に割り
当ててシステムとしてのスループットを向上させること
を目的とした並列処理とは異なって、複数台の中央処理
装置が1つのジョブを実行することによって、そのジョ
ブのレスポンスを向上させることを目的とした並列処理
が行われる場合がある。この場合には、主記憶装置の同
じブロックのデータが複数の中央処理装置に分割される
ことがあり、この同じブロックのデータを別の中央処理
装置がアクセスすることが頻繁に起こる。In a recent multiprocessor system, unlike parallel processing which is conventionally performed to allocate a plurality of jobs to a plurality of central processing units to improve the throughput as a system, a plurality of central processing units are used. When the device executes one job, parallel processing may be performed for the purpose of improving the response of the job. In this case, the data of the same block in the main storage device may be divided into a plurality of central processing units, and the data of this same block is frequently accessed by another central processing unit.
例えば、第2図に示すように、あるプログラム中のルー
プを複数台の中央処理装置で並列に処理させようとする
場合には、いわゆる空間的並列性を生かし、そのループ
の繰り返し毎に分割して処理させることが良く行われ
る。第2例では、DOALLという文が並列処理を行う
ことを表し、中央処理装置が4台あることを仮定し、こ
のループ内の4つの式がそれぞれ1台の中央処理装置に
割り当てられることを示している。つまり、ループの繰
り返しを4つに分けて、 中央処理装置2aが第1番目の式の処理である繰り返し
の第1回、5回、9回目、・・・を 中央処理装置2bが第2番目の式の処理である繰り返し
の第2回、6回、10回目、・・・を 中央処理装置2cが第3番目の式の処理である繰り返し
の第3回、7回、11回目、・・・を 中央処理装置2dが第4番目の式の処理である繰り返し
の第4回、8回、12回目、・・・を というように受け持つものとしている。このことは、空
間的に集中しているデータ、例えば、配列Aの要素をあ
えて複数の中央処理装置に分割することになるので、複
数台の中央処理装置2a〜2dのキャッシュメモリ3a
〜3dに配列Aの要素の同一のデータのブロックが存在
する結果となる。この複数のキャッシュメモリ3a〜3
d内のデータの有効性を保つためには、各中央処理装置
でそのデータのブロックへの書き込みが行われる度毎に
書き込みが行われたブロックのアドレスを他系の中央処
理装置へ送り、キャッシュメモリ内にそのアドレスのブ
ロックを持つ中央処理装置の対応するキャッシュメモリ
のブロックのデータを無効化する必要がある。無効化さ
れたブロックを持っていた中央処理装置は、そのブロッ
クを使用したいときには、再度主記憶装置1からその一
部のみが変更されたブロックをアクセスする必要があ
る。第2図の例では、各中央処理装置2a〜2dにおけ
る1つの演算の処理の度毎に、この状況が発生する。そ
のたびに、各中央処理装置2a〜2d内でキャッシュメ
モリ3a〜3d内のデータの無効化と、キャッシュメモ
リ3a〜3dと主記憶装置1間でデータ転送とが行われ
ることになり、マルチプロセッサシステムの性能に多大
な影響を与える。For example, as shown in FIG. 2, when a loop in a program is to be processed in parallel by a plurality of central processing units, so-called spatial parallelism is used, and the loop is divided for each iteration. Is often processed. In the second example, the statement DOALL indicates that parallel processing is performed, it is assumed that there are four central processing units, and it is shown that each of the four expressions in this loop is assigned to one central processing unit. ing. In other words, the loop is divided into four, and the central processing unit 2a performs the first, fifth, ninth, ... The second, the sixth, the tenth, ..., Which is the process of the formula, the central processing unit 2c is the third, the seventh, the eleventh, which is the process of the third formula. The central processing unit 2d is responsible for the fourth, eighth, twelfth, and so on, which is the processing of the fourth equation. This means that data spatially concentrated, for example, the elements of the array A are intentionally divided into a plurality of central processing units, and therefore the cache memories 3a of the plurality of central processing units 2a to 2d.
This results in the presence of the same block of data for the elements of array A in ~ 3d. The plurality of cache memories 3a to 3
In order to maintain the validity of the data in d, the address of the written block is sent to the central processing unit of other system every time the writing of the data to the block is performed by each central processing unit, and the cache is cached. It is necessary to invalidate the data in the corresponding cache memory block of the central processing unit that has the block of that address in memory. When the central processing unit that has the invalidated block wants to use the block, it needs to access the block, a part of which has been changed, from the main memory 1 again. In the example of FIG. 2, this situation occurs every time one arithmetic processing is performed in each of the central processing units 2a to 2d. At each time, invalidation of data in the cache memories 3a to 3d in each of the central processing units 2a to 2d and data transfer between the cache memories 3a to 3d and the main storage device 1 are performed, so that the multiprocessor Significantly affects system performance.
[発明が解決しようとする課題] 従来のキャッシュメモリ制御方式は上述したような動作
を行うので、並列処理を実行するマルチプロセッサシス
テムにおいては各中央処理装置の書き込み処理の1回毎
にキャッシュメモリに対する内容の無効要求が出される
ことになり、その度毎にキャッシュメモリと主記憶装置
間でデータ転送が行われ、したがって処理性能を著しく
低下させるという問題点があった。[Problems to be Solved by the Invention] Since the conventional cache memory control system operates as described above, in a multiprocessor system which executes parallel processing, the cache memory is written to the cache memory at each write processing of each central processing unit. A content invalidation request is issued, and each time data is transferred between the cache memory and the main memory, there is a problem that processing performance is significantly reduced.
この発明は上記のような問題点を解消するためになされ
たもので、書き込み動作を行った中央処理装置がその他
のすべての中央処理装置に対応するキャッシュメモリへ
の無効化を行わずに、処理性能の向上を図ることができ
るキャシュメモリ制御方式を得ることを目的とする。The present invention has been made to solve the above problems, and the central processing unit that has performed the write operation performs processing without invalidating the cache memory corresponding to all the other central processing units. It is an object of the present invention to obtain a cache memory control method capable of improving performance.
[課題を解決するための手段] この発明に係るキャシュメモリ制御方式は、主記憶装置
を共有する複数の中央処理装置のうちで書き込み動作を
行う中央処理装置が、その他のすべての中央処理装置に
対して書き込みデータを転送するとともに、この書き込
みデータを認識手段で並列データ処理が実行されている
ことが示された中央処理装置に対応するキャッシュメモ
リに書き込ませることを特徴とするものである。[Means for Solving the Problems] In the cache memory control system according to the present invention, a central processing unit that performs a write operation among a plurality of central processing units that share a main memory is the same for all other central processing units. The write data is transferred to the cache memory, and the write data is written in the cache memory corresponding to the central processing unit in which the parallel data processing is performed by the recognition means.
[作用] この発明のキャシュメモリ制御方式は、書き込み動作を
行う中央処理装置が、主記憶装置を共有する他のすべて
の中央処理装置にデータの書き込みが行われたアドレス
を送り、同他のすべての中央処理装置に対応するキャシ
ュメモリを無効化する代わりに、同他のすべての中央処
理装置に上記書き込みが行われたデータのアドレスと共
に書き込みデータを転送し、この転送されてきた書き込
みデータを並列データ処理の実行が示された中央処理装
置に対応するキャシュメモリに書き込む。[Operation] In the cache memory control system of the present invention, the central processing unit that performs the write operation sends the address where the data has been written to all the other central processing units that share the main storage device, and all the other operations. Instead of disabling the cache memory corresponding to this central processing unit, the write data is transferred to all the other central processing units together with the address of the written data, and the transferred write data is parallelized. Write to the cache memory corresponding to the central processing unit indicated to perform data processing.
[発明の実施例] 第1図はこの発明の一実施例に係るキャッシュメモリ制
御方式を採用したマルチプロセッサシステムの構成を示
すブロック図である。図において、1はデータ処理に必
要なデータを格納する主記憶装置、2a〜2dは主記憶
装置1を共有しデータ処理に関する演算・制御を行う複
数の中央処理装置(CPU)、3a〜3dは中央処理装
置2a〜2dにそれぞれ対応して設けられ中央処理装置
2a〜2dと主記憶装置1間のデータ転送を高速化する
ための複数のキャッシュメモリ、10は各中央処理装置
2a〜2dが主記憶装置1をアクセスするためのグロー
バルメモリパス、11は各キャッシュメモリ3a〜3d
間で直接にデータ転送を行うための転送手段の機能及び
書き込み動作時にすべての中央処理装置2a〜2dに対
して書き込みデータを放送するデータパス、9a〜9d
は指定された2個以上の中央処理装置によって並列デー
タ処理が実行されているときにその指定された中央処理
装置が複数の中央処理装置2a〜2d群の1つであるこ
とを認識するための認識手段としての並列処理モードフ
ラグである。[Embodiment of the Invention] FIG. 1 is a block diagram showing a configuration of a multiprocessor system adopting a cache memory control system according to an embodiment of the present invention. In the figure, 1 is a main storage device that stores data required for data processing, 2a to 2d are a plurality of central processing units (CPUs) that share the main storage device 1 and perform arithmetic / control related to data processing, and 3a to 3d. A plurality of cache memories 10 provided respectively corresponding to the central processing units 2a to 2d for speeding up data transfer between the central processing units 2a to 2d and the main storage unit 1 are mainly constituted by the central processing units 2a to 2d. A global memory path for accessing the storage device 1, 11 is each cache memory 3a to 3d
And a data path for broadcasting write data to all the central processing units 2a to 2d at the time of a write operation and a function of a transfer means for directly transferring data between them, 9a to 9d
For recognizing that the designated central processing unit is one of the plurality of central processing units 2a to 2d when parallel data processing is being executed by the designated two or more central processing units. It is a parallel processing mode flag as a recognition means.
次に動作について説明する。Next, the operation will be described.
第1図では、4台の中央処理装置2a〜2dを持つマル
チプロセッサシステムを示している。このマルチプロセ
ッサシステムにおいて並列処理を行わせる時、最も単純
で良く行われる方法にプログラムのループの部分を分割
する手法がある。コンパイラなどによって自動的に並列
化することを前提とすると並列化の困難さから分割はこ
の様な単純なものとなることが多い。例えば、第2図に
示すように繰り返し数の多いループを4つに分割して、
DOALL文で示されるように変形する。DOALLと
いう文は並列処理を行うことを表し、このループ内の4
つの式がそれぞれ1台の中央処理装置に割り当てられる
ことを示している。つまり、ループの繰り返しを4つに
分けて、 中央処理装置2aが第1番目の式の処理である繰り返し
の第1回、5回、9回目、・・・を 中央処理装置2bが第2番目の式の処理である繰り返し
の第2回、6回、10回目、・・・を 中央処理装置2cが第3番目の式の処理である繰り返し
の第3回、7回、11回目、・・・を 中央処理装置2dが第4番目の式の処理である繰り返し
の第4回、8回、12回目、・・・を というように受け持つものとしている。FIG. 1 shows a multiprocessor system having four central processing units 2a to 2d. When performing parallel processing in this multiprocessor system, there is a method of dividing the loop part of the program into the simplest and most commonly performed method. Assuming automatic parallelization by a compiler or the like, the division is often such a simple thing because of the difficulty of parallelization. For example, as shown in FIG. 2, divide a loop with a large number of iterations into four,
It is transformed as shown by the DOALL statement. The statement DOALL indicates that parallel processing is performed, and 4 in this loop
It is shown that each of the equations is assigned to one central processing unit. In other words, the loop is divided into four, and the central processing unit 2a performs the first, fifth, ninth, ... The second, the sixth, the tenth, ..., Which is the process of the formula, the central processing unit 2c is the third, the seventh, the eleventh, which is the process of the third formula. The central processing unit 2d is responsible for the fourth, eighth, twelfth, and so on, which is the processing of the fourth equation.
第3図に、この時の各中央処理装置内2a〜2dのキャ
ッシュメモリ3a〜3d内のデータを示している。主記
憶装置1内において配列A1〜A8が同一のブロックに
あるとすると、このブロックは4つの中央処理装置2a
〜2dのすべてに読みだされ、4つの中央処理装置2a
〜2dのすべてがこのブロックへの書き込みを行う。こ
の場合には、中央処理装置2aが配列A1を中央処理装
置2bがその隣接する要素である配列A2を、中央処理
装置2cが更にその隣接要素の配列A3を、そして中央
処理装置2dがその配列A3の隣接要素の配列A4を同
一のブロックにデータをそれぞれ書き込むことになる。
この動作の流れは、この後の継続され常に隣の中央処理
装置が書き込みを行った要素の隣接要素にデータを書き
込むことになる。この時に、各中央処理装置2a〜2d
内の並列処理モードフラグ9a〜9dはすべてオンとな
っていて、すべての中央処理装置2a〜2dが並列処理
のモードであることを示している。これに従って書き込
み動作時には、他系の中央処理装置へデータの書き込み
が行われたアドレスを送り、その他系の中央処理装置の
キャッシュメモリを無効化する代わりに、他系の中央処
理装置へ書き込みが行われたデータのアドレスと共に書
き込みデータをデータパス11からすべての中央処理装
置へ放送する。これによって並列処理モードフラグ9a
〜9dがオンとなっていて、かつ、書き込まれたデータ
を含むブロックを保持している各中央処理装置2a〜2
dが、送られてきた書き込みデータを取り込みキャッシ
ュメモリ3a〜3d内へ実際に書き込むことによってキ
ャッシュメモリ3a〜3dの内容を有効のままに維持で
き無効化の必要はなくなる。FIG. 3 shows data in the cache memories 3a to 3d of the respective central processing units 2a to 2d at this time. Assuming that the arrays A1 to A8 are in the same block in the main memory 1, this block has four central processing units 2a.
~ 2d read out to all four central processing units 2a
All ~ 2d write to this block. In this case, the central processing unit 2a has the array A1, the central processing unit 2b has the array A2 as its adjacent element, the central processing unit 2c has the array A3 of its adjacent elements, and the central processing unit 2d has the array. Data will be written to the same block in the array A4 of adjacent elements of A3.
The flow of this operation is continued thereafter, and data is always written to the adjacent element of the element to which the adjacent central processing unit has written. At this time, the central processing units 2a to 2d
All the parallel processing mode flags 9a to 9d are turned on, indicating that all the central processing units 2a to 2d are in the parallel processing mode. According to this, during a write operation, the address where the data was written is sent to the central processing unit of the other system, and instead of invalidating the cache memory of the central processing unit of the other system, the writing is performed to the central processing unit of the other system. The write data together with the address of the written data is broadcast from the data path 11 to all the central processing units. As a result, the parallel processing mode flag 9a
9d are turned on, and each central processing unit 2a-2 holds a block containing written data.
By fetching the write data that has been sent and actually writing the data into the cache memories 3a to 3d, the contents of the cache memories 3a to 3d can be maintained valid and need not be invalidated.
なお、上記実施例ではマルチプロセッサシステムが並列
処理のモードで動作している時について説明したが、そ
のシステムは通常のモードの実行時においてもある程度
の効果が望まれる。また、実施例では並列処理動作時に
限定してデータのストア時にキャッシュメモリを無効化
する代わりにストアデータ(書き込みデータ)を全中央
処理装置に放送して、並列処理モードフラグがオンの中
央処理装置のキャッシュメモリに書き込むものとしてい
た。これは、通常並列処理動作時には、前述のようにル
ープを分割する場合が多く同一ブロックのデータを複数
の中央処理装置が、共有して使用する可能性が非常に高
いことに着目したものである。ところが、実際のジョブ
の中には、ユーザがプログラム中で明示的に複数台の中
央処理装置を使用することを宣言して処理を行わせる場
合がある。この場合においても、複数の中央処理装置で
データを共有することがあるので、ユーザが複数の中央
処理装置間でデータの同一ブロックをアクセスすること
を認識した上で、ソフトウェア的に使用する中央処理装
置を指定して、指定された中央処理装置においてはキャ
ッシュの無効化を行わずにストアデータを放送するもの
としても目的の効果が得られる。In the above embodiments, the multiprocessor system is described as operating in the parallel processing mode. However, the system is expected to have some effect even when the normal mode is executed. Further, in the embodiment, instead of invalidating the cache memory when storing data only during the parallel processing operation, the store data (write data) is broadcast to all the central processing units, and the parallel processing mode flag is turned on. I was supposed to write to the cache memory. This is because, during normal parallel processing operation, the loop is often divided as described above, and it is very likely that a plurality of central processing units share the same block of data. . However, in an actual job, there are cases where the user explicitly declares to use a plurality of central processing units in the program and causes the processing to be performed. Even in this case, since the data may be shared by the plurality of central processing units, it is necessary to recognize that the user accesses the same block of data among the plurality of central processing units and then use the central processing performed by software. Even if the device is designated and the designated central processing unit broadcasts the store data without invalidating the cache, the intended effect can be obtained.
[発明の効果] 以上のようにこの発明によれば、主記憶装置を共有する
複数の中央処理装置のうちで書き込み動作を行う中央処
理装置が、その他のすべての中央処理装置に対して書き
込みデータを転送するとともに、この書き込みデータを
認識手段で並列データ処理が実行されていることが示さ
れた中央処理装置に対応するキャッシュメモリに書き込
ませるので、書き込み動作ごとのキャシュメモリの無効
化に代替し、認識された中央処理装置に対応するキャッ
シュメモリに書き込みデータが書き込まれ、これにより
キャッシュメモリ内のデータを有効のままに保つことが
でき、キャッシュメモリと主記憶装置間のデータの入れ
換えが少なくなり、したがって処理性能が向上するとい
う効果が得られる。As described above, according to the present invention, the central processing unit that performs the write operation among the plurality of central processing units sharing the main storage device writes the write data to all the other central processing units. The write data is transferred to the cache memory corresponding to the central processing unit in which the parallel data processing is shown to be executed by the recognition means, so that the cache memory is invalidated for each write operation. Write data is written to the cache memory corresponding to the recognized central processing unit, which allows the data in the cache memory to remain valid and reduces the exchange of data between the cache memory and main memory. Therefore, the effect that the processing performance is improved can be obtained.
第1図はこの発明の一実施例に係るキャッシュメモリ制
御方式を採用したマルチプロセッサシステムの構成を示
すブロック図、第2図はこの実施例において並列処理さ
れる典型的なプログラムの例を示す図、第3図はそのプ
ログラムをこの実施例において実行させた時に各中央処
理装置のキャッシュメモリ上にデータがどのように分割
されるかを示す図、第4図は従来のキャッシュメモリ制
御方式の構成を示すブロック図、第5図は従来のキャッ
シュメモリ制御方式を採用したマルチプロセッサシステ
ムの構成を示すブロック図、第6図はこの従来例におけ
るキャッシュメモリの動作を示すフローチャートであ
る。 1……主記憶装置、2a〜2d……中央処理装置、3a
〜3d……キャッシュメモリ、11……データパス(転送
手段)、9a〜9d……並列処理モードフラグ(認識手
段)。FIG. 1 is a block diagram showing the configuration of a multiprocessor system adopting a cache memory control system according to an embodiment of the present invention, and FIG. 2 is a diagram showing an example of a typical program to be processed in parallel in this embodiment. 3 shows how the data is divided in the cache memory of each central processing unit when the program is executed in this embodiment, and FIG. 4 shows the configuration of the conventional cache memory control system. FIG. 5 is a block diagram showing the configuration of a multiprocessor system adopting a conventional cache memory control method, and FIG. 6 is a flowchart showing the operation of the cache memory in this conventional example. 1 ... Main storage device, 2a-2d ... Central processing unit, 3a
.. 3d ... Cache memory, 11 ... Data path (transfer means), 9a to 9d ... Parallel processing mode flag (recognition means).
Claims (1)
憶装置と、この主記憶装置を共有しデータ処理に関する
演算・制御を行う複数の中央処理装置と、この複数の中
央処理装置それぞれに設けられ並列データ処理が実行さ
れていることを示す認識手段と、上記複数の中央処理装
置それぞれに対応して設けられた複数のキャッシュメモ
リとを備え、上記複数の中央処理装置のうちで書き込み
動作を行う中央処理装置がその他のすべての中央処理装
置に対して書き込みデータを転送するとともに、この書
き込みデータを上記認識手段で示された中央処理装置に
対応するキャッシュメモリに書き込ませることを特徴と
するキャッシュメモリ制御方式。1. A main storage device for storing data required for data processing, a plurality of central processing units that share the main storage unit and perform arithmetic operations and control relating to data processing, and each of the plurality of central processing units is provided. And a plurality of cache memories provided corresponding to each of the plurality of central processing units, and a write operation is performed among the plurality of central processing units. A cache characterized in that the executing central processing unit transfers write data to all the other central processing units and writes the write data in the cache memory corresponding to the central processing unit indicated by the recognizing means. Memory control method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63159699A JPH0661065B2 (en) | 1988-06-28 | 1988-06-28 | Cache memory control method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63159699A JPH0661065B2 (en) | 1988-06-28 | 1988-06-28 | Cache memory control method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH028946A JPH028946A (en) | 1990-01-12 |
| JPH0661065B2 true JPH0661065B2 (en) | 1994-08-10 |
Family
ID=15699383
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP63159699A Expired - Lifetime JPH0661065B2 (en) | 1988-06-28 | 1988-06-28 | Cache memory control method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0661065B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2663667B2 (en) * | 1990-03-06 | 1997-10-15 | 日本電気株式会社 | Memory access control device |
| DE69812176T2 (en) | 1997-11-26 | 2004-01-29 | Rohm Co Ltd | THERMAL PRINT HEAD AND RELATED PRODUCTION PROCESS |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS57172582A (en) * | 1981-04-15 | 1982-10-23 | Hitachi Ltd | Cash memory control method |
-
1988
- 1988-06-28 JP JP63159699A patent/JPH0661065B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH028946A (en) | 1990-01-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3849951B2 (en) | Main memory shared multiprocessor | |
| US6816947B1 (en) | System and method for memory arbitration | |
| Censier et al. | A new solution to coherence problems in multicache systems | |
| US5043886A (en) | Load/store with write-intent for write-back caches | |
| US5787480A (en) | Lock-up free data sharing | |
| US7003635B2 (en) | Generalized active inheritance consistency mechanism having linked writes | |
| US7340565B2 (en) | Source request arbitration | |
| EP0514024B1 (en) | Method and apparatus for an improved memory architecture | |
| US20020144061A1 (en) | Vector and scalar data cache for a vector multiprocessor | |
| US20060095673A1 (en) | Mechanism for resolving ambiguous invalidates in a computer system | |
| US7051163B2 (en) | Directory structure permitting efficient write-backs in a shared memory computer system | |
| US6898676B2 (en) | Computer system supporting both dirty-shared and non-dirty-shared data processing entities | |
| US5611070A (en) | Methods and apparatus for performing a write/load cache protocol | |
| US20080098178A1 (en) | Data storage on a switching system coupling multiple processors of a computer system | |
| US7024520B2 (en) | System and method enabling efficient cache line reuse in a computer system | |
| US5293622A (en) | Computer system with input/output cache | |
| US6892290B2 (en) | Linked-list early race resolution mechanism | |
| JP5213485B2 (en) | Data synchronization method and multiprocessor system in multiprocessor system | |
| JPH10501914A (en) | Shared cache memory device | |
| JPH0282330A (en) | Move out system | |
| JP3626609B2 (en) | Multiprocessor system | |
| US6895476B2 (en) | Retry-based late race resolution mechanism for a computer system | |
| KR102476438B1 (en) | Apparatus and method for providing atomic set of data access | |
| JPH0661065B2 (en) | Cache memory control method | |
| US11176039B2 (en) | Cache and method for managing cache |