Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH077358B2 - Hierarchical cache memory device - Google Patents
[go: Go Back, main page]

JPH077358B2 - Hierarchical cache memory device - Google Patents

Hierarchical cache memory device

Info

Publication number
JPH077358B2
JPH077358B2 JP1240253A JP24025389A JPH077358B2 JP H077358 B2 JPH077358 B2 JP H077358B2 JP 1240253 A JP1240253 A JP 1240253A JP 24025389 A JP24025389 A JP 24025389A JP H077358 B2 JPH077358 B2 JP H077358B2
Authority
JP
Japan
Prior art keywords
bus
cache memory
memory device
command
cache
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
Application number
JP1240253A
Other languages
Japanese (ja)
Other versions
JPH03102546A (en
Inventor
博文 村谷
滋博 浅野
Original Assignee
工業技術院長
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 工業技術院長 filed Critical 工業技術院長
Priority to JP1240253A priority Critical patent/JPH077358B2/en
Publication of JPH03102546A publication Critical patent/JPH03102546A/en
Publication of JPH077358B2 publication Critical patent/JPH077358B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) この発明は複数のプロセッサとメインメモリ装置との間
に階層構造化された複数のキャッシュメモリ装置を持つ
階層キャッシュメモリ装置に関する。
The present invention relates to a hierarchical cache memory device having a plurality of cache memory devices hierarchically structured between a plurality of processors and a main memory device. .

(従来の技術) 複数のプロセッサとメインメモリ装置とをバスを介して
共通接続し、このバスを介して他のプロセッサやメイン
メモリ装置との間でデータの授受を行う計算機システム
においては、複数のプロセッサからの同時アクセスによ
る所謂バス・コンテンションが問題となる。そこで上記
プロセッサとメインメモリ装置との間に、各プロセッサ
にそれぞれ対応する高速小容量のメモリ装置をキャッシ
ュとして設け、これらのキャッシュメモリ装置に前記メ
インメモリ装置のデータのコピーを持たせておくことが
考えられている。
(Prior Art) In a computer system in which a plurality of processors and a main memory device are commonly connected via a bus, and data is exchanged with other processors or main memory devices via the bus, So-called bus contention due to simultaneous access from processors becomes a problem. Therefore, a high-speed small-capacity memory device corresponding to each processor may be provided as a cache between the processor and the main memory device, and the cache memory device may have a copy of the data of the main memory device. It is considered.

このようなキャッシュメモリ方式によれば、各プロセッ
サはキャッシュメモリ装置のアクセスにより、等価的に
高速度にメインメモリ装置や他のプロセッサとの間でデ
ータの授受を行うことが可能となり、前述したコンテン
ション等の問題を効果的に回避することが可能となる。
According to such a cache memory system, each processor can equivalently exchange data with the main memory device or another processor at high speed by accessing the cache memory device. It is possible to effectively avoid problems such as tension.

ところでこの種のキャッシュメモリ方式にあっては、複
数のキャッシュメモリ装置とメインメモリ装置とのデー
タ内容の一致が問題となる。即ち、プロセッサからのキ
ャッシュメモリ装置に対する書込みによりそのデータの
更新が行われた場合、他のキャッシュメモリ装置やメイ
ンメモリ装置にコピーされているデータ内容が無効とな
る。従ってこの場合には、データ内容が更新された旨を
他のキャッシュメモリ装置やメインメモリ装置に知らせ
る必要がある。この為の手法としては、例えば下記の文
献にその通知の時期やデータの有効性の表し方が提唱さ
れている。
By the way, in this type of cache memory system, there is a problem in that the data contents of a plurality of cache memory devices and the main memory device match. That is, when the data is updated by writing from the processor to the cache memory device, the data content copied to another cache memory device or the main memory device becomes invalid. Therefore, in this case, it is necessary to notify other cache memory devices or main memory devices that the data contents have been updated. As a method for this purpose, for example, the following document proposes the timing of the notification and the method of expressing the validity of the data.

『Archibold,J.and Baer,J.-L. “Csche Coherence Protocols:Evaluation Using a Multiprocessor Simulation Model" ACM Transaction on Computer Systems, Vol.4,No.4,November 1986,pp273-298』 一方、複数のプロセッサが同一アドレスに対して書込み
を行うプログラムや、キャッシュメモリ装置からのブロ
ックの追出しが頻繁に起こるプログラムでは、データ転
送や他のキャッシュメモリ装置の内容無効化の為のコマ
ンドによるバス・コンテンションの問題が起こる。この
ような問題に対しては、キャッシュメモリ装置とメイン
メモリ装置の間に、新たなキャッシュメモリ装置を階層
的に設け、これによってバス・トラフィックの軽減を図
る手法が下記の文献に提唱されている。
"Archibold, J. and Baer, J.-L." Csche Coherence Protocols: Evaluation Using a Multiprocessor Simulation Model "ACM Transaction on Computer Systems, Vol.4, No.4, November 1986, pp273-298" In a program in which the processor writes to the same address or in a program in which blocks are frequently ejected from the cache memory device, bus contention by a command for data transfer or invalidation of the contents of other cache memory devices may occur. The problem arises. In order to solve such a problem, the following document proposes a method for hierarchically providing a new cache memory device between the cache memory device and the main memory device to reduce the bus traffic. .

『Hattori,A.,Koshino,M.and S.Kamimoto “Three-level hierarchical storage system for FACO
M M-380/382"pp693-697 Proc.Information Proceeding IFIP,1983』 ところがプロセッサの数が多くなると、階層化されてい
る上位のキャッシュメモリ装置と下位のキャッシュメモ
リ装置との間のバス・コンテションが新たに問題となっ
てくる。このような問題に対処するべく、例えば下記の
文献にて提唱されるように、下位階層のキャッシュメモ
リ装置の数を増やすことが考えられている。
“Hattori, A., Koshino, M. And S.Kamimoto“ Three-level hierarchical storage system for FACO
M M-380 / 382 "pp693-697 Proc. Information Proceeding IFIP, 1983" However, when the number of processors increases, the bus condition between the upper cache memory device and the lower cache memory device, which are layered, becomes hierarchical. In order to deal with such a problem, it is considered to increase the number of cache memory devices in the lower hierarchy, as proposed in the following document, for example.

『A.W.Wilson Jr. “The 14th Annual International Symposium on COMPU
TER ARCHITECTURE" COMPUTER ARCHITECTURE NEWS Vol.15 No.2 June2−5,19
87 Pittsburg,Pennsylvania』 第2図はこのような観点に立脚して構築される階層キャ
ッシュメモリ装置の概略構成を示す図であり、Pは複数
のプロセッサである。これらの各プロセッサPに対応し
て複数の第1のキャッシュメモリ装置C1がそれぞれ設け
られ、これらの第1のキャッシュメモリ装置C1は複数の
第1のバスB1にて所定数づつ共通接続される。また複数
の第2のキャッシュメモリ装置C2は上記各第1のバスB1
にそれぞれ対応して設けられており、これらの第2のキ
ャッシュメモリ装置C2は第2のバスB2にて共通接続され
る。この第2のバスB2にメインメモリ装置Mが接続さ
れ、このメインメモリ装置Mと前述した複数のプロセッ
サPとの間に複数のキャッシュメモリ装置C1,C2がバスB
1,B2を介して階層的に設けられたメモリ構造が実現され
ている。
“AW Wilson Jr.“ The 14th Annual International Symposium on COMPU
TER ARCHITECTURE "COMPUTER ARCHITECTURE NEWS Vol.15 No.2 June2-5,19
87 Pittsburg, Pennsylvania] FIG. 2 is a diagram showing a schematic configuration of a hierarchical cache memory device constructed based on such a viewpoint, and P is a plurality of processors. A plurality of first cache memory devices C1 are provided corresponding to each of these processors P, and these first cache memory devices C1 are commonly connected by a predetermined number by a plurality of first buses B1. Further, the plurality of second cache memory devices C2 are connected to the above-mentioned first buses B1.
The second cache memory device C2 is commonly connected by the second bus B2. A main memory device M is connected to the second bus B2, and a plurality of cache memory devices C1 and C2 are provided between the main memory device M and the plurality of processors P described above on the bus B.
A memory structure that is hierarchically provided via 1 and B2 is realized.

ところがこのような構成では、下位階層の第2のキャッ
シュメモリ装置C2は、その上位に位置する第1のバスB1
と、その下位に位置する第2のバスB2の両方から当該キ
ャッシュメモリ装置C2におけるデータ内容のコヒーレン
シに関するコマンドを受けることがある。
However, in such a configuration, the second cache memory device C2 in the lower hierarchy has the first bus B1 located in the upper level thereof.
And a command relating to the coherency of the data content in the cache memory device C2 may be received from both of the second buses B2 located below it.

