JPS6336545B2 - - Google Patents

Info

Publication number
JPS6336545B2
JPS6336545B2 JP58049254A JP4925483A JPS6336545B2 JP S6336545 B2 JPS6336545 B2 JP S6336545B2 JP 58049254 A JP58049254 A JP 58049254A JP 4925483 A JP4925483 A JP 4925483A JP S6336545 B2 JPS6336545 B2 JP S6336545B2
Authority
JP
Japan
Prior art keywords
lock
lock request
request
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
Application number
JP58049254A
Other languages
Japanese (ja)
Other versions
JPS59173866A (en
Inventor
Susumu Shibazaki
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 JP58049254A priority Critical patent/JPS59173866A/en
Publication of JPS59173866A publication Critical patent/JPS59173866A/en
Publication of JPS6336545B2 publication Critical patent/JPS6336545B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus

Description

【発明の詳細な説明】 本発明はロツク制御方式に関し、特に複数のプ
ロセツサが入出力装置、バス、データバツフア等
のハードウエアおよびプログラム、データ等のソ
フトウエアを含む共有資源を通常は1個のプロセ
ツサのみで占有する排他制御を行ないつつ全体と
して1つの系を構成して動作するマルチプロセツ
サシステムにおいて、前記排他制御を実行するた
めに行なうロツク動作のロツク制御方式に関す
る。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a lock control system, and more particularly, the present invention relates to a lock control method, in which a plurality of processors normally share shared resources including hardware such as input/output devices, buses, and data buffers, and software such as programs and data. The present invention relates to a lock control system for a lock operation performed to execute exclusive control in a multiprocessor system that operates as one system as a whole while performing exclusive control exclusively occupied by a single processor.

複数のプロセツサ等の資源要求者が非同期状態
で1つの共有資源を要求する場合には、各資源要
求者による要求の衝突を避け矛盾なく制御するた
めの排他制御が必要であり、このような排他制御
により通常の1つのプロセツサに対して共有資源
の使用権を付与し他のプロセツサによる使用は排
除しつつデータの処理を実行するロツク(lock)
動作はよく知られている。
When multiple resource requesters such as processors request one shared resource in an asynchronous state, exclusive control is required to avoid conflicting requests by each resource requester and control them without contradiction. A lock that grants the right to use a shared resource to one normal processor and processes data while excluding its use by other processors.
The operation is well known.

従来のマルチプロセツサシステムにおけるロツ
クの実行は、共有資源の使用権を必要とする各プ
ロセツサがそれぞれ随意にロツク要求を出してい
る。従つて既に他のプロセツサがロツク要求を出
して共有資源の使用権を与えられてデータ処理を
実行している場合にはロツク要求は失敗する。従
来のマルチプロセツサシステムではロツク要求に
失敗した場合、ロツク解除を待ち合わせるために
ロツク要求が成功するまでプロセツサがロツク要
求を繰り返すか、もしくはロツク使用中であるこ
とにより後続のロツクへのアクセスを許可しない
かのいずれかの方法を用いていた。
In conventional multiprocessor systems, each processor that requires the right to use a shared resource issues a lock request at will. Therefore, if another processor has already issued a lock request, been given the right to use the shared resource, and is executing data processing, the lock request will fail. In conventional multiprocessor systems, if a lock request fails, the processor either waits for the lock to be released and repeats the lock request until the lock request succeeds, or the lock is in use and access to subsequent locks is allowed. Either method was used.

前者の方法によれば、ロツク要求に失敗したこ
とをプロセツサが認識できるので、外部イベント
処理のうちロツクを必要としない処理を実行した
り、ロツク失敗の頻度を計数したりして待ち時間
を有効に利用できるものの失敗するロツク要求が
多発するので、プロセツサ台数の増加に対応して
ロツク要求に対する応答性が劣化するという欠点
がある。
According to the former method, the processor can recognize that a lock request has failed, so it can utilize waiting time by executing external event processing that does not require a lock, or by counting the frequency of lock failures. Since there are many lock requests that are available but fail, there is a drawback that the responsiveness to lock requests deteriorates as the number of processors increases.

後者の方法では、ロツク使用中である場合のロ
ツク要求に対してはアクセスが禁止され応答が変
らないのでプロセツサは別の外部イベント処理が
実行できず、従つて待ち時間を有効に利用できな
いという欠点がある。
The disadvantage of the latter method is that access to a lock request while the lock is in use is prohibited and the response remains unchanged, so the processor cannot process other external events and therefore cannot make effective use of waiting time. There is.

なお、後者の方法の変形として、共有資源を使
用中でないことを確認してアクセスを許可する方
法をとる場合もあるが、この場合もプロセツサ側
から見てロツク成功となるまでアクセスが禁止さ
れる状態で待ち状態におかれ、プロセツサ自信は
本質的にロツク失敗ということを認識し得ず、従
つて待ち時間を有効に利用できないという欠点が
避けられない。
Note that as a variation of the latter method, access may be permitted after confirming that the shared resource is not in use, but in this case as well, access is prohibited from the processor's perspective until the lock is successful. The processor is placed in a waiting state, and the processor itself cannot essentially recognize that the lock has failed, so the disadvantage is that the waiting time cannot be used effectively.

本発明の目的は上述した欠点を除去し、マルチ
プロセツサシステムにおける共有資源の排他制御
を行なうためのロツク要求において、自プロセツ
サによるロツク要求が失敗した場合にはロツク成
功により処理実行中の他プロセツサからロツク解
除通知がくるまでロツク要求を出さないようにす
るという手段を備え、ロツク要求失敗を継続する
無意味な動作を排除しマルチプロセツサシステム
の処理性能の低下を大幅に減少することができる
ロツク制御方式を提供することにある。
An object of the present invention is to eliminate the above-mentioned drawbacks, and to perform lock requests for exclusive control of shared resources in a multiprocessor system.If the lock request by the own processor fails, the other processors executing the process can be It has a means of not issuing a lock request until a lock release notification is received from the controller, which eliminates meaningless operations that continue to cause lock requests to fail, and greatly reduces the deterioration in processing performance of multiprocessor systems. The object of the present invention is to provide a lock control method.

本発明の方式は、ロツクによりシステム共有資
源の排他制御を行なうマルチプロセツサシステム
において、このマツチプロセツサシステムを構成
する複数のプロセツサからのロツク要求を受ける
とこれに応答しロツクが可能であるかもしくは不
可能であるかによつてロツク成功もしくは不成功
の結果をそれぞれのプロセツサに通知しこの結果
に対応する処理を実行せしめるロツク要求結果通
知手段と、前記複数のプロセツサのうちのいずれ
かがロツク要求を行なつて失敗したときこれをロ
ツク要求を行なつたプロセツサが認識するロツク
要求失敗認識手段と、ロツク要求を行なつたプロ
セツサがロツク要求に成功し果すべき処理を実行
したのち自プロセツサ以外の前記複数の全プロセ
ツサに対しロツク解除を通知するロツク解除通知
手段と、前記ロツク要求失敗認識手段によつてロ
ツク要求を出したプロセツサがロツク要求の失敗
を認識した場合前記ロツク解除手段によつて他の
プロセツサからロツク解除を通知されるまでロツ
ク要求を抑止するロツク要求抑止手段と、前記ロ
ツク要求失敗認識手段によつてロツク要求を出し
たプロセツサがロツク要求の失敗を認識した場合
前記ロツク要求結果通知手段の結果を変更するロ
ツク要求結果変更手段とを備えて構成される。
The method of the present invention, in a multiprocessor system that performs exclusive control of system shared resources by locking, is capable of locking in response to a lock request from a plurality of processors that make up the multiprocessor system. a lock request result notifying means for notifying each processor of a successful or unsuccessful lock result depending on whether the lock is successful or not, and causing the processor to execute a process corresponding to the result; A lock request failure recognition means is provided, in which the processor that made the lock request recognizes when the request fails, and a processor other than the own processor recognizes that the processor that made the lock request succeeds in the lock request and executes the processing to be performed. a lock release notification means for notifying all of the plurality of processors of the lock release of the lock; and a lock release notification means for notifying all of the plurality of processors of the lock request failure, and when the processor that issued the lock request recognizes the failure of the lock request by the lock request failure recognition means, the lock release means A lock request suppressing means for suppressing a lock request until notification of lock release is received from another processor; and a lock request failure recognition means, when the processor that issued the lock request recognizes the failure of the lock request, the lock request result is determined. and lock request result changing means for changing the result of the notification means.

次に図面を参照して本発明を詳細に説明する。
第1図を参照すると、本発明の一実施例はマルチ
プロセツサシステムを構成する複数のプロセツサ
システムを構成する複数のプロセツサとしての
CPU(0)1,CPU(1)2とロツク制御回路3とに
より構成される。
Next, the present invention will be explained in detail with reference to the drawings.
Referring to FIG. 1, one embodiment of the present invention operates as a plurality of processors constituting a plurality of processor systems constituting a multiprocessor system.
It is composed of a CPU (0) 1, a CPU (1) 2, and a lock control circuit 3.

第1図の実施例においては、プロセツサとして
のCPUをCPU(0)1およびCPU(1)2の2個を
例として示しているが、これは何個であつても差
支えない。
In the embodiment shown in FIG. 1, two CPUs, CPU(0)1 and CPU(1)2, are shown as processors, but any number of CPUs may be used.

CPU(0)1とCPU(1)2とは同一の構成内容を
有するCPUであり、CPU(0)1に示す如くセレ
クタ10、フリツプフロツプ回路11,OR回路
12,20,フリツプフロツプ回路13,AND
回路14,NOT回路15,16,AND回路1
7,およびフリツプフロツプ回路18,19のほ
か、マイクロプログラム方式によるCPUに含ま
れる構成要素としての制御記憶21,制御記憶ア
ドレスレジスタ22および制御記憶レジスタ23
等を備えて構成される。
CPU (0) 1 and CPU (1) 2 are CPUs having the same configuration, and as shown in CPU (0) 1, a selector 10, a flip-flop circuit 11, OR circuits 12, 20, a flip-flop circuit 13, and an AND circuit.
Circuit 14, NOT circuit 15, 16, AND circuit 1
7, and flip-flop circuits 18 and 19, as well as a control memory 21, a control memory address register 22, and a control memory register 23 as components included in the microprogrammed CPU.
It is composed of the following.

さて、マイクロプログラムを格納し記憶する制
御記憶21は、制御記憶アドレスレジスタ22か
ら出力ライン221を介して受ける制御記憶アド
レス信号の指定するマイクロプログラムを読出さ
れ出力ライン211を介してこれを制御記憶レジ
スタ23に送出する。記憶制御レジスタ23にス
トアされたマイクロプログラムにはロツク要の指
定を行なうロツク制御フイールドが含まれてお
り、このロツク制御フイールドによつてロツク要
求が指定されているときはこのロツク制御フイー
ルド23aに指定された内容がロツク要求信号と
して出力ライン231を介してセレクタ10に送
出されるとともにマイクロプログラムの内容は出
力ライン232を介して出力され、デコーーダ等
によつて解読されたのちその内容の実行を制御す
る実行制御部(図示せず)等に供給される。この
実行制御部を介してマイクロプログラムの指定す
る内容の処理が実行され、このあと次のマイクロ
プログラムがまた制御記憶アドレスレジスタ22
によつて指定されるというようにして次次に制御
記憶21のマイクロプログラムが実行される。
Now, the control memory 21 that stores and stores microprograms reads out the microprogram designated by the control memory address signal received from the control memory address register 22 via the output line 221, and transfers it via the output line 211 to the control memory address register 22. Send on 23rd. The microprogram stored in the storage control register 23 includes a lock control field that specifies whether a lock is required, and when a lock request is specified by this lock control field, the lock request is specified in this lock control field 23a. The contents of the microprogram are sent as a lock request signal to the selector 10 via the output line 231, and the contents of the microprogram are output via the output line 232, and after being decoded by a decoder etc., the execution of the contents is controlled. The data is supplied to an execution control unit (not shown) etc. that performs the processing. Processing specified by the microprogram is executed via this execution control unit, and then the next microprogram is executed once again in the control storage address register 22.
The microprograms in the control memory 21 are executed one after the other as specified by.

セレクタ10にはこのようにして供給されたロ
ツク要求信号と入力ライン101を介して入力す
る、ロツク要求をしない内容を指定するロツク非
要求信号とが印加し、後述するフリツプフロツプ
回路13から出力ライン131を介して供給され
るセレクト信号が印加されるときにはロツク非要
求信号を、またセレクト信号が供給されないとき
にはロツク要求信号をセレクトしてこれらを出力
ライン102を介してロツク制御回路3に送出す
る。上述したロツク非要求信号は他のCPU,た
とえばCPU(1)がロツク要求に成功して処理を実
行しておりロツク要求を出すことが不適当である
場合にロツク要求信号の入力の有無にかかわらず
ロツク要求信号に代つてセレクトされ出力ライン
102を介してロツク制御回路3に送出されるも
のであり、ロツク要求を行なわない内容を有する
予め特定するコードの信号として設定されている
ものである。
The lock request signal thus supplied and a lock non-request signal input through the input line 101 and specifying the content of not requesting lock are applied to the selector 10, and the output line 131 is output from the flip-flop circuit 13, which will be described later. When the select signal supplied via the lock is applied, the lock non-request signal is selected, and when the select signal is not supplied, the lock request signal is selected and sent to the lock control circuit 3 via the output line 102. The above-mentioned lock non-request signal is issued regardless of whether or not the lock request signal is input when another CPU, for example CPU (1), has successfully requested a lock and is executing a process and it is inappropriate to issue a lock request. This signal is selected in place of the lock request signal and sent to the lock control circuit 3 via the output line 102, and is set as a prespecified code signal having a content that does not make a lock request.

従来のロツク要求方式にあつてはこのようなロ
ツク要求とロツク非要求との2つの運用状態を設
けることなくロツク要求信号のみが各CPUから
繰返し出力され、このため前述したような欠点を
生ずることとなる。
In the conventional lock request method, only the lock request signal is repeatedly output from each CPU without providing these two operating states of lock request and lock non-request, which causes the above-mentioned drawbacks. becomes.

そこで本発明においてはこの欠点を次のように
して除去している。
Therefore, in the present invention, this drawback is eliminated as follows.

無意味なロツク要求を避けるためには、一度ロ
ツク要求に失敗したプロセツサがロツク要求成功
の能が発生したこと、つまりロツクを取つていた
他プロセツサがロツクを外したことを認識できな
くてはならない。
In order to avoid meaningless lock requests, a processor that has once failed in a lock request must be able to recognize that the ability to successfully request a lock has occurred, that is, that another processor that was holding the lock has lost the lock. It won't happen.

CPU(0)1とCPU(1)2とはそれぞれ制御記憶
レジスタ23から読出されデコダ等を介して解読
されたマイクロプログラム命令を前述した実行制
御部に送出しこれによる制御を受けつつ命令が実
行されるが、ロツク解除もCPU(0)1やCPU(1)
2等の各CPUからこのような実行制御段階で互
いに通知し合うように予め設定されており、第1
図の実施例でCPU(1)2によるロツク状態が解除
されたときには、CPU(1)2から入力ライン11
1を介して2値の論理値“1”レベルの信号がロ
ツク解除信号としてフリツプフロツプ回路11に
送出されるように制御記憶21,制御記憶アドレ
スレジスタ22,および制御記憶レジスタ23等
によるマイクロプログラム命令処理を介してフリ
ツプフロツプ回路11の入力が決定されている。
CPU (0) 1 and CPU (1) 2 each send microprogram instructions read from the control storage register 23 and decoded via a decoder etc. to the aforementioned execution control unit, and the instructions are executed while being controlled by this unit. However, the lock can also be released by CPU(0)1 or CPU(1).
The CPUs of the second class are set in advance to notify each other at this stage of execution control.
In the embodiment shown in the figure, when the lock state by CPU(1)2 is released, the input line 11 from CPU(1)2 is released.
Microprogram instruction processing is performed by the control memory 21, the control memory address register 22, the control memory register 23, etc. such that a binary logic value "1" level signal is sent to the flip-flop circuit 11 as an unlock signal via the The input to the flip-flop circuit 11 is determined through the .

フリツプフロツプ回路11は、フリツプフロツ
プ回路13,18および19と同じく、クロツク
信号CLが印加するごとに入力論理値“1”,“0”
に対応して出力論理値“1”,“0”を得るいわゆ
るD型フリツプフロツプ回路である。
Like the flip-flop circuits 13, 18, and 19, the flip-flop circuit 11 changes the input logic value to "1" or "0" each time the clock signal CL is applied.
This is a so-called D-type flip-flop circuit that obtains output logic values "1" and "0" in response to the output voltage.

フリツプフロツプ回路11は、CPU(1)2によ
つてロツク解除されるときにロツク解除信号でセ
ツトされて論理値“1”レベルを出力しこれを出
力ライン112を介してOR回路12の1入力と
して送出する。
When the flip-flop circuit 11 is unlocked by the CPU (1) 2, it is set by the lock release signal and outputs a logic value "1" level, which is sent as one input of the OR circuit 12 via the output line 112. Send.

OR回路12には入力ライン222を介して外
部のイベントによりCPU(0)1に対する割込み
等が発生した場合、これを制御記憶アドレスレジ
スタ22を介して制御記憶21に割込ませるとと
もにOR回路12のもうひとつの入力として供給
される論理値“1”レベルの信号が外部イベント
信号として入力する。
When an interrupt to CPU (0) 1 occurs due to an external event via an input line 222 to the OR circuit 12, the interrupt is sent to the control memory 21 via the control memory address register 22, and the OR circuit 12 A logic value "1" level signal supplied as another input is input as an external event signal.

従つてOR回路12はこれら2入力のいずれか
が論理値“1”レベルで供給されるとき論理値
“1”レベルの信号を出力しこれを出力ライン1
21を介してフリツプフロツプ回路13にリセツ
ト信号として供給され、また2入力いずれの供給
も受けず従つてロツクが継続しているときにはフ
リツプフロツプ回路13はリセツト信号が送出さ
れない。
Therefore, when either of these two inputs is supplied at the logic "1" level, the OR circuit 12 outputs a signal at the logic "1" level and sends this to the output line 1.
21 to the flip-flop circuit 13 as a reset signal, and when neither of the two inputs is supplied and therefore the lock continues, the flip-flop circuit 13 does not send out a reset signal.

さて、CPU(0)のマイクロプログラムのロツ
ク要求により出力ライン102を介して送出され
たロツク要求信号はロツク制御回路3に送出され
るが、このロツク制御回路3にはCPU(1)2等の
他のCPUからのすべてのロツク要求信号も入力
され、ロツク制御回路3はこれらの入力を受ける
ごとにこのロツク要求信号に対して応答する意味
の論理値“1”レベルのリプライ信号を出力しこ
れを出力ライン301を介してAND回路14お
よびフリツプフロツプ回路19に送出するととも
に、その時点における全ロツク要求信号の入力状
態を判断して既にロツク成功中のロツク要求信号
があれば論理値“0”レベル、他にロツク要求信
号の入力がなければ論理値“1”レベルの信号を
それぞれロツク不成功およびロツク成功信号とし
て出力ライン302を介してNOT回路15およ
びAND回路17に送出する。
Now, the lock request signal sent out via the output line 102 in response to a lock request from the microprogram of CPU (0) is sent to the lock control circuit 3. All the lock request signals from other CPUs are also input, and each time the lock control circuit 3 receives these inputs, it outputs a reply signal with a logical value of "1" level meaning a response to this lock request signal. is sent to the AND circuit 14 and flip-flop circuit 19 via the output line 301, and at the same time, the input states of all lock request signals at that time are judged, and if there is a lock request signal that has already been successfully locked, the logic value is set to "0" level. , if no other lock request signal is input, a signal of logical value "1" level is sent to the NOT circuit 15 and the AND circuit 17 via the output line 302 as a lock failure signal and a lock success signal, respectively.

ロツク制御回路3からロツク不成功信号、すな
わち論理値“0”レベルの信号が出力されると、
これはNOT回路15によつて論理値“1”レベ
ルに変換されて出力ライン151を介してフリツ
プフロツプ回路13に供給される。一方、論理値
“1”レベルのリプライ信号はAND回路14に供
給され、AND回路14はこれとクロツク信号CL
との2入力を同時に受けるとき出力ラインにクロ
ツク信号CLを出力し論理値“1”レベルのクロ
ツク信号がフリツプフロツプ回路13のクロツク
端子に印加され、このクロツク信号のタイミング
でNOT回路15の出力がセツト信号としてラツ
チされ出力として論理値“1”レベル発生、これ
を出力ライン131を介してセレクタ10にセレ
クタ信号として送出する。
When the lock control circuit 3 outputs a lock failure signal, that is, a signal with a logic value "0" level,
This is converted to a logical "1" level by NOT circuit 15 and supplied to flip-flop circuit 13 via output line 151. On the other hand, the reply signal at the logic value "1" level is supplied to the AND circuit 14, and the AND circuit 14 receives this and the clock signal CL.
When receiving two inputs at the same time, the clock signal CL is output to the output line, and a clock signal with a logic value of "1" level is applied to the clock terminal of the flip-flop circuit 13, and the output of the NOT circuit 15 is set at the timing of this clock signal. It is latched as a signal and generates a logic value "1" level as an output, which is sent to the selector 10 as a selector signal via an output line 131.

セレクタ10はこのセレクタ信号によつて入力
ライン101を介して入力するロツク非要求信号
をロツク要求信号に変えて出力ライン102を介
してロツク制御回路3に送出する。
In response to this selector signal, selector 10 converts a lock non-request signal input via input line 101 into a lock request signal and sends it to lock control circuit 3 via output line 102.

このようにしてロツク要求が不成功の場合には
ロツク要求の失敗を認識しその後のロツク要求が
抑止されるが、前述した如く出力ライン111を
介してフリツプフロツプ回路11にロツク解除信
号を受けるか、もしくは出力ライン222を介し
て外部イベント信号を受けOR回路12から論理
値“1”レベルのリセツト信号がフリツプフロツ
プ回路13に入力されるとフリツプフロツプ回路
13がリセツトされ、出力ライン131には論理
値“0”レベルが出力され、従つてロツク非要求
信号の送出は中止し、ロツク要求信号が出力ライ
ン102を介してロツク制御回路3に送出され
る。
In this way, if the lock request is unsuccessful, the failure of the lock request is recognized and subsequent lock requests are suppressed. However, as described above, if the flip-flop circuit 11 receives a lock release signal via the output line 111, Alternatively, when an external event signal is received via the output line 222 and a reset signal with a logic value "1" level is input from the OR circuit 12 to the flip-flop circuit 13, the flip-flop circuit 13 is reset, and the output line 131 receives a logic value "0". ``level is output, so that the sending of the lock non-request signal is stopped and the lock request signal is sent to the lock control circuit 3 via the output line 102.

ロツク制御回路3はこの状態でロツク要求信号
を受けロツク要求が失敗すると前述した動作を繰
返し、ロツク要求が成功した場合には出力ライン
302を介して論理値“1”レベルの信号をロツ
ク成功信号として送出する。この場合はフリツプ
フロツプ回路13は論理値“0”レベルを受けて
論理値“0”レベルの出力を出力ライン131に
送出し、従つてセレクタ10によるロツク要求信
号とロツク非要求信号の切替えは行なわれない。
The lock control circuit 3 receives the lock request signal in this state, and if the lock request fails, repeats the above-mentioned operation, and if the lock request is successful, outputs a signal of logical value "1" level via the output line 302 as a lock success signal. Send as. In this case, the flip-flop circuit 13 receives the logic value "0" level and sends an output of the logic value "0" level to the output line 131, so that the selector 10 does not switch between the lock request signal and the lock non-request signal. do not have.

このようにしてロツク要求が不成功の場合には
これを認識してロツク解除信号が入力するまでは
ロツクの要求を抑止し、ロツク解除信号を受けて
からロツクに成功した場合にはCPU(0)1にお
けるマイクロプログラムの指定する処理が実行さ
れ、これが完了するとCPU(0)1からCPU(1)2
等の他のCPUに対するロツク解除信号の通知が
行なわれるが、この動作は次のようにして実施さ
れる。
In this way, if the lock request is unsuccessful, it is recognized and the lock request is suppressed until the lock release signal is input, and if the lock is successful after receiving the lock release signal, the CPU (0 ) 1 is executed, and when this is completed, CPU (0) 1 to CPU (1) 2
A lock release signal is notified to other CPUs such as the CPU, and this operation is performed as follows.

すなわち、ロツク要求不成功の場合にはフリツ
プフロツプ回路13の出力として論理値“1”が
出力ライン131を介してNOT回路16にも入
力され、これは論理値“0”レベルとして出力ラ
イン161を介してAND回路17の1入力とし
て送出される。AND回路17には出力ライン3
02を介して論理値“0”レベルがもうひとつの
入力として加えられるがこの場合はAND条件は
成功せず出力ライン171には論理値“0”レベ
ルが出力する。
That is, if the lock request is unsuccessful, the logic value "1" is also input to the NOT circuit 16 as the output of the flip-flop circuit 13 via the output line 131, and this is also input to the NOT circuit 16 as a logic value "0" level via the output line 161. and is sent out as one input of the AND circuit 17. AND circuit 17 has output line 3
02 is added as another input, but in this case the AND condition is not successful and a logic "0" level is output on the output line 171.

ロツク要求成功の場合には上述した論理値レベ
ルが逆転した状態となりAND回路17の2入力
にはそれぞれ論理値“1”レベルの信号が加えら
れ従つてAND条件が成立して出力ライン171
には論理値“1”レベルの信号が供給される。
If the lock request is successful, the above-mentioned logic value level is reversed, and a signal with a logic value "1" level is applied to each of the two inputs of the AND circuit 17. Therefore, the AND condition is established and the output line 171
A signal with a logic value "1" level is supplied to.

フリツプフロツプ回路18は、クロツク信号
CLを印加されるごとにこの入力の論理値に対応
する“0”もしくは“1”レベルの論理値を出力
しこれを出力ライン181を介して出力し、前述
した実行制御部の制御のもとに制御記憶レジスタ
23によつて指定される次に実行すべきマイクロ
プログラム命令のアドレスを変更せしめて制御記
憶アドレスレジスタ22によつて指定するように
してフリツプフロツプ回路18の出力、すなわち
ロツク成功、不成功に対応するマイクロプログラ
ム命令の処理が実行される。
The flip-flop circuit 18 receives a clock signal.
Each time CL is applied, a logic value of "0" or "1" level corresponding to the logic value of this input is outputted, and this is outputted via the output line 181, under the control of the execution control section described above. The address of the next microprogram instruction to be executed specified by the control storage register 23 is changed and the output of the flip-flop circuit 18, i.e., lock success or failure, is changed as specified by the control storage address register 22. The processing of the microprogram instruction corresponding to is executed.

一方、フリツプフロツプ回路19には、ロツク
要求信号がロツク制御回路3に入力するごとにこ
れに応答して論理値“1”レベルのリプライ信号
が出力ライン301を介して入力される。このリ
プライ信号は出力ライン102を介してロツク制
御回路3に入力する信号がロツク要求信号である
ときこのロツク要求に応答する信号として出力さ
れるものであり、フリツプフロツプ回路13から
出力ライン131を介して出力する信号が論理値
“0”をとる場合、すなわちフリツプフロツプ回
路13が出力ライン121を介してロツク解除信
号を受けているときであつて、従つて入力するロ
ツク要求信号によるロツク要求がロツク制御回路
3の判定によつて成功となるか不成功となるかの
状態はこのリプライ信号が出力された状態のとき
だけありうることとなる。このような意味をもつ
リプライ信号がフリツプフロツプ回路19に供給
されると、クロツク信号CL印加時ごとにセツト
され論理値“1”レベルの出力を出力ラインに送
出る。フリツプフロツプ回路19もこのようにし
てリプライ信号の入力の有無に対応して論理値
“1”もしくは“0”を出力し、これはフリツプ
フロツプ回路18によるロツク要求の成功もしく
は不成功いずれかを待ち受ける情報として出力ラ
イン191に出力されたのち、フリツプフロツプ
回路18の出力と全く同様にして制御記憶レジス
タ23は指定される次のマイクロ命令アドレスを
変えて制御記憶アドレスレジスタ22の指定する
アドレスをロツク成功もしくは不成功に対応して
実行すべき次のマイクロプログラムの指定し、そ
の処理を実行せしめる。
On the other hand, each time a lock request signal is input to the lock control circuit 3, a reply signal having a logic value of "1" level is input to the flip-flop circuit 19 via an output line 301. This reply signal is output as a signal in response to the lock request signal when the signal input to the lock control circuit 3 via the output line 102 is a lock request signal, and is output from the flip-flop circuit 13 via the output line 131. When the output signal takes the logical value "0", that is, when the flip-flop circuit 13 is receiving the lock release signal via the output line 121, the lock request by the input lock request signal is not activated by the lock control circuit. The state of success or failure based on the determination in step 3 is possible only when this reply signal is output. When a reply signal having such a meaning is supplied to the flip-flop circuit 19, it is set every time the clock signal CL is applied, and outputs a logical "1" level output to the output line. In this way, the flip-flop circuit 19 also outputs a logical value of "1" or "0" in response to the input of the reply signal, and this is used as information to wait for either the success or failure of the lock request by the flip-flop circuit 18. After being outputted to the output line 191, the control storage register 23 changes the specified next microinstruction address in exactly the same way as the output of the flip-flop circuit 18, and locks the address specified by the control storage address register 22 successfully or unsuccessfully. Specifies the next microprogram to be executed in response to the process, and causes the process to be executed.

ロツク要求が不成功に終つた場合、そのプロセ
ツサは他プロセツサからロツク解除通知が発生し
ない間もしくは外部イベントが発生しない間は、
前述したように出力ライン131に論理値“1”
を出力しており、この結果AND回路17は論理
値“0”をOR回路20は論理値“1”をそれぞ
れ出力し、フリツプフロツプ回路18,19の出
力はそれぞれ論理値“0”、および論理値“1”
に変更される。これはロツク要求不成功の結果と
等しく、マイクロ命令アドレスはロツク不成功の
処理を実行せしめるマイクロ命令アドレスを指示
するように指定される。
If the lock request is unsuccessful, the processor will continue to
As mentioned above, the output line 131 has a logical value “1”.
As a result, the AND circuit 17 outputs the logical value "0", the OR circuit 20 outputs the logical value "1", and the outputs of the flip-flop circuits 18 and 19 are the logical value "0" and the logical value, respectively. “1”
will be changed to This is equivalent to the result of an unsuccessful lock request, and the microinstruction address is specified to point to the microinstruction address that causes the lock failure to occur.

また、ロツク要求が成功した場合、もしくはロ
ツク要求が不成功に終つた場合で他プロセツサか
らロツク解除通知が発生したあと、あるいは外部
イベントが発生したあとは出力ライン131には
論理値“0”が出力されフリツプフロツプ回路1
8,19にはロツク制御回路3の出力がそのまま
ストアされる。
Furthermore, if the lock request is successful, or if the lock request is unsuccessful and a lock release notification is generated from another processor, or after an external event occurs, the output line 131 will have a logic value of "0". Output flip-flop circuit 1
8 and 19, the output of the lock control circuit 3 is stored as is.

このようにして、ロツク解除状態にあつては複
数のCPUからのロツク要求を受けてこれを判定
し、ロツク要求に応答するリプライ信号とともに
ロツクの成功もしくは不成功をそれぞれのCPU
に通知して、成功したCPUは本来の処理を実行
せしめ、不成功のCPUについてはロツク要求の
無意味な繰返しを抑止した待機状態として次のロ
ツク成功の機会を付与するようにロツク要求の結
果CPUに通知しつつ、CPUにはこの結果に対応
する処理を実行せしめるロツク要求結果通知手段
とロツク要求結果変更手段とによつて極めて効果
的なロツク動作を行なつている。
In this way, when the lock is released, lock requests from multiple CPUs are received and judged, and success or failure of the lock is determined by each CPU along with a reply signal in response to the lock request.
The result of the lock request is notified so that the successful CPU executes the original processing, and the unsuccessful CPU is placed in a waiting state that suppresses the meaningless repetition of lock requests and is given a chance for the next successful lock request. A highly effective lock operation is achieved by means of a lock request result notifying means and a lock request result changing means which notifies the CPU and causes the CPU to execute processing corresponding to the result.

本発明のロツク制御方式は、ロツクによりシス
テム共有資源の排他制御を行なうマルチプロセツ
サシステムにおいて、ロツク要求に失敗したプロ
セツサはこれを認識してロツク解除状態になるま
では無意味な繰返し要求を避け、またロツク要求
に成功したプロセツサはこれによつて処理業務を
完了した場合、ロツク解除を他のプロセツサに通
知してロツク要求を行なわしめるように制御する
点に基本的な特徴を有するものであり、第1図に
示す実施例の変形も種種考えられる。
The lock control method of the present invention is such that in a multiprocessor system that performs exclusive control of system-shared resources by locking, a processor that has failed in a lock request recognizes this and avoids meaningless repeated requests until the lock is released. In addition, the basic feature is that when a processor that has successfully made a lock request has completed its processing task, it notifies other processors of the lock release and controls them to issue a lock request. , various modifications of the embodiment shown in FIG. 1 are possible.

たとえば、第1図の実施例ではプロセツサが
CPU(0)1およびCPU(1))2の2個を利用する
場合を例としているが、この個数はマツチプロセ
ツサシステムの規模に応じて任意に設定しても全
く同様に実施しうることは明らかである。
For example, in the embodiment of FIG.
This example uses two CPUs, CPU(0)1 and CPU(1))2, but the number can be set arbitrarily depending on the scale of the Matsuchi processor system and the same implementation can be performed. is clear.

また、フリツプフロツプ回路11,13,1
8,および19はこれをD型フリツプフロツプ回
路としているが、これらは同等な機能を有する他
のフリツプフロツプ回路と置換しても差支えな
く、以上は本発明の主旨を損なうことなくいずれ
も容易に実施しうるものである。
In addition, flip-flop circuits 11, 13, 1
8 and 19 are D-type flip-flop circuits, but these may be replaced with other flip-flop circuits having equivalent functions, and any of the above can be easily implemented without detracting from the spirit of the present invention. It is something that can be used.

以上説明したように本発明によれば、ロツクに
よりシステム共有資源の排他制御を行ないつつ処
理を行なうマツチプロセツサシステムにおいて、
ロツク要求を失敗したときはこれを認識してロツ
ク可能状態となるロツク解除信号を受けるまでは
繰返しロツク要求を抑止し、ロツクに成功して本
来の成理を完了したときはロツク解除信号を他の
全プロセツサに通知するという手段を備えること
によつて無意味なロツク要求の繰返しを避け従つ
てマルチプロセツサのシステム性能の低下を大幅
に改善しうるロツク制御方式が実現できるという
効果がある。
As explained above, according to the present invention, in a match processor system that performs processing while performing exclusive control of system shared resources by locking,
When a lock request fails, it recognizes this and repeatedly suppresses the lock request until it receives a lock release signal that enables the lock, and when the lock is successful and the original principle has been completed, the lock release signal is sent to another lock request. By providing a means for notifying all processors in a multiprocessor, it is possible to realize a lock control method that avoids meaningless repetition of lock requests and can greatly improve the deterioration in system performance of a multiprocessor.

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

