Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3996355B2 - Multiprocessor system - Google Patents
[go: Go Back, main page]

JP3996355B2 - Multiprocessor system - Google Patents

Multiprocessor system Download PDF

Info

Publication number
JP3996355B2
JP3996355B2 JP2001083506A JP2001083506A JP3996355B2 JP 3996355 B2 JP3996355 B2 JP 3996355B2 JP 2001083506 A JP2001083506 A JP 2001083506A JP 2001083506 A JP2001083506 A JP 2001083506A JP 3996355 B2 JP3996355 B2 JP 3996355B2
Authority
JP
Japan
Prior art keywords
register
lock
communication
request
processor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2001083506A
Other languages
Japanese (ja)
Other versions
JP2002278947A (en
Inventor
拓 若林
隆喜 中村
直伸 助川
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2001083506A priority Critical patent/JP3996355B2/en
Publication of JP2002278947A publication Critical patent/JP2002278947A/en
Application granted granted Critical
Publication of JP3996355B2 publication Critical patent/JP3996355B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Multi Processors (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、マルチプロセッサシステムにおける通信制御技術に関し、特にロック/アンロック処理を高速化する通信制御技術等に適用して有効な技術に関する。
【0002】
【従来の技術】
マルチプロセッサシステムにおいて効率よいマルチプロセス制御または並列プロセス制御を行うためには、プロセッサ間の高速な同期、排他、通信制御が必要である。そのために通信レジスタと呼ばれる主記憶より高速な共有のレジスタを使用する場合がある。
【0003】
特開2000−187652号公報においては、図7に示すマルチプロセッサシステムにおいて、図8の構成をとる通信レジスタを用いたプロセッサ間の高速な同期の例が開示されている。
【0004】
N個の通信レジスタモジュール400〜402はN個のプロセッサ10〜12と信号線L80〜L82を介して1対1に接続される。各プロセッサ10〜12は、信号線L80〜L82にロードストア要求および主記憶の実アドレスを出力する。通信レジスタモジュール400〜402は複数のレジスタから構成される通信レジスタ群500〜502を有し、通信レジスタモジュール間は通信モジュール間バス700で結合される。通信レジスタ群500〜502の各々内の相対応する番号のレジスタは通信レジスタモジュール間で同一の値を保持するよう制御されている(これを「通信レジスタがミラーリングされている」と呼ぶ)。信号線L80〜L82上のロードストア要求は、通信レジスタモジュール内のデコーダ430〜432でデコードされ、要求が主記憶30へのアクセス要求である場合は、相互結合網20を介して主記憶30をアクセスするよう制御され、要求が通信レジスタへのアクセス要求である場合は、通信モジュール間バス700を介して通信レジスタ群500〜502をアクセスするよう制御される。
【0005】
具体的には、プロセッサから書き込み要求が来た場合は、全通信レジスタモジュールに対して同一の値を書き込むよう相互結合網20、または通信モジュール間バス700が制御し、プロセッサ10〜12からの読み出し要求に対しては、各プロセッサ10〜12に対応する通信レジスタモジュール400〜402内のレジスタから値を読み出す。
【0006】
各通信レジスタはメモリマップドレジスタ方式(MMR方式)により、メモリアドレス空間上にマッピングされる。本従来例においては、ロック要求時、通信レジスタに非ロック状態を示す固定値が設定されていた場合、該通信レジスタには、ロック要求を発行したプロセッサのプロセッサ番号が設定され、リプライデータにも同じプロセッサ番号が返される。一方、通信レジスタに非ロック状態を示す固定値以外の値が設定されていたら、通信レジスタの内容(この場合はロックをかけている他のプロセッサ番号)をリプライデータとして返す。プロセッサはリプライデータの値が、自プロセッサ番号ならロック成功、他プロセッサ番号ならロック失敗を検知することができ、従来のプロセッサアーキテクチャを変えることなく、ロード/ストア要求によって、ロック/アンロック処理が可能になる。
【0007】
また、ロック値をプロセッサ番号ではなく、個々のプロセッサ内にて並行動作する複数のプロセスの各々を識別するためにユニークに付与されたプロセス番号とし、マルチプロセス時にプロセス単位でロック/アンロック処理を実現することも可能である。
【0008】
【発明が解決しようとする課題】
上述の特開2000−187652号公報に示されるマルチプロセッサシステムではプロセス番号をロック値として使用する場合、通信レジスタモジュール内の通信レジスタ本数を、ロック要求元であるプロセスの数に応じて増加させる必要がある。また、通信レジスタがミラーリングされているため、通信レジスタの増加がシステム全体の物量に与える影響も大きい。
【0009】
一方、ミラーリングせずに、通信レジスタが通信レジスタモジュール間で個別の内容を持つように制御する案も考えられる(これを「通信レジスタをフラットに置く」と呼ぶ)。こうすれば、物量の増大は抑えられるが、異なる通信レジスタモジュールに存在する通信レジスタへのアクセスやロック成功/失敗の報告信号が、通信モジュール間バスを中継しなければならず、アクセス速度が低下する。
【0010】
本発明の目的は、複数のプロセッサにて主記憶を共有するマルチプロセッサシステムにおいて、回路や論理物量等を増大させることなく、プロセッサ間の同期、排他、通信制御のための多数のロック/アンロック要求の処理を的確に実現することが可能な技術を提供することにある。
【0011】
本発明の他の目的は、複数のプロセッサにて主記憶を共有するマルチプロセッサシステムにおいて、主記憶に対するアクセス速度を低下させることなく、プロセッサ間の同期、排他、通信制御のための多数のロック/アンロック要求の処理を的確に実現することが可能な技術を提供することにある。
【0012】
本発明の他の目的は、複数のプロセッサにて主記憶を共有するマルチプロセッサシステムにおいて、回路や論理物量等の増大や主記憶に対するアクセス速度の低下を生じることなく、個々のプロセッサにて並行動作する複数のプロセス間での同期、排他、通信制御のための多数のロック/アンロック要求の処理を的確に実現することが可能な技術を提供することにある。
【0013】
本発明の他の目的は、複数のプロセッサにて主記憶を共有するマルチプロセッサシステムにおいて、プロセッサアーキテクチャ等に変更を加えることなく、プロセッサ間あるいはプロセス間の同期、排他、通信制御のための多数のロック/アンロック要求の処理を的確に実現することが可能な技術を提供することにある。
【0014】
【課題を解決するための手段】
本発明は、主記憶と、この主記憶を共有する複数のプロセッサの各々との間に、通信レジスタを介在させた構成のマルチプロセッサシステムにおいて、前記通信レジスタは、ロック/アンロック状態を保持する第1のレジスタとロック/アンロック情報を保持する第2のレジスタを持つ構成としたものである。また、ロック/アンロック状態を保持する第1のレジスタは、通信レジスタモジュール間でミラーリングされている。つまり、通信レジスタモジュール間で同一の値を保持するよう制御される。一方、ロック/アンロック情報を保持する第2のレジスタは、各通信レジスタモジュール間でフラットに置かれる。つまり、通信レジスタモジュール毎に個別の内容を保持する。
【0015】
【発明の実施の形態】
以下、本発明の実施の形態を図面を参照しながら詳細に説明する。
【0016】
図1は、本発明の一実施の形態であるマルチプロセッサシステムの全体構成の一例を示す概念図であり、図2、図3および図4は、その構成の一例をより詳細に例示した概念図である。
【0017】
本実施の形態のマルチプロセッサシステムは、複数のプロセッサ10(#1〜#NのN個)が、通信レジスタ40および相互結合網20を介して主記憶30を共有する構成となっている。通信レジスタ40は複数の通信レジスタモジュール400(#1〜#NのN個)を含んでいる。
【0018】
複数の通信レジスタモジュール400の各々は、複数のプロセッサ10の各々と信号線L80を介して1対1に接続される。各プロセッサ10は、信号線L80にロードストア要求および主記憶30の実アドレスを出力する。
【0019】
図2に例示されるように、個々の通信レジスタモジュール400は複数のレジスタから構成される通信レジスタ群500(#1〜#N)を有し、通信レジスタモジュール400の間は通信モジュール間バス700で結合される。信号線L80上のロードストア要求は、通信レジスタモジュール400内のデコーダ430でデコードされ、要求が主記憶30へのアクセス要求である場合は、信号線L80および相互結合網20を介して主記憶30をアクセスするよう制御され、要求が通信レジスタ40へのアクセス要求である場合は、通信モジュール間バス700を介して通信レジスタ群500をアクセスするよう制御される。
【0020】
なお、通信モジュール間バス700は、全通信レジスタモジュール400へのブロードキャスト書き込み要求が、同時に全通信レジスタモジュールに到達することが保証できれば、バスではなく結合網で構成してもよい。
【0021】
図3に、本実施の形態における通信レジスタ群500の構成の一例を示す。本実施の形態の場合、通信レジスタ群500には、ロック情報レジスタ510とロック状態レジスタ520の2種類の通信レジスタが存在する。
【0022】
ロック情報レジスタ510は、複数のビットから構成されるレジスタであり、通信レジスタ群500の全てにわたって合計N×M本存在する。各レジスタには固有の番号(1からN×Mまで)がレジスタ番号として割り当てられている。各レジスタの実体は、N個の通信レジスタモジュールそれぞれにM本ずつ分配されて存在する。具体的には、通信レジスタモジュール#1内にはレジスタ番号1からMまで、通信レジスタモジュール#2内にはレジスタ番号M+1から2Mまで、通信レジスタモジュール#N内にはレジスタ番号(N−1)M+1からN×Mまで、といった形でレジスタが各通信レジスタモジュールに割り振られる。
【0023】
ロック状態レジスタ520は、1ビットのフラグレジスタであり、各通信レジスタ群毎にN×M本ずつ存在する。レジスタ番号は各通信レジスタ群500毎に1からN×Mまで割り当てられる。異なる通信レジスタモジュール400間で対応するレジスタ番号をもつレジスタは同一の値を保持する(一つの通信レジスタモジュール400内でのロック状態レジスタ520の変更が、常に他の通信レジスタモジュール400内でのロック状態レジスタ520に反映される)ように制御される。
【0024】
つまり、ロック情報レジスタ510は各通信レジスタモジュール間でフラットに置かれ、ロック状態レジスタ520は各通信レジスタモジュール間でミラーリングされる。これらはいずれも実アドレスにマッピングされ、レジスタへのアクセスは、メモリアクセスを行うロード/ストア等の命令で行う。
【0025】
ロック状態レジスタ520のフラグがセットされている場合はその通信レジスタはロック状態にあることを示し、対応するレジスタ番号をもつロック情報レジスタ510には、ロック処理を要求したプロセスのプロセス番号が設定される。また、ロック状態レジスタ520のフラグがリセットされている場合はその通信レジスタはアンロック状態であることを示し、ロック情報レジスタ510の内容はDon’t careである。
【0026】
プロセス番号を設定するレジスタ(ロック情報レジスタ510)はフラットに存在し、通信レジスタ全体をミラーリングする場合に比べ物量の増大を抑えることができる。また、フラグレジスタ(ロック状態レジスタ520)のみミラーリングするため、ロック要求に対するロック成功/失敗の報告を通信モジュール間バス700を介さずにプロセッサ10に返すことが可能になる。
【0027】
ロック情報レジスタ510とロック状態レジスタ520へアクセスして、実際にロック/アンロック処理を行うには、従来アーキテクチャでロックフラグが主記憶30上にある場合のロック/アンロック処理時に使用する命令を使用する。本実施例では、一例として、PowerPCアーキテクチャにおけるロックフラグ操作用命令を用いる。
【0028】
なお、PowerPCアーキテクチャにおけるメモリ同期命令等については、たとえば、ソフトバンク株式会社1994年12月10日発行「Inside PowerPC」P181以降、等の文献に記載されている。
【0029】
PowerPCアーキテクチャにおいて、主記憶上にロックフラグが存在する場合のロック/アンロック処理は図5に示す命令列によって実現する。
【0030】
図5の各命令の意味を以下に示す。尚、r3はロックフラグの存在する主記憶上のアドレスが入っているレジスタ、r5は読み出したロックフラグ値を格納するレジスタ、r4は新たに設定するロック値が入っているレジスタである。
【0031】
lwarx r5,0,r3:ロックフラグの値を読み出し、レジスタr5に格納する。同時にリザベーション(後述)を確立する。
【0032】
cmp r5,0:r5の値をゼロと比較する。
【0033】
bc loop:r5の値がゼロでないならば、loopへ戻る。
【0034】
stwcx.r4,0,r3:リザベーションが残っていたらロックフラグにr4の値を書き込みに成功する。リザベーションが破棄されていたら、ロックフラグ書き込みに失敗する。
【0035】
bc loop:ロックフラグ書き込みが失敗していたらloopへ戻る。成功していたら、次行以降のクリティカル・リージョン内の命令列を実行する。
【0036】
sync:クリティカル・リージョン内の命令実行がすべて完了したことを保証する。
【0037】
stw 0,0(r3):ロックフラグにゼロを書き込む。
【0038】
前半5行に渡る命令列がロック処理、最後の1行がアンロック処理、それ以外はクリティカル・リージョンを示す。
【0039】
lwarx命令、stwcx.命令はそれぞれロード・アンド・リザーブ命令、ストア・コンディショナル命令と呼ばれ、PowerPCアーキテクチャにおけるアトミックな処理を実現する際に、常に対となって使用される命令である。
【0040】
ロード・アンド・リザーブ命令は、指定アドレスに対して、内容をリードする動作を行うとともに、リザベーションと呼ばれる保護領域を確立する。ストア・コンディショナル命令は、先行するロード・アンド・リザーブ命令によって確立されたリザベーションが破棄されていなかったら、指定アドレスへのライト動作を実行し、プロセッサにストア動作の「成功」を報告する。もし、リザベーションが存在する時に、他のプロセッサがストア命令を発行して、該アドレスの内容を更新すると、リザベーションは破棄される。この状態で、最初にロード・アンド・リザーブ命令を発行したプロセッサが、ストア・コンディショナル命令を発行すると、ストア動作は行われず、「失敗」したことを示すリプライをプロセッサに報告する。
【0041】
ロック処理を実現する場合、プロセッサはまず主記憶上のロックフラグに対してロード・アンド・リザーブ命令を発行する。読み出されたフラグ値がゼロでない場合は、他のプロセッサがロック中なので、自プロセッサはloopに戻り、フラグ値がゼロになるまで、ロード・アンド・リザーブ命令を繰り返す。フラグ値がゼロになったら、ストア・コンディショナル命令によって、ロックフラグを設定する。このとき、自プロセッサよりも他のプロセッサのロックフラグ設定が早いと、リザベーションが破棄されるので、フラグ値設定に失敗し、再びloopに戻ってロック値がゼロになるのを待つ。フラグ値設定に成功した場合、クリティカル・リージョンを実行する。クリティカル・リージョン実行後は、ロックフラグにゼロをストアしてアンロック処理を行う。
【0042】
図6に、本実施の形態におけるロック情報レジスタ510およびロック状態レジスタ520を使用してロック/アンロック処理を行う場合の命令列を例示する。
【0043】
図6の各命令の意味を以下に示す。尚、r3はロック情報レジスタR0のマッピングされている実アドレスが格納されているレジスタ、r4は新たに設定するロック値が入っているレジスタである。
【0044】
stwcx.r4,0,r3:ロック状態レジスタF0の値がゼロの場合、ロック状態レジスタF0を1にセットし、ロック情報レジスタR0にr4の値を書き込むことに成功する。ロック状態レジスタF0の値が1の場合、書き込み動作に失敗する。
【0045】
bc loop:フラグ書き込みが「失敗」ならばloopへ戻る。「成功」ならば、次行以降のクリティカル・リージョンに移る。
【0046】
sync:クリティカル・リージョン内の命令実行がすべて完了したことを保証する。
【0047】
stw 0,0(r3):ロック情報レジスタR0にゼロを書き込み、同時にロック状態レジスタF0にゼロをセットする。
【0048】
前半2行分の命令列がロック処理、最後の1行がアンロック処理、それ以外がクリティカル・リージョンである。
【0049】
ここでのストア・コンディショナル命令の動作は、図5の例の動作とは全く異なる。オペランドにはロック情報レジスタ510しか明示しないが、発行されると、対応するロック状態レジスタ520のフラグ値も参照・更新する。フラグ値がゼロならば、フラグをセットし、ロック情報レジスタ510にロック値を設定し、プロセッサに「成功」報告を行う。フラグ値が1ならば、フラグもロック値も設定せず、プロセッサに「失敗」報告を行う。
【0050】
ロック処理を実現する場合、まず、ロック情報レジスタ510に対してストア・コンディショナル命令を発行する。すると、対応するロック状態レジスタ520のフラグ値を参照し、フラグ値がゼロならば非ロック状態であるので、フラグをセットし、ロック情報レジスタ510にロック値を設定する。フラグ値が1ならば、他のプロセスによってロックされている状態なので、loopに戻り、再びストア・コンディショナル命令を繰り返す。ロック値設定に成功したら、クリティカル・リージョンを実行する。クリティカル・リージョン実行後は、ロック情報レジスタ510に対してストア命令を発行する。すると、対応するロック状態レジスタ520のフラグ値を無条件にゼロとし、ロック情報レジスタ510に値を書き込んで、アンロック処理を行う。
【0051】
このように、本実施の形態では、主記憶30をアクセスする場合と通信レジスタ40をアクセスする場合とで、既存のロックフラグを操作する命令の動作を切り替えている。切り替え制御を通信レジスタモジュール400内で行えば、従来のプロセッサアーキテクチャを変更することなく、通信レジスタ40を用いた高速ロック処理を実現することができる。また、その高速性は、図5と図6との命令列数の差に示されるように、ロック処理に要する命令数を削減して実行時間を短縮できることからも明白である。
【0052】
図4に本実施の形態のマルチプロセッサシステムにおける個々の通信レジスタモジュール400の構成の一例を示す。
【0053】
信号線L80から入力された要求はデコーダ430により解析され、ロード/ストア要求であった場合には、アクセスアドレスが通信レジスタ40にマッピングされた範囲外であれば、要求を信号線L80、相互結合網20を介して、主記憶30に送る。アクセスアドレスが通信レジスタ40にマッピングされた範囲内であれば、要求はリクエスト制御回路410に送られる。以下、要求ごとの動作を説明する。
【0054】
尚、本実施の形態の説明においては、要求を出したプロセッサ10と信号線L80を介して直接接続されている通信レジスタモジュール400を「マスタモジュール」、それ以外の通信レジスタモジュール400を「スレーブモジュール」とそれぞれ定義する。
【0055】
(a)ストア・コンディショナル要求(ロック要求)
ストア・コンディショナル要求が入力された場合、リクエスト制御回路410は、要求をセレクタ480に送り、それに基づきバス出力制御回路490は、通信モジュール間バス700に全通信レジスタモジュールにブロードキャスト出力するためのバス権を確保する。バス権確保が完了しブロードキャストが実行されると、自モジュールを含む全通信レジスタモジュール400のバス入力制御回路420に同時に要求が積まれる。
【0056】
バス入力制御回路420は要求を解析し、ロック情報レジスタ510が自モジュールにあるか調べる。そして、要求をレジスタ入力回路440に送る。それに基づき、書き込み対象のロック状態レジスタ520の内容が読み出されて、レジスタ出力回路450から出力される。その際、レジスタ入力回路440にはロック情報レジスタ510への書き込み値(この場合はロック要求元のプロセス番号値)とロック状態レジスタ520への書き込み値(この場合はロック成功時に書き込む値1)が、信号線L70からの指示信号を受け取るまで保持される。もし、書き込み対象となるロック情報レジスタ510が自モジュールに存在しない場合は、ロック状態レジスタ520への書き込み値のみが保持される。レジスタ出力回路450の出力は比較器460へ送られて、読み出された値がチェックされる。
【0057】
以降の動作は、自モジュールが、マスタモジュールかスレーブモジュールかによって、以下のように異なる。
【0058】
(a)−1:マスタモジュールの場合
読み出された値が1の場合は、他のプロセスによってロックされた状態であるのでロック失敗となり、リプライ制御回路470に、プロセッサへロックの「失敗」を示すリプライ報告を信号線L80を介して返すよう指示する。同時にレジスタ入力回路440に保持された書き込み値は破棄される。
【0059】
また、値がゼロの場合、非ロック状態なので、リプライ制御回路470に、プロセッサ10へロックの「成功」を示すリプライ報告を信号線L80を介して返すよう指示する。それと並行して、比較器460は信号線L70を通じてレジスタ入力回路440に、ロック情報レジスタ510への書き込み値とロック状態レジスタ520への書き込み値をレジスタに書き込むよう指示する。自モジュールに書き込み対象となるロック情報レジスタ510が存在しない場合は、ロック状態レジスタ520へのみ書き込みを行う。
【0060】
ロック状態レジスタ520はミラーリングされているため、プロセッサ10へのロック成功/失敗の報告は、通信モジュール間バス700を介さずに行うことができ、ロック処理の高速化が図れる。また、ロック情報レジスタ510はフラットに置かれるため、プロセス番号をロック値とする際に必要となる通信レジスタ数の増大によるシステムへの物量の影響を抑えることができる。
【0061】
(a)−2:スレーブモジュールの場合
読み出された値が1の場合は、他のプロセスによってロックされた状態であるのでロック失敗となり、レジスタ入力回路440内の値を破棄して処理を終わる。
【0062】
また、値がゼロの場合、非ロック状態なので、比較器460は信号線L70を通じてレジスタ入力回路440に、ロック情報レジスタ510への書き込み値とロック状態レジスタ520への書き込み値をレジスタに書き込むよう指示する。自モジュールに書き込み対象となるロック情報レジスタ510が存在しない場合は、ロック状態レジスタ520へのみ書き込みを行う。
【0063】
通信レジスタ40へのアクセス要求は、いったん通信モジュール間バス700経由でブロードキャストされ、バス入力制御回路420を介してからアクセスが行われる。そのため、複数のプロセスがほぼ同時に同じ通信レジスタ40に対してロック要求を発しても、要求は通信モジュール間バス700上でシリアライズされ、ロック要求のすり抜けは発生しない。
【0064】
(b)ストア要求(アンロック要求)
ストア要求が入力された場合、リクエスト制御回路410は、要求をセレクタ480に送り、それに基づきバス出力制御回路490は、通信モジュール間バス700にロック情報レジスタ510への書き込み値(この場合ストア命令で指定されたストアデータ)とロック状態レジスタ520への書き込み値(この場合フラグリセット値)を出力するためのバス権を確保する。バス権を確保し書き込み値をブロードキャストすると、自モジュールを含む全通信レジスタモジュールのバス入力制御回路420に同時に書き込み要求が積まれる。バス入力制御回路420は要求を解析し、自モジュールにロック情報レジスタ510があるか調べる。ある場合には、ロック情報レジスタ510とロック状態レジスタ520の両方への書き込み値をレジスタ入力回路440に送り、ない場合にはロック状態レジスタ520への書き込み値だけをレジスタ入力回路440に送る。それに基づき、通信レジスタ群500に書き込みが行われる。
【0065】
(c)ロード要求
ロード要求が入力された場合、リクエスト制御回路410は、要求をセレクタ480に送り、それに基づきバス出力制御回路490は、通信モジュール間バス700にロック情報レジスタ510またはロック状態レジスタ520への読み出し要求を出力するためのバス権を確保する。バス権を確保し要求をブロードキャストすると、自モジュールを含む全通信レジスタモジュール400のバス入力制御回路420に同時に読み出し要求が積まれる。
【0066】
バス入力制御回路420は要求を解析し、自モジュールにアクセス先のレジスタが存在する場合、要求をレジスタ入力回路440に送る。それに基づき、通信レジスタ群500内のレジスタの値が読み出され、レジスタ出力回路450から出力される。読み出された値はセレクタ480に送られ、バス出力制御回路490は、通信モジュール間バス700に読み出し値を出力するためにバス権を確保する。バス権を確保すると、値はバスを通じてロード要求元の通信レジスタモジュール400のバス入力制御回路420に送られる。
【0067】
ロード要求元の通信レジスタモジュール400のバス入力制御回路420は信号線L90を通じて、リプライ制御回路470に、値をロード要求発行元のプロセッサにリプライするよう指示し、リプライ値が信号線L80を通じてプロセッサ10に返される。
【0068】
以上説明したように、本実施の形態のマルチプロセッサシステムによれば、以下のことが可能となる。
【0069】
通信レジスタ40をロック情報レジスタ510とロック状態レジスタ520に分化し、通信レジスタモジュール400間でロック情報レジスタ510をフラットに持ち、ロック状態レジスタ520をミラーリングして持つことで、たとえば各プロセッサ10で稼働するプロセス単位でロック処理を行うマルチプロセッサシステムの物量増大を抑えることが可能になり、また、ロック処理時におけるプロセッサ10へのロック成功/失敗報告を通信モジュール間バス700を介さずにできるため、ロック処理の高速化が可能になる。
【0070】
通信レジスタ40へのアクセス要求は、通信モジュール間バス700経由でブロードキャストされ、シリアライズされるので、複数のプロセスがほぼ同時に同じ通信レジスタ40に対してロック要求を発しても、ロック要求のすり抜けを防ぐことができる。
【0071】
従来ロックフラグ操作命令を用い、ロックフラグが主記憶30に存在する場合と通信レジスタ40に存在する場合とで命令の動作を通信レジスタモジュール400内で切り替える制御を行うことにより、従来アーキテクチャのプロセッサ10を使用して高速なロック/アンロック処理を実現することができる。
【0072】
以上本発明者によってなされた発明を実施の形態に基づき具体的に説明したが、本発明は前記実施の形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。
【0073】
たとえば、プロセッサとしては、PowerPCアーキテクチャに限らず、一般のプロセッサに広く適用することができる。
【0074】
【発明の効果】
本発明によれば、複数のプロセッサにて主記憶を共有するマルチプロセッサシステムにおいて、回路や論理物量等を増大させることなく、プロセッサ間の同期、排他、通信制御のための多数のロック/アンロック要求の処理を的確に実現することができる、という効果が得られる。
【0075】
本発明によれば、複数のプロセッサにて主記憶を共有するマルチプロセッサシステムにおいて、主記憶に対するアクセス速度を低下させることなく、プロセッサ間の同期、排他、通信制御のための多数のロック/アンロック要求の処理を的確に実現することができる、という効果が得られる。
【0076】
本発明によれば、複数のプロセッサにて主記憶を共有するマルチプロセッサシステムにおいて、回路や論理物量等の増大や主記憶に対するアクセス速度の低下を生じることなく、個々のプロセッサにて並行動作する複数のプロセス間での同期、排他、通信制御のための多数のロック/アンロック要求の処理を的確に実現することができる、という効果が得られる。
【0077】
本発明によれば、複数のプロセッサにて主記憶を共有するマルチプロセッサシステムにおいて、プロセッサアーキテクチャ等に変更を加えることなく、プロセッサ間あるいはプロセス間の同期、排他、通信制御のための多数のロック/アンロック要求の処理を的確に実現することができる、という効果が得られる。
【図面の簡単な説明】
【図1】本発明の一実施の形態であるマルチプロセッサシステムの全体構成の一例を示す概念図である。
【図2】本発明の一実施の形態であるマルチプロセッサシステムの構成の一部をより詳細に例示した概念図である。
【図3】本発明の一実施の形態であるマルチプロセッサシステムの構成の一部をより詳細に例示した概念図である。
【図4】本発明の一実施の形態であるマルチプロセッサシステムの構成の一部をより詳細に例示した概念図である。
【図5】ロックフラグを主記憶上に置く場合の、プロセッサによるロック処理の命令列の一例を示す説明図である。
【図6】本発明の一実施の形態であるマルチプロセッサシステムにおけるプロセッサによるロック処理の命令列の一例を示す説明図である。
【図7】従来のマルチプロセッサシステムの構成を示す概念図である。
【図8】従来のマルチプロセッサシステムにおける構成の一部をより詳細に示す概念図である。
【符号の説明】
10…プロセッサ、20…相互結合網、30…主記憶、40…通信レジスタ、400…通信レジスタモジュール、410…リクエスト制御回路、420…バス入力制御回路、430…デコーダ、440…レジスタ入力回路、450…レジスタ出力回路、460…比較器、470…リプライ制御回路、480…セレクタ、490…バス出力制御回路、500…通信レジスタ群、510…ロック情報レジスタ(第2のレジスタ)、520…ロック状態レジスタ(第1のレジスタ)、700…通信モジュール間バス、L70…信号線、L80…信号線、L90…信号線。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a communication control technique in a multiprocessor system, and more particularly to a technique effective when applied to a communication control technique for speeding up lock / unlock processing.
[0002]
[Prior art]
In order to perform efficient multi-process control or parallel process control in a multi-processor system, high-speed synchronization, exclusion, and communication control between processors are necessary. Therefore, a shared register called a communication register that is faster than the main memory may be used.
[0003]
Japanese Patent Application Laid-Open No. 2000-187852 discloses an example of high-speed synchronization between processors using a communication register having the configuration shown in FIG. 8 in the multiprocessor system shown in FIG.
[0004]
The N communication register modules 400 to 402 are connected to the N processors 10 to 12 on a one-to-one basis via signal lines L80 to L82. Each of the processors 10 to 12 outputs a load store request and a main memory real address to the signal lines L80 to L82. The communication register modules 400 to 402 have communication register groups 500 to 502 including a plurality of registers, and the communication register modules are coupled to each other via a communication module bus 700. Registers with numbers corresponding to each other in each of the communication register groups 500 to 502 are controlled so as to hold the same value between the communication register modules (this is referred to as “the communication register is mirrored”). The load store requests on the signal lines L80 to L82 are decoded by the decoders 430 to 432 in the communication register module. When the request is an access request to the main memory 30, the main memory 30 is stored via the interconnection network 20. When access is controlled and the request is an access request to the communication register, the communication register group 500 to 502 is controlled to be accessed via the inter-communication module bus 700.
[0005]
Specifically, when a write request is received from the processor, the interconnection network 20 or the inter-communication module bus 700 controls to write the same value to all the communication register modules, and the reading from the processors 10 to 12 is performed. In response to the request, values are read from the registers in the communication register modules 400 to 402 corresponding to the processors 10 to 12.
[0006]
Each communication register is mapped on the memory address space by a memory mapped register method (MMR method). In this conventional example, when a lock request is made and a fixed value indicating an unlocked state is set in the communication register, the processor number of the processor that issued the lock request is set in the communication register, and the reply data is also set in the reply data. The same processor number is returned. On the other hand, if a value other than a fixed value indicating an unlocked state is set in the communication register, the contents of the communication register (in this case, the other processor number that is locked) are returned as reply data. If the value of the reply data is the own processor number, the processor can detect the lock success, and if the other processor number, the lock failure can be detected, and lock / unlock processing can be performed by load / store requests without changing the conventional processor architecture. become.
[0007]
Also, the lock value is not a processor number, but a process number uniquely assigned to identify each of a plurality of processes operating in parallel within each processor, and lock / unlock processing is performed in units of processes during multi-process. It can also be realized.
[0008]
[Problems to be solved by the invention]
When the process number is used as a lock value in the multiprocessor system disclosed in the above Japanese Patent Laid-Open No. 2000-187852, it is necessary to increase the number of communication registers in the communication register module in accordance with the number of processes that are lock request sources. There is. In addition, since the communication register is mirrored, the influence of the increase in the communication register on the physical quantity of the entire system is great.
[0009]
On the other hand, it is also conceivable to perform control so that the communication register has individual contents between the communication register modules without mirroring (this is referred to as “laying the communication register flat”). In this way, the increase in the amount can be suppressed, but the access signal to the communication register existing in the different communication register module and the report signal of the lock success / failure must be relayed through the communication module bus, and the access speed decreases. To do.
[0010]
An object of the present invention is to provide a large number of locks / unlocks for synchronization, exclusion, and communication control between processors in a multiprocessor system in which a main memory is shared by a plurality of processors without increasing a circuit or a logical amount. The object is to provide a technology capable of accurately realizing the processing of a request.
[0011]
Another object of the present invention is to provide a large number of locks for synchronization, exclusion, and communication control between processors without reducing the access speed to the main memory in a multiprocessor system in which a plurality of processors share the main memory. An object of the present invention is to provide a technique capable of accurately realizing processing of an unlock request.
[0012]
Another object of the present invention is a multiprocessor system in which a plurality of processors share a main memory, and the parallel operation of individual processors without causing an increase in circuit or logical quantity or a decrease in access speed to the main memory. It is an object of the present invention to provide a technique capable of accurately realizing processing of a large number of lock / unlock requests for synchronization, exclusion, and communication control among a plurality of processes.
[0013]
Another object of the present invention is that in a multiprocessor system in which a main memory is shared by a plurality of processors, a number of units for synchronization, exclusion, and communication control between processors or between processes without changing the processor architecture or the like. An object of the present invention is to provide a technique capable of accurately realizing processing of a lock / unlock request.
[0014]
[Means for Solving the Problems]
According to the present invention, in a multiprocessor system having a configuration in which a communication register is interposed between a main memory and each of a plurality of processors sharing the main memory, the communication register holds a locked / unlocked state. In this configuration, a first register and a second register for holding lock / unlock information are provided. The first register that holds the locked / unlocked state is mirrored between the communication register modules. That is, the communication register modules are controlled to hold the same value. On the other hand, the second register holding the lock / unlock information is placed flat between the communication register modules. That is, individual contents are held for each communication register module.
[0015]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[0016]
FIG. 1 is a conceptual diagram showing an example of the overall configuration of a multiprocessor system according to an embodiment of the present invention, and FIGS. 2, 3 and 4 are conceptual diagrams illustrating an example of the configuration in more detail. It is.
[0017]
The multiprocessor system according to the present embodiment is configured such that a plurality of processors 10 (N from # 1 to #N) share the main memory 30 via the communication register 40 and the interconnection network 20. The communication register 40 includes a plurality of communication register modules 400 (N of # 1 to #N).
[0018]
Each of the plurality of communication register modules 400 is connected to each of the plurality of processors 10 on a one-to-one basis via a signal line L80. Each processor 10 outputs the load store request and the real address of the main memory 30 to the signal line L80.
[0019]
As illustrated in FIG. 2, each communication register module 400 includes a communication register group 500 (# 1 to #N) including a plurality of registers, and a communication module bus 700 is provided between the communication register modules 400. Combined with The load / store request on the signal line L80 is decoded by the decoder 430 in the communication register module 400. When the request is an access request to the main memory 30, the main memory 30 is connected via the signal line L80 and the interconnection network 20. If the request is an access request to the communication register 40, the communication register group 500 is controlled to be accessed via the inter-communication module bus 700.
[0020]
Note that the inter-communication module bus 700 may be constituted by a coupled network instead of a bus as long as it is guaranteed that broadcast write requests to all the communication register modules 400 reach all the communication register modules at the same time.
[0021]
FIG. 3 shows an example of the configuration of the communication register group 500 in the present embodiment. In the present embodiment, the communication register group 500 includes two types of communication registers, a lock information register 510 and a lock state register 520.
[0022]
The lock information register 510 is a register composed of a plurality of bits, and there are a total of N × M registers throughout the communication register group 500. Each register is assigned a unique number (1 to N × M) as a register number. Each register entity is distributed by M to N communication register modules. Specifically, register numbers 1 to M are set in the communication register module # 1, register numbers M + 1 to 2M are set in the communication register module # 2, and register number (N-1) is set in the communication register module #N. Registers are allocated to each communication register module in the form of M + 1 to N × M.
[0023]
The lock status register 520 is a 1-bit flag register, and there are N × M registers for each communication register group. Register numbers from 1 to N × M are assigned to each communication register group 500. Registers having corresponding register numbers between different communication register modules 400 hold the same value (changes in the lock status register 520 in one communication register module 400 always lock in other communication register modules 400 Is reflected in the status register 520).
[0024]
That is, the lock information register 510 is placed flat between the communication register modules, and the lock status register 520 is mirrored between the communication register modules. All of these are mapped to real addresses, and access to the registers is performed by instructions such as load / store for performing memory access.
[0025]
When the flag of the lock state register 520 is set, it indicates that the communication register is in the lock state, and the process number of the process that requested the lock process is set in the lock information register 510 having the corresponding register number. The When the flag of the lock state register 520 is reset, it indicates that the communication register is unlocked, and the content of the lock information register 510 is Don't care.
[0026]
A register for setting a process number (lock information register 510) exists in a flat manner, and an increase in the amount of material can be suppressed as compared with the case where the entire communication register is mirrored. In addition, since only the flag register (lock status register 520) is mirrored, it is possible to return a lock success / failure report for the lock request to the processor 10 without going through the inter-communication module bus 700.
[0027]
In order to access the lock information register 510 and the lock status register 520 and actually perform the lock / unlock process, an instruction used in the lock / unlock process when the lock flag is on the main memory 30 in the conventional architecture is used. use. In this embodiment, as an example, a lock flag operation instruction in the PowerPC architecture is used.
[0028]
Note that the memory synchronization instruction and the like in the PowerPC architecture are described in documents such as “Inside PowerPC” P181 issued on and after December 10, 1994, SOFTBANK CORP.
[0029]
In the PowerPC architecture, the lock / unlock process when the lock flag exists in the main memory is realized by the instruction sequence shown in FIG.
[0030]
The meaning of each command in FIG. 5 is shown below. Note that r3 is a register that contains an address on the main memory where the lock flag exists, r5 is a register that stores the read lock flag value, and r4 is a register that contains a newly set lock value.
[0031]
lwarx r5, 0, r3: The value of the lock flag is read and stored in the register r5. At the same time, reservation (described later) is established.
[0032]
Compare the value of cmp r5,0: r5 with zero.
[0033]
bc loop: If the value of r5 is not zero, return to loop.
[0034]
stwcx. r4, 0, r3: If the reservation remains, the value r4 is successfully written to the lock flag. If the reservation has been discarded, writing the lock flag fails.
[0035]
bc loop: Return to loop if the lock flag writing has failed. If successful, execute the instruction sequence in the critical region after the next line.
[0036]
sync: guarantees that all instruction execution in the critical region is complete.
[0037]
stw 0,0 (r3): Write zero to the lock flag.
[0038]
The instruction sequence over the first five lines indicates the lock process, the last line indicates the unlock process, and the rest indicates the critical region.
[0039]
lwarx instruction, stwcx. The instructions are referred to as a load and reserve instruction and a store conditional instruction, respectively, and are always used as a pair when realizing atomic processing in the PowerPC architecture.
[0040]
The load and reserve instruction performs an operation of reading the contents for a specified address and establishes a protection area called reservation. If the reservation established by the preceding load and reserve instruction has not been discarded, the store conditional instruction performs a write operation to the specified address, and reports the “success” of the store operation to the processor. If a reservation exists and another processor issues a store instruction to update the contents of the address, the reservation is discarded. In this state, when the processor that first issued the load and reserve instruction issues a store conditional instruction, the store operation is not performed, and a reply indicating “failure” is reported to the processor.
[0041]
When realizing the lock processing, the processor first issues a load and reserve instruction to the lock flag in the main memory. If the read flag value is not zero, the other processor is locked, so that the own processor returns to loop and repeats the load and reserve instruction until the flag value becomes zero. When the flag value becomes zero, the lock flag is set by a store conditional instruction. At this time, if the lock flag setting of the other processor is earlier than the own processor, the reservation is discarded. Therefore, the flag value setting fails, and it returns to loop again and waits for the lock value to become zero. If the flag value is set successfully, the critical region is executed. After executing the critical region, store zero in the lock flag and perform unlock processing.
[0042]
FIG. 6 shows an example of an instruction sequence when lock / unlock processing is performed using the lock information register 510 and the lock state register 520 in the present embodiment.
[0043]
The meaning of each command in FIG. 6 is shown below. Note that r3 is a register storing a real address to which the lock information register R0 is mapped, and r4 is a register containing a lock value to be newly set.
[0044]
stwcx. r4, 0, r3: When the value of the lock state register F0 is zero, the lock state register F0 is set to 1, and the value of r4 is successfully written to the lock information register R0. When the value of the lock state register F0 is 1, the write operation fails.
[0045]
bc loop: If flag writing is “failure”, return to loop. If “success”, move to the critical region after the next line.
[0046]
sync: guarantees that all instruction execution in the critical region is complete.
[0047]
stw 0,0 (r3): Zero is written to the lock information register R0 and simultaneously zero is set to the lock state register F0.
[0048]
The instruction sequence for the first two lines is the lock process, the last one is the unlock process, and the other is the critical region.
[0049]
The operation of the store conditional instruction here is completely different from the operation of the example of FIG. Only the lock information register 510 is explicitly shown in the operand, but when issued, the flag value of the corresponding lock state register 520 is also referred to / updated. If the flag value is zero, the flag is set, the lock value is set in the lock information register 510, and a “success” report is sent to the processor. If the flag value is 1, neither the flag nor the lock value is set, and a “failure” report is sent to the processor.
[0050]
When realizing the lock processing, first, a store conditional instruction is issued to the lock information register 510. Then, the flag value of the corresponding lock state register 520 is referred to. If the flag value is zero, the lock state register 520 is in an unlocked state. If the flag value is 1, the state is locked by another process, so the loop is returned and the store-conditional instruction is repeated again. If the lock value is set successfully, the critical region is executed. After executing the critical region, a store instruction is issued to the lock information register 510. Then, the flag value of the corresponding lock state register 520 is unconditionally set to zero, the value is written in the lock information register 510, and unlock processing is performed.
[0051]
As described above, in the present embodiment, the operation of the instruction that operates the existing lock flag is switched between when the main memory 30 is accessed and when the communication register 40 is accessed. If the switching control is performed in the communication register module 400, high-speed lock processing using the communication register 40 can be realized without changing the conventional processor architecture. The high speed is also clear from the fact that the execution time can be shortened by reducing the number of instructions required for the lock processing, as shown by the difference in the number of instruction strings between FIG. 5 and FIG.
[0052]
FIG. 4 shows an example of the configuration of each communication register module 400 in the multiprocessor system of the present embodiment.
[0053]
The request input from the signal line L80 is analyzed by the decoder 430. If the request is a load / store request, if the access address is outside the range mapped to the communication register 40, the request is connected to the signal line L80. The data is sent to the main memory 30 via the network 20. If the access address is within the range mapped to the communication register 40, the request is sent to the request control circuit 410. The operation for each request will be described below.
[0054]
In the description of the present embodiment, the communication register module 400 directly connected to the requesting processor 10 via the signal line L80 is referred to as “master module”, and the other communication register modules 400 are referred to as “slave modules”. Are defined respectively.
[0055]
(A) Store conditional request (lock request)
When a store conditional request is input, the request control circuit 410 sends the request to the selector 480, and based on this, the bus output control circuit 490 provides a bus for broadcast output to all communication register modules on the inter-communication module bus 700. Secure the right. When the bus right is secured and the broadcast is executed, a request is simultaneously made to the bus input control circuit 420 of all the communication register modules 400 including the own module.
[0056]
The bus input control circuit 420 analyzes the request and checks whether the lock information register 510 is in its own module. Then, the request is sent to the register input circuit 440. Based on this, the contents of the lock state register 520 to be written are read and output from the register output circuit 450. At that time, the register input circuit 440 has a write value to the lock information register 510 (in this case, the process number value of the lock request source) and a write value to the lock state register 520 (in this case, a value 1 to be written when the lock is successful). Until the instruction signal is received from the signal line L70. If the lock information register 510 to be written does not exist in its own module, only the value written to the lock status register 520 is held. The output of the register output circuit 450 is sent to the comparator 460, and the read value is checked.
[0057]
Subsequent operations differ as follows depending on whether the own module is a master module or a slave module.
[0058]
(A) -1: Master module
When the read value is 1, it is locked by another process, so that the lock fails, and a reply report indicating “failure” of the lock is sent to the reply control circuit 470 via the signal line L80. Instruct to return. At the same time, the write value held in the register input circuit 440 is discarded.
[0059]
If the value is zero, the lock state is not locked, and the reply control circuit 470 is instructed to return a reply report indicating “success” to the processor 10 via the signal line L80. At the same time, the comparator 460 instructs the register input circuit 440 to write the write value to the lock information register 510 and the write value to the lock state register 520 to the register through the signal line L70. When the lock information register 510 to be written does not exist in the own module, writing is performed only to the lock state register 520.
[0060]
Since the lock status register 520 is mirrored, the lock success / failure report to the processor 10 can be performed without going through the inter-communication module bus 700, and the lock process can be speeded up. In addition, since the lock information register 510 is placed flat, it is possible to suppress the influence of the physical quantity on the system due to the increase in the number of communication registers required when the process number is set as the lock value.
[0061]
(A) -2: Slave module
When the read value is 1, the lock is failed because it is locked by another process, the value in the register input circuit 440 is discarded, and the process ends.
[0062]
Further, when the value is zero, since it is in the unlocked state, the comparator 460 instructs the register input circuit 440 to write the write value to the lock information register 510 and the write value to the lock state register 520 to the register through the signal line L70. To do. When the lock information register 510 to be written does not exist in the own module, writing is performed only to the lock state register 520.
[0063]
An access request to the communication register 40 is once broadcast via the inter-communication module bus 700 and accessed via the bus input control circuit 420. For this reason, even if a plurality of processes issue a lock request to the same communication register 40 almost simultaneously, the requests are serialized on the inter-communication module bus 700, and the lock request does not pass through.
[0064]
(B) Store request (unlock request)
When a store request is input, the request control circuit 410 sends the request to the selector 480, and based on this, the bus output control circuit 490 writes the write value to the lock information register 510 in the inter-communication module bus 700 (in this case, a store instruction). A bus right for outputting a specified store data) and a write value to the lock state register 520 (in this case, a flag reset value) is secured. When the bus right is secured and the write value is broadcast, a write request is simultaneously loaded in the bus input control circuit 420 of all the communication register modules including the own module. The bus input control circuit 420 analyzes the request and checks whether the lock information register 510 exists in the own module. In some cases, the write value to both the lock information register 510 and the lock state register 520 is sent to the register input circuit 440, and in the other case, only the write value to the lock state register 520 is sent to the register input circuit 440. Based on this, writing to the communication register group 500 is performed.
[0065]
(C) Load request
When a load request is input, the request control circuit 410 sends the request to the selector 480, and based on this, the bus output control circuit 490 sends a read request to the lock information register 510 or the lock status register 520 to the inter-communication module bus 700. Secure the bus right to output. When the bus right is secured and the request is broadcast, a read request is simultaneously loaded in the bus input control circuit 420 of all the communication register modules 400 including the own module.
[0066]
The bus input control circuit 420 analyzes the request, and when an access destination register exists in the own module, the bus input control circuit 420 sends the request to the register input circuit 440. Based on this, the value of the register in the communication register group 500 is read and output from the register output circuit 450. The read value is sent to the selector 480, and the bus output control circuit 490 secures the bus right to output the read value to the inter-communication module bus 700. When the bus right is secured, the value is sent to the bus input control circuit 420 of the communication register module 400 of the load request source through the bus.
[0067]
The bus input control circuit 420 of the load request source communication register module 400 instructs the reply control circuit 470 to reply the value to the load request issuer processor via the signal line L90, and the reply value is sent to the processor 10 via the signal line L80. Returned to
[0068]
As described above, according to the multiprocessor system of the present embodiment, the following is possible.
[0069]
The communication register 40 is divided into a lock information register 510 and a lock state register 520, and the lock information register 510 is held flat between the communication register modules 400, and the lock state register 520 is mirrored. Since it is possible to suppress an increase in the amount of a multiprocessor system that performs lock processing in units of processes, and a lock success / failure report to the processor 10 at the time of lock processing can be performed without using the inter-communication module bus 700, The lock process can be speeded up.
[0070]
Since an access request to the communication register 40 is broadcast and serialized via the inter-communication module bus 700, even if a plurality of processes issue a lock request to the same communication register 40 at the same time, the lock request is prevented from passing through. be able to.
[0071]
By using a conventional lock flag operation instruction and controlling the operation of the instruction in the communication register module 400 depending on whether the lock flag exists in the main memory 30 or in the communication register 40, the processor 10 of the conventional architecture is controlled. Can be used to realize high-speed lock / unlock processing.
[0072]
Although the invention made by the present inventor has been specifically described based on the embodiments, the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the invention. Needless to say.
[0073]
For example, the processor is not limited to the PowerPC architecture and can be widely applied to general processors.
[0074]
【The invention's effect】
According to the present invention, in a multiprocessor system in which a main memory is shared by a plurality of processors, a large number of locks / unlocks for synchronization, exclusion, and communication control between processors without increasing the circuit and the amount of logical objects. The effect that the processing of the request can be accurately realized is obtained.
[0075]
According to the present invention, in a multiprocessor system in which a main memory is shared by a plurality of processors, a large number of locks / unlocks for synchronization, exclusion, and communication control between processors without reducing the access speed to the main memory. The effect that the processing of the request can be accurately realized is obtained.
[0076]
According to the present invention, in a multiprocessor system in which a main memory is shared by a plurality of processors, a plurality of processors that operate in parallel in each processor without causing an increase in circuits, logical quantities, etc. or a decrease in access speed to the main memory. It is possible to accurately realize processing of a large number of lock / unlock requests for synchronization, exclusion, and communication control between the processes.
[0077]
According to the present invention, in a multiprocessor system in which a main memory is shared by a plurality of processors, a number of locks for synchronization, exclusion, and communication control between processors or between processes without changing the processor architecture or the like. There is an effect that the processing of the unlock request can be accurately realized.
[Brief description of the drawings]
FIG. 1 is a conceptual diagram showing an example of the overall configuration of a multiprocessor system according to an embodiment of the present invention.
FIG. 2 is a conceptual diagram illustrating a part of a configuration of a multiprocessor system according to an embodiment of the present invention in more detail.
FIG. 3 is a conceptual diagram illustrating a part of the configuration of a multiprocessor system according to an embodiment of the present invention in more detail.
FIG. 4 is a conceptual diagram illustrating a part of a configuration of a multiprocessor system according to an embodiment of the present invention in more detail.
FIG. 5 is an explanatory diagram showing an example of a command sequence for lock processing by a processor when a lock flag is placed on the main memory;
FIG. 6 is an explanatory diagram showing an example of an instruction sequence for lock processing by a processor in a multiprocessor system according to an embodiment of the present invention;
FIG. 7 is a conceptual diagram showing a configuration of a conventional multiprocessor system.
FIG. 8 is a conceptual diagram showing a part of a configuration in a conventional multiprocessor system in more detail.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 10 ... Processor, 20 ... Interconnection network, 30 ... Main memory, 40 ... Communication register, 400 ... Communication register module, 410 ... Request control circuit, 420 ... Bus input control circuit, 430 ... Decoder, 440 ... Register input circuit, 450 ... register output circuit, 460 ... comparator, 470 ... reply control circuit, 480 ... selector, 490 ... bus output control circuit, 500 ... communication register group, 510 ... lock information register (second register), 520 ... lock status register (First register), 700 ... communication module bus, L70 ... signal line, L80 ... signal line, L90 ... signal line.

Claims (3)

複数のプロセッサと、前記プロセッサにて共有される主記憶と、前記プロセッサと前記主記憶を結合する相互結合網と、複数の前記プロセッサの各々と対応する複数の通信レジスタモジュールと、複数の前記通信レジスタモジュールを結合するインターフェースから構成され、個々の前記通信レジスタモジュールは、複数の通信レジスタを有するマルチプロセッサシステムであって、
前記通信レジスタは、ロック/アンロック状態を保持する第1のレジスタとロック/アンロック情報を保持する第2のレジスタから構成され、
ロック/アンロック状態を保持する前記第1のレジスタは相異なる前記通信レジスタモジュール内の対応するレジスタと同一の内容を保持し、
ロック/アンロック情報を保持する前記第2のレジスタは個々の前記通信レジスタモジュール毎に個別の内容を保持し、
前記プロセッサからのロック処理要求に対しては、前記インターフェースを介して全ての前記通信レジスタモジュールに該要求をブロードキャストし、該プロセッサに対応する前記通信レジスタモジュール内の通信レジスタ内のロック/アンロック状態を保持する前記第1のレジスタの値を参照して、ロックの成功/失敗を該プロセッサに報告し、ロック可能時には全ての前記通信レジスタモジュール内のロック/アンロック状態を保持する前記第1のレジスタに同一のロックフラグを設定し、同時に対応するロック/アンロック情報を保持する前記第2のレジスタにロック処理要求を出した前記プロセッサ内のプロセス番号を設定することを特徴とするマルチプロセッサシステム。
A plurality of processors, a main memory shared by the processors, an interconnection network for coupling the processors and the main memory, a plurality of communication register modules corresponding to each of the plurality of processors, and a plurality of the communications Each of the communication register modules is a multiprocessor system having a plurality of communication registers,
The communication register includes a first register that holds a lock / unlock state and a second register that holds lock / unlock information.
The first register holding the locked / unlocked state holds the same contents as the corresponding register in the different communication register module;
The second register holding lock / unlock information holds individual contents for each of the communication register modules,
In response to a lock processing request from the processor, the request is broadcast to all the communication register modules via the interface, and the lock / unlock state in the communication register in the communication register module corresponding to the processor is broadcast. The success / failure of the lock is reported to the processor with reference to the value of the first register that holds the first register, and the lock / unlock state in all the communication register modules is held when the lock is possible. A multiprocessor system in which the same lock flag is set in a register, and the process number in the processor that issued a lock processing request is set in the second register that simultaneously holds corresponding lock / unlock information .
請求項1記載のマルチプロセッサシステムにおいて、ロック処理実行時に、従来プロセッサアーキテクチャに存在するロックフラグを操作する命令が発行されたとき、前記ロックフラグが前記主記憶上にある場合と前記通信レジスタ上にある場合とで命令動作を切り替えることを特徴とするマルチプロセッサシステム。  2. The multiprocessor system according to claim 1, wherein, when a lock processing is executed, when an instruction for operating a lock flag existing in a conventional processor architecture is issued, the lock flag is on the main memory and on the communication register. A multiprocessor system characterized by switching an instruction operation depending on a case. 請求項2記載のマルチプロセッサシステムにおいて、前記命令が、前記ロック/アンロック情報を保持する前記第2のレジスタをアクセスしたとき、同時にロック/アンロック状態を保持する前記第1のレジスタにもアクセスを行うことを特徴とするマルチプロセッサシステム。 3. The multiprocessor system according to claim 2 , wherein when the instruction accesses the second register holding the lock / unlock information, the first register holding the lock / unlock state is simultaneously accessed. A multiprocessor system characterized by:
JP2001083506A 2001-03-22 2001-03-22 Multiprocessor system Expired - Fee Related JP3996355B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001083506A JP3996355B2 (en) 2001-03-22 2001-03-22 Multiprocessor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001083506A JP3996355B2 (en) 2001-03-22 2001-03-22 Multiprocessor system

Publications (2)

Publication Number Publication Date
JP2002278947A JP2002278947A (en) 2002-09-27
JP3996355B2 true JP3996355B2 (en) 2007-10-24

Family

ID=18939310

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001083506A Expired - Fee Related JP3996355B2 (en) 2001-03-22 2001-03-22 Multiprocessor system

Country Status (1)

Country Link
JP (1) JP3996355B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7421529B2 (en) * 2005-10-20 2008-09-02 Qualcomm Incorporated Method and apparatus to clear semaphore reservation for exclusive access to shared memory

Also Published As

Publication number Publication date
JP2002278947A (en) 2002-09-27

Similar Documents

Publication Publication Date Title
KR100249148B1 (en) Data processing system and method
US5721870A (en) Lock control for a shared main storage data processing system
US6662252B1 (en) Group and virtual locking mechanism for inter processor synchronization
US6138231A (en) System and method for register renaming
US5043873A (en) Method of parallel processing for avoiding competition control problems and data up dating problems common in shared memory systems
JPS60144855A (en) Memory lock system
TWI666551B (en) Decentralized allocation of resources and interconnect structures to support the execution of instruction sequences by a plurality of engines
JPS6069746A (en) Control system of vector data processor
JPH0225212B2 (en)
JPH05324572A (en) Atomic-access-controlled register device
JPH05508495A (en) Global register for multiple processors
JP2825906B2 (en) Computer system
JP3431941B2 (en) Method and apparatus for determining instruction execution order in a data processing system
JPH0155499B2 (en)
JP2003271574A (en) Data communication method in shared memory multiprocessor system
JP3996355B2 (en) Multiprocessor system
US20010021944A1 (en) Distributed memory type parallel computer and write data transfer end confirming method thereof
JP4051788B2 (en) Multiprocessor system
JP2602241B2 (en) Parallel computer
JPH06266620A (en) Exclusive control system using cache memory
JPH011049A (en) parallel computer
JP2731738B2 (en) Multiprocessor system
JP2742245B2 (en) Parallel computer
JPH02222047A (en) Memory controller
JP2024165938A (en) Processor and information processing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050118

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070312

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070417

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070615

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070710

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070802

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100810

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100810

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100810

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110810

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120810

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130810

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees