JPH11203253A - Exclusive access control method for shared resource - Google Patents

Exclusive access control method for shared resource

Info

Publication number
JPH11203253A
JPH11203253A JP330698A JP330698A JPH11203253A JP H11203253 A JPH11203253 A JP H11203253A JP 330698 A JP330698 A JP 330698A JP 330698 A JP330698 A JP 330698A JP H11203253 A JPH11203253 A JP H11203253A
Authority
JP
Japan
Prior art keywords
access
shared resource
processor
shared
processors
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
JP330698A
Other languages
Japanese (ja)
Inventor
Koichi Koga
弘一 古賀
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP330698A priority Critical patent/JPH11203253A/en
Publication of JPH11203253A publication Critical patent/JPH11203253A/en
Pending legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a exclusive access control method for shared resource to realize a data transfer on a high speed shared bus by eliminating the use of a shared bus for semaphore control in a multiprocessor system having a shared resource. SOLUTION: At the time of simultaneous access requests to a shared resource 7, processors 1a and 1b write an access request in semaphore registers 10a and 10b and is mediated by an exclusive access mediation circuit 12. Any one of the processors is given an access right by the processors 1a and 1b's reading the semaphore registers 10a and 10b and, at the time of access completion to the shared resource 7, the exclusive access mediation circuit 12 mediates an access request of other processors anew by the processors 1a and 1b's writing the access completion and the processors 1a and 1b are notified of the mediation result.

Description

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

【0001】[0001]

【発明の属する技術分野】この発明は、マルチプロセッ
サシステムにおける共有バス上の共有資源への排他アク
セス制御方式に関するものである。
The present invention relates to an exclusive access control method for a shared resource on a shared bus in a multiprocessor system.

【0002】[0002]

【従来の技術】近年、プロセッサを利用したシステムは
その処理内容の複雑化に伴い、一つのプロセッサでは処
理が間に合わず、複数のプロセッサで処理を分担する場
合が多くなってきた。また、半導体の高集積化に伴い、
このような複数プロセッサを1チップにシステムオンチ
ップ化するといったことも増えてきている。
2. Description of the Related Art In recent years, with a system using a processor, the processing content has become more complicated, and one processor cannot process the processing in time, and the processing is often shared by a plurality of processors. Also, with the high integration of semiconductors,
Increasingly, such a plurality of processors are integrated into a system on a single chip.

【0003】このようなマルチプロセッサシステムにお
いて、例えば共有データベースの更新を複数のプロセッ
サで行なう場合、ある一つのプロセッサがデータベース
を更新している最中は他のプロセッサはアクセスを行な
わないといった、共有資源への排他アクセス制御が必要
となる。従来は、このような共有資源への排他アクセス
をセマフォフラグにより実現していた。複数のプロセッ
サがセマフォフラグに対し排他的にアクセスし、フラグ
値がリセット状態(未使用状態)を表していたらセット
(使用中)し、共有資源に対するアクセス権を取得す
る。アクセス権を取得できなかったプロセッサは、セマ
フォフラグがリセット状態(未使用状態)になるまで待
つことにより、共有資源に対する排他アクセスを実現す
る。
In such a multiprocessor system, for example, when a shared database is updated by a plurality of processors, a shared resource such that another processor does not access while one of the processors is updating the database. Exclusive access control is required. Conventionally, such exclusive access to a shared resource has been realized by a semaphore flag. A plurality of processors exclusively access the semaphore flag, and set (in use) if the flag value indicates a reset state (unused state), and acquire an access right to the shared resource. The processor that has failed to acquire the access right realizes exclusive access to the shared resource by waiting until the semaphore flag is reset (unused state).

【0004】図6は、セマフォフラグを用いた従来方式
における共有資源を有するマルチプロセッサシステムの
回路構成を表すブロック図である。また、図7,図8は
図6の回路構成における動作説明図である。図6におい
て、1a,1bは各々プロセッサを表している。プロセ
ッサ1a,プロセッサ1bは同一アドレス空間を共有し
ており、共有バス2を介して共有メモリ3に接続され
る。共有バス2はプロセッサ1a,プロセッサ1bによ
り共有されるが同時には使用できない。そのため、プロ
セッサ1aとプロセッサ1bは各々バスリクエスト信号
5a,バスリクエスト信号5bを介して、共有バス調停
回路4に共有バス2の使用を要求する。共有バス調停回
路4は共有バス2の使用要求を調停する回路であり、同
時に共有バス2の使用要求が来た場合、それを調停し、
1つのプロセッサに対してのみ共有バス使用許可を与え
るといった排他制御を行なう。使用許可は共有バス調停
回路4の出力であるバスグラント信号6a,6bを介し
て、2つのプロセッサ1a,1bの一方にのみ与えられ
る。また、7は共有メモリ3内部の共有資源であり、8
は共有資源7を使用中であるかどうかを表すセマフォフ
ラグである。
FIG. 6 is a block diagram showing a circuit configuration of a multiprocessor system having shared resources in a conventional system using a semaphore flag. 7 and 8 are explanatory diagrams of the operation in the circuit configuration of FIG. In FIG. 6, 1a and 1b each represent a processor. The processors 1a and 1b share the same address space, and are connected to the shared memory 3 via the shared bus 2. The shared bus 2 is shared by the processors 1a and 1b but cannot be used at the same time. Therefore, the processors 1a and 1b request the shared bus arbitration circuit 4 to use the shared bus 2 via the bus request signals 5a and 5b, respectively. The shared bus arbitration circuit 4 is a circuit for arbitrating the use request of the shared bus 2 and, when a use request of the shared bus 2 comes at the same time, arbitrates the request.
Exclusive control is performed such that only one processor is permitted to use the shared bus. The use permission is given to only one of the two processors 1a and 1b via the bus grant signals 6a and 6b output from the shared bus arbitration circuit 4. Reference numeral 7 denotes a shared resource in the shared memory 3;
Is a semaphore flag indicating whether the shared resource 7 is being used.

