JP2932867B2 - Exclusive control method in common bus system - Google Patents

Exclusive control method in common bus system

Info

Publication number
JP2932867B2
JP2932867B2 JP4285010A JP28501092A JP2932867B2 JP 2932867 B2 JP2932867 B2 JP 2932867B2 JP 4285010 A JP4285010 A JP 4285010A JP 28501092 A JP28501092 A JP 28501092A JP 2932867 B2 JP2932867 B2 JP 2932867B2
Authority
JP
Japan
Prior art keywords
request
lock
bus
processor
signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP4285010A
Other languages
Japanese (ja)
Other versions
JPH06110847A (en
Inventor
出之 上原
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
Nippon Electric Co Ltd
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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP4285010A priority Critical patent/JP2932867B2/en
Publication of JPH06110847A publication Critical patent/JPH06110847A/en
Application granted granted Critical
Publication of JP2932867B2 publication Critical patent/JP2932867B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、共通バスシステムにお
ける排他制御方式に関し、特に共有資源であるバス,ロ
ック等の獲得制御方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an exclusive control system in a common bus system, and more particularly to an acquisition control system for a shared resource such as a bus and a lock.

【0002】[0002]

【従来の技術】システムに複数のプロセッサが存在する
マルチプロセッサシステムにおいては、主記憶中等にシ
ステムに共有な情報として、あるいはプロセッサ間の通
信のために共有領域が存在する。この共有領域を各プロ
セッサがアクセスする場合、排他制御が必要となる。
2. Description of the Related Art In a multiprocessor system in which a plurality of processors exist in a system, a shared area exists in a main memory or the like as information shared by the system or for communication between processors. When each processor accesses this shared area, exclusive control is required.

【0003】従来の排他制御では、主記憶中にロックバ
イトを設け、テストアンドセットコマンド等によりロッ
クバイトをアクセスする方式となっていた。
In the conventional exclusive control, a lock byte is provided in the main memory, and the lock byte is accessed by a test and set command or the like.

【0004】この方式は、各プロセッサがロックを取り
たい場合は、主記憶アクセスの一部としてテストアンド
セットコマンドを共通バスを介して発行する。
In this method, when each processor wants to take a lock, a test and set command is issued via a common bus as a part of main memory access.

【0005】主記憶では、本コマンドによりアクセスア
ドレスのロックバイトを読み出し、読み出しデータがオ
ール“0”であれば書込みデータを書込み、読み出しデ
ータがオール“0”でなければ、何もせず、いずれの場
合でも読み出しデータを要求元プロセッサへ返却する。
In the main memory, the lock byte of the access address is read by this command. If the read data is all "0", the write data is written. If the read data is not all "0", no operation is performed. Even in this case, the read data is returned to the requesting processor.

【0006】要求元プロセッサは返却された読出しデー
タよりデータがオール“0”であれば、ロック成功と判
断して共有領域のアクセスを行う。データがオール
“0”でなければロック不成功なので、ロック成功まで
テストアンドセットコマンドを送出することになる。ま
た、アンロックを行う場合は、主記憶アクセスコマンド
によってロックバイトにオール“0”を書き込むことに
より実現していた。
[0006] If the data is all "0" from the returned read data, the request source processor determines that the lock is successful and accesses the shared area. If the data is not all "0", the lock is unsuccessful, and a test and set command is sent until the lock is successful. Further, when unlocking is performed, all "0" is written in the lock byte by the main memory access command.

【0007】また、他の方式として専用のロックフラグ
をハードウェアで設ける方式がある。この方式は、シス
テム制御部等にロックフラグを設け、各プロセッサから
専用インタフェースを使ってロックフラグのアクセスを
行うものである。専用インタフェースでは、各プロセッ
サからシステム制御部へロック要求,アンロック要求を
行い、システム制御部から各プロセッサへロック成功の
通知を行う。
Another method is to provide a dedicated lock flag by hardware. In this method, a lock flag is provided in a system control unit or the like, and each processor accesses the lock flag using a dedicated interface. In the dedicated interface, each processor issues a lock request and an unlock request to the system control unit, and the system control unit notifies each processor of lock success.

【0008】各プロセッサは、ロックを取りたい場合に
専用インタフェースでロック要求を行い、ロックが成功
すると、システム制御部からロック成功の通知が返却さ
れ、各プロセッサは本信号によってロック成功を判断し
て共有領域へアクセスを行う。
When each processor wishes to take a lock, it issues a lock request through a dedicated interface. If the lock is successful, a notification of lock success is returned from the system control unit, and each processor determines the lock success based on this signal. Access the shared area.

【0009】ロックが成功するまでロック成功の通知は
来ないため、この間に各プロセラッサはハードウェアに
よって後続のアクセスを抑止するか、あるいはファーム
ウェアによってロック成功の通知を監視し、後続のアク
セスの発行を抑えることになる。
Since the lock success notification is not received until the lock succeeds, during this time each processor suppresses the subsequent access by hardware, or monitors the lock success notification by firmware and issues the subsequent access. Will be suppressed.

【0010】また、ロックフラグをリセットする場合
は、アンロック要求によって専用インタフェースを介し
てリセットを行う。この場合、アンロック要求以前に共
有領域への書き込みを行っている場合は、書き込みが完
了するのを待ち合わせてからアンロック要求を出す必要
がある。
When resetting the lock flag, the lock flag is reset via a dedicated interface in response to an unlock request. In this case, if writing to the shared area is performed before the unlock request, it is necessary to issue an unlock request after waiting for completion of the writing.

【0011】[0011]

【発明が解決しようとする課題】以上説明したような排
他制御方式においては、以下のような問題点があった。
まず、テストアンドセットでロックを取る方式において
は、主記憶中にロックバイトが存在するため、主記憶ア
クセスが生じロック成功が判定されるまで時間がかかる
こと、また読出したデータによりロック成功か否か判断
しなければならないため、さらに判定に時間がかかり、
性能低下を招くことになる。
The exclusive control system as described above has the following problems.
First, in the lock method by test and set, since a lock byte exists in the main memory, it takes time until the main memory access occurs and the lock success is determined. It takes more time to determine
This will result in reduced performance.

【0012】また、ロック成功するまで無駄なロック要
求、すなわち主記憶アクセスが生じるため、システムス
ループットの低下を招くことになる。
Further, since a useless lock request, that is, a main storage access occurs until the lock succeeds, the system throughput is reduced.

【0013】次に専用のロックフラグを設けるケースで
は、インタフェースを専用に設けねばならず、プロセッ
サ間のインタフェース増加となってしまい、HW量が増
加するためのシステム信頼性の低下を招くことになる。
Next, in the case where a dedicated lock flag is provided, an interface must be provided exclusively, and an interface between the processors increases, resulting in a decrease in system reliability due to an increase in HW amount. .

【0014】また、アンロック要求を専用インタフェー
スで行っているため、直前に主記憶への書込みを行って
いる場合は、書き込みの完了までアンロック要求を抑え
る必要があり、この間の待ちによって性能低下を招くこ
とになってしまう。
Further, since the unlock request is performed by the dedicated interface, if the write to the main memory is performed immediately before, it is necessary to suppress the unlock request until the write is completed. Will be invited.

【0015】本発明の目的は、インタフェースの削減を
図るとともにファームウェアの介入を抑えて性能向上を
図る共通バスシステムにおける排他制御方式を提供する
ことにある。
It is an object of the present invention to provide an exclusive control method in a common bus system for reducing the number of interfaces and improving the performance by suppressing the intervention of firmware.

【0016】[0016]

【課題を解決するための手段】前記目的を達成するた
め、本発明に係る共通バスシステムにおける排他制御方
式は、複数のプロセッサ及びシステム制御部が共通バス
に接続されたシステムにおける排他制御方式であって、
各プロセッサは、システム制御部へ資源要求として、バ
ス使用権を獲得するためのバス使用権要求及び排他制御
のためのロック要求を送出する手段を有しており、シス
テム制御部は、前記各プロセッサからのバス使用権要求
を所定の優先順位に従って調停し、バス使用権が獲得さ
れると各プロセッサ対応にバス使用許可信号を出力する
バス要求調停手段と、システム制御部内に存在するロッ
ク中か否かを示すロックフラグを参照し、ロック中でな
ければロックフラグをセットするとともにロック成功信
号を出力するロック要求制御手段とを有し、前記バス使
用許可信号と前記ロック成功信号の論理和を資源要求許
可として各プロセッサへ送出する機能を備えており、前
記資源要求許可を受けたプロセッサは、前記資源要求が
バス使用権要求であればバスサイクルを起動し、バスに
リクエストを送出するとともに後続の資源要求を発行
し、前記資源要求がロック要求であれば後続の資源要求
を発行する機能を備えたものである。
In order to achieve the above object, an exclusive control method in a common bus system according to the present invention is an exclusive control method in a system in which a plurality of processors and a system control unit are connected to a common bus. hand,
Each processor has means for transmitting a bus use right request for acquiring a bus use right and a lock request for exclusive control as a resource request to the system control unit. Bus request arbitration means for arbitrating a bus use request from a processor according to a predetermined priority, and outputting a bus use permission signal for each processor when the bus use right is acquired; and determining whether or not a lock exists in the system control unit. Lock request control means for setting a lock flag when not locked and outputting a lock success signal if the lock is not being locked, and using a logical sum of the bus use permission signal and the lock success signal as a resource. The processor has a function of transmitting a request to each processor as a request permission. Start bus cycle if Re, issue a subsequent resource request sends out a request to the bus, the resource request is provided with a function of issuing a subsequent resource request if the lock request.

【0017】また、前記システム制御部内の前記ロック
フラグは、共通バス上のコマンドによってリセットされ
るものである。
The lock flag in the system control section is reset by a command on a common bus.

【0018】また、各プロセッサにキャッシュメモリを
備えるとき、各プロセッサ内にロック要求が送出される
とセットされ、前記ロック要求による資源要求許可によ
ってリセットされるロックリクエストフラグを備え、前
記ロックリクエストフラグが“1”の間は、前記ロック
要求の後続のキャッシュアクセスを抑止し待たせるもの
である。
When each processor is provided with a cache memory, the processor is provided with a lock request flag which is set when a lock request is sent out in each processor, and is reset by permitting a resource request by the lock request. During "1", the cache access following the lock request is suppressed and made to wait.

【0019】[0019]

【作用】バス使用権要求とロック要求をまとめて資源要
求として位置づけ、先行する資源要求が許可されるまで
後続の資源要求を保持する。従って、ロック成功をファ
ームウェア等で判断することなく、単にロック要求の後
に主記憶アクセス要求をコーディングしておけば、ロッ
ク待ちの場合はハードウェア的に待ち合わせることとな
る。
The bus use right request and the lock request are collectively positioned as a resource request, and the subsequent resource request is held until the preceding resource request is granted. Therefore, if the main memory access request is simply coded after the lock request without judging the lock success by the firmware or the like, in the case of the lock wait, the hardware waits.

【0020】[0020]

【実施例】次に本発明について図面を参照して説明す
る。図1は、本発明の一実施例を示すブロック図であ
る。図2は本発明を用いたシステムのシステム構成を示
す図である。図3,図4は、図1の特定の部分を詳細に
表した図である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing one embodiment of the present invention. FIG. 2 is a diagram showing a system configuration of a system using the present invention. 3 and 4 are views showing a specific portion of FIG. 1 in detail.

【0021】図1,図2に示すように、2台のプロセッ
サ(PR0,PR1)1,2と、主記憶装置(MMU)
4と、システム制御部(SCU)3とが共通バスに接続
されている。
As shown in FIGS. 1 and 2, two processors (PR0, PR1) 1, 2 and a main storage unit (MMU)
4 and a system control unit (SCU) 3 are connected to a common bus.

【0022】各プロセッサ1,2は、主記憶装置4に存
在する共有領域をアクセスして動作している。プロセッ
サ1,2は互いに非同期に動作しているため、共有領域
をアクセスするにあたっては、排他制御のためにロック
を取得してから主記憶上の共有領域をアクセスする。
Each of the processors 1 and 2 operates by accessing a shared area existing in the main storage device 4. Since the processors 1 and 2 operate asynchronously with each other, when accessing the shared area, a lock is acquired for exclusive control and then the shared area on the main storage is accessed.

【0023】図1において、プロセッサ2はプロセッサ
1と同一のものであるため詳細な図は省略してある。
In FIG. 1, since the processor 2 is the same as the processor 1, a detailed drawing is omitted.

【0024】図1においてプロセッサ1では、リクエス
ト生成部101より主記憶アクセス要求、あるいはロッ
ク要求,アンロック要求が発生すると、コマンド信号R
CMDにコマンドコードが乗せられコマンドレジスタ1
04にセットされると共に、コマンドデコード部105
で主記憶アクセス要求かロック要求かのいずれであるか
が判別され、主記憶アクセス要求又はロック要求であれ
ば主記憶アクセスコマンドデコード信号BCMDが
“1”となり、主記憶アクセス要求レジスタ106が
“1”にセットされる。またロック要求であれば、ロッ
ク要求デコード信号LCMDが“1”となり、ロック要
求レジスタ107が“1”にセットされる。
In FIG. 1, in the processor 1, when a request for main memory access, a lock request, or an unlock request is generated from the request generation unit 101, a command signal R
Command code is loaded on CMD and command register 1
04 and the command decode unit 105
It is determined whether the request is a main memory access request or a lock request. If the request is a main memory access request or a lock request, the main memory access command decode signal BCMD becomes "1" and the main memory access request register 106 stores "1". Is set to "". If the request is a lock request, the lock request decode signal LCMD becomes "1", and the lock request register 107 is set to "1".

【0025】主記憶アクセス要求レジスタ106が
“1”にセットされると、その出力BSRQがアンドゲ
ート121に入力され、バスリクエスト抑止信号BRS
及びキャッシュリードヒット信号RDHTが“0”であ
れば、バス使用権要求レジスタ109に“1”がセット
される。そしてシステム制御部3へバス使用権要求信号
BSRQ0が“1”として送出される。
When the main memory access request register 106 is set to "1", the output BSRQ is input to the AND gate 121, and the bus request suppression signal BRS
If the cache read hit signal RDHT is “0”, “1” is set in the bus use request register 109. Then, the bus use right request signal BSRQ0 is sent to the system control unit 3 as "1".

【0026】システム制御部3では詳細を後述するよう
に、バスの使用権を調停し、プロセッサ0にバス使用権
が与えられると、資源要求許可信号ACP0を“1”と
して送出する。
As will be described in detail later, the system controller 3 arbitrates the right to use the bus, and when the right to use the bus is given to the processor 0, sends out the resource request permission signal ACP0 as "1".

【0027】バス使用権要求レジスタ109は、バス使
用権が与えられるまでリクエスト信号を保持しており、
資源要求許可信号ACP0が“1”となることでリセッ
トされる。また、資源要求許可信号ACP0は、アンド
ゲート125に入力され、アンドゲート125にはバス
使用権要求レジスタ109の出力が入力されており、資
源要求許可信号ACP0が“1”となったことでアンド
ゲート125の出力が“1”となり、バスドライバ11
3をハイインピーダンス状態から出力状態にしてコマン
ドバスCBUSに、あらかじめコマンドレジスタ104
の出力をセットしていたバスコマンドレジスタ108の
内容を出力する。
The bus use request register 109 holds a request signal until a bus use right is given.
It is reset when the resource request permission signal ACP0 becomes "1". Further, the resource request permission signal ACP0 is input to the AND gate 125, and the output of the bus use right request register 109 is input to the AND gate 125. When the resource request permission signal ACP0 becomes "1", The output of the gate 125 becomes “1” and the bus driver 11
3 from the high impedance state to the output state, the command bus 104
Output the contents of the bus command register 108 that has set the output of the bus command register 108.

【0028】ロック要求レジスタ107が“1”にセッ
トされた場合は、その出力がアンドゲート123に入力
され、リクエスト抑止信号RQSが“0”であれば、ロ
ック要求レジスタ110及びロック待ちレジスタ111
が“1”にセットされる。そして、システム制御部3へ
ロック要求信号LKRQ0が“1”として送出される。
When the lock request register 107 is set to "1", its output is input to the AND gate 123, and when the request suppression signal RQS is "0", the lock request register 110 and the lock wait register 111
Is set to "1". Then, the lock request signal LKRQ0 is sent to the system control unit 3 as "1".

【0029】システム制御部3では、ロック成功か否か
を判定し、ロック成功したタイミングで資源要求許可信
号ACP0を“1”として送出する。
The system controller 3 determines whether or not the lock is successful, and sends the resource request permission signal ACP0 as "1" at the timing when the lock is successful.

【0030】ロック要求レジスタ110及びロック待ち
レジスタ111は、ロック成功までリクエスト信号を保
持しており、資源要求許可信号ACP0が“1”となる
ことでリセットされる。
The lock request register 110 and the lock wait register 111 hold request signals until the lock succeeds, and are reset when the resource request permission signal ACP0 becomes "1".

【0031】次に、バス使用権要求レジスタ109ある
いはロック要求レジスタ110が“1”のとき、後続に
リクエストが発生し、主記憶アクセス要求レジスタ10
6あるいはロック要求レジスタ107が“1”にセット
された場合を説明する。
Next, when the bus use right request register 109 or the lock request register 110 is "1", a request is generated subsequently, and the main memory access request register 10
6 or the case where the lock request register 107 is set to “1”.

【0032】バス使用権要求レジスタ109及びロック
要求レジスタ110の出力は、オアゲート130に入力
され、その出力はアンドゲート124に入力される。ア
ンドゲート124の一方の入力は、資源要求許可信号A
CP0の反転信号が入力されている。従って、アンドゲ
ート124の出力であるリクエスト抑止信号RQSは、
バス使用権要求レジスタ109かロック要求レジスタ1
10が“1”のときで資源要求許可信号ACP0が
“0”のとき、“1”となる。
The outputs of the bus use right request register 109 and the lock request register 110 are input to an OR gate 130, and the output is input to an AND gate 124. One input of the AND gate 124 is a resource request permission signal A
An inverted signal of CP0 is input. Therefore, the request suppression signal RQS output from the AND gate 124 is:
Bus use right request register 109 or lock request register 1
When 10 is "1" and the resource request permission signal ACP0 is "0", it becomes "1".

【0033】このリクエスト抑止信号RQSは、ロック
要求レジスタ107のホールド端子に入力され、ロック
要求レジスタ107の内容を保持するとともに、アンド
ゲート123に入力され、ロック要求レジスタ110へ
のセットを抑止する。
The request inhibition signal RQS is input to the hold terminal of the lock request register 107, holds the contents of the lock request register 107, and is also input to the AND gate 123 to inhibit the lock request register 110 from being set.

【0034】また、リクエスト生成部101にも入力さ
れ、後続のリクエスト発行が抑止される。さらに、アン
ドゲート122にも入力され、キャッシュリードヒット
信号RDHTが“0”ならば、リクエスト抑止信号RQ
Sが“1”のときオアゲート131の入力に“1”が入
力され、オアゲート131出力であるバスリクエスト抑
止信号BRSが“1”になる。この出力は、主記憶アク
セス要求レジスタ106,コマンドレジスタ104,ア
ドレスレジスタ103のホールド端子に入力され、各レ
ジスタの内容を保持するとともにアンドゲート121に
入力され、バス使用権要求レジスタ109へのセットを
抑止し、さらにリクエスト生成部101に入力され、後
続のリクエストの発行が抑止される。
The request is also input to the request generator 101, and the subsequent request issuance is suppressed. Further, it is also input to the AND gate 122, and if the cache read hit signal RDHT is "0", the request suppression signal RQ
When S is "1", "1" is input to the input of the OR gate 131, and the bus request suppression signal BRS, which is the output of the OR gate 131, becomes "1". This output is input to the hold terminals of the main memory access request register 106, the command register 104, and the address register 103, holds the contents of each register and is input to the AND gate 121, and sets the bus use right request register 109. The request is further input to the request generation unit 101, and issuance of a subsequent request is suppressed.

【0035】以上のようにして先行するリクエストの資
源要求許可が返却されるまで後続のリクエストは発行を
抑止されることになる。
As described above, the issuance of the subsequent request is suppressed until the resource request permission of the preceding request is returned.

【0036】次に、キャッシュアクセスについて説明す
る。通常、主記憶アクセスコマンドが発行され、主記憶
アクセス要求レジスタ106が“1”にセットされると
ともにコマンドレジスタ104,アドレスレジスタ10
3に所定のデータがセットされる。
Next, cache access will be described. Normally, a main memory access command is issued, the main memory access request register 106 is set to "1", and the command register 104 and the address register 10 are set.
3 is set with predetermined data.

【0037】アドレスレジスタ103の内容は、キャッ
シュ制御部102に送出され、キャッシュヒットか否か
が判定される。キャッシュヒットの場合は、ヒット信号
HITが“1”となり、アンドゲート120に入力され
る。コマンドレジスタ104の出力は、コマンドデコー
ダ112に入力され、主記憶読出しコマンドであればコ
マンドデコーダ112の出力が“1”となり、アンドゲ
ート120に入力される。
The contents of the address register 103 are sent to the cache control unit 102, and it is determined whether or not a cache hit has occurred. In the case of a cache hit, the hit signal HIT becomes "1" and is input to the AND gate 120. The output of the command register 104 is input to the command decoder 112. If the command is a main memory read command, the output of the command decoder 112 becomes “1” and is input to the AND gate 120.

【0038】アンドゲート120の出力であるリードヒ
ット信号RDHTが“1”になると、その出力はアンド
ゲート122に反転信号が入力され、その出力は単に
“0”となり、オアゲート131の出力は、ロックリク
エスト中信号LKBが“0”であれば“0”となる。ま
た、アンドゲート121にリードヒット信号RDHTの
反転信号が入力されているため、アンドゲート121の
出力は“0”となる。
When the read hit signal RDHT, which is the output of the AND gate 120, becomes "1", its output is inputted to the AND gate 122, the output is simply "0", and the output of the OR gate 131 becomes locked. If the requesting signal LKB is "0", it becomes "0". Further, since the inverted signal of the read hit signal RDHT is input to the AND gate 121, the output of the AND gate 121 becomes “0”.

【0039】従って、コマンドが読出しリクエストでキ
ャッシュヒットした場合は、バスリクエストが送出され
ず、また先行するリクエストの状態にかかわらず、リク
エストはホールドされない。
Therefore, when a command causes a cache hit in a read request, no bus request is sent, and no request is held regardless of the state of the preceding request.

【0040】ここで先行するリクエストがロックリクエ
ストで後続するリクエストが読出しリクエストでキャッ
シュヒットしたケースを説明する。
Here, a case will be described in which the preceding request is a lock request and the succeeding request is a cache hit by a read request.

【0041】ロックリクエストの場合は前述したように
ロック待ちレジスタ111が“1”にセットされ、ロッ
クが成功するまで、すなわち資源要求許可信号ACP0
が“1”になるまでホールドされる。この間に後続リク
エストが読出しリクエストでキャッシュヒットした場合
は、前述したようにリードヒット信号RDHTが“1”
になり、オアゲート131の入力が“0”になるが、ロ
ック待ちレジスタ111が“1”であり、アンドゲート
126に入力され、資源要求許可信号ACP0の反転信
号が他方入力されているため、資源要求許可信号ACP
0が“0”の間は、その出力であるロック待ち信号LK
Bが“1”となり、オアゲート131に入力される。従
ってオアゲート131の出力が“1”となり、後続のリ
クエストはキャッシュヒットリードにもかかわらず、ホ
ールドされる。
In the case of a lock request, the lock wait register 111 is set to "1" as described above, and until the lock succeeds, that is, the resource request permission signal ACP0
Is held until "1" becomes "1". If the subsequent request has a cache hit by the read request during this time, the read hit signal RDHT is set to "1" as described above.
And the input of the OR gate 131 becomes "0". However, since the lock waiting register 111 is "1", the AND gate 126 is inputted, and the inverted signal of the resource request permission signal ACP0 is inputted on the other side, the resource Request permission signal ACP
While 0 is "0", the output is a lock waiting signal LK.
B becomes “1” and is input to the OR gate 131. Therefore, the output of the OR gate 131 becomes "1", and the subsequent request is held despite the cache hit read.

【0042】以上がプロセッサ1の内部動作である。次
にシステム制御部3の詳細について説明する。図3はシ
ステム制御部3内のロック要求調停部6の詳細図であ
る。プロセッサ1及び2からロック要求信号LKRQ
0,LKRQ1がそれぞれ入力される。ロック要求信号
LKRQ0が“1”になると、アンドゲート520に入
力され、ロックフラグ信号LKFGが“0”、すなわち
ロックがとられていない状態であれば、アンドゲート5
20の出力が“1”となり、ロック成功信号LSC0が
“1”として送出されるとともに、オアゲート530に
入力され、ロックフラグ501が“1”にセットされ
る。
The above is the internal operation of the processor 1. Next, details of the system control unit 3 will be described. FIG. 3 is a detailed diagram of the lock request arbitration unit 6 in the system control unit 3. Lock request signal LKRQ from processors 1 and 2
0 and LKRQ1 are input. When the lock request signal LKRQ0 becomes "1", it is input to the AND gate 520. If the lock flag signal LKFG is "0", that is, if the lock is not established, the AND gate 5
20 becomes "1", the lock success signal LSC0 is sent out as "1", and is input to the OR gate 530, and the lock flag 501 is set to "1".

【0043】ロック要求信号LKRQ1が“1”となっ
た場合も同様であるが、ロック要求信号LKRQ0,L
KRQ1が同時に“1”で入力された場合は、アンドゲ
ート521にロック要求信号LKRQ0の反転信号が入
力されるため、アンドゲート521の出力が“0”とな
り、プロセッサ1側はロック不成功となり、優先制御が
行われる。
The same applies to the case where the lock request signal LKRQ1 becomes "1".
If KRQ1 is simultaneously input as "1", an inverted signal of the lock request signal LKRQ0 is input to the AND gate 521, so that the output of the AND gate 521 becomes "0", and the processor 1 locks unsuccessfully. Priority control is performed.

【0044】また、バスコマンド情報BCMDがコマン
ドバスCBUSから入力され、デコーダ502に入力さ
れる。デコーダ502ではアンロックコマンドであれ
ば、その出力であるアンロック信号ULKが“1”とな
り、ロックフラグ信号LKFGをリセットしてアンロッ
ク動作が行われる。
The bus command information BCMD is input from the command bus CBUS, and is input to the decoder 502. In the case of an unlock command, the decoder 502 outputs an unlock signal ULK of “1”, resets the lock flag signal LKFG, and performs an unlock operation.

【0045】次に図4を用いてバス要求制御部5を説明
する。プロセッサ1及び2からバス使用権要求信号BS
RQ0,BSRQ1が入力され、それぞれアンドゲート
620,621に入力される。バス使用権要求信号BS
RQ0が“1”になると、バス使用可能信号BFRが
“1”であれば、アンドゲート620の出力であるバス
使用可能信号BAC0が“1”となり、出力されると同
時にオアゲート630に入力され、出力信号のバスリク
エスト信号BRQが“1”となる。
Next, the bus request control unit 5 will be described with reference to FIG. Bus use right request signal BS from processors 1 and 2
RQ0 and BSRQ1 are input and input to AND gates 620 and 621, respectively. Bus use right request signal BS
When RQ0 becomes "1", if the bus enable signal BFR is "1", the bus enable signal BAC0, which is the output of the AND gate 620, becomes "1" and is output and simultaneously input to the OR gate 630. The bus request signal BRQ of the output signal becomes “1”.

【0046】このとき、コマンドバスCBUS上には、
プロセッサ0からのバスコマンドが送出され、入力バッ
ファ301を介してバスコマンド情報BCMDとして入
力される。これは、デコーダ602に入力され所定のバ
スサイクルが出力される。このバスサイクルはバスを専
有するサイクルでありコマンドによって異なる。
At this time, on the command bus CBUS,
A bus command is transmitted from the processor 0 and is input as bus command information BCMD via the input buffer 301. This is input to the decoder 602 and a predetermined bus cycle is output. This bus cycle is a cycle exclusively for the bus, and differs depending on the command.

【0047】バスリクエスト信号BRQが“1”のと
き、選択回路604はデコーダ602の出力を選択し、
バスサイクルレジスタ601に入力される。また、オア
ゲート631の入力が“1”となり、バスサイクルレジ
スタ601は入力データをセットする。バスサイクルレ
ジスタ601の出力は比較回路603に入力され、
“0”と等しいかチェックされ、等しくなければ、バス
使用可能信号BFRが“0”となる。これは、インバー
タ605に入力され、出力は“1”となりオアゲート6
31に入力され、バスサイクルレジスタ601は入力デ
ータをセットする。この時点でバスリクエスト信号BR
Qは“0”となっているため、選択回路604はバスサ
イクルレジスタ601の内容を減算器606によって1
減算した値が入力される。
When the bus request signal BRQ is "1", the selection circuit 604 selects the output of the decoder 602,
The data is input to the bus cycle register 601. Further, the input of the OR gate 631 becomes “1”, and the bus cycle register 601 sets the input data. The output of the bus cycle register 601 is input to the comparison circuit 603,
It is checked whether it is equal to "0", and if not, the bus enable signal BFR becomes "0". This is input to the inverter 605, and the output becomes "1".
31, and the bus cycle register 601 sets the input data. At this time, the bus request signal BR
Since Q is “0”, the selection circuit 604 subtracts the content of the bus cycle register 601 from the subtractor 606 to 1
The subtracted value is input.

【0048】この動作はバスサイクルレジスタ601の
内容が“0”になるまで繰り返される。この間、バス使
用可能信号BFRは“0”となっているため、アンドゲ
ート620,621の出力は“0”となり、バス使用可
能信号BAC0,BAC1は“0”のままとなる。バス
使用権要求信号BSRQ1が“1”となった場合も同様
の動作であるが。バス使用権要求信号BSRQ0,BS
RQ1が同時に“1”となった場合は、バス使用権要求
信号BSRQ0がアンドゲート621に反転して入力さ
れるため、アンドゲート621の出力は“0”となり、
プロセッサ1側はバス使用許可が与えられず、優先制御
が行われる。
This operation is repeated until the contents of the bus cycle register 601 becomes "0". During this time, since the bus enable signal BFR is "0", the outputs of the AND gates 620 and 621 are "0", and the bus enable signals BAC0 and BAC1 remain "0". The same operation is performed when the bus use right request signal BSRQ1 becomes "1". Bus use right request signal BSRQ0, BS
When RQ1 simultaneously becomes "1", the bus use right request signal BSRQ0 is inverted and input to the AND gate 621, and the output of the AND gate 621 becomes "0".
The bus use permission is not given to the processor 1 and priority control is performed.

【0049】以上のようにして出力されたロック成功信
号LSC0,LSC1とバス使用可能信号LSC0,L
SC1は、システム制御部3にてオアゲート330,3
31によって、それぞれプロセッサ毎にオアされて資源
要求許可信号ACP0,ACP1として各プロセッサに
出力される。
The lock success signals LSC0, LSC1 and bus enable signals LSC0, LSC output as described above
SC1 is controlled by the system control unit 3 by the OR gates 330 and 3
At 31, they are ORed for each processor and output to each processor as resource request permission signals ACP0 and ACP1.

【0050】最後に図5のタイミングチャートを用いて
本実施例の全体動作の時間的経過を説明する。図5のT
0〜T4,T20〜T26の各Tは1マシンサイクルを
意味している。
Finally, the lapse of time of the overall operation of this embodiment will be described with reference to the timing chart of FIG. T in FIG.
Each T of 0 to T4 and T20 to T26 means one machine cycle.

【0051】プロセッサ1で共有領域アクセス事象が発
生すると、ロック要求及び主記憶読出しアクセス要求が
発生する。これらは、T0,T1でロック要求レジスタ
107,主記憶アクセス要求レジスタ106が“1”に
セットされる。
When a shared area access event occurs in the processor 1, a lock request and a main memory read access request occur. For these, the lock request register 107 and the main memory access request register 106 are set to "1" at T0 and T1.

【0052】そして、ロック要求レジスタ110,バス
使用権要求レジスタ109が次のT1,T2でそれぞれ
“1”にセットされ、システム制御部3にリクエストを
発行する。これらの要求は、T1,T2で資源要求許可
信号BACP0が“1”として返却され、システム制御
部3ではロックフラグ501がT2で“1”にセットさ
れる。この後、プロセッサ0では所定の動作を実行す
る。
Then, the lock request register 110 and the bus use right request register 109 are set to "1" at the next T1 and T2, respectively, and issue a request to the system control unit 3. In these requests, the resource request permission signal BACP0 is returned as "1" at T1 and T2, and the lock flag 501 is set to "1" at T2 in the system control unit 3. Thereafter, the processor 0 executes a predetermined operation.

【0053】このとき、プロセッサ2で同様に共有アク
セス事象が発生し、T2,T3でプロセッサ2内のロッ
ク要求レジスタ107及び主記憶アクセス要求レジスタ
106が“1”にセットされると、T3ではロック要求
レジスタ110が“1”にセットされる。しかし、T2
にてすでにロックフラグ501が“1”にセットされて
いるため、資源要求許可信号ACP1は“0”のままで
あり、ロック要求レジスタ110はホールド状態とな
る。
At this time, a shared access event similarly occurs in the processor 2, and when the lock request register 107 and the main memory access request register 106 in the processor 2 are set to "1" in T2 and T3, the lock is released in T3. The request register 110 is set to "1". However, T2
Since the lock flag 501 has already been set to "1", the resource request permission signal ACP1 remains "0", and the lock request register 110 enters the hold state.

【0054】また、主記憶アクセス要求レジスタ106
による読出しリクエストは、キャッシュヒットしてキャ
ッシュリードヒット信号RDHTが“1”になっている
が、ロック待ちフラグ111が“1”になっていること
から、ロック待ち信号LKBが“1”のままであるた
め、キャッシュアクセスはヒットしているにもかかわら
ず、実行抑止状態となり、主記憶アクセス要求レジスタ
106はホールド状態となる。
The main memory access request register 106
Is a cache hit and the cache read hit signal RDHT is "1", but since the lock wait flag 111 is "1", the lock wait signal LKB remains "1". Therefore, although the cache access is hit, the execution is inhibited, and the main memory access request register 106 is in the hold state.

【0055】次にプロセッサ1の共有領域アクセスが終
了すると、最終の書込みリクエスト及びアンロック要求
が発生する。これらはT21,T22で主記憶アクセス
要求レジスタ106にそれぞれセットされ、T22,T
23でバス使用権要求レジスタ109にセットさそ、シ
ステム制御部3へリクエストを送出する。
Next, when the shared area access of the processor 1 is completed, a final write request and an unlock request are generated. These are set in the main memory access request register 106 at T21 and T22, respectively.
At 23, a request is sent to the system control unit 3 after being set in the bus use right request register 109.

【0056】この要求は、T22,T23で資源要求許
可信号BACP1が“1”として返却され、T23,T
24でバス上にコマンドが送出され、ロックフラグ50
1はT25でリセットされる。これを契機としてプロセ
ッサ1側のロック要求は成功し、T25で資源要求許可
信号BACP0が“1”として返却され、またロック待
ち信号LKBが“0”になり、主記憶アクセス要求レジ
スタ106のホールドが解除され、T25でキャッシュ
リードヒットしたリクエストが実行される。
This request is returned at T22 and T23 as the resource request permission signal BACP1 is set to "1".
At 24, a command is sent out on the bus and the lock flag 50
1 is reset at T25. As a result, the lock request on the processor 1 side succeeds, the resource request permission signal BACP0 is returned as "1" at T25, the lock wait signal LKB becomes "0", and the hold of the main memory access request register 106 is stopped. The request is released and the cache read hit at T25 is executed.

【0057】以上がタイミングチャートを元にした一連
のロック要求,主記憶アクセス要求の流れとなってい
る。
The above is the flow of a series of lock requests and main memory access requests based on the timing chart.

【0058】以上説明した実施例はプロセッサが2台の
ときの例を示したが、2台以上の場合でも有効である。
The embodiment described above shows an example in which there are two processors. However, the present invention is also effective when there are two or more processors.

【0059】[0059]

【発明の効果】以上説明したように本発明は、ロック機
構をハードウェアで設け、バス使用権要求とロック要求
をまとめて資源要求として位置づけ、先行する資源要求
が許可されるまで後続の資源要求を保持する構成とした
ことにより、ロック成功をファームウェア等で判断する
ことなく、単にロック要求の後に主記憶アクセス要求を
コーディングしておけば、ロック待ちの場合はハードウ
ェア的に待ち合わせるため、ロック成功時の処理時間,
ロック待ちのロス時間が最小となり、性能向上を図るこ
とができる。
As described above, according to the present invention, a lock mechanism is provided by hardware, a bus use right request and a lock request are collectively positioned as a resource request, and a subsequent resource request is issued until a preceding resource request is granted. The main memory access request is simply coded after the lock request without having to judge the lock success by firmware or the like. Processing time,
The lock waiting loss time is minimized, and the performance can be improved.

【0060】さらに、本構成ではインタフェース信号を
最小にすることが可能となり、システム信頼性を向上で
きる。
Further, in this configuration, the interface signal can be minimized, and the system reliability can be improved.

【0061】さらに、ロック機構のリセットを共通バス
コマンドで実現したことから、アンロック要求の直前の
主記憶書込みとの時間関係をファームウェアで意識する
ことなく、コーディング可能となり、主記憶アクセスの
待ち合わせ等のロスがなくなり、性能向上を図ることが
できる。
Further, since the reset of the lock mechanism is realized by the common bus command, the coding can be performed without being aware of the time relationship with the main memory write immediately before the unlock request by the firmware. Loss is eliminated, and performance can be improved.

【0062】また、ロック要求が不成功であった直後の
主記憶読み出し要求がキャッシュにヒットしていた場合
でも、キャッシュヒットをハードウェア的に抑止してロ
ック要求が成功するまで待ち合わせるため、ファームウ
ェアはロック不成功,キャッシュヒット等を意識するこ
となく、コーディング可能となり、性能向上を図ること
ができる。
Even if the main memory read request immediately after the lock request is unsuccessful hits the cache, the firmware is used to suppress the cache hit by hardware and wait until the lock request succeeds. Coding can be performed without being aware of a lock failure, a cache hit, or the like, and performance can be improved.

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

【図1】本発明の一実施例を示すブロック図である。FIG. 1 is a block diagram showing one embodiment of the present invention.

【図2】本発明のシステム構成を示すブロック図であ
る。
FIG. 2 is a block diagram showing a system configuration of the present invention.

【図3】図1に示したロック要求調停部の回路図であ
る。
FIG. 3 is a circuit diagram of a lock request arbitration unit shown in FIG. 1;

【図4】図1に示したバス要求制御部の回路図である。FIG. 4 is a circuit diagram of a bus request control unit shown in FIG. 1;

【図5】本実施例の動作を示すタイミングチャートであ
る。
FIG. 5 is a timing chart showing the operation of the present embodiment.

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

1 プロセッサ 2 プロセッサ 3 システム制御部 4 主記憶装置 101 リクエスト生成部 102 キャッシュ制御部 Reference Signs List 1 processor 2 processor 3 system control unit 4 main storage device 101 request generation unit 102 cache control unit

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 複数のプロセッサ及びシステム制御部が
共通バスに接続されたシステムにおける排他制御方式で
あって、 各プロセッサは、システム制御部へ資源要求として、バ
ス使用権を獲得するためのバス使用権要求及び排他制御
のためのロック要求を送出する手段を有しており、 システム制御部は、前記各プロセッサからのバス使用権
要求を所定の優先順位に従って調停し、バス使用権が獲
得されると各プロセッサ対応にバス使用許可信号を出力
するバス要求調停手段と、システム制御部内に存在する
ロック中か否かを示すロックフラグを参照し、ロック中
でなければロックフラグをセットするとともにロック成
功信号を出力するロック要求制御手段とを有し、前記バ
ス使用許可信号と前記ロック成功信号の論理和を資源要
求許可として各プロセッサへ送出する機能を備えてお
り、 前記資源要求許可を受けたプロセッサは、前記資源要求
がバス使用権要求であればバスサイクルを起動し、バス
にリクエストを送出するとともに後続の資源要求を発行
し、前記資源要求がロック要求であれば後続の資源要求
を発行する機能を備えたものであることを特徴とする共
通バスシステムにおける排他制御方式。
1. An exclusive control method in a system in which a plurality of processors and a system control unit are connected to a common bus, wherein each processor uses a bus to acquire a bus use right as a resource request to the system control unit. The system control unit arbitrates the bus request from each of the processors according to a predetermined priority, and the bus request is acquired. And a bus request arbitration means for outputting a bus use permission signal for each processor, and a lock flag in the system control unit, which indicates whether or not a lock is in progress. A lock request control means for outputting a signal, wherein a logical sum of the bus use permission signal and the lock success signal is used as a resource request permission. A processor for transmitting a request to the processor, and if the resource request is a bus use right request, the processor starts a bus cycle, sends a request to the bus, and issues a subsequent resource request. An exclusive control method in the common bus system, characterized in that the exclusive control method has a function of issuing a subsequent resource request if the resource request is a lock request.
【請求項2】 前記システム制御部内の前記ロックフラ
グは、共通バス上のコマンドによってリセットされるも
のであることを特徴とする請求項1に記載の共通バスシ
ステムにおける排他制御方式。
2. The exclusive control method according to claim 1, wherein the lock flag in the system control unit is reset by a command on a common bus.
【請求項3】 各プロセッサにキャッシュメモリを備え
るとき、各プロセッサ内にロック要求が送出されるとセ
ットされ、前記ロック要求による資源要求許可によって
リセットされるロックリクエストフラグを備え、前記ロ
ックリクエストフラグが“1”の間は、前記ロック要求
の後続のキャッシュアクセスを抑止し待たせることを特
徴とする請求項2に記載の共通バスシステムにおける排
他制御方式。
3. When each processor is provided with a cache memory, the processor is provided with a lock request flag which is set when a lock request is sent out in each processor, and is reset by permitting a resource request by the lock request. 3. An exclusive control method in a common bus system according to claim 2, wherein during "1", a cache access subsequent to the lock request is suppressed and made to wait.
JP4285010A 1992-09-30 1992-09-30 Exclusive control method in common bus system Expired - Fee Related JP2932867B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4285010A JP2932867B2 (en) 1992-09-30 1992-09-30 Exclusive control method in common bus system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4285010A JP2932867B2 (en) 1992-09-30 1992-09-30 Exclusive control method in common bus system

Publications (2)

Publication Number Publication Date
JPH06110847A JPH06110847A (en) 1994-04-22
JP2932867B2 true JP2932867B2 (en) 1999-08-09

Family

ID=17685987

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4285010A Expired - Fee Related JP2932867B2 (en) 1992-09-30 1992-09-30 Exclusive control method in common bus system

Country Status (1)

Country Link
JP (1) JP2932867B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006185348A (en) 2004-12-28 2006-07-13 Fujitsu Ltd Multiprocessor system and method for operating lock flag

Also Published As

Publication number Publication date
JPH06110847A (en) 1994-04-22

Similar Documents

Publication Publication Date Title
JP3255908B2 (en) Memory control unit
JP2830116B2 (en) Lock control mechanism in multiprocessor system
US5590299A (en) Multiprocessor system bus protocol for optimized accessing of interleaved storage modules
JPS60258671A (en) Processor
JPH0625985B2 (en) Method and apparatus for ensuring proper access to system resources by a processor in a multiprocessor computer system
JPS5837587B2 (en) memory lock device
JPH06309230A (en) Bus snooping method
JP2932867B2 (en) Exclusive control method in common bus system
US5293496A (en) Inhibit write apparatus and method for preventing bus lockout
KR960003065B1 (en) Information processing apparatus
JPH1011348A (en) Controller for dram, and the dram
US6009482A (en) Method and apparatus for enabling cache streaming
KR20070062537A (en) Method and apparatus for modifying an information unit using an atomic operation in a system with a mixed architecture
JP2885640B2 (en) Data bus transfer method
JP2976417B2 (en) Multiprocessor system
JP2854066B2 (en) Multiprocessor system
JP3019323B2 (en) Direct access to image memory
JP3219422B2 (en) Cache memory control method
JPH06250969A (en) Bus control method in multiprocessor system
JP2001142840A (en) Dma controller circuit and memory control method
JPS63298555A (en) Shared memory control system
JP2903551B2 (en) Multiprocessor synchronization mechanism
KR100368744B1 (en) Retry apparatus and method for maintaining cache consistency in hi-fi bus
JPH0437948A (en) Exclusive control system
JPH01144151A (en) Information processor

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees