JPH04296951A - Cache memory - Google Patents

Cache memory

Info

Publication number
JPH04296951A
JPH04296951A JP3054299A JP5429991A JPH04296951A JP H04296951 A JPH04296951 A JP H04296951A JP 3054299 A JP3054299 A JP 3054299A JP 5429991 A JP5429991 A JP 5429991A JP H04296951 A JPH04296951 A JP H04296951A
Authority
JP
Japan
Prior art keywords
memory
processor
spinlock
cache
shared
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP3054299A
Other languages
Japanese (ja)
Inventor
Toyohito Hatashita
畑下 豊仁
Minoru Shiga
稔 志賀
Hitoshi Ishida
仁志 石田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP3054299A priority Critical patent/JPH04296951A/en
Publication of JPH04296951A publication Critical patent/JPH04296951A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To reduce the using rate of a shared bus and to prevent such a case where plural memories success the spin lock at one time for a tight coupling type multiprocessor by providing a means which detects the write of an indivisible cycle from a processor and a control means which invalidates the corresponding entry when the preceding write is detected. CONSTITUTION:A cache data memory 11 stores the entries of data read out of a shared memory 4 by the processors 1A and 1B. When the requests are produced for the spin lock bits which are written into the memory 4 from both processors 1A and 1B, an indivisible cycle write detector 15 detects the indivisible cycle write requests given from the processors 1A and 1B. Then a shared bus access control circuit 17 writes the data into a shared bus, and a control circuit 14 writes the invalid information into a control bit of a cache directory memory 7. Thus the entry of the pin lock bit is invalidated in the memory 11.

Description

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

【0001】0001

【産業上の利用分野】この発明は主記憶装置のアクセス
時間とプロセッサとのサイクル・タイムの差を埋めるた
めに両者の間におかれるキャッシュメモリに関するもの
であり、特に、プロセッサからのスピンロック要求時に
、不可分サイクルの書込みを実行し、その書込みが実行
されたスピンロックビットのエントリを無効にするキャ
ッシュメモリに関するものである。
[Field of Industrial Application] This invention relates to a cache memory that is placed between a main memory device and a processor in order to bridge the difference between the access time and the cycle time between the two. Sometimes it concerns a cache memory that performs an atomic cycle write and invalidates the spinlock bit entry on which the write was performed.

【0002】0002

【従来の技術】図7は、従来のキャッシュメモリを用い
た密結合型マルチプロセッサシステムを示すブロック図
である。同図において、(1A)及び(1B)はプロセ
ッサ、(2A)はプロセッサ(1A)に接続されたキャ
ッシュメモリ、(2B)はプロセッサ(1B)に接続さ
れたキャッシュメモリ、(4)は共有メモリ、(5)は
同期用メモリである。なお、キャッシュメモリ(2A)
及び(2B)、共有メモリ(4)並びに同期用メモリ(
5)は共有バス(3)に接続されている。また、プロセ
ッサ(1A)及び(1B)並びにキャッシュメモリ(2
A)及び(2B)は複数存在するが、ここでは2組を例
として示している。
2. Description of the Related Art FIG. 7 is a block diagram showing a tightly coupled multiprocessor system using a conventional cache memory. In the figure, (1A) and (1B) are processors, (2A) is a cache memory connected to processor (1A), (2B) is a cache memory connected to processor (1B), and (4) is a shared memory. , (5) is a synchronization memory. In addition, cache memory (2A)
and (2B), shared memory (4) and synchronization memory (
5) is connected to the shared bus (3). In addition, processors (1A) and (1B) and cache memory (2
Although there are a plurality of A) and (2B), two sets are shown here as examples.

【0003】次に、密結合型マルチプロセッサシステム
の動作を説明する。密結合型マルチプロセッサシステム
では、共有資源を使用するに当たって排他制御を行う必
要がある。排他制御の最下位レベルのものにスピンロッ
クとよばれるものがある。ここでは、このスピンロック
を例にして説明する。スピンロックとは、共有領域に存
在する所定のビット(以下、スピンロックビットという
)の値によって、その共有領域の共有資源の使用の可否
を決定するものである。詳しく説明すると、スピンロッ
クビットがセットされていなければ、スピンロックは解
放状態であって共有資源は使用することができ、セット
されていればスピンロックはロック状態であって共有資
源は使用することができない。スピンロックは、通常ビ
ジーウエイトで制御され、不可分サイクルで実行される
。不可分サイクルとは、例えばスピンロックを確実に行
うためのプロセッササイクルのことであって、プロセッ
サがデータを読み出して、処理を行い、書込みを行う間
の中断できないサイクルのことをいう。
Next, the operation of a tightly coupled multiprocessor system will be explained. In a tightly coupled multiprocessor system, it is necessary to perform exclusive control when using shared resources. The lowest level of exclusive control is called a spinlock. Here, this spinlock will be explained as an example. A spinlock is a device that determines whether or not shared resources in a shared area can be used, depending on the value of a predetermined bit (hereinafter referred to as a spinlock bit) present in the shared area. Specifically, if the spinlock bit is not set, the spinlock is in a released state and shared resources can be used; if it is set, the spinlock is in a locked state and shared resources cannot be used. I can't. Spinlocks are usually busy-wait controlled and executed in atomic cycles. The non-divisible cycle refers to a processor cycle for reliably performing a spin lock, for example, and refers to a cycle that cannot be interrupted while the processor reads, processes, and writes data.

【0004】ここで、具体的なスピンロック動作を図7
及び図8を参照しながら説明する。図8は、共有メモリ
(4)を使用してスピンロックが実行される場合の状態
遷移図である。ここでのキャッシュメモリの無矛盾化プ
ロトコルはライトスルーアルゴリズムとし、プロセッサ
(1A)及び(1B)からの書込みは全て共有バス(3
)上に出力されるものとする。
[0004] Here, a specific spinlock operation is shown in FIG.
This will be explained with reference to FIG. FIG. 8 is a state transition diagram when a spin lock is executed using the shared memory (4). The cache memory consistency protocol here is a write-through algorithm, and all writes from processors (1A) and (1B) are performed on the shared bus (3
) shall be output on the top.

【0005】初期状態(状態601)では、プロセッサ
(1A)及び(1B)は他の動作を行っており、キャッ
シュメモリ(2A)及び(2B)にはスピンロックビッ
トは入っておらず(エントリがない)、共有メモリ(4
)上のスピンロックビットは解放状態とする。
In the initial state (state 601), the processors (1A) and (1B) are performing other operations, and the cache memories (2A) and (2B) do not contain spinlock bits (no entries exist). (no), shared memory (4
) shall be in the released state.

【0006】ここで、プロセッサ(1A)はスピンロッ
クを要求すると、不可分サイクルの読みだしを実行して
共有メモリ(4)からスピンロックビットを読み出す。 このとき、キャッシュメモリ(2A)に解放状態を示す
スピンロックビットが入り、キャッシュメモリ(2A)
ではスピンロックビットのエントリが有効になる。(状
態602)プロセッサ(1A)は、スピンロックビット
が解放状態であることからスピンロックに成功したこと
を知り、不可分サイクルの書込みを実行して共有メモリ
(4)上のスピンロックビットをロック状態にする。こ
のとき、キャッシュメモリ(1A)上のスピンロックビ
ットもロック状態にされる。なお、キャッシュメモリ(
2A)でのスピンロックビットのエントリは有効のまま
である。(状態603)このようにしてスピンロックに
成功したプロセッサ(1A)は共有データの処理を行う
。(状態604)
[0006] When the processor (1A) requests a spinlock, it executes an indivisible cycle read and reads the spinlock bit from the shared memory (4). At this time, a spinlock bit indicating a release state is entered in the cache memory (2A), and the cache memory (2A)
The spinlock bit entry becomes valid. (State 602) The processor (1A) knows that the spinlock is successful because the spinlock bit is in the released state, and executes an atomic cycle write to set the spinlock bit on the shared memory (4) to the locked state. Make it. At this time, the spinlock bit on the cache memory (1A) is also locked. Note that cache memory (
The spinlock bit entry at 2A) remains valid. (State 603) The processor (1A) that has successfully acquired the spinlock in this way processes the shared data. (State 604)

【0007】プロセッサ(1A)は、共有データの処理
を終えると、通常の書込み動作を行ってキャッシュメモ
リ(2A)上のスピンロックビット及び共有メモリ(4
)上のスピンロックビットを解放状態にする。なお、キ
ャッシュメモリ(2A)上でのスピンロックビットのエ
ントリは有効のままである。(状態605)この後、プ
ロセッサ(1A)は他の動作を行う。(状態606)
When the processor (1A) finishes processing the shared data, it performs a normal write operation and writes the spinlock bit on the cache memory (2A) and the shared memory (4).
) to release the spinlock bit on the top. Note that the spinlock bit entry on the cache memory (2A) remains valid. (State 605) After this, the processor (1A) performs other operations. (state 606)

【0008】次に、プロセッサ(1A)及び(1B)が
それぞれキャッシュメモリ(2A)及び(2B)に同時
にスピンロックを要求する場合について説明する。プロ
セッサ(1A)は不可分サイクルの読みだしを実行して
キャッシュメモリ(2A)からスピンロックビットを読
み出す。また、プロセッサ(1B)は不可分サイクルの
読みだしを実行して共有メモリ(4)からスピンロック
ビットを読み出す。キャッシュメモリ(2B)ではスピ
ンロックビットのエントリが有効になる。(状態607
)プロセッサ(1A)及び(1B)は、ともにスピンロ
ックビットが解放状態であることを知ってスピンロック
に成功したと判断し、不可分サイクルの書込みを実施し
て共有メモリ(4)上のスピンロックビットをロック状
態にする。(状態608)このように、共有メモリ(4
)を使用してスピンロックを行うと、複数のプロセッサ
(1A)及び(1B)が同時にスピンロックに成功する
という矛盾が生じる。
Next, a case will be described in which processors (1A) and (1B) simultaneously request spinlocks from cache memories (2A) and (2B), respectively. The processor (1A) executes an atomic cycle read to read the spinlock bit from the cache memory (2A). The processor (1B) also executes an atomic cycle read to read the spinlock bit from the shared memory (4). In the cache memory (2B), the spinlock bit entry becomes valid. (Status 607
) Processors (1A) and (1B) both know that the spinlock bit is in the released state, determine that the spinlock has been successfully acquired, and execute an atomic cycle write to release the spinlock on the shared memory (4). Lock the bit. (State 608) In this way, the shared memory (4
) to perform a spinlock, a contradiction arises in that multiple processors (1A) and (1B) successfully acquire a spinlock at the same time.

