JPS5922155A - Exclusive controlling method of multiprocessor system - Google Patents

Exclusive controlling method of multiprocessor system

Info

Publication number
JPS5922155A
JPS5922155A JP13240482A JP13240482A JPS5922155A JP S5922155 A JPS5922155 A JP S5922155A JP 13240482 A JP13240482 A JP 13240482A JP 13240482 A JP13240482 A JP 13240482A JP S5922155 A JPS5922155 A JP S5922155A
Authority
JP
Japan
Prior art keywords
processor
exclusive
program
state
exclusive state
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
Application number
JP13240482A
Other languages
Japanese (ja)
Inventor
「よし」江 聖彦
Masahiko Yoshie
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
Tokyo Shibaura 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 Toshiba Corp, Tokyo Shibaura Electric Co Ltd filed Critical Toshiba Corp
Priority to JP13240482A priority Critical patent/JPS5922155A/en
Publication of JPS5922155A publication Critical patent/JPS5922155A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores

Abstract

PURPOSE:To realize application software which is simple and does not spoil the responsibility of a program by performing exclusive control over a common resource in a main memory when a processor executes the program. CONSTITUTION:The contents of the main memory 1 are referenced from main frames 32a and 32b through a memory bus 2. An exclusive state memory 4 is stored with the exclusive state of the memory 1 and the address of the memory 1 placed in an exclusive state and the number of a processor in an exclusive state are written therein. Program counters 31a and 31b are registers which indicate the current execution address of the program. Control registers 33a and 33b are registers which control the processor main frames 32a and 32b respectively and hold their states. Namely, STOP/RUN states, exclusive queue states, and interruption inhibition states of the processors are stored. For this purpose, the contents of the registers 33a and 33b are rewritten to inhibit the corresponding processors from being interrupted by other programs.

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明は、マルチプロセッサ型電子計算機における主メ
モリ上のリソースヒ複数のプロセッサで共有するときの
排他制御方法に関する。
DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to an exclusive control method when resources on a main memory in a multiprocessor type electronic computer are shared by a plurality of processors.

〔発明の技術的背景〕[Technical background of the invention]

電子計算機の使用効率を向上させるため、最近の電子計
算機にはマルチプログラミング方式が採用されている。
In order to improve the usage efficiency of electronic computers, multi-programming methods have been adopted in recent electronic computers.

マルチプログラミングとは、一つの処理装置で俵数個σ
フプログラム乞時分割して、見かけ上これらビ同時に実
行することである。すなわち、複数のタスク乞同時に実
行できる機能ン持つものである。
Multiprogramming means processing several bales σ with one processing device.
The program is time-divided so that these programs appear to run at the same time. In other words, it has the ability to perform multiple tasks at the same time.

そのために、複数のプログラムが同一のりソースをアク
セスする場合には、プログラム間でのリソースの排他が
必要になる。ここで、排他とは、同一のリソースを他の
プログラムがアクセスするのを禁止することをいうが、
複数のプログラム間でリソースの排他が必要になる事情
は次に示すとおりである。例えば、プログラムAとプロ
グラムBがリソースXを共有し、マルチ処理Y:実行し
ているとする。この場合に1両者のプログラム間で排他
がとられているときは、プログラムAとプログラムBの
実行および共有リソースXに対するアクセスは1時分割
的に独立して行なわれることになる。その結果、いずれ
のプログラムについても、期待する出力全書ることがで
きる。ところが1両者のプログラム間で排他がとられて
いないときは、事情は全く異なったものになる。なぜな
ら、プログラムAの共有リソースXに対するアクセスと
Therefore, when multiple programs access the same resource, it is necessary to exclude resources between the programs. Here, exclusive means to prohibit other programs from accessing the same resource.
The circumstances that require resource exclusion between multiple programs are as follows. For example, assume that program A and program B share resource X and are executing multi-processing Y:. In this case, when exclusion is established between both programs, execution of program A and program B and access to shared resource X are performed independently in a time-sharing manner. As a result, you can write all the expected output for any program. However, when there is no exclusion between the two programs, the situation becomes completely different. This is because program A has access to shared resource X.

プログラムBの共有リソースXに対するアクセスは、異
なる条件下で別個になされるので論理的に不整合乞生じ
るからである。例えば、プログラムAが共■リソースX
をアクセスしている時にプログラムBがこの共有リソー
スX乞アクセスして共有リソースXの状態ン変化させ、
その後もプログラムAは共有リソースXヶアクセスし続
けたとする。すると、プログラムAは、プログラムBに
より共有リソースXの状態が改変させられたことを知ら
ないで共有リソースX’Yアクセスすることになる。
This is because program B accesses shared resource X separately under different conditions, resulting in logical inconsistency. For example, program A shares ■resource
While accessing this shared resource, program B accesses this shared resource and changes the state of shared resource.
Assume that program A continues to access the shared resource X times after that. Then, program A accesses shared resource X'Y without knowing that the state of shared resource X has been changed by program B.

