JPH04302044A - Multiprocessor system - Google Patents

Multiprocessor system

Info

Publication number
JPH04302044A
JPH04302044A JP3066381A JP6638191A JPH04302044A JP H04302044 A JPH04302044 A JP H04302044A JP 3066381 A JP3066381 A JP 3066381A JP 6638191 A JP6638191 A JP 6638191A JP H04302044 A JPH04302044 A JP H04302044A
Authority
JP
Japan
Prior art keywords
cache
address
cache block
word
information
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.)
Granted
Application number
JP3066381A
Other languages
Japanese (ja)
Other versions
JP3226557B2 (en
Inventor
Tetsuo Hasegawa
哲夫 長谷川
Keiko Nagase
永瀬 恵子
Asako Kitamura
北村 麻子
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP06638191A priority Critical patent/JP3226557B2/en
Publication of JPH04302044A publication Critical patent/JPH04302044A/en
Application granted granted Critical
Publication of JP3226557B2 publication Critical patent/JP3226557B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PURPOSE:To improve a hit rate, and to shorten a retrieving time by using continuous (n) words as a cache block. CONSTITUTION:A first information table 21 which registers information at each cache block constituted of the continuous (n) words, has an address 211 of the cache block in cache memories 16a and 16b, and information 212 indicating the validity/invalidity of the cache block. A second information table 22 which registers information and data at each word, has information 221 indicating the occupancy/sharing and validity/invalidity of the word, and data 222 of the word. Then, the original valid data can be prevented from being handled as the invalid one, or an invalidation signal can be prevented from being transmitted at the time of writing the previously occupied data. Thus, the hit rate can be improved, and the retrieving time can be shortened.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】[発明の目的][Object of the invention]

【0002】0002

【産業上の利用分野】本発明は、共有メモリのキャッシ
ュ装置を持つ複数のプロセッサをバスを通じて接続して
なるマルチプロセッサシステムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a multiprocessor system in which a plurality of processors each having a shared memory cache device are connected through a bus.

【0003】0003

【従来の技術】マルチプロセッサシステムにおいて、共
有メモリのアクセスは共通のバスを通して行われる。こ
のバスは一度に1つのプロセッサしか使用できないこと
から、複数のプロセッサが同時に共有メモリをアクセス
しようとした時に、あるプロセッサがアクセスを待たさ
れる(アクセスの衝突)といった事態が起こる。これを
避けるために、プロセッサ毎にキャッシュ装置を設け、
共有メモリの内容をキャッシュ装置内のメモリに複写す
ることで、プロセッサによるメモリアクセスをキャッシ
ュ装置へのアクセスのみに止めてバスへのアクセスを抑
制することが行われる。この場合、複数のキャッシュ装
置に同一のアドレスの内容が保持される可能性があり、
これら同一アドレスの内容の一貫性を保持する必要があ
る。そこでキャッシュ装置内のメモリを複数のエリア(
キャッシュ単位)に分け、このキャッシュ単位毎に占有
か共有か、または有効か無効かの状態を保持し、占有状
態以外の状態のキャッシュ単位内のアドレスにwrit
e が行われた時はこのキャッシュ単位を占有状態にし
、かつ同一アドレスを含む他のプロセッサのキャッシュ
単位を無効にする命令をバス経由で伝達し、これらを無
効状態にするwrite−invalid型と呼ばれる
手法や、あるプロセッサのキャッシュにwrite が
行われた時に他のプロセッサのキャッシュにwrite
 内容をバス経由で伝達し、同一アドレスを含む部分を
更新するwrite−update型と呼ばれる手法な
どが用いられている。
BACKGROUND OF THE INVENTION In multiprocessor systems, access to shared memory is accomplished through a common bus. Since this bus can only be used by one processor at a time, when multiple processors attempt to access the shared memory at the same time, a situation may occur in which one processor is forced to wait for access (an access conflict). To avoid this, a cache device is provided for each processor,
By copying the contents of the shared memory to the memory within the cache device, memory accesses by the processor are limited to accesses to the cache device and accesses to the bus are suppressed. In this case, the contents of the same address may be held in multiple cache devices,
It is necessary to maintain the consistency of the contents of these same addresses. Therefore, the memory in the cache device is divided into multiple areas (
Each cache unit is divided into cache units), and the state of whether it is occupied or shared, or whether it is valid or invalid, is maintained for each cache unit.
When e is executed, this cache unit is occupied, and an instruction to invalidate the cache units of other processors containing the same address is transmitted via the bus, making them invalid. This is called a write-invalid type. When a write is performed to the cache of one processor, a write is performed to the cache of another processor.
A method called a write-update type is used, in which content is transmitted via a bus and parts containing the same address are updated.

【0004】このとき、プログラムのリードや連続アド
レスに割り当てられたデータの初期化時などにおいては
、あるアドレスのアクセス後、後続のアドレスへのアク
セスが行われる可能性が高い。このことから、キャッシ
ュブロックサイズが大きく、1キャッシュブロック内に
連続する複数ワードを含む方が、ヒット率が向上し、ア
クセス効率が高まる。
At this time, when reading a program or initializing data assigned to consecutive addresses, there is a high possibility that after accessing a certain address, the subsequent address will be accessed. From this, the hit rate improves and the access efficiency increases when the cache block size is large and one cache block includes a plurality of consecutive words.

【0005】しかしながら、複数のプロセッサが同一ブ
ロック内の別ワードへ頻繁にアクセスする場合、あるプ
ロセッサがデータをwrite する度に他プロセッサ
の対応するキャッシュブロック全体が無効となってしま
い、該ワード自身は有効であるにも拘らず無効となって
しまう。また、キャッシュブロックを小さくすると、キ
ャッシュブロックの情報であるアドレスや、状態を格納
する領域の増大、あるいは連続領域へのアクセス時の効
率低下の問題なども生じる。
However, when multiple processors frequently access different words in the same block, each time one processor writes data, the entire corresponding cache block of the other processors becomes invalid, and the word itself becomes invalid. Even though it is valid, it becomes invalid. Furthermore, if the cache block is made smaller, problems such as an increase in the area for storing cache block information such as addresses and states, and a decrease in efficiency when accessing continuous areas arise.

【0006】このため、従来は、キャッシュブロックを
アクセスの単位であるワードなどのように小さくし、キ
ャッシュ装置にないアドレスをリードしたときに、共有
メモリとキャッシュ装置との間にある数ワード分のバッ
ファから連続の数ワードを読み込み、以降のリードで、
目的のデータがこのバッファにある場合には主メモリま
で読みに行かずにこのバッファからリードすることによ
り、バスへのアクセスを減らしバッファを含めてのヒッ
ト率を高める、などの手法がとられてきた。
[0006] Conventionally, therefore, a cache block is made small, such as a word, which is the unit of access, and when an address that is not in the cache device is read, several words worth of space between the shared memory and the cache device are used. Read successive words from the buffer, and on subsequent reads,
If the desired data is in this buffer, methods have been used to read from this buffer without going to main memory to read it, thereby reducing access to the bus and increasing the hit rate including the buffer. Ta.

【0007】[0007]

【発明が解決しようとする課題】しかし、この手法でも
、キャッシュブロックの情報の増大、検索時間の増加、
と言った問題は解決されず、さらにバッファ内データの
有効/無効を保証する処理などが増えてしまうと言う問
題があった。
[Problems to be Solved by the Invention] However, even with this method, there is an increase in cache block information, an increase in search time,
These problems are not solved, and there is also the problem that processing to guarantee the validity/invalidity of data in the buffer increases.

【0008】本発明はこのような事情に対処してなされ
たもので、ヒット率の向上、検索時間の短縮を図ると同
時に、本来有効なデータを無効にしてしまうような事態
を阻止することのできるマルチプロセッサシステムの提
供を目的としている。
[0008] The present invention has been developed in response to these circumstances, and at the same time aims to improve the hit rate and shorten search time, and at the same time, prevents the situation where originally valid data is invalidated. The purpose is to provide a multiprocessor system that can.

【0009】[発明の構成][Configuration of the invention]

【0010】0010

【課題を解決するための手段】本発明のマルチプロセッ
サシステムは、上記した目的を達成するために、バスに
、共有メモリと、前記共有メモリのキャッシュ装置を有
する複数のプロセッサとを接続して構成されるマルチプ
ロセッサシステムにおいて、前記プロセッサのキャッシ
ュ装置が、連続nワードからなるキャッシュブロックご
とに、該キャッシュブロック内のワードがすべて有効で
あるか否かの情報を保持する手段と、前記キャッシュブ
ロック内のワードごとに、該キャッシュブロック内のワ
ードがすべて有効であるときは該ワードが占有か共有か
の情報、該キャッシュブロック内のワードがすべては有
効でないときは該ワードが有効か無効かの情報を保持す
る手段とを有することを特徴としている。
[Means for Solving the Problems] In order to achieve the above object, a multiprocessor system of the present invention is configured by connecting a shared memory and a plurality of processors each having a cache device for the shared memory to a bus. In the multiprocessor system, the cache device of the processor includes means for holding, for each cache block consisting of n consecutive words, information as to whether or not all the words in the cache block are valid; For each word in the cache block, if all the words in the cache block are valid, information on whether the word is exclusive or shared; if not all the words in the cache block are valid, information on whether the word is valid or invalid. It is characterized by having a means for holding.

【0011】[0011]

【作用】本発明では、連続nワードをキャッシュブロッ
クとすることにより、ヒット率の向上、検索時間の短縮
を図り、さらに、キャッシュブロックごとの、キャッシ
ュブロック内のワードがすべて有効であるか否かを示す
情報と、ワードごとの、キャッシュブロック内のワード
がすべて有効である場合の占有か共有を示す情報若しく
はキャッシュブロック内のワードがすべてが有効でない
場合の有効か無効かを示す情報を持つことにより、本来
有効なデータが無効として扱われたり、既に占有となっ
ているデータのライト時に無効化信号を送出したりする
ことを避けることができる。
[Operation] In the present invention, by using n consecutive words as a cache block, it is possible to improve the hit rate and shorten the search time. and information indicating for each word whether it is occupied or shared when all the words in the cache block are valid, or whether it is valid or invalid when all the words in the cache block are not valid. This makes it possible to avoid treating originally valid data as invalid or sending an invalidation signal when writing data that is already occupied.

【0012】0012

【実施例】以下、本発明の実施例の詳細を図面に基づい
て説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, details of embodiments of the present invention will be explained based on the drawings.

【0013】図1は本発明に係る一実施例のマルチプロ
セッサシステムの構成を示すブロック図である。同図に
示すように、このマルチプロセッサシステムは複数のプ
ロセッサ11a、11bと共有メモリ12とをそれぞれ
共通のバス13を通じ接続して構成されている。但し、
各プロセッサ11a、11bは、それぞれ共有メモリ1
2の内容を複写し保持するキャッシュ装置14a、14
bを介してバス13に接続されている。各キャッシュ装
置14a、14bは、それぞれキャッシュコントローラ
15a、15bとキャッシュメモリ16a、16bとか
ら構成されている。
FIG. 1 is a block diagram showing the configuration of a multiprocessor system according to an embodiment of the present invention. As shown in the figure, this multiprocessor system is constructed by connecting a plurality of processors 11a, 11b and a shared memory 12 through a common bus 13, respectively. however,
Each processor 11a, 11b has a shared memory 1
Cache devices 14a, 14 that copy and hold the contents of 2.
It is connected to bus 13 via b. Each cache device 14a, 14b is composed of a cache controller 15a, 15b and a cache memory 16a, 16b, respectively.

【0014】また、各キャッシュ装置14a、14bの
キャッシュコントローラ15a、15bは、図2に示す
ように、連続nワードからなるキャッシュブロックごと
の情報を登録する第1の情報テーブル21と、ワードご
との情報およびデータを登録する第2の情報テーブル2
2とを管理している。第1の情報テーブル21は、キャ
ッシュメモリ16a、16b内のキャッシュブロックの
アドレス211とそのキャッシュブロックの有効/無効
を示す情報212とからなっている。また第2の情報テ
ーブル22は、ワードの占有/共有を示す情報および有
効/無効を示す情報221と、そのワードのデータ22
2とからなっている。
Further, as shown in FIG. 2, the cache controllers 15a and 15b of each cache device 14a and 14b have a first information table 21 for registering information for each cache block consisting of n consecutive words, and a first information table 21 for registering information for each cache block consisting of n consecutive words. Second information table 2 for registering information and data
2. The first information table 21 includes addresses 211 of cache blocks in the cache memories 16a and 16b and information 212 indicating validity/invalidity of the cache blocks. The second information table 22 also includes information 221 indicating occupancy/sharing of a word, information 221 indicating validity/invalidity, and data 22 of the word.
It consists of 2.

【0015】次に、本実施例のマルチプロセッサシステ
ムにおいて、図3に示すアクセスパターンで各プロセッ
サ11a、11bによるアクセス(write操作また
はread操作)が行われた場合の各キャッシュ装置1
4a、14bの動作を説明する。
Next, in the multiprocessor system of this embodiment, each cache device 1 when access (write operation or read operation) is performed by each processor 11a, 11b according to the access pattern shown in FIG.
The operations of 4a and 14b will be explained.

【0016】尚、図4は各プロセッサ11a、11bの
各情報テーブル21、22の初期状態を示している。
Incidentally, FIG. 4 shows the initial state of each information table 21, 22 of each processor 11a, 11b.

【0017】まず図3のステップ1において、プロセッ
サ11aでアドレス100に対するreadアクセスが
発生すると、図5に示すように、まずプロセッサ11a
からreadアクセスを受けたキャッシュコントローラ
15aは、そのreadアドレスを含むキャッシュブロ
ックがキャッシュメモリ16aに存在するかを第1の情
報テーブル21を参照して調べる(ステップ501)。 すると、当該アドレス100を含むキャッシュブロック
の先頭アドレスである100は第1の情報テーブル21
に登録されていないので、アドレス100から始まるキ
ャッシュブロック分のデータをブロックリードしてこれ
を登録する(ステップ509)。ここで、キャッシュブ
ロックの先頭アドレスは(アクセスするワードのアドレ
ス)−(ワードのアドレス modキャッシュブロック
サイズ)で決まる。次にこのキャッシュブロック全体を
有効とし(ステップ510)、全ワードを共有とする(
ステップ511)。最後にプロセッサ11aにこのワー
ドのデータを渡す(ステップ508)。
First, in step 1 of FIG. 3, when a read access to address 100 occurs in the processor 11a, as shown in FIG.
The cache controller 15a, which has received a read access from , refers to the first information table 21 to check whether a cache block including the read address exists in the cache memory 16a (step 501). Then, 100, which is the start address of the cache block including the address 100, is stored in the first information table 21.
Since it is not registered in the cache block, the cache block data starting from address 100 is read and registered (step 509). Here, the start address of the cache block is determined by (address of word to be accessed) - (address of word mod cache block size). This entire cache block is then validated (step 510) and all words are shared (
Step 511). Finally, the data of this word is passed to the processor 11a (step 508).

【0018】一方、ブロックリードと共に出されたre
ad信号を検出したキャッシュコントローラ15aは、
図6に示すように、第1の情報テーブル21にアドレス
100を含むキャッシュブロックが登録されているかを
調べる(ステップ601)。この場合、該当ブロックは
存在しないので何もしない。これにより、各情報テーブ
ル21、22は、図7に示すような内容に更新される。
On the other hand, the re issued with the block read
The cache controller 15a that detected the ad signal,
As shown in FIG. 6, it is checked whether a cache block including address 100 is registered in the first information table 21 (step 601). In this case, since the corresponding block does not exist, nothing is done. As a result, each of the information tables 21 and 22 is updated to the contents shown in FIG.

【0019】次に、図3のステップ2において、プロセ
ッサ11aでアドレス101に対するreadアクセス
が発生すると、プロセッサ11aからreadアクセス
を受けたキャッシュコントローラ15aは、ステップ1
の場合同様、図5に示すように、readアドレス10
1を含むキャッシュブロックがキャッシュメモリ16a
に存在するかを調べる(ステップ501)。この場合、
該当するキャッシュブロックが存在し、しかもこのキャ
ッシュブロック全体が有効であるので(ステップ502
)、キャッシュメモリ16aに存在するread  ア
ドレス101のデータをプロセッサ11aに渡す(ステ
ップ508)。このステップでは、各情報テーブル21
、22に変化はない。
Next, in step 2 of FIG. 3, when a read access to address 101 occurs in the processor 11a, the cache controller 15a that has received the read access from the processor 11a performs step 1.
Similarly, as shown in FIG.
The cache block containing 1 is the cache memory 16a.
It is checked whether it exists (step 501). in this case,
Since the corresponding cache block exists and the entire cache block is valid (step 502
), the data at the read address 101 existing in the cache memory 16a is passed to the processor 11a (step 508). In this step, each information table 21
, 22 remain unchanged.

【0020】次に図3のステップ3において、プロセッ
サ11bでアドレス100に対するreadアクセスが
発生すると、プロセッサ11bからreadアクセスを
受けたキャッシュコントローラ15bは、ステップ1の
場合と同様、図5に示すように、readアドレス10
0を含むキャッシュブロックがキャッシュメモリ16b
に存在しないことを判定して(ステップ501)、アド
レス100から始まるキャッシュブロック分のデータを
ブロックリードし、これを登録する(ステップ509)
。そしてこのキャッシュブロック全体を有効とし(ステ
ップ510)、全ワードを共有とする(ステップ511
)。最後にプロセッサ11bにこのワードのデータを渡
す(ステップ508)。
Next, in step 3 of FIG. 3, when a read access to address 100 occurs in the processor 11b, the cache controller 15b that received the read access from the processor 11b performs the following steps as shown in FIG. , read address 10
The cache block containing 0 is the cache memory 16b.
It is determined that the cache block does not exist at address 100 (step 501), the data for the cache block starting from address 100 is block read, and this is registered (step 509).
. Then, this entire cache block is made valid (step 510), and all words are shared (step 511).
). Finally, the data of this word is passed to the processor 11b (step 508).

【0021】一方、ブロックリードと共に出されたre
ad信号を検出したキャッシュコントローラ15aは、
図6に示すように、第1の情報テーブル21にアドレス
100を含むキャッシュブロックが登録されていること
(ステップ601)、該キャッシュブロック全体が有効
であることを確認したものの(ステップ602)、該ワ
ード(アドレス100)が占有でないため(ステップ6
03)、この場合は何の処理も行わない。この結果、各
情報テーブル21、22の内容は、図8に示すように更
新される。
On the other hand, the re issued with the block read
The cache controller 15a that detected the ad signal,
As shown in FIG. 6, although it has been confirmed that a cache block including address 100 is registered in the first information table 21 (step 601) and that the entire cache block is valid (step 602), Because the word (address 100) is not occupied (step 6
03), no processing is performed in this case. As a result, the contents of each information table 21, 22 are updated as shown in FIG.

【0022】図3のステップ4から8は、ステップ2と
まったく同様に処理が行われ、各情報テーブル21、2
2の内容には変化はない。
Steps 4 to 8 in FIG. 3 are processed in exactly the same way as step 2, and each information table 21, 2
There is no change in the contents of 2.

【0023】次のステップ9についてもステップ1と同
様に処理が行われ、その結果、各情報テーブル21、2
2の内容は、図9に示すように更新される。
The next step 9 is also processed in the same way as step 1, and as a result, each information table 21, 2
The contents of 2 are updated as shown in FIG.