【0009】そこで、従来、スピンロックは同期用メモ
リ(5)を使用して行われていた。同期用メモリ(5)
の領域をキャッシュ禁止領域に指定すると、解放状態に
あるスピンロックビットが複数箇所、ここでは、キャッ
シュメモリ(2A)及び共有メモリ(4)に存在すると
いう状態が発生しない。
[0009] Conventionally, therefore, spin locking has been performed using a synchronization memory (5). Synchronization memory (5)
If the area is designated as a cache-inhibited area, a situation in which spinlock bits in the released state exist in multiple locations, here, in the cache memory (2A) and the shared memory (4), does not occur.

【0010】0010

【発明が解決しようとする課題】従来のキャッシュメモ
リ(1A)及び(1B)を用いてスピンロックを行うと
、同期用メモリ(5)の領域をキャッシュ禁止領域に指
定しなければならず、ソフトウエア上の制約が生じる。 また、その領域に対するアクセスはすべて共有バス(3
)に出力されることになるので、共有バス(3)のバン
ド幅が圧迫される。更に、スピンロックはビジーウエイ
ト動作なので、例えばスピンロックに失敗したプロセッ
サ(1A)は、スピンロックに成功したプロセッサ(1
B)がスピンロックビットを解放するまで共有メモリ(
4)をアクセス(スピンロック要求)し続けるので、無
駄に共有バス(3)を使用することになり、他のプロセ
ッサのアクセスを妨害するという問題点があった。
[Problems to be Solved by the Invention] When performing a spinlock using the conventional cache memories (1A) and (1B), the area of the synchronization memory (5) must be designated as a cache-inhibited area, and software Restrictions on clothing arise. In addition, all access to that area is via the shared bus (3
), which puts pressure on the bandwidth of the shared bus (3). Furthermore, since a spinlock is a busy-wait operation, for example, a processor (1A) that has failed to acquire a spinlock will not be able to acquire a spinlock (1A).
shared memory (
4) continues to be accessed (spinlock request), the shared bus (3) is used in vain, and there is a problem in that it interferes with access by other processors.

【0011】この発明は、このような問題点を解決する
ためになされたもので、共有メモリにおいてスピンロッ
クを実現し、プロセッサから共有メモリへの無駄なアク
セスをなくして共有バスの使用率を小さくするキャッシ
ュメモリを得ることを目的とする。
[0011] The present invention was made to solve these problems, and it realizes a spin lock in the shared memory, eliminates wasteful access from the processor to the shared memory, and reduces the usage rate of the shared bus. The purpose is to obtain cache memory for

【0012】0012

【課題を解決するための手段】この発明に係るキャッシ
ュメモリは、次の手段を備えたものである。 [1]  プロセッサからの不可分サイクルの書込みを
検出する検出手段。 [2]  上記不可分サイクルの書込み検出時に当該エ
ントリを無効化する制御手段。
[Means for Solving the Problems] A cache memory according to the present invention includes the following means. [1] Detection means for detecting writing of an indivisible cycle from the processor. [2] A control means for invalidating the entry when writing of the indivisible cycle is detected.

【0013】[0013]

【作用】この発明においては、検出手段によって、プロ
セッサからの不可分サイクルの書込みが検出される。ま
た、制御手段によって、上記不可分サイクルの書込み検
出時に当該エントリが無効化される。
In the present invention, the detection means detects writing of an indivisible cycle from the processor. Further, the control means invalidates the entry when writing of the indivisible cycle is detected.

【0014】[0014]

【実施例】この発明の第1実施例の構成を図1を参照し
ながら説明する。図1は、この発明の第1実施例(2A
A)、(2BA)を示すブロック図である。同図におい
て、(6)、(8)及び(10)は選択器であって、プ
ロセッサアドレスバス(1a)及び共有アドレスバス(
3a)が接続される。 (7)は選択器(6)の出力側と接続されるキャッシュ
ディレクトリメモリである。(9)は選択器(8)の出
力側及びキャッシュディレクトリメモリ(7)の出力側
と接続される比較器である。(11)は選択器(10)
の出力側と接続されるキャッシュデータメモリである。 (12)及び(13)はトランシーバであって、それぞ
れプロセッサデータバス(1c)及び共有データバス(
3c)をキャッシュデータメモリ(11)に接続させる
。(14)は制御回路であって、プロセッサ制御バス(
1b)及び共有制御バス(3b)と接続され、制御線(
14a)、ヒット判定線(9a)及び制御線(14b)
を介してそれぞれキャッシュディレクトリメモリ(7)
、比較器(9)及びキャッシュデータメモリ(11)に
接続される。(15)は不可分サイクルの書込み検出器
であって、プロセッサ書込み線(15b)及びプロセッ
サ不可分サイクル線(15c)を介してプロセッサ制御
バス(1b)に接続され、不可分サイクル書込み検出線
(15a)を介して制御回路(14)に接続される。 (16)はバッファであって、キャッシュディレクトリ
メモリ(7)に接続され、かつ生成制御ビットバス(1
4d)を介して制御回路(14)に接続される。(17
)は共有バスアクセス制御回路であって、プロセッサ制
御バス(1b)が接続され、制御線(14c)を介して
制御回路(14)に接続される。 なお、制御回路(14)から選択器(6)、(8)及び
(10)への制御線は省略されている。また、プロセッ
サアドレスバス(1a)、プロセッサ制御バス(1b)
及びプロセッサデータバス(1c)はプロセッサ(1A
)及び(1B)に接続され、共有アドレスバス(3a)
、共有制御バス(3b)及び共有データバス(3c)は
共有メモリ(4)に接続される。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The structure of a first embodiment of the present invention will be described with reference to FIG. FIG. 1 shows a first embodiment (2A) of the present invention.
It is a block diagram showing A), (2BA). In the figure, (6), (8) and (10) are selectors, which include a processor address bus (1a) and a shared address bus (1a).
3a) is connected. (7) is a cache directory memory connected to the output side of the selector (6). (9) is a comparator connected to the output side of the selector (8) and the output side of the cache directory memory (7). (11) is the selector (10)
This is a cache data memory connected to the output side of the (12) and (13) are transceivers, which are a processor data bus (1c) and a shared data bus (1c), respectively.
3c) is connected to the cache data memory (11). (14) is a control circuit, which is a processor control bus (
1b) and the shared control bus (3b), and the control line (
14a), hit determination line (9a) and control line (14b)
respectively through cache directory memory (7)
, a comparator (9) and a cache data memory (11). (15) is an atomic cycle write detector, which is connected to the processor control bus (1b) via the processor write line (15b) and the processor atomic cycle line (15c), and is connected to the atomic cycle write detection line (15a). It is connected to the control circuit (14) via the control circuit (14). (16) is a buffer connected to the cache directory memory (7) and a generation control bit bus (1
4d) to the control circuit (14). (17
) is a shared bus access control circuit to which a processor control bus (1b) is connected and is connected to a control circuit (14) via a control line (14c). Note that control lines from the control circuit (14) to the selectors (6), (8), and (10) are omitted. In addition, a processor address bus (1a), a processor control bus (1b)
and the processor data bus (1c) is connected to the processor (1A
) and (1B), and the shared address bus (3a)
, a shared control bus (3b) and a shared data bus (3c) are connected to the shared memory (4).

【0015】ところで、この発明の検出手段は、上記第
1実施例では不可分サイクルの書込み検出器(15)で
ある。
By the way, the detection means of the present invention is the indivisible cycle write detector (15) in the first embodiment.

【0016】次に、前述した第1実施例における通常の
読みだし及び書込み動作を図1を参照しながら説明する
。キャッシュデータメモリ(11)には、プロセッサ(
1A)及び(1B)が共有メモリ(4)から読み出した
データのエントリが記憶される。キャッシュディレクト
リメモリ(7)は、キャッシュデータメモリ(11)の
エントリのアドレスを示すキャッシュディレクトリ情報
、及びエントリの有効/無効情報を有する制御ビットを
もつ。
Next, normal read and write operations in the first embodiment described above will be explained with reference to FIG. The cache data memory (11) includes a processor (
1A) and (1B) read from the shared memory (4) are stored. The cache directory memory (7) has cache directory information indicating the address of an entry in the cache data memory (11), and control bits having valid/invalid information of the entry.

【0017】ライトスルーアルゴリズムに従う通常の読
みだし及び書込み動作は、次の場合に分けられる。 (a)読みだしヒットの場合、(b)書込みヒットの場
合、(c)読みだしミスの場合、(d)書込みミスの場
合、(e)他プロセッサによる共有バスへの書込みの場
合であって書込みが行われたデータがキャッシュデータ
メモリに存在する場合、及び(f)同場合であって書込
みが行われたデータがキャッシュデータメモリ(11)
に存在しない場合である。なお、他プロセッサによる共
有バスからの読みだしの場合、制御回路(14)は、共
有バスへの読みだし動作が検出されても何も動作を行わ
ない。以下、それぞれの場合について説明する。
Normal read and write operations according to the write-through algorithm are divided into the following cases. (a) In the case of a read hit, (b) In the case of a write hit, (c) In the case of a read miss, (d) In the case of a write miss, (e) In the case of a write to the shared bus by another processor. (f) if the written data exists in the cache data memory; and (f) in the same case, the written data exists in the cache data memory (11);
This is the case when it does not exist. Note that in the case of reading from the shared bus by another processor, the control circuit (14) does not perform any operation even if the reading operation to the shared bus is detected. Each case will be explained below.