しかしてこの場合、そのコマンドの種類とキャッシュメ
モリ装置C2におけるデータ内容によっては、キャッシュ
メモリ装置C2は上位側(第1のバスB1)から受けたコマ
ンドに反応して下位のバス(第2のバスB2)にコマンド
を出す必要があり、また下位側(第2のバスB2)から受
けたコマンドに反応して上位のバス(第1のバスB1)に
コマンドを出す必要が生じる可能性がある。ところが上
位側のバス(第1のバスB1)はその上位(第1のキャッ
シュメモリ装置C1)からきたコマンドによって占有され
ており、一方、下位のバス(第2のバスB2)は下位側
(他の第2のキャッシュメモリ装置C2)から来たコマン
ドにより占有されているので、所謂デッドロックの状態
が生じてしまうと云う問題がある。このような理由か
ら、下位階層のキャッシュメモリ装置を複数にするには
幾つかの解決すべき課題があり、一般的には第2図に示
すように階層化されるメモリ構成を採用することが困難
であるという問題点があった。
However, in this case, depending on the type of the command and the data content in the cache memory device C2, the cache memory device C2 responds to the command received from the upper side (first bus B1) by the lower bus (second bus). It may be necessary to issue a command to B2) and also to issue a command to an upper bus (first bus B1) in response to a command received from the lower side (second bus B2). However, the upper side bus (first bus B1) is occupied by the command from the upper side (first cache memory device C1), while the lower side bus (second bus B2) is in the lower side (others). Since it is occupied by the command from the second cache memory device C2), there is a problem that a so-called deadlock state occurs. For this reason, there are some problems to be solved in order to make a plurality of cache memory devices in the lower hierarchy, and in general, a hierarchical memory structure as shown in FIG. 2 is adopted. There was a problem that it was difficult.

このデッドロックの発生状況を第3図を参照して具体的
に説明する。
The state of occurrence of this deadlock will be specifically described with reference to FIG.

第3図(a)はプロセッサP1が自己に対応する第1のキ
ャッシュメモリ装置C11にリード要求のコマンドを出し
たところを表している。ところがキャッシュメモリ装置
C11がその要求されたブロック(データ)を持ってない
為にキャッシュ・ミスしたとする。この場合、キャッシ
ュメモリ装置C11は要求されたブロックのコピーを他の
キャッシュメモリ装置から持ってくる必要が生じる。こ
の結果、上記キャッシュメモリ装置C11は第3図(b)
に示すように第1のバスB1を介して同じ階層の他のキャ
ッシュメモリ装置C12,C13や、その下位階層の第2のキ
ャッシュメモリ装置C21に対して前記プロセッサP1から
要求されたブロックのコピーを要求するコマンドをブロ
ードキャストにより伝達する。
FIG. 3A shows that the processor P1 issues a read request command to the first cache memory device C11 corresponding to itself. However, cache memory device
Suppose C11 does a cache miss because it does not have the requested block (data). In this case, the cache memory device C11 needs to bring a copy of the requested block from another cache memory device. As a result, the cache memory device C11 is shown in FIG.
As shown in FIG. 5, a copy of the block requested from the processor P1 is sent to the other cache memory devices C12 and C13 of the same hierarchy and the second cache memory device C21 of the lower hierarchy via the first bus B1. The requested command is transmitted by broadcasting.

しかしてキャッシュメモリ装置C11と同じ階層の他のキ
ャッシュメモリ装置C12,C13および第2のキャッシュメ
モリ装置C21も前述したコマンドによりリード要求され
ているブロックは持っていないとすると、上記第2のキ
ャッシュメモリ装置C21は当該キャッシュメモリ装置C21
と同じ階層の他のキャッシュメモリ装置C22、またはメ
インメモリ装置Mから前記コマンドによりリード要求さ
れているブロックのコピーを持ってくるべく、第3図
(c)に示すように第2のバスB2を介して上述したコマ
ンドを出力する。
However, if the other cache memory devices C12 and C13 and the second cache memory device C21 in the same hierarchy as the cache memory device C11 do not have the block requested to be read by the above-mentioned command, the second cache memory The device C21 is the cache memory device C21.
In order to bring a copy of the block requested to be read by the above command from another cache memory device C22 or the main memory device M in the same hierarchy as the second bus B2 as shown in FIG. 3 (c). The above command is output via.

ところがこのような前記プロセッサP1からのコマンドの
伝達と同時に、このコマンドがバスB2を介して与えられ
た第2のキャッシュメモリ装置C22に対して、その上位
のプロセッサP2が第3図(b)に示すように発生したブ
ロックのコピーを要求するコマンドが第3図(c)に示
すように入ってきたとする。そしてキャッシュメモリ装
置C22が上位のバス(プロセッサP2)からのコマンドが
要求するブロックを持っていない場合、当該キャッシュ
メモリ装置C22は下位のバスにブロックのコピーを要求
するコマンドを出そうとする。
However, at the same time when the command is transmitted from the processor P1, the upper processor P2 of the second cache memory device C22 to which the command is given via the bus B2 is shown in FIG. 3 (b). It is assumed that a command requesting copying of the generated block has entered as shown in FIG. 3 (c). When the cache memory device C22 does not have the block requested by the command from the upper bus (processor P2), the cache memory device C22 tries to issue the command requesting the copy of the block to the lower bus.

しかし第2のバスB2は既に前述したプロセッサP1からの
コマンドによって占有されている。この結果、第3図
(d)に示すように第2のキャッシュメモリ装置C22で
は、その上位のプロセッサP2から要求されたコマンドを
第2のバスB2に出力することができなくなり、また第2
のバスB2を介して与えられる前記プロセッサP1からのコ
マンドに対しても、その上位の第1のバスがプロセッサ
P2からのコマンドにより占有されていることから、これ
に応答することができなくなる。
However, the second bus B2 is already occupied by the command from the processor P1 described above. As a result, as shown in FIG. 3 (d), the second cache memory device C22 cannot output the command requested by the processor P2, which is the upper processor, to the second bus B2, and
In response to a command from the processor P1 given via the bus B2 of
It cannot be responded to because it is occupied by the command from P2.

このようにして発生するデッドロックの状況は、第2の
バスB2から与えられるコマンド、または第1のバスB1か
ら与えられるコマンドのいずれかが差戻しされ、これに
よってそのバスが解放されない限り解消されない。
The deadlock situation thus generated cannot be resolved unless either the command given from the second bus B2 or the command given from the first bus B1 is sent back and the bus is released.

一方、プログラミングによって上述したデッドロックを
回避することも試みられている。具体的にはプログラミ
ングにより、第2のキャッシュメモリ装置C2が下位側の
第2のバスB2からのコマンドに対して応答を返した後
に、上記第2のキャッシュメモリ装置C2に対して上位側
の第1のバスB1からコマンドを与えられるようにしてデ
ッドロックの発生を回避することが試みられている。
On the other hand, attempts have been made to avoid the deadlock described above by programming. Specifically, by programming, the second cache memory device C2 returns a response to the command from the second bus B2 on the lower side, and then the second cache memory device C2 on the upper side with respect to the second cache memory device C2. It has been attempted to avoid the occurrence of deadlock by allowing commands to be given from one bus B1.

然し乍ら、第2のキャッシュメモリ装置C2が下位側の第
2のバスB2からのコマンドに対して応答を返した後であ
っても、依然として下位側の第2のバスB2が他の資源に
よって占有されたままの状態であると、第2のキャッシ
ュメモリ装置C2にとっては、下位側の第2のバスB2が解
放されるまで上位側からのコマンドに対して応答するこ
とができず、第2のバスB2の解放を待つことが必要とな
る。
However, even after the second cache memory device C2 returns a response to the command from the lower second bus B2, the lower second bus B2 is still occupied by other resources. If the second cache memory device C2 is left as it is, the second cache memory device C2 cannot respond to a command from the upper side until the second bus B2 on the lower side is released. It will be necessary to wait for the release of B2.

特に次のような状況下ではその待ち時間が大きくなる。
その1つは上述した階層構造を持つメモリ装置では、一
般的に下位側のキャッシュメモリ装置ほどそのアクセス
時間が長くなる。この為、下位側のバスを占有している
コマンドが、より下位側のメモリ装置をアクセスしてい
る場合である。今1の例は、この階層キャッシュメモリ
装置におけるキャッシュメモリ装置間の距離を、例えば
コマンドがバスを通る回数で定義するものとすれば、下
位のバスを占有しているコマンドが距離的に離れたキャ
ッシュメモリ装置に達している場合である。
Especially in the following situations, the waiting time becomes large.
One is that, in the memory device having the above-mentioned hierarchical structure, the access time is generally longer in the lower cache memory device. Therefore, a command occupying the lower-order bus is accessing the lower-order memory device. In the first example, if the distance between the cache memory devices in this hierarchical cache memory device is defined by the number of times the command passes through the bus, for example, the commands occupying the lower level buses are separated by distance. This is the case when the cache memory device is reached.