【0024】さらにステップ10はステップ3と同様に
処理が行われ、その結果、各情報テーブル21、22の
内容は、図10に示すように更新される。
Further, in step 10, the same processing as in step 3 is performed, and as a result, the contents of each information table 21, 22 are updated as shown in FIG.

【0025】次に図3のステップ11において、プロセ
ッサ11aでアドレス100に対するwrite アク
セスが発生すると、プロセッサ11aからwrite 
アクセスを受けたキャッシュコントローラ15aは、図
11に示すように、write アドレス100を含む
キャッシュブロックがキャッシュメモリ16aに存在し
(ステップ1101)、さらに該キャッシュブロック全
体が有効であることを判定するものの(ステップ110
2)、アドレス100の該ワードが占有でないため(ス
テップ1106)、アドレス100に対して無効化信号
をバス13に送出し(ステップ1107)、該ワードを
占有とする(ステップ1108)。最後にキャッシュメ
モリ16aの該当ワード部分をプロセッサ11aから渡
されたデータで更新する(ステップ1109)。
Next, in step 11 of FIG. 3, when a write access to address 100 occurs in the processor 11a, a write access is issued from the processor 11a.
The cache controller 15a that received the access determines that the cache block including the write address 100 exists in the cache memory 16a (step 1101) and that the entire cache block is valid, as shown in FIG. Step 110
2) Since the word at address 100 is not occupied (step 1106), an invalidation signal is sent to the bus 13 for address 100 (step 1107), and the word is made occupied (step 1108). Finally, the corresponding word portion of the cache memory 16a is updated with the data passed from the processor 11a (step 1109).