【0018】(a)読みだしヒットの場合制御回路(1
4)は、プロセッサ制御バス(1b)を通じてプロセッ
サからの読みだし要求を検出したときに、選択器(6)
、(8)及び(10)にプロセッサアドレスバス(1a
)を選択するように指示し、更に制御線(14a)を通
じてキャッシュディレクトリメモリ(7)に読みだしを
指示する。これにより、キャッシュディレクトリメモリ
(7)は選択器(6)の出力するプロセッサアドレスに
従ってキャッシュディレクトリ情報及び制御ビットの有
効/無効情報を比較器(9)へ出力する。比較器(9)
は、プロセッサアドレスとキャッシュディレクトリ情報
を比較し、キャッシュデータメモリ(11)上のデータ
D0のエントリの有効/無効を判断し、データD0のエ
ントリが有効であれば、ヒット判定線(9a)を通じて
制御回路(14)にヒットしたことを通知する。制御回
路(14)は、通知をうけると、トランシーバ(12)
をキャッシュデータメモリ(11)からプロセッサデー
タバス(1c)の方へ開け、制御線(14b)を通じて
キャシュデータメモリ(11)に読みだしを指示し、デ
ータD0をプロセッサデータバス(1c)へ出力させる
と同時に、データD0が出力されたことをプロセッサ制
御バス(1b)を通じてプロセッサに通知する。このデ
ータD0はプロセッサに読み取られる。プロセッサの読
み取りが終了したら、制御回路(14)は、トランシー
バ(12)を閉じ、制御線(14a)及び(14b)を
通じてキャッシュディレクトリメモリ(7)及びキャッ
シュデータメモリ(11)を不活性状態(制御回路(1
4)から指示があるまで書込みも読みだしも行われない
状態)にする。
(a) In case of read hit, the control circuit (1
4) selector (6) when detecting a read request from the processor via processor control bus (1b).
, (8) and (10) are connected to the processor address bus (1a
) and further instructs the cache directory memory (7) to read through the control line (14a). As a result, the cache directory memory (7) outputs cache directory information and control bit validity/invalidity information to the comparator (9) in accordance with the processor address output from the selector (6). Comparator (9)
compares the processor address and the cache directory information, determines whether the entry of data D0 on the cache data memory (11) is valid or invalid, and if the entry of data D0 is valid, it is controlled via the hit determination line (9a). The circuit (14) is notified of the hit. Upon receiving the notification, the control circuit (14) controls the transceiver (12).
from the cache data memory (11) to the processor data bus (1c), instructs the cache data memory (11) to read through the control line (14b), and outputs data D0 to the processor data bus (1c). At the same time, the processor is notified through the processor control bus (1b) that data D0 has been output. This data D0 is read by the processor. Once the processor has finished reading, the control circuit (14) closes the transceiver (12) and places the cache directory memory (7) and cache data memory (11) in an inactive state (control) via control lines (14a) and (14b). Circuit (1
No writing or reading is performed until instructions are given from 4).

【0019】(b)書込みヒットの場合制御回路(14
)は、プロセッサ制御バス(1b)を通じてプロセッサ
からの書込み要求を検出したときに、上述した読みだし
ヒットの場合と同様にしてヒットしたことが知らされる
。制御回路(14)は、トランシーバ(12)をプロセ
ッサデータバス(1c)からキャッシュデータメモリ(
11)の方へ開け、制御線(14b)を通じてキャッシ
ュデータメモリ(11)に書込みを指示する。そして、
プロセッサは、プロセッサデータバス(1c)、トラン
シーバ(12)を介してデータD1の書込みを行う。プ
ロセッサの書込みが終了したら、制御回路(14)は、
トランシーバ(12)を閉じ、キャッシュデータメモリ
(11)及びキャッシュディレクトリメモリ(7)を不
活性状態にする。他方では、共有バスアクセス制御回路
(17)も、プロセッサ制御バス(1b)を通じてプロ
セッサからの書込み要求を検出し、プロセッサからのデ
ータD1を共有バスに書き込む。共有バスへの書込みが
終了したら、共有バスアクセス制御回路(17)は、プ
ロセッサ制御バス(1b)を通じて、これをプロセッサ
に通知する。
(b) In case of write hit, the control circuit (14
) is notified of a hit in the same way as in the case of a read hit described above, when it detects a write request from the processor via the processor control bus (1b). The control circuit (14) connects the transceiver (12) from the processor data bus (1c) to the cache data memory (
11) and instructs writing to the cache data memory (11) through the control line (14b). and,
The processor writes data D1 via a processor data bus (1c) and a transceiver (12). When the processor has finished writing, the control circuit (14)
The transceiver (12) is closed and the cache data memory (11) and cache directory memory (7) are rendered inactive. On the other hand, the shared bus access control circuit (17) also detects a write request from the processor through the processor control bus (1b) and writes data D1 from the processor to the shared bus. When writing to the shared bus is completed, the shared bus access control circuit (17) notifies the processor through the processor control bus (1b).

【0020】(c)読みだしミスの場合上述した読みだ
しヒットの場合(a)と同様にして、選択器(6)の出
力するプロセッサアドレスに従いキャッシュディレクト
リ情報及び制御ビットの有効/無効情報がキャッシュデ
ィレクトリメモリ(7)から比較器(9)に入力される
。比較器(9)は、プロセッサアドレスとキャッシュデ
ィレクトリ情報を比較し、キャッシュデータメモリ(1
1)上のデータD2のエントリの有効/無効を判断し、
データD2のエントリが無効であれば、ヒット判定線(
9a)を通じてミスしたことを制御回路(14)に通知
する。これによって、制御回路(14)は、制御線(1
4c)を通じて共有バスアクセス制御回路(17)に、
共有バスからデータD2の読みだしを指示すると同時に
、制御線(14a)及び(14b)を通じてキャッシュ
ディレクトリメモリ(7)及びキャッシュデータメモリ
(11)を不活性状態にし、データD2を有効にする情
報(有効化情報)を生成制御ビットバス(14d)に出
力してバッファ(16)をイネーブルにする。共有バス
からデ−タD2を読み出すときは、制御回路(14)は
、トランシーバ(13)を共有データバス(3c)から
キャッシュデータメモリ(11)の方へ開け、同時にト
ランシーバ(12)をキャッシュデータメモリ(11)
からプロセッサデータバス(1c)の方へ開け、制御線
(14b)を通じてキャッシュデータメモリ(11)に
データD2の書込みを指示し、更に制御線(14a)を
通じてキャッシュディレクトリメモリ(7)に制御ビッ
トへの有効情報の書込みを指示する。これによって、デ
ータD2はキャッシュデータメモリ(11)に書き込ま
れ、データD2に対応する制御ビットは有効を示す。
(c) In the case of a read miss In the case of a read hit described above In the same manner as in (a), the cache directory information and the valid/invalid information of the control bits are cached according to the processor address output by the selector (6). It is input from the directory memory (7) to the comparator (9). The comparator (9) compares the processor address and the cache directory information and compares the cache data memory (1
1) Determine the validity/invalidity of the entry of the data D2 above,
If the entry of data D2 is invalid, the hit judgment line (
9a) to notify the control circuit (14) of the mistake. As a result, the control circuit (14) connects the control line (1
4c) to the shared bus access control circuit (17);
At the same time as instructing reading of data D2 from the shared bus, information ( enablement information) to the generation control bit bus (14d) to enable the buffer (16). When reading data D2 from the shared bus, the control circuit (14) opens the transceiver (13) from the shared data bus (3c) toward the cache data memory (11), and at the same time opens the transceiver (12) to read the cache data memory (11). Memory (11)
to the processor data bus (1c), instructs writing of data D2 to the cache data memory (11) through the control line (14b), and further writes the control bit to the cache directory memory (7) through the control line (14a). Instructs to write valid information. As a result, data D2 is written to the cache data memory (11), and the control bit corresponding to data D2 indicates validity.

【0021】次に、制御回路(14)は、キャッシュデ
ータメモリ(11)に読みだしを指示し、データD2を
トランシーバ(12)を介してプロセッサデータバス(
1c)に出力させ、データD2が出力されたことをプロ
セッサに通知する。プロセッサはデータD2を読み取る
。これが終了したら、制御回路(14)はトランシーバ
(12)及び(13)を閉じ、バッファ(16)をディ
スエーブルし、制御線(14a)及び(14b)を通じ
てキャッシュディレクトリメモリ(7)及びキャッシュ
データメモリ(11)を不活性状態にする。
Next, the control circuit (14) instructs the cache data memory (11) to read data, and sends the data D2 to the processor data bus (12) via the transceiver (12).
1c) and notifies the processor that data D2 has been output. The processor reads data D2. Once this is done, the control circuit (14) closes the transceivers (12) and (13), disables the buffer (16) and connects the cache directory memory (7) and the cache data memory via control lines (14a) and (14b). (11) is made inactive.

【0022】(d)書込みミスの場合 上述した書込みヒットの場合(b)と同様にして、選択
器(6)の出力するプロセッサアドレスに従ってキャッ
シュディレクトリ情報と制御ビットの有効/無効情報が
比較器(9)に入力される。比較器(9)は、プロセッ
サアドレスとキャッシュディレクトリ情報を比較し、キ
ャッシュデータメモリ(11)上のデータD3のエント
リの有効/無効を判断し、データD3のエントリが無効
であれば、ヒット判定線(9a)を通じて制御回路(1
4)にミスしたことを通知する。他方では、共有バスア
クセス制御回路(17)は、プロセッサ制御バス(1b
)から書込み要求を検出し、プロセッサからのデータD
3を共有バスに書き込む。書込みが終了したら、共有バ
スアクセス制御回路(17)は、プロセッサ制御バス(
1b)を通じてプロセッサにこれを通知する。
(d) In the case of a write miss In the same way as in the case of a write hit (b) described above, the cache directory information and the valid/invalid information of the control bits are checked by the comparator ( 9). A comparator (9) compares the processor address and cache directory information, determines whether the entry of data D3 on the cache data memory (11) is valid or invalid, and if the entry of data D3 is invalid, the hit determination line is (9a) through the control circuit (1
4) Notify of the mistake. On the other hand, the shared bus access control circuit (17) connects the processor control bus (1b
) detects a write request from
Write 3 to the shared bus. After writing is completed, the shared bus access control circuit (17) accesses the processor control bus (
1b) to notify the processor of this.