これらのいずれの場合であっても、上位のバスから来た
コマンドに対して、下位のバスを占有しているコマンド
が当該バスを解放するのを待ち続けると、これによって
上位のバスも占有され続けることになる。そしてこのよ
うな事態が生じると、複数のプロセッサからの個々の要
求に対する処理効率が著しく妨げられ、その全体的な処
理効率が大幅に低減すると云う大きな問題が生じた。
In either of these cases, if a command that occupies a lower bus continues to wait for a command that occupies the lower bus to release the bus, it will also occupy the upper bus. Will continue. When such a situation occurs, the processing efficiency for individual requests from a plurality of processors is significantly hindered and the overall processing efficiency is greatly reduced, which is a serious problem.

(発明が解決しようとする課題) このように従来のキャッシュメモリ技術では、キャッシ
ュメモリ装置を階層構造化する場合、上述したデッドロ
ックの問題に起因して下位階層のキャッシュメモリ装置
を複数にするには幾つかの解決すべき課題があった。ま
たこの階層構造化に際して、プログラミングによって下
位階層のキャッシュメモリ装置におけるデッドロックを
回避するようにしても、例えば上位側のバスからのコマ
ンドを受けて下位側のバスにコマンドを出す際、そのキ
ャッシュメモリ装置Cの下位側のバスが既に他の資源に
よって占有されていると、当該キャッシュメモリ装置で
は下位側のバスが解放されるまで上位側のコマンドに対
する応答を待つことが必要となる。このような事態が生
じると、その間に亘って上位側のバスも占有状態になる
と云う不具合が生じ、この結果、複数のプロセッサの要
求に対する処理効率が大幅に低下するという問題があっ
た。
(Problems to be solved by the invention) As described above, in the conventional cache memory technology, when the cache memory device is hierarchically structured, a plurality of cache memory devices in the lower hierarchy are provided due to the problem of the deadlock described above. Had some issues to solve. Further, in this hierarchical structure, even if deadlock in the cache memory device of the lower layer is avoided by programming, for example, when a command from the upper side bus is issued and the command is issued to the lower side bus, the cache memory If the lower bus of the device C is already occupied by another resource, the cache memory device needs to wait for a response to the upper command until the lower bus is released. When such a situation occurs, there is a problem in that the bus on the upper side is also occupied during that time, and as a result, there is a problem that the processing efficiency with respect to requests from a plurality of processors is significantly reduced.

本発明はこのような事情を考慮してなされたもので、そ
の目的とするところは、デッドロックの発生を効果的に
回避すると共に、バスの不本意な占有を防止して複数の
プロセッサからの要求に効果的に対処し、その全体的な
処理効率の向上を図ることを可能とする実用性の高い階
層キャッシュメモリ装置を提供することにある。
The present invention has been made in consideration of such circumstances, and an object of the present invention is to effectively avoid the occurrence of deadlock and prevent unintentional occupation of a bus to prevent a processor from a plurality of processors. It is an object of the present invention to provide a highly practical hierarchical cache memory device capable of effectively responding to a request and improving the overall processing efficiency thereof.

[発明の構成] (課題を解決するための手段) 本発明は、第2図に概略構成を示すように、複数のプロ
セッサPのそれぞれに対応して設けられた複数の第1の
キャッシュメモリ装置C1と、これらの第1のキャッシュ
メモリ装置C1を複数個づつ相互接続した複数の上位側の
バスB1を介して上記第1のキャッシュメモリ装置C1にそ
れぞれ接続された複数の第2のキャッシュメモリ装置C2
と、これらの第2のキャッシュメモリ装置C2を相互に接
続した下位側のバスB2を介して前記第2のキャッシュメ
モリ装置C2に接続されたメインメモリ装置Mとを備えた
階層キャッシュメモリ装置において、第2のキャッシュ
メモリ装置C2は、上位側のバスB1からのコマンドを受け
て下位側のバスB2にコマンドを出力しようとする際、上
記下位側のバスB2が既に他の装置により占有されている
か否かを判定する判定手段と、この判定手段で当該下位
側のバスB2が占有されていることが判定されたときに
は、前記上位側のバスB1からのコマンドをその要求元に
差戻して当該上位側のバスB1を解放する差戻し手段を設
けたことを特徴とするものである。
[Configuration of the Invention] (Means for Solving the Problems) The present invention, as shown in the schematic configuration in FIG. 2, includes a plurality of first cache memory devices provided corresponding to a plurality of processors P, respectively. C1 and a plurality of second cache memory devices respectively connected to the first cache memory device C1 through a plurality of upper-side buses B1 interconnecting a plurality of these first cache memory devices C1 C2
And a main memory device M connected to the second cache memory device C2 via a lower-order bus B2 connecting these second cache memory devices C2 to each other, When the second cache memory device C2 receives a command from the upper bus B1 and tries to output a command to the lower bus B2, is the lower bus B2 already occupied by another device? When it is determined by the determining means that determines whether or not the lower-order bus B2 is occupied, the command from the upper-order bus B1 is returned to the request source and the higher-order side is determined. It is characterized in that a return means for releasing the bus B1 is provided.

つまり第1図にその制御処理概念を示すように、上位側
のバスB1からのコマンドが入力されて、下位側のバスB2
にコマンドを出力しようとするとき(ステップa)、例
えば当該第2のキャッシュメモリ装置C2が下位側のバス
B2からのコマンドを入力して上位側のバスB1にコマンド
を出力しようとしている等、既に下位側のバスB2が他の
装置により占有されているか否かを判定手段によって判
定し(ステップb)、判定手段によって下位側のバスB2
が既に他の装置により占有されていると判定された場合
には、差戻し手段が前記上位側のバスB1からのコマンド
をその要求元に差戻して、その上位側のバスB1を解放す
るようにし(ステップc)、下位側のバスB2が空き状態
にある場合にだけ前記上位側のバスB1からのコマンドを
下位側のバスB2に伝達する(ステップd)ようにしたこ
とを特徴とするものである。
In other words, as shown in the control processing concept in FIG. 1, a command from the upper side bus B1 is input and the lower side bus B2 is input.
When a command is to be output to the second cache memory device C2 (step a), the second cache memory device C2
The determination means determines whether or not the lower side bus B2 is already occupied by another device, such as when the command from the B2 is input and the command is output to the upper side bus B1 (step b), Lower side bus B2 by the judging means
If it is determined that is already occupied by another device, the sending-back means sends back the command from the bus B1 on the upper side to the request source to release the bus B1 on the upper side ( The step c) is characterized in that the command from the upper side bus B1 is transmitted to the lower side bus B2 (step d) only when the lower side bus B2 is idle. .

(作用) このような判定手段及び差戻し手段を備えた本発明によ
れば、第2のキャッシュメモリ装置がその上位側のバス
からコマンドを受け、このコマンドに対して下位側のバ
スにコマンドを出そうとするとき、判定手段によって既
に下位側のバスが他の装置により占有されていることが
判定された場合には、差戻し手段がこれを検知して前記
上位側のバスからのコマンドをその要求元へ差戻し、こ
れによって上位側のバスを解放するので、例えば下位側
のバスからのコマンドを上位側のバスに効果的に伝える
ことができ、デッドロックの発生を未然にかつ効果的に
回避することが可能となる。
(Operation) According to the present invention having such a determination means and a send-back means, the second cache memory device receives a command from the bus on the upper side thereof and outputs the command to the bus on the lower side with respect to this command. In doing so, if the determining means determines that the lower-side bus is already occupied by another device, the send-back means detects this and requests the command from the upper-side bus. Since the upper side bus is released by sending back to the original, the command from the lower side bus can be effectively transmitted to the upper side bus, and deadlock can be avoided before and effectively. It becomes possible.

またこのようにしてデッドロックの発生を未然に回避す
るので、下位側のバスの占有に伴って上位側のバスが徒
に占有されることがなくなり、解放された上位側のバス
を利用して他の要求元からのコマンドを先に処理するこ
とが可能となる。つまり下位側のバスに伝える必要のな
い他のコマンドから先に処理することが可能となる。こ
の結果、複数のプロセッサからの要求に対する処理効率
の向上を図ることが可能となる。
In addition, since the occurrence of deadlock is avoided in this way, the upper side bus will not be occupied by the lower side bus, and the released upper side bus will be used. It is possible to process a command from another request source first. In other words, other commands that do not need to be transmitted to the lower bus can be processed first. As a result, it is possible to improve the processing efficiency for requests from a plurality of processors.

(実施例) 以下、図面を参照して本発明に係る階層キャッシュメモ
リ装置の実施例について説明する。
(Embodiment) An embodiment of a hierarchical cache memory device according to the present invention will be described below with reference to the drawings.