第1図は本発明の一実施例を示すブロツク図で
ある。 1,2……CPU、3……ロツク制御回路、1
1,13,18,19……フリツプフロツプ回
路、12,20……OR回路、14,17……
AND回路、15,16……NOT回路、21……
制御記憶、22……制御記憶アドレスレジスタ、
23……制御記憶レジスタ。
FIG. 1 is a block diagram showing one embodiment of the present invention. 1, 2...CPU, 3...Lock control circuit, 1
1, 13, 18, 19... flip-flop circuit, 12, 20... OR circuit, 14, 17...
AND circuit, 15, 16...NOT circuit, 21...
Control memory, 22...Control memory address register,
23...Control storage register.

Claims (1)

【特許請求の範囲】[Claims] 1 ロツクによりシステム共有資源の排他制御を
行なうマルチプロセツサシステムにおいて、この
マルチプロセツサシステムを構成する複数のプロ
セツサからのロツク要求を受けるとこれに応答し
ロツクが可能であるかもしくは不可能であるかに
よつてロツク成功もしくは不成功の結果をそれぞ
れのプロセツサに通知しこの結果に対応する処理
を実行せしめるロツク要求結果通知手段と、前記
複数のプロセツサのうちのいずれかがロツク要求
を行なつて失敗したときこれをロツク要求を行な
つたプロセツサが認識するロツク要求失敗認識手
段と、ロツク要求を行なつたプロセツサがロツク
要求に成功し果すべき処理を実行したのち自プロ
セツサ以外の前記複数の全プロセツサに対しロツ
ク解除を通知するロツク解除通知手段と、前記ロ
ツク要求失敗認識手段によつてロツク要求を出し
たプロセツサがロツク要求の失敗を認識した場合
前記ロツク解除手段によつて他のプロセツサから
ロツク解除を通知されるまでロツク要求を抑止す
るロツク要求抑止手段と、前記ロツク要求失敗認
識手段によつてロツク要求を出したプロセツサが
ロツク要求の失敗を認識した場合前記ロツク要求
結果通知手段の結果を変更するロツク要求結果変
更手段とを備えてマルチプロセツサシステムにお
けるロツク要求の制御を行なうことを特徴とする
ロツク制御方式。
1. In a multiprocessor system that performs exclusive control of system-shared resources by locking, when a lock request is received from multiple processors that make up this multiprocessor system, it is possible to respond to the lock request and determine whether locking is possible or not. a lock request result notifying means for notifying each processor of a lock success or failure result depending on the lock request and causing the processor to execute a process corresponding to the result; A lock request failure recognition means that the processor that made the lock request recognizes when the lock request fails; A lock release notifying means for notifying a processor of lock release, and a lock request failure recognition means that when the processor that issued the lock request recognizes the failure of the lock request, the lock release means releases the lock from another processor. A lock request suppressing means for suppressing a lock request until a lock request is notified of cancellation, and a lock request failure recognition means for detecting the result of the lock request result notification means when the processor that issued the lock request recognizes the failure of the lock request. 1. A lock control system comprising: a lock request result changing means for changing a lock request result; and controlling a lock request in a multiprocessor system.
JP58049254A 1983-03-24 1983-03-24 Lock control system Granted JPS59173866A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58049254A JPS59173866A (en) 1983-03-24 1983-03-24 Lock control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58049254A JPS59173866A (en) 1983-03-24 1983-03-24 Lock control system