【0023】(e)他プロセッサによる共有バスへの書
込みが行われた場合であって書込みが行われたデータD
4がキャッシュデータメモり(11)に存在する場合制
御回路(14)は、共有制御バス(3b)から共有バス
への書込み動作を検出したとき、選択器(6)、(8)
及び(10)に共有アドレスバス(3a)を選択させ、
更に上述した(a)〜(d)の場合と同様にして、選択
器(6)の出力する共有アドレスにしたがって、キャッ
シュディレクトリ情報及び制御ビットの有効/無効情報
をキャッシュディレクトリメモリ(7)から比較器(9
)に出力させる。比較器(9)は、共有アドレスとキャ
ッシュディレクトリ情報を比較し、キャッシュデータメ
モリ(11)上のデータD4のエントリの有効/無効を
判断し、データD4のエントリが有効であることから、
ヒット判定線(9a)を通じ、他プロセッサによって共
有バスに書込みが行われたデータD4がキャッシュデー
タメモリ(11)に存在することを制御回路(14)に
通知する。制御回路(14)は、通知を受けると、制御
線(14a)を通じてキャッシュディレクトリメモリ(
7)を不活性状態にし、キャッシュデータメモリ(11
)上のデータD4を無効にする情報(無効化情報)を生
成制御ビットバス(14d)に出力してバァッファ(1
6)をイネーブルにする。そして、制御回路(14)は
、制御線(14a)を通じてキャッシュディレクトリメ
モリ(7)に無効情報を書き込ませる。したがって、キ
ャッシュデータメモリ(11)上のデータD4のエント
リは無効にされ、データD4に対応する制御ビットは無
効を示す。キャッシュデータメモリ(7)への書込みが
終了したら、制御回路(14)はバッファ(16)をデ
ィスエーブルし、制御線(14a)を通じてキャッシュ
ディレクトリメモリ(7)を不活性状態にする。
(e) In the case where another processor writes to the shared bus, the written data D
4 exists in the cache data memory (11). When the control circuit (14) detects a write operation from the shared control bus (3b) to the shared bus, the selector (6), (8)
and (10) to select the shared address bus (3a),
Furthermore, in the same manner as in cases (a) to (d) above, the cache directory information and the valid/invalid information of the control bits are compared from the cache directory memory (7) according to the shared address output from the selector (6). Vessel (9
) is output. The comparator (9) compares the shared address and the cache directory information and determines whether the entry of the data D4 on the cache data memory (11) is valid or invalid. Since the entry of the data D4 is valid,
The control circuit (14) is notified through the hit determination line (9a) that the data D4 written to the shared bus by another processor exists in the cache data memory (11). Upon receiving the notification, the control circuit (14) controls the cache directory memory (14a) through the control line (14a).
7) to an inactive state and cache data memory (11) to an inactive state.
) is outputted to the generation control bit bus (14d) to output the information (invalidation information) for invalidating the data D4 on the buffer (1
6). Then, the control circuit (14) causes invalidation information to be written in the cache directory memory (7) through the control line (14a). Therefore, the entry for data D4 on the cache data memory (11) is invalidated, and the control bit corresponding to data D4 indicates invalidity. When the writing to the cache data memory (7) is completed, the control circuit (14) disables the buffer (16) and deactivates the cache directory memory (7) via the control line (14a).

【0024】(f)他プロセッサによる共有バスへの書
込みが行われた場合であって書込みが行われたデータD
5がキャッシュデータメモリ(11)に存在しない場合
制御回路(14)は、共有バスへの書込み動作を共有制
御バス(3b)から検出したとき、選択器(6)、(8
)及び(10)に共有アドレスバス(3a)を選択させ
、更に上述した(a)〜(d)の場合と同様にして、選
択器(6)の出力する共有アドレスにしたがって、キャ
ッシュディレクトリ情報及び制御ビットの有効/無効情
報をキャッシュディレクトリメモリ(7)から比較器(
9)に出力させる。比較器(9)は、共有アドレスとキ
ャッシュディレクトリ情報を比較し、キャッシュデータ
メモリ(11)上のデータD5のエントリの有効/無効
を判断し、データD5のエントリが無効であることから
ヒット判定線(9a)を通じて、他プロセッサによって
共有メモリ(4)に書込みが行われたデータD5がキャ
ッシュデータメモリ(11)に存在しないことを制御回
路(14)に通知する。制御回路(14)は、通知を受
けると、制御線(14a)を通じてキャッシュディレク
トリメモリ(7)を不活性状態にする。この場合は、キ
ャッシュデータメモリ(11)及びキャッシュディレク
トリメモリ(7)に対しては何も行われない。
(f) In the case where another processor writes to the shared bus, the written data D
5 does not exist in the cache data memory (11). When the control circuit (14) detects a write operation to the shared bus from the shared control bus (3b), the selector (6), (8
) and (10) to select the shared address bus (3a), and in the same manner as in the cases (a) to (d) above, cache directory information and The valid/invalid information of the control bits is transferred from the cache directory memory (7) to the comparator (
9). The comparator (9) compares the shared address with the cache directory information, determines whether the entry for data D5 on the cache data memory (11) is valid or invalid, and since the entry for data D5 is invalid, the hit determination line is set. Through (9a), the control circuit (14) is notified that the data D5 written to the shared memory (4) by another processor does not exist in the cache data memory (11). Upon receiving the notification, the control circuit (14) makes the cache directory memory (7) inactive through the control line (14a). In this case, nothing is done to the cache data memory (11) and cache directory memory (7).

【0025】ここで、この発明の第1実施例の不可分サ
イクルの書込み動作を図1を参照しながら説明する。プ
ロセッサは、不可分サイクルの読みだしを実施し、デー
タ処理を行った後に、不可分サイクルの書込みを実施す
る。
The write operation of the indivisible cycle in the first embodiment of the present invention will now be described with reference to FIG. The processor reads the atomic cycle, performs data processing, and then writes the atomic cycle.

【0026】制御回路(14)は、プロセッサ制御バス
(1b)からプロセッサからの書込み要求を検出したと
きに、選択器(6)、(8)及び(10)にプロセッサ
側を選択するように指示し、更に制御線(14a)を通
じてキャッシュディレクトリメモリ(7)に読みだしを
指示する。これと同時に、不可分サイクルの書込み検出
器(15)は、プロセッサ書込み線(15b)及びプロ
セッサ不可分サイクル線(15c)が同時に有効になっ
ていることを検出し、プロセッサから不可分サイクルの
書込み要求が出されたことを、不可分サイクルの書込み
検出線(15a)を有効にすることによって制御回路(
14)に通知する。キャッシュディレクトリメモリ(7
)は、選択器(6)の出力するプロセッサアドレスにし
たがってキャッシュディレクトリ情報と制御ビットの有
効情報を比較器(9)に出力する。比較器(9)は、プ
ロセッサアドレスとキャッシュディレクトリ情報を比較
し、キャッシュデータメモリ(11)のデータD6のエ
ントリが有効であるので、ヒット判定線(9a)を通じ
てヒットしたことを制御回路(14)に通知する。この
場合は、不可分サイクルの読みだしの後なので、必ずヒ
ットする。制御回路(14)は、通知を受けたら、制御
線(14a)を通じてキャッシュディレクトリメモリ(
7)を不活性状態にする。そして、制御回路(14)は
、生成制御ビットバス(14d)に無効化情報を出力し
てバァッファ(16)をイネーブルにし、制御線(14
a)を通じてキャッシュディレクトリメモリ(7)に制
御ビットへの無効情報の書込みを指示する。これによっ
て、キャッシュディレクトリメモリ(7)の制御ビット
に無効情報が書き込まれ、データD6のエントリは無効
にされる。この後に、制御回路(14)は、制御線(1
4d)を通じてバッファ(16)をディスエーブルし、
制御線(14a)を通じてキャッシュディレクトリメモ
リ(7)を不活性状態にする。他方では、共有バスアク
セス制御回路(17)も、プロセッサからの書込み要求
を検出し、共有バスにデータD6の書込みを行う。共有
バスへの書込みが終了したら、共有バスアクセス制御回
路(17)は、プロセッサ制御バス(1b)を通じてプ
ロセッサにこれを通知する。
When the control circuit (14) detects a write request from the processor from the processor control bus (1b), it instructs the selectors (6), (8) and (10) to select the processor side. Then, it also instructs the cache directory memory (7) to read through the control line (14a). At the same time, the atomic cycle write detector (15) detects that the processor write line (15b) and the processor atomic cycle line (15c) are enabled at the same time, and an atomic cycle write request is issued from the processor. The control circuit (
14). Cache directory memory (7
) outputs cache directory information and control bit validity information to a comparator (9) in accordance with the processor address output from the selector (6). The comparator (9) compares the processor address and the cache directory information, and since the entry of data D6 in the cache data memory (11) is valid, the control circuit (14) detects a hit through the hit determination line (9a). Notify. In this case, since it is after reading an indivisible cycle, there is always a hit. Upon receiving the notification, the control circuit (14) controls the cache directory memory (14) through the control line (14a).
7) is made inactive. Then, the control circuit (14) outputs invalidation information to the generation control bit bus (14d) to enable the buffer (16), and the control circuit (14)
Through a), the cache directory memory (7) is instructed to write invalidation information to the control bits. As a result, invalidation information is written to the control bit of the cache directory memory (7), and the entry of data D6 is invalidated. After this, the control circuit (14) connects the control line (1
4d) disabling the buffer (16);
The cache directory memory (7) is made inactive through the control line (14a). On the other hand, the shared bus access control circuit (17) also detects a write request from the processor and writes data D6 to the shared bus. When writing to the shared bus is completed, the shared bus access control circuit (17) notifies the processor via the processor control bus (1b).

【0027】次に、この発明の第1実施例を用いた密結
合型マルチプロセッサシステムにおけるスピンロック動
作を図2及び図3を参照しながら説明する。図2及び図
3は、この発明の第1実施例を用いた密結合型マルチプ
ロセッサシステムにおけるスピンロック動作を説明する
状態遷移図である。ここでは、上述した第1実施例はキ
ャッシュメモリ(2AA)及び(2BA)で実現されて
いる。
Next, a spinlock operation in a tightly coupled multiprocessor system using the first embodiment of the present invention will be explained with reference to FIGS. 2 and 3. 2 and 3 are state transition diagrams illustrating spinlock operations in a tightly coupled multiprocessor system using the first embodiment of the present invention. Here, the first embodiment described above is realized by cache memories (2AA) and (2BA).

【0028】初期状態では、プロセッサは他の動作を行
っており、スピンロックビットはキャッシュメモリ(2
AA)及び(2BA)には入っておらず(エントリが無
効)、共有メモリ(4)上のスピンロックビットは解放
状態とする。 (状態201)
[0028] In the initial state, the processor is performing other operations, and the spinlock bit is stored in the cache memory (2
AA) and (2BA) (the entries are invalid), and the spinlock bit on the shared memory (4) is released. (Status 201)

【0029】プロセッサ(1A)がスピンロックを要求
すると、プロセッサ(1A)は不可分サイクルの読みだ
しを実行して共有メモリ(4)からキャッシュメモリ(
2AA)へスピンロックビットを読み出す。このとき、
キャッシュメモリ(2AA)にはスピンロックビットが
解放状態で入り、キャッシュメモリ(2AA)において
スピンロックビットのエントリが有効になる。(状態2
02)
When the processor (1A) requests a spinlock, the processor (1A) executes an atomic cycle read and transfers data from the shared memory (4) to the cache memory (
2AA) to read the spinlock bit. At this time,
The spinlock bit enters the cache memory (2AA) in a released state, and the entry of the spinlock bit becomes valid in the cache memory (2AA). (state 2
02)

【0030】プロセッサ(1A)は、スピンロックビッ
トが解放状態であることからスピンロックに成功したこ
とを知ると、不可分サイクルの書込みを実行し、共有メ
モリ(4)上のスピンロックビットをロック状態にする
。これと同時に、キャッシュメモリ(2AA)は、プロ
セッサ(1A)から共有メモリ(4)への不可分サイク
ルの書込みを検出し、スピンロックビットのエントリを
無効にする。(状態203)。
When the processor (1A) learns that the spinlock has been successfully acquired because the spinlock bit is in the released state, it executes an indivisible cycle write and sets the spinlock bit on the shared memory (4) in the locked state. Make it. At the same time, the cache memory (2AA) detects the atomic cycle write from the processor (1A) to the shared memory (4) and invalidates the entry of the spinlock bit. (State 203).