第4図は第1の実施例に係る階層キャッシュメモリ装置
における第2のキャッシュメモリ装置の概略構成を示す
図で、1はキャッシュメモリ装置本体である。このキャ
ッシュメモリ装置本体1は、複数のプロセッサPにそれ
ぞれ対応して設けられた第1のキャッシュメモリ装置C1
を相互に接続する第1のバスB1を上位バス2として接続
し、また同じ階層の他の第2のキャッシュメモリ装置C2
およびメインメモリ装置Mを相互に接続する第2のバス
B2を下位バス3として接続してキャッシュ機能を果たす
ものである。
FIG. 4 is a diagram showing a schematic configuration of a second cache memory device in the hierarchical cache memory device according to the first embodiment, and 1 is a cache memory device main body. The cache memory device main body 1 includes a first cache memory device C1 provided corresponding to a plurality of processors P, respectively.
A first bus B1 interconnecting the two is connected as an upper bus 2, and another second cache memory device C2 in the same hierarchy is connected.
And a second bus interconnecting the main memory devices M to each other
B2 is connected as the lower bus 3 to perform the cache function.

しかしてこのキャッシュメモリ装置本体1は、基本的に
はタグRAMとデータRAMとからなりキャッシュ用のメモリ
として機能するRAM部4と、上位バス2からのコマンド
に応じて上記RAM部4に対するアクセスをコントロール
する上位バス側キャッシュ・コントローラ5、下位バス
3に対するバス・コントローラ6と、下位バス3からの
コマンドに応じて前記RAM部4に対するアクセスをコン
トロールするスヌープ・コントローラ7とを備えて構成
される。
However, the cache memory device body 1 basically comprises a RAM section 4 which is composed of a tag RAM and a data RAM and functions as a cache memory, and an access to the RAM section 4 in response to a command from the host bus 2. It comprises a cache controller 5 on the upper bus side for controlling, a bus controller 6 for the lower bus 3, and a snoop controller 7 for controlling access to the RAM section 4 in response to a command from the lower bus 3.

この実施例に係る第2のキャッシュメモリ装置が特徴と
するところは、上述した構成のキャッシュメモリ装置本
体1に加えて、当該キャッシュメモリ装置本体1から下
位バス3に対してコマンドを出力しようとするとき、下
位バス3が既に他のコマンドにより占有されている状態
にあるか否かを検知し、占有状態であるならば上記コマ
ンドを差戻させる為の応答を上記キャッシュメモリ装置
本体1に返すと共に、下位バス3が占有されていなけれ
ばそのコマンドをそのまま下位バス3に伝えると云う機
能を備えた下位バス占有判定装置8を設けたことを特徴
としている。
The second cache memory device according to this embodiment is characterized in that, in addition to the cache memory device body 1 having the above-described configuration, the cache memory device body 1 attempts to output a command to the lower bus 3. At this time, it is detected whether or not the lower bus 3 is already occupied by another command, and if it is occupied, a response for sending back the command is returned to the cache memory device body 1 and If the lower bus 3 is not occupied, the lower bus occupancy determination device 8 having a function of transmitting the command as it is to the lower bus 3 is provided.

即ち、この下位バス占有判定装置8は、キャッシュメモ
リ装置本体1が上位バス2からのコマンドを受け付け、
その応答として下位バス3にコマンドを出力しようとす
るとき、この下位バス3に出力しようとするコマンドを
入力する。そしてこのコマンドの入力時に下位バス3が
既に他のコマンド等によって占有されているか否かを調
べ、下位バス3が空き状態であることを条件として前記
コマンドを下位バス3に出力する。また下位バス3が既
に他のコマンドにより占有されている場合には、下位バ
ス占有判定装置8は上記コマンドをその要求元に差戻す
べく、キャッシュメモリ装置本体1に応答を返す。キャ
ッシュメモリ装置本体1は、このような応答を下位バス
占有判定装置8から受けたとき、下位バス3に出力しよ
うとしているコマンドを上位バス2を介してその要求元
(プロセッサ)に差戻す。
That is, in the lower bus occupation determination device 8, the cache memory device main body 1 receives a command from the upper bus 2,
When a command is output to the lower bus 3 as a response, the command to be output to the lower bus 3 is input. Then, when this command is input, it is checked whether or not the lower bus 3 is already occupied by another command or the like, and the command is output to the lower bus 3 on condition that the lower bus 3 is empty. If the lower bus 3 is already occupied by another command, the lower bus occupancy determination device 8 returns a response to the cache memory device body 1 in order to return the command to the request source. When the cache memory device body 1 receives such a response from the lower bus occupancy determination device 8, it sends back the command to be output to the lower bus 3 to the request source (processor) via the upper bus 2.

第5図は上述した如き機能を備えて構成された第2のキ
ャッシュメモリ装置を用いて構築される階層キャッシュ
メモリ装置における処理動作の流れ、特にデッドロック
が回避されて所望とするキャッシュ動作がなされる過程
を模式的に示す図である。
FIG. 5 shows the flow of processing operations in a hierarchical cache memory device constructed using the second cache memory device having the above-described functions, and in particular, the desired cache operation is performed by avoiding deadlock. It is a figure which shows typically the process.

この第5図(a)は上位階層の第1のキャッシュメモリ
装置C11から出力されたブロックのコピーの要求が第2
のキャッシュメモリ装置C2においてもキャッシュ・ミス
し、同じ階層の他のキャッシュメモリ装置、またはメイ
ンメモリ装置Mからブロックのコピーを持ってくる為の
コマンドを当該第2のキャッシュメモリ装置C2のキャッ
シュメモリ装置本体1が前記下位バス占有判定装置8に
対して出力した状態を示している。
In FIG. 5 (a), the request for copying the block output from the first cache memory device C11 in the upper hierarchy is the second request.
Also in the cache memory device C2 of the second cache memory device C2, a command to bring a copy of the block from another cache memory device of the same hierarchy or the main memory device M is cache missed. It shows a state in which the main body 1 outputs to the lower bus occupation determination device 8.

しかしてこのとき、下位バス3が既に他のコマンドによ
り占有されている場合には、第5図(b)に示すように
下位バス占有判定装置8はコマンドの差戻しの応答を前
記キャッシュメモリ装置本体1のバス・コントローラ6
に返す。すると第5図(c)に示すように、下位バス占
有判定装置8からのコマンドの差戻しの応答を受けたバ
ス・コントローラ6は、前記上位バス側キャッシュ・コ
ントローラ5に対してコマンドの差戻しの応答を返し、
これを受けた上位バス側キャッシュ・コントローラ5は
第5図(d)に示すように上位バス2に対してコマンド
差戻しの応答を返す。このようなコマンド差戻しの応答
が、そのコマンド要求元であるプロセッサまで順に伝達
され、そのコマンドの要求元であるプロセッサが第5図
(e)に示すように上位バス2を解放する。
At this time, however, if the lower bus 3 is already occupied by another command, the lower bus occupancy determination device 8 sends a response for returning the command as shown in FIG. 5 (b) to the main body of the cache memory device. 1 bus controller 6
Return to. Then, as shown in FIG. 5 (c), the bus controller 6 which has received the response of the command return from the lower bus occupancy determination device 8 sends the command return response to the upper bus side cache controller 5. Returns
The cache controller 5 on the upper bus side, which has received this, returns a command send back response to the upper bus 2 as shown in FIG. 5 (d). Such a command return response is sequentially transmitted to the command requesting processor, and the command requesting processor releases the upper bus 2 as shown in FIG. 5 (e).

この結果、下位バス3からのコマンドを受付けているス
ヌープ・コントローラ6は、前述したコマンドの差戻し
により上位バス2が解放されることから、第5図(e)
に示すように上位バス2に対して下位バス3からのブロ
ックコピーを要求するコマンドを上記上位バス2に送出
することができる。
As a result, the snoop controller 6 receiving the command from the lower bus 3 releases the upper bus 2 by the above-mentioned command return, so that FIG.
As shown in, a command for requesting block copy from the lower bus 3 to the upper bus 2 can be sent to the upper bus 2.

第6図は上述した下位バス占有判定部8が持つ処理機能
により、下位バス3の占有時にコマンドを上位バス2に
対して差戻すことにより、複数のプロセッサからの要求
に対する処理効率の向上が期待される状況を示す図であ
る。
FIG. 6 shows that by the processing function of the lower bus occupancy determination unit 8 described above, when the lower bus 3 is occupied, a command is sent back to the upper bus 2 to improve the processing efficiency in response to requests from a plurality of processors. It is a figure which shows the situation.