Publications (2)

Publication Number Publication Date
JPS59173866A JPS59173866A (en) 1984-10-02
JPS6336545B2 true JPS6336545B2 (en) 1988-07-20

Family

ID=12825694

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58049254A Granted JPS59173866A (en) 1983-03-24 1983-03-24 Lock control system

Country Status (1)

Country Link
JP (1) JPS59173866A (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS626366A (en) * 1985-07-03 1987-01-13 Hitachi Ltd Memory control system
JPS6367670A (en) * 1986-09-09 1988-03-26 Fujitsu Ltd Managing and processing system for occupation information on inter-system shared resources
US5341510A (en) * 1987-05-01 1994-08-23 Digital Equipment Corporation Commander node method and apparatus for assuring adequate access to system resources in a multiprocessor
AU596535B2 (en) * 1987-05-01 1990-05-03 Digital Equipment Corporation Commander node method and apparatus for assuring adequate access to system resources in a multiprocessor computer system
US4937733A (en) * 1987-05-01 1990-06-26 Digital Equipment Corporation Method and apparatus for assuring adequate access to system resources by processors in a multiprocessor computer system

Also Published As

Publication number Publication date
JPS59173866A (en) 1984-10-02

Similar Documents

Publication Publication Date Title
EP0086601B1 (en) Multiprocessor system having mutual exclusion control function
JP3707273B2 (en) Process control system
US5524247A (en) System for scheduling programming units to a resource based on status variables indicating a lock or lock-wait state thereof
US6226717B1 (en) System and method for exclusive access to shared storage
US5748959A (en) Method of conducting asynchronous distributed collective operations
EP0142820B1 (en) Method of controlling multiprocessing system and hardware arrangement for accomplishing the method
US7174552B2 (en) Method of accessing a resource by a process based on a semaphore of another process
US20050125789A1 (en) Executing processes in a multiprocessing environment
US5893157A (en) Blocking symbol control in a computer system to serialize accessing a data resource by simultaneous processor requests
JP2830116B2 (en) Lock control mechanism in multiprocessor system
US20040117793A1 (en) Operating system architecture employing synchronous tasks
JPS5837587B2 (en) memory lock device
JPS6336545B2 (en)
US5951662A (en) Single latch semaphore register device for multi-processor systems
JP2972491B2 (en) Bus control mechanism and computer system
JPS6332648A (en) Multiplex processor level altering/synchronizing apparatus
JP3560534B2 (en) Multiprocessor system and its exclusive control method
JPH05289987A (en) Bus right arbitrating circuit
JP2845542B2 (en) Exclusive control method in multiprocessor system
JP2504552B2 (en) Commander method and apparatus for ensuring sufficient access to system resources in a multiprocessor computer system
CN117453413A (en) Resource application method, device, electronic equipment and storage medium
JPH0542027B2 (en)
JPH02100755A (en) Information processing system
JPH06110847A (en) Exclusive control system for common bus system
JPH02108149A (en) Exclusive control mechanism for multiprocessor