JPH01169563A - Inter-processor synchronizing system - Google Patents
Inter-processor synchronizing systemInfo
- Publication number
- JPH01169563A JPH01169563A JP32521287A JP32521287A JPH01169563A JP H01169563 A JPH01169563 A JP H01169563A JP 32521287 A JP32521287 A JP 32521287A JP 32521287 A JP32521287 A JP 32521287A JP H01169563 A JPH01169563 A JP H01169563A
- Authority
- JP
- Japan
- Prior art keywords
- address
- bus
- processor
- data
- memory
- 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
- 238000000034 method Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000007796 conventional method Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Landscapes
- Multi Processors (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明はマルチプロセッサ方式に関し、特にプロセッサ
間の同期方式に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a multiprocessor system, and particularly to a synchronization system between processors.
従来、この種のマルチプロセッサシステムでハ、テスト
アンドセット命令を用いてプロセッサ間の同期を取って
いた。Conventionally, in this type of multiprocessor system, synchronization between processors has been achieved using test and set instructions.
ここで、テストアンドセット命令とは、メモリの内容の
ゼロチエツクとオール1書き込みを同時に実行する命令
であシ、第4図(a)、(b)に示すように、2つのプ
ロセッサが同一アドレスtに対してテストアンドセット
命令を発行し、先にメモリにアクセスしたプロセッサは
、ゼロを読み出してテストカミ成功し、遅れてメモリに
アクセスL f(7” oセッサは、先行したプロセラ
?により既にオール1が書き込まれているためテストが
成功せず、先行したプロセッサがt番地の内容をゼロだ
するまでテストアンドセット命令を繰り返すことにより
、プロセッサ間の同期を図ろうというものである。第4
図(a)、(b)の例では。Here, the test and set instruction is an instruction that simultaneously executes a zero check and all 1 write of the contents of the memory, and as shown in FIGS. The processor that accesses the memory first reads zero and the test succeeds, and then accesses the memory L f (7"). The test is not successful because the t address has been written, and the test and set instruction is repeated until the preceding processor resets the contents of address t to zero, thereby synchronizing the processors.
In the example of Figures (a) and (b).
2つのプロセッサは、a番地で示されるメモリにデータ
を格納し、a番地の内容を更新している。この様な処理
は、マルチプロセッサ環境では不可欠の待行列を作る場
合に必要とされる。The two processors store data in the memory indicated by address a and update the contents of address a. Such processing is required to create a queue, which is essential in a multiprocessor environment.
テストアンドセット命令を用いないと、 MPU0がa
番地を読み出し、更新後の値を書き込む間に、 MPU
Iが、a番地を読み出し、poとplの値が一致してし
まい、 MPU0が書き込んだ値が。If the test and set instruction is not used, MPU0 will
While reading the address and writing the updated value, the MPU
I reads address a, the po and pl values match, and the value written by MPU0.
MPUI Kより、上書きされ、失われてしまうことが
起こシうる。MPUI K may be overwritten and lost.
しかしながら、上述した従来のプロセッサ間同期方式は
テストアンドセント命令、テスト成功判定命令、テスト
アンドセット対象番地のクリア命令を必要とすること、
2つのプロセッサが、はぼ同時にテストアンドセット命
令を実行すると、どちらかのプロセッサが、相手のプロ
セッサの実行終了を待ち合わせなければならないという
、性能上の欠点がある。However, the conventional inter-processor synchronization method described above requires a test-and-sent instruction, a test success determination instruction, and a clear instruction for the address to be tested and set.
When two processors execute test and set instructions almost simultaneously, there is a performance disadvantage in that one of the processors has to wait for the other processor to finish its execution.
そこで本発明の技術的課題は、上記欠点に鑑み、2つの
プロセッサが同時にテストアンドセット命令を実行して
も、一方のプロセッサの実行終了を待ち合せることなく
処理できるプロセッサ間同期方式を提供することである
。SUMMARY OF THE INVENTION In view of the above drawbacks, it is a technical problem of the present invention to provide an inter-processor synchronization method that allows two processors to simultaneously execute test and set instructions without waiting for one processor to finish execution. It is.
本発明によれば、複数のプロセッサからのバス要求を調
停し、アドレスをデコードして応答者を選択制御するバ
スコントローラを有するマルチプロセッサシステムにお
いて、データバスのデータを入力し9歩進した値を轟該
データバスに出力するカウンタを設け、前記バスコント
ローラが予め割り当てられたアドレス空間の領域のワー
ドのアクセスに対し、対応するメモリ領域のワードをア
クセスし、前記カウンタの出力を前記プロセッサに読み
出し、データとして返すと共に、読み出しを行った番地
のワードに書き戻すように制御することを特徴とするプ
ロセッサ間同期方式が得られる。According to the present invention, in a multiprocessor system having a bus controller that arbitrates bus requests from a plurality of processors, decodes addresses, and controls selection of responders, a value obtained by inputting data on a data bus and incrementing it by nine steps is used. providing a counter outputting to the data bus, accessing a word in a corresponding memory area when the bus controller accesses a word in a pre-allocated address space area, and reading an output of the counter to the processor; An inter-processor synchronization method is obtained which is characterized by controlling the data to be returned as data and writing back to the word at the read address.
即ち9本発明のプロセッサ間同期方式は、バスの要求者
と応答者を決定し、必要な制御信号をコントロールバス
に送出するバスコントローラと、データを入力し、イン
クリメンタにより歩進した値をドライバを通してデータ
バスに出力するカウンタとを有している。In other words, the inter-processor synchronization method of the present invention includes a bus controller that determines bus requesters and responders and sends necessary control signals to the control bus, and a bus controller that inputs data and increments the value incremented by an incrementer. It has a counter that outputs data to the data bus through the counter.
次に1本発明について図面を参照して説明する。 Next, one embodiment of the present invention will be explained with reference to the drawings.
第1図は本発明の一実施例のブロック図である。バスコ
ントローラ1はコントロールバス53とアドレスバス5
1によりバスの要求者と応答者を決定し、必要な制御信
号をコントロールバス53に送出する。プロセッサ2a
とプロセッサ2bはメモリを共用し独立にタスクを実行
するマルチプロセッサシステムを構成している。メモリ
3は、プロセッサが共用するデータを格納している。カ
ウンタ4は1ワードのデータを入力し。FIG. 1 is a block diagram of one embodiment of the present invention. The bus controller 1 has a control bus 53 and an address bus 5.
1 determines the bus requester and responder, and sends necessary control signals to the control bus 53. processor 2a
and processor 2b constitute a multiprocessor system that shares memory and independently executes tasks. Memory 3 stores data shared by the processors. Counter 4 inputs one word of data.
ラッチ41で保持しインクリメンタ43により+1した
値をドライバ42を通して出力する。アドレスバス51
.データバス52.コントロールバス53はプロセッサ
とメモリを接続するバスであり。The value held by the latch 41 and incremented by 1 by the incrementer 43 is outputted through the driver 42. address bus 51
.. Data bus 52. The control bus 53 is a bus that connects the processor and memory.
それぞれ、アドレス、データ、制御信号を伝達する。プ
ロセッサ2a、2bのアドレス出力Aはアドレスバス5
1に接続され、データ入出力りはデータバス52に接続
される。プロセッサ2a、2bがバスを要求するときは
アドレスストローブAsをアサートし、コントロールバ
ス53を経由してバスコントローラ1に通知する。バス
動作が完了スるとバスコントローラ1はコントロールバ
ス53を経由してバス要求を受は付けたプロセッサのデ
ータ応答人力DTACKをアサートする。Each transmits address, data, and control signals. Address outputs A of processors 2a and 2b are connected to address bus 5.
1, and data input/output is connected to a data bus 52. When the processors 2a and 2b request the bus, they assert the address strobe As and notify the bus controller 1 via the control bus 53. When the bus operation is completed, the bus controller 1 asserts the data response DTACK of the processor that accepted the bus request via the control bus 53.
バスコントローラ1はアドレスバス51上のアドレスの
上位ビットをデコードし、応答者として周辺装置(図示
せず)、メモリを選択し、コントロールバス53を経由
して選択されたデバイスのデバイス選択信号C8をアサ
ートする。メモリ3のアドレス人力Aはアドレスバス5
1の一部に接続され、データ入出力りはデータバス52
に接続される。リードライト指定R/Wはコントロール
バス53を介してバスを使用しているプロセッサのリー
ドライト指定R/Wに接続される。The bus controller 1 decodes the upper bits of the address on the address bus 51, selects a peripheral device (not shown) or memory as the responder, and sends the device selection signal C8 of the selected device via the control bus 53. Assert. Address A of memory 3 is address bus 5
1, and data input/output is connected to a data bus 52.
connected to. The read/write designation R/W is connected via the control bus 53 to the read/write designation R/W of the processor using the bus.
データバス52はカウンタ4に含まれるラッチ41に接
続され、インクリメンタ43によシ+1された値がドラ
イバ42を介して再びデータバス52に接続される。ラ
ッチ41.ドライバ42は、コントロールバス53ヲ介
シてバスコントローラ1の制御を受ける。The data bus 52 is connected to the latch 41 included in the counter 4, and the value incremented by 1 by the incrementer 43 is connected to the data bus 52 again via the driver 42. Latch 41. The driver 42 is controlled by the bus controller 1 via the control bus 53.
第2図に従って、動作例を説明する。プロセッサ2ai
J’に+a番地、プロセッサ2bはに+b番地にアクセ
スする。ここにkはカウンタ4に割Baてられたアドレ
ス空間の領域の先頭番地を示す。バスコントローラ1は
、プロセッサ2aのに+a番地に対するバス要求を受は
付け、アドレスバス51の上位ビットをデコードしカウ
ンタ領域であることを検出し、メモリ3のCSをアサー
トする。続いてバスコントローラ1はメモリサイクルを
もう1サイクルの間保持し、ドライバ42をイネーブル
しa番地の内容を+1した値(a) +1をデータバス
52にのせ、プロセッサ2aのDTACKをアサートす
ることによシプロセッサ2aに値(a) + 1が読み
込まれる。それと同時に、バスコントローラ1はメモリ
3のC8をアサートし、R/W信号をライトにすること
により、a番地の内容を+1する。プロセッサ2bのに
+b番地に対するアクセスも同様に処理され、b+2番
地の内容を+1しだ値(b) + 1がプロセッサ2b
に読み込まれた。同時にb番地の内容が+1される。An example of operation will be explained according to FIG. processor 2ai
J' accesses address +a, and processor 2b accesses address +b. Here, k indicates the starting address of the area of the address space allocated to the counter 4. Bus controller 1 accepts a bus request for address +a from processor 2a, decodes the upper bits of address bus 51, detects that it is a counter area, and asserts CS of memory 3. Next, the bus controller 1 holds the memory cycle for one more cycle, enables the driver 42, adds the value (a) +1 to the contents of address a, and asserts DTACK of the processor 2a. The value (a) + 1 is read into the processor 2a. At the same time, the bus controller 1 asserts C8 of the memory 3 and writes the R/W signal, thereby incrementing the contents of address a by 1. Access to address +b of processor 2b is processed in the same way, and the content of address b+2 is +1 and the value (b) + 1 is the value (b) + 1 of processor 2b.
was loaded into. At the same time, the contents of address b are incremented by 1.
第3図に示すように、プロセッサ2aと、プロセッサ2
bが、同一番地に+aにアクセスした場合、第2図のb
をaに読み替えることによシ。As shown in FIG.
If b accesses +a at the same location, b in Figure 2
By replacing ``a'' with ``a''.
pl=po+1であること、即ち、2つのプロセッサに
、必ず、異なる値を与えることが出来ることが分かる。It can be seen that pl=po+1, that is, it is possible to definitely give different values to the two processors.
以上説明したように本発明は、データバスにカウンタを
接続し、特定のアドレス空間領域に対するアクセスを行
うときに、メモリの内容を歩進することによシ、高速の
プロセッサ間の同期機構を提供できる効果がある。As explained above, the present invention provides a high-speed synchronization mechanism between processors by connecting a counter to a data bus and incrementing the contents of memory when accessing a specific address space area. There is an effect that can be done.
第1図は本発明のプロセッサ間同期方式のブロック図、
第2図は動作例を示すタイムチャート、第3図は同期プ
ログラムの例を示すフローチャート、第4図は従来技術
の例を示すフローチャートである。
1・・・バスコントローラ、2a、2b・・・プロセッ
サ。
3・・・メモリ、4・・・カウンタ、41・・・ラッチ
。
42・・・ドライバ、43・・・インクリメンタ。
艶・・・アドレスラッチ、51・・・アドレスバス。
52・・・データバス、53・・・コントローラノ(ス
。
第1図
第2図
MPIJOπ
MPLI ODTACK
CTR了
第3図
MPuOMPtJ1
第
MPU Q ((1)
(b)
MPU1
■ 初朋秩態、
■ MP(J O成功後
■ MPLI I 成エカ後FIG. 1 is a block diagram of the inter-processor synchronization method of the present invention,
FIG. 2 is a time chart showing an example of operation, FIG. 3 is a flowchart showing an example of a synchronization program, and FIG. 4 is a flowchart showing an example of a conventional technique. 1... Bus controller, 2a, 2b... Processor. 3...Memory, 4...Counter, 41...Latch. 42...Driver, 43...Incrementer. Gloss: address latch, 51: address bus. 52...Data bus, 53...Controller no. (After successful completion of JO ■ After successful completion of MPLI I
Claims (1)
スをデコードして応答者を選択制御するバスコントロー
ラを有するマルチプロセッサシステムにおいて、データ
バスのデータを入力し、歩進した値を当該データバスに
出力するカウンタを設け、前記バスコントローラが予め
割り当てられたアドレス空間の領域のワードのアクセス
に対し、対応するメモリ領域のワードをアクセスし、前
記カウンタの出力を前記プロセッサに読み出し、データ
として返すと共に、読み出しを行った番地のワードに書
き戻すように制御することを特徴とするプロセッサ間同
期方式。1. In a multiprocessor system that has a bus controller that arbitrates bus requests from multiple processors, decodes addresses, and selects and controls responders, data on a data bus is input and the incremented value is transferred to the data bus. A counter is provided for output, and when the bus controller accesses a word in a pre-assigned address space, a word in a corresponding memory area is accessed, and the output of the counter is read out to the processor and returned as data, An inter-processor synchronization method characterized by controlling writing back to the word at the address from which it was read.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP32521287A JPH01169563A (en) | 1987-12-24 | 1987-12-24 | Inter-processor synchronizing system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP32521287A JPH01169563A (en) | 1987-12-24 | 1987-12-24 | Inter-processor synchronizing system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH01169563A true JPH01169563A (en) | 1989-07-04 |
Family
ID=18174278
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP32521287A Pending JPH01169563A (en) | 1987-12-24 | 1987-12-24 | Inter-processor synchronizing system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH01169563A (en) |
-
1987
- 1987-12-24 JP JP32521287A patent/JPH01169563A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5276886A (en) | Hardware semaphores in a multi-processor environment | |
| US5201040A (en) | Multiprocessor system having subsystems which are loosely coupled through a random access storage and which each include a tightly coupled multiprocessor | |
| US8458411B2 (en) | Distributed shared memory multiprocessor and data processing method | |
| US4964037A (en) | Memory addressing arrangement | |
| JPH0793274A (en) | Data transfer method and data transfer device | |
| JPH01169557A (en) | Storage control system for computer | |
| US5408612A (en) | Microprocessor system for selectively accessing a processor internal register when the processor has control of the bus and partial address identifying the register | |
| JPH01169563A (en) | Inter-processor synchronizing system | |
| JPH01169564A (en) | Inter-processor synchronizing system | |
| JPH0353657B2 (en) | ||
| JPH08249289A (en) | Memory control device and control method thereof | |
| US20230010063A1 (en) | Method and apparatus for cloning data among peripheral components and a main system | |
| JP2823663B2 (en) | Multiprocessor system | |
| JPH1139214A (en) | A shared memory control method for multiprocessor systems. | |
| JPH06314231A (en) | Shared memory access control method | |
| JPH01293456A (en) | shared memory device | |
| JPH04184557A (en) | Request conflict generation method | |
| JPH0333951A (en) | Microcomputer system | |
| JPH04178852A (en) | Shared memory control system | |
| JP2593935B2 (en) | Direct memory access device | |
| JPS6095668A (en) | Memory access controlling system | |
| JPH06131239A (en) | Main storage access control system | |
| JPH0612363A (en) | Memory controller and multiprocessor system | |
| JPS62251829A (en) | Symbolic processing system and method | |
| JPS58103039A (en) | Data base system |