このように、排他がとられていない場合には。In this way, if exclusion is not taken.

先に実行中のプログラムAによりアクセスされている共
WIJソースXの状態は、途中で実行されたプログラム
Bによって変化させらり、プログラムAの共有リソース
Xに対する処理は異った条件下で続けら]しることにな
り、論理はりに不整合を生じることになる。すなわち、
プログラムへ〇共仔リソースXに対する変換” Fa(
xl−プログラムBの共有リソースに対する変換をFb
(x)とすると、プログラムAとプログラムBの間に排
他がとられている時には、共NIJソースXの状態は”
a(Fb(x))かFb(Fa(幻)であり、かつFa
(Fb(x))=Fb(Fa(X))となる。ところが
、プログラムAとプログラムBの間に排他がとられてい
ない時には、リソースXの状態はFa(x)かFb(x
)かあるいは全(予期しない結果かのいずれかになり、
少なくとも期待する出力は得られない。
The state of the shared WIJ source ], resulting in an inconsistency in the logic. That is,
To the program 〇 Conversion for common child resource X” Fa (
xl - Fb conversion for program B's shared resources
Assuming (x), when exclusion is established between program A and program B, the state of common NIJ source X is "
a(Fb(x)) or Fb(Fa (phantom), and Fa
(Fb(x))=Fb(Fa(X)). However, when exclusion is not established between program A and program B, the state of resource X is either Fa(x) or Fb(x
) or all (unexpected results),
At least you won't get the expected output.

通常、このような排他が必要となるのは、互いに独立し
たプログラム間で共有する主メモリ、周辺装置、伝送装
置等である。これに対して、一般的には、排他制御は次
のような方法で実現されている。
Typically, such exclusion is required for main memory, peripheral devices, transmission devices, etc. that are shared between mutually independent programs. On the other hand, exclusive control is generally achieved by the following method.

第1は、プログラムの実行管理ンー元化し、共有リソー
ス乞アクセスするときにプログラム間で競合関係が生じ
ないようにする方法である。第2は、競合するプログラ
ム間で、排他制御f11ヲ必要とする処理全行なう前に
は所定の排他制御マクロ命令を発行するよう取り決め、
共有リソースの排他状態を事前にチェックする方法であ
る。第3は。
The first method is to centralize the execution management of programs and prevent conflicts between programs when accessing shared resources. Second, an arrangement is made between competing programs to issue a predetermined exclusive control macro instruction before performing all processes that require exclusive control f11.
This is a method of checking the exclusive status of shared resources in advance. The third thing is.

一方のプログラムが実行中には他方のプログラムの処理
が割り込まないようにする方法である。
This is a method to prevent the processing of one program from being interrupted while the other program is running.

一般に、第1の方法は適用範囲が周辺装置等の1幾器に
限定され、かつ通常はオペレーテイングシステムでサー
ビスされる。従って、アプリケーション・ソフトウェア
で使用される方法は、通常は上記の第2および第3の方
法であろう第2および第3の方法の使い分けは、所定の
排他制御マクロ命令乞実行するのに要する時間T1  
と、排他を必要とする処理そのものの実行に要する時間
T2 とのどちらが短いかによって決められる。すなわ
ち、T1〉T2の場合には、上記第3の方法による方が
プログラムの応答上好ましく、また簡単である場合が多
い。それに対して、T□<T2の場合には。
Generally, the scope of the first method is limited to one device, such as a peripheral device, and is usually serviced by an operating system. Therefore, the methods used in application software are usually the second and third methods mentioned above. T1
or the time T2 required to execute the process itself that requires exclusion, which is shorter. That is, in the case of T1>T2, the third method is preferable in terms of program response and is often simpler. On the other hand, if T□<T2.

上記第2の方法による方がよい。It is better to use the second method above.

〔背景技術の問題点〕[Problems with background technology]

ところが、マルチプロセッサ型電子計算機においては、
このような共[+Jソースに対して、各々のプロセッサ
間で排他をとる必要がある。
However, in multiprocessor electronic computers,
For such common [+J sources, it is necessary to ensure exclusion between each processor.

この場合、前記第3の方法は利用できない。なぜなら、
電子計’l’J−機への新たな割込信号乞完全に停めた
としても、各プロセッサでは既にプログラムが走行して
おり、それらのプログラム間では互いに排他乞とること
ができないからである。また、前記第2の方法を利用す
るのも好ましくない。なぜなら、第2の方法を利用する
と、排他制御方法要とする全てのものに排他制御マクロ
命令乞発行し、それを分析する必要がある。これは、処
理が極めて煩雑なうえに、排他をとるための時間が膨大
になり、電子計算機の利用効率からいって好ましくない
In this case, the third method cannot be used. because,
Even if requests for new interrupt signals to the electronic meter are completely stopped, programs are already running in each processor, and these programs cannot be mutually exclusive. Also, it is not preferable to use the second method. This is because, if the second method is used, it is necessary to issue an exclusive control macro command to everything that requires an exclusive control method and to analyze it. This is not only extremely complicated to process, but also takes an enormous amount of time to obtain exclusion, which is not desirable in terms of computer usage efficiency.

ところで、マルチプロセッサ型電子計算機では。By the way, in multiprocessor electronic computers.

各プロセッサの処理を完全に独立させることが、最も簡
単な業務割当て方法となる。しかし、従来の方法によっ
てこれを実現すると、マルチプロセッサの利用形態は極
めて制限されたものになり、その能力を十分に発揮しえ
ない。
The easiest way to allocate tasks is to make each processor's processing completely independent. However, if this is achieved using conventional methods, the usage of the multiprocessor is extremely limited and its capabilities cannot be fully utilized.

〔発明の目的〕[Purpose of the invention]

本発明は、上記のような従来技術の欠点に鑑みてなされ
たもので、マルチプロセッサ型電子計算機におけるアプ
リケーションソフトウェアの利用に対して、簡便かつプ
ログラムの応答性全損わない排他制御方法χ実現するこ
と全白的とする。
The present invention has been made in view of the above-mentioned shortcomings of the prior art, and provides an exclusive control method χ that is simple and does not impair program responsiveness for the use of application software in multiprocessor electronic computers. It is completely white.

〔発明の概要〕[Summary of the invention]

上記の目的YX:実現するために、本発明は、その内容
乞プロセッサにロードしようとする主メモリ上の指定ア
ドレスが排他状態にされているか百^χチェックして排
他状態にないときにはその内容をロードしてそれン排他
状態にしく排他読出命令)。
In order to achieve the above objective YX, the present invention checks whether the specified address on the main memory to be loaded into the content request processor is in the exclusive state, and if it is not in the exclusive state, the content is (exclusive read command) to load and put it in exclusive state.

プロセッサの内容乞ストアしようとする主メモリ上の指
定アドレスが排他状態にされているか否か乞チェックし
て排他状態にないときはプロセッサの内容乞ストアζて
、その排他状態乞解き(解除格納命令)、あるいは指定
アドレス乞排他状態にしたり(排他命令)、排他状態を
解除したり(解除命令)して、各々のプロセッサがプロ
グラムを実行する段階で主メモリの排他状態乞チェック
し、主メモリ上の共有リソースの排他ン1IIJ ii
+4’ jるnl・他制御方法を提供するものである。
Check whether the specified address in the main memory where you want to store the processor's contents is in an exclusive state. If it is not in an exclusive state, store the processor's contents and clear the exclusive state (release storage command). ), or by placing a specified address in an exclusive state (exclusion instruction) or canceling the exclusive state (release instruction), and checking the exclusive state of main memory at the stage when each processor executes a program, Exclusive access to shared resources 1IIJ ii
+4'j nl/other control methods are provided.

〔発明の芙廁例〕[Examples of inventions]

第1図乃至第3図乞参照して本発明の一実施例を説明す
る。まず、第1図によって、本つ6明の排他制御方法に
使用する装置の構成乞説明する。主メモリ1にメモリ・
々ス2ン介して演算制御装置3a 、 3bと排他状態
メモリ4ケ接続する。演算制御装置3a 、 3bは、
プログラムカウンタ31a。
An embodiment of the present invention will be described with reference to FIGS. 1 to 3. First, with reference to FIG. 1, the configuration of the apparatus used in the exclusive control method of this invention will be explained. Memory in main memory 1
Four exclusive state memories are connected to the arithmetic and control units 3a and 3b through each switch. The arithmetic and control units 3a and 3b are
Program counter 31a.

31b、プロセッサ本体32a 、 32b 、および
制御レジスタ33a 、 33bにより構成されている
。主メモリ1はメモリパス2ン介していずれのプロセッ
サ本体32a 、 32bからも参照可能である。排他
状態メモリ4は主メモリ1の排他状態メモリするもので
、排他状態にされている主メモリlのアドレスと排他状
態にしているプロセッサの番号ケ科きこむことによって
行なう。なお、排他状態メモリ4は第1図のように通常
のメモリパスに接続してもよいが、より尚速にするため
にはキャッシュメモリの方が好ましい。プログラムカウ
ンタ31a 。
31b, processor bodies 32a, 32b, and control registers 33a, 33b. The main memory 1 can be referenced from either processor body 32a or 32b via the memory path 2. The exclusive state memory 4 is the exclusive state memory of the main memory 1, and this is done by reading the address of the main memory 1 which is in the exclusive state and the number of the processor which is in the exclusive state. Note that the exclusive state memory 4 may be connected to a normal memory path as shown in FIG. 1, but a cache memory is preferable for faster speed. Program counter 31a.

31bは、その時点のプログラムの実行許地ン示すレジ
スタで、おのおののプロセッサ本体32a。
Reference numeral 31b denotes a register indicating the execution location of the program at that time, which is included in each processor body 32a.

32bに接続されている。プロセッサ本体32a。32b. Processor main body 32a.

32bはマイクロプログラムおよびその制御部より成っ
ている。制御レジスタ33a 、 33bはそれぞれの
プロセッサ本体32a 、 32bを制御しかつその状
態を保持するレジスタで、例えば第2図のように当該プ
ロセッサの5TOP/RUNの状態、当該プロセッサの
排他待ち状態、当該プロセッサに対する割込禁止状態乞
記憶するエリアなどで構成されろ。
32b consists of a microprogram and its control section. The control registers 33a and 33b are registers that control the respective processor bodies 32a and 32b and hold their states. For example, as shown in FIG. 2, they control the 5TOP/RUN state of the processor, the exclusive wait state of the processor, and the It should consist of an area for remembering the interrupt-prohibited state.

従って、制御レジスタ33a 、 33bの内容を書き
換えることによって自己のプロセラサケ他のプログラム
に対する割込禁止状態にすることができる。
Therefore, by rewriting the contents of the control registers 33a and 33b, it is possible to disable interrupts to other programs.

次に、アプリケーション・ソフトウェアが利用するため
に用意される排他読出命令(LX)と、解除格納命令(
STX)と、解除命令(REX)と、排他命令(Ex)
と7第3図により説明する。
Next, an exclusive read instruction (LX) and a release store instruction (LX) prepared for use by application software are provided.
STX), release command (REX), and exclusive command (Ex)
and 7 will be explained with reference to FIG.

p43 F図(a)は排他読出命令(LX)χ説明する
ためのフローチャートで、まずプログラムカラ/り(P
C) 31a 、 31bに従い命令を取り出しくブロ
ック101)、オペランド部を計算してロードするアド
レスを割り出す(ブロック102)。そして、ロードす
る主メモリ1上のアドレスが排他状態にされているかど
うかを排他状態メモリ4を参照することで調べ、他のプ
ロセッサで排他状態にされているときは以上の動作を繰
り返し、他のゾロセッサで排他状態にされていないとき
は次にイLむ(ブロック103)。ロードするアドレス
が排他状態にされていないときはプロセッサの状態乞排
他状態メモリ4に記憶しくブロック1o4 ) 、自己
プロセッサの制御レジスタ33a 、 33bの内容全
書き換えることにより他のプログラムに対して割込禁止
状M とjる(ブロック105)。そして排他状態メモ
リ4にアドレスとプロセッサ番号乞記入することにより
主メモリ1上の所定のアドレスを排他状態にしくブロッ
ク106 ) 、主メモリ1上の指定アドレスの内容を
ロードした後(ブロック107 )、プログラムカラ/
り(PC) 31a 、 31b 乞更新して次のステ
ップに進める(ブロック108)。
p43 F Figure (a) is a flowchart for explaining the exclusive read instruction (LX).
C) Take out the instruction according to 31a and 31b (block 101), calculate the operand part and determine the address to load (block 102). Then, it checks whether the address in main memory 1 to be loaded is in an exclusive state by referring to the exclusive state memory 4, and if it is in an exclusive state in another processor, repeats the above operation and If it is not in an exclusive state with Zorocessor, then proceed to step 103 (block 103). If the address to be loaded is not in the exclusive state, the state of the processor is stored in the exclusive state memory 4 (block 1o4), and interrupts to other programs are prohibited by rewriting the entire contents of the control registers 33a and 33b of the own processor. state M (block 105). Then, by writing the address and processor number in the exclusive state memory 4, a predetermined address on the main memory 1 is placed in an exclusive state (block 106), and after loading the contents of the specified address on the main memory 1 (block 107), Program color/
The PCs 31a and 31b are updated and proceed to the next step (block 108).

第3図(b)は、解除格納命令(STX)を説明するだ
めのフローチャートで、−まずプログラムカウンタ(p
C) 31a t 31bに従い命令χ取り出しくブロ
ック201)、オペランド部を計算してストア丁べきア
ドレス7割り出−f(ブロック202)。そして。
FIG. 3(b) is a flowchart for explaining the release/store instruction (STX).
C) Block 201) fetches the instruction χ according to 31a t 31b, calculates the operand part and determines the address 7 to be stored (block 202). and.

ストアすべき主メモリ1上の一アドレスが他のプロセッ
サによって排他状態にされているかどうか乞排他状態メ
モリ4を参照することで調べ、他のプロセッサで排他状
態にされているときは以上の動作を繰り返し、他のプロ
セッサで排他状態にされていないときは次に進む(ブロ
ック203)。ストアすべきアドレスが他のプロセッサ
によって排他状態にされていな(て自己のプロセッサで
排他状態にされているときは、排他状態メモリ4から指
定のアドレスと自己のプロセッサ番号ン削除し、排他状
態メモリする(ブロック204)。そして、プロセッサ
の状態乞排他状態メモリ4に記憶されている状態に戻し
た後(ブロック205)、主メモI71の指定アドレス
にデータをストアして(ブロック206)、プログラム
カウンタ(PC) 31a 、31bχ更新して次のス
テップに進める(ブロック207)。
Check whether an address in main memory 1 to be stored is in an exclusive state by another processor by referring to the exclusive state memory 4, and if it is in an exclusive state by another processor, perform the above operation. Repeatedly, if no other processor is in the exclusive state, proceed to the next step (block 203). If the address to be stored is not in an exclusive state by another processor (and is in an exclusive state in its own processor), the specified address and its own processor number are deleted from the exclusive state memory 4, and (Block 204).Then, after restoring the state of the processor to the state stored in the exclusive state memory 4 (Block 205), the data is stored at the specified address of the main memory I71 (Block 206), and the program counter is (PC) 31a and 31bχ are updated and the process proceeds to the next step (block 207).

第3図(C)は解除命令(RE、0を説明するためのフ
ローチャートで、まずプログラムカウンタ(PC)31
a、31bに従って命令7取り出しくブロック301 
)、オペランド部を計lTシてアドレスゲ割り出す(ブ
ロック302)。そしてそのアドレスが排他状態のとき
は排他状態メモリ4からのアドレスン削除して排他乞解
除しくブロック303)、プログラムカウンタ(PC)
 31a 、 31b Y更新して仄のステップに進め
