JPH01140367A - Memory coupling type multiprocessor system - Google Patents

Memory coupling type multiprocessor system

Info

Publication number
JPH01140367A
JPH01140367A JP62300934A JP30093487A JPH01140367A JP H01140367 A JPH01140367 A JP H01140367A JP 62300934 A JP62300934 A JP 62300934A JP 30093487 A JP30093487 A JP 30093487A JP H01140367 A JPH01140367 A JP H01140367A
Authority
JP
Japan
Prior art keywords
communication
processor
lock
memory
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP62300934A
Other languages
Japanese (ja)
Other versions
JPH053026B2 (en
Inventor
Sadaji Asano
淺野 貞二
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP62300934A priority Critical patent/JPH01140367A/en
Publication of JPH01140367A publication Critical patent/JPH01140367A/en
Publication of JPH053026B2 publication Critical patent/JPH053026B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)

Abstract

PURPOSE:To perform inter-processor communication in parallel without generating dead lock by performing communication by checking the state of a lock area and registering a communication state on a lock byte when the communication is available. CONSTITUTION:The title system is constituted in such a way that four processors 1-4 are coupled via a memory 5. And plural communication areas 51 and 52, and the lock area 53 where the communication states of the processors 1-4 and the activity states of the communication areas 51 and 52 are displayed are provided in the memory 5, and the communication is performed by checking the state of the lock area 53 and registering the communication state of the lock byte in a state where the communication is available. In such a way, it is possible to perform the inter-processor communication in parallel without generating the dead lock.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はメモリを介して排他制御によりプロセッサ間通
信が行われるメモリ結合型マルチプロセッサシステムに
関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a memory-coupled multiprocessor system in which communication between processors is performed by exclusive control via memory.

〔従来の技術〕[Conventional technology]