第6図(a)はプロセッサP1の出したリード・コマンド
がキャッシュメモリ装置C11にてキャッシュ・ミスして
しまい、キャッシュメモリ装置C11が同じ階層のキャッ
シュメモリ装置C12と下位階層のキャッシュメモリ装置C
21に対してブロックのコピーを要求するコマンドを第1
のバスB1に送出したが、キャッシュメモリ装置C21にお
いてもキャッシュ・ミスが生じた状態を示している。そ
してキャッシュメモリ装置C21から更に下位の第2のバ
スB2にコマンドを出す必要があるのだが、既に第2のバ
スB2が別のコマンドによって占有されており、しかもそ
のコマンドが距離的に遠いキャッシュメモリ装置に達し
ている状況を示している。
In FIG. 6A, the read command issued by the processor P1 causes a cache miss in the cache memory device C11, and the cache memory device C11 has a cache memory device C12 in the same layer and a cache memory device C in the lower layer.
First command to request 21 to copy block
However, the cache memory device C21 also shows a cache miss. Then, it is necessary to issue a command from the cache memory device C21 to the lower second bus B2, but the second bus B2 is already occupied by another command, and the command is far from the cache memory. It shows the situation of reaching the device.

この場合、第2のバスB2を介して距離的に遠いキャッシ
ュメモリ装置に達しているコマンドに対する応答が返る
までには、比較的長い時間が掛かると予想される。また
この状況では、キャッシュメモリ装置C21においてはデ
ッドロックは生じないので、キャッシュメモリ装置C21
は下位バスB2が解放されるまで、下位バスB2に対するコ
マンドの出力を待ち続けても良いはずである。
In this case, it is expected that it takes a relatively long time until the response to the command reaching the cache memory device which is far away via the second bus B2 is returned. Further, in this situation, no deadlock occurs in the cache memory device C21.
Could wait for the command output to the lower bus B2 until the lower bus B2 is released.

ところが今、キャッシュメモリ装置C21の上位階層に、
上述した第1のキャッシュメモリ装置C111の他にも、リ
ード・ライトにミスし、第1のバスB1に対してコマンド
を出したいのだが、キャッシュメモリ装置C11の出した
コマンドによって第1のバスB1が占有されているので、
そのバスB1が解放されるのを待っているキャッシュメモ
リ装置C12があるとする。しかもこのキャッシュメモリ
装置C12が出力するコマンドは第2のキャッシュメモリ
装置C21の内容によっては、更にその下位の第2のバスB
2にコマンドを出す必要がない場合がある。
However, now, in the upper layer of the cache memory device C21,
In addition to the above-mentioned first cache memory device C111, I want to issue a command to the first bus B1 due to a read / write miss, but the first bus B1 is issued by the command issued by the cache memory device C11. Is occupied, so
Suppose there is a cache memory device C12 waiting for its bus B1 to be released. In addition, the command output from the cache memory device C12 may be the second bus B which is lower than the second bus B depending on the contents of the second cache memory device C21.
Sometimes it is not necessary to issue a command to 2.

このような場合には、第1のキャッシュメモリ装置C11
からのコマンドを一旦差し戻して上記バスB1を解放さ
せ、キャッシュメモリ装置C12からのコマンドを第2の
キャッシュメモリ装置C21に受け入れ、これを処理した
方が全体的な処理効率が良くなる。つまり第2のバスB2
が解放されるまでの待ち時間を利用し、第2のバスB2に
コマンドを出力することの必要のない前記キャッシュメ
モリ装置C12からのコマンドが示す要求を先に処理して
しまうことにより、その処理効率を向上させることが期
待できる。
In such a case, the first cache memory device C11
If the command from the cache memory device C12 is once returned to release the bus B1, the command from the cache memory device C12 is accepted by the second cache memory device C21, and the command is processed, the overall processing efficiency is improved. That is, the second bus B2
Is used to process the request by the command from the cache memory device C12, which does not need to output the command to the second bus B2, by using the waiting time until it is released. It can be expected to improve efficiency.

しかしてこの実施例装置によれば、キャッシュメモリ装
置C11から第2のキャッシュメモリ装置C21に与えられた
コマンドは、第2のバスB2の占有によって上記第2のキ
ャッシュメモリ装置C21に組込まれた下位バス占有判定
装置8の作用により上記キャッシュメモリ装置C11に差
戻され、第1のバスB1が解放される。この第1のバスB1
の解放により、第2のキャッシュメモリ装置C21は第2
のバスB2が占有されてキャッシュメモリ装置C11からの
コマンドが待ち状態となっている期間を利用して、別の
キャッシュメモリ装置C12からの要求を処理することに
なる。
According to the device of this embodiment, however, the command given from the cache memory device C11 to the second cache memory device C21 is stored in the second cache memory device C21 due to the occupation of the second bus B2. By the operation of the bus occupation determination device 8, the data is returned to the cache memory device C11 and the first bus B1 is released. This first bus B1
Is released, the second cache memory device C21 becomes the second cache memory device C21.
The request from another cache memory device C12 will be processed by using the period in which the bus B2 is occupied and the command from the cache memory device C11 is waiting.

また第6図(b)は第2のキャッシュメモリ装置C21に
その上位バスB1からブロックのコピーを要求するコマン
ドが来たがキャッシュ・ミスし、更に下位の第2のバス
B2にコマンドを出す必要があるのだが、既に第2のバス
B2が別のコマンドによって占有されており、しかもその
コマンドがメインメモリ装置Mに達している状況を示し
ている。しかして一般的に、メインメモリ装置Mへのア
クセスには比較的長い時間が掛かるので、前述した第6
図(a)に示した状況下と同様に第2のバスB2が解放さ
れるまでには相当長い時間が掛かると予想される。この
ような状況でもデッドロックは起こらないので、第2の
キャッシュメモリ装置C21としては第2のバスB2が解放
されるのを待ち続けても良い。
Further, in FIG. 6 (b), a command requesting a copy of a block is sent from the upper bus B1 to the second cache memory device C21, but a cache miss occurs, and the second lower bus
I need to issue a command to B2, but already on the second bus
B2 is occupied by another command and the command reaches the main memory device M. However, in general, since it takes a relatively long time to access the main memory device M, the above-described sixth method is used.
It is expected that it will take a considerably long time before the second bus B2 is released as in the situation shown in FIG. Since the deadlock does not occur even in such a situation, the second cache memory device C21 may continue to wait until the second bus B2 is released.

ところがキャッシュメモリ装置C21の上位階層に、リー
ドまたはライトにミスしてバスにコマンドを出したいの
だが、上記キャッシュメモリ装置C21に到達しているコ
マンドによって第1のバスB1が占有されているので、当
該第1のバスB1が解放されるのを待っている別のキャッ
シュメモリ装置C12があるとする。しかしてこのキャッ
シュメモリ装置C12からの要求は第2のキャッシュメモ
リ装置C21にてヒットする可能性がある。
However, I want to issue a command to the bus due to a read or write miss in the upper hierarchy of the cache memory device C21, but since the command reaching the cache memory device C21 occupies the first bus B1, Suppose there is another cache memory device C12 waiting for the first bus B1 to be released. However, the request from the cache memory device C12 may hit the second cache memory device C21.

そこでこのような状況下では、第2のキャッシュメモリ
装置C21は上位バスB1から現在与えられているコマンド
を一旦差戻すことによって上記第1のバスB1を解放させ
る。そして別のキャッシュメモリ装置C12からの要求が
ヒットするかミスするかを判断し、ヒットして第2のバ
スB2にコマンドを出す必要がないことが確認された場合
には、第2のキャッシュメモリ装置C21は第1のバスB1
に上記キャッシュメモリ装置C12からの要求に対する応
答を返す。
Therefore, under such a circumstance, the second cache memory device C21 releases the first bus B1 by temporarily returning the command currently given from the higher-order bus B1. Then, it is determined whether a request from another cache memory device C12 hits or misses, and if it is confirmed that it is not necessary to issue a command to the second bus B2, the second cache memory Device C21 is the first bus B1
A response to the request from the cache memory device C12 is returned to.

また別のキャッシュメモリ装置C12からの要求がミス
し、このとき第2のバスB2が依然として他のコマンドに
よって占有されたままであるならば、上記キャッシュメ
モリ装置C12からのコマンドをそのまま第1のバスB1に
差戻す。また第2のバスB2が解放されていれば、キャッ
シュメモリ装置C12からのコマンドを第2のバスB2に出
力する。
If a request from another cache memory device C12 is missed and the second bus B2 is still occupied by another command at this time, the command from the cache memory device C12 is directly transmitted to the first bus B1. Send back to. If the second bus B2 is released, the command from the cache memory device C12 is output to the second bus B2.

つまり第2のキャッシュメモリ装置C21としては、その
下位の第2のバスB2が解放されるまでの待ち時間の間
に、上位階層から与えられるコマンドの内、第2のバス
B2にコマンドを出す必要の無いものに対して応答を返す
ことが可能となる。このことはプロセッサからの要求に
対するスループットの向上を図る上で顕著な効果を槽す
る。実際、前述した実施例装置によれば、下位側の第2
のバスB2が占有されているとき、下位バス占有判定装置
8は上位側から下位側に伝達しようとするコマンドに対
して差戻しの応答を返す。この結果、上位の第1のバス
B1が解放されるので、第2のキャッシュメモリ装置C21
は第2のバスB2が他のコマンドによって占有されている
間の、或るプロセッサからのコマンドの待ち時間を利用
して、他のプロセッサからの要求を処理することが可能
となる。
In other words, as the second cache memory device C21, the second bus among the commands given from the upper layer is waited during the waiting time until the lower second bus B2 is released.
It is possible to send back a response to those that do not need to issue commands to B2. This has a remarkable effect in improving the throughput with respect to the demand from the processor. In fact, according to the apparatus of the embodiment described above,
When the bus B2 is occupied, the lower bus occupancy determination device 8 sends back a reply response to the command to be transmitted from the upper side to the lower side. As a result, the first high-order bus
Since B1 is released, the second cache memory device C21
Allows the waiting time of a command from one processor while the second bus B2 is occupied by another command to process a request from another processor.

尚、この実施例では下位バス占有判定装置8をキャッシ
ュメモリ装置本体1の外に設けているが、キャッシュメ
モリ装置本体1の内部にその機能を持たせたり、キャッ
シュメモリ装置本体1におけるバス・コントローラ6に
その機能を持たせたりすることも当然可能である。
Although the lower bus occupancy determination device 8 is provided outside the cache memory device body 1 in this embodiment, the cache memory device body 1 is provided with its function, or the bus controller in the cache memory device body 1 is provided. Of course, it is also possible to give 6 the function.

ところで先の実施例では、デッドロック状況が発生しそ
うになったとき、下位バス(第2のバスB2)が占有され
ていることを判定してコマンドの差戻しを行ったが、実
際にデッドロック状況が発生する十分条件としては、第
2のバスB2が占有されているということよりも、むしろ
第2のキャッシュメモリ装置C2に対して第2のバスB2か
らコマンドが与えられたときの方が厳しい条件となる。
従って或るキャッシュメモリ装置が下位のバスにコマン
ドを出そうとしたときに、下位のバスからコマンドが与
えられているときに、上記上位からのコマンドを差戻す
ようにしてデッドロックを回避するようにしても良い。
By the way, in the above embodiment, when the deadlock situation is about to occur, it is judged that the lower bus (second bus B2) is occupied and the command is sent back. As a sufficient condition for occurrence of the above, rather than the fact that the second bus B2 is occupied, it is more severe when a command is given to the second cache memory device C2 from the second bus B2. It becomes a condition.
Therefore, when a certain cache memory device tries to issue a command to the lower bus, when a command is given from the lower bus, the command from the upper host is sent back to avoid deadlock. You can

第7図は前述したバス・コントローラ6自体に、上位側
と下位側とから同時にコマンドが与えられたとき、上位
側から与えられたコマンドを差戻す機能を持たせた実施
例について示すものである。即ち、バス・コントローラ
6に、上位バス側キャッシュ・コントローラ5からコマ
ンドが与えられたとき、下位バス(第2のバスB2)から
コマンドが与えられているか否かを検出する機能を持た
せ、第2のバスB2からコマンドが与えられている場合に
は、上記上位バス側キャッシュ・コントローラ5から与
えられたコマンドに対して、そのコマンドの差戻しを指
示する応答を返す機能を持たせたことを特徴としてい
る。
FIG. 7 shows an embodiment in which the above-mentioned bus controller 6 itself has a function of returning the command given from the upper side when the commands are given from the upper side and the lower side at the same time. . That is, the bus controller 6 is provided with a function of detecting whether or not a command is given from the lower bus (second bus B2) when the command is given from the upper bus side cache controller 5, When a command is given from the second bus B2, it has a function of returning a response to the command given from the upper-level bus side cache controller 5 for instructing the return of the command. I am trying.

このように構成された実施例装置によれば、第8図に示
すようにしてデッドロック状況の回避が行われる。
According to the embodiment apparatus configured as described above, the deadlock situation is avoided as shown in FIG.

今、第8図(a)に示すようにプロセッサP1が要求した
リードのコマンドが第1のキャッシュメモリ装置C11で
キャッシュ・ミスし、キャッシュメモリ装置C11が同じ
階層の他のキャッシュメモリ装置12と下位階層の第2の
キャッシュメモリ装置C2に対してブロックのコピーを要
求するコマンドを出したとする。ところが同じ階層のキ
ャッシュメモリ装置C12はそのブロックのコピーを持っ
ておらず、また下位の第2のキャッシュメモリ装置C2に
おいても上記コマンドに対してキャッシュ・ミスと判定
すると、当該第2のキャッシュメモリ装置C2における上
位バス側キャッシュ・コントローラ5は同じ階層のキャ
ッシュメモリ装置、またはメインメモリ装置Mに対して
ブロックのコピーを要求する為のコマンドをバス・コン
トローラ6に与える。
Now, as shown in FIG. 8A, the read command requested by the processor P1 causes a cache miss in the first cache memory device C11, and the cache memory device C11 is inferior to the other cache memory devices 12 in the same hierarchy. It is assumed that a command requesting copy of a block is issued to the second cache memory device C2 in the hierarchy. However, the cache memory device C12 of the same layer does not have a copy of the block, and if the lower second cache memory device C2 also determines that the command is a cache miss, the second cache memory device C12 concerned. The upper bus side cache controller 5 in C2 gives a command to the bus controller 6 for requesting a copy of a block to the cache memory device of the same hierarchy or the main memory device M.

ところがこの時、上記上位バス側キャッシュ・コントロ
ーラ5から与えられるコマンドとは別に、下位バス(第
2のバスB2)からブロックのコピーを要求するコマンド
がバス・コントローラ6に入ってきているものとする。
However, at this time, in addition to the command given from the high-order bus side cache controller 5, it is assumed that a command requesting block copy from the low-order bus (second bus B2) has entered the bus controller 6. .

しかしてこのような状況下では、前述したようにバス・
コントローラ6は上位からコマンドが来たときに、下位
のバスからコマンドを受けており、未だにそれに対する
応答を返していない場合には、上記上位からのコマンド
に対して差戻しの応答を返すという機能を持っている。
上述した第8図(a)に示す状態はまさにその状況なの
で、バス・コントローラ6は前記上位バス側キャッシュ
・コントローラ5に対して、第8図(b)に示すように
そのコマンドの差戻しを指示する応答を返すことにな
る。
However, under such circumstances, as mentioned above,
The controller 6 has a function of returning a send-back response to the command from the above-mentioned command when the command is received from the lower-order bus when the command comes from the higher-order and has not yet returned the response to it. have.
Since the state shown in FIG. 8 (a) is just that, the bus controller 6 instructs the cache controller 5 on the upper bus side to send back the command as shown in FIG. 8 (b). Will be returned.

またこのようなコマンドの差戻しが行われる間には、第
2のバスB2から与えられるコマンドは前記バス・コント
ローラ6からスヌープ・コントローラ7に伝えられてい
る。
While the command is being sent back, the command given from the second bus B2 is transmitted from the bus controller 6 to the snoop controller 7.

ここでスヌープ・コントローラ7は上記第2のバスB2か
ら与えられるコマンドが要求するブロックを持っている
が、その内容は更に上位のキャッシュメモリ装置C12に
おいて既に更新されているものとする。するとこの場合
には、スヌープ・コントローラ7はその上位のキャッシ
ュメモリ装置C12からブロックのコピーを持ってくるべ
く、そのコマンドを上位バス(第1のバスB1)に出そう
とする。ところが第1のバスB1は前記キャッシュメモリ
装置C11からのコマンドによって占有されたままの状態
であるので、スヌープ・コントローラ7は第1のバスB1
が解放されるのを待ち続けることになる。
Here, the snoop controller 7 has a block requested by the command given from the second bus B2, but it is assumed that the content has already been updated in the cache memory device C12 of a higher level. Then, in this case, the snoop controller 7 tries to issue the command to the upper bus (first bus B1) in order to bring a copy of the block from the upper cache memory device C12. However, since the first bus B1 is still occupied by the command from the cache memory device C11, the snoop controller 7 operates the first bus B1.
Will continue to wait for the release.

しかしてこのような状況にある時、第8図(c)に示す
ように、前記バス・コントローラ6からのコマンドの差
戻しの応答を受けた上位バス側コントローラ5は、第1
のバスB1に対してコマンドの差し戻しの応答を送出して
いる。この結果、コマンドの差戻しの応答を受けたキャ
ッシュメモリ装置C11は第1のバスB1を解放するので、
第8図(d)に示すように第2のキャッシュメモリ装置
C2のスヌープ・コントローラ7が第1のバスB1に対して
コマンドを送出することが可能となる。
However, in such a situation, as shown in FIG. 8 (c), the host bus side controller 5 which has received the response from the bus controller 6 for returning the command is
Sending back a command return response to the bus B1. As a result, the cache memory device C11 that has received the response to send back the command releases the first bus B1.
As shown in FIG. 8 (d), a second cache memory device
The snoop controller 7 of C2 can send a command to the first bus B1.