【0005】以上の構成において、図7の動作説明図を
用いて、複数のプロセッサが共有資源7に対して同時ア
クセスする場合のアクセス権取得について説明する。プ
ロセッサ1a,プロセッサ1bが同時に共有資源7のア
クセス要求をする場合、先ず初めに、各々のプロセッサ
1a,1bがセマフォフラグ8へのアクセスのために、
バスリクエスト信号5a,バスリクエスト信号5bを共
有バス調停回路4に対して出力する。図7においては
“j”の区間である。共有バス調停回路4は、排他制御
により一方にのみ使用許可を与える。図7はプロセッサ
1aに使用許可が与えられた例である。使用許可は共有
バス調停回路4の出力であるバスグラント信号6aを介
して通知される。
In the above configuration, the access right acquisition when a plurality of processors simultaneously access the shared resource 7 will be described with reference to the operation explanatory diagram of FIG. When the processors 1a and 1b request access to the shared resource 7 at the same time, first, each of the processors 1a and 1b performs access to the semaphore flag 8,
The bus request signal 5a and the bus request signal 5b are output to the shared bus arbitration circuit 4. In FIG. 7, the section is “j”. The shared bus arbitration circuit 4 gives the use permission to only one of them by exclusive control. FIG. 7 shows an example in which the use permission is given to the processor 1a. The use permission is notified via a bus grant signal 6a which is an output of the shared bus arbitration circuit 4.

【0006】共有バス2の使用を許可されたプロセッサ
1aは次の区間“k”において、セマフォフラグ8を含
むアドレスのデータをリードする。そして、次の区間
“l”において、リードしたデータ内のセマフォフラグ
8をチェックし共有資源7が未使用状態であることを確
認し、該データのセマフォフラグ8のみをセット(共有
資源使用中の宣言)し、次の区間“m”においてセマフ
ォフラグ8を含むアドレスにライトする。これにより、
プロセッサ1aは、共有メモリ3上の共有資源7に対す
るアクセス権を取得する。
The processor 1a permitted to use the shared bus 2 reads the data of the address including the semaphore flag 8 in the next section "k". Then, in the next section “l”, the semaphore flag 8 in the read data is checked to confirm that the shared resource 7 is not in use, and only the semaphore flag 8 of the data is set (when the shared resource is being used). Declaration), and write to the address including the semaphore flag 8 in the next section “m”. This allows
The processor 1a acquires an access right to the shared resource 7 on the shared memory 3.

【0007】この区間“k”〜区間“m”までの一連の
処理(セマフォリード、モディファイ、ライト)は、プ
ロセッサ1bに共有バス2のアクセス権が移らずに、必
ず連続して行なわれなければならない。理由は、区間
“k”〜区間“m”までの一連の処理の最中にアクセス
権がプロセッサ1bに移った場合、プロセッサ1a,プ
ロセッサ1bが共に、共有資源7が未使用状態であると
認識するためである。そのため、プロセッサ1aは区間
“k”〜区間“m”の間は、共有バスアクセス権が移行
しないように、バス調停回路4に対してバスリクエスト
要求5aを出し続ける。
A series of processes (semaphore read, modify, write) from section "k" to section "m" must be performed continuously without the access right of the shared bus 2 being transferred to the processor 1b. No. The reason is that if the access right is transferred to the processor 1b during a series of processes from the section “k” to the section “m”, both the processors 1a and 1b recognize that the shared resource 7 is in the unused state. To do that. Therefore, the processor 1a keeps issuing the bus request request 5a to the bus arbitration circuit 4 during the section "k" to the section "m" so that the shared bus access right does not shift.

【0008】プロセッサ1aは、以上の処理により共有
資源7へのアクセス権を取得するが、取得した後は、一
旦、区間“m”完了段階でバスリクエスト信号5aを介
して共有バス調停回路4に共有バス使用要求取り下げを
通知し、共有バス2を解放する。共有バス調停回路4は
区間“n”でプロセッサ1bに対し共有バス使用権をバ
スグラント信号6bを介して通知し、プロセッサ1bは
区間“o”でセマフォフラグ8を含むアドレスをリード
するが、セットされているため、セマフォフラグ8がリ
セット状態になるまで、共有バス2を介し、セマフォフ
ラグ8をリードし続ける。
The processor 1a obtains the access right to the shared resource 7 by the above processing. After obtaining the right, the processor 1a sends the access right to the shared bus arbitration circuit 4 via the bus request signal 5a once at the completion of the section "m". The shared bus use request is notified and the shared bus 2 is released. The shared bus arbitration circuit 4 notifies the processor 1b of the right to use the shared bus via the bus grant signal 6b in the section "n", and the processor 1b reads the address including the semaphore flag 8 in the section "o". Therefore, the semaphore flag 8 is continuously read via the shared bus 2 until the semaphore flag 8 is reset.