【0026】一方、バス13より無効化信号を検出した
キャッシュコントローラ15bは、図12に示すように
、第1の情報テーブル21にアドレス100を含むキャ
ッシュブロックが登録されていること(ステップ120
1)、さらに該キャッシュブロック全体が有効であるこ
とを確認して(ステップ1202)、該キャッシュブロ
ックの全ワードは有効でないものとし(ステップ120
3)、該ワード(アドレス100)を無効として、他の
ワード(アドレス101、102、103)を有効にす
る(ステップ1204)。この結果、各情報テーブル2
1、22は、図13に示すように更新される。
On the other hand, the cache controller 15b that has detected the invalidation signal from the bus 13 checks that the cache block containing the address 100 is registered in the first information table 21 (step 120), as shown in FIG.
1), further confirming that the entire cache block is valid (step 1202), and assuming that all words of the cache block are not valid (step 120).
3) Disable the word (address 100) and enable the other words (addresses 101, 102, 103) (step 1204). As a result, each information table 2
1 and 22 are updated as shown in FIG.

【0027】次に図3のステップ12において、プロセ
ッサ11bでアドレス101に対するreadアクセス
が発生すると、これを受けたキャッシュコントローラ1
5bは、図5に示すように、readアドレス101を
含むアドレス100からキャッシュブロックがキャッシ
ュメモリ16aに存在し(ステップ501)、このキャ
ッシュブロック全体が有効ではないものの(ステップ5
02)、アドレス101のワードは有効であるので(ス
テップ503)、キャッシュメモリ16aに存在するr
eadアドレス101のデータをプロセッサ11bに渡
す(ステップ508)。このステップでは各情報テーブ
ル21、22に変化はない。
Next, in step 12 of FIG. 3, when a read access to the address 101 occurs in the processor 11b, the cache controller 1 that received the read access
5b, as shown in FIG. 5, a cache block exists in the cache memory 16a from address 100 including read address 101 (step 501), and although this entire cache block is not valid (step 5
02), the word at address 101 is valid (step 503), so the word r existing in the cache memory 16a
The data at the ead address 101 is passed to the processor 11b (step 508). In this step, there is no change in each information table 21, 22.