る(ブロック304 )。
FIG. 3(C) is a flowchart for explaining the release command (RE, 0). First, the program counter (PC) 31
Block 301 for fetching instruction 7 according to a, 31b
) and the operand part to determine the address (block 302). When the address is in the exclusive state, the address is deleted from the exclusive state memory 4 to release the exclusive request (block 303), and the program counter (PC)
31a, 31b Y update and proceed to the next step (block 304).

第3図(d)は排他命令(EX)χ説明するfこめのフ
ローチャートで、まずプログラムカウンタ(PC)31
a 、 31bに従って命令7取り出しくブロック40
1)、オペランド部?計算してアドレス7割り出す(ブ
ロック402)。そして、排他状態メモリ4にそのアド
レスxt!き込んで排他状態にしくブロック403 )
、プログラムカウンタ(PC) 31a 。
FIG. 3(d) is a detailed flowchart explaining the exclusive instruction (EX). First, the program counter (PC) 31
Block 40 for fetching instruction 7 according to a, 31b
1), Operand part? Address 7 is calculated (block 402). Then, the address xt! is stored in the exclusive state memory 4! block 403 )
, program counter (PC) 31a.

31b乞更新して次のステップに進める(ブロック40
4)。
31b Update and proceed to next step (block 40)
4).

仄に、2つの演算制御装jif3a、3bが2つのプロ
グラムカウンタそれぞh 、lキち、主メモリl上のX
なるエリア乞アクセスする場合を例にして本発明の排他
制御方法を説明する。なお、プログラムA、Bは次の表
のように構成されているとする。
Meanwhile, the two arithmetic and control units jif 3a and 3b run two program counters h and l, respectively, and X on the main memory l.
The exclusive control method of the present invention will be explained by taking as an example the case where the area is accessed. It is assumed that programs A and B are configured as shown in the following table.