【0009】以上の動作により、共有資源7に対する複
数プロセッサ1a,1bのアクセス要求の調停は実現さ
れる。次に、図8を用いて、共有資源使用中のプロセッ
サのアクセス権放棄と、他のプロセッサへのアクセス権
の移行について説明する。図8において、プロセッサ1
aは共有資源7に対するアクセスC(区間“p”),ア
クセスD(区間“r”)を行ない、共有資源7へのアク
セスを完了するが、その区間と交互してプロセッサ1b
は区間“q”、区間“s”において、セマフォフラグ8
をアクセスし、リセットされていないか(未使用でない
か)チェックする。
Through the above operation, arbitration of access requests of the plurality of processors 1a and 1b to the shared resource 7 is realized. Next, with reference to FIG. 8, a description will be given of the relinquishment of the access right of a processor using a shared resource and the transfer of the access right to another processor. In FIG. 8, processor 1
a performs access C (section “p”) and access D (section “r”) to the shared resource 7 to complete the access to the shared resource 7, but the processor 1b alternates with the section.
Is the semaphore flag 8 in the section “q” and the section “s”.
And check whether it has been reset (not unused).

【0010】そして区間“t”においてプロセッサ1a
はセマフォフラグ8に対して、リセット(未使用)を書
き込み、アクセス権を放棄する。プロセッサ1bは区間
“u”において、セマフォフラグ8をリードし、リセッ
トされているため、区間“v”においてモディファイ
し、区間“w”においてセマフォフラグをセット(使用
中)し、共有資源7へのアクセス権を取得する。
In the section "t", the processor 1a
Writes a reset (unused) to the semaphore flag 8 and relinquishes the access right. The processor 1b reads the semaphore flag 8 in the section "u", and modifies the semaphore flag in the section "v", sets the semaphore flag in the section "w" (in use), and resets the semaphore flag 8 in the section "w". Get access rights.

【0011】以上のように、図7,図8の動作説明によ
り、マルチプロセッサ構成の共有資源7に対する排他ア
クセス制御は実現される。
As described above, the exclusive access control for the shared resource 7 having the multiprocessor configuration is realized by the operation described with reference to FIGS.

【0012】[0012]

【発明が解決しようとする課題】しかしながら、図6に
示した従来の回路構成の場合は、セマフォフラグ8が共
有バス2上に存在するために、複数のプロセッサ1a,
1bが共有資源7にアクセスしようとした場合、セマフ
ォフラグアクセスのために、共有バス2上のデータ転送
速度が低下してしまうという課題があった。
However, in the case of the conventional circuit configuration shown in FIG. 6, since the semaphore flag 8 exists on the shared bus 2, a plurality of processors 1a,
When 1b tries to access the shared resource 7, there is a problem that the data transfer speed on the shared bus 2 is reduced due to the semaphore flag access.

【0013】セマフォアクセスのための共有バス2の使
用は、図7においては区間“k”〜区間“n”であり、
図8においては区間“q”と区間“s”〜区間“w”で
ある。特に、図8では、プロセッサ1aが共有資源7へ
のアクセス中(区間“p”、区間“r”)は、交互にプ
ロセッサ1bがセマフォアクセスのために共有バス2を
使用する(区間“q”、区間“s”)ため、共有資源7
へのアクセス要求が競合するプロセッサ数が増える程、
プロセッサ1aの共有メモリ3へのアクセススピードは
著しく低下する。
The use of the shared bus 2 for semaphore access is in the section “k” to the section “n” in FIG.
In FIG. 8, section “q” and section “s” to section “w”. In particular, in FIG. 8, while the processor 1a is accessing the shared resource 7 (section “p”, section “r”), the processor 1b alternately uses the shared bus 2 for semaphore access (section “q”). , Section “s”), so the shared resource 7
As the number of processors competing for access requests to
The access speed of the processor 1a to the shared memory 3 is significantly reduced.

【0014】この発明は上記従来の問題点を解決するも
のであり、共有資源を有するマルチプロセッサシステム
において、セマフォ制御のための共有バス使用をなくす
ことにより、高速な共有バス上のデータ転送を実現でき
る共有資源排他アクセス制御方式を提供することを目的
とする。
The present invention solves the above-mentioned conventional problems, and realizes high-speed data transfer on a shared bus by eliminating the use of a shared bus for semaphore control in a multiprocessor system having shared resources. It is an object of the present invention to provide a shared resource exclusive access control method that can be used.

【0015】[0015]

