JP4484436B2 - Information storage control method to storage device - Google Patents
Information storage control method to storage device Download PDFInfo
- Publication number
- JP4484436B2 JP4484436B2 JP2003043097A JP2003043097A JP4484436B2 JP 4484436 B2 JP4484436 B2 JP 4484436B2 JP 2003043097 A JP2003043097 A JP 2003043097A JP 2003043097 A JP2003043097 A JP 2003043097A JP 4484436 B2 JP4484436 B2 JP 4484436B2
- Authority
- JP
- Japan
- Prior art keywords
- area
- information
- region
- semaphore variable
- stored
- 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
Links
Images
Description
【0001】
【発明の属する技術分野】
本発明は、キューに蓄積された処理要求を実行する際の制御方法およびプログラム、またこれらを利用したシステムに関する。
【0002】
【従来の技術】
処理要求を含む処理要求情報を発行する発行側装置とその処理要求情報を受信し、処理要求を実行し、実行結果を発行側装置に送信する受信側装置とのインタフェースとして、2種類のキューが使用されることがある。一方のキューには、処理要求情報が待ち行列として蓄積され、キューの先頭の処理要求から順に受信側装置により実行される。
【0003】
他方のキューには、処理要求が完了したことを示す情報(処理完了情報)が待ち行列として蓄積され、キューの先頭の処理完了情報から順に発行側装置により回収され、処理完了時のステータス確認等が行われる。例えば、コンピュータと周辺機器を接続するための次世代の入出力(I/O)技術として提案されるインフィニバンド(Infiniband)(非特許文献1参照)やVIA(Virtual Interface Architecture)(非特許文献2参照)などのアーキテクチャにおいて、前述した2種類のキューを用いた処理要求の実行が行われる。
【0004】
【非特許文献1】
Infiniband(SM) Trade Association、"Infiniband(TM) Architecture Specification Volume 1 Release 1.1"、P.80、3.2.1節Queuing、[online]、Final, November 6,2002、[平成15年1月21日検索]、インターネット<http://www.infinibandta.org/specs/>
【0005】
【非特許文献2】
Compaq Computer Corp., Intel Corporation, Microsoft Corporation、"Virtual Interface Architecture Specification"、P.11、2.1.節 VI Architecture Components、[online]、Draft Revision 1.0, December 4, 1997、[平成15年1月21日検索]、インターネット<ftp://download.intel.com/design/servers/vi/san_10.pdf>
【0006】
【発明が解決しようとする課題】
しかしながら、前述した2種類のキューをインタフェースとして処理要求を実行する場合、各キューへ処理要求情報あるいは処理完了情報を蓄積する際に、そのキューに蓄積された処理要求情報あるいは処理完了情報の蓄積状況が判断されないことが多い。そのため、各キューの蓄積可能データ数を超えてしまい、キューが溢れる(オーバフローする)場合があった。
【0007】
キューがオーバフローすると、処理要求の実行が停止し、前述の発行側装置あるいは受信側装置に復旧処理という新たな処理をさせることになり、装置全体としての性能低下が避けられず問題である。当然のことながら、復旧処理をさせるには、ソフトウエアまたはハードウエアによる実装を必要とする。また、蓄積可能データ数を大きくするために、より大きな蓄積領域を確保して各キューのサイズを大きくすることも可能だが、むやみに大きく取られたキューは通常時その一部しか使用されず無駄が発生していた。
【0008】
そこで、本発明は、以上に述べた課題に鑑み、2種類のキューをインタフェースとして介在させキューに蓄積された処理要求を実行する場合に各キューを溢れさせないための情報蓄積制御方法を提供することを目的とする。また、両者を組み合わせて使用することにより、両キューを共に溢れさせないことも可能である。またハードウエアは実装コストの低減と高性能を実現するために実装を単純化する必要があり、そのためソフトウエアによる実装で実現できることが望ましい。
【0009】
【課題を解決するための手段】
上記課題を解決するため、処理要求情報が蓄積される第一の領域を設定する工程と、処理要求の完了を示す情報である処理完了情報が蓄積される第二の領域を設定する工程と、前記第一の領域に対応するセマフォ変数の初期値を前記第一の領域に蓄積可能な情報数の最大数として設定する工程と、前記第一の領域に対応するセマフォ変数の値から1を減算した値が正の値か判定し、正の値であれば、前記第一の領域に前記処理要求情報を追加し、前記第一の領域に対応するセマフォ変数の値から1を減算した値を前記第一の領域に対応するセマフォ変数として更新する工程と、前記要求された処理が完了した場合、該処理要求を特定する情報と前記処理完了情報を対応付けて前記第二の領域に蓄積する工程と、前記第二の領域に前記処理完了情報が蓄積されているか判定し、蓄積されていれば、前記第一の領域に対応するセマフォ変数に1を加算した値を前記第一の領域に対応するセマフォ変数として更新し、前記処理完了情報を1つ削除する工程を有することを特徴とする情報蓄積制御方法を提供する。
【0010】
この場合において、前記第二の領域に蓄積可能な情報数の最大数を前記第一の領域に蓄積可能な情報数の最大数以上に設定することも可能である。また、前記第一の領域、前記第二の領域に共にセマフォ変数を設定することも可能である。
【0011】
また、上記課題は、処理要求情報が蓄積される複数の第一の領域を設定する工程と、処理要求の完了を示す情報である処理完了情報が蓄積される第二の領域を設定する工程と、前記複数の第一の領域にそれぞれ対応するセマフォ変数の初期値を前記複数の第一の領域にそれぞれ蓄積可能な情報数の最大数として設定する工程と、前記複数の第一の領域のうち1つを選択し、前記選択された第一の領域に対応するセマフォ変数の値から1を減算した値が正の値か判定し、正の値であれば、前記選択された第一の領域に処理要求情報を追加し、前記選択された第一の領域と前記処理要求を特定する情報を対応付けて対応表に蓄積し、前記選択された第一の領域に対応するセマフォ変数の値から1を減算した値を前記選択された第一の領域に対応するセマフォ変数として更新する工程と、前記処理要求が完了した場合、該処理要求を特定する情報を前記処理完了情報と対応付けて前記第二の領域に蓄積する工程と、前記第二の領域に前記処理完了情報が蓄積されているか判定し、蓄積されていれば、前記処理完了情報を1つ読み出し、前記読み出された処理完了情報に対応する前記処理要求を特定し、前記対応表を参照して該特定された処理要求が蓄積された前記第一の領域を特定し、該特定された第一の領域に対応するセマフォ変数に1を加算した値を前記特定された第一の領域に対応するセマフォ変数として更新し、前記読み出された処理完了情報を削除する工程を有することを特徴とする情報蓄積制御方法を提供することにより解決される。
【0012】
この場合において、前記第二の領域に蓄積可能な情報数の最大数を各第一の領域に蓄積可能な情報数の最大数の総和以上に設定することも可能である。さらに、複数の第一の領域のそれぞれと前記第二の領域にそれぞれセマフォ変数を設定することも可能である。
【0013】
また、上記課題は、処理要求情報が蓄積される第一の領域と、処理要求の完了を示す情報である処理完了情報が前記処理要求を特定する情報と対応付けられ蓄積される第二の領域と、前記第一の領域を特定する情報とセマフォ変数が対応付けられ蓄積されるセマフォ変数表とが格納される蓄積部と、前記蓄積部を制御する制御部とを有する装置において実行されるプログラムであって、前記制御部に、前記第一の領域に対応するセマフォ変数の初期値を前記第一の領域に蓄積可能な情報数の最大数として設定させる工程と、前記第一の領域に対応するセマフォ変数の値から1を減算した値が正の値か判定させ、正の値であれば、前記第一の領域に対応するセマフォ変数の値から1を減算した値を前記第一の領域に対応するセマフォ変数として前記セマフォ変数表を更新させ、前記第一の領域へ前記処理要求情報を追加させる工程と、前記第二の領域に前記処理完了情報が蓄積されているか判定させ、蓄積されていれば、前記第一の領域に対応するセマフォ変数に1を加算した値を前記第一の領域に対応するセマフォ変数として前記セマフォ変数表を更新させ、前記処理完了情報を1つ削除させる工程を実行させるためのプログラムを提供することにより解決される。
【0014】
また、上記課題は、処理要求情報が蓄積される第一の領域と、処理要求の完了を示す情報である処理完了情報が前記処理要求を特定する情報と対応付けられ蓄積される第二の領域とが格納される蓄積部と、前記蓄積部を制御し、前記処理要求を実行する制御部を有する第一の装置と、前記第一の装置に接続され、前記第一の領域を特定する情報とセマフォ変数が対応付けられ蓄積されるセマフォ変数表とが格納される蓄積部と、前記蓄積部を制御し、前記処理要求情報を前記第一の装置へ送信する制御部を有する第二の装置とを備え、前記第二の装置における制御部は、予め前記第一の領域に対するセマフォ変数の初期値を前記第一の領域に蓄積可能な情報数の最大数として設定し、特定のタイミングで前記第一の領域に対応するセマフォ変数から1を減算した値が正の値か判定し、正の値であれば、前記第一の領域に対応するセマフォ変数から1を減算した値を前記第一の領域に対応するセマフォ変数として更新し、前記第一の装置に新たな処理要求情報を送信し、前記第一の装置における制御部は、前記新たな処理要求情報を受信して前記第一の領域に追加し、特定のタイミングで前記第一の領域に蓄積された処理要求を実行し、該処理要求に対応する処理完了情報を作成して前記第二の装置に領域に蓄積し、前記第二の装置における制御部は、特定のタイミングで前記第二の領域に前記処理完了情報が蓄積されているか判定し、蓄積されていれば、前記第一の領域に対応するセマフォ変数に1を加算した値を前記第一の領域に対応するセマフォ変数として更新し、前記第二の領域に蓄積された前記処理完了情報を1つ削除することを特徴とするシステムを提供することにより解決される。
【0015】
【発明の実施の形態】
以下、本発明の実施形態について図面に従って説明する。しかしながら、本発明の技術的範囲はかかる実施形態に限定されるものではなく、特許請求の範囲に記載された発明とその均等物に及ぶものである。
【0016】
図1は、本発明の第一の実施形態に用いる情報処理装置の構成例を示す図である。本発明の適用はインフィニバンドに限定されるものではないが、本発明の実施形態においてはメモリに格納されたOSの指令を実行するCPUが処理要求の発行側装置として処理要求を含むデータ(ワークリクエスト)を送信し、同一筐体内のインフィニバンド用ホストチャネルアダプタが受信側装置としてワークリクエストを受信する場合に、本発明が適用される様子を説明する。
【0017】
メモリ5には、コンピュータを動作させるための基本ソフトウエアであるオペレーティングシステム(OS、Operating System)や、OS上で動作するアプリケーションプログラムが蓄積される。CPU2は、OSやアプリケーションプログラムからの処理要求に基づき、システムバス3を介して、メモリ5や各種周辺機器(図示されないハードディスクや、SCSIやファイバチャネルを介して外部に接続された図示されないストレージ、LANを介して接続された図示されない他のコンピュータ等)に格納されたデータにアクセスし、コンピュータ1内の装置を制御するための処理を実行する。
【0018】
CPU2がメモリ5に格納されたデータにアクセスする場合、メモリコントローラ4は、CPU2が指定する仮想メモリ上のアドレスを実際の物理メモリアドレスに変換し、対応するデータをシステムバス3を介してCPU2に送信する。CPU2が周辺機器に格納されたデータにアクセスする場合、CPU2は処理要求を含むデータ(以下ワークリクエストと呼ぶ)をホストチャネルアダプタ(HCA)6のメモリ7に確保されたワークキュー(図示せず)に蓄積する。コプロセッサ8は、HCA内の制御に関する演算を実行する処理装置であり、特定のタイミングでワークキューに蓄積されたワークリクエストを処理し、処理結果のデータをメモリ7に確保されたコンプリーションキュー(図示せず)に格納する。CPU2は特定のタイミングでコンプリーションキューをチェックし、処理結果のデータを回収、削除する。
【0019】
インフィニバンドスイッチ9は、チャネルアダプタ間を接続し、チャネルアダプタ同士のポイントトゥポイント(point-to-point)のデータ伝送を可能にする。図1では、HCA6が、インフィニバンドスイッチ9を介して、コンピュータ1をネットワークに接続するためのネットワークインタフェースカード(NIC)11、コンピュータ1にSCSI機器を接続するためのSCSIカード13、ファイバチャネル(Fiber Channel)機器を接続するためのFCカード14のそれぞれに備えられたターゲットチャネルアダプタ(TCA)11、13、15と接続されている。また、インフィニバンドスイッチ9を介して他のHCAと直接接続することも可能である。これは、例えば、複数のコンピュータ1が同一筐体内に存在するブレードサーバ(この場合各コンピュータ1をブレードと呼ぶ)のような装置において、ブレード間を接続するバックプレーンと呼ばれる内部バスを介した接続がある。
【0020】
図2は、本発明の第一の実施形態においてCPU2が周辺機器に格納されたデータにアクセスする際の動作を示す図である。本発明の第一の実施形態においては、メモリ上にワークキュー24およびコンプリーションキュー28が1つずつ確保され、ワークキュー24に蓄積可能なワークリクエスト26の個数を示すセマフォ変数を設定することで、ワークキュー24が溢れることが防止される。
【0021】
セマフォ変数はワークリクエスト26がワークキュー24に1つ蓄積されると値が1減算され、ワークコンプリーション30が1つ回収されると値が1加算される。セマフォ変数の初期値をワークキュー24に蓄積可能なデータの最大数と設定することで、ワークキュー24のセマフォ変数が正の値であれば、ワークキュー24にデータを追加蓄積可能であることがわかる。
【0022】
また、セマフォ変数として、ワークキュー24に蓄積可能なデータの最大量(例えば、確保された領域のサイズ)を設定し、ワークリクエスト26の蓄積の度にそのワークリクエスト26のサイズが減算され、ワークコンプリーション30の回収により、ワークリクエスト26のサイズが加算されることによっても同じ効果を得ることができる。後者は、各ワークリクエスト26のサイズが一定でない場合等に有効な手段となる。
【0023】
図2のCPU2は、OSやアプリケーションプログラムからの処理要求を含むデータをワークリクエスト26として、開始番地と終了番地により特定される領域としてメモリ7に確保された、キュー番号WQ1のワークキュー24に蓄積する。CPU2はワークキュー24に対応して設定されるセマフォ変数が格納されたメモリ5のセマフォ変数表22を参照し、ワークリクエスト26の蓄積が可能か判定する。
【0024】
ワークリクエスト26の蓄積が可能であれば、ワークリクエスト26がワークキュー24の末尾に追加される。そしてCPU2はセマフォ変数表22を更新する。このワークリクエスト蓄積処理の詳細については後述する。
【0025】
コプロセッサ8は、特定のタイミングでワークキュー24から先頭のワークリクエスト26を取り出し、処理要求を実行する。ワークリクエスト26には、データの送信、受信といった処理要求内容と、データ送信先や送信するデータあるいは受信したデータの格納先等の情報が格納されており、コプロセッサ8は処理要求内容に沿った処理を実行する。
【0026】
コプロセッサ8は、処理要求内容に沿ってインフィニバンドスイッチ9を介して接続されたTCAとデータ伝送を行い、ワークリクエスト26を完了する。ワークリクエスト26を処理し終えたら、コプロセッサ8は処理されたワークリクエスト26に対応するワークコンプリーション30を作成し、開始番地と終了番地により特定される領域としてメモリ7に確保された、キュー番号CQ1のコンプリーションキュー28に蓄積する。
【0027】
CPU2は、特定のタイミングでコンプリーションキュー28からワークコンプリーション30を回収し、対応するワークリクエスト26が完了したことを確認し、メモリ5のセマフォ変数表22のセマフォ変数を更新する。このワークコンプリーション回収処理の詳細については後述する。こうして処理要求が完了する。次に、ワークリクエスト26、ワークコンプリーション30、セマフォ変数表22のデータ構成を説明する。
【0028】
図3は、ワークキュー24に蓄積されるワークリクエスト26のデータ構成例を示す図である。図3の各エントリには、ワークリクエスト26を特定する識別番号(Work Request ID)31と、処理要求に関連するデータ32が格納される。処理要求に関連するデータ32には、図示しないが例えば、データの送信や受信等の処理要求内容、データの送信先や送信するデータ、受信したデータの格納先といった情報が格納されている。
【0029】
図4は、コンプリーションキュー28に蓄積されるワークコンプリーション30のデータ構成例を示す図である。図4の各エントリには、処理されたワークリクエスト26を特定する識別番号(Work Request ID)41と、処理されたワークリクエスト26に関連するデータ42が格納される。処理されたワークリクエスト26に関連するデータ42には、図示しないが例えば、正常終了したか異常終了したかを示す終了ステータスや、エラー内容を示すエラーコード等が格納される。ワークコンプリーション30を参照することにより、どのワークリクエスト26がどのような状態で完了したのかを確認することができる。
【0030】
図5は、メモリ5に格納されるセマフォ変数表22である。図5の各エントリには、キュー番号51とそのキュー番号のセマフォ変数値52が格納される。
図5においては、WQ1がワークキュー24に対するキュー番号51を示し、SW1は、ワークキュー24に対するセマフォ変数値52である。
【0031】
また、本発明の第一の実施形態においては、1つのワークキュー24にのみセマフォ変数が設定されるが、複数のワークキュー24が存在する場合、各キューに設定されたセマフォ変数が図5の行データとしてセマフォ変数表に追加される。さらに、コンプリーションキュー28に対するセマフォ変数が設定され、セマフォ変数表に追加されてもよい。セマフォ変数表22を参照すれば、ワークキュー24あるいはコンプリーションキュー28に対応するセマフォ変数値52を得ることができ、ワークキュー24に対しワークリクエスト26の追加蓄積が可能か判定することができる。
【0032】
なお、本発明の第一の実施形態においては、セマフォ変数表22を用いるが、表を使わない実装も可能である。例えば、ハッシュ関数を用いて、ワークキュー番号に対応するセマフォを特定するポインタがわかるようにしてもよい。
【0033】
続いて、本発明の第一の実施形態におけるワークリクエスト蓄積処理、ワークコンプリーション回収処理をそれぞれ説明する。
【0034】
図6は、本発明の第一の実施形態におけるワークリクエスト蓄積処理を説明するフローチャートである。予め、セマフォ変数表22には、キュー番号WQ1のワークキュー24に対応するセマフォ変数の初期値として、ワークキュー24に蓄積可能なデータの最大数が設定されている。
【0035】
まず、CPU2は、ワークキュー24のセマフォ変数が正の値か判定する(S62)。CPU2は、メモリ5のセマフォ変数表22を参照し、キュー番号WQ1であるワークキュー24に対応するセマフォ変数値52を得る。得られたセマフォ変数値が正であれば、ワークキュー24には空きがあり、ワークリクエスト26が追加蓄積できることを意味する。
【0036】
ステップS62でワークキュー24に空きがある場合、CPU2はワークキュー24のセマフォ変数から1減算した値を新たなセマフォ変数としてセマフォ変数表22を更新する(S63)。これは、ワークリクエスト26が蓄積される場合ワーククキュー24の空きが1つ消費されることによるものである。
【0037】
そして、ステップS62で空きが無いと判定される場合、一定時間待機し再びステップS62の処理を実施する。こうして、ワークキュー24に空きができるのを待つ。もしくは、蓄積をあきらめる。
【0038】
ステップS63が済むと、ワークキュー24にワークリクエスト26を追加蓄積する(S66)。そして、ステップS64の蓄積処理が成功したか判定する(S67)。ワークキュー24への蓄積は可能な状態でも、蓄積処理の途中で装置の電源断や、割り込み処理による蓄積処理中止などで、蓄積処理に失敗した場合そのままワークリクエスト蓄積処理を中止する。
【0039】
ステップS67でワークリクエスト26の蓄積に成功すれば、ワークリクエスト蓄積処理を終了する。ステップS67で失敗した場合、ワークキュー24のセマフォ変数に1加算し(S69)、ワークリクエスト蓄積処理を終了する。ステップS63では、ワークリクエストが蓄積されワーククキュー24の空きが1つ消費されるものとしてセマフォ変数を更新したが、ステップS67でワークリクエストの蓄積に失敗したため、ワーククキュー24の空きは消費されていない。従ってステップS69では、ステップS63で減算した値を元に戻す。
【0040】
図6のワークリクエスト蓄積処理によって、ワークキューの空き状態を表すセマフォ変数が適切に更新され、空きが無い場合、ワークリクエスト26が追加されることはなく、ワークキュー24のオーバフローを防止することができる。
【0041】
図7は、本発明の第一の実施形態におけるワークコンプリーション回収処理を説明するフローチャートである。まず、コンプリーションキュー28にワークコンプリーション30が蓄積されているか判定する(S71)。CPU2は、コンプリーションキュー28の先頭からワークコンプリーション30を回収し、コンプリーションキュー28が空なら、そのままワークコンプリーション回収処理を終了する。
【0042】
そして、CPU2はワークキュー24のセマフォ変数に1加算した値をセマフォ変数として更新し(S73)、ワークコンプリーション回収処理を終了する。これは、ワークリクエスト26の処理が完了したため、ワーククキュー24で1つ空きができたことを確認できたからである。ワークキュー24に対応するセマフォ変数値52は、コプロセッサ8がワークリクエスト26の処理を完了した際に更新されるべきだが、CPU2はどのタイミングでコプロセッサ8がワークリクエスト26を処理するか知ることができない。そこで、ワークコンプリーション30の回収時にワークキュー24に空きができたものとみなし、セマフォ変数を更新する。
【0043】
図7のワークコンプリーション回収処理によって、ワークキュー24の空き状態を表すセマフォ変数が適切に更新され、ワークキュー24のあふれを防止することができる。また、ワークコンプリーション30の回収時にワークキュー24のセマフォ変数を更新することにより、本発明はHCAのコプロセッサ8の処理に関係なくOSやアプリケーション側のみで実装することができ、導入が容易になり、ハードウエアの実装を複雑化させずに済む。
【0044】
以上本発明の第一の実施形態によれば、ワークキュー24に対応するセマフォ変数を適切に更新し、ワークリクエストを追加する場合、セマフォ変数を参照することにより、ワークキュー24のオーバフローを防止することが可能である。
【0045】
また、第一の実施形態において予めコンプリーションキュー28に蓄積可能なデータ数がワークキュー24に蓄積可能なデータ数の最大数以上になるようコンプリーションキュー28のサイズを設定することにより(コンプリーションキュー28に対するセマフォ変数を設定することなく)、ワークキュー24に対して設定されたセマフォ変数のみを利用し本発明を適用することができる。
【0046】
すなわち、ある時点でワークキュー24に蓄積されたワークリクエスト26をすべてコンプリーションキュー28に移したとしても、コンプリーションキュー28が溢れないことが確約されるため、要求処理の実行にあたっては、各ワークキュー24へワークリクエスト26を蓄積する際のワークキュー24のオーバフローのみを防止すればよいからである。
【0047】
第一の実施形態においては、ワークキュー24にのみセマフォ変数を設定したが、コンプリーションキュー28にのみセマフォ変数を設定し、コンプリーションキュー28のオーバフローを防止することも可能である。図6、図7におけるステップS62、S63、S73のワークキュー24の箇所を適宜コンプリーションキュー28と読み替えることで本発明の適用が可能となる。
【0048】
コンプリーションキューに空きが無い場合、ワークリクエスト26が追加されることはない。ワークリクエスト26とワークコンプリーション30は1対1に対応するため、追加されたワークリクエスト26が原因でコンプリーションキュー28がオーバフローすることはない。こうして、コンプリーションキュー28のオーバフローを防止することができる。また、ワークリクエスト26の蓄積時にコンプリーションキュー28のセマフォ変数を更新することにより、本発明はHCAのコプロセッサの処理に関係なく実装することができ、導入が容易になり、ハードウエアの実装を複雑化させずに済む。
【0049】
また、第一の実施形態の変形例として、ワークキュー24、コンプリーションキュー28に共にセマフォ変数を設定し、両キューのオーバフローを防止することも可能である。第一の実施形態の変形例におけるワークリクエスト蓄積処理とワークコンプリーション回収処理について説明する。
【0050】
図8は、第一の実施形態の変形例におけるワークリクエスト蓄積処理を説明するフローチャートである。図6と同じステップには同じステップ番号が振られており、必要がなければ説明は省略する。予め、セマフォ変数表22には、キュー番号WQ1、CQ1のワークキュー24、コンプリーションキュー28に対応するセマフォ変数の初期値として、各キューに蓄積可能なデータの最大数が設定されている。
【0051】
まず、CPU2は、ワークキュー24に対応するセマフォ変数が正の値か判定する(S62)。これは、図6と同じステップであり説明を省略する。ステップS62でワークキュー24に空きがある場合、CPU2はワークキュー24のセマフォ変数から1減算した値を新たなセマフォ変数としてセマフォ変数表22を更新する(S63)。これは、ワークリクエスト26が蓄積される場合ワーククキュー24の空きが1つ消費されることによるものである。
【0052】
ステップS62で空きが無いと判定される場合、一定時間待機し再びステップS62の処理を実施する。こうして、ワークキュー24に空きができるのを待つ。もしくは、蓄積をあきらめる。
【0053】
ステップS63が済むと、コンプリーションキュー28に対応するセマフォ変数が正の値か判定する(S64)。CPU2は、セマフォ変数表22を参照し、キュー番号CQ1であるコンプリーションキュー28に対応するセマフォ変数値52を得る。セマフォ変数値が正であれば、コンプリーションキュー28に空きがあり、ワークコンプリーション30を蓄積できることを意味する。
【0054】
ステップS64で空きがあると判定される場合、CPU2はコンプリーションキュー28のセマフォ変数から1減算した値を新たなセマフォ変数としてセマフォ変数表22を更新する(S65)。コンプリーションキュー28に対応するセマフォ変数値は、コプロセッサ8がワークリクエスト26の処理を完了した後に更新されるべきだが、CPU2はどのタイミングでコプロセッサ8がワークリクエスト26を処理するか知ることができない。また、ワークキュー24に蓄積されたワークリクエスト26は必ず処理完了後にそのワークリクエスト26に対応するワークコンプリーション30がコンプリーションキュー28に蓄積され、1対1に対応するものである。そこで、ワークキュー24へのワークリクエスト26の蓄積時にコンプリーションキュー28が1つ消費されたものとみなし、コンプリーションキュー28のセマフォ変数を更新する。
【0055】
ステップS64で空きが無いと判定される場合、一定時間待機し再びステップS64の処理を実施する。こうして、コンプリーションキュー28に空きができるのを待つ。
【0056】
こうして、ワークキュー24とコンプリーションキュー28に共に空きがある場合、ワークキュー24にワークリクエスト26を蓄積する(S66)。そして、ステップS64の蓄積処理が成功したか判定する(S67)。
【0057】
ステップS67でワークリクエスト26の蓄積に成功すれば、ワークリクエスト蓄積処理を終了する。ステップS67で失敗した場合、ワークキュー24のセマフォ変数、コンプリーションキューのセマフォ変数にそれぞれ1加算し(S69)、ワークリクエスト蓄積処理を終了する。ステップS63、S65では、ワークリクエストが蓄積されワーククキュー24、コンプリーションキュー28の空きがそれぞれ1つ消費されるものとして、セマフォ変数を更新したが、ステップS67でワークリクエストの蓄積に失敗したため、ワーククキュー24、コンプリーションキュー28の空きは消費されていない。従ってステップS69では、ステップS63、S65で減算した値を元に戻す。
【0058】
図8のワークリクエスト26蓄積処理によって、各キューの空き状態を表すセマフォ変数が適切に更新され、ワークキューに空きが無い場合、ワークリクエスト26が追加されることはない。また、コンプリーションキューに空きが無い場合も同様にワークリクエスト26が追加されることはない。ワークリクエスト26とワークコンプリーション30は1対1に対応するため、追加されたワークリクエスト26が原因でコンプリーションキュー28がオーバフローすることはない。こうして、ワークキュー24、およびコンプリーションキュー28のオーバフローを防止することができる。また、ワークリクエスト26の蓄積時にコンプリーションキュー28のセマフォ変数を更新することにより、本発明はHCAのコプロセッサの処理に関係なく実装することができ、導入が容易になり、ハードウエアの実装を複雑化させずに済む。
【0059】
図9は、第一の実施形態の変形例におけるワークコンプリーション回収処理を説明するフローチャートである。図7と同じステップには同じステップ番号が振られており、必要がなければ説明は省略する。
【0060】
まず、コンプリーションキュー28にワークコンプリーション30が蓄積されているか判定する(S71)。そして、CPU2はワークキュー24のセマフォ変数に1加算した値をセマフォ変数として更新する(S73)。次に、コンプリーションキュー28のセマフォ変数に1加算した値を新たなセマフォ変数値として更新する(S74)。これは、ステップS82でワークコンプリーション30を1つ回収したことによりコンプリーションキュー28に空きができたためである。
【0061】
図9のワークコンプリーション30回収処理によって、各キューの空き状態を表すセマフォ変数が適切に更新され、ワークキュー24、およびコンプリーションキュー28のあふれを防止することができる。また、ワークコンプリーション30の回収時にワークキュー24のセマフォ変数を更新することにより、本発明はHCAのコプロセッサの処理に関係なく実装することができ、導入が容易になり、ハードウエアの実装を複雑化させずに済む。
【0062】
なお、上記の第一の実施形態の変形例は、ワークキュー24とコンプリーションキュー28が1対1に対応するのであれば、それぞれが複数存在する構成においても適用が可能である。
【0063】
次に本発明の第二の実施形態について説明する。第二の実施形態は、第一の実施形態と同じ図1の構成において、メモリ上に複数のワークキュー24が確保され、複数のワークキュー24に対し1つのコンプリーションキュー28が確保される場合である。本発明の第二の実施形態においては、ワークキュー24およびコンプリーションキュー28に対して、各キューに蓄積可能なデータ(ワークリクエスト26およびワークコンプリーション30)の個数を示すセマフォ変数を設定することで、各キューが溢れることを防止する。
【0064】
図10は、本発明の第二の実施形態においてCPU2が周辺機器に格納されたデータにアクセスする際の動作を示す図である。図2と同じ箇所には同じ番号が振られており、必要が無ければ説明を省略する。
【0065】
図10のCPU2は、OSやアプリケーションプログラムからの処理要求を含むデータをワークリクエスト26として、開始番地と終了番地により特定される領域としてそれぞれメモリ7に確保された、ワークキュー番号WQ1からWQnまでのn個(nは自然数)のワークキュー241からワークキュー24nに蓄積する。CPU2は各ワークキュー24と後述するコンプリーションキュー28に対応して設定されるセマフォ変数が格納されたメモリ5のセマフォ変数表22を参照し、ワークリクエスト26の蓄積が可能か判定する。
【0066】
ワークリクエスト26の蓄積が可能であれば、ワークリクエスト26がワークキュー24の末尾に追加される。CPU2は、ワークリクエスト26がどのワークキュー24に蓄積されたかを示す情報をメモリ5のワークキュー24対ワークリクエスト26対応表23に格納し、そしてセマフォ変数表22を更新する。このワークリクエスト26蓄積処理の詳細については後述する。
【0067】
コプロセッサ8は、特定のタイミングでワークキュー24から先頭のワークリクエスト26を取り出し、処理要求を実行し、処理要求内容に沿ってインフィニバンドスイッチ9を介しファブリックネットワークに接続されたTCAとデータ伝送を行い、ワークリクエスト26を完了する。取り出したワークリクエスト26を処理し終えたら、コプロセッサ8はワークコンプリーション30を作成し、コンプリーションキュー28に蓄積する。一般には、ワークキュー24とコンプリーションキュー28が1対1に対応している必要はなく、図10のように1つのコンプリーションキュー28に対して複数のワークキュー24を対応させることが可能である。
【0068】
CPU2は、特定のタイミングでコンプリーションキュー28からワークコンプリーション30を回収し、対応するワークリクエスト26が完了したことを確認し、処理要求が完了する。同時にCPU2はメモリ5のセマフォ変数表22のセマフォ変数を更新する。このワークコンプリーション回収処理の詳細については後述する。
【0069】
なお、図2では1つだが、コンプリーションキュー28を複数有する構成にすることも可能である。また各ワークキュー24には特定の役割を与えることができる。例えば、WQ1はInfinibandメッセージ送信用のワークリクエスト26が、WQ2はInfinibandメッセージ受信用のワークリクエスト26が蓄積されるよう設定することが可能である。また、ワークリクエスト26、ワークコンプリーション30、セマフォ変数表22のデータ構成は、第一の実施形態と同じくそれぞれ図3、図4、図5のようになっている。
【0070】
図11は、メモリ5に格納されるワークキュー対ワークリクエスト対応表23である。図11の各エントリには、キュー番号51とそのキュー番号で特定されるワークキュー24に蓄積されたワークリクエスト番号31のリスト111が格納される。この対応表を参照すれば、各ワークキュー24に蓄積されたワークリクエスト26番号のリストを得ることができる。従って、あるワークリクエスト26がどのワークキュー24に蓄積されたかを特定することが可能である。図11においては、例えば、キュー番号WQ1であるキューに、リストWRL1に含まれるワークリクエスト番号(1、12、28)で特定されるワークリクエスト26が蓄積されていることがわかる。
【0071】
次に本発明の第二の実施形態におけるワークリクエスト蓄積処理およびワークコンプリーションを説明する。
【0072】
図12は、本発明の第二の実施形態におけるワークリクエスト蓄積処理を説明するフローチャートである。図6および図8と同じステップには同じステップ番号が振られており、必要がなければ説明は省略する。予め、セマフォ変数表22には、各キューに対するセマフォ変数の初期値として、各キューに蓄積可能なデータの最大数が設定されている。
【0073】
まず、OSやアプリケーションプログラムからの処理要求に対応するワークキュー24が決定される(S61)。CPU2は、処理要求内容に応じて、適切なワークキュー24のワークキュー24番号を取得する。例えば、処理要求内容がデータ送信で、図10のキュー番号WQ1のワークキュー24がデータ送信用に割り当てられていれば、キュー番号WQ1のワークキュー24が選択される。各ワークキュー24への用途の割り当ては自由に定めることができる。また、各ワークキュー24に特に用途が設定されていなければ任意に1つのワークキュー24を選択してもよい。
【0074】
次にステップS61で決定されたワークキュー24のセマフォ変数が正の値か判定する(S62)。CPU2は、メモリ5のセマフォ変数表22を参照し、ステップS61で決定されたワークキュー24のセマフォ変数値を得る。
【0075】
ステップS62でセマフォ変数の値が正であれば、CPU2はステップS61で決定されたワークキュー24のセマフォ変数から1減算した値を新たなセマフォ変数としてセマフォ変数表22を更新する(S63)。ステップS62でセマフォ変数の値が正であれば、そのワークキュー24には空きがあり、ワークリクエスト26が蓄積できる。従って、ワークリクエスト26が蓄積された場合そのワーククキューの空きが1つ消費されることによるものである。
【0076】
ステップS62で空きが無いと判定される場合、一定時間待機し再びステップS62の処理を実施する。こうして、ワークキュー24に空きができるのを待つ。
【0077】
ステップS63が済むと、コンプリーションキュー28のセマフォ変数が正の値か判定する(S64)。CPU2は、セマフォ変数表22を参照し、コンプリーションキュー28のセマフォ変数値を得る。セマフォ変数値が正であれば、コンプリーションキュー28に空きがあり、ワークコンプリーション30を蓄積できる。
【0078】
ステップS64で空きがあると判定される場合、CPU2はコンプリーションキュー28のセマフォ変数から1減算した値を新たなセマフォ変数としてセマフォ変数表22を更新する(S65)。コンプリーションキュー28に対応するセマフォ変数値は、コプロセッサ8がワークリクエスト26の処理を完了した後に更新されるべきだが、CPU2はどのタイミングでコプロセッサ8がワークリクエスト26を処理するか知ることができない。また、ワークキュー24に蓄積されたワークリクエスト26は必ず処理完了後にそのワークリクエスト26に対応するワークコンプリーション30がコンプリーションキュー28に蓄積され、1対1に対応するものである。そこで、ワークキュー24へのワークリクエスト26の蓄積時にコンプリーションキュー28が1つ消費されたものとみなし、コンプリーションキュー28のセマフォ変数を更新する。
【0079】
ステップS64で空きが無いと判定される場合、一定時間待機し再びステップS64の処理を実施する。こうして、コンプリーションキュー28に空きができるのを待つ。
【0080】
こうして、ワークキュー24とコンプリーションキュー28に共に空きがある場合、ステップS61で決定されたワークキュー24にワークリクエスト26を蓄積する(S66)。次に、ステップS66の蓄積処理が成功したか判定する(S67)。ワークキュー24への蓄積は可能な状態であったが、蓄積処理の途中で装置の電源断や、割り込み処理による蓄積処理中止などで、蓄積処理に失敗した場合そのままワークリクエスト蓄積処理を中止する。
【0081】
ステップS67でワークリクエスト26の蓄積に成功すれば、ステップS66で蓄積されたワークリクエスト26と、そのワークリクエスト26が蓄積されたワークキュー24を対応付けて記録し(S68)、 ワークリクエスト蓄積処理を終了する。これは、メモリ5に格納されたワークキュー対ワークリクエスト対応表23で、ワークキュー24のキュー番号51に対応するワークリクエストIDリストに、ステップS64で蓄積されたワークリクエスト番号を追加すればよい。
【0082】
ステップS67で失敗した場合、ステップS61で特定されたワークキュー24のセマフォ変数、コンプリーションキューのセマフォ変数にそれぞれ1加算し(S69)、ワークリクエスト蓄積処理を終了する。ステップS63、S65では、ワークリクエストが蓄積されワーククキュー24、コンプリーションキュー28の空きがそれぞれ1つ消費されるものとして、セマフォ変数を更新したが、ステップS67でワークリクエストの蓄積に失敗したため、ワーククキュー24、コンプリーションキュー28の空きは消費されていない。従ってステップS69では、ステップS63、S65で減算した値を元に戻す。
【0083】
図12のワークリクエスト蓄積処理によって、各キューの空き状態を表すセマフォ変数が適切に更新され、ワークキューに空きが無い場合、ワークリクエスト26が追加されることはない。また、コンプリーションキューに空きが無い場合も同様にワークリクエスト26が追加されることはない。ワークリクエスト26とワークコンプリーション30は1対1に対応するため、追加されたワークリクエスト26が原因でコンプリーションキュー28がオーバフローすることはない。こうして、ワークキュー24、およびコンプリーションキュー28のオーバフローを防止することができる。また、ワークリクエスト26の蓄積時にコンプリーションキュー28のセマフォ変数を更新することにより、本発明はHCAのコプロセッサの処理に関係なく実装することができ、導入が容易になり、ハードウエアの実装を複雑化させずに済む。
【0084】
図13は、本発明の第二の実施形態におけるワークコンプリーション回収処理を説明するフローチャートである。まず、コンプリーションキュー28にワークコンプリーション30が蓄積されているか判定する(S71)。CPU2は、コンプリーションキュー28の先頭からワークコンプリーション30を取り出し、コンプリーションキュー28が空なら、そのまま処理を終了する。
【0085】
次に、抽出されたワークコンプリーション30からそのワークコンプリーション30に対応するワークリクエスト26が蓄積されたワークキュー24を特定する(S72)。ワークコンプリーション30は処理が完了したワークリクエスト26に対応して作成されるものであり、図4に示されているように、ワークコンプリーション30には、処理されたワークリクエスト番号41が格納されている。CPU2は、メモリ5のワークキュー対ワークリクエスト対応表23を参照し、得られたワークリクエスト番号41が含まれるワークリクエストIDリスト111を検索し、対応するキュー番号51を得る。
【0086】
そして、CPU2はステップS72で特定されたワークキュー24のセマフォ変数に1加算した値をセマフォ変数として更新する(S73)。これは、ワークリクエスト26の処理が完了したため、ステップS72で特定されたワーククキューで1つ空きができたことを確認できたからである。ワークキュー24に対応するセマフォ変数値は、コプロセッサ8がワークリクエスト26の処理を完了した際に更新されるべきだが、CPU2はどのタイミングでコプロセッサ8がワークリクエスト26を処理するか知ることができない。そこで、ワークコンプリーション30の回収時にワークキュー24に空きができたものとみなし、セマフォ変数を更新する。
【0087】
次に、コンプリーションキュー28のセマフォ変数に1加算した値を新たなセマフォ変数値として更新する(S74)。これは、ステップS72でワークコンプリーション30を1つ回収したことによりコンプリーションキュー28に空きができたためである。
【0088】
図13のワークコンプリーション回収処理によって、各キューの空き状態を表すセマフォ変数が適切に更新され、ワークキュー24、およびコンプリーションキュー28のオーバフローを防止することができる。また、ワークコンプリーションの回収時にワークキュー24のセマフォ変数を更新することにより、本発明はHCAのコプロセッサの処理に関係なく実装することができ、導入が容易になり、ハードウエアの実装を複雑化させずに済む。
【0089】
また、第二の実施形態において予めコンプリーションキュー28に蓄積可能なデータ数が各ワークキュー24に蓄積可能なデータ数の最大数の総和以上になるようコンプリーションキュー28のサイズを設定することにより、コンプリーションキュー28に対するセマフォ変数を設定することなく、ワークキュー24に対して設定されたセマフォ変数のみを利用し本発明を適用することができる。
【0090】
すなわち、ある時点で各ワークキュー24に蓄積されたワークリクエスト26をすべてコンプリーションキュー28に移したとしても、コンプリーションキュー28が溢れないことが確約されるため、処理要求の実行にあたっては、各ワークキュー24へワークリクエスト26を蓄積する際のワークキュー24のオーバフローのみを防止すればよいからである。
【0091】
本発明は、サーバ対サーバ、サーバ対ストレージ、ブレードサーバのバックプレーンを介したブレード間のプロセス間通信あるいは同一サーバ内のプロセス間通信にも適用が可能である。また、プログラムとしてOSやアプリケーションプログラムの機能として組み込んだり、OSとアプリケーションプログラムの仲介をするミドルウエアとして提供することが可能である。
【0092】
以上をまとめると付記のようになる。
【0093】
(付記1) 処理要求情報が蓄積される第一の領域を設定する工程と、処理要求の完了を示す情報である処理完了情報が蓄積される第二の領域を設定する工程と、前記第一の領域に対応するセマフォ変数の初期値を前記第一の領域に蓄積可能な情報数の最大数として設定する工程と、前記第一の領域に対応するセマフォ変数の値から1を減算した値が正の値か判定し、正の値であれば、前記第一の領域に前記処理要求情報を追加し、前記第一の領域に対応するセマフォ変数の値から1を減算した値を前記第一の領域に対応するセマフォ変数として更新する工程と、前記要求された処理が完了した場合、該処理要求を特定する情報と前記処理完了情報を対応付けて前記第二の領域に蓄積する工程と、前記第二の領域に前記処理完了情報が蓄積されているか判定し、蓄積されていれば、前記第一の領域に対応するセマフォ変数に1を加算した値を前記第一の領域に対応するセマフォ変数として更新し、前記処理完了情報を1つ削除する工程を有することを特徴とする情報蓄積制御方法。
【0094】
(付記2) 付記1において、前記第二の領域に蓄積可能な情報数の最大数が、前記第一の領域に蓄積可能な情報数の最大数以上であることを特徴とする情報蓄積制御方法。
【0095】
(付記3) 処理要求情報が蓄積される第一の領域を設定する工程と、処理要求の完了を示す情報である処理完了情報が蓄積される第二の領域を設定する工程と、前記第一の領域および前記第二の領域にそれぞれ対応するセマフォ変数の初期値を前記第一の領域および前記第二の領域にそれぞれ蓄積可能な情報数の最大数として設定する工程と、前記第一の領域に対応するセマフォ変数の値から1を減算した値と前記第二の領域に対応するセマフォ変数の値から1を減算した値が共に正の値か判定し、共に正の値であれば、前記第一の領域に処理要求情報を追加し、かつ前記第一の領域に対応するセマフォ変数の値から1を減算した値を前記第一の領域に対応するセマフォ変数として、また前記第二の領域に対応するセマフォ変数の値から1を減算した値を前記第二の領域に対応するセマフォ変数としてそれぞれ更新する工程と、前記処理要求が完了した場合、該処理要求を特定する情報を前記処理完了情報と対応付けて前記第二の領域に蓄積する工程と、前記第二の領域に前記処理完了情報が蓄積されているか判定し、蓄積されていれば、前記第一の領域に対応するセマフォ変数に1を加算した値を前記第一の領域に対応するセマフォ変数として、また前記第二の領域に対応するセマフォ変数の値から1を加算した値を前記第二の領域に対応するセマフォ変数としてそれぞれ更新し、前記処理完了情報を1つ削除する工程を有することを特徴とする情報蓄積制御方法。
【0096】
(付記4) 処理要求情報が蓄積される複数の第一の領域を設定する工程と、
処理要求の完了を示す情報である処理完了情報が蓄積される第二の領域を設定する工程と、前記複数の第一の領域にそれぞれ対応するセマフォ変数の初期値を前記複数の第一の領域にそれぞれ蓄積可能な情報数の最大数として設定する工程と、前記複数の第一の領域のうち1つを選択し、前記選択された第一の領域に対応するセマフォ変数の値から1を減算した値が正の値か判定し、正の値であれば、前記選択された第一の領域に処理要求情報を追加し、前記選択された第一の領域と前記処理要求を特定する情報を対応付けて対応表に蓄積し、前記選択された第一の領域に対応するセマフォ変数の値から1を減算した値を前記選択された第一の領域に対応するセマフォ変数として更新する工程と、前記処理要求が完了した場合、該処理要求を特定する情報を前記処理完了情報と対応付けて前記第二の領域に蓄積する工程と、前記第二の領域に前記処理完了情報が蓄積されているか判定し、蓄積されていれば、前記処理完了情報を1つ読み出し、前記読み出された処理完了情報に対応する前記処理要求を特定し、前記対応表を参照して該特定された処理要求が蓄積された前記第一の領域を特定し、該特定された第一の領域に対応するセマフォ変数に1を加算した値を前記特定された第一の領域に対応するセマフォ変数として更新し、前記読み出された処理完了情報を削除する工程を有することを特徴とする情報蓄積制御方法。
【0097】
(付記5) 付記4において、前記第二の領域に蓄積可能な情報数の最大数が、前記複数の第一の領域に蓄積可能な情報数の最大数の総和以上であることを特徴とする情報蓄積制御方法。
【0098】
(付記6) 処理要求情報が蓄積される複数の第一の領域を設定する工程と、処理要求の完了を示す情報である処理完了情報が蓄積される第二の領域を設定する工程と、複数の第一の領域の各第一の領域および第二の領域にそれぞれ対応するセマフォ変数の初期値を前記各第一の領域および前記第二の領域にそれぞれ蓄積可能な情報数の最大数として設定する工程と、前記複数の第一の領域のうち1つを選択し、前記選択された第一の領域に対応するセマフォ変数の値から1を減算した値と前記第二の領域に対応するセマフォ変数の値から1を減算した値が共に正の値か判定し、共に正の値であれば、前記選択された第一の領域に処理要求情報を追加し、前記選択された第一の領域と前記処理要求を特定する情報とを対応付けて対応表に蓄積し、前記選択された第一の領域に対応するセマフォ変数の値から1を減算した値を前記選択された第一の領域に対応するセマフォ変数として、また前記第二の領域に対応するセマフォ変数の値から1を減算した値を前記第二の領域に対応するセマフォ変数としてそれぞれ更新する工程と、前記処理要求が完了した場合、該処理要求を特定する情報を前記処理完了情報に対応付けて前記第二の領域に蓄積する工程と、前記第二の領域に前記処理完了情報が蓄積されているか判定し、蓄積されていれば、前記処理完了情報を1つ読み出し、前記読み出された処理完了情報に対応する前記処理要求を特定し、前記対応表を参照して該特定された処理要求が蓄積された前記第一の領域を特定し、該特定された第一の領域に対応するセマフォ変数に1を加算した値を前記特定された第一の領域に対応するセマフォ変数として、また前記第二の領域に対応するセマフォ変数に1を加算した値を前記第二の領域に対応するセマフォ変数としてそれぞれ更新し、前記読み出された処理完了情報を削除する工程を有することを特徴とする情報蓄積制御方法。
【0099】
(付記7) 処理要求情報が蓄積される第一の領域と、処理要求の完了を示す情報である処理完了情報が前記処理要求を特定する情報と対応付けられ蓄積される第二の領域と、前記第一の領域を特定する情報とセマフォ変数が対応付けられ蓄積されるセマフォ変数表とが格納される蓄積部と、前記蓄積部を制御する制御部とを有する装置において実行されるプログラムであって、前記制御部に、前記第一の領域に対応するセマフォ変数の初期値を前記第一の領域に蓄積可能な情報数の最大数として設定させる工程と、前記第一の領域に対応するセマフォ変数の値から1を減算した値が正の値か判定させ、正の値であれば、前記第一の領域に対応するセマフォ変数の値から1を減算した値を前記第一の領域に対応するセマフォ変数として前記セマフォ変数表を更新させ、前記第一の領域へ前記処理要求情報を追加させる工程と、前記第二の領域に前記処理完了情報が蓄積されているか判定させ、蓄積されていれば、前記第一の領域に対応するセマフォ変数に1を加算した値を前記第一の領域に対応するセマフォ変数として前記セマフォ変数表を更新させ、前記処理完了情報を1つ削除させる工程を実行させるためのプログラム。
【0100】
(付記8) 処理要求情報が蓄積される第一の領域と、処理要求の完了を示す処理完了情報が前記処理要求を特定する情報と対応付けられ蓄積される第二の領域と、前記第一の領域を特定する情報とセマフォ変数が対応付けられ蓄積されるセマフォ変数表とが格納される蓄積部と、前記蓄積部を制御する制御部とを有する装置において実行されるプログラムであって、前記制御部に、前記第一の領域および前記第二の領域にそれぞれ対応するセマフォ変数の初期値を前記第一の領域および前記第二の領域にそれぞれ蓄積可能な情報数の最大数として設定させる工程と、前記第一の領域に対応するセマフォ変数の値から1を減算した値と前記第二の領域に対応するセマフォ変数の値から1を減算した値が共に正の値か判定させ、共に正の値であれば、前記第一の領域に対応するセマフォ変数の値から1を減算した値を前記第一の領域に対応するセマフォ変数として、また前記第二の領域に対応するセマフォ変数の値から1を減算した値を前記第二の領域に対応するセマフォ変数としてそれぞれ前記セマフォ変数表を更新させ、前記第一の領域へ前記処理要求情報を追加させる工程と、前記第二の領域に前記処理完了情報が蓄積されているか判定させ、蓄積されていれば、前記第一の領域に対応するセマフォ変数に1を加算した値を前記第一の領域に対応するセマフォ変数として、また前記第二の領域に対応するセマフォ変数の値から1を加算した値を前記第二の領域に対応するセマフォ変数としてそれぞれ前記セマフォ変数表を更新させ、前記処理完了情報を1つ削除させる工程を実行させるためのプログラム。
【0101】
(付記9) 処理要求情報が蓄積される複数の第一の領域と、処理要求の完了を示す処理完了情報が前記処理要求を特定する情報と対応付けられ蓄積される第二の領域と、前記第一の領域を特定する情報とセマフォ変数が対応付けられ蓄積されるセマフォ変数表とが格納される蓄積部と、前記蓄積部を制御する制御部とを有する装置において実行されるプログラムであって、前記制御部に、前記複数の第一の領域の各第一の領域および前記第二の領域にそれぞれ対応するセマフォ変数の初期値を前記第一の領域および前記第二の領域にそれぞれ蓄積可能な情報数の最大数として設定させる工程と、前記複数の第一の領域のうち1つを選択し、前記選択された第一の領域に対応するセマフォ変数の値から1を減算した値と前記第二の領域に対応するセマフォ変数の値から1を減算した値が共に正の値か判定させ、共に正の値であれば、前記選択された第一の領域と前記処理要求を対応付けて対応表に蓄積させ、前記選択された第一の領域に対応するセマフォ変数の値から1を減算した値を前記選択された第一の領域に対応するセマフォ変数として、また前記第二の領域に対応するセマフォ変数の値から1を減算した値を前記第二の領域に対応するセマフォ変数としてそれぞれ前記セマフォ変数表を更新させ、前記選択された第一の領域へ前記処理要求情報を追加させる工程と、前記第二の領域に前記処理完了情報が蓄積されているか判定させ、蓄積されていれば、前記処理完了情報を1つ読み出し、前記読み出された処理完了情報に対応する前記処理要求を特定し、該特定された第一の領域に対応するセマフォ変数に1を加算した値を前記特定された第一の領域に対応するセマフォ変数として、また前記第二の領域に対応するセマフォ変数の値から1を加算した値を前記第二の領域に対応するセマフォ変数としてそれぞれ前記セマフォ変数表を更新させ、前記処理完了情報を1つ削除させる工程を実行させるためのプログラム。
【0102】
(付記10) 処理要求情報が蓄積される第一の領域と、処理要求の完了を示す情報である処理完了情報が前記処理要求を特定する情報と対応付けられ蓄積される第二の領域とが格納される蓄積部と、前記蓄積部を制御し、前記処理要求を実行する制御部を有する第一の装置と、前記第一の装置に接続され、前記第一の領域を特定する情報とセマフォ変数が対応付けられ蓄積されるセマフォ変数表とが格納される蓄積部と、前記蓄積部を制御し、前記処理要求情報を前記第一の装置へ送信する制御部を有する第二の装置とを備え、前記第二の装置における制御部は、予め前記第一の領域に対するセマフォ変数の初期値を前記第一の領域に蓄積可能な情報数の最大数として設定し、特定のタイミングで前記第一の領域に対応するセマフォ変数から1を減算した値が正の値か判定し、正の値であれば、前記第一の領域に対応するセマフォ変数から1を減算した値を前記第一の領域に対応するセマフォ変数として更新し、前記第一の装置に新たな処理要求情報を送信し、前記第一の装置における制御部は、前記新たな処理要求情報を受信して前記第一の領域に追加し、特定のタイミングで前記第一の領域に蓄積された処理要求を実行し、該処理要求に対応する処理完了情報を作成して前記第二の領域に追加し、前記第二の装置における制御部は、特定のタイミングで前記第二の領域に前記処理完了情報が蓄積されているか判定し、蓄積されていれば、前記第一の領域に対応するセマフォ変数に1を加算した値を前記第一の領域に対応するセマフォ変数として更新し、前記第二の領域に蓄積された前記処理完了情報を1つ削除することを特徴とするシステム。
【0103】
(付記11) 処理要求情報が蓄積される第一の領域と、処理要求の完了を示す処理完了情報が前記処理要求を特定する情報と対応付けられ蓄積される第二の領域とが格納される蓄積部と、前記蓄積部を制御し、前記処理要求を実行する制御部を有する第一の装置と、前記第一の装置に接続され、前記第一の領域および前記第二の領域を特定する情報とセマフォ変数が対応付けられ蓄積されるセマフォ変数表とが格納される蓄積部と、前記蓄積部を制御し、前記処理要求情報を前記第一の装置へ送信する制御部を有する第二の装置とを備え、前記第二の装置における制御部は、予め前記第一の領域に対するセマフォ変数の初期値を前記第一の領域に蓄積可能な情報数の最大数として、前記第二の領域に対するセマフォ変数の初期値を前記第二の領域に蓄積可能な情報数の最大数としてそれぞれ設定し、特定のタイミングで前記第一の領域に対応するセマフォ変数から1を減算した値と前記第二の領域に対応するセマフォ変数から1を減算した値が共に正の値か判定し、共に正の値であれば、前記第一の領域に対応するセマフォ変数から1を減算した値を前記第一の領域に対応するセマフォ変数として、また前記第二の領域に対応するセマフォ変数から1を減算した値を前記第二の領域に対応するセマフォ変数としてそれぞれ更新し、前記第一の装置に新たな処理要求情報を送信し、前記第一の装置における制御部は、前記新たな処理要求情報を受信して前記第一の領域に追加し、特定のタイミングで前記第一の領域に蓄積された処理要求を実行し、該処理要求に対応する処理完了情報を作成して前記第二の装置に送信し、前記第二の装置における制御部は、前記処理完了情報を受信して前記第二の領域に追加し、特定のタイミングで前記第二の領域に前記処理完了情報が蓄積されているか判定し、蓄積されていれば、前記第一の領域に対応するセマフォ変数に1を加算した値を前記第一の領域に対応するセマフォ変数として、また前記第二の領域に対応するセマフォ変数の値から1を加算した値を前記第二の領域に対応するセマフォ変数としてそれぞれ更新し、前記第二の領域に蓄積された前記処理完了情報を1つ削除することを特徴とするシステム。
【0104】
(付記12) 処理要求情報が蓄積される複数の第一の領域と、処理要求の完了を示す処理完了情報が前記処理要求を特定する情報と対応付けられ蓄積される第二の領域とが格納される蓄積部と、前記蓄積部を制御し、かつ前記処理要求を実行する制御部を有する第一の装置と、前記第一の装置に接続され、前記複数の第一の領域の各第一の領域および前記第二の領域を特定する情報とセマフォ変数が対応付けられ蓄積されるセマフォ変数表と、前記処理要求を特定する情報と前記複数の第一の領域のうち該処理要求が蓄積される第一の領域を特定する情報が対応付けられ蓄積される対応表とが格納される蓄積部と、前記蓄積部を制御し、かつ前記処理要求情報を前記第一の装置へ送信する制御部を有する第二の装置とを備え、前記第二の装置における制御部は、予め複数の第一の領域の各第一の領域および第二の領域にそれぞれ対応するセマフォ変数の初期値を前記第一の領域および前記第二の領域にそれぞれ蓄積可能な情報数の最大数として設定し、特定のタイミングで前記複数の第一の領域のうち1つを選択し、前記選択された第一の領域に対応するセマフォ変数から1を減算した値と前記第二の領域に対応するセマフォ変数から1を減算した値が共に正の値か判定し、共に正の値であれば、前記選択された第一の領域に対応するセマフォ変数から1を減算した値を前記選択された第一の領域に対応するセマフォ変数として、また前記第二の領域に対応するセマフォ変数から1を減算した値を前記第二の領域に対応するセマフォ変数としてそれぞれ更新し、前記第一の装置に新たな処理要求情報を送信し、前記選択された第一の領域と前記処理要求を対応付けて対応表に蓄積し、前記第一の装置における制御部は、前記新たな処理要求情報を受信して前記第一の領域に蓄積し、特定のタイミングで前記第一の領域に蓄積された処理要求を実行し、該処理要求に対応する処理完了情報を作成して前記第二の装置に送信し、前記第二の装置における制御部は、前記処理完了情報を受信して前記第二の領域に蓄積し、特定のタイミングで前記第二の領域に前記処理完了情報が蓄積されているか判定し、蓄積されていれば、前記第一の領域に対応するセマフォ変数に1を加算した値を前記第一の領域に対応するセマフォ変数として、また前記第二の領域に対応するセマフォ変数の値から1を加算した値を前記第二の領域に対応するセマフォ変数としてそれぞれ更新し、かつ前記第二の領域に蓄積された前記処理完了情報を1つ削除することを特徴とするシステム。
【0105】
(付記13) 付記10において、
前記第一の装置が、サーバマシンに備えられたチャネルアダプタであり、前記第二の装置が、ネットワークインタフェースカードに備えられたチャネルアダプタであることを特徴とするシステム。
【0106】
(付記14) 付記10において、
前記第一の装置、前記第二の装置が共にサーバマシンに備えられたホストチャネルアダプタであることを特徴とするシステム。
【0107】
【発明の効果】
以上に説明したように、本発明によれば、2種類のキューをインタフェースとして介在させ処理要求を実行する場合、各キューがオーバフローすることなくキューに処理要求に関するデータを蓄積することができ、キューがオーバフローすることによる処理停止や処理遅延を防止することができる。また、本発明は処理要求の発行側装置における実装だけで済み、発行側装置がプログラムを実行可能な装置であれば、ソフトウエアによる実装が可能となる。
【図面の簡単な説明】
【図1】本発明の第一の実施形態に用いる情報処理装置の構成例を示す図である。
【図2】本発明の第一の実施形態においてCPUが周辺機器に格納されたデータにアクセスする際の動作を示す図である。
【図3】ワークキューに蓄積されるワークリクエストのデータ構成例を示す図である。
【図4】コンプリーションキューに蓄積されるワークコンプリーションのデータ構成例を示す図である。
【図5】メモリに格納されるセマフォ変数表である。
【図6】本発明の第一の実施形態におけるワークリクエスト蓄積処理を説明するフローチャートである。
【図7】本発明の第一の実施形態におけるワークコンプリーション回収処理を説明するフローチャートである。
【図8】第一の実施形態の変形例におけるワークリクエスト蓄積処理を説明するフローチャートである。
【図9】第一の実施形態の変形例におけるワークコンプリーション回収処理を説明するフローチャートである。
【図10】本発明の第二の実施形態においてCPUが周辺機器に格納されたデータにアクセスする際の動作を示す図である。
【図11】メモリに格納されるワークキュー対ワークリクエスト対応表である。
【図12】本発明の第二の実施形態におけるワークリクエスト蓄積処理を説明するフローチャートである。
【図13】本発明の第二の実施形態におけるワークコンプリーション回収処理を説明するフローチャートである。
【符号の説明】
1 コンピュータ、2 CPU、3 システムバス、4 メモリコントローラ、5メモリ、6 ホストチャネルアダプタ、7 メモリ、8 コプロセッサ、9 インフィニバンドスイッチ、10 ネットワークインタフェースカード、12 SCSIカード、14 ファイバチャネルカード、11、13、15ターゲットチャネルアダプタ、24 ワークキュー、26 ワークリクエスト、28 コンプリーションキュー、30 ワークコンプリーション[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a control method and program for executing processing requests stored in a queue, and a system using them.
[0002]
[Prior art]
Two types of queues are used as an interface with an issuing device that issues processing request information including a processing request and the receiving device that receives the processing request information, executes the processing request, and transmits the execution result to the issuing device. Sometimes used. In one queue, processing request information is accumulated as a queue, and is executed by the receiving apparatus in order from the processing request at the head of the queue.
[0003]
In the other queue, information indicating that the processing request is completed (processing completion information) is accumulated as a queue, and is collected by the issuing side device in order from the processing completion information at the head of the queue, and status confirmation at the time of processing completion, etc. Is done. For example, Infiniband (see Non-Patent Document 1) and VIA (Virtual Interface Architecture) (Non-Patent Document 2) proposed as next-generation input / output (I / O) technologies for connecting computers and peripheral devices In an architecture such as (see FIG. 4), processing requests are executed using the two types of queues described above.
[0004]
[Non-Patent Document 1]
Infiniband (SM) Trade Association, "Infiniband (TM) Architecture Specification Volume 1 Release 1.1", p. 80, section 3.2.1 Queuing, [online], Final, November 6,2002, [searched January 21, 2003 ] Internet <http://www.infinibandta.org/specs/>
[0005]
[Non-Patent Document 2]
Compaq Computer Corp., Intel Corporation, Microsoft Corporation, "Virtual Interface Architecture Specification", P.11, section 2.1. VI Architecture Components, [online], Draft Revision 1.0, December 4, 1997, [January 21, 2003 Search], Internet <ftp://download.intel.com/design/servers/vi/san_10.pdf>
[0006]
[Problems to be solved by the invention]
However, when processing requests are executed using the two types of queues described above as an interface, when processing request information or processing completion information is stored in each queue, the processing request information or processing completion information stored in the queue is stored. Is often not judged. Therefore, the number of storable data in each queue is exceeded, and the queue may overflow (overflow).
[0007]
When the queue overflows, the execution of the processing request is stopped, and the above-mentioned issuing side device or receiving side device is caused to perform a new process called a recovery process, which inevitably degrades the performance of the entire apparatus. As a matter of course, in order to perform the recovery process, implementation by software or hardware is required. In addition, in order to increase the number of data that can be stored, it is possible to secure a larger storage area and increase the size of each queue. Had occurred.
[0008]
In view of the above-described problems, the present invention provides an information accumulation control method for preventing each queue from overflowing when two types of queues are interposed as interfaces to execute processing requests accumulated in the queues. With the goal. Moreover, it is possible to prevent both queues from overflowing by using both in combination. In addition, it is necessary to simplify the implementation of hardware in order to reduce the implementation cost and achieve high performance. Therefore, it is desirable that hardware can be implemented by software implementation.
[0009]
[Means for Solving the Problems]
In order to solve the above problem, a step of setting a first area in which processing request information is accumulated, a step of setting a second area in which processing completion information that is information indicating completion of the processing request is stored, Setting the initial value of the semaphore variable corresponding to the first area as the maximum number of information that can be stored in the first area, and subtracting 1 from the value of the semaphore variable corresponding to the first area If the obtained value is a positive value, the processing request information is added to the first area, and a value obtained by subtracting 1 from the value of the semaphore variable corresponding to the first area The process of updating as the semaphore variable corresponding to the first area, and when the requested process is completed, the information specifying the process request and the process completion information are associated with each other and stored in the second area. Process and completion of the process in the second area It is determined whether information has been accumulated, and if accumulated, a value obtained by adding 1 to the semaphore variable corresponding to the first area is updated as the semaphore variable corresponding to the first area, and the processing completion information There is provided an information storage control method characterized by including a step of deleting one.
[0010]
In this case, it is possible to set the maximum number of information that can be stored in the second area to be equal to or greater than the maximum number of information that can be stored in the first area. It is also possible to set semaphore variables in both the first area and the second area.
[0011]
Further, the above-described problems include a step of setting a plurality of first areas in which processing request information is accumulated, and a step of setting a second area in which processing completion information that is information indicating completion of the processing request is accumulated. A step of setting an initial value of a semaphore variable corresponding to each of the plurality of first regions as a maximum number of pieces of information that can be stored in the plurality of first regions, and among the plurality of first regions If one is selected and a value obtained by subtracting 1 from the value of the semaphore variable corresponding to the selected first area is a positive value, and if it is a positive value, the selected first area Processing request information is added to the table, the information specifying the selected first area and the processing request is stored in the correspondence table, and the value of the semaphore variable corresponding to the selected first area is calculated. The value obtained by subtracting 1 corresponds to the selected first area. Updating as a semaphore variable; when the processing request is completed, storing information identifying the processing request in association with the processing completion information in the second area; and It is determined whether or not processing completion information is accumulated. If it is accumulated, one piece of the processing completion information is read, the processing request corresponding to the read processing completion information is specified, and the correspondence table is referred to The first area in which the specified processing request is stored is specified, and a value obtained by adding 1 to the semaphore variable corresponding to the specified first area corresponds to the specified first area. It is solved by providing an information storage control method characterized by comprising a step of updating as a semaphore variable to be performed and deleting the read processing completion information.
[0012]
In this case, it is also possible to set the maximum number of information that can be stored in the second area to be equal to or greater than the sum of the maximum number of information that can be stored in each first area. Furthermore, it is also possible to set semaphore variables in each of the plurality of first regions and the second region.
[0013]
In addition, the above-described problem is a first area in which processing request information is stored, and a second area in which processing completion information that is information indicating completion of the processing request is stored in association with information specifying the processing request. And a storage unit storing a semaphore variable table in which information specifying the first area and a semaphore variable are associated and stored, and a control unit that controls the storage unit A step of causing the control unit to set an initial value of a semaphore variable corresponding to the first area as a maximum number of information that can be stored in the first area; and corresponding to the first area It is determined whether the value obtained by subtracting 1 from the value of the semaphore variable is a positive value. If the value is positive, the value obtained by subtracting 1 from the value of the semaphore variable corresponding to the first area is the first area. As a semaphore variable corresponding to Updating the semaphore variable table, adding the processing request information to the first area, and determining whether the processing completion information is accumulated in the second area. A program for executing a step of updating the semaphore variable table with a value obtained by adding 1 to a semaphore variable corresponding to one area as a semaphore variable corresponding to the first area and deleting one piece of the processing completion information It is solved by providing.
[0014]
In addition, the above-described problem is a first area in which processing request information is stored, and a second area in which processing completion information that is information indicating completion of the processing request is stored in association with information specifying the processing request. Are stored in the storage unit, the first device having the control unit that controls the storage unit and executes the processing request, and information that is connected to the first device and identifies the first region And a semaphore variable table in which semaphore variables are associated and stored, and a second device having a control unit that controls the storage unit and transmits the processing request information to the first device The control unit in the second device sets an initial value of a semaphore variable for the first area as a maximum number of information that can be stored in the first area, and at a specific timing, Semaphore change corresponding to the first region If the value obtained by subtracting 1 from the positive value is a positive value, the value obtained by subtracting 1 from the semaphore variable corresponding to the first area is updated as the semaphore variable corresponding to the first area. Then, new processing request information is transmitted to the first device, and the control unit in the first device receives the new processing request information and adds it to the first region at a specific timing. The processing request stored in the first area is executed, processing completion information corresponding to the processing request is created and stored in the second apparatus, and the control unit in the second apparatus is specified. It is determined whether the processing completion information is accumulated in the second area at the timing of, and if it is accumulated, a value obtained by adding 1 to the semaphore variable corresponding to the first area is stored in the first area. Update as the corresponding semaphore variable, Is solved by providing a system and deletes one said processing completion information stored in the region.
[0015]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings. However, the technical scope of the present invention is not limited to such an embodiment, but covers the invention described in the claims and equivalents thereof.
[0016]
FIG. 1 is a diagram illustrating a configuration example of an information processing apparatus used in the first embodiment of the present invention. Although the application of the present invention is not limited to InfiniBand, in the embodiment of the present invention, a CPU that executes an OS command stored in a memory is a data (workpiece) including a processing request as a processing request issuing side device. A description will be given of how the present invention is applied when an InfiniBand host channel adapter in the same housing receives a work request as a receiving device.
[0017]
The memory 5 stores an operating system (OS), which is basic software for operating a computer, and application programs that operate on the OS. Based on the processing request from the OS or application program, the
[0018]
When the
[0019]
The InfiniBand switch 9 connects channel adapters and enables point-to-point data transmission between the channel adapters. In FIG. 1, the HCA 6 has a network interface card (NIC) 11 for connecting the computer 1 to the network via the InfiniBand switch 9, a
[0020]
FIG. 2 is a diagram showing an operation when the
[0021]
The value of the semaphore variable is decremented by 1 when one
[0022]
As the semaphore variable, the maximum amount of data that can be accumulated in the work queue 24 (for example, the size of the reserved area) is set, and the size of the
[0023]
The
[0024]
If the
[0025]
The
[0026]
The
[0027]
The
[0028]
FIG. 3 is a diagram illustrating a data configuration example of the
[0029]
FIG. 4 is a diagram illustrating a data configuration example of the
[0030]
FIG. 5 is a semaphore variable table 22 stored in the memory 5. Each entry in FIG. 5 stores a
In FIG. 5, WQ1 indicates a
[0031]
In the first embodiment of the present invention, a semaphore variable is set only for one
[0032]
In the first embodiment of the present invention, the semaphore variable table 22 is used, but implementation without using a table is also possible. For example, a pointer that identifies a semaphore corresponding to a work queue number may be known using a hash function.
[0033]
Subsequently, the work request accumulation process and the work completion collection process in the first embodiment of the present invention will be described.
[0034]
FIG. 6 is a flowchart for explaining work request accumulation processing in the first embodiment of the present invention. In the semaphore variable table 22, the maximum number of data that can be stored in the
[0035]
First, the
[0036]
If the
[0037]
If it is determined in step S62 that there is no space, the process waits for a predetermined time and the process of step S62 is performed again. In this way, it waits for the
[0038]
After step S63, work requests 26 are additionally accumulated in the work queue 24 (S66). Then, it is determined whether or not the accumulation process in step S64 is successful (S67). Even if storage to the
[0039]
If the
[0040]
The work request accumulation process in FIG. 6 appropriately updates the semaphore variable indicating the work queue availability, and if there is no available space, the
[0041]
FIG. 7 is a flowchart for explaining the work completion collection process according to the first embodiment of the present invention. First, it is determined whether or not the
[0042]
Then, the
[0043]
With the work completion collection process of FIG. 7, the semaphore variable indicating the empty state of the
[0044]
As described above, according to the first embodiment of the present invention, when a semaphore variable corresponding to the
[0045]
In the first embodiment, the size of the
[0046]
In other words, even if all the work requests 26 accumulated in the
[0047]
In the first embodiment, the semaphore variable is set only in the
[0048]
If there is no space in the completion queue, the
[0049]
As a modification of the first embodiment, semaphore variables can be set in both the
[0050]
FIG. 8 is a flowchart for explaining work request accumulation processing in a modification of the first embodiment. The same steps as those in FIG. 6 are assigned the same step numbers, and will not be described unless necessary. In the semaphore variable table 22, the maximum number of data that can be accumulated in each queue is set as initial values of semaphore variables corresponding to the
[0051]
First, the
[0052]
If it is determined in step S62 that there is no space, the process waits for a predetermined time and performs the process of step S62 again. In this way, it waits for the
[0053]
After step S63, it is determined whether the semaphore variable corresponding to the
[0054]
If it is determined in step S64 that there is a free space, the
[0055]
If it is determined in step S64 that there is no free space, the process waits for a predetermined time and performs the process of step S64 again. Thus, it waits for the
[0056]
Thus, when both the
[0057]
If the
[0058]
The semaphore variable indicating the free state of each queue is appropriately updated by the
[0059]
FIG. 9 is a flowchart for explaining the work completion collection process in the modification of the first embodiment. The same steps as those in FIG. 7 are assigned the same step numbers, and will not be described unless necessary.
[0060]
First, it is determined whether or not the
[0061]
The semaphore variable indicating the free state of each queue is appropriately updated by the
[0062]
Note that the modification of the first embodiment described above can be applied to a configuration in which a plurality of
[0063]
Next, a second embodiment of the present invention will be described. In the second embodiment, a plurality of
[0064]
FIG. 10 is a diagram showing an operation when the
[0065]
The
[0066]
If the
[0067]
The
[0068]
The
[0069]
In addition, although it is one in FIG. 2, it is also possible to employ a configuration having a plurality of
[0070]
FIG. 11 is a work queue to work request correspondence table 23 stored in the memory 5. Each entry in FIG. 11 stores a
[0071]
Next, work request accumulation processing and work completion in the second embodiment of the present invention will be described.
[0072]
FIG. 12 is a flowchart illustrating work request accumulation processing in the second embodiment of the present invention. The same steps as those in FIGS. 6 and 8 are given the same step numbers, and the description thereof will be omitted if not necessary. The maximum number of data that can be accumulated in each queue is set in advance in the semaphore variable table 22 as an initial value of the semaphore variable for each queue.
[0073]
First, the
[0074]
Next, it is determined whether or not the semaphore variable of the
[0075]
If the value of the semaphore variable is positive in step S62, the
[0076]
If it is determined in step S62 that there is no space, the process waits for a predetermined time and performs the process of step S62 again. In this way, it waits for the
[0077]
After step S63, it is determined whether the semaphore variable in the
[0078]
If it is determined in step S64 that there is a free space, the
[0079]
If it is determined in step S64 that there is no free space, the process waits for a predetermined time and performs the process of step S64 again. Thus, it waits for the
[0080]
Thus, if both the
[0081]
If the
[0082]
If it fails in step S67, 1 is added to each of the semaphore variables of the
[0083]
The work request accumulation process in FIG. 12 appropriately updates the semaphore variable indicating the free state of each queue, and when there is no free space in the work queue, the
[0084]
FIG. 13 is a flowchart illustrating the work completion collection process according to the second embodiment of the present invention. First, it is determined whether or not the
[0085]
Next, the
[0086]
Then, the
[0087]
Next, the value obtained by adding 1 to the semaphore variable in the
[0088]
With the work completion collection process of FIG. 13, the semaphore variables representing the free state of each queue are appropriately updated, and overflow of the
[0089]
In the second embodiment, the size of the
[0090]
That is, even if all the work requests 26 accumulated in each
[0091]
The present invention can also be applied to inter-process communication between blades via a server-to-server, server-to-storage, blade server backplane, or inter-process communication within the same server. Further, it can be incorporated as a function of the OS or application program as a program, or provided as middleware that mediates between the OS and the application program.
[0092]
The above is summarized as an appendix.
[0093]
(Additional remark 1) The process of setting the 1st area | region where process request information is accumulate | stored, the process of setting the 2nd area | region where process completion information which is the information which shows completion of a process request is accumulated, said 1st A step of setting the initial value of the semaphore variable corresponding to the first area as the maximum number of information that can be stored in the first area, and a value obtained by subtracting 1 from the value of the semaphore variable corresponding to the first area If it is a positive value, if it is a positive value, the processing request information is added to the first area, and a value obtained by subtracting 1 from the value of the semaphore variable corresponding to the first area Updating as a semaphore variable corresponding to the area, and when the requested process is completed, associating information for identifying the process request and the process completion information in the second area, The processing completion information is accumulated in the second area. If it has been accumulated, the value obtained by adding 1 to the semaphore variable corresponding to the first area is updated as the semaphore variable corresponding to the first area, and one piece of the processing completion information is deleted An information storage control method comprising the step of:
[0094]
(Supplementary note 2) The information accumulation control method according to supplementary note 1, wherein the maximum number of pieces of information that can be stored in the second area is equal to or greater than the maximum number of pieces of information that can be stored in the first area. .
[0095]
(Additional remark 3) The process of setting the 1st area | region where process request information is accumulate | stored, the process of setting the 2nd area | region where process completion information which is the information which shows completion of a process request is accumulated, said 1st Setting an initial value of a semaphore variable corresponding to each of the first region and the second region as a maximum number of information that can be stored in the first region and the second region, respectively, and the first region And the value obtained by subtracting 1 from the value of the semaphore variable corresponding to the second area are both positive values. If both are positive values, A value obtained by adding processing request information to the first area and subtracting 1 from the value of the semaphore variable corresponding to the first area as a semaphore variable corresponding to the first area, and the second area 1 from the value of the semaphore variable corresponding to A step of updating the subtracted value as a semaphore variable corresponding to the second area, and when the processing request is completed, information specifying the processing request is associated with the processing completion information in the second area. And the process completion information is stored in the second area, and if it is stored, a value obtained by adding 1 to the semaphore variable corresponding to the first area is determined. The value obtained by adding 1 to the value of the semaphore variable corresponding to the second area is updated as the semaphore variable corresponding to the second area, and the processing completion information is set to 1 An information storage control method comprising a step of deleting two.
[0096]
(Additional remark 4) The process of setting the some 1st area | region where process request information is accumulate | stored,
A step of setting a second area in which processing completion information, which is information indicating completion of a processing request, is stored; and an initial value of a semaphore variable corresponding to each of the plurality of first areas Setting the maximum number of pieces of information that can be stored in each of them, selecting one of the plurality of first areas, and subtracting 1 from the value of the semaphore variable corresponding to the selected first area If the selected value is a positive value, if it is a positive value, processing request information is added to the selected first area, and information for specifying the selected first area and the processing request is added. Updating the value obtained by subtracting 1 from the value of the semaphore variable corresponding to the selected first area as the semaphore variable corresponding to the selected first area; When the processing request is completed, the processing request is A step of storing information to be determined in association with the processing completion information in the second area, and determining whether the processing completion information is stored in the second area. Read one information, identify the processing request corresponding to the read processing completion information, identify the first area where the identified processing request is stored with reference to the correspondence table, Updating a value obtained by adding 1 to the semaphore variable corresponding to the identified first area as a semaphore variable corresponding to the identified first area, and deleting the read processing completion information; An information storage control method comprising:
[0097]
(Supplementary Note 5) In Supplementary Note 4, the maximum number of information that can be stored in the second region is equal to or greater than a sum of the maximum number of information that can be stored in the plurality of first regions. Information storage control method.
[0098]
(Additional remark 6) The process of setting the some 1st area | region where process request information is accumulate | stored, the process of setting the 2nd area | region where the process completion information which is the information which shows completion of a process request is accumulated, The initial value of the semaphore variable corresponding to each of the first region and the second region of the first region is set as the maximum number of information that can be stored in each of the first region and the second region. Selecting one of the plurality of first regions, subtracting 1 from the value of the semaphore variable corresponding to the selected first region, and the semaphore corresponding to the second region. It is determined whether the value obtained by subtracting 1 from the variable value is a positive value. If both are positive values, processing request information is added to the selected first area, and the selected first area And the information specifying the processing request are stored in the correspondence table in association with each other. The value obtained by subtracting 1 from the value of the semaphore variable corresponding to the selected first area is used as the semaphore variable corresponding to the selected first area, and the value of the semaphore variable corresponding to the second area is A step of updating a value obtained by subtracting 1 from a value as a semaphore variable corresponding to the second area, and when the processing request is completed, information specifying the processing request is associated with the processing completion information A step of accumulating in the second area, and determining whether or not the process completion information is accumulated in the second area, and if it is accumulated, one of the process completion information is read and the read process completion is completed The processing request corresponding to the information is identified, the first area where the identified processing request is stored is identified with reference to the correspondence table, and the semaphore variable corresponding to the identified first area Add 1 to And the value obtained by adding 1 to the semaphore variable corresponding to the second area is updated as the semaphore variable corresponding to the second area. An information storage control method comprising a step of deleting the read processing completion information.
[0099]
(Additional remark 7) The 1st area | region where process request information is accumulate | stored, the 2nd area | region where process completion information which is the information which shows completion of a process request is matched with the information which identifies the said process request, and is accumulate | stored, A program that is executed in an apparatus having an accumulation unit that stores information specifying the first area and a semaphore variable table in which semaphore variables are associated and accumulated, and a control unit that controls the accumulation unit. And causing the control unit to set an initial value of a semaphore variable corresponding to the first area as the maximum number of information that can be stored in the first area, and a semaphore corresponding to the first area. Determine whether the value obtained by subtracting 1 from the variable value is a positive value. If the value is positive, the value obtained by subtracting 1 from the value of the semaphore variable corresponding to the first area corresponds to the first area. As the semaphore variable Updating the fore variable table, adding the processing request information to the first area, and determining whether the processing completion information is stored in the second area. A program for executing a step of updating the semaphore variable table with a value obtained by adding 1 to a semaphore variable corresponding to the first area as a semaphore variable corresponding to the first area, and deleting one piece of the processing completion information.
[0100]
(Additional remark 8) The 1st area | region where process request information is accumulate | stored, the 2nd area | region where process completion information which shows completion of a process request is matched and stored with the information which specifies the said process request, said 1st A program that is executed in an apparatus having a storage unit that stores information for specifying a region and a semaphore variable table in which a semaphore variable is associated and stored, and a control unit that controls the storage unit, Causing the control unit to set an initial value of a semaphore variable corresponding to each of the first area and the second area as a maximum number of pieces of information that can be stored in the first area and the second area, respectively. And whether the value obtained by subtracting 1 from the value of the semaphore variable corresponding to the first area and the value obtained by subtracting 1 from the value of the semaphore variable corresponding to the second area are both positive values. Even if the value of For example, the value obtained by subtracting 1 from the value of the semaphore variable corresponding to the first area is used as the semaphore variable corresponding to the first area, and 1 is subtracted from the value of the semaphore variable corresponding to the second area. Updating the semaphore variable table as a semaphore variable corresponding to the second area and adding the processing request information to the first area, and the processing completion information in the second area. If it is accumulated, a value obtained by adding 1 to the semaphore variable corresponding to the first area is used as the semaphore variable corresponding to the first area, and also corresponds to the second area. Executing the step of updating the semaphore variable table with a value obtained by adding 1 from the value of the semaphore variable to be performed as a semaphore variable corresponding to the second area, and deleting one piece of the processing completion information A program for causing.
[0101]
(Supplementary Note 9) A plurality of first areas in which process request information is stored, a second area in which process completion information indicating completion of a process request is stored in association with information identifying the process request, A program executed in an apparatus having an accumulation unit that stores information for specifying a first area and a semaphore variable table in which semaphore variables are associated and accumulated, and a control unit that controls the accumulation unit. The initial value of the semaphore variable corresponding to each of the first region and the second region of the plurality of first regions can be stored in the control unit in the first region and the second region, respectively. A step of setting the maximum number of pieces of information, selecting one of the plurality of first regions, and subtracting 1 from the value of the semaphore variable corresponding to the selected first region, Corresponding to the second region If the values obtained by subtracting 1 from the value of the semaphore variable are both positive values, and if both are positive values, the selected first area and the processing request are associated with each other and accumulated in the correspondence table, A value obtained by subtracting 1 from the value of the semaphore variable corresponding to the selected first area is used as a semaphore variable corresponding to the selected first area, and the value of the semaphore variable corresponding to the second area Updating the semaphore variable table with a value obtained by subtracting 1 from the semaphore variable corresponding to the second area, and adding the processing request information to the selected first area; It is determined whether the processing completion information is accumulated in the area. If it is accumulated, one processing completion information is read, the processing request corresponding to the read processing completion information is identified, and the identified First The value obtained by adding 1 to the semaphore variable corresponding to the area is used as the semaphore variable corresponding to the specified first area, and the value obtained by adding 1 from the value of the semaphore variable corresponding to the second area is the first value. A program for executing a process of updating the semaphore variable table as a semaphore variable corresponding to a second area and deleting one piece of the processing completion information.
[0102]
(Additional remark 10) The 1st area | region where process request information is accumulate | stored, and the 2nd area | region where process completion information which is the information which shows completion of a process request is matched with the information which specifies the said process request, and are accumulate | stored. A storage unit to be stored; a first device having a control unit for controlling the storage unit and executing the processing request; and information and a semaphore connected to the first device to identify the first region. A storage unit storing a semaphore variable table in which variables are associated and stored; and a second device having a control unit that controls the storage unit and transmits the processing request information to the first device. A control unit in the second device sets in advance an initial value of a semaphore variable for the first area as a maximum number of information that can be stored in the first area; From the semaphore variable corresponding to the region It is determined whether the value obtained by subtracting 1 is a positive value. If the value is positive, the value obtained by subtracting 1 from the semaphore variable corresponding to the first area is updated as the semaphore variable corresponding to the first area. , Transmitting new process request information to the first apparatus, and the control unit in the first apparatus receives the new process request information and adds it to the first area, and at a specific timing, The processing request stored in the first area is executed, processing completion information corresponding to the processing request is created and added to the second area, and the control unit in the second device is configured at a specific timing. It is determined whether the processing completion information is accumulated in the second area, and if it is accumulated, a value obtained by adding 1 to the semaphore variable corresponding to the first area is set as the semaphore corresponding to the first area. Updated as a variable and accumulated in the second area System characterized in that to remove a said processing completion information.
[0103]
(Additional remark 11) The 1st area | region where process request information is accumulate | stored, and the 2nd area | region where process completion information which shows completion of a process request are matched with the information which specifies the said process request, and are accumulate | stored are stored. A first device having a storage unit, a control unit that controls the storage unit and executes the processing request, and is connected to the first device and identifies the first region and the second region A second storage unit that stores a semaphore variable table in which information and a semaphore variable are associated and stored; and a control unit that controls the storage unit and transmits the processing request information to the first device. And the control unit in the second device sets the initial value of the semaphore variable for the first region as the maximum number of information that can be stored in the first region in advance for the second region. The initial value of the semaphore variable is Set as the maximum number of information that can be stored in the area, and subtract 1 from the semaphore variable corresponding to the first area and 1 from the semaphore variable corresponding to the second area at a specific timing If both values are positive, and if both are positive, the value obtained by subtracting 1 from the semaphore variable corresponding to the first area is used as the semaphore variable corresponding to the first area, and A value obtained by subtracting 1 from the semaphore variable corresponding to the second area is updated as a semaphore variable corresponding to the second area, and new processing request information is transmitted to the first device, and the first The control unit in the apparatus receives the new process request information, adds it to the first area, executes the process request stored in the first area at a specific timing, and responds to the process request Processing completion information Create and send to the second device, the control unit in the second device receives the processing completion information and adds it to the second region, the specific region to the second region It is determined whether processing completion information is accumulated. If accumulated, a value obtained by adding 1 to the semaphore variable corresponding to the first area is used as the semaphore variable corresponding to the first area, and the second Updating a value obtained by adding 1 to the value of the semaphore variable corresponding to the second area as a semaphore variable corresponding to the second area, and deleting one piece of the processing completion information accumulated in the second area A system characterized by
[0104]
(Additional remark 12) The some 1st area | region where process request information is accumulate | stored, and the 2nd area | region where process completion information which shows completion of a process request are matched with the information which specifies the said process request, and are accumulate | stored And a first device having a control unit for controlling the storage unit and executing the processing request, and each first of the plurality of first regions connected to the first device. And a semaphore variable table in which information specifying the second area and the semaphore variable are associated and stored, information specifying the processing request, and the processing request among the plurality of first areas are stored. A storage unit that stores a correspondence table in which information specifying the first area is associated and stored, and a control unit that controls the storage unit and transmits the processing request information to the first device A second device comprising: the second device The control unit in the information in which the initial values of the semaphore variables respectively corresponding to the first area and the second area of the plurality of first areas can be stored in the first area and the second area, respectively. Set as the maximum number of numbers, select one of the plurality of first regions at a specific timing, and subtract 1 from the semaphore variable corresponding to the selected first region and the second It is determined whether the value obtained by subtracting 1 from the semaphore variable corresponding to the area is positive, and if both are positive values, the value obtained by subtracting 1 from the semaphore variable corresponding to the selected first area is determined. Update the value obtained by subtracting 1 from the semaphore variable corresponding to the second region as the semaphore variable corresponding to the second region, and the value obtained by subtracting 1 from the semaphore variable corresponding to the second region, respectively. New to one device Processing request information is transmitted, the selected first area and the processing request are associated with each other and accumulated in a correspondence table, and the control unit in the first device receives the new processing request information. Accumulating in the first area, executing the processing request stored in the first area at a specific timing, creating processing completion information corresponding to the processing request and transmitting to the second device, The control unit in the second device receives the processing completion information and accumulates it in the second area, determines whether the processing completion information is accumulated in the second area at a specific timing, and accumulates it. If so, a value obtained by adding 1 to the semaphore variable corresponding to the first area is set as a semaphore variable corresponding to the first area, and 1 is calculated from the value of the semaphore variable corresponding to the second area. The added value corresponds to the second area That is updated each as a semaphore variable, and characterized in that to remove a stored the processing completion information to the second region system.
[0105]
(Appendix 13) In
The system, wherein the first device is a channel adapter provided in a server machine, and the second device is a channel adapter provided in a network interface card.
[0106]
(Appendix 14) In
A system characterized in that both the first device and the second device are host channel adapters provided in a server machine.
[0107]
【The invention's effect】
As described above, according to the present invention, when processing requests are executed by interposing two types of queues as interfaces, the data related to the processing requests can be stored in the queues without overflowing each queue. Can be prevented from being stopped or delayed due to overflow. Further, the present invention only needs to be implemented in the processing request issuing side device, and if the issuing side device is a device capable of executing a program, it can be implemented by software.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating a configuration example of an information processing apparatus used in a first embodiment of the present invention.
FIG. 2 is a diagram illustrating an operation when a CPU accesses data stored in a peripheral device in the first embodiment of the present invention.
FIG. 3 is a diagram illustrating a data configuration example of work requests accumulated in a work queue.
FIG. 4 is a diagram illustrating a data configuration example of work completion accumulated in a completion queue.
FIG. 5 is a semaphore variable table stored in a memory.
FIG. 6 is a flowchart illustrating work request accumulation processing according to the first embodiment of the present invention.
FIG. 7 is a flowchart illustrating work completion collection processing according to the first embodiment of the present invention.
FIG. 8 is a flowchart illustrating work request accumulation processing in a modification of the first embodiment.
FIG. 9 is a flowchart illustrating work completion collection processing according to a modification of the first embodiment.
FIG. 10 is a diagram showing an operation when a CPU accesses data stored in a peripheral device in the second embodiment of the present invention.
FIG. 11 is a work queue to work request correspondence table stored in a memory.
FIG. 12 is a flowchart illustrating work request accumulation processing according to the second embodiment of the present invention.
FIG. 13 is a flowchart illustrating a work completion collection process according to the second embodiment of the present invention.
[Explanation of symbols]
1 Computer, 2 CPU, 3 System bus, 4 Memory controller, 5 Memory, 6 Host channel adapter, 7 Memory, 8 Coprocessor, 9 Infiniband switch, 10 Network interface card, 12 SCSI card, 14 Fiber channel card, 11, 13, 15 Target channel adapter, 24 work queues, 26 work requests, 28 completion queues, 30 work completions
Claims (6)
前記第一のプロセッサにより、
前記第二の領域に蓄積可能な情報数の最大数を、前記第一の領域に蓄積可能な情報数の最大数以上に設定し、前記第一の領域に対応するセマフォ変数の初期値を前記第一の領域に蓄積可能な情報数の最大数として設定する第1の工程と、
前記第1の工程の後に、前記第一の領域に対応するセマフォ変数が正の値かを判定し、正の値であれば、前記第一の領域に前記処理要求情報を追加し、前記第一の領域に対応するセマフォ変数の値から1を減算した値を前記第一の領域に対応するセマフォ変数として更新する第2の工程と、
さらに、前記第1の工程の後に、前記第二の領域に前記処理完了情報が蓄積されているか判定し、蓄積されていれば、前記第一の領域に対応するセマフォ変数に1を加算した値を前記第一の領域に対応するセマフォ変数として更新し、前記第二の領域から前記処理完了情報を1つ削除する第3の工程を行い、
前記第二のプロセッサにより、前記処理要求情報に従い実行される処理が完了したことを示す処理完了情報を前記第二の領域に蓄積する際に、前記処理完了情報と前記処理要求情報とを対応付けて前記第二の領域に蓄積する第4の工程を行うことを特徴とする情報蓄積制御方法。Process request information is accumulated in the first area by the first processor, and process completion information indicating that the process executed in accordance with the process requests accumulated in the first area is completed by the second processor. An information storage control method for storing in a second area,
By the first processor,
The maximum number of information that can be stored in the second area is set to be greater than or equal to the maximum number of information that can be stored in the first area, and the initial value of the semaphore variable corresponding to the first area is A first step of setting as a maximum number of information that can be stored in the first area ;
After the first step, it is determined whether the semaphore variable corresponding to the first region is a positive value. If the semaphore variable is a positive value, the processing request information is added to the first region, and the first step and as the second factory to update a value obtained by subtracting 1 from the value of the semaphore variable corresponding to an area as a semaphore variable corresponding to said first region,
Furthermore, after the first step, wherein the processing completion information is determined whether it is accumulated in the second region, if it is accumulated, by adding 1 to the semaphore variable corresponding to the first region updates the value as a semaphore variable corresponding to said first region, performs a third step to delete one said processing completion information from said second region,
The process completion information is associated with the process request information when the process completion information indicating that the process executed according to the process request information is completed by the second processor is stored in the second area. information storage control method and performing as a fourth factory you accumulated in the second region Te.
前記第一のプロセッサにより、
前記第二の領域に蓄積可能な情報数の最大数を、前記第一の領域に蓄積可能な情報数の最大数以上に設定し、前記第一の領域および前記第二の領域にそれぞれ対応するセマフォ変数の初期値を前記第一の領域および前記第二の領域にそれぞれ蓄積可能な情報数の最大数として設定するする第1の工程と、
前記第1の工程の後に、前記第一の領域に対応するセマフォ変数と前記第二の領域に対応するセマフォ変数が共に正の値かを判定し、共に正の値であれば、前記第一の領域に処理要求情報を追加し、かつ前記第一の領域に対応するセマフォ変数の値から1を減算した値を前記第一の領域に対応するセマフォ変数として、また前記第二の領域に対応するセマフォ変数の値から1を減算した値を前記第二の領域に対応するセマフォ変数としてそれぞれ更新する第2の工程と、
さらに、前記第1の工程の後に、前記第二の領域に前記処理完了情報が蓄積されているか判定し、蓄積されていれば、前記第一の領域に対応するセマフォ変数に1を加算した値を前記第一の領域に対応するセマフォ変数として、また前記第二の領域に対応するセマフォ変数の値から1を加算した値を前記第二の領域に対応するセマフォ変数としてそれぞれ更新し、前記第二の領域から前記処理完了情報を1つ削除する第3の工程を行い、
前記第二のプロセッサにより、前記処理要求情報に従い実行される処理が完了したことを示す処理完了情報を前記第二の領域に蓄積する際に、前記処理完了情報と前記処理要求情報とを対応付けて前記第二の領域に蓄積する第4の工程を行うことを特徴とする情報蓄積制御方法。Process request information is accumulated in the first area by the first processor, and process completion information indicating that the process executed in accordance with the process requests accumulated in the first area is completed by the second processor. An information storage control method for storing in a second area,
By the first processor,
The maximum number of information that can be stored in the second area is set to be equal to or greater than the maximum number of information that can be stored in the first area, and corresponds to the first area and the second area, respectively. A first step of setting an initial value of a semaphore variable as the maximum number of pieces of information that can be accumulated in the first area and the second area ,
After the first step, it is determined whether the semaphore variable corresponding to the first area and the semaphore variable corresponding to the second area are both positive values. The processing request information is added to the area, and the value obtained by subtracting 1 from the value of the semaphore variable corresponding to the first area is used as the semaphore variable corresponding to the first area, and also corresponds to the second area. and as the second factory to update each a value obtained by subtracting 1 from the value of the semaphore variable as a semaphore variable corresponding to the second region,
Furthermore, after the first step, wherein the processing completion information is determined whether it is accumulated in the second region, if it is accumulated, by adding 1 to the semaphore variable corresponding to the first region The value is updated as a semaphore variable corresponding to the first area, and a value obtained by adding 1 from the value of the semaphore variable corresponding to the second area is updated as a semaphore variable corresponding to the second area, and the process completion information from the second area subjected to the third step to delete one,
The process completion information is associated with the process request information when the process completion information indicating that the process executed according to the process request information is completed by the second processor is stored in the second area. information storage control method and performing as a fourth factory you accumulated in the second region Te.
前記第一のプロセッサにより、
前記第二の領域に蓄積可能な情報数の最大数を、前記第一の領域に蓄積可能な情報の最大数の総和以上に設定し、前記複数の第一の領域にそれぞれ対応するセマフォ変数の初期値を前記複数の第一の領域にそれぞれ蓄積可能な情報数の最大数として設定する第1の工程と、
前記第1の工程の後に、前記複数の第一の領域のうち1つを選択し、前記選択された第一の領域に対応するセマフォ変数が正の値かを判定し、正の値であれば、前記選択された第一の領域に処理要求情報を追加し、前記選択された第一の領域と前記処理要求情報を対応付けて対応表に蓄積し、前記選択された第一の領域に対応するセマフォ変数の値から1を減算した値を前記選択された第一の領域に対応するセマフォ変数として更新する第2の工程と、
さらに、前記第1の工程の後に、前記処理完了情報が蓄積されているか判定し、蓄積されていれば、前記処理完了情報を1つ読み出し、前記読み出された処理完了情報に対応する前記処理要求を特定し、前記対応表を参照して該特定された処理要求が蓄積された前記第一の領域を特定し、該特定された第一の領域に対応するセマフォ変数に1を加算した値を前記特定された第一の領域に対応するセマフォ変数として更新し、前記第二の領域から前記読み出された処理完了情報を削除する第3の工程を行い、
前記第二のプロセッサにより、前記処理要求情報に従い実行される処理が完了したことを示す処理完了情報を前記第二の領域に蓄積する際に、前記処理完了情報と前記処理要求情報とを対応付けて前記第二の領域に蓄積する第4の工程を行うことを特徴とする情報蓄積制御方法。The first processor accumulates the processing request information in any one of the plurality of first areas, and the processing completion information indicating that the processing executed in accordance with the processing requests stored in the first area is completed. An information accumulation control method for accumulating in a second area by two processors,
By the first processor,
The maximum number of information that can be stored in the second area is set to be equal to or greater than the sum of the maximum number of information that can be stored in the first area, and the semaphore variables respectively corresponding to the plurality of first areas A first step of setting an initial value as the maximum number of pieces of information that can be accumulated in each of the plurality of first regions ;
After the first step, select one of the plurality of first regions, determine whether the semaphore variable corresponding to the selected first region is a positive value, and if it is a positive value For example, processing request information is added to the selected first area, the selected first area and the processing request information are associated with each other and stored in a correspondence table, and the selected first area is stored in the selected first area. and as the second factory to update the obtained by subtracting 1 from the value of the corresponding semaphore variable value as a semaphore variable corresponding to the selected first region,
Furthermore, after the first step, the process completion information is determined whether the stored, if stored, reads one said processing completion information, corresponding to the read processing completion information the The processing request is specified, the first area in which the specified processing request is stored is specified with reference to the correspondence table, and 1 is added to the semaphore variable corresponding to the specified first area. updates the value as a semaphore variable corresponding to the first region the identified performs the third step to delete the read processing completion information from said second region,
The process completion information is associated with the process request information when the process completion information indicating that the process executed according to the process request information is completed by the second processor is stored in the second area. information storage control method and performing as a fourth factory you accumulated in the second region Te.
前記第一のプロセッサにより、
前記第二の領域に蓄積可能な情報数の最大数を、前記第一の領域に蓄積可能な情報の最大数の総和以上に設定し、複数の第一の領域の各第一の領域および第二の領域にそれぞれ対応するセマフォ変数の初期値を前記各第一の領域および前記第二の領域にそれぞれ蓄積可能な情報数の最大数として設定する第1の工程と、
前記第1の工程の後に、前記複数の第一の領域のうち1つを選択し、前記選択された第一の領域に対応するセマフォ変数と前記第二の領域に対応するセマフォ変数が共に正の値かを判定し、共に正の値であれば、前記選択された第一の領域に処理要求情報を追加し、前記選択された第一の領域と前記処理要求情報とを対応付けて対応表に蓄積し、前記選択された第一の領域に対応するセマフォ変数の値から1を減算した値を前記選択された第一の領域に対応するセマフォ変数として、また前記第二の領域に対応するセマフォ変数の値から1を減算した値を前記第二の領域に対応するセマフォ変数としてそれぞれ更新する第2の工程と、
さらに、前記第1の工程の後に、前記第二の領域に前記処理完了情報が蓄積されているか判定し、蓄積されていれば、前記処理完了情報を1つ読み出し、前記読み出された処理完了情報に対応する前記処理要求を特定し、前記対応表を参照して該特定された処理要求が蓄積された前記第一の領域を特定し、該特定された第一の領域に対応するセマフォ変数に1を加算した値を前記特定された第一の領域に対応するセマフォ変数として、また前記第二の領域に対応するセマフォ変数に1を加算した値を前記第二の領域に対応するセマフォ変数としてそれぞれ更新し、前記第二の領域から前記読み出された処理完了情報を削除する第3の工程を行い、
前記第二のプロセッサにより、前記処理要求情報に従い実行される処理が完了したことを示す処理完了情報を前記第二の領域に蓄積する際に、前記処理完了情報と前記処理要求情報とを対応付けて前記第二の領域に蓄積する第4の工程を行うことを特徴とする情報蓄積制御方法。The first processor accumulates the processing request information in any one of the plurality of first areas, and the processing completion information indicating that the processing executed in accordance with the processing requests stored in the first area is completed. An information accumulation control method for accumulating in a second area by two processors,
By the first processor,
The maximum number of information that can be stored in the second area is set to be equal to or greater than the sum of the maximum number of information that can be stored in the first area, and the first area and the first area of the plurality of first areas A first step of setting an initial value of a semaphore variable corresponding to each of the two regions as a maximum number of information that can be stored in each of the first region and the second region ;
After the first step, one of the plurality of first regions is selected, and a semaphore variable corresponding to the selected first region and a semaphore variable corresponding to the second region are both positive. If both are positive values, processing request information is added to the selected first area, and the selected first area is associated with the processing request information. A value obtained by subtracting 1 from the value of the semaphore variable corresponding to the selected first area as a semaphore variable corresponding to the selected first area and corresponding to the second area. and as the second factory to update each a value obtained by subtracting 1 from the value of the semaphore variable as a semaphore variable corresponding to the second region,
Furthermore, after the first step, wherein the processing completion information is determined whether it is accumulated in the second region, if stored, reads one said processing completion information was the read processing The processing request corresponding to the completion information is identified, the first area in which the identified processing request is stored is identified with reference to the correspondence table, and the semaphore corresponding to the identified first area is identified. A value obtained by adding 1 to a variable is used as a semaphore variable corresponding to the specified first area, and a value obtained by adding 1 to a semaphore variable corresponding to the second area is used as a semaphore corresponding to the second area. update each as a variable, performs the third step to delete the second the read processing completion information from the area of,
The process completion information is associated with the process request information when the process completion information indicating that the process executed according to the process request information is completed by the second processor is stored in the second area. information storage control method and performing as a fourth factory you accumulated in the second region Te.
前記蓄積部を制御する制御部とを有する装置において実行されるプログラムであって、
前記制御部に、前記第二の領域に蓄積可能な情報数の最大数を、前記第一の領域に蓄積可能な情報数の最大数以上に設定させ、前記第一の領域に対応するセマフォ変数の初期値を前記第一の領域に蓄積可能な情報数の最大数として設定させる第1の工程と、
前記第1の工程の後に、前記第一の領域に対応するセマフォ変数が正の値か判定させ、正の値であれば、前記第一の領域に対応するセマフォ変数の値から1を減算した値を前記第一の領域に対応するセマフォ変数として前記セマフォ変数表を更新させ、前記第一の領域へ前記処理要求情報を追加させる第2の工程と、
さらに、前記第1の工程の後に、前記第二の領域に前記処理完了情報が蓄積されているか判定させ、蓄積されていれば、前記第一の領域に対応するセマフォ変数に1を加算した値を前記第一の領域に対応するセマフォ変数として前記セマフォ変数表を更新させ、前記第二の領域から前記処理完了情報を1つ削除させる第3の工程とを実行させるためのプログラム。A first area in which processing request information is stored, a second area in which processing completion information indicating that processing executed in accordance with the processing request information is completed, and a semaphore corresponding to the first area An accumulator that stores variables;
A program to be executed in an apparatus having said storage unit controlling to that control section a,
Before SL control section, the second the maximum number of storable information area, is set to more than the maximum number of storable information number to the first region, corresponding to the first region A first step of setting an initial value of a semaphore variable as the maximum number of pieces of information that can be stored in the first area ;
After the first step, the semaphore variable corresponding to the first region is determined whether a positive value, if a positive value, obtained by subtracting 1 from the value of the semaphore variable corresponding to the first region wherein the value as a semaphore variable corresponding to said first region to update the semaphore variable table, as the second factory to the to the first region Ru is added to the processing request information,
Furthermore, after the first step, the second area is determined whether the process completion information is stored in, if it is accumulated, by adding 1 to the semaphore variable corresponding to the first region program for the value as a semaphore variable corresponding to said first region to update the semaphore variable table, to execute a third step of Ru is removed one the process completion information from said second region.
前記第一の装置に接続され、前記第一の領域に対応するセマフォ変数が格納される第二の蓄積部と、前記第二の蓄積部を制御し、前記処理要求情報を前記第一の装置へ送信する第二の制御部を有する第二の装置とを備え、
前記第二の装置における第二の制御部は、前記第二の領域に蓄積可能な情報数の最大数を、前記第一の領域に蓄積可能な情報数の最大数以上に設定する第1の工程と、
前記第1の工程の後に、前記第一の領域に対応するセマフォ変数の初期値を前記第一の領域に蓄積可能な情報数の最大数として設定し、特定のタイミングで前記第一の領域に対応するセマフォ変数が正の値か判定し、正の値であれば、前記第一の領域に対応するセマフォ変数から1を減算した値を前記第一の領域に対応するセマフォ変数として更新し、前記第一の装置に新たな処理要求情報を送信する第2の工程と、
さらに、前記第1の工程の後に、特定のタイミングで前記第二の領域に前記処理完了情報が蓄積されているか判定し、蓄積されていれば、前記第一の領域に対応するセマフォ変数に1を加算した値を前記第一の領域に対応するセマフォ変数として更新し、前記第二の領域から前記処理完了情報を1つ削除する第3の工程を行い、
前記第一の装置における第一の制御部は、前記新たな処理要求情報を受信して前記第一の領域に蓄積し、
前記処理要求情報に従い実行される処理が完了したことを示す処理完了情報を前記第二の領域に蓄積する際に、特定のタイミングで前記処理要求情報と前記処理完了情報を対応づけて前記第二の領域に蓄積する第4の工程を行うことを特徴とするシステム。A first storage unit that stores a first region in which processing request information is stored and a second region in which processing completion information indicating that processing executed in accordance with the processing request information has been completed is stored; A first device having a first control unit for controlling the first storage unit;
A second accumulator connected to the first device and storing a semaphore variable corresponding to the first area; and controlling the second accumulator and processing request information to the first device And a second device having a second control unit for transmitting to
The second control unit in the second unit, the first to the second maximum number of the number which can be stored information in the region, set to more than the maximum number of storable information number to the first region And the process of
After the first step, the initial value of the semaphore variable corresponding to the first area is set as the maximum number of information that can be stored in the first area, and the first area is set at a specific timing. It is determined whether the corresponding semaphore variable is a positive value, and if it is a positive value, a value obtained by subtracting 1 from the semaphore variable corresponding to the first area is updated as a semaphore variable corresponding to the first area, and as the second factory that sends a new processing request information to the first device,
Furthermore, after said first step, it is determined whether the processing completion information to the second region at a timing of specific are stored, if it is accumulated, the semaphore variable corresponding to said first region to a value obtained by adding 1 to update the semaphore variable corresponding to said first region, performs a third step to delete one said processing completion information from said second region,
First control portion before Symbol first device receives the new processing request information stored in said first region,
When the process completion information indicating that the process executed according to the process request information is completed is stored in the second area, the process request information and the process completion information are associated with each other at a specific timing. system characterized that you perform a fourth step of storing the region.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003043097A JP4484436B2 (en) | 2003-02-20 | 2003-02-20 | Information storage control method to storage device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003043097A JP4484436B2 (en) | 2003-02-20 | 2003-02-20 | Information storage control method to storage device |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010027577A Division JP5402698B2 (en) | 2010-02-10 | 2010-02-10 | Information storage control method to storage device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004252755A JP2004252755A (en) | 2004-09-09 |
JP4484436B2 true JP4484436B2 (en) | 2010-06-16 |
Family
ID=33026195
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003043097A Expired - Fee Related JP4484436B2 (en) | 2003-02-20 | 2003-02-20 | Information storage control method to storage device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4484436B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5101195B2 (en) * | 2007-07-09 | 2012-12-19 | 株式会社東芝 | Interface controller |
JP2022184255A (en) * | 2021-05-31 | 2022-12-13 | 広海 大谷 | BUSINESS PATENT ON INTERNET BUSINESS, PATENT AND IoT DEVICES ON SECURITY, AND BUSINESS APPLICATION PATENT OF ALGORITHM |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000099446A (en) * | 1998-09-21 | 2000-04-07 | Hitachi Ltd | Method and device for controlling command issueing |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2697744B2 (en) * | 1989-07-03 | 1998-01-14 | 富士通株式会社 | Channel device |
JPH052468A (en) * | 1991-02-13 | 1993-01-08 | Oki Electric Ind Co Ltd | Buffer memory management system |
JP3586522B2 (en) * | 1996-09-26 | 2004-11-10 | 日本電気株式会社 | Peripheral device controller |
-
2003
- 2003-02-20 JP JP2003043097A patent/JP4484436B2/en not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000099446A (en) * | 1998-09-21 | 2000-04-07 | Hitachi Ltd | Method and device for controlling command issueing |
Also Published As
Publication number | Publication date |
---|---|
JP2004252755A (en) | 2004-09-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100810015B1 (en) | System, management server, reception server, control method, control program, and recording medium | |
JP5364773B2 (en) | System and method for managing a connection between a client and a server | |
US7080219B2 (en) | Storage controlling device and control method for a storage controlling device | |
JP4943278B2 (en) | Virus scanning method and computer system using the method | |
JP5029513B2 (en) | Information processing apparatus, information processing apparatus control method, and program | |
JP2002222110A (en) | Storage system and virtual private volume controlling method | |
JP2002328813A (en) | Method for correcting program | |
JP6650483B2 (en) | Storage device, data management method, and data management program | |
CN105739930A (en) | Storage framework as well as initialization method, data storage method and data storage and management apparatus therefor | |
CN112346653A (en) | Drive box, storage system and data transfer method | |
JP4625675B2 (en) | Storage device resource allocation method and storage device | |
JP3748708B2 (en) | Client / server system, client computer, and recording medium | |
JP4484436B2 (en) | Information storage control method to storage device | |
JP5402698B2 (en) | Information storage control method to storage device | |
EP3293625B1 (en) | Method and device for accessing file, and storage system | |
US7240043B2 (en) | Method of controlling storage control apparatus, storage control apparatus, and computer readable program for controlling the same | |
JP4218034B2 (en) | Data communication system, data communication method, and data communication program | |
JP6836536B2 (en) | Storage system and IO processing control method | |
WO2013065151A1 (en) | Computer system, data transmission method, and data transmission program | |
JP4089506B2 (en) | File sharing system, server and program | |
JP7116318B2 (en) | Processing system, processing method, upper system, lower system, upper program and lower program | |
WO2001093032A1 (en) | Computer system, method of controlling computer, and medium storing control program | |
JP5287938B2 (en) | Device control system and program | |
JP3572650B2 (en) | Interrupt controller and control method thereof | |
JP6152050B2 (en) | Virtual machine management apparatus, server virtualization system, virtual machine management method and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060215 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20081226 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090120 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090323 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20091110 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100210 |
|
A911 | Transfer of reconsideration by examiner before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20100219 |
|
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: 20100316 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100323 |
|
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: 20130402 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140402 Year of fee payment: 4 |
|
LAPS | Cancellation because of no payment of annual fees |