プログラムA プログラムB ここで、初期状態では主メモリ1に対する排他はないも
のと−「る。
Program A Program B Here, it is assumed that there is no exclusive access to main memory 1 in the initial state.

1ず、プロセッサ本体32aで実行中のプログラムAが
LX命令乞発行すると主メモリ1のエリアXの内容はR
i  レジスタにロードされ、同]■qに排他状態メモ
リ4にはプロセッサ本体32aの番号とエリアXのアド
レスが書き込まれて主メモリ1のエリアXは排他状態に
される。また、プロセッサ本体32aで実行される他の
プログラムに対して割込禁止状態とするために制御レジ
スタ33aの内容が有き換えられる。これにより、以後
の当該プロセッサに対する割り込みは待ち状態とされる
1. When program A running on processor body 32a issues an LX command, the contents of area X of main memory 1 become R.
The number of the processor main body 32a and the address of the area X are written into the exclusive state memory 4, and the area X of the main memory 1 is placed in the exclusive state. Further, the contents of the control register 33a are changed in order to disable interrupts to other programs executed by the processor main body 32a. As a result, subsequent interrupts to the processor are placed in a waiting state.

次に、プロセッサ本体32bで実行中のプログラムBが
エリアXに対してLX命令を発行すると、エリアXが排
他状態にあるかどうかを排他状態メモリ4で調べる。こ
のとき、エリアXはプロセッサ本体32aによって排他
状態にされているので、プロセッサ本体32bの状態χ
排他時ちとし、以後エリアXの排他が解除されるまでプ
ログラムカウンタ31bは更新されず、同じ命令ン繰り
返し続ける。この状態のときに、プロセッサ本体32b
にエリアX以外のエリアをアクセスするプログラム(プ
ログラムA、Bと異なる)による割込があると、プロセ
ッサ本体32bはそのプログラムに対するサービスχ行
なうことになる〇 次に、プロセッサ本体32aで実行中のプログラムAが
MPY (乗算)命令を終了させてその後STX命令命
令性発行と、排他状態メモリ4からエリアXについての
排他情報が削除され、かつプロセッサ本体32aの割込
禁止状態は解除される。すると。
Next, when program B being executed in the processor body 32b issues an LX command to area X, the exclusive state memory 4 is checked to see if area X is in the exclusive state. At this time, since the area X is in an exclusive state by the processor main body 32a, the state χ of the processor main body 32b
At the time of exclusion, the program counter 31b is not updated until the exclusion of area X is released, and the same instruction continues to be repeated. In this state, the processor main body 32b
If there is an interrupt by a program (different from programs A and B) that accesses an area other than area X, the processor body 32b will perform a service χ for that program. After A finishes the MPY (multiply) instruction, the STX instruction is issued, the exclusive information about area X is deleted from the exclusive state memory 4, and the interrupt inhibited state of the processor main body 32a is released. Then.