【0028】この後、図3のステップ13において、同
じくプロセッサ11bでアドレス101に対するwri
te アクセスが発生すると、これを受けたキャッシュ
コントローラ15bは、図11に示すように、writ
e アドレス101を含むキャッシュブロックがキャッ
シュメモリ16bに存在するものの(ステップ1101
)、該キャッシュ全体が有効ではないので(ステップ1
102)、キャッシュブロック内の無効ワードであるア
ドレス100のワードをリードする(ステップ1103
)。そしてアドレス101に対して無効化信号を送出し
(ステップ1104)、アドレス101のワードを占有
にして他のアドレス100、102、103のワードを
共有にする(ステップ1105)。そして最後にキャッ
シュメモリ16bの該当ワード部分をプロセッサ11b
から渡されたデータで更新する(ステップ1109)。
After this, in step 13 of FIG. 3, the processor 11b also executes wri for address 101.
When a te access occurs, the cache controller 15b that receives it performs a write access, as shown in FIG.
Although the cache block containing address 101 exists in the cache memory 16b (step 1101
), the entire cache is not valid (step 1
102), reads the word at address 100, which is an invalid word in the cache block (step 1103).
). Then, an invalidation signal is sent to address 101 (step 1104), and the word of address 101 is occupied and the words of other addresses 100, 102, and 103 are shared (step 1105). Finally, the corresponding word portion of the cache memory 16b is transferred to the processor 11b.
It is updated with the data passed from (step 1109).