【0031】このようにしてスピンロックに成功したプ
ロセッサ(1A)は、共有データの処理を行う。(状態
204)
The processor (1A) that has successfully acquired the spinlock in this way processes the shared data. (Status 204)

【0032】共有データの処理を終えると、プ
ロセッサ(1A)はスピンロックを解放する。このとき
、キャッシュメモリ(2AA)のエントリは既に無効に
されているので、プロセッサ(1A)は再び不可分サイ
クルの読みだしを実行して共有メモリ(4)からスピン
ロックビットを読み出す。そして、キャッシュメモリ(
2AA)にスピンロックビットがロック状態で入り、キ
ャッシュメモリ(2AA)においてそのエントリは有効
になる。(状態205)
[0032] After finishing processing the shared data, the processor (1A) releases the spinlock. At this time, since the entry in the cache memory (2AA) has already been invalidated, the processor (1A) again executes the atomic cycle read and reads the spinlock bit from the shared memory (4). And cache memory (
The spinlock bit is entered in the locked state in the cache memory (2AA), and the entry becomes valid in the cache memory (2AA). (State 205)

【0033】プロセッサ(1A
)が不可分サイクルの書込みを実行し、共有メモリ(4
)上のスピンロックビットを解放状態にすると、キャッ
シュメモリ(2AA)は、プロセッサ(1A)からの不
可分サイクルの書込みを検出し、スピンロックビットの
エントリを無効にする。(状態206)
Processor (1A
) performs an atomic cycle write and the shared memory (4
), the cache memory (2AA) detects the atomic cycle write from the processor (1A) and invalidates the spinlock bit entry. (State 206)

【0034】そ
して、プロセッサ(1A)は他の動作を行う。(状態2
07) 次に、プロセッサ(1A)及び(1B)が同時にスピン
ロックを要求する場合について説明する。このとき、共
有バス上の調停で、プロセッサ(1B)が共有バスを獲
得し、不可分サイクルの読みだしを実行して共有メモリ
(4)からスピンロックビットを読み出す。キャッシュ
メモリ(2BA)にはスピンロックビットが解放状態で
入り、キャッシュメモリ(2BA)でのスピンロックビ
ットのエントリが有効になる。この間、キャッシュメモ
リ(2AA)は、共有バスが解放されるまで待つ。(状
態208)
[0034] The processor (1A) then performs other operations. (state 2
07) Next, a case where processors (1A) and (1B) request a spinlock at the same time will be described. At this time, the processor (1B) acquires the shared bus through arbitration on the shared bus, reads the atomic cycle, and reads the spinlock bit from the shared memory (4). The spinlock bit enters the cache memory (2BA) in a released state, and the entry of the spinlock bit in the cache memory (2BA) becomes valid. During this time, the cache memory (2AA) waits until the shared bus is released. (Status 208)

【0035】プロセッサ(1B)は、スピンロックビッ
トが解放状態であることを知ると、スピンロックに成功
したことを知り、不可分サイクルの書込みを実行して共
有メモリ(4)上のスピンロックビットをロック状態に
する。 このとき、キャッシュメモリ(2BA)は、プロセッサ
(1B)による不可分サイクルの書込みを検出し、スピ
ンロックビットのエントリを無効にする。(状態209
When the processor (1B) learns that the spinlock bit is in the released state, it knows that the spinlock has been successfully acquired, and executes an atomic cycle write to update the spinlock bit on the shared memory (4). Lock state. At this time, the cache memory (2BA) detects writing of the atomic cycle by the processor (1B) and invalidates the spinlock bit entry. (Status 209
)

【0036】そして、プロセッサ(1B)は共有デー
タの処理を行う。この処理の間に、キャッシュメモリ(
2AA)は、共有バスを獲得し、共有メモリ(4)から
スピンロックビットを読み出す。このとき、キャッシュ
メモリ(2AA)にはスピンロックビットがロック状態
で入り、キャッシュメモリ(2AA)ではそのエントリ
が有効になる。(状態210)
[0036]The processor (1B) then processes the shared data. During this process, the cache memory (
2AA) acquires the shared bus and reads the spinlock bit from shared memory (4). At this time, the spinlock bit is entered in the cache memory (2AA) in a locked state, and the entry becomes valid in the cache memory (2AA). (state 210)

【0037】プロセッサ(1A)はキャッシュメモリ(
2AA)からスピンロックビットを読み出し、これがロ
ック状態であることからスピンロックに失敗したことを
知り、スピンロックに成功するまでキャッシュメモリ(
2AA)からスピンロックビットを読み続ける。このた
め、プロセッサ(1A)は、共有バスをアクセスするこ
とはない。(状態211)
[0037] The processor (1A) has a cache memory (
Reads the spinlock bit from 2AA), knows that the spinlock has failed because it is in the locked state, and stores the spinlock bit in the cache memory (2AA) until the spinlock succeeds.
Continue reading the spinlock bit from 2AA). Therefore, the processor (1A) never accesses the shared bus. (State 211)

【0038】次に、プロセッサ(1B)は共有データの
処理を終え、スピンロックを解放する。まず、キャッシ
ュメモリ(2BA)のエントリは無効にされているので
、プロセッサ(1B)は再び不可分サイクルの読みだし
を実行して共有メモリ(4)からスピンロックビットを
読み出す。キャッシュメモリ(2BA)にスピンロック
ビットがロック状態で入り、キャッシュメモリ(2BA
)においてそのエントリは有効になる。(状態212)
Next, the processor (1B) finishes processing the shared data and releases the spinlock. First, since the entry in the cache memory (2BA) has been invalidated, the processor (1B) again executes an atomic cycle read and reads the spinlock bit from the shared memory (4). The spinlock bit enters the cache memory (2BA) in a locked state, and the cache memory (2BA)
), the entry becomes valid. (state 212)

【0039】次に、プロセッサ(1B)は、再び不可分
サイクルの書込みを実行し、共有メモリ(4)上のスピ
ンロックビットを解放状態にする。このとき、キャッシ
ュメモリ(2BA)は、プロセッサ(1B)からの不可
分サイクルの書込み要求を検出し、スピンロックビット
のエントリを無効にする。この間、キャッシュメモリ(
2AA)は、プロセッサ(1B)による不可分サイクル
の書込みを検出し、キャッシュメモリ(2AA)でのス
ピンロックビットのエントリを無効にする。(状態21
3)
Next, the processor (1B) executes the atomic cycle write again and releases the spinlock bit on the shared memory (4). At this time, the cache memory (2BA) detects an indivisible cycle write request from the processor (1B) and invalidates the spinlock bit entry. During this time, the cache memory (
2AA) detects the write of an atomic cycle by the processor (1B) and invalidates the entry of the spinlock bit in the cache memory (2AA). (State 21
3)

【0040】プロセッサ(1B)は、スピンロックビッ
トを解放状態にした後に他の動作を行う。この間、プロ
セッサ(1A)はスピンロックを要求し続ける。キャッ
シュメモリ(2AA)上のスピンロックビットのエント
リは無効にされているので、プロセッサ(1A)は、共
有メモリ(4)からスピンロックビットを読み出す。こ
のとき、キャッシュメモリ(2AA)に、解放状態のス
ピンロックビットが入り、そのエントリが有効になる。 (状態214)
The processor (1B) performs other operations after releasing the spinlock bit. During this time, the processor (1A) continues to request a spinlock. Since the spinlock bit entry on the cache memory (2AA) is invalidated, the processor (1A) reads the spinlock bit from the shared memory (4). At this time, a spinlock bit in a released state is entered in the cache memory (2AA), and the entry becomes valid. (state 214)

【0041】これ以降、上述した(状態
203)から(状態207)までと同様になる。(状態
215)〜(状態219)なお、上記第1実施例では、
不可分サイクル命令をもつプロセッサを想定している。
From this point on, the process is the same as from (state 203) to (state 207) described above. (State 215) to (State 219) In the above first embodiment,
A processor with atomic cycle instructions is assumed.

【0042】次に、不可分サイクル命令をもっていない
プロセッサに接続される第2実施例を説明する。不可分
サイクル命令をもっていないプロセッサには、例えばM
IPS社のR3000があげられる。この場合、特定ア
ドレス領域がロック領域に指定され、以下に説明するよ
うに、そのアドレス領域へアクセスを行うときにロック
線を有効にすることにより、共有バスに不可分サイクル
を実装してスピンロックを実現する。ロック線は、例え
ばインテル社のMultibusIIに採用されている
Next, a second embodiment will be described, which is connected to a processor that does not have an indivisible cycle instruction. For processors that do not have atomic cycle instructions, for example, M
One example is R3000 from IPS. In this case, a specific address area is designated as a lock area, and a spinlock is achieved by implementing an atomic cycle on the shared bus by enabling the lock line when accessing that address area, as described below. Realize. The lock line is used, for example, in Intel's Multibus II.

【0043】ここで、この発明の第2実施例の構成を図
4を参照しながら説明する。この第2実施例では、第1
実施例における選択器(6)の代わりに、出力ラッチ付
き選択器(18)が接続され、不可分サイクルの書込み
検出器(15)の代わりにロック領域アクセス検出器(
20)が、ロック領域アクセス検出線(20a)を介し
て制御回路(19)に接続されている。また、制御回路
(19)は、制御線(19a)を介して共有バスアクセ
ス制御回路(17)に接続されている。ところで、この
発明の検出手段は、上記第2実施例ではロック領域アク
セス検出器(20)である。
The configuration of a second embodiment of the present invention will now be described with reference to FIG. 4. In this second embodiment, the first
Instead of the selector (6) in the embodiment, a selector (18) with an output latch is connected, and instead of the atomic cycle write detector (15) a lock area access detector (
20) is connected to the control circuit (19) via the lock area access detection line (20a). Further, the control circuit (19) is connected to the shared bus access control circuit (17) via a control line (19a). By the way, the detection means of the present invention is the lock area access detector (20) in the second embodiment.