プロセッサ本体32bではプログラムBによるLX命令
が繰り返し実行されているσノで、エリアXの排他状態
が解除された後にエリアXの内容がRjレジスタにロー
ドされ続いてAI)D C加算)命令が実行されること
になる。
In the processor body 32b, at σ, when the LX instruction by program B is repeatedly executed, after the exclusive state of area X is released, the contents of area will be done.

このようにして本発明によれは、別個のプロセッサで実
行中の別のプログラムが、共有リソ−スケ異なる条件下
でアクセスし合う不q合はなくなる。
In this manner, the present invention eliminates the problem of different programs running on separate processors accessing a shared resource under different conditions.

なお、排他状態メモリ4の書き込み内容は、主メモリ1
のある単位ごとのマツピング形式でもよいし、アドレス
範l71Iを登録する形式でもよい。また、各外1セッ
サの種々の動作χコード化し、それを登録する形式でも
よい。排他状態メモリ4は主メモリ1の一部乞使用して
も、別個に独立させてもよい。
Note that the contents written in the exclusive state memory 4 are the same as those in the main memory 1.
It may be in a mapping format for each unit, or it may be in a format in which address ranges 171I are registered. Alternatively, the various operations of each processor may be converted into x-codes and registered. The exclusive state memory 4 may be used as part of the main memory 1 or may be made independent.