【0029】一方、無効化信号を検出したキャッシュコ
ントローラ15aは、図12に示すように、第1の情報
テーブル21にアドレス101を含むキャッシュブロッ
クが登録され(ステップ1201)、さらに該キャッシ
ュブロック全体が有効であることを確認して(ステップ
1202)、該キャッシュブロックを全ワードは有効で
ないものとし(ステップ1203)、該ワード(アドレ
ス101)を無効にして、他のワード(アドレス100
,102,103)を有効にする(ステップ1204)
。この結果、情報テーブル21、22は、図14に示す
ような内容に更新される。
On the other hand, the cache controller 15a that has detected the invalidation signal registers the cache block including the address 101 in the first information table 21 (step 1201), as shown in FIG. After confirming that the cache block is valid (step 1202), all words in the cache block are considered invalid (step 1203), the word (address 101) is invalidated, and the other words (address 100) are invalidated.
, 102, 103) (step 1204)
. As a result, the information tables 21 and 22 are updated to the contents shown in FIG. 14.

【0030】図3のステップ14は、ステップ12とま
ったく同様に自プロセッサ11aのキャッシュメモリ1
6aからリードされる。
Step 14 in FIG. 3 is the same as step 12, in which the cache memory 1 of the own processor 11a is
Read from 6a.

【0031】図3のステップ15において、プロセッサ
11bでアドレス102に対するwrite アクセス
が発生すると、これを受けたキャッシュコントローラ1
5bは、図11に示すように、write アドレス1
02を含むキャッシュブロックがキャッシュメモリ16
bに存在し(ステップ1101)、しかも該キャッシュ
ブロック全体が有効であるものの(ステップ1102)
、該アドレス102のワードが共有なので(ステップ1
106)、アドレス102に対して無効化信号を送出し
(ステップ1107)、このワードを占有にして(ステ
ップ1108)、キャッシュメモリ16bの該当ワード
部分をプロセッサ11bから渡されたデータで更新する
(ステップ1109)。
In step 15 of FIG. 3, when a write access to the address 102 occurs in the processor 11b, the cache controller 1 that received the write access
5b, as shown in FIG. 11, write address 1
The cache block containing 02 is cache memory 16
b (step 1101), and the entire cache block is valid (step 1102).
, since the word at address 102 is shared (step 1
106), sends an invalidation signal to the address 102 (step 1107), makes this word exclusive (step 1108), and updates the corresponding word portion of the cache memory 16b with the data passed from the processor 11b (step 1109).

【0032】一方、無効化信号を検出したキャッシュコ
ントローラ15aは、図12に示すように、第1の情報
テーブル21にアドレス102を含むキャッシュブロッ
クが登録されているものの(ステップ1201)、該キ
ャッシュブロック全体が有効でないので(ステップ12
02)、該ワード(アドレス102)を無効にする(ス
テップ1205)。この結果、情報テーブル21、22
の内容は、図15に示すように更新される。
On the other hand, as shown in FIG. 12, the cache controller 15a detecting the invalidation signal registers the cache block including the address 102 in the first information table 21 (step 1201). Since the whole is not valid (step 12
02), invalidate the word (address 102) (step 1205). As a result, information tables 21 and 22
The contents of are updated as shown in FIG.

【0033】次に図3のステップ16において、プロセ
ッサ11aでアドレス101に対するreadアクセス
が発生すると、これを受けたキャッシュコントローラ1
5aは、図5に示すように、read  アドレス10
1を含むキャッシュブロックがキャッシュメモリ16a
に存在するものの(ステップ501)、このキャッシュ
ブロック全体が有効ではなく(ステップ502)、アド
レス101のワードが無効であるので(ステップ503
)、該アドレス101のワードをリードすると共にre
ad信号を送出し(ステップ504)、該ワードを有効
とする(ステップ505)。ところが、この段階でこの
ワードを含むアドレス100から始まるキャッシュブロ
ックの全ワードが有効にはなっていないので、キャッシ
ュブロックの情報の全体は有効でないままとする(ステ
ップ506)。 最後にリードしたデータをプロセッサ11aに渡す(ス
テップ508)。
Next, in step 16 of FIG. 3, when a read access to the address 101 occurs in the processor 11a, the cache controller 1 that received the read access
5a is the read address 10 as shown in FIG.
The cache block containing 1 is the cache memory 16a.
(step 501), but this entire cache block is not valid (step 502) and the word at address 101 is invalid (step 503).
), reads the word at address 101 and re
An ad signal is sent (step 504), and the word is made valid (step 505). However, at this stage, all the words in the cache block starting from address 100 including this word are not valid, so the entire information in the cache block remains invalid (step 506). The last read data is passed to the processor 11a (step 508).

