JPH044441A - System for exclusively controlling memory - Google Patents

System for exclusively controlling memory

Info

Publication number
JPH044441A
JPH044441A JP10540990A JP10540990A JPH044441A JP H044441 A JPH044441 A JP H044441A JP 10540990 A JP10540990 A JP 10540990A JP 10540990 A JP10540990 A JP 10540990A JP H044441 A JPH044441 A JP H044441A
Authority
JP
Japan
Prior art keywords
exclusive
memory device
flag
processor
request
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
JP10540990A
Other languages
Japanese (ja)
Inventor
Takashi Aihara
相原 敬
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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP10540990A priority Critical patent/JPH044441A/en
Publication of JPH044441A publication Critical patent/JPH044441A/en
Pending legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)

Abstract

PURPOSE:To avoid a conflict between exclusive requests by reading out the content of a flag and, when the content is 'used', canceling an exclusive request without rewriting the content of the flag. CONSTITUTION:When a processor 1(2) makes flag rewriting operation, the content of the flag is read out and whether the content is 'used' or 'not used' is confirmed. When the content is 'used', a process which cancels an exclusive request must be made instead of rewriting the content of the flag. Accordingly, a conflict between exclusive requests can be avoided, because a new exclusive request accepted by a memory device while another processor 2 (1) makes flag rewriting operation is eliminated by the processor which has issued the new request. Therefore, excellent control which avoids a conflict between exclusive requests can be performed even when rewriting operation is made on a flag incorporated in a memory device 3 or 4.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、複数のプロセッサを備えてマルチタスク処理
を実行する情報処理システムにおいて、複数のプロセッ
サが同一の時期に同一のメモリ装置を使おうとした場合
に、排他要求を通知した特定のプロセッサにそのメモリ
装置の排他的使用を許可するメモリ排他制御方式に関す
るものである。
[Detailed Description of the Invention] [Industrial Application Field] The present invention is an information processing system that includes a plurality of processors and executes multitask processing, in which the plurality of processors try to use the same memory device at the same time. The present invention relates to a memory exclusive control method that allows a specific processor that has notified an exclusive request to exclusively use the memory device when a specific processor receives an exclusive request.