アプリケーション・ソフトウェアが利用する命令は、前
述のLX、STX、REX、EX の他に、次のような
ものを用意してもよい。すなわち、主メモリ1上の全て
のエリアを排他制御する命令や、各プロセッサの種々の
動作ビコード化してそのコードを排他状態メモリ4に登
録することにより主メモリ1乞アクセスすること以外の
プロセッサの動作を各プロセッサ間で排他する命令であ
る。
In addition to the above-mentioned LX, STX, REX, and EX, the following instructions may be used by the application software. In other words, instructions for exclusive control of all areas in the main memory 1, and processor operations other than accessing the main memory 1 by encoding various operations of each processor and registering the codes in the exclusive state memory 4. This is an instruction to exclude between each processor.

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

このように本発明によれば、別個のプロセッサで互いに
独立に実行される複数のプログラムが共有リソースをア
クセスする際に、先に示したLX。
Thus, according to the present invention, when a plurality of programs executed independently of each other on separate processors access a shared resource, the LX described above can be used.

STX 、 EX 、 REX命令ンそれぞれのプログ
ラムが独自に利用することができるのでそれらのプログ
ラムが共有リソースを異なる条件下でアクセスし合うこ
とはなくなり、また、共有リソ−スケアクセスする際に
、それぞれのプログラムが独自に共有リソースの該当の
アドレスが排他状態にあるかどうか火調べて命令を実行
することになるので、簡便かつプログラムの応答性全損
わない排他制御ン実現できる。
Since each program can use the STX, EX, and REX instructions independently, these programs will not access shared resources under different conditions, and when accessing shared resources, each program will Since the program independently checks whether the corresponding address of the shared resource is in the exclusive state or not and executes the command, exclusive control can be realized easily and without compromising the responsiveness of the program.

その結果、本発明によればソフトウェアの演算処理上の
負荷が少なく、そのためソフトウェアの使い方によりプ
ログラムの応答性に影響χ与えることが少ない。また、
排他するリソースが限定かつ識別できるので、そのリソ
ースに関する以外の処理に対しては全く影響ン与えない
。さらに、従来の単一のゾPセッサにおける排他制(財
)と見掛は上差異がなく、既成のソフトウェアの改造が
極めて簡単である。
As a result, according to the present invention, the computational processing load on the software is small, and therefore the responsiveness of the program is less likely to be affected by how the software is used. Also,
Since the resources to be excluded are limited and identifiable, processes other than those related to those resources are not affected at all. Furthermore, there is no difference in appearance from the existing exclusive system (goods) in a single ZOP processor, and it is extremely easy to modify existing software.

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

第1図は本発明の排他制御方法に使用する装置制御方法
に使用する命令乞説明するためのフローチャートである
。 2・・・メモリパス、3a、3b・・・演算制御装置。 370− 吊3図 (cL)           (b)(c)    
       (d) 371−
FIG. 1 is a flowchart for explaining the instructions used in the device control method used in the exclusive control method of the present invention. 2...Memory path, 3a, 3b... Arithmetic control unit. 370- Hanging diagram 3 (cL) (b) (c)
(d) 371-

Claims (1)