【課題を解決するための手段】この発明は、マルチプロ
セッサシステムにおける共有バス上の共有資源への排他
アクセス制御方式であって、複数のプロセッサと、プロ
セッサの各々の固有空間であるローカルバス上に接続さ
れたリード/ライト可能なセマフォレジスタと、プロセ
ッサが各々のセマフォレジスタにライトした共有資源ア
クセス要求に対して、いずれか一つのプロセッサにセマ
フォレジスタを介してアクセス許可を与える排他アクセ
ス調停回路とを備え、共有資源への同時アクセス要求時
には、プロセッサが各々の固有空間に存在するセマフォ
レジスタにアクセス要求をライトし、同アクセス要求は
排他アクセス調停回路により調停され、プロセッサがセ
マフォレジスタをリードすることにより調停結果に基づ
いてプロセッサのうちいずれか一つのプロセッサに対し
てアクセス権が与えられ、共有資源へのアクセス完了時
には、プロセッサがローカルバス上のセマフォレジスタ
に対してアクセス完了をライトすることにより、排他ア
クセス調停回路は新たに他のプロセッサのアクセス要求
を調停し、その調停結果をセマフォレジスタを介してプ
ロセッサに通知することを特徴とするものである。
SUMMARY OF THE INVENTION The present invention relates to an exclusive access control method for a shared resource on a shared bus in a multiprocessor system, which comprises a plurality of processors and a local bus which is a unique space of each processor. A connected readable / writable semaphore register, and an exclusive access arbitration circuit for granting access to any one of the processors via the semaphore register in response to a shared resource access request written to each semaphore register by the processor. When a simultaneous access request to the shared resource is made, the processor writes the access request to the semaphore register existing in each unique space, the access request is arbitrated by the exclusive access arbitration circuit, and the processor reads the semaphore register. Processor arbitration results An access right is given to any one of the processors, and when the access to the shared resource is completed, the processor writes the access completion to the semaphore register on the local bus, so that the exclusive access arbitration circuit is newly provided. And arbitrates the access request of the processor, and notifies the processor of the arbitration result via the semaphore register.

【0016】この発明の共有資源排他アクセス制御方式
によると、共有資源に対するアクセス権取得のためのセ
マフォレジスタを各々のローカルバス上に有するため、
共有バスを使用することはない。これにより、共有資源
へのアクセス競合時のセマフォアクセスによる共有資源
アクセスのスピード低下を防ぐことができ、共有バスの
効率的な使用が可能となる。
According to the shared resource exclusive access control method of the present invention, since the semaphore register for acquiring the access right to the shared resource is provided on each local bus,
No shared bus is used. As a result, it is possible to prevent a decrease in access speed of the shared resource due to the semaphore access at the time of contention for access to the shared resource, and it is possible to use the shared bus efficiently.

【0017】[0017]

【発明の実施の形態】この発明の一実施の形態につい
て、図1ないし図5を参照しながら説明する。図1は、
共有資源を有するマルチプロセッサシステムの回路構成
を表すブロック図である。図1において、図6と同じも
のには同じ符号1a,1b,2,3,4,5a,5b,
6a,6b,7,8を付してその説明を省略する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described with reference to FIGS. FIG.
FIG. 2 is a block diagram illustrating a circuit configuration of a multiprocessor system having shared resources. In FIG. 1, the same components as those in FIG. 6 are denoted by the same reference numerals 1a, 1b,
Reference numerals 6a, 6b, 7, and 8 are added, and description thereof is omitted.

【0018】9a,9bは各々プロセッサ1a,プロセ
ッサ1bが持つローカルバスであり、プロセッサ固有の
内部空間にアドレスマッピングされている。ローカルバ
ス9a,9bに各々接続される10a,10bは共有資
源7に対する排他制御のためのアドレスマッピングされ
たセマフォレジスタである。プロセッサ1a,プロセッ
サ1bは共有メモリ3へのアクセス要求発生時に、各
々、ローカルバス9a,9bを経由してセマフォレジス
タ10a,10bに共有資源7へのアクセス要求をライ
トする。ライトした内容は、次に同プロセッサがセマフ
ォレジスタ10a,10bに新たに値をセットするまで
保持される。セマフォレジスタ10a,10bにセット
されたアクセス要求は、共有資源アクセス要求信号11
a,11bを介して排他アクセス調停回路12に通知さ
れる。排他アクセス調停回路12は複数の共有資源アク
セス要求から唯一のプロセッサに対して、アクセス許可
を与えるものであり、共有資源アクセス許可信号13
a,13bを介してプロセッサに通知される。プロセッ
サ1a,1bは共有資源7へのアクセス要求に対して、
アクセスが許可されたかどうかを、各々、セマフォレジ
スタ10a,10bをリードすることにより知ることが
できる。
Reference numerals 9a and 9b denote local buses of the processors 1a and 1b, respectively, which are address-mapped in an internal space unique to the processor. Reference numerals 10a and 10b connected to the local buses 9a and 9b are semaphore registers to which addresses are mapped for exclusive control of the shared resource 7, respectively. When an access request to the shared memory 3 occurs, the processor 1a and the processor 1b write the access request to the shared resource 7 to the semaphore registers 10a and 10b via the local buses 9a and 9b, respectively. The written contents are held until the processor next sets new values in the semaphore registers 10a and 10b. The access request set in the semaphore registers 10a and 10b is a shared resource access request signal 11
The exclusive access arbitration circuit 12 is notified via a and 11b. The exclusive access arbitration circuit 12 gives access permission to a single processor from a plurality of shared resource access requests.
The processor is notified via a and 13b. The processors 1a and 1b respond to an access request to the shared resource 7 by
Whether or not the access is permitted can be known by reading the semaphore registers 10a and 10b, respectively.