[従来の技術1 マルチタスク処理を実行する情報処理システムでは、複
数のタスクがシステム上の同一のメモリ装置を同時に使
おうとする競合状態が生じるが、このような競合時にお
けるメモリの制御方法として、セマフォ・フラグを利用
する方法が、広く知られている。
[Prior Art 1] In an information processing system that executes multi-task processing, a conflict situation occurs in which multiple tasks try to use the same memory device on the system at the same time.As a memory control method in such a conflict, there is a A widely known method is to use semaphore flags.

この方法は、例えば、一つのメモリ装置が複数のタスク
で共有される場合に、そのメモリ装置には、該メモリ装
置が゛空き”′であるか既に“使用中“であるかを表示
するフラグ(セマフォ・フラグ)を用意しておき、最先
に使用要求を出したタスクが使用を終了するまでは、フ
ラグを“使用中″にしておくことで、競合する以後のタ
スクの使用要求を排除するものである。
For example, when one memory device is shared by multiple tasks, this method includes a flag that indicates whether the memory device is ``free'' or already ``in use.'' By preparing a semaphore flag (semaphore flag) and keeping the flag "in use" until the task that first made the usage request finishes using it, conflicting usage requests from subsequent tasks are eliminated. It is something to do.

この方法を採用した場合、最先のタスクが使用要求をメ
モリ装置に通知して、フラグの内容を“空き“′から“
使用中′”に書き替えるまでのフラグ書き替え操作中は
、他のタスクによる同一フラグの書き替え操作を禁止し
なければならない。
When this method is adopted, the first task notifies the memory device of the usage request and changes the contents of the flag from “empty” to “”.
While the flag is being rewritten until it is rewritten to 'in use', it is necessary to prohibit other tasks from rewriting the same flag.

さもなくば、両タスク共そのメモリ装置が゛空き”°で
あると誤認してしまうからである。
Otherwise, both tasks will mistakenly believe that the memory device is "free".

このような問題は、情報処理システムがシングルプロセ
ッサシステムであれば、フラグ書き替え操作中にタスク
切替えを伴なう割込みを禁止すればよいが、マルチプロ
セッサシステムでは、さらにフラグ書き替え操作中の他
プロセツサによる同一フラグ書き替え操作をも禁止する
必要があり、これまで、マルチプロセッサシステム用と
して、フラグ書き替え操作中には、そのフラグ書き替え
操作を実行しているプロセッサにバスを占有させるとい
う対応策が開発されている。
If the information processing system is a single-processor system, interrupts that involve task switching during a flag rewriting operation can be prohibited, but in a multiprocessor system, interrupts that involve task switching during a flag rewriting operation can be prevented. It is also necessary to prohibit processors from rewriting the same flag, and the conventional approach for multiprocessor systems is to have the processor executing the flag rewrite operation occupy the bus during the flag rewrite operation. measures have been developed.

しかし、この対応策によれば、確かに他のプロセッサの
同一フラグ書き替え操作は排他できるが、バス上のすべ
ての通信に対して排他効果が及ぶため、システムの処理
効率が著しく低下するという問題があった。
However, although this countermeasure does exclude operations that rewrite the same flag in other processors, the problem is that the exclusion effect applies to all communications on the bus, resulting in a significant drop in system processing efficiency. was there.

そこで、従来では、これを改良したものとして、次の様
な方式が提案されている。 それは、あるプロセッサが
フラグ書き替え操作を行っている間は、バスを占有させ
るのではなく、そのフラグのあるメモリ装置を占有させ
るという方式である。
Therefore, conventionally, the following method has been proposed as an improvement on this. This is a method in which, while a certain processor is performing a flag rewriting operation, the memory device containing the flag is occupied instead of occupying the bus.

このような方式の場合は、−のプロセッサから排他要求
を受けたら、他のプロセッサの命令を全て排除する機構
をメモリ装置内に設け、メモリ装置は最初に排他要求を
出したプロセッサを記憶し、以後そのプロセッサが排他
要求を解除するまで、他のプロセッサからの自己のメモ
リ装置へのアクセスを全て受付けないようにしている。
In such a system, a mechanism is provided in the memory device to exclude all instructions from other processors when an exclusive request is received from the - processor, and the memory device stores the processor that first issued the exclusive request. Thereafter, the processor does not accept any access to its own memory device from other processors until that processor releases the exclusive request.

[発明か解決しようとする課題」 しかし、この従来方式も、フラグ書き替え操作中には、
そのメモリ装置−台が完全に一つのプロセッサに占有さ
れてしまうため、処理効率の低下が少なくなく、メモリ
半導体デバイスの集積化の著しい今日では、満足のゆく
解決策とはいえず、さらにシステムの処理効率への影響
が少ない新規なメモリ制御方法の開発が待たれていた。
[Invention or Problem to be Solved] However, even with this conventional method, during the flag rewriting operation,
Since the memory device is completely occupied by one processor, processing efficiency is often reduced, and in today's era of rapid integration of memory semiconductor devices, this is not a satisfactory solution, and furthermore, it is not a satisfactory solution. The development of a new memory control method that has less impact on processing efficiency has been awaited.

本発明は、前記事情に鑑みてなされたもので、複数のプ
ロセッサを備えてマルチタスク処理を実行する情報処理
システムにおいて、複数のプロセッサが同一の時期に同
一のメモリ装置を使おうとした場合に、排他要求を通知
した特定のプロセッサにそのメモリ装置の排他的使用を
許可するメモリ排他制御方式であって、メモリバスやメ
モリ装置の占有によるシステムの処理効率の低下を低減
させることのできるメモリ排他制御方式を提供すること
を目的とする。
The present invention has been made in view of the above circumstances, and in an information processing system that includes a plurality of processors and executes multitask processing, when a plurality of processors try to use the same memory device at the same time, Memory exclusive control is a memory exclusive control method that allows a specific processor that has notified an exclusive request to use the memory device exclusively, and is capable of reducing a decrease in system processing efficiency due to monopolization of the memory bus or memory device. The purpose is to provide a method.

[課題を解決するための手段] 本発明に係るメモリ排他制御方式は、複数のプロセッサ
を備えてマルチタスク処理を実行する情報処理シス引ム
において、複数のプロセッサが同一の時期に同一のメモ
リ装置を使おうとした場合に、排他要求を通知した特定
のプロセッサにそのメモリ装置の排他的使用を許可する
ものである。
[Means for Solving the Problems] A memory exclusive control method according to the present invention provides an information processing system that includes a plurality of processors and executes multitask processing, in which the plurality of processors access the same memory device at the same time. , the specific processor that has notified the exclusive request is granted exclusive use of the memory device.

具体的には、前記メモリ装置には、プロセッサからの排
他要求に対して一定の処理を行う排他制御回路が設けら
れる。
Specifically, the memory device is provided with an exclusive control circuit that performs certain processing in response to an exclusive request from a processor.

そして、この排他制御回路は、既に排他動作中で新たな
排他要求を受けることのできない“使用中″の状態にあ
るのか、あるいは、新たな排他要求を受けることのでき
る“空き′”の状態にあるのかをフラグで表示する。
Then, is this exclusive control circuit already in an "in use" state where it is already in exclusive operation and cannot receive new exclusive requests, or is it in an "empty" state where it can receive new exclusive requests? A flag indicates whether it exists.

また、前記排他制御回路は、新たな排他要求を受けた時
に前記フラグがパ使用中′”であればその排他要求を出
したプロセッサに異常受付を通知し、前記フラグが“空
き”であればその排他要求を出したプロセッサに正常受
付を通知する構成とされている。
Further, when the exclusive control circuit receives a new exclusive request, if the flag is set to ``busy'', the exclusive control circuit notifies the processor that issued the exclusive request of an abnormal acceptance, and if the flag is ``empty'' The configuration is such that the processor that issued the exclusive request is notified of normal acceptance.

一方、前記メモリ装置を共有する各プロセッサには、排
他要求を前記メモリ装置に通知した場合における排他制
御処理として、次の、処理(i)〜(iii )を行わ
せる。
On the other hand, each processor sharing the memory device is caused to perform the following processes (i) to (iii) as exclusive control processing when an exclusive request is notified to the memory device.

(1)まず、前記排他制御回路が正常受付をするか異常
受付をするかを監視させ、異常受付である場合にはメモ
リ装置へのアクセスを当初からやり直しさせる。
(1) First, the exclusive control circuit monitors whether the reception is normal or abnormal, and if the reception is abnormal, the access to the memory device is restarted from the beginning.

(ii )正常受付である場合には、前記フラグの内容
を読み出して“使用中“′か″空き“かを確認させ、使
用中であった場合には排他要求の解除を行った後にメモ
リ装置へのアクセスを当初からやり直しさせる。
(ii) If the reception is normal, read the contents of the flag and check whether it is "in use" or "free", and if it is in use, release the exclusive request and then use the memory device. Retry access from the beginning.

(iii )一方、パ空き′°であった場合には、前記
メモリ装置の排他制御回路に排他動作をさせるために、
前記フラグの内容の書き換え処理を実行させ、書き換え
処理が終了したら排他要求の解除をメモリ装置に通知さ
せる。
(iii) On the other hand, if the memory device is empty, in order to cause the exclusive control circuit of the memory device to perform an exclusive operation,
A process of rewriting the contents of the flag is executed, and when the rewrite process is completed, the memory device is notified of cancellation of the exclusive request.

そして、以上のプロセッサとメモリ装置とによって、プ
ロセッサからメモリ装置へのアクセスが排他要求を伴わ
ない種類のものであるときには、前記メモリ装置のフラ
グがパ使用中”であっても、正常受付をして、そのアク
セスを遂行させる。
With the above-mentioned processor and memory device, if the access from the processor to the memory device is of a type that does not involve an exclusive request, the access will be normally accepted even if the flag of the memory device is "Paper in use". and perform the access.

[作用] 本発明に係るメモリ排他制御方式は、メモリ装置にフラ
グを装備して、このフラグの表示内容が“使用中”°で
あるか“′空き″かによって、当該メモリ装置が既に排
他動作中であるか否かを示すこととしており、前記フラ
グの表示内容がパ使用中”であるとき、即ち、既に排他
動作中であるときにプロセッサから排他要求を受けた場
合には、メモリ装置から排他要求を出したプロセッサに
異常受付を通知することによ−って排他要求の競合を回
避する。
[Operation] The memory exclusive control method according to the present invention equips a memory device with a flag, and depending on whether the display content of this flag is “in use” or “empty”, it is determined whether the memory device is already in exclusive operation. When the display content of the flag is "in use", that is, when an exclusive request is received from the processor while the exclusive operation is already in progress, the memory device Conflicts between exclusive requests are avoided by notifying the processor that issued the exclusive request of abnormal reception.

また、メモリ装置のフラグが′空き′”であるとき、即
ち、未だ排他動作中ではないときにプロセ、ソサから新
たに排他要求を受けた場合には、その新たな排他要求が
メモリ装置に受は付けられて、その排他要求を出したプ
ロセッサによ゛ってフラグ書き替え操作がなされること
になるが、この場合には、既にそれ以前に排他要求を出
した他のプロセッサがフラグ書き替え操作中である場合
がある。
Furthermore, when the flag of the memory device is ``empty'', that is, when a new exclusive request is received from a processor or source when the exclusive operation is not yet in progress, the new exclusive request is accepted by the memory device. is attached, and the flag rewriting operation is performed by the processor that issued the exclusive request, but in this case, another processor that issued the exclusive request before that has already rewritten the flag. It may be in operation.

しかし、この発明に係るメモリ排他制御方式では、プロ
セッサによるフラグ書き替え操作時には、−8= フラグの内容を読み出して、その内容が“使用中°′で
あるか“空き″であるかを確認して、“使用中″である
場合にはフラグの内容の書き換えを行わずに排他要求を
解除する処理を必須としているため、他のプロセッサが
フラグ書き替え操作中にメモリ装置に受は付けられた新
たな排他要求は、新たな排他要求を出したプロセッサ自
体の処理で排除して、競合を回避することができる。
However, in the memory exclusive control method according to the present invention, when the processor performs a flag rewriting operation, the content of the -8= flag is read and it is checked whether the content is "in use" or "free". If the flag is "in use", it is mandatory to release the exclusive request without rewriting the contents of the flag, so if the memory device is not being accepted while another processor is rewriting the flag. Conflicts can be avoided by eliminating new exclusive requests through the processing of the processor itself that issued the new exclusive requests.

従って、本発明にかかるメモリ排他制御方式では、メモ
リ装置の排他動作中だけでなく、メモリ装置に装備され
たフラグ書き替え操作中であっても、排他要求の競合を
回避する良好な制御をなし得る。
Therefore, the memory exclusive control method according to the present invention provides good control to avoid conflicts between exclusive requests not only during the exclusive operation of the memory device but also during the rewriting operation of the flag installed in the memory device. obtain.

しかも、本発明に係るメモリ排他制御方式は、プロセッ
サ自体の処理あるいはメモリ装置のフラグによって排他
制御を行うものであるため、メモリバスを占有させずに
排他制御を行うことができ、さらに、排他動作中および
フラグ書き替え操作中であっても、他のプロセッサから
メモリ装置へのアクセスが排他要求を伴わない種類のも
のであるときには、そのアクセスを正常受付して遂行さ
せることができるため、従来のメモリ排他制御方式と比
較すると、メモリバスやメモリ装置の占有によるシステ
ムの処理効率の低下を大幅に低減させることができる。
Moreover, since the memory exclusive control method according to the present invention performs exclusive control using the processing of the processor itself or the flag of the memory device, exclusive control can be performed without occupying the memory bus. Even during a flag rewrite operation, if the access from another processor to the memory device does not involve an exclusive request, the access can be normally accepted and executed. Compared to the memory exclusive control method, it is possible to significantly reduce the decrease in system processing efficiency due to the occupancy of the memory bus or memory device.

[実施例] 第2図は、本発明の一実施例を実行する情報処理システ
ムの装置構成を示したものである。
[Embodiment] FIG. 2 shows the device configuration of an information processing system that implements an embodiment of the present invention.

この情報処理システムは、複数のプロセッサを備えてマ
ルチタスク処理を実行するもので、符号比 2はプロセ
ッサ(CPU)、3.4はメモリ装置(MEM)である
This information processing system is equipped with a plurality of processors and executes multitask processing, with a code ratio of 2 being a processor (CPU) and a code ratio of 3.4 being a memory device (MEM).

そして、メモリ装置3,4は、前述の二つのプロセッサ
1,2によって共有されているもので、これらのメモリ
装置とプロセッサとの間は、各種のバス線7で接続され
ている。
The memory devices 3 and 4 are shared by the two processors 1 and 2, and these memory devices and the processors are connected by various bus lines 7.

ここに、バス線7は、アドレス・データ線(AD線)8
、タグ線(TAG線)9、ステータス線(STS線)1
01及び図示されないその他のバス線等で構成されてい
る。
Here, the bus line 7 is connected to the address/data line (AD line) 8.
, tag line (TAG line) 9, status line (STS line) 1
01 and other bus lines (not shown).

前記アドレス・データ線8は、プロセッサ1゜2がメモ
リ装置3,4をアクセスする時にアドレス及びデータを
マルチプレクスして送出する信号線である。
The address/data line 8 is a signal line through which addresses and data are multiplexed and sent when the processor 1-2 accesses the memory devices 3, 4.

タグ線9は、メモリアクセスの種別を表示する信号線で
、リード、ライト、′排他要求等の各種の命令や、リー
ド応答の通知等に使用される。
The tag line 9 is a signal line that indicates the type of memory access, and is used for various commands such as read, write, and exclusive requests, and for notification of read responses.

ステータス線10は、プロセッサ1,2からメモリ装置
3またはメモリ装置4にアクセスがあった場合に、メモ
リ装置3またはメモリ装置4がメモリアクセスをしたプ
ロセッサに対して、「正常受付」又は「異常受付」の応
答信号を通知するためのものである。
When the memory device 3 or the memory device 4 is accessed from the processors 1 or 2, the status line 10 indicates whether the memory device 3 or the memory device 4 has accessed the processor as “normal reception” or “abnormal reception”. ” response signal.

この一実施例のメモリ排他制御方式は、第2図の情報処
理システムにおいて、プロセッサ1,2が同一の時期に
同一のメモリ装置3(またはメモリ装置4)を使おうと
した場合に、排他要求を通知した一方のプロセッサにそ
のメモリ装置3(またはメモリ装置4)の排他的使用を
許可するもので、メモリ装置3,4および各プロセッサ
1,2にはその排他制御のための工夫がなされている。
The memory exclusive control method of this embodiment makes an exclusive request when processors 1 and 2 try to use the same memory device 3 (or memory device 4) at the same time in the information processing system shown in FIG. This allows one of the processors that has notified to use the memory device 3 (or memory device 4) exclusively, and the memory devices 3 and 4 and each processor 1 and 2 are devised for exclusive control. .

以下に、これらの工夫した構成、およびその作用・効果
を詳述する。
Below, these devised configurations and their functions and effects will be explained in detail.

前記メモリ装置3,4には、プロセッサ1または2から
の排他要求に対して一定の処理を行う排他制御回路5が
設けられおり、この排他制御回路5には、前述の各バス
線8,9.10が接続されている。
The memory devices 3 and 4 are provided with an exclusive control circuit 5 that performs certain processing in response to an exclusive request from the processor 1 or 2. .10 is connected.

前記排他制御回路5は、自己のメモリ装置が既に排他動
作中で新たな排他要求を受けることのできない゛使用中
′”の状態にあるのか、あるいは、新たな排他要求を受
けることのできる“′空き”の状態にあるのかをフラグ
(セマフォ・フラグ)で表示する。
The exclusive control circuit 5 determines whether its own memory device is already in an exclusive operation and is in the "in use" state where it cannot receive a new exclusion request, or whether it is in the "in use" state where it can receive a new exclusion request. A flag (semaphore flag) indicates whether the memory is in a free state.

第2図において、符号6は、このフラグとして機能する
排他動作表示用フリップフロップを示したもので、この
フリップフロップ6は、システムリセット時にリセット
される。
In FIG. 2, reference numeral 6 indicates an exclusive operation display flip-flop that functions as this flag, and this flip-flop 6 is reset when the system is reset.

また、前記排他制御回路5は、システム動作中において
前述のバス7上の通信を監視していて、タグ線9上に排
他要求の表示があり、かつ、アドレス・データ線8上の
メモリアドレスが自己のメモリ装置内のものである場合
には、自己のメモリ装置への排他要求としてこれを受は
付ける。そして、新たな排他要求を受けた時に、既にフ
リップフロップ6によるフラグが゛使用中゛であれば、
その排他要求を出したプロセッサに異常受付を通知し、
前記フラグが“空き′であればその排他要求を出したプ
ロセッサに正常受付を通知する。
Further, the exclusive control circuit 5 monitors the communication on the bus 7 mentioned above during system operation, and there is an indication of an exclusive request on the tag line 9, and the memory address on the address/data line 8 is If it is in the own memory device, this is accepted as an exclusive request to the own memory device. Then, when a new exclusive request is received, if the flag set by flip-flop 6 is already in use,
Notifies the processor that issued the exclusive request of the abnormal reception,
If the flag is "vacant", the processor that issued the exclusive request is notified of normal acceptance.

排他要求を正常受付した場合には、その排他要求を出し
たプロセッサによって、フラグ書き替え操作がなされて
、フラグの表示がパ使用中パにセットされ、また、その
プロセッサからの排他解除により、フラグの表示がリセ
ットされる。
If the exclusive request is successfully accepted, the flag is rewritten by the processor that issued the exclusive request, and the flag display is set to Pa in use. The display will be reset.

メモリ装置3,4は、フリップフロップ6によるフラグ
がパ使用中゛の表示の場合には、新たな排他要求に対し
ては、前記ステータス線10に異常受付を出力すること
によって、受付をしないが、排他要求を、伴わない一般
のアクセスは受は付けて、所定の応答を行う。
When the flag by the flip-flop 6 indicates that the memory device is in use, the memory devices 3 and 4 do not accept a new exclusive request by outputting an abnormal acceptance to the status line 10. , general accesses that are not accompanied by exclusive requests are accepted and a predetermined response is made.

一方、前述の各プロセッサは、排他要求を前記メモリ装
置3(またはメモリ装置4)に通知する場合には、第1
図に示す排他制御処理を実行する。
On the other hand, when each of the aforementioned processors notifies the memory device 3 (or memory device 4) of an exclusive request, the first
Execute the exclusive control process shown in the figure.

即ち、まず、プロセッサは、(1)排他要求とフラグア
ドレスとをメモリ装置に通知して、(ii)通知したフ
ラグアドレスに対応するメモリ装置のステータス線10
の応答信号をチエツクし、異常受付を検出した場合(即
ち、そのメモリ装置が既に排他動作中である場合)には
、前記(i)、(ii)の処理を再度繰返す(ステップ
11)。
That is, first, the processor (1) notifies the memory device of an exclusive request and a flag address, and (ii) changes the status line 10 of the memory device corresponding to the notified flag address.
If an abnormal reception is detected (that is, if the memory device is already in exclusive operation), the processes (i) and (ii) are repeated (step 11).

そして、ステータス線10の応答信号のチエツクで、正
常受付を検出した場合(即ち、そのメモリ装置が未だ排
他動作中でない場合)には、プロセッサは、通知したフ
ラグアドレスに対するフラグデータのり゛−ド要求を行
う(ステップ12)。
If a normal reception is detected by checking the response signal on the status line 10 (that is, if the memory device is not yet in exclusive operation), the processor issues a flag data transfer request to the notified flag address. (Step 12).

そして、メモリ装置がリード要求に対する応答とフラグ
データとをプロセッサに返すと(ステップ13)、プロ
セッサは、そのフラグデータから前記フラグの表示内容
を判断しくステップ14)、゛空き″の場合にはステッ
プ15へ進み、゛使用中゛の場合にはステップ17に進
む。
Then, when the memory device returns a response to the read request and flag data to the processor (step 13), the processor determines the display content of the flag from the flag data (step 14). The process advances to step 15, and if it is "in use", the process advances to step 17.

ステップ15は、プロセッサがセマフォフラグの表示内
容を“使用中゛に書き替えするものである。
In step 15, the processor rewrites the display content of the semaphore flag to "in use."

ステップ15の処理が済むと、プロセッサは、排他要求
を行ったメモリ装置に対して、排他動作の解除を行い、
処理を終了する(ステップ106)。
After completing the process in step 15, the processor cancels the exclusive operation on the memory device that made the exclusive request,
The process ends (step 106).

一方、前記ステップ14の判断で“′使用中パであった
場合には、ステップ17に進むが、このステップ17で
は、排他要求を通知したメモリ装置に対して、排他動作
の解除を行い、再度、ステップ11から処理を繰り返す
On the other hand, if it is determined in step 14 that the memory device is in use, the process proceeds to step 17. In step 17, the exclusive operation is canceled for the memory device that notified the exclusive request, and the memory device is reset again. , repeat the process from step 11.

以上のような構成では、例えば、プロセッサ1がメモリ
装置3に排他要求を出して、その排他要求によってメモ
リ装置3のフラグの表示内容が“使用中′”に書き替え
られているとき、即ち、既にメモリ装置3がプロセッサ
1によって排他動作中であるとき、プロセッサ2からメ
モリ装置3に排他要、求が出されると、メモリ装置3が
排他要求を出したプロセッサ2に異常受付を通知するこ
とによって、排他要求の競合が回避される。
In the above configuration, for example, when the processor 1 issues an exclusive request to the memory device 3 and the display content of the flag of the memory device 3 is rewritten to "in use" by the exclusive request, that is, When the memory device 3 is already under exclusive operation by the processor 1, when the processor 2 issues an exclusive request to the memory device 3, the memory device 3 notifies the processor 2 that issued the exclusive request of abnormal acceptance. , conflicts in exclusive requests are avoided.

また、メモリ装置3のフラグが“空き°“であるとき、
即ち、メモリ装置3が未だ排他動作中ではないとき、プ
ロセッサ2からメモリ装置3に新たに排他要求が出され
ると、その新たな排他要求がメモリ装置3に受は付けら
れて、その排他要求を出したプロセッサ2によってフラ
グ書き替え操作がなされることになるが、この場合には
、既にそれ以前にプロセッサ1がメモリ装置3に対して
排他要求を出していて、プロセッサ1によってフラグ書
き替え操作中である場合がある。
Furthermore, when the flag of the memory device 3 is “empty °”,
That is, when the processor 2 issues a new exclusive request to the memory device 3 while the memory device 3 is not yet in exclusive operation, the new exclusive request is accepted by the memory device 3 and the exclusive request is not accepted. The flag rewriting operation will be performed by the processor 2 that issued the flag, but in this case, the processor 1 has already issued an exclusive request to the memory device 3 and the flag rewriting operation is being performed by the processor 1. It may be.

しかし、前述のように、各プロセッサの排他制御処理に
は、プロセッサによるフラグ書き替え操作時にはフラグ
の内容を読み出して、その内容が“使用中′”であるか
°′空き”′であるかを確認するステップ14が組み込
まれ、さらに、“使使用°′である場合にはフラグの内
容の書き換えを行わずに排他要求を解除するステップ1
7を組み込んでいるため、プロセッサ1がフラグ書き替
え操作中にメモリ装置3に受は付けられたプロセッサ2
の新たな排他要求は、プロセッサ2自体の排他制御処理
で排除されることになって、競合が回避される。
However, as mentioned above, in exclusive control processing of each processor, when a processor performs a flag rewriting operation, it is necessary to read the contents of the flag and check whether the contents are "in use" or "free". Step 14 of checking is incorporated, and further step 1 of canceling the exclusive request without rewriting the contents of the flag if it is "used °'".
7, processor 2 is inserted into memory device 3 while processor 1 is rewriting the flag.
The new exclusive request will be eliminated by exclusive control processing of the processor 2 itself, and conflicts will be avoided.

従って、この一実施例に係るメモリ排他制御方式では、
メモリ装置の排他動作中だけでなく、メモリ装置に装備
されたフラグ書き替え操作中であっても、排他要求の競
合を回避する良好な制御をなし得る。
Therefore, in the memory exclusive control method according to this embodiment,
Good control can be performed to avoid conflicts of exclusion requests not only during the exclusive operation of the memory device but also during the rewriting operation of the flag installed in the memory device.

しかも、この一実施例のメモリ排他制御方式は、プロセ
ッサ自体の処理あるいはメモリ装置のフラグによって排
他制御を行うものであるため、メモリバスを占有させず
に排他制御を行うことができ、さらに、排他動作中およ
びフラグ書き替え操作中であっても、他のプロセッサか
らメモリ装置へのアクセスが排他要求を伴わない種類の
ものであるときには、そのアクセスを正常受付して遂行
させることができるため、従来のメモリ排他制御方式と
比較すると、メモリバスやメモリ装置の占有によるシス
テムの処理効率の低下を大幅に低減させることができる
Moreover, since the memory exclusive control method of this embodiment performs exclusive control using the processing of the processor itself or the flag of the memory device, exclusive control can be performed without occupying the memory bus. Even during operation or during a flag rewriting operation, if an access from another processor to the memory device does not involve an exclusive request, the access can be normally accepted and executed. Compared to the memory exclusive control method described above, it is possible to significantly reduce the decrease in system processing efficiency due to the occupancy of the memory bus or memory device.

U発明の効果コ 以上の説明から明らかなように、本発明に係るメモリ排
他制御方式は、メモリ装置にフラグを装備して、このフ
ラグの表示内容が“使使用′°であるか″空き′かによ
って、当該メモリ装置が既に排他動作中であるか否かを
示すこととしており、前記フラグの表示内容がパ使用中
′”であるとき、即ち、既に排他動作中であるときにプ
ロセッサから排他要求を受けた場合には、メモリ装置か
ら排他要求を出したプロセッサに異常受付を通知するこ
とによって排他要求の競合を回避する。
U Effects of the Invention As is clear from the above explanation, the memory exclusive control method according to the present invention equips a memory device with a flag and determines whether the display content of the flag is "used" or "free". This indicates whether the memory device in question is already in exclusive operation or not, and when the display content of the flag is 'in use', that is, when the memory device is already in exclusive operation, When a request is received, the memory device notifies the processor that issued the exclusive request of the abnormal reception to avoid conflicts of exclusive requests.

また、メモリ装置のフラグが゛空き″“であるとき、即
ち、未だ排他動作中ではないときにプロセッサから新た
に排他要求を受けた場合には、その新たな排他要求かメ
モリ装置に受は付けられて、その排他要求を出したプロ
セッサによってフラグ書き替え操作がなされることにな
るが、この場合には、既にそれ以前に排他要求を出した
他のプロセッサがフラグ書き替え操作中である場合があ
る。
In addition, when the flag of the memory device is "empty", that is, when a new exclusive request is received from the processor when the exclusive operation is not yet in progress, the new exclusive request is not accepted by the memory device. The flag rewriting operation will be performed by the processor that issued the exclusive request, but in this case, another processor that issued the exclusive request before that may already be in the process of flag rewriting. be.

しかし、この発明に係るメモリ排他制御方式では、プロ
セッサによるフラグ書き替え操作時には、フラグの内容
を読み出して、その内容が“使用中′”であるか゛空き
”であるかを確認して、゛使用中”である場合にはフラ
グの内容の書き換えを行わずに排他要求を解除する処理
を必須としているため、他のプロセッサがフラグ書き替
え操作中にメモリ装置に受は付けられた新たな排他要求
は、新たな排他要求を出したプロセッサ自体の処理で排
除して、競合を回避することができる。
However, in the memory exclusive control method according to the present invention, when the processor performs a flag rewriting operation, it reads the contents of the flag, checks whether the contents are "in use" or "free," and If it is "medium", it is mandatory to release the exclusive request without rewriting the contents of the flag, so a new exclusive request received by the memory device while another processor is rewriting the flag is required. can be eliminated by the processor itself that issued the new exclusive request to avoid conflicts.

従って、本発明にかかるメモリ排他制御方式では、メモ
リ装置の排他動作中だけでなく、メモリ装置に装備され
たフラグ書き替え操作中であっても、排他要求の競合を
回避する良好な制御をなし得る。
Therefore, the memory exclusive control method according to the present invention provides good control to avoid conflicts between exclusive requests not only during the exclusive operation of the memory device but also during the rewriting operation of the flag installed in the memory device. obtain.

しかも、本発明に係るメモリ排他制御方式は、プロセッ
サ自体の処理あるいはメモリ装置の711グ?こよって
排他制御を行うものであるため、メモリバスを占有させ
ずに排他制御を行うことができ、さらに、排他動作中お
よびフラグ書き替え操作中であっても、他のプロセッサ
からメモリ装置へのアクセスが排他要求を伴わない種類
のものであるときには、そのアクセスを正常受付して遂
行させることができるため、従来のメモリ排他制御方式
と比較すると、メモリバスやメモリ装置の占有によるシ
ステムの処理効率の低下を大幅に低減させることができ
る。
Moreover, the memory exclusive control method according to the present invention is not limited to the processing of the processor itself or the 711 group of the memory device. Since this is exclusive control, it is possible to perform exclusive control without occupying the memory bus, and furthermore, even during exclusive operation or flag rewrite operation, other processors cannot access the memory device. When the access is of a type that does not involve an exclusive request, the access can be accepted and executed normally, so compared to the conventional memory exclusive control method, system processing efficiency is improved by occupying the memory bus and memory device. can significantly reduce the decrease in

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

第1図は本発明の一実施例の処理手順を示す流れ図、第
2図は一実施例を実行するシステムのブロック図である
。 ■、2・・・・・・プロセッサ、3,4・・・・・・排
他制御回路、6・・・・・・排他動作表示用フリップフ
ロップ、7・・・・・・バス線、8・・・・・・アドレ
ス・データ線、9・・・・・・タグ線、10・・・・・
・ステータス線。
FIG. 1 is a flowchart showing the processing procedure of an embodiment of the present invention, and FIG. 2 is a block diagram of a system that executes the embodiment. ■, 2... Processor, 3, 4... Exclusive control circuit, 6... Flip-flop for exclusive operation display, 7... Bus line, 8... ...Address/data line, 9...Tag line, 10...
・Status line.

Claims (1)

【特許請求の範囲】 複数のプロセッサを備えてマルチタスク処理を実行する
情報処理システムにおいて、複数のプロセッサが同一の
時期に同一のメモリ装置を使おうとした場合に、排他要
求を通知した特定のプロセッサにそのメモリ装置の排他
的使用を許可するメモリ排他制御方式であって、 前記メモリ装置には、プロセッサからの排他要求に対し
て一定の処理を行う排他制御回路が設けられ、この排他
制御回路は、既に排他動作中で新たな排他要求を受ける
ことのできない“使用中”の状態にあるのか新たな排他
要求を受けることのできる“空き”の状態にあるのかを
フラグで表示し、かつ、新たな排他要求を受けた時に前
記フラグが“使用中”であればその排他要求を出したプ
ロセッサに異常受付を通知し、前記フラグが“空き”で
あればその排他要求を出したプロセッサに正常受付を通
知する構成とし、 一方、前記メモリ装置を共有する各プロセッサには、排
他要求を前記メモリ装置に通知した場合には、まず、前
記排他制御回路が正常受付をするか異常受付をするかを
監視させ、異常受付である場合にはメモリ装置へのアク
セスを当初からやり直しさせ、正常受付である場合には
、前記フラグの内容を読み出して“使用中”か“空き”
かを確認させ、使用中であった場合には排他要求の解除
を行った後にメモリ装置へのアクセスを当初からやり直
しさせ、“空き”であった場合には、前記メモリ装置の
排他制御回路に排他動作をさせるために前記フラグの内
容の書き換え処理を実行させ、書き換え処理が終了した
ら排他要求の解除をメモリ装置に通知させることとし、 プロセッサからメモリ装置へのアクセスが排他要求を伴
わない種類のものであるときには、前記メモリ装置のフ
ラグが“使用中”であっても、正常受付をして、そのア
クセスを遂行させることを特徴としたメモリ排他制御方
式。
[Claims] In an information processing system that includes multiple processors and executes multitask processing, when multiple processors attempt to use the same memory device at the same time, a specific processor that has notified an exclusive request The memory device is provided with an exclusive control circuit that performs certain processing in response to an exclusive request from a processor, and the exclusive control circuit allows exclusive use of the memory device. , displays a flag to indicate whether the device is already in an exclusive state and cannot receive new exclusive requests, or is in a free state, and can receive new exclusive requests. When an exclusive request is received, if the flag is "in use", the processor that issued the exclusive request is notified of an abnormal reception, and if the flag is "free", the processor that issued the exclusive request is notified of normal acceptance. On the other hand, when each processor sharing the memory device is notified of an exclusive request to the memory device, the exclusive control circuit first determines whether to accept normally or abnormally. If the reception is abnormal, the access to the memory device is restarted from the beginning, and if the reception is normal, the contents of the flag are read and the flag is determined to be "in use" or "free."
If the memory device is in use, the exclusive request is canceled and the access to the memory device is restarted from the beginning. If the memory device is empty, the exclusive control circuit of the memory device is In order to perform an exclusive operation, the content of the flag is rewritten, and when the rewriting process is completed, the memory device is notified of the release of the exclusive request, and the access from the processor to the memory device is of a type that does not involve an exclusive request. 1. A memory exclusive control method characterized in that when the memory device is used, the access is normally accepted and the access is executed even if the flag of the memory device is "in use".
JP10540990A 1990-04-23 1990-04-23 System for exclusively controlling memory Pending JPH044441A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10540990A JPH044441A (en) 1990-04-23 1990-04-23 System for exclusively controlling memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10540990A JPH044441A (en) 1990-04-23 1990-04-23 System for exclusively controlling memory

Publications (1)

Publication Number Publication Date
JPH044441A true JPH044441A (en) 1992-01-08

Family

ID=14406815

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10540990A Pending JPH044441A (en) 1990-04-23 1990-04-23 System for exclusively controlling memory

Country Status (1)

Country Link
JP (1) JPH044441A (en)

Similar Documents

Publication Publication Date Title
JP4874165B2 (en) Multiprocessor system and access right setting method in multiprocessor system
US5727172A (en) Method and apparatus for performing atomic accesses in a data processing system
EP0550976B1 (en) Memory accessing device using address pipeline
JPH044441A (en) System for exclusively controlling memory
US20030140189A1 (en) Method and apparatus for resource sharing in a multi-processor system
JP2972491B2 (en) Bus control mechanism and computer system
JPH04127261A (en) Multiprocessor system
JP2587468B2 (en) Lock data setting device
JPH0635747A (en) Debug support device
JP2906197B2 (en) Duplex bus device
JPH0610795B2 (en) Shared memory diagnostic method
JPS62177653A (en) Control system for shared memory
JPS63286949A (en) Bus control method
JPH04195666A (en) multiprocessor system
JP2825589B2 (en) Bus control method
JPH0795311B2 (en) Redundant processing device
JPH02103619A (en) Adapter device
JPH0375959A (en) Data transfer device for multiprocessor
JPH04326453A (en) Multi-processor system
JPH0437948A (en) Exclusive control system
JPH0328934A (en) Deadlock preventing method for shared resources
JPH0581211A (en) Communication method between processors
JPH02210515A (en) System resetting system
JPH044455A (en) Memory access arbitration circuit
JPH05324541A (en) Bus interface device