こうして第2のキャッシュメモリ装置C2におけるデッド
ロックの発生が回避され、第2のキャッシュメモリ装置
C2から出力されるコマンドは目的とする第1のキャッシ
ュメモリ装置C12に到達する。尚、キャッシュメモリ装
置C11に差戻されたコマンドは、前記キャッシュメモリ
装置C12に与えられたコマンドに対する応答が返され、
第1のバスB1が解放されるのを待って、再び第1のバス
B1に送出される。
In this way, the occurrence of deadlock in the second cache memory device C2 is avoided, and the second cache memory device C2
The command output from C2 reaches the target first cache memory device C12. The command sent back to the cache memory device C11 is a response to the command given to the cache memory device C12,
Wait for the first bus B1 to be released and then again the first bus
Dispatched to B1.

ところで上述したような階層構造を持つキャッシュメモ
リ装置において、或るキャッシュメモリ装置に上位バス
からブロックのコピーを要求するコマンドが来ても、必
ずしも下位のバスにコマンドを出さなければならないと
いうわけではない。下位バスにコマンドを出す必要があ
るのは、或る限られた条件下においてだけである。具体
的には上位バスからのコマンドが要求するブロックをキ
ャッシュメモリ装置が持っておらず、他のキャッシュメ
モリ装置にそのブロックのコピーを要求する場合や、或
いはメインメモリ装置Mにブロックのコピーをコピーバ
ックする場合、更には他のキャッシュメモリ装置のブロ
ックの内容を無効化する場合等である。
By the way, in the cache memory device having the hierarchical structure as described above, even if a command for copying a block comes from a higher-order bus to a certain cache memory device, the command does not necessarily have to be issued to the lower-order bus. . It is only under certain limited conditions that a lower bus needs to be commanded. Specifically, when the cache memory device does not have the block requested by the command from the higher-order bus and requests the copy of the block to another cache memory device, or when the copy of the block is copied to the main memory device M. For example, when backing up, or when invalidating the contents of a block of another cache memory device.

同様に下位のバスからコマンドが来ても、必ずしも上位
のバスにコマンドを出さなければならないわけではな
い。具体的にはそのキャッシュメモリ装置の或るブロッ
クの内容が、その上位のキャッシュメモリ装置において
更新されており、しかもそのデータが書戻されていない
時にそのデータを読みに行く場合や、その上位のキャッ
シュメモリ装置の内容を無効化する場合である。
Similarly, even if a command comes from a lower bus, it does not necessarily have to be issued to a higher bus. Specifically, when the content of a block of the cache memory device is updated in the cache memory device of the upper level, and the data is not written back, the data is read, This is a case where the contents of the cache memory device are invalidated.

第9図はこのようなデッドロックが本当に起こり得る状
況においてのみ、コマンドの差戻しを行うように最適化
した実施例について示すものである。
FIG. 9 shows an embodiment which is optimized so as to send back a command only in a situation where such a deadlock can really occur.

この実施例におけるキャッシュメモリ装置は、前述した
構成のキャッシュメモリ装置本体1に、デッドロック回
避装置9を設けて実現される。
The cache memory device in this embodiment is realized by providing the deadlock avoidance device 9 in the cache memory device body 1 having the above-described configuration.

このデッドロック回避装置9は、当該キャッシュメモリ
装置が上位バス(第1のバスB1)と下位バス(第2のバ
スB2)にそれぞれ出そうとしているコマンドを検出し
て、両方のコマンドが出されているときに、下位バス
(第2のバスB2)に出そうとしているコマンドに対して
コマンドの巻戻させる応答を返す機能を備えたものであ
る。つまりその上位の第1のバスB1からのコマンドを受
けてその下位の第2のバスB2に対してコマンドを出そう
とする際、同時に第2のバスB2から与えられたコマンド
を第1のコマンドB1に伝達しようとしているときには、
上記第2のバスB2に出そうとするコマンドの出力を中止
し、そのコマンドを前記第1のバスB1に差戻す機能を持
つものである。
The deadlock avoidance device 9 detects a command that the cache memory device is trying to issue to the upper bus (first bus B1) and the lower bus (second bus B2) respectively, and both commands are issued. In the meantime, it has a function of returning a response for rewinding the command to the command which is about to be issued to the lower bus (second bus B2). That is, when the command from the upper first bus B1 is received and the command is issued to the lower second bus B2, the command given from the second bus B2 is simultaneously sent to the first command. When trying to communicate to B1,
It has a function of stopping the output of the command to be output to the second bus B2 and sending the command back to the first bus B1.

このように構成された実施例装置によれば、第10図に示
すようにしてデッドロックの発生が回避される。
According to the embodiment apparatus configured as described above, the occurrence of deadlock is avoided as shown in FIG.

即ち、第10図(a)はデッドロック回避装置9にバス・
コントローラ6からの第2(下位)のバスB2に出力すべ
きコマンドと、スヌープ・コントローラ7からの第1
(上位)のバスB1に出力すべきコマンドとが同時与えら
れた状況を示している。このようにしてバス・コントロ
ーラ6のコマンドが与えられると、デッドロック回避装
置9はスヌープ・コントローラ7からのコマンドが来て
いるかどうかを判定し、実際にスヌープ・コントローラ
7からコマンドが来ていることを確認して第10図(b)
に示すように前記バス・コントローラ6に対してコマン
ドを差戻しをさせる為の応答を返す。
That is, FIG. 10 (a) shows the deadlock avoidance device 9
The command to be output to the second (lower) bus B2 from the controller 6 and the first command from the snoop controller 7
This shows a situation in which a command to be output to the (upper) bus B1 is simultaneously given. In this way, when the command from the bus controller 6 is given, the deadlock avoidance device 9 judges whether the command from the snoop controller 7 has come, and that the command actually comes from the snoop controller 7. Confirm and confirm Fig. 10 (b).
As shown in (4), a response for sending back a command is returned to the bus controller 6.

するとこのデッドロック回避装置9からのコマンドの差
戻しの応答を受けたバス・コントローラ6は、第10図
(c)に示すように上位バス側キャッシュ・コントロー
ラ5に対してコマンドを差戻しをさせる為の応答を返
す。この結果、第10図(d)に示すように、コマンドの
差戻しの応答を受けた上位バス側キャッシュ・コントロ
ーラ5は、その上位バス(第1のバスB1)に対してその
コマンドの差戻しを応答を返すことになる。
Then, the bus controller 6 which has received the response for sending back the command from the deadlock avoidance device 9 sends back the command to the upper cache controller 5 as shown in FIG. 10 (c). Return a response. As a result, as shown in FIG. 10 (d), the upper bus side cache controller 5 that has received the command send back response sends a command send back response to the upper bus (first bus B1). Will be returned.

この結果、コマンドの要求元であるプロセッサP1のキャ
ッシュメモリ装置C11は上記差戻しの応答を受けて第1
のバスB1を解放する。そして第1のバスB1が解放される
と、第10図(e)に示すようにデッドロック回避装置9
は前記スヌープ・コントローラ7からのコマンドを第1
のバスB1に送出し、目的とする第1のキャッシュメモリ
装置C12に、そのブロックのコピーを要求することがで
きる。
As a result, the cache memory device C11 of the processor P1, which is the request source of the command, receives the first response in response to the above-mentioned return response.
Release bus B1. Then, when the first bus B1 is released, as shown in FIG. 10 (e), the deadlock avoidance device 9
Is the first command from the snoop controller 7.
To the target first cache memory device C12 to request a copy of the block.

このような実施例装置によれば、実際にデッドロックが
発生する状況となった場合のみ、上位側からのコマンド
が差戻されることになる。この点、先の2つの実施例で
はデッドロックが発生しない場合であってもコマンドの
差戻しが行われる点で、そのキャッシュ制御に若干の異
なりはあるが、本質的にはこれらの各制御形態によりデ
ッドロックの発生が効果的に回避することができ、また
下位のバスが占有されている期間を利用して上位側の他
のプロセッサからの要求に効果的に対応することが可能
となり、全体的な処理効率の向上を図ることが可能とな
る。
According to the apparatus of this embodiment, the command from the upper side is returned only when the deadlock actually occurs. In this respect, although the cache control is slightly different in that the commands are returned even if the deadlock does not occur in the above two embodiments, the cache control is basically different depending on each of these control modes. It is possible to effectively avoid the occurrence of deadlock, and it is possible to effectively respond to requests from other processors on the upper side by utilizing the period in which the lower bus is occupied. It is possible to improve various processing efficiency.