【0044】次に、前述した第2実施例の動作を図4を
参照しながら説明する。第2実施例に接続されるプロセ
ッサからは不可分サイクルが発生しないので、第2実施
例では、不可分サイクルに関する動作はなく、その代わ
りにロック領域へのアクセスに関する動作がある。ロッ
ク領域へのアクセスに関する動作には、(a)ロック領
域への読みだしヒットの場合、(b)ロック領域への書
込みヒットの場合、(c)ロック領域への読みだしミス
の場合、及び(d)ロック領域への書込みミスの場合が
ある。 以下、それぞれの場合について説明する。
Next, the operation of the second embodiment described above will be explained with reference to FIG. Since no atomic cycles are generated from the processor connected to the second embodiment, there is no operation related to atomic cycles in the second embodiment, but instead there is an operation related to accessing the lock area. Operations related to access to the lock area include (a) in the case of a read hit to the lock area, (b) in the case of a write hit to the lock area, (c) in the case of a read miss to the lock area, and ( d) There may be a write error in the lock area. Each case will be explained below.

【0045】(a)ロック領域への読みだしヒットの場
合通常の読みだしヒットの場合と同じ動作をする。
(a) In the case of a read hit to the lock area, the same operation as in the case of a normal read hit is performed.

【0046】(b)ロック領域への書込みヒットの場合
制御回路(19)は、プロセッサ制御バス(1b)から
プロセッサからの書込み要求を検出したときに、出力ラ
ッチ付き選択器(18)並びに選択器(8)及び(10
)にプロセッサ側を選択するように指示し、更に制御線
(14a)を通じてキャッシュディレクトリメモリ(7
)に読みだしを指示する。 これと同時に、ロック領域アクセス検出器(20)は、
プロセッサアドレスバス(1a)をデコードして、ロッ
ク領域へのアクセスを検出し、プロセッサからロック領
域へのアクセス要求が出されたことを、ロック領域アク
セス検出線(20a)を有効にすることによって制御回
路(19)に通知する。キャッシュディレクトリメモリ
(7)は、出力ラッチ付き選択器(18)の出力するプ
ロセッサアドレスにしたがってキャッシュディレクトリ
情報と制御ビットの有効/無効情報を比較器(9)に出
力する。比較器(9)は、プロセッサアドレスとキャッ
シュディレクトリ情報を比較し、キャッシュデータメモ
リ(11)上のデータD7のエントリの有効/無効を判
断し、エントリが有効であれば、ヒット判定線(9a)
を通じてヒットしたことを制御回路(19)に通知する
。制御回路(19)は、通知を受けたら、制御線(14
a)を通じてキャッシュディレクトリメモリ(7)を不
活性状態にする。そして、制御回路(19)は、生成制
御ビットバス(14d)に無効化情報を出力してバァッ
ファ(16)をイネーブルにし、制御線(14a)を通
じてキャッシュディレクトリメモリ(7)に制御ビット
への無効情報の書込みを指示する。これによって、キャ
ッシュディレクトリメモリ(7)の制御ビットに無効情
報が書き込まれ、データD7のエントリは無効にされる
。この後に、制御回路(19)は、制御線(14d)を
通じてバッファ(16)をディスエーブルし、制御線(
14b)を通じてキャッシュデータメモリ(11)を不
活性状態にする。他方では、共有バスアクセス制御回路
(17)も、プロセッサからの書込み要求を検出し、共
有バスにデータD7の書込みを行う。共有バスへの書込
みが終了したら、共有バスアクセス制御回路(17)は
、プロセッサ制御バス(1b)を通じてプロセッサにこ
れを通知する。
(b) In the case of a write hit to the lock area When the control circuit (19) detects a write request from the processor from the processor control bus (1b), the control circuit (19) activates the selector (18) with output latch and the selector. (8) and (10
) to select the processor side, and further connects the cache directory memory (7) through the control line (14a).
) to start reading. At the same time, the lock area access detector (20)
Decodes the processor address bus (1a) to detect access to the lock area, and controls that the processor has issued an access request to the lock area by enabling the lock area access detection line (20a). Notify the circuit (19). The cache directory memory (7) outputs cache directory information and control bit validity/invalidity information to the comparator (9) in accordance with the processor address output by the output latch selector (18). The comparator (9) compares the processor address and the cache directory information, determines whether the entry of data D7 on the cache data memory (11) is valid or invalid, and if the entry is valid, the hit determination line (9a)
The control circuit (19) is notified of the hit. Upon receiving the notification, the control circuit (19) connects the control line (14).
Through a), the cache directory memory (7) is rendered inactive. Then, the control circuit (19) outputs invalidation information to the generation control bit bus (14d) to enable the buffer (16), and sends the invalidation information to the control bit to the cache directory memory (7) via the control line (14a). Instructs to write information. As a result, invalidation information is written to the control bit of the cache directory memory (7), and the entry of data D7 is invalidated. After this, the control circuit (19) disables the buffer (16) through the control line (14d) and disables the buffer (16) through the control line (14d).
14b) to inactivate the cache data memory (11). On the other hand, the shared bus access control circuit (17) also detects a write request from the processor and writes data D7 to the shared bus. When writing to the shared bus is completed, the shared bus access control circuit (17) notifies the processor via the processor control bus (1b).

【0047】(c)ロック領域への読みだしミスの場合
制御回路(19)は、プロセッサ制御バス(1b)から
プロセッサからの読みだし要求を検出したとき、出力ラ
ッチ付き選択器(18)並びに選択器(8)及び(10
)にプロセッサ側を選択するように指示し、更に制御線
(14a)を通じてキャッシュディレクトリメモリ(7
)に読みだしを指示する。 これと同時に、ロック領域アクセス検出器(20)は、
プロセッサアドレスバス(1a)をデコードして、ロッ
ク領域へのアクセスを検出し、プロセッサからロック領
域へのアクセス要求が出されたことを、ロック領域アク
セス検出線(20a)を有効にすることによって制御回
路(14)に通知する。キャッシュディレクトリメモリ
(7)は、出力ラッチ付き選択器(18)の出力するプ
ロセッサアドレスにしたがってキャッシュディレクトリ
情報と制御ビットの有効/無効情報を比較器(9)に出
力する。比較器(9)は、プロセッサアドレスとキャッ
シュディレクトリ情報を比較し、キャッシュデータメモ
リ(11)上のデータD8のエントリの有効/無効を判
断し、データD8のエントリが無効であれば、ヒット判
定線(9a)を通じてミスしたことを制御回路(19)
に通知する。制御回路(19)は、通知を受けたら、制
御線(19a)を通じて共有バスからのデータの読みだ
しを不可分サイクルで行うことを共有バスアクセス制御
回路(17)に指示すると同時に、出力ラッチ付き選択
器(18)に出力をラッチするように指示し、制御線(
14a)及び(14b)を通じてキャッシュディレクト
リメモリ(7)及びキャッシュデータメモリ(11)を
不活性状態にする。 そして、制御回路(19)は、生成制御ビットバス(1
4d)に有効化情報を出力してバッファ(16)をイネ
ーブルにする。共有バスからデ−タD8を読み出すとき
、制御回路(19)は、トランシーバ(13)を共有デ
ータバス(3c)からキャッシュデータメモリ(11)
の方へ開け、同時にトランシーバ(12)をキャッシュ
データメモリ(11)からプロセッサデータバス(1c
)の方へ開け、制御線(14b)を通じてキャッシュデ
ータメモリ(11)にデータD8の書込みを指示し、更
に制御線(14a)を通じてキャッシュディレクトリメ
モリ(7)に制御ビットへ有効情報の書込みを指示する
(c) In case of read error to locked area When the control circuit (19) detects a read request from the processor from the processor control bus (1b), the control circuit (19) selects the output latch selector (18) and the selector. Container (8) and (10
) to select the processor side, and further connects the cache directory memory (7) through the control line (14a).
) to start reading. At the same time, the lock area access detector (20)
Decodes the processor address bus (1a) to detect access to the lock area, and controls that the processor has issued an access request to the lock area by enabling the lock area access detection line (20a). Notify the circuit (14). The cache directory memory (7) outputs cache directory information and control bit validity/invalidity information to the comparator (9) in accordance with the processor address output by the output latch selector (18). A comparator (9) compares the processor address and cache directory information, determines whether the entry of data D8 on the cache data memory (11) is valid or invalid, and if the entry of data D8 is invalid, the hit determination line is (9a) through the control circuit (19)
Notify. Upon receiving the notification, the control circuit (19) instructs the shared bus access control circuit (17) to read data from the shared bus in atomic cycles through the control line (19a), and at the same time The control line (18) is instructed to latch the output, and the control line (
14a) and (14b), the cache directory memory (7) and the cache data memory (11) are rendered inactive. The control circuit (19) then controls the generation control bit bus (1
4d) to enable the buffer (16) by outputting enabling information. When reading data D8 from the shared bus, the control circuit (19) transfers the transceiver (13) from the shared data bus (3c) to the cache data memory (11).
and at the same time transfer the transceiver (12) from the cache data memory (11) to the processor data bus (1c).
), instructs the cache data memory (11) to write data D8 through the control line (14b), and further instructs the cache directory memory (7) to write valid information to the control bit through the control line (14a). do.

【0048】次に、制御回路(19)は、キャッシュデ
ータメモリ(11)に読みだしを指示し、データD8を
トランシーバ(12)を介してプロセッサデータバス(
1c)に出力させ、データD8が出力されたことをプロ
セッサに通知する。プロセッサはデータD8を読み取る
。これが終了したら、制御回路(19)はトランシーバ
(12)及び(13)を閉じ、バッファ(16)をディ
スエーブルし、制御線(14a)及び(14b)を通じ
てキャッシュディレクトリメモリ(7)及びキャッシュ
データメモリ(11)を不活性状態にする。そして、読
み出したデータD8(スピンロックビット)がロック状
態を示すならば、制御回路(19)は、制御線(19a
)を通じて共有バスアクセス制御回路(17)に不可分
サイクルの中止を指示すると同時に、出力ラッチ付き選
択器(18)にラッチを解除するように指示する。また
、データD8が解放状態を示すならば、制御回路(19
)は、共有データバス(3c)にロック状態を示すデー
タD8を出力し、制御線(19a)を通じて共有バスア
クセス制御回路(17)に不可分サイクルの書込みを指
示する。これと同時に、制御回路(19)は、無効化情
報を生成制御ビットバス(14d)に出力してバッファ
(16)をイネーブルにし、制御線(14a)を通じて
キャッシュディレクトリメモリ(7)に書込みを指示す
る。キャッシュデータメモリ(7)及び共有バスへの書
込みが終了したら、制御回路(19)は、制御線(14
a)を通じてキャッシュディレクトリメモリ(7)を不
活性状態にし、共有データバス(3c)への出力を止め
、制御線(19a)を通じて共有バス制御回路(17)
に不可分サイクルの終了を指示し、出力ラッチ付き選択
器(18)にラッチを解除するように指示する。
Next, the control circuit (19) instructs the cache data memory (11) to read data, and sends the data D8 via the transceiver (12) to the processor data bus (
1c) and notifies the processor that data D8 has been output. The processor reads data D8. Once this is done, the control circuit (19) closes the transceivers (12) and (13), disables the buffer (16) and connects the cache directory memory (7) and the cache data memory via control lines (14a) and (14b). (11) is made inactive. Then, if the read data D8 (spin lock bit) indicates a locked state, the control circuit (19) connects the control line (19a
) to instruct the shared bus access control circuit (17) to abort the indivisible cycle, and at the same time instruct the output latched selector (18) to release the latch. Further, if the data D8 indicates a released state, the control circuit (19
) outputs data D8 indicating the locked state to the shared data bus (3c) and instructs the shared bus access control circuit (17) to write an atomic cycle through the control line (19a). At the same time, the control circuit (19) outputs invalidation information to the generation control bit bus (14d), enables the buffer (16), and instructs writing to the cache directory memory (7) through the control line (14a). do. When writing to the cache data memory (7) and the shared bus is completed, the control circuit (19) connects the control line (14) to the cache data memory (7) and the shared bus.
a) makes the cache directory memory (7) inactive, stops outputting to the shared data bus (3c), and connects the shared bus control circuit (17) to the shared bus control circuit (17) through the control line (19a).
to end the indivisible cycle, and instruct the selector with output latch (18) to release the latch.