【0019】図2に排他アクセス調停回路12のブロッ
ク図を示す。図2において、14は組み合わせ回路、1
5は保持回路、16はプロセッサ1a,1bや共有バス
調停回路4へも入る基本クロックである。上記回路構成
において、図3の動作説明図を用いて、複数のプロセッ
サが共有資源に対して同時アクセスする場合のアクセス
権取得について説明する。
FIG. 2 shows a block diagram of the exclusive access arbitration circuit 12. In FIG. 2, 14 is a combinational circuit, 1
5 is a holding circuit, and 16 is a basic clock which also enters the processors 1a and 1b and the shared bus arbitration circuit 4. In the above-described circuit configuration, the acquisition of an access right when a plurality of processors simultaneously access a shared resource will be described with reference to the operation explanatory diagram of FIG.

【0020】プロセッサ1a,プロセッサ1bが同時に
共有資源のアクセス要求をする場合、各々がローカルバ
ス9a,9bを介してセマフォレジスタ10a,10b
に対して共有資源アクセス要求をライトする。図3にお
いては、区間“a”である。同アクセス要求は共有資源
アクセス要求信号11a,11bを介して、排他アクセ
ス調停回路12に通知される。
When the processors 1a and 1b simultaneously request access to a shared resource, the semaphore registers 10a and 10b are connected via local buses 9a and 9b, respectively.
Write a shared resource access request to In FIG. 3, the section is “a”. The access request is notified to the exclusive access arbitration circuit 12 via the shared resource access request signals 11a and 11b.

【0021】排他アクセス調停回路12は複数のプロセ
ッサからのアクセス要求に対し、そのうちの一つに対し
てのみアクセス権を与える。図3はプロセッサ1aにア
クセス権が与えられた例である。アクセス権が与えられ
たかどうかは、各プロセッサ1a,1bがセマフォレジ
スタ10a,10bをリードすることにより知ることが
できる。区間“b”はそのセマフォレジスタ10a,1
0bのリード区間である。セマフォレジスタ10aをリ
ードし、プロセッサ1aは共有資源へのアクセス権を取
得したことを知り、次の区間“c”において、共有バス
2の使用要求を共有バス調停回路4に対して、バスリク
エスト信号5aを介して通知する。そして、プロセッサ
1aは次の区間“d”から共有資源7へのアクセスをス
タートする。また、プロセッサ1bは区間“b”で、セ
マフォレジスタ10bをリードし、共有資源7へのアク
セスが不許可となったため、許可されるまでセマフォレ
ジスタ10bをリードし続けて待つ。
The exclusive access arbitration circuit 12 gives an access right to only one of access requests from a plurality of processors. FIG. 3 shows an example in which an access right is given to the processor 1a. Whether or not the access right has been granted can be known by each processor 1a, 1b reading the semaphore registers 10a, 10b. The section "b" corresponds to the semaphore registers 10a, 1
0b is a lead section. The processor 1a reads the semaphore register 10a and learns that it has acquired the right to access the shared resource. In the next section "c", the processor 1a sends a request to use the shared bus 2 to the shared bus arbitration circuit 4 and sends a bus request signal. Notify via 5a. Then, the processor 1a starts accessing the shared resource 7 from the next section “d”. Further, the processor 1b reads the semaphore register 10b in the section "b" and, since access to the shared resource 7 is not permitted, continues reading the semaphore register 10b and waits until it is permitted.

【0022】次に、図4を用いて、共有資源使用中のプ
ロセッサのアクセス権放棄と、他のプロセッサへのアク
セス権の移行について説明する。図4において、プロセ
ッサ1aは共有資源7に対するアクセスA(区間
“e”),アクセスB(区間“f”)を連続して行い、
共有資源7へのアクセスを完了する。そして区間“g”
において、プロセッサ1aはセマフォレジスタ10aに
対して、リセット(未使用)を書き込み、アクセス権を
放棄する。このアクセス権の放棄は、共有資源アクセス
要求信号11aを介して排他アクセス調停回路12に通
知される。これにより、アクセス要求はプロセッサ1b
のみとなったため、排他アクセス調停回路12はプロセ
ッサ1aに対するアクセス許可を取り消し、代わりにプ
ロセッサ1bに対して、アクセス許可をアクセス許可信
号13bを介して通知する。プロセッサ1bは区間
“h”においてセマフォレジスタ10bをリードするこ
とにより、共有資源7へのアクセス権取得を知る。そし
て、プロセッサ1bは次の区間“i”から共有資源7へ
のアクセスをスタートする。
Next, with reference to FIG. 4, a description will be given of the relinquishment of the access right of a processor using a shared resource and the transfer of the access right to another processor. In FIG. 4, the processor 1a continuously performs access A (section “e”) and access B (section “f”) to the shared resource 7,
The access to the shared resource 7 is completed. And section “g”
In, the processor 1a writes a reset (unused) to the semaphore register 10a and relinquishes the access right. The release of the access right is notified to the exclusive access arbitration circuit 12 via the shared resource access request signal 11a. Thereby, the access request is sent to the processor 1b.
The exclusive access arbitration circuit 12 cancels the access permission to the processor 1a, and instead notifies the processor 1b of the access permission via the access permission signal 13b. The processor 1b knows that the access right to the shared resource 7 has been acquired by reading the semaphore register 10b in the section "h". Then, the processor 1b starts accessing the shared resource 7 from the next section “i”.

【0023】図5に排他アクセス調停回路12の状態遷
移図を示す。STATE1は共有資源未使用状態、ST
ATE2はプロセッサ1aが共有資源を使用している状
態、STATE3はプロセッサ1bが共有資源を使用し
ている状態であり、入力信号(共有資源アクセス要求信
号)11a,11bにおいて下記の遷移条件が成立しな
い限り現在のSTATEを保持する。
FIG. 5 is a state transition diagram of the exclusive access arbitration circuit 12. STATE1 is a state in which a shared resource is not used, ST
ATE2 is a state where the processor 1a is using the shared resource, STATE3 is a state where the processor 1b is using the shared resource, and the following transition conditions are not satisfied in the input signals (shared resource access request signals) 11a and 11b. As long as the current STATE is maintained.

【0024】 I:入力信号11a=“H1 ” II:入力信号11a=“L1 ”かつ入力信号11b=
“L1 ” III:入力信号11a=“L1 ”かつ入力信号11b=
“H1 ” IV:入力信号11a=“H1 ”かつ入力信号11b=
“L1 ” V:入力信号11a=“L1 ”かつ入力信号11b=
“L1 ” VI:入力信号11a=“L1 ”かつ入力信号11b=
“H1 ” なお、“H1 ”を共有資源アクセス要求有り、“L1
を共有資源アクセス要求無しに割り当てている。
I: input signal 11a = “H 1 ” II: input signal 11a = “L 1 ” and input signal 11b =
“L 1 ” III: input signal 11 a = “L 1 ” and input signal 11 b =
"H 1" IV: Input signal 11a = "H 1" and the input signal 11b =
"L 1" V: the input signal 11a = "L 1" and the input signal 11b =
“L 1 ” VI: input signal 11a = “L 1 ” and input signal 11b =
“H 1 ” Note that “H 1 ” indicates that there is a shared resource access request and “L 1
Are assigned without a shared resource access request.

【0025】すなわち、同時にプロセッサ1a,プロセ
ッサ1bから共有資源アクセス要求が来た場合、STA
TE2に遷移する。プロセッサ1aが共有資源アクセス
権を取得し、アクセスが完了するまでSTATE2にお
り、アクセス完了時にプロセッサ1aがアクセス要求1
1aを取り下げるので、上記 IIIの遷移条件が成立しS
TATE3に遷移する。他の状態遷移についても同様で
ある。
That is, when a shared resource access request comes from the processors 1a and 1b at the same time, the STA
Transit to TE2. The processor 1a acquires the shared resource access right and stays in STATE2 until the access is completed.
Since 1a is withdrawn, the above transition condition III is satisfied and S
Transition to TATE3. The same applies to other state transitions.

【0026】各状態STATE1〜STATE3におけ
る出力信号(共有資源アクセス許可信号)13a,13
bは下記のとおりである。 STATE1:出力信号13a=“L2 ”かつ出力信号
13b=“L2 ” STATE2:出力信号13a=“H2 ”かつ出力信号
13b=“L2 ” STATE3:出力信号13a=“L2 ”かつ出力信号
13b=“H2 ” なお、“H2 ”を共有資源アクセスを許可、“L2 ”を
共有資源アクセスを非許可に割り当てている。
Output signals (shared resource access permission signals) 13a, 13 in each of the states STATE1 to STATE3
b is as follows. STATE 1: Output signal 13a = "L 2" and the output signal 13b = "L 2" STATE2: Output signal 13a = "H 2" and the output signal 13b = "L 2" STATE3: Output signal 13a = "L 2" and the output Signal 13b = “H 2 ” Note that “H 2 ” is assigned to permit shared resource access, and “L 2 ” is assigned to disable shared resource access.

【0027】また、上記遷移条件において、共有資源ア
クセス要求同時発生時の優先はプロセッサ1aとしてい
るが、プロセッサ1bを優先したい場合はI,VIの遷移
条件を下記のように変更すればよい。 I:入力信号11a=“H1 ”かつ入力信号11b=
“L1 ” VI:入力信号11b=“H1 ” 以上のようにして、セマフォレジスタを用いたマルチプ
ロセッサ構成の共有資源に対する排他アクセス制御は実
現される。
In the above transition conditions, the processor 1a is given priority when a shared resource access request occurs simultaneously, but if the processor 1b is to be given priority, the transition conditions of I and VI may be changed as follows. I: input signal 11a = “H 1 ” and input signal 11b =
“L 1 ” VI: input signal 11 b = “H 1 ” As described above, exclusive access control to the shared resource of the multiprocessor configuration using the semaphore register is realized.

【0028】このように構成された共有資源排他アクセ
ス制御方式によると、共有資源7に対するアクセス権取
得のためのセマフォレジスタ10a,10bを各々のロ
ーカルバス9a,9b上に有するため、共有バス2を使
用することはない。これにより、従来構成では発生して
いた、共有資源7へのアクセス競合時のセマフォアクセ
スによる共有資源アクセスのスピード低下を防ぐことが
でき、共有バス2の効率的な使用が可能となる。
According to the shared resource exclusive access control system configured as described above, the semaphore registers 10a and 10b for acquiring the access right to the shared resource 7 are provided on the local buses 9a and 9b, respectively. Not used. As a result, it is possible to prevent a decrease in the speed of shared resource access due to semaphore access at the time of contention for access to the shared resource 7, which has occurred in the conventional configuration, and the shared bus 2 can be used efficiently.

【0029】なお、前記実施の形態では、2個のプロセ
ッサ1a,1bの場合について説明したが、3個以上の
場合についても同様である。
Although the above embodiment has been described with reference to the case of two processors 1a and 1b, the same applies to the case of three or more processors.

【0030】[0030]

【発明の効果】この発明の共有資源排他アクセス制御方
式によると、共有資源に対するアクセス権取得のための
セマフォレジスタを各々のローカルバス上に有するた
め、共有バスを使用することはない。これにより、共有
資源へのアクセス競合時のセマフォアクセスによる共有
資源アクセスのスピード低下を防ぐことができ、共有バ
スの効率的な使用が可能となる。
According to the shared resource exclusive access control method of the present invention, since the semaphore registers for acquiring the access right to the shared resource are provided on each local bus, the shared bus is not used. As a result, it is possible to prevent a decrease in access speed of the shared resource due to the semaphore access at the time of contention for access to the shared resource, and it is possible to use the shared bus efficiently.

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

【図1】この発明の一実施の形態の回路構成を示したブ
ロック図である。
FIG. 1 is a block diagram showing a circuit configuration of an embodiment of the present invention.

【図2】この発明の一実施の形態の排他アクセス調停回
路のブロック図である。
FIG. 2 is a block diagram of an exclusive access arbitration circuit according to one embodiment of the present invention;

【図3】この発明の一実施の形態における複数のプロセ
ッサが共有資源に対して同時アクセスする場合のアクセ
ス権取得を表すタイミング図である。
FIG. 3 is a timing chart illustrating access right acquisition when a plurality of processors simultaneously access a shared resource according to an embodiment of the present invention;

【図4】この発明の一実施の形態における共有資源使用
中のプロセッサのアクセス権放棄と他のプロセッサへの
アクセス権の移行を表すタイミング図である。
FIG. 4 is a timing chart showing a relinquishment of an access right of a processor and a transfer of an access right to another processor during use of a shared resource according to an embodiment of the present invention;

【図5】この発明の一実施の形態の排他アクセス調停回
路の状態遷移図である。
FIG. 5 is a state transition diagram of the exclusive access arbitration circuit according to the embodiment of the present invention;

【図6】従来例の回路構成を示したブロック図である。FIG. 6 is a block diagram showing a circuit configuration of a conventional example.

【図7】従来例における複数のプロセッサが共有資源に
対して同時アクセスする場合のアクセス権取得を表すタ
イミング図である。
FIG. 7 is a timing chart showing access right acquisition when a plurality of processors simultaneously access a shared resource in a conventional example.

【図8】従来例における共有資源使用中のプロセッサの
アクセス権放棄と他のプロセッサへのアクセス権の移行
を表すタイミング図である。
FIG. 8 is a timing chart showing a relinquishing of an access right of a processor and a transfer of an access right to another processor during use of a shared resource in a conventional example.

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

1a,1b プロセッサ 2 共有バス 3 共有メモリ 4 共有バス調停回路 5a,5b バスリクエスト信号線 6a,6b バスグラント信号線 7 共有資源 9a,9b ローカルバス 10a,10b セマフォレジスタ 11a,11b 共有資源アクセス要求信号 12 排他アクセス調停回路 13a,13b 共有資源アクセス許可信号 1a, 1b Processor 2 Shared bus 3 Shared memory 4 Shared bus arbitration circuit 5a, 5b Bus request signal line 6a, 6b Bus grant signal line 7 Shared resource 9a, 9b Local bus 10a, 10b Semaphore register 11a, 11b Shared resource access request signal 12 Exclusive access arbitration circuit 13a, 13b Shared resource access permission signal

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 マルチプロセッサシステムにおける共有
バス上の共有資源への排他アクセス制御方式であって、 複数のプロセッサと、 前記プロセッサの各々の固有空間であるローカルバス上
に接続されたリード/ライト可能なセマフォレジスタ
と、 前記プロセッサが各々の前記セマフォレジスタにライト
した共有資源アクセス要求に対して、いずれか一つのプ
ロセッサに前記セマフォレジスタを介してアクセス許可
を与える排他アクセス調停回路とを備え、 前記共有資源への同時アクセス要求時には、前記プロセ
ッサが各々の固有空間に存在する前記セマフォレジスタ
にアクセス要求をライトし、同アクセス要求は前記排他
アクセス調停回路により調停され、前記プロセッサが前
記セマフォレジスタをリードすることにより前記調停結
果に基づいて前記プロセッサのうちいずれか一つのプロ
セッサに対してアクセス権が与えられ、 前記共有資源へのアクセス完了時には、前記プロセッサ
がローカルバス上の前記セマフォレジスタに対してアク
セス完了をライトすることにより、前記排他アクセス調
停回路は新たに他のプロセッサのアクセス要求を調停
し、その調停結果を前記セマフォレジスタを介してプロ
セッサに通知することを特徴とする共有資源排他アクセ
ス制御方式。
1. An exclusive access control method for a shared resource on a shared bus in a multiprocessor system, comprising: a plurality of processors; and a read / write enabled connected to a local bus which is a unique space of each of the processors. A semaphore register, and an exclusive access arbitration circuit for granting access to any one of the processors via the semaphore register to a shared resource access request written to each of the semaphore registers by the processor, At the time of a request for simultaneous access to resources, the processor writes an access request to the semaphore register existing in each unique space, the access request is arbitrated by the exclusive access arbitration circuit, and the processor reads the semaphore register. The result of the arbitration Then, an access right is given to any one of the processors, and when the access to the shared resource is completed, the processor writes the access completion to the semaphore register on the local bus, A shared resource exclusive access control method, wherein the exclusive access arbitration circuit newly arbitrates an access request from another processor and notifies the processor of the arbitration result via the semaphore register.
JP330698A 1998-01-09 1998-01-09 Exclusive access control method for shared resource Pending JPH11203253A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP330698A JPH11203253A (en) 1998-01-09 1998-01-09 Exclusive access control method for shared resource

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP330698A JPH11203253A (en) 1998-01-09 1998-01-09 Exclusive access control method for shared resource

Publications (1)

Publication Number Publication Date
JPH11203253A true JPH11203253A (en) 1999-07-30

Family

ID=11553683

Family Applications (1)

Application Number Title Priority Date Filing Date
JP330698A Pending JPH11203253A (en) 1998-01-09 1998-01-09 Exclusive access control method for shared resource

Country Status (1)

Country Link
JP (1) JPH11203253A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008033893A (en) * 2006-07-07 2008-02-14 Nec Electronics Corp Multiprocessor system and access right setting method in multiprocessor system
JP2011232956A (en) * 2010-04-27 2011-11-17 Clarion Co Ltd Computer system and program
KR101110550B1 (en) * 2009-04-08 2012-02-08 한양대학교 산학협력단 Processor, Multi-processor System And Method For Controlling Access Authority For Shared Memory In Multi-processor System

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008033893A (en) * 2006-07-07 2008-02-14 Nec Electronics Corp Multiprocessor system and access right setting method in multiprocessor system
KR101110550B1 (en) * 2009-04-08 2012-02-08 한양대학교 산학협력단 Processor, Multi-processor System And Method For Controlling Access Authority For Shared Memory In Multi-processor System
JP2011232956A (en) * 2010-04-27 2011-11-17 Clarion Co Ltd Computer system and program

Similar Documents

Publication Publication Date Title
US4449183A (en) Arbitration scheme for a multiported shared functional device for use in multiprocessing systems
US6490642B1 (en) Locked read/write on separate address/data bus using write barrier
JP3579198B2 (en) Data processing system and data processing method
JP5558982B2 (en) Method and apparatus for performing atomic semaphore operations
US20070094430A1 (en) Method and apparatus to clear semaphore reservation
US7581054B2 (en) Data processing system
US6694397B2 (en) Request queuing system for a PCI bridge
JP2008130056A (en) Semiconductor circuit
JP4874165B2 (en) Multiprocessor system and access right setting method in multiprocessor system
US8458411B2 (en) Distributed shared memory multiprocessor and data processing method
US9984014B2 (en) Semiconductor device
JP2000047994A (en) Information processor
US6959354B2 (en) Effective bus utilization using multiple bus interface circuits and arbitration logic circuit
JPH0728758A (en) And device for dynamic time loop arbitration
US20120221754A1 (en) System on chip bus system and a method of operating the bus system
JPH10143467A (en) Method and device for arbitrating bus ownership in data processing system
US7062588B2 (en) Data processing device accessing a memory in response to a request made by an external bus master
JP2591502B2 (en) Information processing system and its bus arbitration system
GB2412767A (en) Processor with at least two buses between a read/write port and an associated memory with at least two portions
US5627968A (en) Data transfer apparatus which allows data to be transferred between data devices without accessing a shared memory
US6189061B1 (en) Multi-master bus system performing atomic transactions and method of operating same
US6502150B1 (en) Method and apparatus for resource sharing in a multi-processor system
JPH11203253A (en) Exclusive access control method for shared resource
US20100153610A1 (en) Bus arbiter and bus system
JPH09153009A (en) Arbitration method for hierarchical constitution bus