尚、本発明は上述した各実施例に限定されるものではな
い。例えばキャッシュメモリ装置本体の構成や、コマン
ドの差戻しを行うための条件判定等は、そのシステム仕
様に応じて定めれば良いものである。また3階層以上に
キャッシュメモリ装置を構築して個々のキャッシュメモ
リにおけるデッドロックの発生を回避するようにしても
良い。その他、本発明はその要旨を逸脱しない範囲で種
々変形して実施することが可能である。
The present invention is not limited to the above embodiments. For example, the configuration of the main body of the cache memory device, the condition determination for sending back the command, and the like may be determined according to the system specifications. Further, the cache memory device may be constructed in three or more layers to avoid the occurrence of deadlock in each cache memory. In addition, the present invention can be variously modified and implemented without departing from the scope of the invention.

[発明の効果] 以上詳述したように本発明によれば、階層構造をもつメ
モリ装置においてキャッシュメモリ装置におけるデッド
ロックの発生を効果的に回避することができ、しかも複
数のプロセッサからの要求に対する処理効率の大幅な向
上を図ることができる等、簡易にして実用上多大なる効
果が奏せられる。
As described in detail above, according to the present invention, it is possible to effectively avoid the occurrence of deadlock in a cache memory device in a memory device having a hierarchical structure, and to respond to requests from a plurality of processors. The processing efficiency can be greatly improved by greatly improving the processing efficiency.

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

第1図は本発明の処理概念を示す図、第2図は本発明が
適用されるキャッシュメモリ装置の階層構造の概念を示
す図、第3図は従来装置におけるデッドロックの発生状
況を模式的に示す図,第4図は本発明の第1の実施例に
係る或る階層のキャッシュメモリ装置の要部概略構成を
示す図、第5図は第1の実施例におけるキャッシュメモ
リ装置内部におけるコマンドと応答の流れを示す図、第
6図は本発明によるプロセッサからの要求に対するスル
ープットの向上を模式的に示す図、第7図は第2の実施
例装置の要部概略構成図、第8図は第2の実施例装置に
おけるコマンドと応答の流れを示す図、第9図は第3の
実施例装置の要部概略構成図、第10図は第3の実施例装
置におけるコマンドと応答の流れを示す図である。 P……プロセッサ、C1……第1のキャッシュメモリ装
置、B1……第1のバス、C2……第2のキャッシュメモリ
装置、B2……第2のバス、M……メインメモリ装置、1
……キャッシュメモリ装置本体、2……上位バス(第1
のバスB1)、3……下位バス(第2のバスB2)、4……
RAM、5……上位バス側キャッシュ・コントローラ、6
……バス・コントローラ、7……スヌープ・コントロー
ラ、8……下位バス占有判定装置、9……デッドロック
回避装置。
FIG. 1 is a diagram showing a processing concept of the present invention, FIG. 2 is a diagram showing a concept of a hierarchical structure of a cache memory device to which the present invention is applied, and FIG. 3 is a schematic view of a deadlock occurrence state in a conventional device. 4 and FIG. 4 are diagrams showing a schematic configuration of a main part of a cache memory device of a certain hierarchy according to the first embodiment of the present invention, and FIG. 5 is a command inside the cache memory device in the first embodiment. And FIG. 6 is a diagram showing the flow of response, FIG. 6 is a diagram schematically showing the improvement of the throughput in response to a request from the processor according to the present invention, FIG. 7 is a schematic configuration diagram of a main part of the second embodiment device, and FIG. Is a diagram showing the flow of commands and responses in the device of the second embodiment, FIG. 9 is a schematic configuration diagram of the essential parts of the device of the third embodiment, and FIG. 10 is a flow of commands and responses in the device of the third embodiment. FIG. P ... Processor, C1 ... First cache memory device, B1 ... First bus, C2 ... Second cache memory device, B2 ... Second bus, M ... Main memory device, 1
...... Cash memory device main unit, 2 …… High-order bus (1st
Bus B1), 3 …… Lower bus (second bus B2), 4 ……
RAM, 5 ... High-level bus side cache controller, 6
...... Bus controller, 7 ...... Snoop controller, 8 ...... Lower-order bus occupation determination device, 9 ...... Deadlock avoidance device.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】複数のプロセッサのそれぞれに対応して設
けられた複数の第1のキャッシュメモリ装置と、これら
の第1のキャッシュメモリ装置を複数個づつ相互接続し
た複数の上位側のバスを介して上記第1のキャッシュメ
モリ装置にそれぞれ接続された複数の第2のキャッシュ
メモリ装置と、これらの第2のキャッシュメモリ装置を
相互に接続した下位側のバスを介して前記第2のキャッ
シュメモリ装置に接続されたメインメモリ装置とを備え
た階層キャッシュメモリ装置において、 第2のキャッシュメモリ装置は、上位側のバスからのコ
マンドを受けて下位側のバスにコマンドを出力しようと
する際、上記下位側のバスが既に他の装置により占有さ
れているか否かを判定する判定手段と、 この判定手段で当該下位側のバスが占有されていること
が判定されたときには、前記上位側のバスからのコマン
ドをその要求元に差戻して当該上位側のバスを解放する
差戻し手段と を備えたことを特徴とする階層キャッシュメモリ装置。
1. A plurality of first cache memory devices provided corresponding to each of a plurality of processors, and a plurality of upper-side buses interconnecting a plurality of these first cache memory devices. And a plurality of second cache memory devices respectively connected to the first cache memory device, and the second cache memory device via a lower-order bus interconnecting these second cache memory devices. In a hierarchical cache memory device including a main memory device connected to the second cache memory device, the second cache memory device receives the command from the upper bus and outputs the command to the lower bus. Determination means for determining whether or not the side bus is already occupied by another device, and this determination means determines that the lower side bus is occupied. When Rukoto is determined, hierarchical cache memory device which is characterized in that a remand means for releasing the bus of the upper side remand commands from the host side of the bus to the requester.
JP1240253A 1989-09-18 1989-09-18 Hierarchical cache memory device Expired - Lifetime JPH077358B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1240253A JPH077358B2 (en) 1989-09-18 1989-09-18 Hierarchical cache memory device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1240253A JPH077358B2 (en) 1989-09-18 1989-09-18 Hierarchical cache memory device

Publications (2)

Publication Number Publication Date
JPH03102546A JPH03102546A (en) 1991-04-26
JPH077358B2 true JPH077358B2 (en) 1995-01-30

Family

ID=17056741

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1240253A Expired - Lifetime JPH077358B2 (en) 1989-09-18 1989-09-18 Hierarchical cache memory device

Country Status (1)

Country Link
JP (1) JPH077358B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5572704A (en) * 1993-12-15 1996-11-05 Silicon Graphics, Inc. System and method for controlling split-level caches in a multi-processor system including data loss and deadlock prevention schemes

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS619747A (en) * 1984-06-26 1986-01-17 Matsushita Electric Ind Co Ltd Bus controller
US4755930A (en) * 1985-06-27 1988-07-05 Encore Computer Corporation Hierarchical cache memory system and method

Also Published As

Publication number Publication date
JPH03102546A (en) 1991-04-26

Similar Documents

Publication Publication Date Title
US5274787A (en) Method of copy-back cache coherence control and tightly coupled multi-processor system with split transfer system bus
CA1224572A (en) Fast path means for storage accesses
US5434993A (en) Methods and apparatus for creating a pending write-back controller for a cache controller on a packet switched memory bus employing dual directories
KR0163231B1 (en) Input / Output Channel Controllers, Multiprocessing Systems, and Data Processing Methods
EP0667578B1 (en) Apparatus and method for checking cache coherency with double snoop mechanism
JP3533355B2 (en) Cache memory system
US6330643B1 (en) Cache coherency protocols with global and local posted operations
US6145059A (en) Cache coherency protocols with posted operations and tagged coherency states
US8176261B2 (en) Information processing apparatus and data transfer method
KR100704089B1 (en) Method and apparatus for acceleration of provisional load of multiprocessor system using L2 directory
KR20040012812A (en) Method and apparatus for facilitating speculative stores in a multiprocessor system
JPH0576060B2 (en)
US5822756A (en) Microprocessor cache memory way prediction based on the way of a previous memory read
WO1999035578A1 (en) Method for increasing efficiency in a multi-processor system and multi-processor system with increased efficiency
US5987544A (en) System interface protocol with optional module cache
US5822765A (en) System and method for resolving contention arising from execution of cache coherency operations in a multiple cache computer system
JPH11272552A (en) Bridge method, bus bridge, and multiprocessor system
JPH0748197B2 (en) How to secure a data bus
US5701422A (en) Method for ensuring cycle ordering requirements within a hierarchical bus system including split-transaction buses
US5778441A (en) Method and apparatus for accessing split lock variables in a computer system
JPH07152647A (en) Shared memory multiprocessor
JP3814521B2 (en) Data processing method and apparatus
US6347361B1 (en) Cache coherency protocols with posted operations
US6345340B1 (en) Cache coherency protocol with ambiguous state for posted operations
CA2113867C (en) Method and system for enhanced efficiency of data transfers from memory to multiple processors in a data processing system

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term