【0049】(d)ロック領域への書込みミスの場合通
常の書込みミスの場合と同じ動作をする。
(d) In the case of a write error in the lock area, the same operation as in the case of a normal write error is performed.

【0050】次に、この発明の第2実施例を用いた密結
合型マルチプロセッサシステムにおけるスピンロック動
作を図5及び図6を参照しながら説明する。図5及び図
6は、この発明の第2実施例を用いた密結合型マルチプ
ロセッサシステムにおけるスピンロック動作を説明する
状態遷移図である。
Next, a spinlock operation in a tightly coupled multiprocessor system using the second embodiment of the present invention will be explained with reference to FIGS. 5 and 6. 5 and 6 are state transition diagrams illustrating spinlock operations in a tightly coupled multiprocessor system using the second embodiment of the present invention.

【0051】ここでは、上述した第2実施例はキャッシ
ュメモリ(2AB)及び(2BB)で実現されている。 また、プロセッサ(1A)及び(1B)は不可分サイク
ル命令をもっていないとする。
[0051] Here, the second embodiment described above is realized by cache memories (2AB) and (2BB). It is also assumed that processors (1A) and (1B) do not have atomic cycle instructions.

【0052】初期状態(状態401)では、プロセッサ
(1A)及び(1B)は他の動作を行っており、スピン
ロックビットはキャッシュメモリ(2AB)及び(2B
B)には入っておらず、共有メモリ(4)上のスピンロ
ックビットは解放状態である。
[0052] In the initial state (state 401), processors (1A) and (1B) are performing other operations, and the spin lock bit is used for cache memories (2AB) and (2B).
B), and the spinlock bit on shared memory (4) is in the released state.

【0053】プロセッサ(1A)はスピンロックを要求
すると、ロック領域への読みだしを実行し、共有メモリ
(4)からスピンロックビットを読み出す。このとき、
キャッシュメモリ(2AB)は、共有バスに対して不可
分サイクルの読みだしを実行し、キャッシュメモリ(2
AB)において、解放状態を示すスピンロックビットの
エントリが有効になる。(状態402)
When the processor (1A) requests a spinlock, it executes reading to the lock area and reads the spinlock bit from the shared memory (4). At this time,
The cache memory (2AB) executes atomic cycle reads to the shared bus, and
AB), the entry of the spinlock bit indicating the released state becomes valid. (Status 402)

【0054】プロセッサ(1A)及びキャッシュメモリ
(2AB)は、スピンロックビットが解放状態であるこ
とからスピンロックに成功したことを知る。キャッシュ
メモリ(2AB)は、共有メモリ上のスピンロックビッ
トに対して不可分サイクルの書き込みを行ってスピンロ
ックビットをロック状態にし、同時にスピンロックビッ
トのエントリを無効にする。(状態403)
The processor (1A) and the cache memory (2AB) know that the spinlock was successful because the spinlock bit is in the released state. The cache memory (2AB) writes atomic cycles to the spinlock bit on the shared memory to lock the spinlock bit, and at the same time invalidates the entry of the spinlock bit. (Status 403)

【0055】スピンロックに成功したプロセッサ(1A
)は、共有データの処理を行う。(状態404)
[0055] Processor (1A) that succeeded in spinlocking
) handles shared data processing. (Status 404)

【00
56】プロセッサ(1A)は、共有データの処理を終え
ると、ロック領域に書き込みを行って共有メモリ(4)
上のスピンロックビットを解放状態にする。このとき、
キャッシュメモリ(2AB)ではスピンロックビットの
エントリが既に無効にされているので、プロセッサ(1
A)はキャッシュメモリ(2AB)に対しては何も行わ
ない。(状態405)
00
56] When the processor (1A) finishes processing the shared data, it writes to the lock area and stores it in the shared memory (4).
Release the upper spinlock bit. At this time,
Since the spinlock bit entry has already been disabled in the cache memory (2AB), the processor (1AB)
A) does nothing to the cache memory (2AB). (Status 405)

【0057】プロセッサ(1A)は、スピンロック解放
後、他の動作を行う。(状態406)
After releasing the spinlock, the processor (1A) performs other operations. (Status 406)

【0058】次に、プロセッサ(1A)及び(1B)が
同時にスピンロックを要求する場合について説明する。 キャッシュメモリ(2AB)及び(2BB)は、共有バ
スに対して不可分サイクルの読みだしを実行し、共有メ
モリ(4)からスピンロックビットを読み出そうとする
。共有バス(3)上の調停で、キャッシュメモリ(2B
B)が共有バスを獲得し、スピンロックビットを読み出
す。このとき、キャッシュメモリ(2BB)では解放状
態を示すスピンロックビットのエントリが有効になる。 この間、キャッシュメモリ(2AB)は、キャッシュメ
モリ(2BB)が共有バスを解放するまで待つ。(状態
407)
Next, a case will be described in which processors (1A) and (1B) request a spinlock at the same time. The cache memories (2AB) and (2BB) perform an atomic cycle read on the shared bus and attempt to read the spinlock bit from the shared memory (4). Arbitration on shared bus (3) allows cache memory (2B
B) acquires the shared bus and reads the spinlock bit. At this time, the entry of the spinlock bit indicating the release state becomes valid in the cache memory (2BB). During this time, the cache memory (2AB) waits until the cache memory (2BB) releases the shared bus. (Status 407)

【0059】プロセッサ(1B)及びキャッシュメモリ
(2BB)は、スピンロックビットが解放状態であるこ
とを知り、キャッシュメモリ(2BB)は、不可分サイ
クルの書き込みを行って共有メモリ(4)上のスピンロ
ックビットをロック状態にし、同時にスピンロックビッ
トのエントリを無効にする。(状態408)
The processor (1B) and the cache memory (2BB) know that the spinlock bit is in the released state, and the cache memory (2BB) performs an atomic cycle write to release the spinlock on the shared memory (4). Locks the bit and disables the spinlock bit entry at the same time. (Status 408)

【0060】そして、プロセッサ(1B)は共有データ
の処理を行う。この間に、キャッシュメモリ(2AB)
は共有バスを獲得し、共有バスに対して不可分サイクル
の読みだしを実行し、共有メモリ(4)上のスピンロッ
クビットを読み出す。このとき、キャッシュメモリ(2
AB)では、ロック状態を示すスピンロックビットのエ
ントリが有効になる。これでキャッシュメモリ(2AB
)の共有バスに対する不可分サイクルは終了する。(状
態409)
[0060] The processor (1B) then processes the shared data. During this time, cache memory (2AB)
acquires the shared bus, performs an atomic cycle read on the shared bus, and reads the spinlock bit on the shared memory (4). At this time, cache memory (2
AB), the spinlock bit entry indicating the lock status becomes valid. Now the cache memory (2AB
) ends the atomic cycle for the shared bus. (Status 409)

【0061】プロセッサ(1A)及びキャッ
シュメモリ(2AB)は、スピンロックに失敗したこと
を知る。そして、プロセッサ(1A)はスピンロックに
成功するまでスピンロックビットを読み続ける。このと
き、キャッシュメモリ(2AB)において、ロック状態
を示すスピンロックビットのエントリが有効であるので
、プロセッサ(1A)は、スピンロックビットをキャッ
シュメモリ(2AB)から読み出し、共有バスをアクセ
スすることはない。(状態410)
The processor (1A) and cache memory (2AB) know that the spinlock has failed. The processor (1A) then continues reading the spinlock bit until the spinlock is successfully acquired. At this time, since the spinlock bit entry indicating the lock state is valid in the cache memory (2AB), the processor (1A) reads the spinlock bit from the cache memory (2AB) and cannot access the shared bus. do not have. (Status 410)

【0062】次に、
プロセッサ(1B)は共有データの処理を終え、ロック
領域への書き込みを行って共有メモリ(4)上のスピン
ロックビットを解放状態にする。このとき、キャッシュ
メモリ(2BB)は、スピンロックビットのエントリが
既に無効にされているので何も行わない。この間、キャ
ッシュメモリ(2AB)は、プロセッサ(1A)による
共有バスへの書き込みを検出して、スピンロックビット
のエントリを無効にする。(状態411)
Next,
The processor (1B) finishes processing the shared data and writes to the lock area to release the spinlock bit on the shared memory (4). At this time, the cache memory (2BB) does nothing because the spinlock bit entry has already been invalidated. During this time, the cache memory (2AB) detects writing to the shared bus by the processor (1A) and invalidates the spinlock bit entry. (Status 411)

【0063】
プロセッサ(1B)は、スピンロックを解放した後、他
の動作を行う。この間に、プロセッサ(1A)はスピン
ロックを要求し続ける。キャッシュメモリ(2AB)で
のスピンロックビットのエントリが無効にされているの
で、プロセッサ(1A)は、不可分サイクルの読出しを
実行して共有メモリ(4)からスピンロックビットを読
み出す。このとき、キャッシュメモリ(2AB)では、
解放状態を示すスピンロックビットのエントリが有効に
なる。 (状態412) これ以降、(状態403)〜(状態406)までと同様
になる。 (状態413)〜(状態416)
[0063]
After releasing the spinlock, the processor (1B) performs other operations. During this time, processor (1A) continues to request a spinlock. Since the entry of the spinlock bit in the cache memory (2AB) is invalidated, the processor (1A) executes an atomic cycle read to read the spinlock bit from the shared memory (4). At this time, in the cache memory (2AB),
The spinlock bit entry indicating the released state becomes valid. (State 412) From this point on, the process is the same as (state 403) to (state 406). (state 413) to (state 416)