計粁槻の高速化の一手段として、情報処理装置のマルチ
プロセッサ化がなされている。従来、この秤のマルチプ
ロセラサシステムで、ブロセッナ間通信が実行される場
合、通信に用いられる通信エリア対応に、ロックエリア
を設け、そのロックバイトを調べて、ロックバイトがア
ンロック状態の場合は、ロックバイトをロック状態とす
るとともに、その結果を報告するテストアンドセット命
令を実行する排他制御により送信側がロックを取り、通
信エリアを用いて受信側に対して必要な情報を送り、通
信が終了した時点でロックを解除するアン[1ツク命令
を実行していた。
As a means of increasing the speed of computing, information processing devices have been made multi-processor. Conventionally, in the multi-processor system of this scale, when communication between Brosseners was performed, a lock area was set up corresponding to the communication area used for communication, the lock byte was checked, and if the lock byte was in an unlocked state, , the sender takes the lock using exclusive control that locks the lock byte and executes the test and set command to report the result, sends the necessary information to the receiver using the communication area, and the communication ends. At that point, the unlock command was executed to release the lock.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上述した従来のマルチプロセッサシステムでは、プロセ
ッサが4個以上の場合、特定のプロセッサがプ【】セッ
サ間通信のためにロックバイトをロックした場合、その
通信とは関係のないプロセッサ同士が通信しようとする
場合も実行されずに持ち状態となるという欠点がある。
In the conventional multiprocessor system described above, when there are four or more processors, if a specific processor locks the lock byte for inter-processor communication, processors unrelated to that communication attempt to communicate with each other. Even if you do this, it has the disadvantage that it remains in a holding state without being executed.

この問題を解決するために、複数の通信エリアをもうけ
ることにより、同時に複数の組のプロセッサ間通信がで
きるようにすることが考えられているが、この場合、従
来の通信エリア対応のロックでは、システムがデッドロ
ックを起づ危険があるので、実現されていなかった。
In order to solve this problem, it has been considered to create multiple communication areas to enable communication between multiple sets of processors at the same time, but in this case, with conventional locks that support communication areas, This was not implemented due to the risk of the system deadlocking.

〔問題点を解決するための手段〕[Means for solving problems]

本発明のメモリ結合型マルチプロセッサシステムは、 メモリは、プロセッサ間通信のための複数の通信エリア
と、複数のプロセッサと前記複数の通信エリアの各々に
対応するビットを有し、各プロセッサが通信状態にある
かどうかと、各通信エリアが使用状態にあるかどうかを
表示するロックエリアとを有し、 各プロセッサは、通信を行おうとするときは、前記ロッ
クエリアを調べ、自己および相手プロセッサが非通信状
態であり、前記通信エリアのいずれかが実使用状態であ
るとき、非使用状態であるいずれかの通信エリアを介し
て通信を行うように、該通信状態を前記ロックエリアに
排他的登録した後通信を行ない、該通信が終了次第前記
排他的登録を取消す手段を有している。
In the memory-coupled multiprocessor system of the present invention, the memory has a plurality of communication areas for inter-processor communication, and bits corresponding to each of the plurality of processors and the plurality of communication areas, and each processor is in a communication state. and a lock area that displays whether each communication area is in use.When each processor attempts to communicate, it checks the lock area and determines whether it and the other processor are inactive. communication state, and when any of the communication areas is in actual use, the communication state is exclusively registered in the locked area so that communication is performed via any communication area that is in non-use. It has means for performing post-communication and canceling the exclusive registration upon completion of the communication.

〔作用〕[Effect]

複数の通信エリアと、複数のプロセッサの通信状態と複
数の通信エリアの使用状態を表示するロックエリアをメ
モリ内に設定し、ロックエリアの状態を調べて、通信が
可能なとき、ロックバイト通信状態を登録して通信する
ので、デッドロックを起さずに並列にプロセッサ間通信
ができる。
Set up a lock area in memory that displays multiple communication areas, the communication status of multiple processors, and the usage status of multiple communication areas, check the status of the lock area, and when communication is possible, lock byte communication status Since it registers and communicates, it is possible to communicate between processors in parallel without causing deadlock.

〔実施例〕〔Example〕

次に、本発明の実施例について図面を参照して説明する
Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明メモリ結合型マルチプロセッサシステム
の一実施例を示す構成図、第2図は第1図のプロセッサ
1内のマスクレジスタ11の周辺の肩線とメモリ5の関
係を示ず構成図である。
FIG. 1 is a configuration diagram showing an embodiment of the memory-coupled multiprocessor system of the present invention, and FIG. 2 does not show the relationship between the shoulder line around the mask register 11 in the processor 1 in FIG. 1 and the memory 5. It is a diagram.

このメモリ結合型マルチプロセッサシステムは、4台の
プロセッサ1.2.3.4がメモリ2を介して結合され
た構成となっており、メモリ2には、通信エリア51.
52およびロックエリア53が割付けられ、プロセッサ
1〜4にはマスクレジスタ11,21.31.41がそ
れぞれ設けられている。ロックエリア53およびマスク
レジスタ11.21.31.41はいずれも同じ構成で
、第1ビツトがプロセッサ1、第2ビツトがプロセッサ
2、第3ビツト・がプロセッサ3、第4ビツトがプロセ
ッサ4、第5ビツトが通信エリア51゜第6ビツトが通
信エリア52とそれぞれ対応し、“1”のときロック状
態、M OHのときアンロック状態をそれぞれ表示する
。ここで、ロック状態とは、プロセッサについては通信
状態、通信エリアについては使用状態にあることを意味
する。
This memory-coupled multiprocessor system has a configuration in which four processors 1.2.3.4 are coupled via a memory 2, and the memory 2 includes communication areas 51.
52 and a lock area 53 are allocated, and the processors 1 to 4 are provided with mask registers 11, 21, 31, and 41, respectively. Lock area 53 and mask registers 11.21.31.41 all have the same configuration; the first bit is processor 1, the second bit is processor 2, the third bit is processor 3, and the fourth bit is processor 4, processor 2. The 5th bit corresponds to the communication area 51, and the 6th bit corresponds to the communication area 52, and when it is "1", it indicates the locked state, and when it is MOH, it indicates the unlocked state. Here, the locked state means that the processor is in a communication state and the communication area is in a use state.

第2図を参照すると、マスクレジスタ11の周囲には、
ノット回路12と、アンド回路13゜14と、オア回路
15.16と、セレクタ17゜18とが、信号線101
,102,103,104.105およびその他の信号
線を介して接続された構成となっており、メモリ5と信
号線102の間には第1図では不図示のメモリライトレ
ジスタ54が設けられている。なお、第2図では、繁雑
さを避けるため、マスクレジスタ11およびメモリ5に
より扱われる6ビツトの信号のうち、1ビツトを扱う構
成部分のみを示している。
Referring to FIG. 2, around the mask register 11,
A NOT circuit 12, an AND circuit 13, 14, an OR circuit 15, 16, and a selector 17, 18 are connected to the signal line 101.
, 102, 103, 104, 105 and other signal lines, and a memory write register 54 (not shown in FIG. 1) is provided between the memory 5 and the signal line 102. There is. In FIG. 2, in order to avoid complexity, only a component that handles 1 bit of the 6-bit signal handled by the mask register 11 and memory 5 is shown.

セレクタ17は、ロックエリア53のマスクレジスタ1
1により指定されたビットのうち、少なくとblつがロ
ック状態であるときはメモリ5を選択し、すべてがアン
0ツク状態であるときはアンド回路15を選択してセレ
クタ18へ出力する。
The selector 17 is the mask register 1 of the lock area 53.
When at least bl of the bits designated by 1 are in the locked state, the memory 5 is selected, and when all are in the unlocked state, the AND circuit 15 is selected and output to the selector 18.

セレクタ18は、命令がテストアンドレット命令のとき
はセレクタ17を選択して、メモリ5に対する同−読出
書込サイクル内にロックエリア53にデータを害込むメ
モリライトレジスタ54をセツトし、命令がアンロック
命令のときは、アンド回路13を選択し、ロックエリア
53内のマスクレジスタ11により指定されたビットを
リセットする。信号線101,103,104,105
は、いずれもプロセッサ1内の不図示の制御部と接続さ
れている。信号線101は、メ七り5へ通信エリア51
.52、ロックエリア53、およびその他のエリアのり
一ド/ライトアドレスを入力し、信号線103はマスク
レジスタ11ヘマスクビツトを入力し、信号線104は
セレクタ18へ命令の種類を示す信号を入力し、信号線
105はオア回路16よりテスl〜アンドセット・命令
のテスト結果を出力するための信号線である。
When the instruction is a test andlet instruction, the selector 18 selects the selector 17 and sets the memory write register 54 that corrupts data in the lock area 53 during the same read/write cycle for the memory 5, and when the instruction is unloaded. In the case of a lock instruction, the AND circuit 13 is selected and the bit designated by the mask register 11 in the lock area 53 is reset. Signal lines 101, 103, 104, 105
are both connected to a control section (not shown) within the processor 1. The signal line 101 connects to the communication area 51
.. 52, lock area 53, and other areas. The signal line 103 inputs a mask bit to the mask register 11. The signal line 104 inputs a signal indicating the type of instruction to the selector 18. A line 105 is a signal line through which the OR circuit 16 outputs the test results of the TEST1 to ANDSET commands.

次に、本実施例の動作を説明する。Next, the operation of this embodiment will be explained.

プロセッサ1がプロセッサ2と通信しようとするとき、
プロセッサ1はマスクレジスタ11のプロセッサ1、プ
ロセッサ2、および通信エリア51に対応した第1ビツ
ト、第2ビツト、および第5ビツトを“1″にセットし
、他のビットをII OIIにする。続いて、プロセッ
サ1はテストアンドセット命令を実行する。[コックエ
リア53のすべてのビットが“0″の場合、デス1−ア
ンドセット命令は成r)Jシて、ロックエリア53の第
1ビツト、第2ビツト、第5ビツトは“1″にセットさ
れ、他のビットは前の値“0″が保持される。
When processor 1 attempts to communicate with processor 2,
Processor 1 sets the first, second, and fifth bits of mask register 11 corresponding to processor 1, processor 2, and communication area 51 to "1", and sets the other bits to IIOII. Subsequently, processor 1 executes a test and set instruction. [If all bits in the cock area 53 are “0”, the des1-and-set instruction is not executed. Then, the first, second, and fifth bits of the lock area 53 are set to “1” The other bits retain their previous value "0".

この状態で、プロセッサ3、ブ[1セツサ4がプロセッ
サ通信をしようとすると、プロセッサ3は、マスクレジ
スタ31の第3ビツト、第4ビツト、および第5ビツト
をll 1 IIにセットし、他のビットはO゛′とす
る。続いてテス(〜アンドヒツト命令を実行すると、ロ
ックエリア53の第5ビツトがすてに1″となっている
ため、テストアンドヒツト命令は失敗となる。次に、プ
ロセッサ3はマスクレジスタ31の第3ビツト、第4ピ
ツh、第6ビツトを“1パにセットし、他のビットは“
OIIとし、再度テストアンドセット命令を実行すると
、テストアンドセット命令は成功し、ロックコ辺ノア5
3の第3ビツト、第4ビツト、第6ビツトがセットされ
る。この結果、プロセッサ−1とプロセッサ2は通信エ
リア51を使い、ブ[1t?ツ1)3どプロセッサ4は
通信エリア52を使・)で同時にブロセッυ゛間通信を
実行できる。このように、テストアンドセット命令失敗
時は、通信エリア51.52に対するマスクビットのバ
タンを変えて再度テストアンドセット命令を実行し、こ
れを繰返すことにより、通信がビジーの時、例えばプロ
セッサ1とプロセッサ2の通信中に、ブロセツ1ノ3が
ブ[1L!ツリ2に対して通信訝求があった場合など、
プロセッサ3はテストアンドセット命令を繰返しながら
侍らの状態となり、01他制御が実現される。
In this state, when the processor 3 and the block setter 4 try to perform processor communication, the processor 3 sets the third, fourth, and fifth bits of the mask register 31 to ll 1 II, and The bit is O''. Next, when the test (~and hit instruction) is executed, the test and hit instruction fails because the fifth bit of the lock area 53 is already 1''. Set the 3rd bit, 4th bit h, and 6th bit to “1pa”, and set the other bits to “
OII and execute the test and set instruction again, the test and set instruction is successful and the lock controller side Noah 5
The third, fourth, and sixth bits of 3 are set. As a result, processor-1 and processor-2 use the communication area 51, and the processor-1 and processor-2 use the communication area 51. 1) The three processors 4 can use the communication area 52 to simultaneously perform inter-processor communication. In this way, when the test and set command fails, the mask bits for the communication areas 51 and 52 are changed and the test and set command is executed again. By repeating this, when communication is busy, for example, processor 1 During the communication of processor 2, Brosets 1 and 3 are bu[1L! If there is a communication request for Tree 2, etc.
The processor 3 enters the samurai state while repeating the test and set command, and 01 and other control is realized.

次に、第2図を参117i (、てプロセッサ゛1の細
部の動作を説明する。
Next, the detailed operation of the processor 1 will be explained with reference to FIG.

テストアンドセット命令が実行されると、メモリ5より
ロックエリア53のf−タが出力される。
When the test and set instruction is executed, the f-ta of the lock area 53 is output from the memory 5.

このデータは、アンド回路14によりマスクレジスタ1
1の値と対応するビットごとに論理積がとられ、その出
力はオア回路16により全ビットが論即和をとられる。
This data is transferred to the mask register 1 by the AND circuit 14.
An AND operation is performed for each bit corresponding to the value of 1, and the OR circuit 16 performs an AND operation on all bits of the output.

オア回路16の出力が1″の場合、ロックエリア53の
ビットでマスクレジスタ11で指定されたビットのうち
少なくとし1つが[1ツク状態であるので、この場合は
セレクタ17によりロックエリア53のデータがそのま
まセレクタ18へ出力され、再び[1ツクエリア53へ
書込まれるので、ロックエリア53の各ビットは変化し
ない。これに対し、オア回路16の出力が″0′′の場
合、ロックエリア53のピッ1〜でマスクレジスタ11
で指定されたビットがすべてアンロック状[艮であるの
で、Δア回路15により、これら指定されたビットは“
1′′どされ、指定されていないビットは変化せずその
ままセレクタ17へ入力され、セレクタ18を介してロ
ックエリア53へ新たなデータが出込まれる。
When the output of the OR circuit 16 is 1'', at least one of the bits in the lock area 53 specified by the mask register 11 is in the [1] state. is output as is to the selector 18 and written to the [1] area 53 again, so each bit of the lock area 53 does not change.On the other hand, when the output of the OR circuit 16 is "0", the bits of the lock area 53 Mask register 11 with pin 1~
Since all the bits specified by are in the unlocked state, the ΔA circuit 15 sets these specified bits to “
1'', unspecified bits are input to the selector 17 without change, and new data is input to the lock area 53 via the selector 18.

通信が終了してロックエリア53をアン[コックする場
合、プロセッサ1は、同一書込読出サイクル内でマスク
レジスタ11で指定されたロックエリア53のビットを
リセットするアンロック命令を実行する。すなわ15、
メモリ5より出力されたロックエリア53の値と、ノッ
ト回路12にJ、り反転されたマスクレジスタ11の値
とを、アンド回路13により対応するビットごとに論理
積をとられ、その出力はセレクタ18、メモリライトレ
ジスタ54を介して再びロックエリア53へ書込まれる
。この場合、マスクレジスタ11により指定されている
ビットは反転されて“0”となるので、対応するロック
エリア53のビットをリセットし、指定されていないビ
ットは反転されて“1°゛となって論I!!積がとられ
るので、変化せず再びロックエリア53へ同じ値が書込
まれる。
When unlocking the lock area 53 after communication ends, the processor 1 executes an unlock instruction to reset the bits of the lock area 53 specified by the mask register 11 within the same write/read cycle. Sunawa 15,
The value of the lock area 53 output from the memory 5 and the value of the mask register 11 inverted by the NOT circuit 12 are ANDed for each corresponding bit by the AND circuit 13, and the output is sent to the selector. 18, the data is written to the lock area 53 again via the memory write register 54. In this case, the bit specified by the mask register 11 is inverted and becomes "0", so the corresponding bit in the lock area 53 is reset, and the unspecified bit is inverted and becomes "1°". Theory I!! Since the product is taken, the same value is written to the lock area 53 again without changing.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明は、メモリ内に複数の通信エ
リアと、複数のプロセッサの通信状態と複数の通信エリ
アの使用状態を表示するロックエリアを設定し、ロック
エリアの状態を調べて、通信が可能なときロックバイト
に通信状態をσ録して通信することにより、デッドロッ
クを起さずに並列にプロセッサ間通信ができる効果があ
る。
As explained above, the present invention sets a plurality of communication areas in a memory, a lock area that displays the communication status of a plurality of processors, and a usage status of the plurality of communication areas, checks the status of the lock area, and performs communication. By recording the communication status in the lock byte when possible, communication between processors can be carried out in parallel without causing deadlock.

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

第1図は本発明のメモリ結合型マルチプロセッサシステ
ムの一実施例を示す構成図、第2図は第1図のプロセッ
サ1内のマスクレジスタ11の周辺の詳細とメモリ5の
関係を丞す構成図である。 1.2.3.4・・・プロセッサ、 11.21,31.41・・・マスクレジスタ、5・・
・メモリ、 51.52・・・通信エリア、 53・・・ロックエリア。
FIG. 1 is a configuration diagram showing an embodiment of the memory-coupled multiprocessor system of the present invention, and FIG. 2 is a configuration showing the relationship between the peripheral details of the mask register 11 in the processor 1 of FIG. 1 and the memory 5. It is a diagram. 1.2.3.4... Processor, 11.21, 31.41... Mask register, 5...
・Memory, 51.52...Communication area, 53...Lock area.

Claims (1)

【特許請求の範囲】 4台以上のプロセッサを含み、メモリを介して排他制御
によりプロセッサ間通信が行なわれるメモリ結合型マル
チプロセッサシステムにおいて、前記メモリは、プロセ
ッサ間通信のための複数の通信エリアと、前記複数のプ
ロセッサと前記複数の通信エリアの各々に対応するビッ
トを有し、各プロセッサが通信状態にあるかどうかと、
各通信エリアが使用状態にあるかどうかを表示するロッ
クエリアとを有し、 前記各プロセッサは、通信を行おうとするときは、前記
ロックエリアを調べ、自己および相手プロセッサが非通
信状態であり、前記通信エリアのいずれかが非使用状態
であるとき、非使用状態であるいずれかの通信エリアを
介して通信を行うように、該通信状態を前記ロックエリ
アに排他的登録した後通信を行ない、該通信が終了次第
前記排他的登録を取消す手段を有することを特徴とする
メモリ結合型マルチプロセッサシステム。
[Claims] In a memory-coupled multiprocessor system that includes four or more processors and in which inter-processor communication is performed by exclusive control via memory, the memory has multiple communication areas for inter-processor communication. , having bits corresponding to each of the plurality of processors and the plurality of communication areas, and determining whether each processor is in a communication state;
and a lock area that displays whether each communication area is in use, and when each processor attempts to communicate, it checks the lock area and determines whether the processor itself and the other processor are in a non-communicative state; When any of the communication areas is in an unused state, the communication state is exclusively registered in the locked area so that communication is performed via any of the communication areas that are in an unused state, and then the communication is performed, A memory-coupled multiprocessor system comprising means for canceling the exclusive registration upon completion of the communication.
JP62300934A 1987-11-27 1987-11-27 Memory coupling type multiprocessor system Granted JPH01140367A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62300934A JPH01140367A (en) 1987-11-27 1987-11-27 Memory coupling type multiprocessor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62300934A JPH01140367A (en) 1987-11-27 1987-11-27 Memory coupling type multiprocessor system

Publications (2)

Publication Number Publication Date
JPH01140367A true JPH01140367A (en) 1989-06-01
JPH053026B2 JPH053026B2 (en) 1993-01-13

Family

ID=17890868

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62300934A Granted JPH01140367A (en) 1987-11-27 1987-11-27 Memory coupling type multiprocessor system

Country Status (1)

Country Link
JP (1) JPH01140367A (en)

Also Published As

Publication number Publication date
JPH053026B2 (en) 1993-01-13

Similar Documents

Publication Publication Date Title
US3528062A (en) Program interlock arrangement,including task suspension and new task assignment
KR101642646B1 (en) Interruptible store exclusive
US3806878A (en) Concurrent subsystem diagnostics and i/o controller
JPS584372B2 (en) object access control device
JPH07101410B2 (en) Method for synchronizing instruction stream execution for testing serialization means in a data processing network
US8380963B2 (en) Apparatus and method for enabling inter-sequencer communication following lock competition and accelerator registration
JPH01140367A (en) Memory coupling type multiprocessor system
Alur et al. Contention—free complexity of shared memory algorithms
JP3085730B2 (en) Parallel simulation method for complex CPU system
CN118672203B (en) PLCopen motion control function block interaction method and system based on shared memory
JPH01300366A (en) Control system for conflict of shared data
JPH11272499A (en) Parallel processor system equipped with performance measuring circuit and method for measuring performance of program
JPH01125633A (en) System for debugging multi-processing system
JPS58101357A (en) Control circuit for common memory
KR940002270B1 (en) Common memory locking function trouble diagnosis and recovering data calculating method for multi-processing system
JPS62119661A (en) Access management system to shared memory
JPS62156756A (en) Floating interrupt handling method
JPS60539A (en) Monitoring system of process progress
JPH01263858A (en) Multi-processor system
JPH0258155A (en) Configuration control system
CN115048220A (en) Dynamic data competition detection method, device, terminal and storage medium
JPH0528118A (en) Exclusive control register device
JPH01187665A (en) Interruption system among processors
JPS62166463A (en) Data transfer system
JPS6131493B2 (en)