JPS63228367A - Main memory access method - Google Patents
Main memory access methodInfo
- Publication number
- JPS63228367A JPS63228367A JP6101087A JP6101087A JPS63228367A JP S63228367 A JPS63228367 A JP S63228367A JP 6101087 A JP6101087 A JP 6101087A JP 6101087 A JP6101087 A JP 6101087A JP S63228367 A JPS63228367 A JP S63228367A
- Authority
- JP
- Japan
- Prior art keywords
- cpus
- access
- lock control
- cpu
- lock
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Multi Processors (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、マルチプロセッサシステムの主記憶アクセス
方式に関し、特に主記憶装置上の特定領域に対するロッ
ク制御を伴う主記憶アクセス方式%式%
〔従来の技術〕
主記憶装置と、この主記憶装置を共有する複数のプロセ
ッサ(以下CPUと略す)とからなり、1つの管理プロ
グラムにより制御されるマルチプロセッサシステムは、
一般に、どのCPUにも属さない多くのシステム資源、
例えば主記憶装置を共有しているため、資源の割り当て
において融通性に富み、しかも、高信頼性が期待できか
つ経済性のあるシステムである。しかしながら、システ
ムの資源を管理しているプログラムを複数のCPUが同
時に実行すれば、同一資源を二つのプログラムに割りつ
けてしまうという事態が生じる可能性がある。このため
、マルチプロセッサシステムにおいては主記憶装置上に
あるシステム管理のための諸情報を参照更新(以下アク
セスと呼ぶ)する場合、あるCPUによる一連のアクセ
スが完了するまで他のCPUがその情報にアクセスする
ことを禁止する必要がある。オペレーティングシステム
のようなプログラムが共有資源の管理を行う場合、この
アクセス禁止処理は、ソフトウェアにより、例えばテス
ト・アンド・セット命令を使用して。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a main memory access method for a multiprocessor system, and in particular to a main memory access method involving lock control over a specific area on the main memory device. Technology] A multiprocessor system consisting of a main memory device and multiple processors (hereinafter referred to as CPUs) that share this main memory device, and controlled by one management program,
In general, many system resources that do not belong to any CPU,
For example, since the main storage device is shared, the system is highly flexible in resource allocation, can be expected to be highly reliable, and is economical. However, if multiple CPUs simultaneously execute a program that manages system resources, there is a possibility that the same resource will be allocated to two programs. For this reason, in a multiprocessor system, when referring to and updating (hereinafter referred to as access) various information for system management on the main memory, other CPUs cannot access the information until a series of accesses by one CPU is completed. Access should be prohibited. When a program such as an operating system manages shared resources, this access prohibition process is performed by software, for example using test-and-set instructions.
ソフトウェアロックと呼ばれる方法で行なわれる。This is done using a method called software locking.
一方、プログラムに提供されるハードウェアの一連のプ
ロセスにおいても、複数のCPUが互いに共有のハード
ウェア資源を使用する場合は、前記のような共有資源の
管理が必要となる。例えば。On the other hand, when a plurality of CPUs mutually use shared hardware resources in a series of hardware processes provided to a program, it is necessary to manage the shared resources as described above. for example.
主記憶装置上の領域をプログラムでアクセス可能なプロ
グラム領域とプログラムでアクセス不可能なハードウェ
ア領域とに分割し、ハードウェア領域を複数CPU間で
共有する場合、前記のようなアクセス禁止処理が必要と
なる。When dividing the area on the main storage device into a program area that can be accessed by a program and a hardware area that cannot be accessed by a program, and sharing the hardware area among multiple CPUs, the above-mentioned access prohibition process is required. becomes.
前記したテスト・アンド・セット命令を使用したソフト
ウェアロックによる方法をマイクロプログラムによって
実現する場合には、複数のCPUから参照更新の可能な
ロックフラグをフリップフロップあるいは主記憶装置の
ハードウェア領域上の一領域で構成し、このロックフラ
グにより共有領域の排他制御を行う必要がある。このソ
フトウェアによる方法によれば、ロック制御はアクセス
手順の一部として行われるため、当該共有領域以外のア
クセスはいずれのCP tJに対しても許可され、特別
なハードウェアを必要とせずに主記憶装置の部分ロック
機能の実現が可能となる。When implementing the software locking method using the test-and-set instruction described above using a microprogram, a lock flag that can be referenced and updated by multiple CPUs is stored in a flip-flop or in a hardware area of the main memory. It is necessary to perform exclusive control of the shared area using this lock flag. According to this software method, lock control is performed as part of the access procedure, so access to areas other than the relevant shared area is permitted for any CP tJ, and the main memory can be accessed without the need for special hardware. It becomes possible to realize a partial lock function of the device.
この種のソフトウェアによるロック管理機構に関する従
来技術としては1例えば、特開昭56−164462号
公報に記載されている。A prior art related to this type of software-based lock management mechanism is described in, for example, Japanese Patent Laid-Open No. 164462/1983.
(発明が解決しようとする問題点〕
しかしながら、前記従来技術のソフトウェアによるロッ
ク管理機構では、ロックフラグを複数のCPU間での共
有資源上に構成し、ロックフラグ更新における競合の制
御をフラグ側で行なう必要がある。(Problems to be Solved by the Invention) However, in the software-based lock management mechanism of the prior art, lock flags are configured on a shared resource among multiple CPUs, and contention in lock flag updates is controlled on the flag side. It is necessary to do it.
複数のCPU間の共有資源として最も普遍的な主記憶装
置上に前記ロックフラグを構成する場合、ロックフラグ
を実装する特別なハードウェアを必要とはしないが、こ
のロックフラグのアクセスに対する各CPU間の競合は
ハードウェアにより制御されなければならない。これは
通常、フラグの参照更新の間、主記憶装置をハードウェ
アロックすることで行われるが、このハードウェアロッ
クによりロック領域とは無関係な他領域のアクセスまで
もが一時的に禁止されるため、性能の低下を否めな゛い
。If the lock flag is configured on the main memory, which is the most universal resource shared among multiple CPUs, no special hardware is required to implement the lock flag, but there is no need for special hardware to implement the lock flag. contention must be controlled by hardware. This is normally done by hardware locking the main memory during flag reference updates, but this hardware lock temporarily prohibits access to other areas unrelated to the locked area. However, there is an undeniable drop in performance.
一方、ロックフラグをフリップフロップで構成する場合
、複数の各CPUと信号線で結合された別ハードウェア
および競合を集中制御する論理回路が必要となる。特に
数多くのCPUで構成されるマルチプロセッサシステム
の場合は、ロックフラグを実装するハードウェアの48
号ビン数が増大し、その構成および制御論理が複雑とな
る問題点があった。On the other hand, when the lock flag is configured with a flip-flop, separate hardware connected to each of the plurality of CPUs via signal lines and a logic circuit for centrally controlling contention are required. In particular, in the case of a multiprocessor system consisting of a large number of CPUs, 48
There were problems in that the number of bins increased and the configuration and control logic became complicated.
本発明は、前記問題点を解決するためになされたもので
ある。The present invention has been made to solve the above problems.
本発明の目的は、前記ロック制御を行うロックフラグを
主記憶装置や別ハードウェアといった複数のCPU間に
共有資源上に実装することなく。An object of the present invention is to perform the lock control without implementing the lock flag on a shared resource between a plurality of CPUs such as a main storage device or separate hardware.
各CPUがロックフラグを持ち、しがち、ロック領域の
アクセスに対する競合制御を各CPU側で行い、マルチ
プロセッサシステムを構成するCPUが増えても、その
システム構成を容易にする主記憶アクセス方式を提供す
ることにある。Provides a main memory access method that facilitates system configuration even when the number of CPUs configuring a multiprocessor system increases by controlling contention for lock area access on each CPU side, as each CPU tends to have a lock flag. It's about doing.
本発明の前記ならびにその他の目的と新規な特徴は1本
明細書の記述及び添付図面によって明らかになるであろ
う。The above and other objects and novel features of the present invention will become apparent from the description of this specification and the accompanying drawings.
前記目的を達成するためになされた本発明のうち1代表
的なものの概要を簡単に説明すれば、下記のとおりであ
る。A brief summary of one typical aspect of the present invention that has been made to achieve the above object is as follows.
本発明においては、ロック制御を行うためのロックフラ
グ(ロック制御ビット)を各CPUに分散させて持たせ
、各CPUは互いのロックフラグを参照するのみで更新
することなく、ロック制御を行うようにし、ロック領域
のアクセスに対する競合制御を各CPU側で独立して行
うことにする。In the present invention, lock flags (lock control bits) for performing lock control are distributed among each CPU, and each CPU performs lock control without updating each other's lock flags. , and contention control for access to the lock area will be performed independently on each CPU side.
すなわち、N個のCPUと、N個のCPUにより共有さ
れる主記憶装置とからなるマルチプロセッサシステムに
おいて、自CPUによってのみセット、リセット可能で
、がっ他CPUにより参照可能なロック制御ビットを前
記CPU単位にそれぞれ有し、第に番目(k=0,1,
2. ・・・。That is, in a multiprocessor system consisting of N CPUs and a main memory shared by the N CPUs, a lock control bit that can be set and reset only by the own CPU and can be referenced by other CPUs is set as described above. Each CPU has a number of units (k=0, 1,
2. ....
N−1)のCPUが前記主記憶装置の特定領域をアクセ
スする際には、自CPUの第に番目のロック制御ビット
を論理111 PIにセットし、前記自cPUのロック
制御ビットの状態が全ての他CPUに反映した段階で、
i#Jc (i=0.l、2. ・・・、に−1,に+
1. ・・・、N−1)であるN−1個の他CPUの
ロック制御ビットの論理和がin Onである場合は、
前記主記憶装置の特定領域をアクセスし、アクセスの終
了とともに自CPUの前記第に番目の、ロック制御ビッ
トを論理゛o″′にリセットする。前記i#にであるN
−1個の他CPUのロック制御ビットの論理和が“°1
1′でがっiくk (i:0、t、2t ・・・、に
−1)である自CPUよりアクセス優先順位が高いk−
1個の他CPUのロック制御ビットの論理和がOIIで
ある場合は、前記i f−にであるN−1個の他CPU
(7)ロック制御ビットの論理和が′“0”となった時
点で前記主記憶装置の特定領域をアクセスし、アクセス
の終了とともに自CPUの前記第に番目のロック制御ビ
ットを論理゛0′″にリセットする。また、前記i≠k
であるN−1個のロック制御ビットの論理和がlll1
1テかっt<it (i==0、1,2.−−・、に
−1)である自CPUよリアクセス優先順位が高いk−
1個の他CPUのロック制御ビットの論理和が1”であ
る場合は、自CPUの前記第に番目のロック制御ビット
を、−担論理II O71にリセットした後、自CPU
のロック制御ビットの状態が全ての他CPUに反映した
段階で、再び自CPUの前記第に番目のロック制御ビッ
トを論理゛1″にセットし、前記i#にであるN−1個
の他CPUのロック制御ビットの論理和が110 ′g
となった時点で前記主記憶装置の特定領域をアクセスし
、アクセスの終了とともに自CPUの前記第に番目のロ
ック制御ビットを論理“0”にリセットする。When the CPU N-1) accesses a specific area of the main storage device, it sets the lock control bit of its own CPU to logic 111 PI, and the state of the lock control bit of its own CPU is set to 111 PI. When it is reflected on other CPUs,
i#Jc (i=0.l, 2...., ni-1, ni+
1. ..., N-1), if the logical sum of the lock control bits of N-1 other CPUs is in On, then
A specific area of the main storage device is accessed, and upon completion of the access, the lock control bit of the CPU is reset to logic 'o'''.
- The logical sum of lock control bits of one other CPU is “°1”
k-, which has a higher access priority than its own CPU, which is 1' and has a higher access priority than its own CPU, where
If the logical sum of the lock control bits of one other CPU is OII, then if
(7) When the logical sum of the lock control bits becomes '0', access the specific area of the main storage device, and at the end of the access, set the lock control bit of the own CPU to logic '0'. ″. Also, if the i≠k
The logical sum of N-1 lock control bits is lll1
k-, which has a higher re-access priority than its own CPU, where t<it (i==0, 1, 2.--, ni-1)
If the logical sum of the lock control bits of one other CPU is 1'', the lock control bit of the own CPU is reset to -carrying logic II O71, and then the own CPU
When the state of the lock control bit of the CPU is reflected in all other CPUs, the lock control bit of the CPU is set to logic "1" again, and the state of the lock control bit of the CPU is set to logic "1", and The logical sum of the CPU lock control bits is 110'g
At the point in time, the specific area of the main storage device is accessed, and upon completion of the access, the second lock control bit of the own CPU is reset to logic "0".
これにより、ロック領域である主記憶装置の特定領域の
アクセスは、アクセスを行う各cPUのプロセスが他C
PUのロック制御ビットを参照して他CPtJとの競合
状態を必ず調べた後で行なわれるため、ロック領域アク
セスにおける競合は起こらない。As a result, each cPU process accessing a specific area of the main memory that is a lock area can be accessed by other CPU processes.
Since this is performed after checking the contention state with other CPtJs by referring to the lock control bit of the PU, no contention occurs in accessing the lock area.
以下、本発明の一実施例を図面を用いて説明する。 An embodiment of the present invention will be described below with reference to the drawings.
第2図は1本発明の一実施例の3台のCPUと、この3
台のCPUにより共有される主記憶MSとから構成され
るマルチプロセッサシステムの構成を示した図である。Figure 2 shows three CPUs in one embodiment of the present invention and
1 is a diagram showing the configuration of a multiprocessor system including a main memory MS shared by two CPUs.
第2図において、主記憶MSは、プログラムでアクセス
の可能なプログラム領域と、プログラムではアクセスの
不可能なハードウェア領域とに分割されている。ここで
は3台のCPU0.CPU1、CPU2により互いに参
照、更新可能である前記ハードウェア領域中の共有領域
をアクセスする際のロック制御を伴う主記憶アクセス方
式について説明する。In FIG. 2, main memory MS is divided into a program area that can be accessed by a program and a hardware area that cannot be accessed by a program. Here, three CPU0. A main memory access method involving lock control when accessing a shared area in the hardware area that can be mutually referenced and updated by the CPU1 and CPU2 will be described.
第【図は、本発明の一実施例のマルチプロセッサシステ
ムを構成する3台のCPUのハードウェア構成の要部を
概略的に示した図である。FIG. 1 is a diagram schematically showing the main parts of the hardware configuration of three CPUs configuring a multiprocessor system according to an embodiment of the present invention.
このマルチプロセッサシステムを構成するCPU0.C
PUI、CPU2は、それぞれにロック制御ビット1,
2.3を有し、このロック制御ビット1,2.3が他C
PUから互いに参照が可能なように、各々のCPUが、
信号線101,102.103,104,105,10
6,107゜108で互いに接続されている。この各C
PUに存在するロック制御ビット1.2.3は、自CP
Uでのみセット、リセットの可能なフリップフロップで
あり、各CPUは前記主記憶MSの共有領域のアクセス
を行う際に自CPUのロック制御ビットを論理″゛1″
にセットする。各CPU間を接続している信号線101
,102,103,104は、前記ロック制御ビットの
状態を自CPUより優先順位の低い他CPUへ伝える信
号線であり、自CPUより優先順位の高い他CPUのロ
ック制御ビットのうち、少なくとも1つが論理1419
であれば1″となる信号線である。CPU1を例にとる
と、信号線102はCPU0のロック制御ビット1の値
を反映し、線103には線102とCPU1のロック制
御ビット2の論理和をとった値が反映され、CPU2へ
送られる。また、ここでの信号線101,102.10
3の状態はそれぞれCptJot t、2c7)XPL
OCtl:いうテスト条件に反映する。CPU0. which constitutes this multiprocessor system. C
PUI and CPU2 each have a lock control bit of 1,
2.3, and these lock control bits 1 and 2.3 are
Each CPU has a
Signal lines 101, 102, 103, 104, 105, 10
They are connected to each other at 6,107°108. Each of these C
Lock control bits 1.2.3 present in the PU are
It is a flip-flop that can be set and reset only in U, and each CPU sets its own lock control bit to logic "1" when accessing the shared area of the main memory MS.
Set to . Signal line 101 connecting each CPU
, 102, 103, and 104 are signal lines that transmit the state of the lock control bits to other CPUs having a lower priority than the own CPU, and at least one of the lock control bits of the other CPUs having a higher priority than the own CPU logic 1419
If so, then the signal line is 1". Taking CPU1 as an example, signal line 102 reflects the value of lock control bit 1 of CPU0, and line 103 reflects the logic of line 102 and lock control bit 2 of CPU1. The summed value is reflected and sent to the CPU 2. Also, the signal lines 101, 102.10 here
3 states are respectively CptJot t, 2c7)XPL
OCtl: Reflected in the test conditions.
したがって、XPLOCK=”1”の時は自cpUより
優莞順位の高いCPUの少なくとも1つのロック制御ビ
ットが論理n l 7′であることを示す。Therefore, when XPLOCK="1", it indicates that at least one lock control bit of a CPU having a higher priority than its own CPU is logic n l 7'.
一方、信号線105,106,107,108は、信号
線101,102,103.104とは逆に自CPtJ
よりアクセス優先順位が高いCPUへ、自CPUより優
先順位の低いCPUのロック制御ビットの論理和を、伝
える信号線である。信号線109,110,111の信
号は、それぞれ。On the other hand, the signal lines 105, 106, 107, and 108 are connected to the own CPtJ in contrast to the signal lines 101, 102, 103, and 104.
This is a signal line that transmits the logical sum of the lock control bits of a CPU with a lower priority than its own CPU to a CPU with a higher access priority. The signals on signal lines 109, 110, and 111 are respectively.
信ei101と107.信号線102と106゜信号線
103と105の論理和をとった信号であり、XLOC
Kというテスト条件に反映される。Shinei101 and 107. It is a signal obtained by taking the logical sum of signal lines 102 and 106°, signal lines 103 and 105, and XLOC
This is reflected in the test condition K.
したがって、XLOCK=“I nの時は、他cpUの
少なくとも1つのロック制御ビットが、論理it 1
r+であることを示す。Therefore, when XLOCK="I n", at least one lock control bit of another CPU is set to logic it 1
Indicates that it is r+.
第3図は、本発明の一実施例の各CPUが主記憶MSを
アクセスする場合に行う前記共有領域のアクセス手順を
示したフローチャートである。FIG. 3 is a flowchart showing a procedure for accessing the shared area when each CPU accesses the main memory MS according to an embodiment of the present invention.
各CPUは前記共有領域のアクセスにおいて。Each CPU accesses the shared area.
他CPUに対するロック制御が必要であれば、第3図に
示すようなアクセス手順に従い処理を行う。If lock control for other CPUs is required, processing is performed according to the access procedure shown in FIG.
次に、このアクセス手順の処理を第3図を参照して説明
する。Next, the processing of this access procedure will be explained with reference to FIG.
各CPtJは、主記憶MSのアクセスに先立ち。Each CPtJ prior to accessing the main memory MS.
自CPUのロック制御ビットを論理11177にセット
し、他CPUに対してロック領域のアクセスであること
を宣言する(ステップ100)、次に他CPUとの競合
を調整するために他CPUのロック制御ビットをテスト
し、同期化を計る(ステップ200゜ステップ500)
。ここで他CPUのロック制御ビット状態のテストは自
CPUのロック制御ビットのセット後、自CPUのロッ
ク制御ビットの状態が他の全てのCPUに対して反映さ
れるまで待つ必要がある。これは、複数のCPtJが同
時に自らのロック制御ビットをセットシた場合でも前記
テストを行う段階で必ず互いのロック制御ビットの状態
をテストに反映させ、CPU間の優先順位がとれるよう
にするためである。Set the lock control bit of the own CPU to logic 11177 and declare to other CPUs that the lock area is being accessed (step 100). Next, set the lock control bit of the other CPU to adjust the contention with other CPUs. Test bits and synchronize (step 200°, step 500)
. Here, to test the lock control bit state of another CPU, it is necessary to wait after setting the lock control bit of the own CPU until the state of the lock control bit of the own CPU is reflected to all other CPUs. This is to ensure that even if multiple CPtJs set their own lock control bits at the same time, the states of each other's lock control bits are always reflected in the test at the stage of performing the test, and priority order among CPUs can be maintained. be.
前記テストの結果、他CPUのロック制御ビットが全て
論理“′0′″(XLOCK=″’O”)であれば(ス
テップ200)、他CPUは主記憶MSのアクセスに対
してロックをかけていない状態なので、処理はステップ
300の主記憶MSのアクセスに進む。As a result of the above test, if all the lock control bits of the other CPUs are logic "'0'"(XLOCK="'O") (step 200), the other CPUs have locked access to the main memory MS. Since there is no memory, the process proceeds to step 300 to access the main memory MS.
逆に、他CPUのロック制御ビットのうち少なくとも1
つが論理パビ’(XLOCK=”ビ)であれば(ステッ
プ200)、処理はステップ500のテスト(XPLO
CK=”l”)に進む。このステップ5ooノテストは
、自CPUによりアクセス優先順位の高い他CPUのロ
ック制御ビットの状態をテストするもので、テストの結
果、自cPUより優先順位が高い他CPUのロック制御
ビットが全て論理110 H(XPLOCK=”O”)
であれば、処理は再びステップ200のテストに移る。Conversely, at least one of the lock control bits of other CPUs
If the logical pabi'(XLOCK="bi") (step 200), processing continues with the test (XPLO
Proceed to CK="l"). This step 5oo test is to test the state of the lock control bits of other CPUs with higher access priority by the own CPU, and as a result of the test, all the lock control bits of other CPUs with higher priority than the own CPU are logic 110H. (XPLOCK="O")
If so, the process returns to step 200 for testing.
このとき、ロック制御ビットを論理111 gHにして
アクセス宣言した自CPUの優先順位が一番高いときで
あり、しかも、優先順位の低い他CPUが主記憶MSの
アクセスを行っている状態であり、ステップ200.ス
テップ500のテストを繰り返し行い、このとき主記憶
MSのアクセスを行っている優先順位の低い他CPUの
主記憶MSアクセスの完了により、アクセス権が開放さ
れるのを待つ。自CPUよりアクセス優先順位の高い他
CPUのロック制御ビットのうち。At this time, the priority of the own CPU that declared access by setting the lock control bit to logic 111 gH is the highest, and another CPU with a lower priority is accessing the main memory MS, Step 200. The test in step 500 is repeated and waits for the access right to be released upon completion of the access to the main memory MS by another CPU with a lower priority that is currently accessing the main memory MS. Among the lock control bits of other CPUs that have higher access priority than the own CPU.
少なくとも1つが論理”1”(XPLOCK=”ビ′)
であれば、処理はステップ600に進む。ステップ60
0では、自CPUのロック制御ビットを論理“0゛′に
リセットして、他CPUに対して主記憶MSのアクセス
宣言を一担を開放し、自CPUのロック制御ビットの状
態が他の全てのCPUに対して反映されるまでの所定時
間を待った後、再びステップ100の処理に戻り、自C
PtJのロック制御ビットを論理ビ′にセットし、他C
PUに対してロック領域のアクセスであることを宣言し
て、ロック制御の処理を行なう。このようにして、他C
PUとのアクセスの競合の調整をとる。At least one is logic “1” (XPLOCK=”BI’)
If so, processing proceeds to step 600. Step 60
0, the lock control bit of the own CPU is reset to logic "0'', releasing the access declaration of the main memory MS to other CPUs, and the state of the lock control bit of the own CPU is After waiting a predetermined time for it to be reflected on the current CPU, the process returns to step 100 and the current CPU
Set the lock control bit of PtJ to logic bit ', and
It declares to the PU that it is a lock area access and performs lock control processing. In this way, other C
Coordinates access contention with the PU.
また、最終的に主記憶MSのアクセスの完了後はステッ
プ400の処理において、自CPtJのロック制御ビッ
トを論理““0”にリセットすることで、他CPUに対
して主記憶MSのアクセス権を開放してロック制御処理
の状態を抜ける。Furthermore, after the access to the main memory MS is finally completed, in the process of step 400, the lock control bit of the own CPtJ is reset to logic "0", thereby granting access rights to the main memory MS to other CPUs. Release and exit the lock control processing state.
本実施例では、CPUが3台の場合について述べている
が1本発明では、各CPUがロック制御ビットをもち、
しかもロック制御論理の処理は各CPUが独立に行って
いるので、CPUが3台以上の場合においても同様にそ
の実現が可能であることは容易に理解されよう。In this embodiment, the case where there are three CPUs is described, but in the present invention, each CPU has a lock control bit,
Furthermore, since the lock control logic is processed independently by each CPU, it will be easily understood that the same implementation is possible even when there are three or more CPUs.
以上、本発明を実施例に基づき具体的に、説明したが、
本発明は、前記実施例に限定されるものではなく、その
要旨を逸脱しない範囲において、種々変形し得ることは
勿論である。The present invention has been specifically explained above based on examples, but
It goes without saying that the present invention is not limited to the embodiments described above, and can be modified in various ways without departing from the gist thereof.
以上、説明したように、本発明によれば、複数のCPU
間で共有するロックフラグを実装したハードウェアを必
要とすることなく、ロック制御が容易に実現できる。ま
た、このロック制御は、各CP シI、が自CPUでの
みセット、リセット可能なロック制御ビットを持ち、自
CPUのみのロック制御論理で行うことができ、しかも
各CPUに分散したロック制御論理が共通であるため、
同−CPUを複数個組合せるだけで、マルチプロセッサ
システムの構成が容易にできる。As explained above, according to the present invention, a plurality of CPUs
Lock control can be easily implemented without requiring hardware that implements lock flags shared between devices. In addition, each CPU has a lock control bit that can be set and reset only by its own CPU, and this lock control can be performed by the lock control logic of only its own CPU, and the lock control logic is distributed among each CPU. is common, so
A multiprocessor system can be easily configured by simply combining multiple CPUs of the same type.
第1図は、本発明の一実施例のマルチプロセッサシステ
ムを構成する3台のCPUのハードウェア構成の要部を
概略的に示した回路図、第2図は、本発明の一実施例の
3台のcpuと。
3台のCPUにより共有される主記憶MSとから構成さ
れるマルチプロセッサシステムの構成を示したブロック
図、
第3図は、本発明の一実施例の各CPUにおける主記憶
アクセス手順を示すフローチャートである。
図中、l、2.3・・・ロック制御ビット、4〜12・
・・オアゲート、101〜110・・・信号線である。
代理人 弁理士 小川勝馬 、−1L、)゛・、−一FIG. 1 is a circuit diagram schematically showing the main parts of the hardware configuration of three CPUs constituting a multiprocessor system according to an embodiment of the present invention, and FIG. With 3 CPUs. FIG. 3 is a block diagram showing the configuration of a multiprocessor system consisting of a main memory MS shared by three CPUs. FIG. be. In the figure, l, 2.3...Lock control bit, 4-12.
...OR gate, 101-110...Signal line. Agent: Patent attorney Katsuma Ogawa, -1L,)゛・,-1
Claims (1)
る主記憶装置とからなるマルチプロセッサシステムにお
いて、自処理装置によってのみセット、リセット可能で
、かつ他処理装置により参照可能な識別子を前記処理装
置単位にそれぞれ有し、第k番目(k=0、1、2、・
・・、N−1)の処理装置が前記主記憶装置の特定領域
をアクセスする際には、自処理装置の識別子である第k
番目の識別子を論理“1”にセットし、自処理装置の識
別子の状態が全ての他処理装置に反映した段階で、i≠
k(i=0、1、2、・・・、k−1、k+1・・・、
N−1)であるN−1個の他処理装置の識別子の論理和
が“0”である場合は、前記主記憶装置の特定領域をア
クセスし、アクセスの終了とともに自処理装置の前記第
k番目の識別子を論理“0”にリセットし、前記i≠k
であるN−1個の他処理装置の識別子の論理和が“1”
でかつi<k(i=0、1、2、・・・、k−1)であ
る自処理装置よりアクセス優先度が高いk−1個の他処
理装置の識別子の論理和が“0”である場合は、前記i
≠kであるN−1個の他処理装置の識別子の論理和が“
0”となった時点で前記主記憶装置の特定領域をアクセ
スし、アクセスの終了とともに自処理装置の前記第k番
目の識別子を論理“0”にリセットし、前記i≠kであ
るN−1個の識別子の論理和が“1”でかつ1<k(1
=0、1、2、・・・、k−1)である自処理装置より
アクセス優先度が高いk−1個の他処理装置の識別子の
論理和が“1”である場合は、自処理装置の前記第k番
目の識別子を一担論理“0”にリセットした後、自処理
装置の識別子の状態が全ての他処理装置に反映した段階
で、再び自処理装置の前記第k番目の識別子を論理“1
”にセットし、前記i≠kであるN−1個の他処理装置
の識別子の論理和が“0”となった時点で前記主記憶装
置の特定領域をアクセスし、アクセスの終了とともに自
処理装置の前記第k番目の識別子を論理“0”にリセッ
トすることを特徴とする主記憶アクセス方式。1. In a multiprocessor system consisting of N processing units and a main memory shared by the N processing units, an identifier that can be set and reset only by the own processing unit and that can be referenced by other processing units is provided. The k-th (k=0, 1, 2, . . .
. . , N-1) when accessing a specific area of the main storage device, the
When the th identifier is set to logic "1" and the state of the identifier of the own processing device is reflected in all other processing devices, i≠
k (i=0, 1, 2,..., k-1, k+1...,
If the logical sum of the identifiers of N-1 other processing devices (N-1) is "0", the specified area of the main storage device is accessed, and upon completion of the access, the k-th processing device of the own processing device is accessed. the i≠k
The logical sum of the identifiers of N-1 other processing devices is “1”
and i<k (i=0, 1, 2, ..., k-1), and the logical sum of the identifiers of k-1 other processing devices that have higher access priority than the own processing device is "0" , the above i
The logical sum of the identifiers of N-1 other processing devices where ≠k is “
0'', the specific area of the main storage device is accessed, and upon completion of the access, the k-th identifier of the own processing device is reset to logical ``0'', and the N-1 where i≠k is The logical sum of these identifiers is “1” and 1<k(1
= 0, 1, 2, ..., k-1) If the logical sum of the identifiers of k-1 other processing devices that have higher access priority than the own processing device is "1", the self-processing After resetting the k-th identifier of the device to one-way logic "0", when the state of the identifier of the own processing device is reflected in all other processing devices, the k-th identifier of the own processing device is reset again. The logic “1”
”, and when the logical sum of the identifiers of N-1 other processing devices where i≠k becomes “0”, the specific area of the main storage device is accessed, and when the access is completed, the own processing A main memory access method characterized in that the k-th identifier of the device is reset to logic "0".
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP6101087A JPS63228367A (en) | 1987-03-18 | 1987-03-18 | Main memory access method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP6101087A JPS63228367A (en) | 1987-03-18 | 1987-03-18 | Main memory access method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS63228367A true JPS63228367A (en) | 1988-09-22 |
| JPH0542027B2 JPH0542027B2 (en) | 1993-06-25 |
Family
ID=13158933
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP6101087A Granted JPS63228367A (en) | 1987-03-18 | 1987-03-18 | Main memory access method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS63228367A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0424862A (en) * | 1990-05-18 | 1992-01-28 | Nec Corp | Inter-processor fault detection system |
| JP2009140217A (en) * | 2007-12-06 | 2009-06-25 | Miura Co Ltd | Cooperative control method |
-
1987
- 1987-03-18 JP JP6101087A patent/JPS63228367A/en active Granted
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0424862A (en) * | 1990-05-18 | 1992-01-28 | Nec Corp | Inter-processor fault detection system |
| JP2009140217A (en) * | 2007-12-06 | 2009-06-25 | Miura Co Ltd | Cooperative control method |
Also Published As
| Publication number | Publication date |
|---|---|
| JPH0542027B2 (en) | 1993-06-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7506339B2 (en) | High performance synchronization of accesses by threads to shared resources | |
| US5524247A (en) | System for scheduling programming units to a resource based on status variables indicating a lock or lock-wait state thereof | |
| US6029190A (en) | Read lock and write lock management system based upon mutex and semaphore availability | |
| JP2511588B2 (en) | Data processing network, method for acquiring lock and serialization device | |
| US6047316A (en) | Multiprocessor computing apparatus having spin lock fairness | |
| EP0145889B1 (en) | Non-spinning task locking using compare and swap | |
| US6112222A (en) | Method for resource lock/unlock capability in multithreaded computer environment | |
| US6792497B1 (en) | System and method for hardware assisted spinlock | |
| US5893157A (en) | Blocking symbol control in a computer system to serialize accessing a data resource by simultaneous processor requests | |
| JPH07101410B2 (en) | Method for synchronizing instruction stream execution for testing serialization means in a data processing network | |
| JP2010003315A (en) | Data processing apparatus and method for controlling access to shared resource | |
| JPH0324696B2 (en) | ||
| CN113934516B (en) | A lock management method, device and equipment | |
| US20030126187A1 (en) | Apparatus and method for synchronization in a multi-thread system of JAVA virtual machine | |
| US6105050A (en) | System for resource lock/unlock capability in multithreaded computer environment | |
| JP4457047B2 (en) | Multiprocessor system | |
| CN112306703B (en) | A critical section execution method and device in a NUMA system | |
| JPS63228367A (en) | Main memory access method | |
| US7099974B2 (en) | Method, apparatus, and system for reducing resource contention in multiprocessor systems | |
| US6701429B1 (en) | System and method of start-up in efficient way for multi-processor systems based on returned identification information read from pre-determined memory location | |
| JP2014182507A (en) | Computer, exclusive control method, and exclusive control program | |
| US6981108B1 (en) | Method for locking shared resources connected by a PCI bus | |
| US20260104948A1 (en) | Multi-Thread Concurrency Management Method and Related Apparatus | |
| CN112306698A (en) | Critical region execution method and device in NUMA system | |
| JPS6336545B2 (en) |