【0064】上述したように、この発明の第1実施例は
、プロセッサからの不可分サイクルの書込み要求を検出
する不可分サイクルの書込み検出器(15)を備え、ま
た、この発明の第2実施例は、プロセッサからのロック
領域へのアクセスを検出するロック領域アクセス検出器
(20)を備え、共有メモリ(4)においてスピンロッ
クを実現し、共有バスへ不可分サイクルの書込みを行っ
たときに、書込みが行われたデータのエントリを無効に
する。 つまり、例えば第1実施例を用いた密結合型マルチプロ
セッサシステムにおいて、プロセッサ(1B)が、不可
分サイクルの書込みを行ってスピンロックを解放したと
きに、キャッシュメモリ(2BA)はスピンロックビッ
トのエントリを無効にするので、プロセッサ(1A)が
スピンロックビットを読み出しても、同時にキャッシュ
メモリ(2AA)及び(2BA)に解放状態のスピンロ
ックビットのエントリが有効であるという状態がなく、
不具合を防ぐことができる。また、スピンロックに失敗
したプロセッサ(1A)は、スピンロックが解放される
までプロセッサ(1A)のキャッシュメモリ(2AB)
にスピンロックを要求し続けるので、共有バスを無駄に
アクセスすることがない。さらに、第2実施例を用いた
密結合型マルチプロセッサシステムにおいても同様であ
る。
As described above, the first embodiment of the present invention includes a non-divisible cycle write detector (15) for detecting a non-divisible cycle write request from the processor, and the second embodiment of the present invention includes , is equipped with a lock area access detector (20) that detects access to the lock area from the processor, realizes a spin lock in the shared memory (4), and when writing an atomic cycle to the shared bus, the write is Invalidate any data entries made. That is, for example, in a tightly coupled multiprocessor system using the first embodiment, when the processor (1B) performs an atomic cycle write and releases the spinlock, the cache memory (2BA) stores the spinlock bit entry. Therefore, even if the processor (1A) reads the spinlock bit, there is no state in which the entry of the spinlock bit in the released state is valid in the cache memories (2AA) and (2BA) at the same time.
Problems can be prevented. In addition, the processor (1A) that has failed to acquire the spinlock will use the cache memory (2AB) of the processor (1A) until the spinlock is released.
The shared bus will not be accessed in vain because it continues to request a spinlock. Furthermore, the same applies to the tightly coupled multiprocessor system using the second embodiment.

【0065】なお、上記第1及び第2実施例の無矛盾化
プロトコルは、ライトスルーアルゴリズムであるが、無
効状態をもつ他のアルゴリズムであっても同様の効果が
得られる。
Although the consistency protocols in the first and second embodiments are write-through algorithms, similar effects can be obtained even with other algorithms that have an invalid state.

【0066】また、上記第1及び第2実施例では、キャ
ッシュディレクトリメモリ(7)が1つの場合を示した
が、これを複数備えれば、共有バスへのアクセスによっ
て生じる他のプロセッサアクセスへの妨害を小さくする
ことができる。
Furthermore, in the first and second embodiments described above, the case where there is one cache directory memory (7) is shown, but if a plurality of cache directory memories (7) are provided, access to other processors caused by access to the shared bus can be prevented. Disturbance can be reduced.

【0067】[0067]

【発明の効果】この発明は、以上詳しく説明したとおり
、プロセッサからの不可分サイクルの書込みを検出する
検出手段と、上記不可分サイクルの書込み検出時に当該
エントを無効化する制御手段とを備えたことによって、
共有バスの使用率を小さくすることができるので、他の
プロセッサのアクセスを妨害することがなく、また、密
結合型マルチプロセッサにおける不具合を解消すること
ができるという効果を奏する。
[Effects of the Invention] As explained in detail above, the present invention includes a detection means for detecting writing of an indivisible cycle from a processor, and a control means for invalidating the entry when detecting writing of the indivisible cycle. ,
Since the usage rate of the shared bus can be reduced, access by other processors is not obstructed, and problems in tightly coupled multiprocessors can be solved.

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

【図1】この発明の第1実施例を示すブロック図である
FIG. 1 is a block diagram showing a first embodiment of the invention.

【図2】この発明の第1実施例を用いた密結合型マルチ
プロセッサシステムにおけるスピンロック動作を説明す
る状態遷移図である。
FIG. 2 is a state transition diagram illustrating a spinlock operation in a tightly coupled multiprocessor system using the first embodiment of the present invention.

【図3】この発明の第1実施例を用いた密結合型マルチ
プロセッサシステムにおけるスピンロック動作を説明す
る状態遷移図である。
FIG. 3 is a state transition diagram illustrating a spinlock operation in a tightly coupled multiprocessor system using the first embodiment of the present invention.

【図4】この発明の第2実施例を示すブロック図である
FIG. 4 is a block diagram showing a second embodiment of the invention.

【図5】この発明の第2実施例を用いた密結合型マルチ
プロセッサシステムにおけるスピンロック動作を説明す
る状態遷移図である。
FIG. 5 is a state transition diagram illustrating a spinlock operation in a tightly coupled multiprocessor system using a second embodiment of the present invention.

【図6】この発明の第2実施例を用いた密結合型マルチ
プロセッサシステムにおけるスピンロック動作を説明す
る状態遷移図である。
FIG. 6 is a state transition diagram illustrating a spinlock operation in a tightly coupled multiprocessor system using a second embodiment of the present invention.

【図7】従来の密結合型マルチプロセッサシステムを示
すブロック図である。
FIG. 7 is a block diagram showing a conventional tightly coupled multiprocessor system.

【図8】従来の密結合型マルチプロセッサシステムにお
けるスピンロック動作を説明する状態遷移図である。
FIG. 8 is a state transition diagram illustrating spinlock operation in a conventional tightly coupled multiprocessor system.

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

(1A)、(1B)    プロセッサ(1a)   
 プロセッサアドレスバス(1b)    プロセッサ
制御バス (1c)    プロセッサデータバス(2AA)、(
2BA)、(2AB),(2BB)    キャッシュ
メモリ(3a)    共有アドレスバス (3b)    共有制御バス (3c)    共有データバス (4)    共有メモリ (6)、(8)、(10)    選択器(7)   
 キャッシュディレクトリメモリ(9)    比較器 (9a)    ヒット判定線 (11)    キャッシュデータメモリ(12)、(
13)    トランシーバ(14)、(19)   
 制御回路 (14a)、(14b)、(14c)、(19a)  
  制御線(14d)    生成制御ビットバス(1
5)    不可分サイクルの書込み検出器(15a)
    不可分サイクルの書込み検出線(15b)  
  プロセッサ書込み線(15c)    プロセッサ
不可分サイクル線(16)    バッファ
(1A), (1B) Processor (1a)
Processor address bus (1b) Processor control bus (1c) Processor data bus (2AA), (
2BA), (2AB), (2BB) Cache memory (3a) Shared address bus (3b) Shared control bus (3c) Shared data bus (4) Shared memory (6), (8), (10) Selector (7) )
Cache directory memory (9) Comparator (9a) Hit determination line (11) Cache data memory (12), (
13) Transceiver (14), (19)
Control circuits (14a), (14b), (14c), (19a)
Control line (14d) Generation control bit bus (1
5) Indivisible cycle write detector (15a)
Indivisible cycle write detection line (15b)
Processor write line (15c) Processor indivisible cycle line (16) Buffer

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  プロセッサからの不可分サイクルの書
込みを検出する検出手段、及び上記不可分サイクルの書
込み検出時に当該エントリを無効化する制御手段を備え
たことを特徴とするキャッシュメモリ。
1. A cache memory comprising: detection means for detecting writing of an indivisible cycle from a processor; and control means for invalidating the entry when the write of the indivisible cycle is detected.
JP3054299A 1991-03-19 1991-03-19 Cache memory Pending JPH04296951A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3054299A JPH04296951A (en) 1991-03-19 1991-03-19 Cache memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3054299A JPH04296951A (en) 1991-03-19 1991-03-19 Cache memory

Publications (1)

Publication Number Publication Date
JPH04296951A true JPH04296951A (en) 1992-10-21

Family

ID=12966692

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3054299A Pending JPH04296951A (en) 1991-03-19 1991-03-19 Cache memory

Country Status (1)

Country Link
JP (1) JPH04296951A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009116885A (en) * 2008-11-28 2009-05-28 Fujitsu Ltd Computer and control method
JP2010517144A (en) * 2007-01-23 2010-05-20 インターナショナル・ビジネス・マシーンズ・コーポレーション Method and system for achieving both locking fairness and locking performance with spin lock

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010517144A (en) * 2007-01-23 2010-05-20 インターナショナル・ビジネス・マシーンズ・コーポレーション Method and system for achieving both locking fairness and locking performance with spin lock
JP2009116885A (en) * 2008-11-28 2009-05-28 Fujitsu Ltd Computer and control method

Similar Documents

Publication Publication Date Title
US6625698B2 (en) Method and apparatus for controlling memory storage locks based on cache line ownership
US4394731A (en) Cache storage line shareability control for a multiprocessor system
US5237694A (en) Processing system and method including lock buffer for controlling exclusive critical problem accesses by each processor
US4399506A (en) Store-in-cache processor means for clearing main storage
US7620954B2 (en) Mechanism for handling load lock/store conditional primitives in directory-based distributed shared memory multiprocessors
JP2001522091A (en) Memory optimization state
JPS59180767A (en) Serializer
JPH03196249A (en) Multiple processor system
JPH0358164A (en) Lock control mechanism for multiprocessor system
US6389517B1 (en) Maintaining snoop traffic throughput in presence of an atomic operation a first port for a first queue tracks cache requests and a second port for a second queue snoops that have yet to be filtered
US5339397A (en) Hardware primary directory lock
US6970963B2 (en) Apparatus and method for synchronizing multiple accesses to common resources
US6529933B1 (en) Method and apparatus for locking and unlocking a semaphore
EP0380842A2 (en) Method and apparatus for interfacing a system control unit for a multiprocessor system with the central processing units
JPH0532775B2 (en)
US5297267A (en) System and method for serialization control of accesses to a common main storage
JP2776759B2 (en) Lock request control device
JPH04296951A (en) Cache memory
KR100687822B1 (en) Minizing use of bus command code points to request the start and end of a lock
JPH055137B2 (en)
JP2844679B2 (en) Access control method and information processing device
JPH04350743A (en) Cache memory
JPH07262089A (en) Lock access control method and information processor
JPH05189318A (en) Information processor
JP2690697B2 (en) Buffer memory device