JP2004054906A - Memory access method and computer system for executing the same - Google Patents
Memory access method and computer system for executing the same Download PDFInfo
- Publication number
- JP2004054906A JP2004054906A JP2003142836A JP2003142836A JP2004054906A JP 2004054906 A JP2004054906 A JP 2004054906A JP 2003142836 A JP2003142836 A JP 2003142836A JP 2003142836 A JP2003142836 A JP 2003142836A JP 2004054906 A JP2004054906 A JP 2004054906A
- Authority
- JP
- Japan
- Prior art keywords
- data
- identifier
- shared
- memory
- area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Multi Processors (AREA)
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、データ共用方式に係り、特に、複数のコンピュータシステム間で共通に使用するデータを共用装置において共用するデータ共用方式に関する。
【0002】
【従来の技術】
従来、複数のコンピュータシステム間でアドレス空間上のデータを共用する場合は、共用されている入出力装置を占有し、あらかじめ決められた位置に一旦データを書き込み後、占有状態を解除している。その後、他システムがそのデータを利用する際には、同様にして、この入出力装置を占有してから、決められた位置のデータを読み込み、アドレス空間上にあらかじめ確保した領域にデータを転送後、占有状態を解除するようにしている。即ち、個々のコンピュータシステムが、一旦、入出力装置を占有して、データの読み出しや書き込みを行い、その後、占有を解除している。ここで、複数システム間で共有する入出力装置としては、例えば、磁気ディスク装置,半導体ディスク装置や独立形拡張記憶装置などがある。
【0003】
なお、独立型拡張記憶装置による複数システム間でのデータ共用方法については、例えば、(株)日立製作所発行のマニュアル「プログラムプロダクトVOS3/FSセンタ運営−JSS3編−」、平成7年10月発行のp.110−117,「拡張記憶装置」の項に記載されている。
【0004】
【発明が解決しようとする課題】
しかしながら、従来のシステムにおいては、共用装置である入出力装置を占有するため、入出力装置の排他オーバヘッドが大きく、比較的小さいデータを頻繁にアクセスすると、排他オーバヘッドやアクセスオーバヘッドが無視できなくなるという問題があった。
本発明の目的は、各コンピュータシステム上で稼働するプログラムが共用装置の存在を意識せずに、自システム内の領域をアクセスするのと同様な手順により、容易にシステム間の共用データをアクセスできるデータ共用方式を提供することにある。
【0005】
【課題を解決するための手段】
上記目的を達成するために、本発明は、複数のコンピュータシステム間で共通に使用するデータを共用装置内の共用メモリにおいて共用するデータ共用方式において、上記共用メモリ内を一定の単位で分割し、上記複数のコンピュータシステム及び上記共用装置から見て一意の識別子でもって上記分割されたそれぞれの単位を管理し、上記コンピュータシステム内の任意のアドレス空間の領域を上記識別子でもって指定して排他確保する時には、上記共用メモリ内の対応する単位内のデータの更新の有無をチェックし、更新されている時には、上記共用メモリ内の対応する単位内のデータを上記アドレス空間に転送し、排他解除する時には、上記アドレス空間内のデータが更新されている時には、そのデータを上記共用メモリ内の対応する単位内に転送するようにしたものであり、かかる方式により、各コンピュータシステム上で稼働するプログラムは共用装置の存在を意識せずに、自システム内の領域をアクセスするのと同様な手順により、容易にシステム間の共用データをアクセスし得るものとなる。
上記データ共用方式において、好ましくは、上記コンピュータシステムは、複数の上記識別子をグループ化してアクセスするとともに、上記共用装置に対する排他確保を、グループ化された識別子の内の代表する識別子でもって行うようにしたものであり、かかる方式により、排他オーバヘッドを削減し得るものとなる。
上記データ共用方式において、好ましくは、上記コンピュータシステムが、上記コンピュータシステム上でデータを参照・更新するアクセス時期と、上記共用装置上のデータを上記コンピュータシステムに反映させるアクセス時期とを非同期とするようにしたものであり、かかる方式により、共用装置へのオーバヘッドを低減し得るものとなる。
【0006】
【発明の実施の形態】
以下、図1〜図3を用いて、本発明の一実施形態によるデータ共用方式について説明する。
図1は、本発明の一実施形態によるデータ共用方式を実現する複合コンピュータシステムの構成図である。
【0007】
処理装置100は、共用装置110上の識別子で管理されるグローバルメモリ212と1:1で対応する自システム内のローカルメモリ206のアドレス空間上のメモリ領域を管理するローカル領域割当て手段201を備えている。ローカル領域割当て手段201は、「識別子」,「物理メモリアドレス」及び「長さ」の各項目からなるテーブル形式で、メモリ領域を管理する。
【0008】
ローカル領域割当て手段201の中には、例えば、ローカルメモリ206のアドレス”10002000”Xからアドレス”10002FFF”Xまでの長さ”1000”Xの領域を「識別子」=”000001”で管理し、ローカルメモリ206のアドレス”0F001000”Xからアドレス”0F001FFF”Xまでの長さ”1000”Xの領域を「識別子」=”000002”で管理しているものとする。
「識別子」=”000001”,「識別子」=”000002”で管理されるメモリ領域は、ローカルメモリ206に図示した領域である。
【0009】
【0010】
さらに、処理装置100は、共有装置110へのデータ転送時に他システムと排他を確保・解放するためのシステム間排他手段202と、共有装置110上のデータが他システムによって更新されているかどうかチェックする更新状態確認手段203と、処理装置100上のローカルメモリ206から共用装置110上のグローバルメモリ212へ、または、共用装置110上のグローバルメモリ212から処理装置100上のローカルメモリ206へデータを転送するデータ転送手段204と、共用装置110上の他系の更新状態を記録する更新ベクトルの設定を行う更新ベクトル設定手段205と、自システム上のアドレス空間で参照できるローカルメモリ206とを備えている。
【0011】
処理装置120は、処理装置100と同様な構成となっており、ローカル領域割当て手段221と、システム間排他手段222と、更新状態確認手段223と、データ転送手段224と、更新ベクトル設定手段225と、ローカルメモリ226とを備えている。これらの各手段は、いずれも、処理装置100における対応する手段と同一の機能を有しており、その説明については、省略する。
なお、ローカル領域割当て手段221の中には、例えば、ローカルメモリ226のアドレス”0E001000”Xからアドレス”0E001FFF”Xまでの長さ”1000”Xの領域を「識別子」=”000001”で管理し、ローカルメモリ226のアドレス”28100000”Xからアドレス”281FFFFF”Xまでの長さ”FE000”Xの領域を「識別子」=”000003”で管理していることが記録されている。
「識別子」=”000001”,「識別子」=”000003”で管理されるメモリ領域は、ローカルメモリ226に図示した領域である。
共用装置110は、処理装置(SYS A)100及び処理装置(SYS B)120に接続されており、その内部にメモリを保持し、接続されている処理装置100,120からの指示に従い、メモリ上のデータを操作する機能を有していいる。共用装置110は、例えば、磁気ディスク装置,半導体ディスク装置や独立形拡張記憶装置などによって構成される。
【0012】
共用装置110は、共用装置内のメモリを分割して管理する手段として、それぞれの識別子がどのシステムに割り当てられているかの情報を記録する識別子割当て手段210と、グローバルメモリ212のアドレス空間上のメモリ領域を識別子で管理する共有メモリ管理手段211とを備え、さらに、実際のデータを配置する場所としてグローバルメモリ212を備えている。
識別子割当て手段210は、「識別子」,「割当てシステム名称」の各項目からなるテーブル形式で、識別子の割当を管理している。識別子割当て手段210の中には、例えば、「識別子」=”000001”は、処理装置100である”SYS A”,処理装置120である”SYS B”に割り当てられており、「識別子」=”000002”は、”SYS A”に割り当てられており、「識別子」=”000003”は、”SYS B”に割り当てられていることが記録されている。
また、共有メモリ管理手段211は、「識別子」,「物理メモリアドレス」,「更新ベクトル」の各項目からなるテーブル形式で、識別子に対するメモリの割当を管理している。共有メモリ管理手段211の中には、例えば、グローバルメモリ212のアドレス”00000000”Xからアドレス”00000FFF”Xまでのの領域を「識別子」=”000001”で管理し、「更新ベクトル」が”100”であることが記録されている。「更新ベクトル」の詳細については、後述するが、3ビット構成の「更新ベクトル」は、識別子割当手段210の「割当てシステム名称」の中の3つの欄に対応してフラグを立てるようにしている。即ち、「識別子」=”000001”に対する「更新ベクトル」=”100”の内、”1”が”SYS A”に対応し、”0”が”SYS B”に対応し、”0”が”−(割当システム無し)”に対応している。そして、”SYS A”に対してビットが立っている(”1”)ことから、「識別子」=”000001”で
管理されるメモリ領域のデータは、処理装置100(SYS A)によって更新されていることを表している。
同様にして、共有メモリ管理手段211の中には、グローバルメモリ212のアドレス”00001000”Xからアドレス”00001FFF”Xまでのの領域を「識別子」=”000002”で管理し、「更新ベクトル」が”000”であり、いずれの処理装置からも更新されておらず、グローバルメモリ212のアドレス”00002000”Xからアドレス”000FFFFF”Xまでのの領域を「識別子」=”000003”で管理し、「更新ベクトル」が”010”であり、処理装置120(SYS B)によって更新されており、グローバルメモリ212のアドレス”00100000”Xからアドレス”001FFFFF”Xまでのの領域を「識別子」=”000004”で管理し、「更新ベクトル」が”000”であり、いずれの処理装置からも更新されていないことが記録されている。
「識別子」=”000001”,…,「識別子」=”000004”で管理されるメモリ領域は、グローバルメモリ212に図示した領域である。
次に、図2を用いて、複数システム間で定義したシステム間の共通メモリ領域をロック要求時に参照するときの手順について説明する。
図2は、本発明の一実施形態によるデータ共用方式におけるロック要求処理の手順を示すフローチャートである。
【0013】
以下に、図2に示した各ステップに従って、図1を参照しながら、ロック要求処理について説明するが、ここで、図1における識別子割当て手段210の「割当てシステム」の欄にはまだ何も記録されておらず、また、共有メモリ管理手段211の「更新ベクトル」の欄はいずれも”000”となっているものとする。図2のステップ1において、処理装置100上のプログラムは、予め確保してあるアドレス空間上のローカルメモリ206の「アドレス」=”10002000”Xから「長さ」=”1000”X分の領域を、システム間の共通メモリとしてアクセスするために、処理装置120上のプログラムとあらかじめ決めておいた「識別子」=”000001”によりロック要求を発行する。
ステップ2において、処理装置100のシステム間排他手段202は、指定された識別子で排他確保をする。即ち、システム間排他手段202は、「識別子」=”000001”を排他状態にする。
次に、ステップ3において、処理装置100の更新状態確認手段203は、指定された識別子は他のシステム系で更新済みか否かを判断する。即ち、更新状態確認手段203は、この指定された識別子で対応付けられている共用装置110上のグローバルメモリ212が他システムからアクセスされているかどうかチェックする。更新済みである場合には、ステップ4に進み、更新済みでない場合には、ステップ13に進む。ステップ4,5については、後述する。
ここでは、処理装置100からの「識別子」=”000001”に対するアクセスが初めてのものであるとして、ステップ13に進む。
ステップ13において、共用装置110の識別子割当て手段210は、「識別子」=”000001”に対して、処理装置100(SYS A)から割当て要求がきたことを記録し、共有メモリ管理手段211は、「識別子」=”000001”に対応する共用装置110上のグローバルメモリ212を長さ=”1000”X分確保する。
次に、ステップ6において、処理装置100は、処理装置100上のロック要求処理では、初めてのアクセスであり、「更新ベクトル」上では他系による更新がない状況であるため、データを転送せず、ロック要求を完了する。
【0014】
以上のロック要求の処理により、処理装置100上のプログラムは、この識別子と対応付けられた領域のアクセスが可能となる。プログラムは、この領域を特別な命令を使用せずに、自システム内の領域をアクセスするのと同様な手順で容易に、参照・更新できる。
本実施形態によれば、特別な命令を使用せずに、自システム内の領域をアクセスするのと同様な手順で容易に、参照・更新できる。
次に、図3を用いて、複数システム間で定義したシステム間の共通メモリ領域をアンロック要求するときの手順について説明する。
図3は、本発明の一実施形態によるデータ共用方式におけるアンロック要求処理の手順を示すフローチャートである。
図3のステップ7において、処理装置100上のプログラムは、共通領域のアクセスを完了すると、「識別子」=”000001”を入力として、アンロック要求を発行する。
【0015】
ステップ8において、処理装置100は、更新指示があったか否かを判断する。更新指示があれば、ステップ9に進み、更新指示がなければ、ステップ11にジャンプする。処理装置100上のプログラムが、このメモリ領域を参照のみした場合には、更新指示はなされない。
ここで、処理装置100上のプログラムからの「識別子」=”000001”へのアクセスは初めてである場合には、グローバルメモリ212上にデータを作成していないため、処理装置100は、更新指示を行う。
次に、ステップ9において、識別子に対応するローカルメモリからグローバルメモリへデータを転送する。即ち、データ転送手段204は、識別子=”000001”に対応するローカルメモリ206の「アドレス」=”10002000”Xから「アドレス」=”10002FFF”Xの内容を、グローバルメモリ212上の「アドレス」=”00000000”Xから「アドレス」=”00001000”Xへ転送する。
【0016】
次に、ステップ10において、更新ベクトルをセットする。即ち、更新ベクトル設定手段205は、自系からの更新が完了したことを他系が認識できるように、共有メモリ管理手段211の管理する更新ベクトルのビットを”0”Bから”1”Bに設定する。ここで、共有メモリ管理手段211の「識別子」=”000001”に対応する「更新ベクトル」を”000”から”100”に設定する。処理装置100である「SYS A」は、識別子割当て手段210の「割当てシステム名称」の欄の記録からして一番最初に割り当てられているため、更新ベクトルの最上位ビットを”0”Bから”1”Bに設定する。
次に、ステップ11において、システム間開放手段202は、指定された識別子による排他解放を行う。即ち、「識別子」=”000001”は排他開放される。
ステップ12において、処理装置100上のプログラムは、アンロック要求を完了する。
なお、ステップ8において、更新指示がなかった場合には、ローカルメモリ206上のデータは、グローバルメモリ212上に転送されず、ステップ11において、システム間排他手段202は、指定された識別子によるシステム間の排他解放を実行し、ステップ12において、プログラムはアンロック要求処理を終了する。
次に、上述したようにして、処理装置100によって割り当てられた共用メモリを、他系,例えば、処理装置120が参照・更新する場合のロック要求処理について、同じく、図2を用いて説明する。
図2のステップ1において、処理装置120上のプログラムは、予め確保してあるアドレス空間上のローカルメモリ226の「アドレス」=”0E001000”Xから「長さ」=”1000”X分の領域を、システム間の共通メモリとしてアクセスするために、処理装置100上のプログラムとあらかじめ決めておいた「識別子」=”000001”によりロック要求を発行する。
ステップ2において、処理装置120のシステム間排他手段222は、指定された識別子で排他確保をする。即ち、システム間排他手段222は、「識別子」=”000001”を排他状態にする。
次に、ステップ3において、処理装置120の更新状態確認手段223は、指定された識別子は他のシステム系で更新済みか否かを判断する。ここでは、更新状態確認手段223が、共用メモリ管理手段211の管理する更新ベクトルの内容をチェックすることにより、「識別子」=”000001”は、既に、処理装置100からアクセスされているので、ステップ4に進む。
ステップ4において、データ転送手段224は、識別子に対応するグローバルメモリ212からローカルメモリ226へデータを転送する。即ち、データ転送手段224は、「識別子」=”000001”に対応するグローバルメモリ212の「アドレス」=”00000000”X〜”00000FFF”Xの内容を、処理装置120上のローカルメモリ226の「アドレス」=”0E001000”X〜”0E001FFF”Xに転送する。このデータ転送処理により、処理装置100上の「識別子」=”000001”と処理装置120上の「識別子」=”000001”上のデータが一致する。
【0017】
ステップ5において、処理装置120の更新ベクトル設定手段225は、更新ベクトルをリセットする。即ち、更新ベクトル設定手段225は、処理装置120上ではデータ転送後、このデータを再度読み込まないように、「更新ベクトル」を”1”Bから”0”Bへリセットする。その結果、「識別子」=”000001”に対する「更新ベクトル」は、”100”から”000”にリセットされる。
ステップ6において、ロック要求を完了し、要求プログラム元にリターンする。そして、ロック要求が完了した処理装置120上のプログラムは、「識別子」=”000001”と対応付けられたローカルメモリ226上のデータに対し、参照・更新を実行する。
次に、図3に示したアンロック要求処理を実行する。
【0018】
ステップ7において、アンロック要求を発行し、ステップ8において、更新指示があるか否かを判断する。参照・更新実行が、参照のみの場合は、更新指示を行わずに、ステップ11において、排他解放し、ステップ12において、アンロック処理を完了する。
【0019】
また、ステップ8において、更新指示があると判断された場合には、ステップ9において、ローカルメモリからグローバルメモリへデータを転送し、ステップ10において、更新ベクトルリセットした後、ステップ11において、排他解放し、ステップ12において、アンロック処理を完了する。
【0020】
以上説明したような処理手順により、ロック→参照・更新→アンロックを繰り返すことにより、システム間で共通な領域をアクセスすることができる。ロック→参照・更新→アンロックの手順は、複数の仮想アドレス空間を持つシステムにおいて、全空間から共通の領域を参照・更新する場合の手順と同じである。システム間の共通メモリも、従来の共通領域と同等の手軽さでアクセスすることができるようになる。
【0021】
以上説明したように、本実施形態によれば、プログラムは、特別な命令を使用せずに、自システム内の領域をアクセスするのと同様な手順で容易に、共通メモリの領域を参照・更新できるようになる。
次に、図4を用いて、排他の最小単位である識別子を複数まとめてグループ化してアクセスする方式について説明する。
図4は、本発明の他の実施形態によるデータ共用方式を実現する複合コンピュータシステムの構成図である。なお、図1と同一符号は、同一部分を表しており、その構成及び機能な同一であるため、詳細な説明は省略する。
なお、本実施形態では、「識別子」=”000001”,”000002”を一つのグループとしてまとめてアクセスし、「識別子」=”000003”,”000004”を一つのグループとしてまとめてアクセスするようにしている。処理装置100,120は、それぞれ、「識別子」=”000001”,”000002”は、一つのグループとしてまとめられているものとして認識しており、処理装置100,120上のプログラム間では、あらかじめ、「識別子」=”000001”,”000002”のグループをアクセスする場合は、代表の「識別子」として”000001”を用い、「識別子」=”000003”,”00004”のグループをアクセスする場合は、代表の「識別子」として”000003”を用いるようにしている。
【0022】
ここで、ローカル領域割当て手段201の中には、例えば、ローカルメモリ206のアドレス”10002000”Xからアドレス”10002FFF”Xまでの長さ”1000”Xの領域を「識別子」=”000001”で管理し、ローカルメモリ206のアドレス”10003000”Xからアドレス”10003FFF”Xまでの長さ”1000”Xの領域を「識別子」=”000002”で管理し、ローカルメモリ206のアドレス”10004000”Xからアドレス”10004FFF”Xまでの長さ”1000”Xの領域を「識別子」=”000003”で管理し、ローカルメモリ206のアドレス”10005000”Xからアドレス”10005FFF”Xまでの長さ”1000”Xの領域を「識別子」=”000004”で管理しているものとする。「識別子」=”000001”,…,”000004”で管理されるメモリ領域は、ローカルメモリ206に図示した領域である。
また、ローカル領域割当て手段221の中には、例えば、ローカルメモリ226のアドレス”0E003000”Xからアドレス”0E003FFF”Xまでの長さ”1000”Xの領域を「識別子」=”000001”で管理し、ローカルメモリ226のアドレス”0E004000”Xからアドレス”0E004FFF”Xまでの長さ”1000”Xの領域を「識別子」=”000002”で管理し、ローカルメモリ226のアドレス”0E001000”Xからアドレス”0E001FFF”Xまでの長さ”1000”Xの領域を「識別子」=”000003”で管理し、ローカルメモリ226のアドレス”0E002000”Xからアドレス”0E002FFF”Xまでの長さ”1000”Xの領域を「識別子」=”000004”で管理しているものとする。「識別子」=”000001”,…,”000004”で管理されるメモリ領域は、ローカルメモリ206に図示した領域である。
【0023】
さらに、識別子割当て手段210の中には、例えば、「識別子」=”000001”は、処理装置100である”SYS A”,処理装置120である”SYS B”に割り当てられており、「識別子」=”000002”は、”SYS A”及び”SYS B”に割り当てられており、「識別子」=”000003”は、”SYS B”及び”SYS A”に割り当てられており、「識別子」=”000004”は、”SYS B”及び”SYS A”に割り当てられていることが記録されている。
また、共有メモリ管理手段211の中には、例えば、グローバルメモリ212のアドレス”00000000”Xからアドレス”00000FFF”Xまでの領域を「識別子」=”000001”で管理し、「更新ベクトル」が”000”であることが記録され、グローバルメモリ212のアドレス”00006500”Xからアドレス”000074FF”Xまでのの領域を「識別子」=”000002”で管理し、「更新ベクトル」が”010”であることが記録され、グローバルメモリ212のアドレス”00004000”Xからアドレス”00004FFF”Xまでのの領域を「識別子」=”000003”で管理し、「更新ベクトル」が”000”であることが記録され、グローバルメモリ212のアドレス”00008000”Xからアドレス”00008FFF”Xまでのの領域を「識別子」=”000001”で管理し、「更新ベクトル」が”100”であることが記録されている。
複数の識別子をグループ化してロック要求する場合の処理について、再び、図2を用いて説明する。
図2のステップ1において、処理装置100上のプログラムは、予め確保してあるアドレス空間上のローカルメモリ206の「アドレス」=”10004000”Xから「長さ」=”1000”X分の領域及びローカルメモリ206の「アドレス」=”10005000”Xから「長さ」=”1000”X分の領域を、システム間の共通メモリとしてアクセスするために、処理装置120上のプログラムとあらかじめ決めておいた「識別子」=”000003”によりロック要求を発行する。ここで、「識別子」=”000003”及び「識別子」=”000004”で管理される領域をロックする訳であるが、ここでは、代表となる識別子でロック要求するようにしている。
ステップ2において、処理装置100のシステム間排他手段202は、指定された識別子で排他確保をする。即ち、システム間排他手段202は、「識別子」=”000003”を排他状態にする。その結果として、「識別子」=”000004”が排他状態とはなっていないことになるが、処理装置100,120のいづれもが、「識別子」=”000003”と「識別子」=”000004”をグループ化して扱うように取り決めてあるので、「識別子」=”000003”が排他状態にあるときには、「識別子」=”000004”に対して排他要求をすることはなく、「識別子」=”000004”については、実質的に排他が確保されている。
次に、ステップ3において、処理装置100の更新状態確認手段203は、指定された識別子は他のシステム系で更新済みか否かを判断する。即ち、更新状態確認手段203は、この指定された識別子で対応付けられている共用装置110上のグローバルメモリ212が他システムからアクセスされているかどうかチェックする。
ここで、処理装置100から、識別子=”000003”でロック要求がきた場合でも、更新状態確認手段203は、代表の識別子ではなく、「識別子」=”000003”,”000004”の両方に対してチェックを行い更新状態を確認する。図4に示す状態では、共有メモリ管理手段211の中の識別子=”000003”に対する更新ベクトルは、”000”であり、更新されていないが、識別子=”000004”に対する更新ベクトルは、”100”であり、処理装置120(SYS B)から更新されていることがわかるため、ステップ4に進む。
ステップ4において、データ転送手段204は、グローバルメモリ212からローカルメモリ206に対してデータを転送する。
次に、ステップ5において、更新ベクトル設定手段205は、共有メモリ管理手段211の中の識別子=”000004”に対する更新ベクトルをリセットする。
次に、ステップ6において、処理装置100は、ロック要求を完了し、読みだしたデータに対して、参照・更新を行う。
【0024】
以上のロック要求の処理により、処理装置100上のプログラムは、この識別子と対応付けられた複数の領域のアクセスが可能となる。参照・更新される単位(領域)を複数設けたとしても、排他オーバヘッドは一回で済むため、排他オーバヘッドを削減できる。
【0025】
プログラムは、この領域を特別な命令を使用せずに、自システム内の領域をアクセスするのと同様な手順で容易に、参照・更新できる。
アンロック要求に対する処理は、図3を用いて前述したとおりであり、排他確保されているのは、代表となる識別子についてであるので、ステップ11における排他開放も、排他確保された識別子についてのみ排他開放される。
本実施形態によれば、特別な命令を使用せずに、自システム内の領域をアクセスするのと同様な手順で容易に、参照・更新できる。
また、複数の領域に対して排他確保する際の排他オーバーヘッドを削減できる。
【0026】
次に、図5を用いて、処理装置上のプログラムがシステム間の共通メモリを参照・更新する場合に、共用装置へのアクセスと、ローカルメモリのアクセスを非同期にする方法について説明する。
図5は、本発明のその他の実施形態によるデータ共用方式を実現する複合コンピュータシステムの構成図である。なお、図1と同一符号は、同一部分を表しており、その構成及び機能な同一であるため、詳細な説明は省略する。
【0027】
処理装置100上では、プログラムA207は、システム間の共通メモリと対応付けられたローカルメモリ206を参照・更新しながら動作するプログラムとして稼働している。
ここで、処理装置100の中のローカル領域割当て手段が管理するローカルメモリ206の領域の割当ては、図4に示したものと同様とする。
【0028】
また、処理装置120上では、プログラムB227は、システム間の共通メモリと対応付けられたローカルメモリ226を参照・更新しながら動作するプログラムとして稼働している。
そして、処理装置120の中のローカル領域割当て手段が管理するローカルメモリ226の領域の割当ては、図4に示したものと同様とする。
【0029】
さらに、識別子割当て手段210における割当てシステムの名称は、図4に示したものと同様とする。
また、共有メモリ管理手段211における共有メモリであるグローバルメモリ212の管理状況も図4に示したものと同様とする。
【0030】
プログラムA207とプログラムB227が共有するデータは、ユーザデータのように全システム間で完全性が保証されていなければならないデータではなく、例えば、処理装置100,120上のCPUのビジー率や、共用資源の稼働情報など、多少の誤差が許容されるデータである。
【0031】
そのようなデータを共有する場合は、データのやりとりが定期的に発生するため、共用装置110へのアクセスオーバヘッドまたは排他オーバヘッドは極力減らすことが望ましい。そこで、共用装置110へのロック・アンロック要求は各プログラムの動作の延長で動作することなく、全く別のプログラムにより比較的オーバヘッドの少ない周期で定期的に共用装置110へのデータアクセスを行い、ローカルメモリ206,226上へデータを反映するようにしている。
【0032】
プログラムA207及びプログラムB227は、ローカルメモリ206,226上へのデータの反映契機とは別の契機で動作し、必要なときにローカルメモリ206,226だけ参照・更新する。
【0033】
このようにして、ローカルメモリへのアクセスと、グローバルメモリへのアクセス契機を分けることにより、共用装置へのオーバヘッドを減らすことが可能となる。
本実施形態によれば、特別な命令を使用せずに、自システム内の領域をアクセスするのと同様な手順で容易に、参照・更新できる。
また、各コンピュータシステム上でデータを参照・更新する契機と、共用装置上のデータをコンピュータシステムに反映する契機をわけることにより、共用装置へのオーバヘッドを低減できる。
【0034】
【発明の効果】
本発明によれば、複数のコンピュータシステム間でメモリを共有する場合、従来のシステム内の共通領域へのアクセスと同等の手順により、参照・更新が可能となる。
【図面の簡単な説明】
【図1】本発明の一実施形態によるデータ共用方式を実現する複合コンピュータシステムの構成図である。
【図2】本発明の一実施形態によるデータ共用方式におけるロック要求処理の手順を示すフローチャートである。
【図3】本発明の一実施形態によるデータ共用方式におけるアンロック要求処理の手順を示すフローチャートである。
【図4】本発明の他の実施形態によるデータ共用方式を実現する複合コンピュータシステムの構成図である。
【図5】本発明のその他の実施形態によるデータ共用方式を実現する複合コンピュータシステムの構成図である。
【符号の説明】
100,120…処理装置
110…共用装置
201,221…ローカル領域割当て手段
202,222…システム間排他手段
203,223…更新状態確認手段
204,224…データ転送手段
205,225…更新ベクトル設定手段
206,226…ローカルメモリ
207…プログラムA
227…プログラムB
210…識別子割当て手段
211…共用メモリ管理手段
212…グローバルメモリ[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a data sharing system, and more particularly to a data sharing system in which data shared by a plurality of computer systems is shared by a sharing device.
[0002]
[Prior art]
Conventionally, when sharing data in an address space among a plurality of computer systems, the shared input / output device is occupied, the data is written once at a predetermined position, and then the occupation state is released. After that, when another system uses the data, similarly occupy the I / O device, read the data at the determined position, and transfer the data to the area secured in advance in the address space. , The occupation state is released. That is, each computer system temporarily occupies the input / output device to read or write data, and then releases the occupation. Here, examples of the input / output device shared by a plurality of systems include a magnetic disk device, a semiconductor disk device, and an independent extended storage device.
[0003]
Regarding a method of sharing data between a plurality of systems using an independent extended storage device, see, for example, a manual “Program Product VOS3 / FS Center Operation-JSS3 Edition” issued by Hitachi, Ltd., published in October 1995. p. 110-117, "Extended storage device".
[0004]
[Problems to be solved by the invention]
However, in the conventional system, since the I / O device that is a shared device is occupied, the exclusive overhead of the I / O device is large, and if relatively small data is frequently accessed, the exclusive overhead and the access overhead cannot be ignored. was there.
An object of the present invention is to allow a program running on each computer system to easily access shared data between systems by the same procedure as accessing an area in the own system without being aware of the existence of a shared device. It is to provide a data sharing method.
[0005]
[Means for Solving the Problems]
In order to achieve the above object, the present invention provides a data sharing method in which data commonly used among a plurality of computer systems is shared in a shared memory in a shared device, wherein the shared memory is divided into fixed units, Each of the divided units is managed with a unique identifier when viewed from the plurality of computer systems and the shared device, and an area of an arbitrary address space in the computer system is designated by the identifier and exclusively secured. Sometimes, the presence or absence of update of the data in the corresponding unit in the shared memory is checked, and when the data is updated, the data in the corresponding unit in the shared memory is transferred to the address space, and when the exclusion is released. When data in the address space is updated, the data is stored in a corresponding unit in the shared memory. With this method, programs running on each computer system can easily perform the same procedure as accessing an area in their own system without being aware of the existence of shared devices. Can access shared data between systems.
In the data sharing method, preferably, the computer system accesses the plurality of identifiers in a group, and secures exclusion of the shared device by using a representative identifier among the grouped identifiers. With this method, exclusive overhead can be reduced.
In the data sharing method, preferably, the computer system makes an access time for referring to and updating data on the computer system and an access time for reflecting data on the shared device to the computer system asynchronous. With this method, the overhead to the shared device can be reduced.
[0006]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, a data sharing method according to an embodiment of the present invention will be described with reference to FIGS.
FIG. 1 is a configuration diagram of a compound computer system that realizes a data sharing method according to an embodiment of the present invention.
[0007]
The
[0008]
In the local area allocating means 201, for example, an area of a length "1000" X from the address "10002000" X to the address "10002FFF" X of the
The memory area managed by “identifier” = “000001” and “identifier” = “000002” is the area illustrated in the
[0009]
[0010]
Further, the
[0011]
The
In the local area allocating means 221, for example, an area having a length "1000" X from the address "0E001000" X to the address "0E001FFF" X of the
The memory area managed by “identifier” = “000001” and “identifier” = “000003” is the area illustrated in the
The shared
[0012]
The shared
The identifier assigning unit 210 manages the assignment of identifiers in a table format including items of “identifier” and “assigned system name”. In the identifier allocating means 210, for example, “identifier” = “000001” is allocated to “SYS A” which is the
Further, the shared
This indicates that the data in the managed memory area has been updated by the processing device 100 (SYS A).
Similarly, the shared
The memory area managed by “identifier” = “000001”,..., “Identifier” = “000004” is the area illustrated in the global memory 212.
Next, a procedure for referring to a common memory area between systems defined between a plurality of systems at the time of a lock request will be described with reference to FIG.
FIG. 2 is a flowchart showing a procedure of lock request processing in the data sharing method according to one embodiment of the present invention.
[0013]
Hereinafter, the lock request processing will be described with reference to FIG. 1 in accordance with each step shown in FIG. 2. Here, nothing is recorded in the column of “allocation system” of the identifier allocating means 210 in FIG. It is assumed that the “update vector” column of the shared
In
Next, in
Here, it is assumed that the access to “identifier” = “000001” from the
In step 13, the identifier allocating unit 210 of the shared
Next, in
[0014]
Through the processing of the lock request described above, the program on the
According to the present embodiment, it is possible to easily refer to and update the same procedure as accessing an area in the own system without using a special instruction.
Next, a procedure for making an unlock request for a common memory area between systems defined between a plurality of systems will be described with reference to FIG.
FIG. 3 is a flowchart showing a procedure of an unlock request process in the data sharing method according to one embodiment of the present invention.
In
[0015]
In
Here, if the access to “identifier” = “000001” from the program on the
Next, in step 9, data is transferred from the local memory corresponding to the identifier to the global memory. That is, the
[0016]
Next, in
Next, in
In step 12, the program on the
If there is no update instruction in
Next, the lock request processing when another system, for example, the
In
In
Next, in
In step 4, the
[0017]
In
In
Next, the unlock request process shown in FIG. 3 is executed.
[0018]
In
[0019]
If it is determined in
[0020]
By repeating the lock → reference / update → unlock according to the processing procedure described above, an area common to the systems can be accessed. The procedure of lock → reference / update → unlock is the same as the procedure for referring / updating a common area from all spaces in a system having a plurality of virtual address spaces. The common memory between the systems can be accessed with the same ease as the conventional common area.
[0021]
As described above, according to the present embodiment, the program can easily refer to and update the area of the common memory in the same procedure as accessing the area in the own system without using a special instruction. become able to.
Next, with reference to FIG. 4, a description will be given of a method in which a plurality of identifiers, which are the minimum units of exclusion, are grouped together for access.
FIG. 4 is a configuration diagram of a compound computer system that realizes a data sharing method according to another embodiment of the present invention. Note that the same reference numerals as those in FIG. 1 indicate the same parts, and have the same configuration and function, and thus detailed description will be omitted.
In the present embodiment, “identifiers” = “000001” and “000002” are collectively accessed as one group, and “identifiers” = “000003” and “000004” are accessed collectively as one group. ing. The
[0022]
Here, in the local area allocating means 201, for example, the area of the length "1000" X from the address "10002000" X to the address "10002FFF" X of the
In the local area allocating means 221, for example, an area having a length "1000" X from the address "0E003000" X to the address "0E003FFF" X of the
[0023]
Further, in the identifier allocating means 210, for example, “identifier” = “000001” is allocated to “SYS A” which is the
In the shared
The process in the case of requesting a lock by grouping a plurality of identifiers will be described again with reference to FIG.
In
In
Next, in
Here, even when a lock request is received from the
In step 4, the
Next, in
Next, in
[0024]
Through the processing of the lock request described above, the program on the
[0025]
The program can easily refer to and update this area in the same procedure as accessing the area in its own system without using special instructions.
The process for the unlock request is as described above with reference to FIG. 3. Since the exclusive exclusion is performed for the representative identifier, the exclusion release in
According to the present embodiment, it is possible to easily refer to and update the same procedure as accessing an area in the own system without using a special instruction.
In addition, it is possible to reduce exclusion overhead when exclusion is secured for a plurality of areas.
[0026]
Next, a method for making access to the shared device and access to the local memory asynchronous when a program on the processing device references / updates a common memory between systems will be described with reference to FIG.
FIG. 5 is a configuration diagram of a compound computer system that realizes a data sharing method according to another embodiment of the present invention. Note that the same reference numerals as those in FIG. 1 indicate the same parts, and have the same configuration and function, and thus detailed description will be omitted.
[0027]
On the
Here, the area allocation of the
[0028]
Also, on the
The allocation of the area in the
[0029]
Further, the name of the assignment system in the identifier assignment means 210 is the same as that shown in FIG.
The management status of the global memory 212 as the shared memory in the shared
[0030]
The data shared by the
[0031]
When such data is shared, since data exchange occurs periodically, it is desirable to reduce the access overhead or exclusive overhead to the shared
[0032]
The
[0033]
By separating the access to the local memory and the access to the global memory in this manner, it is possible to reduce the overhead to the shared device.
According to the present embodiment, it is possible to easily refer to and update the same procedure as accessing an area in the own system without using a special instruction.
In addition, by dividing the opportunity for referring to and updating data on each computer system and the opportunity for reflecting data on the shared device to the computer system, overhead to the shared device can be reduced.
[0034]
【The invention's effect】
According to the present invention, when a memory is shared between a plurality of computer systems, reference and update can be performed by the same procedure as that for accessing a common area in a conventional system.
[Brief description of the drawings]
FIG. 1 is a configuration diagram of a compound computer system that realizes a data sharing method according to an embodiment of the present invention.
FIG. 2 is a flowchart showing a procedure of a lock request process in the data sharing method according to one embodiment of the present invention.
FIG. 3 is a flowchart showing a procedure of an unlock request process in the data sharing system according to one embodiment of the present invention.
FIG. 4 is a configuration diagram of a compound computer system that realizes a data sharing method according to another embodiment of the present invention.
FIG. 5 is a configuration diagram of a compound computer system that realizes a data sharing method according to another embodiment of the present invention.
[Explanation of symbols]
100, 120 ... processing unit
110 ... shared device
201, 221... Local area allocating means
202, 222 ... inter-system exclusion means
203, 223... Update status confirmation means
204, 224: Data transfer means
205, 225... Update vector setting means
206, 226: Local memory
207 ... Program A
227: Program B
210: identifier assigning means
211: Shared memory management means
212: Global memory
Claims (3)
上記共用メモリ内を一定の単位で分割し、上記複数のコンピュータシステム及び上記共用装置から見て一意の識別子でもって上記分割されたそれぞれの単位を管理し、
上記コンピュータシステム内の任意のアドレス空間の領域を上記識別子でもって指定して排他確保する時には、上記共用メモリ内の対応する単位内のデータの更新の有無をチェックし、更新されている時には、上記共用メモリ内の対応する単位内のデータを上記アドレス空間に転送し、
排他解除する時には、上記アドレス空間内のデータが更新されている時には、そのデータを上記共用メモリ内の対応する単位内に転送することを特徴とするデータ共用方式。In a data sharing method in which data commonly used among a plurality of computer systems is shared in a shared memory in a shared device,
Dividing the shared memory into fixed units, managing each of the divided units with a unique identifier as viewed from the plurality of computer systems and the shared device,
When an area in an arbitrary address space in the computer system is designated by the identifier and exclusively secured, the presence or absence of update of data in a corresponding unit in the shared memory is checked. Transferring the data in the corresponding unit in the shared memory to the address space,
A data sharing method wherein, when exclusion is released, when data in the address space is updated, the data is transferred to a corresponding unit in the shared memory.
上記コンピュータシステムは、複数の上記識別子をグループ化してアクセスするとともに、上記共用装置に対する排他確保を、グループ化された識別子の内の代表する識別子でもって行うことを特徴とするデータ共用方式。The data sharing method according to claim 1,
The data sharing method, wherein the computer system accesses the plurality of identifiers in a group, and secures exclusion of the shared device by using a representative identifier among the grouped identifiers.
上記コンピュータシステムが、上記コンピュータシステム上でデータを参照・更新するアクセス時期と、上記共用装置上のデータを上記コンピュータシステムに反映させるアクセス時期とを非同期とすることを特徴とするデータ共用方式。The data sharing method according to claim 1,
A data sharing method, wherein the computer system makes an access time for referring to and updating data on the computer system and an access time for reflecting data on the shared device to the computer system asynchronous with each other.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003142836A JP2004054906A (en) | 2003-05-21 | 2003-05-21 | Memory access method and computer system for executing the same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003142836A JP2004054906A (en) | 2003-05-21 | 2003-05-21 | Memory access method and computer system for executing the same |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP8126083A Division JPH09311839A (en) | 1996-05-21 | 1996-05-21 | Data sharing system |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2004054906A true JP2004054906A (en) | 2004-02-19 |
Family
ID=31944659
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003142836A Pending JP2004054906A (en) | 2003-05-21 | 2003-05-21 | Memory access method and computer system for executing the same |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2004054906A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008293368A (en) * | 2007-05-25 | 2008-12-04 | Toyota Motor Corp | Multiprocessor system, exclusive control method, electronic control unit for vehicle |
JP2017510925A (en) * | 2014-03-28 | 2017-04-13 | オラクル・インターナショナル・コーポレイション | Support for detecting memory corruption in distributed shared memory applications |
-
2003
- 2003-05-21 JP JP2003142836A patent/JP2004054906A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008293368A (en) * | 2007-05-25 | 2008-12-04 | Toyota Motor Corp | Multiprocessor system, exclusive control method, electronic control unit for vehicle |
JP2017510925A (en) * | 2014-03-28 | 2017-04-13 | オラクル・インターナショナル・コーポレイション | Support for detecting memory corruption in distributed shared memory applications |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH09311839A (en) | Data sharing system | |
JP4290730B2 (en) | Tree-based memory structure | |
JP3704573B2 (en) | Cluster system | |
KR19980063551A (en) | Signal Processing Units and Software | |
JPH05210637A (en) | Method of simultaneously controlling access | |
JP2006196011A (en) | Segmentation of cache for offering varying service level | |
JP2007026094A (en) | Execution device and application program | |
CN110069346B (en) | Method and device for sharing resources among multiple processes and electronic equipment | |
JP4144609B2 (en) | Information processing apparatus, memory area management method, and computer program | |
US10929293B2 (en) | Atomic operations for fabric shared memories | |
JP2008065445A (en) | Computer system for saving storage area by integrating same data, storage systems and those control method | |
US5682507A (en) | Plurality of servers having identical customer information control procedure functions using temporary storage file of a predetermined server for centrally storing temporary data records | |
US20120066191A1 (en) | Optimized concurrent file input/output in a clustered file system | |
CN115576716A (en) | Memory management method based on multiple processes | |
JPH0962635A (en) | Customer information control system and method having transaction-serialization control function in loosely-coupled parallel processing environment | |
US20120185672A1 (en) | Local-only synchronizing operations | |
AU2011229395B2 (en) | Dual mode reader writer lock | |
JP2004054906A (en) | Memory access method and computer system for executing the same | |
JP4734348B2 (en) | Asynchronous remote procedure call method, asynchronous remote procedure call program and recording medium in shared memory multiprocessor | |
JPH04155465A (en) | Method for using file in common | |
US8689230B2 (en) | Determination of running status of logical processor | |
US20100250507A1 (en) | Enumeration of a concurrent data structure | |
US11656796B2 (en) | Adaptive memory consistency in disaggregated datacenters | |
JPS5947341B2 (en) | Dynamic exclusive control method for index sequential files | |
JP2003248620A (en) | Dynamic memory managing method and dynamic memory management information processing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20060420 |
|
A131 | Notification of reasons for refusal |
Effective date: 20070109 Free format text: JAPANESE INTERMEDIATE CODE: A131 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20070515 |