【0034】一方、リードと共に出されたread信号
を検出したキャッシュコントーラ15bは、図6に示す
ように、第1の情報テーブル21にアドレス101を含
むキャッシュブロックが登録され(ステップ601)、
該キャッシュブロック全体が有効で(ステップ602)
、しかも該ワード(アドレス101)が占有なので(ス
テップ603)、該ワードを共有とする(ステップ60
4)。この結果、情報テーブルの内容は、図16に示す
ように更新される。
On the other hand, the cache controller 15b detecting the read signal issued with the read registers the cache block including the address 101 in the first information table 21 (step 601), as shown in FIG.
The entire cache block is valid (step 602).
, and since the word (address 101) is occupied (step 603), the word is shared (step 60).
4). As a result, the contents of the information table are updated as shown in FIG.

【0035】図17は本実施例によるバスへの操作を、
従来のwrite−invalid 方式(従来方式1
)、およびキャッシュブロックサイズを1ワードとして
4バイトの入力バッファを設けた従来方式2とそれぞれ
比較して示す図である。
FIG. 17 shows the operations on the bus according to this embodiment.
Conventional write-invalid method (conventional method 1
) and Conventional Method 2 in which a 4-byte input buffer is provided with a cache block size of 1 word.

【0036】これによると、従来方式1の場合、ステッ
プ12、14などで本来は有効なワードが無効と判断さ
れ、不要なブロックリードが生じてしまうのに対し、本
実施例の場合はこのような事態を避けられるため、バス
へのアクセスが減ってマルチプロセッサシステム全体の
効率を高めることができる。また従来方式2は、バスの
使用などは本実施例の場合と同等であるが、キャッシュ
ブロックが小さいために、あるアドレスのデータがどの
キャッシュブロックに格納されているかを検索する時間
が増加し、バッファの追加によるハードウェアの複雑化
やブロックの情報量の増加といった問題が生じる。
According to this, in the case of conventional method 1, originally valid words are determined to be invalid in steps 12, 14, etc., and unnecessary block reads occur, whereas in the case of the present embodiment, such words are determined to be invalid. This reduces the number of bus accesses and increases the overall efficiency of the multiprocessor system. Furthermore, in Conventional Method 2, the use of the bus is the same as in this embodiment, but since the cache block is small, the time required to search for which cache block stores data at a certain address increases. Problems arise such as the addition of buffers increases the complexity of the hardware and increases the amount of information in blocks.

【0037】[0037]

【発明の効果】以上説明したように本発明によれば、連
続nワードをキャッシュブロックとすることにより、ヒ
ット率の向上、検索時間の短縮を図れる。また、本来有
効なデータが無効として扱われたり、既に占有となって
いるデータのライト時に無効化信号を送出したりするこ
とを避けることができる。
As described above, according to the present invention, by using n consecutive words as a cache block, it is possible to improve the hit rate and shorten the search time. Furthermore, it is possible to avoid treating originally valid data as invalid or sending an invalidation signal when writing data that is already occupied.

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

【図1】本発明に係る一実施例のマルチプロセッサシス
テムの構成を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of a multiprocessor system according to an embodiment of the present invention.

【図2】図1におけるキャッシュ装置が保持する第1お
よび第2の情報テーブルの構造を示す図である。
FIG. 2 is a diagram showing the structure of first and second information tables held by the cache device in FIG. 1;

【図3】本実施例のマルチプロセッサシステムにおける
各プロセッサ間でのアクセスパターンの例を示す図であ
る。
FIG. 3 is a diagram showing an example of an access pattern between processors in the multiprocessor system of this embodiment.

【図4】図2の各情報テーブルの初期状態を示す図であ
る。
FIG. 4 is a diagram showing the initial state of each information table in FIG. 2;

【図5】プロセッサのワードリード時の処理の流れを示
すフローチャートである。
FIG. 5 is a flowchart showing the flow of processing when a processor reads a word.

【図6】プロセッサのリード信号検出時の処理の流れを
示すフローチャートである。
FIG. 6 is a flowchart showing the flow of processing when a processor detects a read signal.

【図7】図3におけるステップ1実行後の各情報テーブ
ルの内容を示す図である。
7 is a diagram showing the contents of each information table after step 1 in FIG. 3 is executed; FIG.

【図8】ステップ3実行後の各情報テーブルの内容を示
す図である。
FIG. 8 is a diagram showing the contents of each information table after step 3 is executed.

【図9】ステップ9実行後の各情報テーブルの内容を示
す図である。
FIG. 9 is a diagram showing the contents of each information table after step 9 is executed.

【図10】ステップ10実行後の各情報テーブルの内容
を示す図である。
FIG. 10 is a diagram showing the contents of each information table after step 10 is executed.

【図11】プロセッサのワードライト時の処理の流れを
示すフローチャートである。
FIG. 11 is a flowchart showing the flow of processing during word write by the processor.