【特許請求の範囲】 一  主メモリと、この主メモリに接続された複数のプ
ロセッサと、このプロセッサで実行中のプログラムの実
行番地乞示すプログラムカウンタと、前記主メモリのど
のアドレスがどのプロセッサにより排他状態にされてい
るか?記憶する排他状態メモリと、前記プロセッサが他
のプロセッサに対して割込禁止状態にあるかどうか乞記
憶する制御レジスタと2備えたマルチ・プロセッサ・シ
ステムの排他制御方法において。 排他読出命令により、−のプロセッサで実行中のプログ
ラムがロードしようとする1111記主メモリ上の指定
アドレスが他のプロセッサにより排他状態にされている
ときはこ+しか解除されるまでそのロード命令の実行乞
中断し、この指定アドレスがDのプロセッサにより排他
状態にサレテイナイトきはこの指定アドレスの内容乞こ
の−のプロセッサにロードしかつこの指定アドレスを排
他状態にしかつこの−のプロセッサを割込禁止状態にし
かツコノーのプロセッサについてのプログラムカウンタ
を更新してプログラムの実行全欠のステップに進め、 解除格納命令により、−のプロセッサで実行中のプログ
ラムがストアしようとする前記主メモリ上の指定アドレ
スが他のプロセッサにより排他状態にされているときは
これが解除されるまでそのストア命令の実行を中断し、
この指定アドレスが他のプロセッサにより排他状態にさ
」tていないときはこの−のプロセッサの内容をこの指
定アドレスにストアしかつこの指定アドレスの排他状態
をM除りかつこの−のプロセッサについてのプログラム
カウンタ乞更新してプログラムの実行を次のステップに
進め、 排他命令により、前記主メモリの指定アドレスヶ排他状
態にし、解除命令により、前記主メモリの指定アドレス
の排他状態を解除し、 前記各々のプロセッサで実行されるプログラムが前記主
メモリ上の共W’)ソースの排他乞制御することン特徴
とするマルチ・プロセッサ・システムの排他制御方法。
[Scope of Claims] (1) A main memory, a plurality of processors connected to the main memory, a program counter indicating the execution address of a program being executed by the processor, and which address of the main memory is exclusive to which processor; Are you in a state? An exclusive control method for a multi-processor system comprising: an exclusive state memory for storing an exclusive state; and a control register for storing whether the processor is in an interrupt-disabled state for other processors. 1111 If the specified address in the main memory that the program running on the - processor attempts to load is in an exclusive state by another processor due to an exclusive read instruction, the load instruction will not be executed until it is released. Execution is interrupted, and when this specified address is placed in an exclusive state by the processor of D, the content of this specified address is loaded into this processor, and this specified address is placed in an exclusive state, and this processor is placed in an interrupt-disabled state. The program counter for the Nishikatsuko processor is updated and the program proceeds to the step where the execution of the program is completely interrupted, and the specified address in the main memory to which the program running on the - processor attempts to store is set to another address by the release store instruction. When the processor is in an exclusive state, execution of the store instruction is suspended until the exclusive state is released.
If this specified address is not in an exclusive state by another processor, the contents of this - processor are stored in this specified address, the exclusive state of this specified address is removed, and the program for this - processor is stored. updating a counter and proceeding the program execution to the next step; using an exclusive instruction, the specified address of the main memory is placed in an exclusive state; using a release instruction, the specified address of the main memory is released from the exclusive state; and each of the processors 1. A method for exclusive control of a multi-processor system, characterized in that a program executed in the W') exclusively controls a common source on the main memory.
JP13240482A 1982-07-29 1982-07-29 Exclusive controlling method of multiprocessor system Pending JPS5922155A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13240482A JPS5922155A (en) 1982-07-29 1982-07-29 Exclusive controlling method of multiprocessor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13240482A JPS5922155A (en) 1982-07-29 1982-07-29 Exclusive controlling method of multiprocessor system

Publications (1)

Publication Number Publication Date
JPS5922155A true JPS5922155A (en) 1984-02-04

Family

ID=15080597

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13240482A Pending JPS5922155A (en) 1982-07-29 1982-07-29 Exclusive controlling method of multiprocessor system

Country Status (1)

Country Link
JP (1) JPS5922155A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02156366A (en) * 1988-12-08 1990-06-15 Nec Corp Common disk control system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02156366A (en) * 1988-12-08 1990-06-15 Nec Corp Common disk control system

Similar Documents

Publication Publication Date Title
KR100578437B1 (en) Mechanism for interrupt handling in computer systems that support concurrent execution of multiple threads
KR100242484B1 (en) Apparatus and method for optimizing performance of cache memory
US5689653A (en) Vector memory operations
US4486831A (en) Multi-programming data processing system process suspension
US20070204271A1 (en) Method and system for simulating a multi-CPU/multi-core CPU/multi-threaded CPU hardware platform
JPS58151655A (en) Information processing device
JPS5911943B2 (en) Trap mechanism for data processing equipment
JPH0430053B2 (en)
JPH08278886A (en) Method and system for operation of extended system management in data-processing system
US5291581A (en) Apparatus and method for synchronization of access to main memory signal groups in a multiprocessor data processing system
JPH1115793A (en) Protection method for resource maintainability
US10241829B2 (en) Information processing device, information processing method, recording medium, calculation processing device, calculation processing method
CN104866443A (en) Interruptible store exclusive
JP3797570B2 (en) Apparatus and method using semaphore buffer for semaphore instructions
JP2539352B2 (en) Hierarchical multi-computer system
US11934698B2 (en) Process isolation for a processor-in-memory (“PIM”) device
US20230195459A1 (en) Partition and isolation of a processing-in-memory (pim) device
US4991083A (en) Method and system for extending address space for vector processing
KR20220127326A (en) Collaborative Walk-Stilling Scheduler
US20020120809A1 (en) Computer, method of controlling computer, and recording medium onto which method of controlling is recorded
US20040177224A1 (en) Local memory with ownership that is transferrable between neighboring processors
KR0136111B1 (en) Apparatus and method for synhcronization of access to main memory signal groups in a multiprocessor data processing
JPS5922155A (en) Exclusive controlling method of multiprocessor system
JP2004192052A (en) Software processing method and software processing system
MacKinnon Advanced function extended with tightly-coupled multiprocessing