JPH03250355A - Inter-processor communication method for multiprocessor system - Google Patents
Inter-processor communication method for multiprocessor systemInfo
- Publication number
- JPH03250355A JPH03250355A JP4744890A JP4744890A JPH03250355A JP H03250355 A JPH03250355 A JP H03250355A JP 4744890 A JP4744890 A JP 4744890A JP 4744890 A JP4744890 A JP 4744890A JP H03250355 A JPH03250355 A JP H03250355A
- Authority
- JP
- Japan
- Prior art keywords
- processor
- processors
- interrupt
- message
- inter
- 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
Links
- 238000004891 communication Methods 0.000 title claims abstract description 29
- 238000000034 method Methods 0.000 title claims description 8
- 230000004044 response Effects 0.000 abstract 2
- 238000010586 diagram Methods 0.000 description 5
- 239000000470 constituent Substances 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
Landscapes
- Multi Processors (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は複数のプロセッサ間でメツセージ交換を行うマ
ルチプロセッサシステムのプロセッサ間通信方法に関す
る。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an interprocessor communication method in a multiprocessor system for exchanging messages between a plurality of processors.
第4図は、一般的なマルチプロセッサシステムの構成を
示す概略構成図である。同図において、プロセッサ(ロ
ーカルメモリを含む)PI〜Pnと共有メモリ41は、
システムバス42を介して接続されており、各プロセッ
サは、共有メモリ41にアクセスして他の任意のプロセ
ッサに割り込みを発生させることにより、プロセッサ間
通信を行うことができる。FIG. 4 is a schematic configuration diagram showing the configuration of a general multiprocessor system. In the figure, processors (including local memory) PI to Pn and a shared memory 41 are
They are connected via a system bus 42, and each processor can perform inter-processor communication by accessing the shared memory 41 and generating an interrupt to any other processor.
従来のマルチプロセッサシステムには、第5図に示すよ
うに、共有メモリ41内に、プロセッサP1、P2、・
・・Pnにそれぞれ対応して固定領域41−1〜41−
nが割り付けされ、さらにそれらの固定領域には、自己
以外の各プロセッサ(すなわち、(n −1,)のプロ
セッサ)に対応して、各プロセッサからのメツセージか
書き込まれるメツセージ書き込み用固定領域か設けられ
ているものがある。なお第5図において、r Inte
rrupt(記号X−記号Y)Jは、プロセッサPXか
らプロセッサPYへの割り込みが発生することを示して
おり、例えば、図中矢印Aで示すr Interrup
t(?1)Jは、プロセッサP2からプロセッサP1へ
の割り込みが発生することを示している。また図中、各
固定領域内において斜線で示す升目以外の升目部分、例
えば矢印Bて示す升目部分は、メツセージ書き込ろ用固
定領域を示している。As shown in FIG. 5, a conventional multiprocessor system includes processors P1, P2, .
・Fixed areas 41-1 to 41- corresponding to Pn, respectively
n is allocated, and furthermore, in these fixed areas, a fixed area for writing messages is provided corresponding to each processor other than the self (i.e., (n - 1,) processors), in which messages from each processor are written. There are things that are being done. In addition, in FIG. 5, r Inte
rrupt (symbol X-symbol Y) J indicates that an interrupt occurs from processor PX to processor PY.
t(?1)J indicates that an interrupt occurs from processor P2 to processor P1. In the figure, in each fixed area, squares other than the hatched squares, for example, the squares indicated by arrow B, indicate fixed areas for message writing.
上述したマルチプロセッサシステムにおいて、各プロセ
ッサが、共有メモリ41を使用してプロセッサ間通信を
行う場合、例えばプロセッサP2がプロセッサP1に対
して割り込みを発生させる場合は、プロセッサP1に対
応する固定領域411における自己用のメツセージ書き
込み用固定領域にメツセージを書き込んで割り込み(I
nterrupt(2−’1.))を発生させる。一方
プロセッサP1では、割り込み(Interrupt(
?1.))か発生すると、プロセッサP2に対応するメ
ツセージ書き込み用固定領域をアクセスして、割り込み
処理を実行する。In the multiprocessor system described above, when each processor performs inter-processor communication using the shared memory 41, for example, when processor P2 generates an interrupt for processor P1, in the fixed area 411 corresponding to processor P1, Writes a message to the fixed message writing area for own use and interrupts (I)
interrupt(2-'1.)). On the other hand, in the processor P1, an interrupt (Interrupt(
? 1. )), the message write fixed area corresponding to processor P2 is accessed and interrupt processing is executed.
この場合、共有メモリ領域(メツセージ書き込み用固定
領域)のアドレスは通信する両者が予め認識している。In this case, the address of the shared memory area (fixed area for message writing) is known in advance by both parties communicating.
ところで上記従来のマルチプロセッサシステムでは、n
個のプロセッサを対等に動作させるには、メツセージ書
き込み用固定領域(共有メモリ内)及び割り込みの種類
を共に(nX(n−1,))個分設定しなければならず
、nが大きいときは、非常に多くの、かつ回路構成が複
雑な割り込み処理用のハードウェアが必要になってしま
う。さらに多くのハードウェアが必要となるので、その
構成要素である部品が増大しコストアップになってしま
うという欠点があった。By the way, in the conventional multiprocessor system mentioned above, n
In order for these processors to operate equally, it is necessary to set both the fixed area for writing messages (in the shared memory) and the types of interrupts to (nX (n-1,)), and when n is large, , a large amount of interrupt processing hardware with a complex circuit configuration is required. Since more hardware is required, the number of constituent parts increases, resulting in an increase in cost.
本発明は上記欠点を解消し、多くのプロセッサがある場
合であっても、単純化した回路構成で、かつ最小限のハ
ードウェア資源でプロセッサ開通信を行うことのできる
マルチプロセッサシステムのプロセッサ間通信方法を提
供することを目的とする。The present invention solves the above-mentioned drawbacks and enables inter-processor communication in a multiprocessor system, which enables processor open communication with a simplified circuit configuration and minimal hardware resources even when there are many processors. The purpose is to provide a method.
本発明は、複数のプロセッサと、それらのプロセッサが
共通にアクセスできる共有メモリとを有するマルチプロ
セッサシステムにおいて、前記共有メモリには各プロセ
ッサに対応して自己以外の全てのプロセッサからの割り
込み要求に対してアクセスを許可するか否かの情報を与
える共通のメツセージ領域を設け、各プロセッサは、通
信相手のプロセッサに対応するメツセージ領域にアクセ
スを許可する情報が示されていた場合は、当該領域に所
定のメツセージを書込んで当該プロセッサに割り込みを
発生させるように構成したものである。The present invention provides a multiprocessor system having a plurality of processors and a shared memory that can be commonly accessed by the processors, in which the shared memory is configured to respond to interrupt requests from all processors other than the processor itself. A common message area is provided that provides information on whether access is permitted or not, and each processor, if information indicating permission to access is shown in the message area corresponding to the processor of the communication partner, This is configured to write a message to generate an interrupt to the processor concerned.
本発明のプロセッサ間通信方法によれば、共有メモリに
は、n個のプロセッサに対応するn個の共通のメツセー
ジ領域(他の全てのプロセッサが割り込みを発生させる
ための領域)を設けている。According to the inter-processor communication method of the present invention, the shared memory is provided with n common message areas (areas for all other processors to generate interrupts) corresponding to n processors.
そして各プロセッサは、割り込み要求に際し、通信相手
のプロセッサに対応するメツセージ領域を参照し、アク
セスを許可する情報が示されていた場合は、当該領域に
自己の識別情報及びメツセージの書き込みを行い、また
自己のメツセージ領域を参照して割り込みか発生してい
た場合は当該割り込み処理を実行する。When receiving an interrupt request, each processor refers to the message area corresponding to the communication partner's processor, and if information permitting access is indicated, writes its own identification information and message to the area, and If an interrupt is generated by referring to its own message area, the corresponding interrupt processing is executed.
従って、n個のプロセッサが存在する場合は、nに比例
する所定の構成要素から成る割り込み処理用のハードウ
ェアで良いことと−なり、多くのプロセッサがある場合
であっても、最小限のハードウェア資源でプロセッサ間
通信が可能となる。Therefore, if there are n processors, interrupt handling hardware consisting of predetermined components proportional to n will suffice, and even if there are many processors, the minimum hardware Communication between processors becomes possible using hardware resources.
以下、本発明に係るプロセッサ間通信方法の実施例を添
付図面を参照して説明する。Embodiments of the inter-processor communication method according to the present invention will be described below with reference to the accompanying drawings.
第1図は本発明に係るプロセッサ間通信方法を適用した
マルチプロセッサシステムの一実施例を示す構成図であ
る。同図において、第4図に示したマルチプロセッサシ
ステムにおける構成部分と同様の機能を果たす部分には
同一の符号を付している。FIG. 1 is a block diagram showing an embodiment of a multiprocessor system to which an inter-processor communication method according to the present invention is applied. In the figure, parts that perform the same functions as the constituent parts in the multiprocessor system shown in FIG. 4 are given the same reference numerals.
第1図において、共有メモリ10には、プロセッサP1
、P2、・・・ Pnにそれぞれ対応して、メツセージ
書き込み用固定領域(以下、固定領域という)10刊、
10−2、・= 10−nが割り付けされている。こ
れらの各固定領域は、上述したメツセージ領域の機能を
果し、対応する自己のプロセッサ以外の全てのプロセッ
サからの割り込み情報が書き込まれる。例えば、第1図
の固定領域10−1内に示されている[(2〜I+)→
1)」は、プロセッサP1以外の他の全てのプロセッサ
P2〜Pnからの割り込み情報が書き込まれることを示
している。また同様のことが、他の固定領域1o−2,
10−3、・・ ]0−nについてもいえる。ただし、
同図の固定領域10−2.10−3には、表現を簡単に
するためI” (1,−n)→2 J、r (1〜n)
−3Jと記載されているが、正確には「(1,3〜n戸
2」、「(1,2,4〜n)−3」である。In FIG. 1, the shared memory 10 includes a processor P1.
, P2, ... 10 fixed areas for message writing (hereinafter referred to as fixed areas) corresponding to Pn, respectively.
10-2, . = 10-n are allocated. Each of these fixed areas functions as the message area described above, and interrupt information from all processors other than the corresponding self-processor is written therein. For example, [(2~I+)→
1)'' indicates that interrupt information from all processors P2 to Pn other than processor P1 is written. The same thing applies to other fixed areas 1o-2,
10-3,...]0-n. however,
In the fixed area 10-2 and 10-3 of the same figure, for simplicity of expression, I" (1, -n) → 2 J, r (1~n)
Although it is written as -3J, the exact numbers are "(1,3~n 2") and "(1,2,4~n)-3."
すなわち共有メモリ]0には、n個のプロセッサに対応
してn個の固定領域が割り付けされ、所定のプロセッサ
への通信には、そのプロセッサに対応する固定領域が使
用される。なお各固定領域(共有メモリの各エントリ)
には、対応するプロセッサへのアクセスを許可するか否
かのフラグ(セマフォフラグ)と割り込み元の識別情報
(ID)を含むものとする。In other words, n fixed areas are allocated to the shared memory]0 corresponding to n processors, and the fixed area corresponding to the processor is used for communication to a given processor. Each fixed area (each entry in shared memory)
includes a flag (semaphore flag) indicating whether access to the corresponding processor is permitted, and identification information (ID) of the interrupt source.
一方、割り込みも、n個のプロセッサに対応(つまり割
り込みをかけられる側のプロセッサに対応)しており、
そのプロセッサへの通信を行う場合の割り込みは全て同
一のものが使用される。On the other hand, interrupts also correspond to n processors (that is, correspond to the processor that receives the interrupt).
The same interrupts are used for all communications to the processor.
従って、固定領域および割り込み(1nterrupt
)の種類も、n個のプロセッサに対応してn個だけ設
定されることになる。Therefore, fixed area and interrupt
) are also set to correspond to the n number of processors.
なお、第1図の図中矢印Aて示す点線内に囲まれた部分
のr Interrupt((2〜n)→1)」は、プ
ロセッサP]への他のプロセッサP2〜Pnからの割り
込みか発生することを示している。同様に、プロセッサ
P2に対するr Interrupt((1〜n)−2
)J 、−Pnに対するr Interrupt((1
〜n−1)=n) Jも、それぞれ該当するプロセッサ
P2、・・ Pnへの他のプロセッサ(PI、P3〜P
n) 、・・・ プロセッサ(PI〜P(n−1,))
からの割り込みが発生ずることを示している。Note that "rInterrupt((2~n)→1)" in the part surrounded by the dotted line indicated by arrow A in FIG. It shows that. Similarly, r Interrupt((1~n)−2
) J , - r Interrupt for -Pn ((1
~n-1)=n) J also connects other processors (PI, P3 to Pn) to the corresponding processors P2,...Pn, respectively.
n),... Processor (PI~P(n-1,))
This indicates that an interrupt will be generated.
次に上記マルチプロセッサシステムのプロセッサ間通信
処理動作を第2図及び第3図を用いて説明する。Next, the inter-processor communication processing operation of the multiprocessor system will be explained using FIGS. 2 and 3.
ここに、割り込みをかける側のプロセッサをプロセッサ
P1とし、また割り込みをかけられる側のプロセッサを
プロセッサP2とする。Here, the processor on the side that issues an interrupt is assumed to be processor P1, and the processor on the side that receives the interrupt is assumed to be processor P2.
最初に、割り込みをかける側のプロセッサの割り込み処
理について第2図を用いて説明する。First, the interrupt processing of the processor that issues the interrupt will be explained with reference to FIG.
プロセッサP1は、プロセッサ間通信の要求元からの割
り込み処理要求を受は付け(ステップ20)、割り込み
をかけたい通信相手のプロセッサ(この例ではプロセッ
サP2)に対応する共有メモリ10の固定領域(この例
では固定領域1o−2(第1図参照))のセマフォフラ
グをテストアンドセット命令でアクセスして、通信相手
に割り込みをかける権利を確保する。Processor P1 accepts an interrupt processing request from a requestor for interprocessor communication (step 20), and stores a fixed area (this area) in shared memory 10 corresponding to the communication partner processor (processor P2 in this example) to which an interrupt is to be issued. In the example, the semaphore flag in the fixed area 1o-2 (see FIG. 1) is accessed by a test and set instruction to secure the right to interrupt the communication partner.
すなわち、プロセッサP1は、固定領域、1.0−2内
のセマフォフラグかオンか否かを判断しくステップ2]
)、オフの場合には割り込み許可であると認識(割り込
みをかける権利を確保てきたと認識)して、通信相手の
プロセッサに対応する固定領域すなわち固定領域10−
2に、自己のプロセッサ識別情報(ID)及び必要なメ
ツセージを書き込み(ステップ22)、通信相手のプロ
セッサP2に割り込みを発生させ(ステップ23)、そ
の後、次の割り込み処理要求に備えてリターンする。That is, the processor P1 determines whether the semaphore flag in the fixed area 1.0-2 is on or not (step 2).
), if it is off, it is recognized that interrupts are enabled (recognizes that the right to issue an interrupt has been secured), and the fixed area corresponding to the processor of the communication partner, that is, the fixed area 10-
2, writes its own processor identification information (ID) and a necessary message (step 22), generates an interrupt to the communication partner processor P2 (step 23), and then returns in preparation for the next interrupt processing request.
なお、上記ステップ21において通信相手がビジィ−(
Busy)であった場合(セマフォフラグがオンの場合
)は、エラーコード(Busy)を設定して(ステップ
24)、その旨をプロセッサ間通信の要求元へ通知し、
リトライを促す。Note that in step 21 above, if the communication partner is busy (
Busy) (if the semaphore flag is on), sets an error code (Busy) (step 24), notifies the requestor of the inter-processor communication to that effect,
Encourage retry.
続いて、割り込みをかけられる側のプロセッサの処理に
ついて第3図を用いて説明する。Next, the processing of the processor on the side where the interrupt is applied will be explained using FIG.
割り込みをかけられる側のプロセッサとしてのプロセッ
サP2は、他のプロセッサがらの割り込みが発生(この
例ではプロセッサP1がらの割り込みが発生)した場合
は(ステップ30)、自己のプロセッサ内の図示しない
レジスタの値(例えば自己の現在の状態)を退避させ(
ステップ31)その後、自己のプロセッサに対応する固
定領域1.0−2(第1図参照)に書かれているプロセ
ッサID及びメツセージを読出し、さらにそれらの情報
に基づいてとこからの通信でとのような内容かを識別し
、該当する処理タスクに渡す(ステップ32)。When an interrupt from another processor occurs (in this example, an interrupt from processor P1 occurs), processor P2, which is the processor receiving the interrupt, registers a register (not shown) in its own processor (step 30). Save the value (for example, the current state of the self) (
Step 31) After that, read the processor ID and message written in the fixed area 1.0-2 (see Figure 1) corresponding to the own processor, and based on that information, The content is identified and passed to the corresponding processing task (step 32).
次にプロセッサP2は、自己のプロセッサに対する固定
領域10−2内のセマフォフラグをクリアにして(ステ
ップ33)、レジスタの値を復帰させ(ステップ34)
、さらに割り込み処理を終了して(ステップ35)、次
の割り込み要求に備えリターンする。Next, the processor P2 clears the semaphore flag in the fixed area 10-2 for its own processor (step 33), and restores the register value (step 34).
, further ends the interrupt processing (step 35), and returns in preparation for the next interrupt request.
以上説明したように本実施例によれば、プロセッサの数
をnとした場合、ハードウェアの構成要素は、従来では
(nX(n−1))に比例する増分たったものが、nに
比例する増分てすむ。As explained above, according to this embodiment, when the number of processors is n, the hardware components are incremented in proportion to n, whereas in the past, the increment was proportional to (nX(n-1)). Incremental test.
すなわち、n個のプロセッサがお互いに対等な立場で任
意の相手と通信を行うマルチプロセッサシステムの場合
であっても、従来の如く、メツセージ書き込み用固定領
域及び割り込みの種類をそれぞれ(nX(n−1))個
にする必要はなく、メツセージ書き込み用固定領域及び
割り込みの種類は共にn個で良いので、割り込み処理用
のノへ−ドウェアの回路構成を単純化でき、また/%−
Fウェアの構成要素(部品)を最小限に抑制することか
できる。In other words, even in the case of a multiprocessor system in which n processors communicate with any other party on an equal footing, the fixed area for message writing and the type of interrupt are each (nX(n- 1)) There is no need to use n pieces for both the fixed area for message writing and the types of interrupts, so the circuit configuration of the hardware for interrupt processing can be simplified, and /%-
The number of components (components) of Fware can be minimized.
従って、安価なマルチプロセッサシステムを提供するこ
とかできるとともに、最小限のハードウェア資源でプロ
セッサ間通信を行うことができる。Therefore, it is possible to provide an inexpensive multiprocessor system and to perform inter-processor communication with a minimum of hardware resources.
以上説明したように本発明によれば、共有メモリには、
n個のプロセッサに対応したn個のメソセージ領域を設
け、所定のプロセッサへの通信には、他の全てのプロセ
ッサは、所定のプロセッサに対応する共通のメツセージ
領域にアクセスするようにしたため、nに比例する構成
要素から成る割り込み処理用のハードウェアを設定すれ
ば良いこととなり、最小限のハードウェア資源でプロセ
ッサ間通信を行うことができる。As explained above, according to the present invention, the shared memory includes
n message areas corresponding to n processors are provided, and all other processors access a common message area corresponding to the predetermined processor for communication to a predetermined processor. It is only necessary to set hardware for interrupt processing consisting of proportional components, and inter-processor communication can be performed with a minimum of hardware resources.
第1図は本発明に係るプロセッサ間通信方法を適用した
マルチプロセッサシステムの一実施例を示す構成図、第
2図および第3図は割り込み処理動作を示すフローチャ
ート、第4図は一般的なマルチプロセッサシステムの構
成を示す概略構成図、第5図は従来のマルチプロセッサ
システムの構成を示す構成図である。
P]、P2、Pn・・プロセッサ、10・共有メモリ、
10−1.10−2.10−3.10−n・・・メツセ
ージ書き込み用固定領域、42・・システムバス。
第4図
339−FIG. 1 is a block diagram showing an embodiment of a multiprocessor system to which the interprocessor communication method according to the present invention is applied, FIGS. 2 and 3 are flowcharts showing interrupt processing operations, and FIG. 4 is a general multiprocessor system. FIG. 5 is a schematic block diagram showing the structure of a processor system. FIG. 5 is a block diagram showing the structure of a conventional multiprocessor system. P], P2, Pn... Processor, 10. Shared memory,
10-1.10-2.10-3.10-n... fixed area for writing messages, 42... system bus. Figure 4 339-
Claims (1)
セスできる共有メモリとを有するマルチプロセッサシス
テムにおいて、 前記共有メモリには各プロセッサに対応して自己以外の
全てのプロセッサからの割り込み要求に対してアクセス
を許可するか否かの情報を与える共通のメッセージ領域
を設け、各プロセッサは、通信相手のプロセッサに対応
するメッセージ領域にアクセスを許可する情報が示され
ていた場合は、当該領域に所定のメッセージを書込んで
当該プロセッサに割り込みを発生させるようにしたこと
を特徴とするマルチプロセッサシステムのプロセッサ間
通信方法。[Scope of Claims] In a multiprocessor system having a plurality of processors and a shared memory that can be commonly accessed by those processors, the shared memory stores interrupt requests from all processors other than itself corresponding to each processor. A common message area is provided that provides information on whether or not to permit access to the processor, and if each processor has information indicating that access is permitted in the message area corresponding to the processor of the communication partner, then 1. A method for communicating between processors in a multiprocessor system, characterized in that a predetermined message is written to a processor to generate an interrupt in the processor.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4744890A JPH03250355A (en) | 1990-02-28 | 1990-02-28 | Inter-processor communication method for multiprocessor system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4744890A JPH03250355A (en) | 1990-02-28 | 1990-02-28 | Inter-processor communication method for multiprocessor system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH03250355A true JPH03250355A (en) | 1991-11-08 |
Family
ID=12775432
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP4744890A Pending JPH03250355A (en) | 1990-02-28 | 1990-02-28 | Inter-processor communication method for multiprocessor system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH03250355A (en) |
-
1990
- 1990-02-28 JP JP4744890A patent/JPH03250355A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH05242060A (en) | Multiprocessor and data identification method | |
| JPH02288927A (en) | Shared memory management system | |
| JP3169624B2 (en) | Interprocessor communication method and parallel processor therefor | |
| JPS588018B2 (en) | multiprocessor system | |
| William | C. mmp-A multi-mini-processor | |
| EP0437928B1 (en) | Memory management in a multi-processor system | |
| JPH02257249A (en) | Information processing system | |
| JPS5936836A (en) | Controlling device of interruption | |
| JP2929631B2 (en) | Communication device between processors | |
| KR20010036590A (en) | A memory accessing device and method by using interrupt and polling way | |
| JPS63305450A (en) | Interprocessor communication method | |
| JPH0328934A (en) | Deadlock preventing method for shared resources | |
| JPS5815815B2 (en) | Common information management method | |
| JPH01154272A (en) | multiprocessor equipment | |
| JPS63158660A (en) | Multiprocessor bus control system | |
| JPH0214741B2 (en) | ||
| JPH03252856A (en) | Processing system for program | |
| JPS605368A (en) | Communication control processor | |
| EP0139727A1 (en) | Multi-computer computer architecture | |
| JPH04305746A (en) | Cache memory control device | |
| JPS5995661A (en) | Storage system | |
| JPH04106627A (en) | Information processor | |
| JPH04326453A (en) | Multi-processor system | |
| JPS626329A (en) | data transfer circuit | |
| JPH01243146A (en) | Shared memory access method |