【図12】プロセッサの無効化信号検出時の処理の流れ
を示すフローチャートである。
FIG. 12 is a flowchart showing the flow of processing when a processor detects an invalidation signal.

【図13】ステップ11実行後の各情報テーブルの内容
を示す図である。
FIG. 13 is a diagram showing the contents of each information table after step 11 is executed.

【図14】ステップ13実行後の各情報テーブルの内容
を示す図である。
FIG. 14 is a diagram showing the contents of each information table after step 13 is executed.

【図15】ステップ15実行後の各情報テーブルの内容
を示す図である。
FIG. 15 is a diagram showing the contents of each information table after step 15 is executed.

【図16】ステップ16実行後の各情報テーブルの内容
を示す図である。
FIG. 16 is a diagram showing the contents of each information table after step 16 is executed.

【図17】本実施例によるバスへの操作を従来方式と比
較して示す図である。
FIG. 17 is a diagram illustrating operations on a bus according to this embodiment in comparison with a conventional method.

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

11a、11b……プロセッサ 12……共有メモリ 13……バス 14a、14b……キャッシュ装置 15a、15b……キャッシュコントローラ16a、1
6b……キャッシュメモリ
11a, 11b... Processor 12... Shared memory 13... Buses 14a, 14b... Cache devices 15a, 15b... Cache controllers 16a, 1
6b...Cache memory

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  バスに、共有メモリと、前記共有メモ
リのキャッシュ装置を有する複数のプロセッサとを接続
して構成されるマルチプロセッサシステムにおいて、前
記プロセッサのキャッシュ装置が、連続nワードからな
るキャッシュブロックごとに、該キャッシュブロック内
のワードがすべて有効であるか否かの情報を保持する手
段と、前記キャッシュブロック内のワードごとに、該キ
ャッシュブロック内のワードがすべて有効であるときは
該ワードが占有か共有かの情報を、該キャッシュブロッ
ク内のワードがすべては有効でないときは該ワードが有
効か無効かの情報を保持する手段と、を有することを特
徴とするマルチプロセッサシステム。
1. A multiprocessor system configured by connecting a shared memory and a plurality of processors each having a cache device for the shared memory to a bus, wherein the cache device of the processor has a cache block consisting of n consecutive words. means for maintaining information as to whether all words in the cache block are valid or not for each word in the cache block; A multiprocessor system comprising: means for holding information on whether a word in the cache block is occupied or shared, and information on whether the word in the cache block is valid or invalid when all of the words in the cache block are not valid.
JP06638191A 1991-03-29 1991-03-29 Multiprocessor system Expired - Fee Related JP3226557B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP06638191A JP3226557B2 (en) 1991-03-29 1991-03-29 Multiprocessor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP06638191A JP3226557B2 (en) 1991-03-29 1991-03-29 Multiprocessor system

Publications (2)

Publication Number Publication Date
JPH04302044A true JPH04302044A (en) 1992-10-26
JP3226557B2 JP3226557B2 (en) 2001-11-05

Family

ID=13314197

Family Applications (1)

Application Number Title Priority Date Filing Date
JP06638191A Expired - Fee Related JP3226557B2 (en) 1991-03-29 1991-03-29 Multiprocessor system

Country Status (1)

Country Link
JP (1) JP3226557B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07210526A (en) * 1994-01-20 1995-08-11 Hitachi Ltd Parallel computer

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07210526A (en) * 1994-01-20 1995-08-11 Hitachi Ltd Parallel computer

Also Published As

Publication number Publication date
JP3226557B2 (en) 2001-11-05

Similar Documents

Publication Publication Date Title
KR100286962B1 (en) Cache controller
JP4119380B2 (en) Multiprocessor system
JPH04213136A (en) Updating system for reference bit and change bit
JPH06318174A (en) Cache memory system and method for performing cache for subset of data stored in main memory
JP3814521B2 (en) Data processing method and apparatus
JP3226557B2 (en) Multiprocessor system
JPH0281255A (en) Multi-processor computer multiple device
JPH03230238A (en) Cache memory control system
USRE38514E1 (en) System for and method of efficiently controlling memory accesses in a multiprocessor computer system
JPH04305746A (en) Cache memory control device
JPS6153747B2 (en)
JPH0628258A (en) Microprocessor
JP2636760B2 (en) Multiprocessor system
JP3219422B2 (en) Cache memory control method
JPH04302043A (en) Multiprocessor system
JPH06309228A (en) Data processor
JPH056706B2 (en)
JP2000020395A (en) Method and device for cache flash
JPS6238743B2 (en)
JPH06187300A (en) Storage controller
JPH0548498B2 (en)
JPH05210590A (en) Device and method for write cash memory
JPH113288A (en) Cache memory device and fault control method for cache memory
JPH06202949A (en) Multiprocessor cache controller
JPH087663B2 (en) Computer system and storage device access method thereof

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20010814

LAPS Cancellation because of no payment of annual fees