JP2004265062A - Information processing method and device - Google Patents
Information processing method and device Download PDFInfo
- Publication number
- JP2004265062A JP2004265062A JP2003053900A JP2003053900A JP2004265062A JP 2004265062 A JP2004265062 A JP 2004265062A JP 2003053900 A JP2003053900 A JP 2003053900A JP 2003053900 A JP2003053900 A JP 2003053900A JP 2004265062 A JP2004265062 A JP 2004265062A
- Authority
- JP
- Japan
- Prior art keywords
- event
- processes
- transmission
- notification
- stop
- 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.)
- Withdrawn
Links
- 230000010365 information processing Effects 0.000 title claims description 25
- 238000003672 processing method Methods 0.000 title claims description 13
- 238000000034 method Methods 0.000 claims abstract description 233
- 230000005540 biological transmission Effects 0.000 claims abstract description 38
- 239000000872 buffer Substances 0.000 claims abstract description 38
- 238000012545 processing Methods 0.000 claims description 73
- 238000004891 communication Methods 0.000 claims description 24
- 238000004590 computer program Methods 0.000 claims description 6
- 230000004044 response Effects 0.000 claims description 4
- 230000006870 function Effects 0.000 description 14
- 238000010586 diagram Methods 0.000 description 5
- 230000015654 memory Effects 0.000 description 5
- 239000000725 suspension Substances 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 229920006395 saturated elastomer Polymers 0.000 description 2
- 238000007619 statistical method Methods 0.000 description 2
- 230000001629 suppression Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002265 prevention Effects 0.000 description 1
- 238000011112 process operation Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Landscapes
- Multi Processors (AREA)
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、複数のプロセスがプロセス間で通信することで協調的動作を行う技術に関し、特に共有データを各プロセスが保有する場合に確実な協調的動作を実現させる技術に関する。
【0002】
【従来の技術】
複数のプロセス、例えば異なる装置内に分散する複数のプロセスが相互にデータを交換することによって協調的動作を行う技術の一例として、本出願人は先にデータベースの共有方法に関する「情報処理方法及び装置」(特願2002−348726)を出願した。この発明では、各プロセスが共有するデータ(共有データ)のコピーを各プロセスが保持する。
【0003】
そして、あるプロセスにおいて共有データに対する操作要求が発生した場合には、その操作要求を表す要求情報をネットワークを介してプロセス間で交換し、受信した操作要求に基づいて各プロセスが自らの有する共有データを更新する。この処理において、すべてのプロセスに含まれる、操作要求を発行する処理、および操作要求を共有データに反映する処理は並列に動作する。
【0004】
【発明が解決しようとする課題】
この先願発明においては、受信した操作要求を一時的に蓄積するバッファを用い、操作要求の処理速度よりも短い間隔で操作要求が発生した場合に対処しているが、バッファに操作要求が入り切らなくなること(バッファのあふれ)を防ぐためには、十分な大きさのバッファが必要であった。
【0005】
このように、複数のプロセスが相互にデータ交換することにより協調的動作を行う装置においては、各プロセスが用いる受信バッファがあふれないように留意して設計しなければならなかった。しかし、最適な受信バッファの容量を定めるのは困難であり、改善の余地があった。
【0006】
本発明はこのような課題に鑑みてなされたものであり、その目的は、複数のプロセスがプロセス間通信を用いて協調的動作を行うシステムにおいて、簡便な方法で信頼性の高い処理を実現するための情報処理方法及び装置を提供することにある。
【0007】
【課題を解決するための手段】
本発明によれば、上述の目的は、複数のプロセスの各々が、当複数のプロセスで共有する共有データを保有し、情報伝達媒体を介した通信を用いて、共有データに対する処理を行うシステムにおける情報処理方法であって、共有データに対する操作が発生した場合に、当操作の内容を表す操作イベントを情報伝達媒体上に発信する発行工程と、操作イベントを受信すると、当操作イベントに対応する処理を自らが保有する共有データに対して実行する操作実行工程と、操作イベントの受信に応じて、システム内の全プロセスに対し、新たな操作イベントの発信を停止するように通知する発信停止通知を発信する停止通知発信工程と、システム内の全プロセスに対し、新たな操作イベントの発信停止を解除する停止解除通知を発信する解除通知発信工程とを有することを特徴とする情報処理方法によって達成される。
【0008】
また、上述の目的は、複数のプロセスの各々が、当複数のプロセスで共有する共有データを保有し、情報伝達媒体を介した通信を用いて、共有データに対する処理を行うシステムにおいて、複数のプロセスの少なくとも1つを実行可能な情報処理装置であって、共有データに対する操作が発生した場合に、当操作の内容を表す操作イベントを情報伝達媒体上に発信する発行手段と、操作イベントを受信すると、当操作イベントに対応する処理を自らが保有する共有データに対して実行する操作実行手段と、操作イベントの受信に応じて、システム内の全プロセスに対し、新たな操作イベントの発信を停止するように通知する発信停止通知を発信する停止通知発信手段と、システム内の全プロセスに対し、新たな操作イベントの発信停止を解除する停止解除通知を発信する解除通知発信手段とを有することを特徴とする情報処理装置によっても達成される。
【0009】
さらに、上述の目的は、コンピュータ装置を本発明の情報処理装置として動作させるためのコンピュータプログラム又はこのコンピュータプログラムを格納したコンピュータ装置読み取り可能な記憶媒体によっても達成される。
【0010】
【発明の実施の形態】
以下、添付の図面を参照して、本発明をその好適な実施形態に基づいて詳細に説明する。
■(第1の実施形態)
以下の実施形態では、コンピュータグラフィクスで仮想空間を表す際の、仮想空間の構造と属性を記述するシーンデータベースを複数の端末で共有する仮想空間共有システムに対して、本願発明による情報処理方法を応用した実施形態について説明する。シーンデータベースに含まれる、共有データとしてのシーンデータは例えばシーングラフによって表現される。
【0011】
図1に、本実施形態の仮想空間共有システムの全体構成をプロセス間の通信という観点から模式的に示す。システムには複数のプロセス102および103があり、通信路101を介して互いに接続され、データを交換することができる。本実施形態においては、複数のプロセス102及び103から構成されるプロセス群のうち、1つのプロセス(例えば102)はシステムに含まれるプロセス群に関する情報を管理するサーバプロセスとして機能する。以下、プロセス102をサーバプロセス102、他のプロセス103をクライアントプロセス103とも呼ぶ。
【0012】
なお、通信路101は図1のようにすべてのプロセスに共通であってもよいし、いくつかのプロセス間で専用の通信路が複数存在してもよい。
なお、図1に構成を実現するハードウェア構成としては、例えば通信路101としてLANや公衆電話網、インターネットを用い、相互に通信可能に接続された複数の端末を例示することができる。
【0013】
この場合、各端末ではプロセス群を構成するプロセス102、103の1つあるいは複数が動作可能であり、プロセスの総数と端末の総数は一致していなくても良い。また、通信路101は各端末内のプロセス間で通信可能であれば上述した以外の任意の通信媒体を用いることが可能である。
【0014】
ここで、以下の説明で用いる用語を定義する。システム内の各プロセスは、共有データを変更あるいは参照する何らかの「操作」を行う。本実施形態では、シーンデータベースに記述された仮想空間の構造あるいは属性を変更あるいは参照することが「操作」に相当する。操作の内容は、通信路101を介して他のプロセスに伝達され、各プロセスで操作の内容に応じた処理が行われる。また、操作を起動することを「操作を指令する」、操作内容を表すデータを「操作イベント」あるいは単に「イベント」、操作内容に応じて処理を行うことを「操作の実行」と表現することにする。
【0015】
各プロセスは、受信した操作イベントを保持するバッファ「受信イベントバッファ」を持つが、そのバッファに蓄積可能なイベントの数は有限である。ある一定時間内に数多くのイベントが到着して、受信イベントバッファがあふれることを防止するため、本実施形態において、操作を実行するプロセスは、操作の実行中、すべてのプロセスがイベントを発信することを抑制する。
【0016】
以下では、イベント発信を抑制することを「サスペンドを設定する」あるいは「サスペンドする」と表現する。また、イベント発信の抑制を解除することを「サスペンドを解除する」と表現する。サスペンドの設定・解除もイベントを用いて指示される。そこで、サスペンドを設定・解除するためのイベントを他の種類のイベントから区別する場合には、それぞれ「サスペンド設定イベント」「サスペンド解除イベント」と呼ぶことにする。
【0017】
次に図2を用いて、本システムにおいてプロセス102、103が動作可能な情報処理装置(端末)の構成を説明する。図2において、201は端末全体の動作を制御するCPU、202はCPUの動作に用いるプログラムやデータを格納するメモリ、203は端末を構成する各部間のデータ転送を司るバス、204はバス203と各種装置とのインタフェース、205は通信路101と接続するための通信部、206はCPUに読み込むプログラムやデータを格納するHDD等の外部記憶装置、207および208は端末のユーザが端末に対して各種指示を与えるための入力装置としてのキーボードおよびマウス、209はプロセスの動作結果等を表示するための表示部、210は端末と他の外部機器との入出力を行うための外部インタフェース(IF)部である。
【0018】
各プロセスは、自プロセスが行う操作を司る操作処理と、自プロセスまたは他のプロセスから伝達された操作イベントを処理する受信イベント処理の2つの処理から構成される。図3は、あるプロセス(図3の「被操作プロセス」)が操作イベントを受信してからの処理手順を模式的に示したものである。
【0019】
まず、受信イベント処理において、手順T301で操作イベントを受信する。次に、受信した操作イベントの処理中にプロセスがイベントを発信することを抑制するため、手順T302でサスペンド設定イベントをすべてのプロセスに対して発信する。
【0020】
その後、手順T301で受信した操作イベントに応じた操作を実行し(手順T303)、操作実行が終了すると、プロセスに対して設定したイベント発信の抑制を解除するため、サスペンド解除イベントをすべてのプロセスに対して発信する(手順T304)。
【0021】
ここで、手順T303で実行される処理では、外部記憶装置206から、操作対象となる共有データ(データベース中のシーンデータ)のデータファイルを読み込むことが必要となる。シーンデータは仮想空間を記述するデータであるため、容量が大きくなる可能性がある。つまり、手順T303においてデータの読み込み及び操作に必要な時間が長くなる可能性があり、結果として受信イベントバッファがあふれる可能性が高い。そこで、本実施形態では、シーンデータベースのファイルを読み込むことが必要となる操作イベントを受信した際に、サスペンドを設定するようにすることによりバッファがあふれことを防止している。
【0022】
一方、本システムにおける被操作プロセス以外の全プロセスにおける受信イベント処理では、手順T305でサスペンド設定イベントを受信し、サスペンドを設定する(手順T306)。そして、手順T304で発信されたサスペンド解除イベントを受信する(手順T307)と、サスペンドを解除する(手順T308)。したがって、手順T306終了時から手順T308の終了時まで、イベントの発信は不可能になる。その結果、例えば手順T309に示した時刻に操作処理から操作イベントの発信を試みた場合には、サスペンド中のため発信されず、実際にイベントが発信されるのは手順T308でサスペンドが解除された後の手順T310に示す時刻になる。
【0023】
プロセス全体の処理の流れを図4に示す。プロセスが起動されると、ステップS401にて操作の対象となるデータを記録したファイルを外部記憶装置(図2の206)あるいは外部IF部(図2の210)を介して外部機器より読み込むなど、プロセスの動作に必要な一連の初期化を行う。次に、他のプロセスとのネットワーク接続を確立する(ステップS402)。
【0024】
このとき、サーバプロセス102は、接続を確立したクライアントプロセス103に対して当該プロセスをシステム内で一意に識別するためのプロセスIDを割り当てるとともに、システム内の全プロセスに対し、新たに接続したプロセスのプロセスIDを通知する。各プロセスは、通知されたプロセスIDに関連づけて、「サスペンド中フラグ」と呼ぶフラグデータを新たに作成し、OFFに設定する。サスペンド中フラグは、システム内に存在するプロセスごとに用意され、対応するプロセスがサスペンドを設定している状態か否かを表すものである。
【0025】
なお、本実施形態において、任意の2つのプロセス間でのデータ交換は、TCP/IP(Transmission Control Protocol/Internet Protocol)を用いた1対1のソケット通信にて行う。したがって、プロセスの総数がNであるとすると、各プロセスは少なくともN−1本のソケット通信路を持つことになる。ただし、通信路の構成はこれに限ったものではなく、任意の2つのプロセス間で論理的にデータの交換ができれば、構成は問わない。例えば、サーバプロセス102以外のクライアントプロセス103がサーバプロセス102との通信路を確立し、クライアントプロセス103間の通信は必ずサーバプロセス102を介するように構成することも可能である。
【0026】
続いて、ステップS403で、このプロセス内で操作処理及び受信イベント処理を並列して行うためにプロセスを分岐し、操作指令を処理するための操作処理スレッド(ステップS404)および受信イベントを処理するための受信イベント処理スレッド(ステップS406)を起動する。なお、操作処理および受信イベント処理スレッドについては、後で詳しく説明する。操作処理および受信イベント処理スレッドはそれぞれステップS405およびステップS407で終了指示があったかどうか判定され、終了指示がなければステップS404およびステップS406に戻って操作指令および受信イベントを繰り返し処理する。一方、終了指示があればステップS408で2つのスレッドを統合し、プロセス間のネットワーク接続を切断(ステップS409)した上で、すべての処理を終了する。
【0027】
ここで、図4の操作処理スレッドで行われるステップS404の操作処理について、図5のフローチャートを参照して詳しく説明する。
初めに、ステップS501にて操作指令の内容を入力する。次に、ステップS501で入力した操作指令に対応する操作イベントを生成する(ステップS502)。ステップS503ではサスペンド中フラグを参照し、いずれかのプロセスによってイベントの発信を抑制されているか否か判定する。ここでイベント発信が抑制されていればステップS503に戻り、抑制されていなければステップS504に進み、ステップS502で生成した操作イベントを、自プロセスを含む全てのプロセスに向けて発信し、操作処理を終了する。
【0028】
続いて、図4の受信イベント処理スレッドで行われるステップS406の受信イベント処理について、図6のフローチャートを参照して詳しく説明する。
受信イベントは、不図示のイベント通信部が受信し、例えばメモリ202等の記憶装置の領域として予め設定された受信イベントバッファに入力される。ステップS601では、受信イベントバッファを検索する。続くステップS602で、受信イベントバッファに受信イベントが入力されているか否かを判定し、受信イベントがあればステップS603に進む。一方、受信イベントが存在しないと判定されれば、処理を終了する。
【0029】
ステップS603では、サスペンド設定イベントを、全てのプロセスに対して発信する。なお、サスペンド設定イベントには、それを発信するプロセスのIDが含まれている。続いて、受信イベントバッファに蓄積されている受信イベントのうち、先頭のイベントで指示された操作内容を解析した上で実行する(ステップS604)。特に実行するイベントがサスペンド設定イベントである場合は、当該イベントに含まれるプロセスIDに対応するサスペンド中フラグをONに設定する。逆に、実行するイベントがサスペンド解除イベントである場合は、当該イベントに含まれるプロセスIDに対応するサスペンド中フラグをOFFに設定する。イベントの実行後は、ステップS605でサスペンドの解除を指示するイベントを、全てのプロセスに対して送信し、処理を終了する。
【0030】
上記に説明した処理を行うことにより、システム内で動作するプロセスのいずれかが操作を実行している間、全てのプロセスがイベントを発信しないように設定することができる。その結果、操作実行中に多量のイベントが到着することにより受信イベントバッファがあふれ、操作が確実に実行されなくなる危険性を大幅に軽減することができる。
【0031】
■(第2の実施形態)
第1の実施形態では、共有データに対する操作を実行する際、必ずサスペンドを設定している。仮想空間を表すシーンデータのように、操作対象となる共有データの容量が大きくなる可能性が高い場合、簡便な処理で顕著なバッファあふれ防止効果が得られるが、サスペンド設定中は全プロセスが影響を受けるため、サスペンド設定自体の回数を減らすことができればさらに好ましい。そのため、本実施形態では、ある判定基準に基づいて、サスペンドするか否か決定することを特徴とする。
【0032】
ここで、本実施形態におけるサスペンド設定・非設定の判定基準について説明する。この判定基準は、受信イベントバッファが飽和するまでの時間的余裕が、ある一定値未満である場合で、かつ所定の種類のイベントを実行する際にサスペンドするようにするものである。
【0033】
この判定基準を示す式は、
S=f×Th(R(t)、B) (式1)
と表すことができる。この式の値Sが1である場合はサスペンドを設定し、0である場合はサスペンドしない。
【0034】
ここで、”f”はイベントの種類ごとに決まるフラグ(以下「サスペンド対象フラグ」と呼ぶ)で、予め、イベントの種類毎にサスペンドする場合はf=1、サスペンドしない場合はf=0と設定されている。”Th(a,b)”は2値化処理を行う関数であり、第1引数aが第2引数b未満である場合に1、そうでない場合は0を返す。”R(t)”は、ある時刻tにおいて、受信イベントバッファの飽和を防止するためにサスペンド設定イベントを発信しなければならない時刻まで時間であり、”B”は時間を単位とする正の値の定数である。
【0035】
本実施形態において、式1のR(t)は以下の式2で定義される。
R(t)=n(t)/(r(t)−p(t))−α(t) (式2)
式2で、nは受信バッファの空きスロット数、rは単位時間あたりに到着するイベントの個数すなわちイベント到着速度、pは単位時間あたりに実行が完了するイベントの個数すなわちイベント処理速度である。αはサスペンド設定イベント発信処理を起動してから、そのイベントが処理されて、サスペンドが設定されるまでの時間(以下、「サスペンド設定遅延時間」と呼ぶ)である。”(t)”は、それぞれの時刻tにおける値であることを示す。なお、「スロット」とは、受信イベントバッファにおいて、個々のイベントが蓄積される記憶領域を指す。従って、空きスロットが10である場合、受信可能な残りイベント数は10となる。
【0036】
次に、本実施形態におけるプロセスの処理の流れを説明する。本実施形態において、プロセス全体の処理の流れは、初期化(ステップS401)および受信イベント処理(ステップS406)の内容を除き、第1の実施形態(図4)と同様である。
【0037】
本実施形態において、初期化処理(ステップS401)は、第1の実施形態で行った初期化処理に加え、サスペンド対象フラグ、イベント到着速度、イベント処理速度、サスペンド設定遅延時間、の初期値を保持するデータファイルを外部記憶装置(例えば図2の206)より読み込み、各パラメータに設定する。
【0038】
なお、これらのパラメータの初期値は、ファイルから読み込む方法の他、処理内容を表すプログラム中で予め設定する方法、外部IF部(図2の210)を介して別の装置から入力する方法、システムのユーザがインタラクティブに設定する方法など、任意の方法で設定することができることは言うまでもない。
【0039】
本実施形態における受信イベント処理(図4のステップS406に相当)を、図7に示すフローチャートを用いて説明する。
受信イベント処理を開始すると、ステップS701で処理開始時刻を表す情報を、端末内部に存在する時計又はシステム上に存在するタイムサーバ等から取得する。ステップS702では、受信イベントバッファを検索する。続くステップS703で、受信イベントバッファに受信イベントが入力されているかどうか判定し、受信イベントがあればステップS704に進む。一方、受信イベントが存在しないと判定されれば、処理を終了する。
【0040】
ステップS704では、イベントの到着速度を算出し、続いて前述の式1の値を算出する(ステップS705)。なお、ステップS704におけるイベント到着速度算出は、前回の受信イベント処理におけるステップS704の実行時に現在時刻情報を蓄積しておき、今回の実行時の現在時刻情報との差分に基づいて算出することができる。ただし、算出方法はこれに限定されるものではなく、任意の統計学的手法により算出することができる。
【0041】
また、ステップS705で式1の値を得る際に用いる残りのパラメータ、すなわち受信バッファの空きスロット数n、イベント処理速度p、サスペンド設定遅延時間αは、例えばメモリ202等に記憶され、後述のように各パラメータ毎に所定の周期もしくはタイミングで更新処理を行っているものとする。また、サスペンド対象フラグfの値は、受信イベントに含まれるイベント種別情報を用い、イベントの種類とそのサスペンド対象フラグの値を初期化時に設定したテーブルを参照して得ることが可能である。
【0042】
次のステップS706で、S=1、すなわちサスペンドを実行すると判定された場合は、ステップS707に進み、そうでない場合(S=0)はステップS712に進む。ステップ707では、サスペンド設定イベントを、全てのプロセスに対して発信する。続いて、受信バッファに蓄積されているイベントのうち、先頭のイベントで指示された操作内容を解析した上で実行する(ステップS708)。
【0043】
次に、ステップS709にてサスペンド設定遅延時間を算出、更新する。本実施形態においては、ステップS707で発信するサスペンド設定イベントにその発信時刻の情報もあわせて持たせ、発信時刻とステップS709を実行する時点の差分をもってサスペンド設定遅延時間とする。すなわち、本実施形態においては、自プロセスが発信するサスペンド設定イベントの遅延時間が、他のプロセスが発信するサスペンド設定イベントの遅延時間とほぼ等しく、かつ全ての端末の時刻が一致していることを仮定している。本実施形態におけるシステムを構成する端末間で時刻を一致させるには、例えばNTP(Network Time Protocol)を用いることができる。
【0044】
さらに、ステップS710で、サスペンド解除イベントを全てのプロセスに対して送信し、ステップS711でイベント処理速度を算出、更新した後、処理を終了する。本実施形態において、イベント処理速度は、ステップS701で取得した時刻とステップS711を実行する時刻の情報に基づいて算出する。ただし、算出方法はこれに限定されるものではなく、任意の統計学的手法により算出することができる。
【0045】
一方、ステップS706で、S=0であると判定された場合は、ステップS712でステップS708と同様にイベントを実行した後、イベント処理速度情報の更新をステップS711で行い、処理を終了する。
【0046】
このように、本実施形態によれば、特定の条件に従ってサスペンドを設定することが可能になるため、受信バッファのあふれを防止しつつ、サスペンド設定の発生を抑制することが可能になる。
【0047】
■(第3の実施形態)
第2の実施形態では、サスペンドを行うか否かの判定に用いるパラメータのうち、イベント到着速度r、イベント処理速度p・サスペンド設定遅延時間αを、受信イベント処理を行うごとに更新しているが、これらのパラメータのうちいずれか1つあるいは複数を予め設定した値に固定してもよい。
【0048】
固定値は、ファイルに記述して初期化ステップ(ステップS401)で読み込む方法、処理内容を表すプログラム中で予め設定する方法、外部IF部(図2の210)を介して別の装置から入力する方法、システムのユーザがインタラクティブに設定する方法など、任意の方法で設定することができる。
【0049】
■(第4の実施形態)
第2および第3の実施形態では、サスペンド対象フラグf・受信バッファの空きスロット数n・イベント到着速度r・イベント処理速度p・サスペンド設定遅延時間αのすべてを用いてサスペンドするか否かを判定するが、このうちのいずれか1つ、あるいは複数に基づいて判定してもよい。
【0050】
例えば、受信イベントの種類のみ(すなわち、サスペンド対象フラグfの値のみ)により判定することや、受信バッファの空きスロット数nの値のみに基づいて判定することもできる。
【0051】
■(第5の実施形態)
第2乃至第4の実施形態とは別の方法により選択的なサスペンド設定を行うように構成することができる。本実施形態では、イベントの実行を開始してから、ある時間の間にイベント実行が終了しない場合のみサスペンドを設定することを特徴とする。
【0052】
以下の説明では、イベントの実行開始からサスペンド設定イベント発信までの時間を「サスペンド待機時間」、サスペンド設定イベントを発信すべき時刻を「タイムアウト時刻」、タイムアウト時刻までにイベント実行が終了しないことを「タイムアウトする」と表現する。
【0053】
本実施形態における受信イベント処理(図4のステップS406に相当)の一部について、図8及び図9を用いて説明する。図8は、タイムアウトしない場合の手順である。この場合、操作イベントを受信(手順T801)し、その操作内容を実行する(手順T802)が、操作実行がタイムアウト時刻までに完了するので、タイムアウトせず、サスペンドは設定されない。また、サスペンドしていないので、サスペンドの解除も行わない。
【0054】
一方、図9の場合は、手順T901で受信した操作イベントを実行(手順T902)する間にタイムアウト時刻に到達する(タイムアウトする)ので、手順T904でサスペンド設定イベントを発信する。そして、操作実行が完了した後、サスペンドを解除する(手順T903)。
【0055】
図10は、本実施形態における受信イベント処理(図4のステップS406に相当)の、処理の流れを示したものである。図10で、第2の実施形態に係る受信イベント処理を説明した図7と同じ処理には同一の参照数字を付し、重複する説明を省略する。なお、図10に示す処理の開始時点で、後述するタイマー処理終了フラグはOFFに設定されている。
【0056】
ステップS1005では上述の式2の値R(t)を算出し、これをサスペンド待機時間とする。続くステップS1006では、現在時刻およびサスペンド待機時間よりタイムアウト時刻を算出し、タイムアウト時刻を引数としてタイマー処理を起動する。タイマー処理の詳細については後述する。タイマー処理は、図4のステップS403で行ったように、プロセス分岐によって受信イベント処理の別スレッドとして並列に動作させることができる。
【0057】
受信イベント処理側では、第2の実施形態で説明したように、ステップS708、S709でイベントの実行及びサスペンド設定遅延時間αの更新処理を行い、その後ステップS1009で、タイマー処理に終了を指示するための「タイマー処理終了フラグ」をONに設定する。これによりタイマー処理スレッドが終了する。
【0058】
ステップS1010ではサスペンド中フラグを参照し、自プロセスに対応するサスペンド中フラグがONに設定されている場合(すなわち、ステップS708におけるイベント実行がタイムアウトし、タイマ処理でサスペンド設定がなされた場合)はステップS710へ、OFFに設定されている場合はステップSS711へそれぞれ進み、処理を終了する。
【0059】
次に図11のフローチャートを用いて、本実施形態において実行されるタイマー処理の流れを説明する。タイマー処理は、上述のように受信イベント処理と並行して動作する。処理を開始すると、ステップS1101にてタイマー処理終了フラグを参照し、ONであるか否か判定する。ONであると判定された場合は処理を終了し、ONでない場合はステップS1102に進む。ステップS1102では現在時刻を参照してタイムアウト時刻と比較し(ステップS1103)、現在時刻がタイムアウト時刻以降であれば(タイムアウトしていれば)ステップS1104に進み、そうでなければステップS1101に戻る。ステップS1104ではサスペンド設定イベントを発信し、処理を終了する。
【0060】
このように、本実施形態によれば、イベントの処理にかかる時間が長く、受信イベントバッファが飽和する危険性がある場合のみ、適応的にサスペンドを設定することができる。
【0061】
■(第6の実施形態)
第5の実施形態においても、第3の実施形態と同様に、イベント到着速度・イベント処理速度・サスペンド設定遅延時間のうちいずれか1つあるいは複数を予め設定した値に固定してもよい。
【0062】
固定値は、ファイルに記述して初期化ステップ(ステップS401)で読み込む方法、処理内容を表すプログラム中で予め設定する方法、端末外部との入出力部(図2の210)を介して別の装置から入力する方法、システムのユーザがインタラクティブに設定する方法など、任意の方法で設定することができる。
【0063】
■(第7の実施形態)
第5および第6の実施形態においても、第4の実施形態で説明したように、サスペンド対象フラグ・受信バッファの空きスロット数・イベント到着速度・イベント処理速度・サスペンド設定遅延時間のいずれか1つ、あるいは複数に基づいてサスペンド待機時間を算出してもよい。
例えば、受信バッファの空きスロット数nのみに基づいてサスペンド待機時間を算出してもよい。
【0064】
■(第8の実施形態)
第2〜第7の実施形態において、イベント到着速度r・イベント処理速度p・サスペンド設定遅延時間αは、ある時刻tにおける値を算出して用いている(ただし、第3の実施形態および第6の実施形態で固定値を用いる場合を除く)。しかしながら、これらのパラメータとして、平均値・最大値・最小値など、他の種類の統計的な数値を用いるようにしてもよい。
【0065】
例えば、イベント到着速度rは最大値、イベント処理速度pは最小値、サスペンド設定遅延時間αは最大値を用いれば、受信バッファがあふれる危険性をより軽減することができる。
【0066】
■(第9の実施形態)
第1〜第8の実施形態では、各プロセスが操作すべきデータを、プロセス間で共有する仮想空間シーンデータベースとしているが、操作対象となるデータはこれ以外の任意の内容を記述するデータであってよいことは言うまでもない。
【0067】
【他の実施形態】
上述の実施形態においては、1つの機器から構成される情報処理装置についてのみ説明したが、同等の機能を複数の機器から構成されるシステムによって実現しても良い。
【0068】
尚、前述した実施形態の機能を実現するソフトウェアのプログラムを、記録媒体から直接、或いは有線/無線通信を用いて当該プログラムを実行可能なコンピュータを有するシステム又は装置に供給し、そのシステム或いは装置のコンピュータが該供給されたプログラムを実行することによって同等の機能が達成される場合も本発明に含む。
【0069】
従って、本発明の機能処理をコンピュータで実現するために、該コンピュータに供給、インストールされるプログラムコード自体も本発明を実現するものである。つまり、本発明の機能処理を実現するためのコンピュータプログラム自体も本発明に含まれる。
【0070】
その場合、プログラムの機能を有していれば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等、プログラムの形態を問わない。
【0071】
プログラムを供給するための記録媒体としては、例えば、フレキシブルディスク、ハードディスク、磁気テープ等の磁気記録媒体、MO、CD−ROM、CD−R、CD−RW、DVD−ROM、DVD−R、DVD−RW等の光/光磁気記憶媒体、不揮発性の半導体メモリなどがある。
【0072】
有線/無線通信を用いたプログラムの供給方法としては、コンピュータネットワーク上のサーバに本発明を形成するコンピュータプログラムそのもの、もしくは圧縮され自動インストール機能を含むファイル等、クライアントコンピュータ上で本発明を形成するコンピュータプログラムとなりうるデータファイル(プログラムデータファイル)を記憶し、接続のあったクライアントコンピュータにプログラムデータファイルをダウンロードする方法などが挙げられる。この場合、プログラムデータファイルを複数のセグメントファイルに分割し、セグメントファイルを異なるサーバに配置することも可能である。
【0073】
つまり、本発明の機能処理をコンピュータで実現するためのプログラムデータファイルを複数のユーザに対してダウンロードさせるサーバ装置も本発明に含む。
【0074】
また、本発明のプログラムを暗号化してCD−ROM等の記憶媒体に格納してユーザに配布し、所定の条件を満たしたユーザに対して暗号化を解く鍵情報を、例えばインターネットを介してホームページからダウンロードさせることによって供給し、その鍵情報を使用することにより暗号化されたプログラムを実行してコンピュータにインストールさせて実現することも可能である。
【0075】
また、コンピュータが、読み出したプログラムを実行することによって、前述した実施形態の機能が実現される他、そのプログラムの指示に基づき、コンピュータ上で稼動しているOSなどが、実際の処理の一部または全部を行ない、その処理によっても前述した実施形態の機能が実現され得る。
【0076】
さらに、記録媒体から読み出されたプログラムが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた後、そのプログラムの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行ない、その処理によっても前述した実施形態の機能が実現され得る。
【0077】
【発明の効果】
以上説明したように本発明によれば、複数のプロセスがデータ交換に基づき協調的動作を行うシステムにおいて、様々な条件に基づいてイベント情報の発信を制限することにより、プロセスが用いる受信バッファのあふれを防止又は抑制し、簡便な方法で信頼性の高い処理を実現することが可能になる。
【図面の簡単な説明】
【図1】本発明を適用可能な情報処理システムのプロセス構成を示す図である。
【図2】図1の情報処理システムを構築可能な情報処理装置のハードウェア構成例を示すブロック図である。
【図3】第1の実施形態における情報処理手順を示す図である。
【図4】本発明の実施形態におけるプロセスの全体処理を説明するフローチャートである。
【図5】第1の実施形態における操作処理を説明するフローチャートである。
【図6】第1の実施形態における受信イベント処理を説明するフローチャートである。
【図7】第2の実施形態における受信イベント処理を説明するフローチャートである。
【図8】第5の実施形態におけるタイムアウト未発生時の受信イベント処理の処理手順を示す図である。
【図9】第5の実施形態におけるタイムアウト発生時の受信イベント処理の処理手順を示す図である。
【図10】第5の実施形態の受信イベント処理を説明するフローチャートである。
【図11】第5の実施形態におけるタイマー処理を説明するフローチャートである。[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a technology for performing a cooperative operation by a plurality of processes communicating between processes, and particularly to a technology for realizing a reliable cooperative operation when each process has shared data.
[0002]
[Prior art]
As an example of a technique in which a plurality of processes, for example, a plurality of processes distributed in different devices exchange data with each other to perform a cooperative operation, the present applicant has previously described “information processing method and device” regarding a database sharing method. (Japanese Patent Application No. 2002-348726). In the present invention, each process holds a copy of data (shared data) shared by each process.
[0003]
When an operation request for the shared data is generated in a certain process, request information representing the operation request is exchanged between the processes via a network, and based on the received operation request, each process has its own shared data. To update. In this process, the process of issuing an operation request and the process of reflecting the operation request on the shared data, which are included in all processes, operate in parallel.
[0004]
[Problems to be solved by the invention]
In the prior invention, a buffer for temporarily storing received operation requests is used to cope with a case where operation requests are generated at intervals shorter than the processing speed of operation requests. A buffer of sufficient size was needed to prevent loss (buffer overflow).
[0005]
As described above, in a device in which a plurality of processes perform a cooperative operation by exchanging data with each other, it has been necessary to design the apparatus so that the receiving buffers used by the processes do not overflow. However, it is difficult to determine the optimum receiving buffer capacity, and there is room for improvement.
[0006]
The present invention has been made in view of such a problem, and an object of the present invention is to realize a highly reliable process by a simple method in a system in which a plurality of processes cooperatively operate using inter-process communication. To provide an information processing method and apparatus for the same.
[0007]
[Means for Solving the Problems]
According to the present invention, the above object is achieved in a system in which each of a plurality of processes holds shared data shared by the plurality of processes, and performs processing on the shared data using communication via an information transmission medium. An information processing method, comprising: when an operation on shared data occurs, an issuing step of transmitting an operation event representing the content of the operation on an information transmission medium; and, upon receiving the operation event, a process corresponding to the operation event. The operation execution step of executing the operation on the shared data owned by itself and the transmission stop notification that notifies all the processes in the system to stop transmitting the new operation event in response to the reception of the operation event Stop notification sending process to send, and release notification to send a stop release notification to all processes in the system to release the stop of sending a new operation event It is achieved by an information processing method characterized by having a signal process.
[0008]
Further, the above object is to provide a system in which each of a plurality of processes holds shared data shared by the plurality of processes and performs processing on the shared data using communication via an information transmission medium. An information processing apparatus capable of executing at least one of the following, when issuing an operation on shared data, issuing means for transmitting an operation event representing the content of the operation on an information transmission medium; An operation executing means for executing a process corresponding to the operation event on the shared data held by itself, and stopping transmission of a new operation event to all processes in the system in response to reception of the operation event. Notification sending means that sends a notification of sending stop, and cancels the stop of sending new operation events to all processes in the system That also achieved by an information processing apparatus characterized by having a release notification transmission means for transmitting a stop release notification.
[0009]
Furthermore, the above-mentioned object is also achieved by a computer program for operating a computer device as the information processing device of the present invention, or a computer-readable storage medium storing the computer program.
[0010]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, the present invention will be described in detail based on preferred embodiments with reference to the accompanying drawings.
■ (First embodiment)
In the following embodiment, an information processing method according to the present invention is applied to a virtual space sharing system in which a plurality of terminals share a scene database describing the structure and attributes of the virtual space when representing the virtual space in computer graphics. An embodiment will be described. Scene data as shared data included in the scene database is represented by, for example, a scene graph.
[0011]
FIG. 1 schematically shows the entire configuration of the virtual space sharing system according to the present embodiment from the viewpoint of communication between processes. The system has a plurality of
[0012]
The
As a hardware configuration for realizing the configuration in FIG. 1, for example, a plurality of terminals communicably connected to each other using a LAN, a public telephone network, or the Internet as the
[0013]
In this case, at each terminal, one or more of the
[0014]
Here, terms used in the following description are defined. Each process in the system performs some "operation" that changes or references the shared data. In the present embodiment, changing or referencing the structure or attribute of the virtual space described in the scene database corresponds to “operation”. The content of the operation is transmitted to another process via the
[0015]
Each process has a buffer “received event buffer” for holding received operation events, but the number of events that can be stored in the buffer is limited. In order to prevent a large number of events from arriving within a certain period of time and overflowing the reception event buffer, in the present embodiment, the process executing the operation requires that all processes emit events during the execution of the operation. Suppress.
[0016]
Hereinafter, suppressing the event transmission is referred to as “set suspend” or “suspend”. Also, releasing the suppression of event transmission is referred to as "releasing the suspend". The setting / cancellation of the suspend is also instructed using the event. Therefore, when an event for setting and canceling a suspend is distinguished from other types of events, they are referred to as a “suspend setting event” and a “suspend cancel event”, respectively.
[0017]
Next, a configuration of an information processing apparatus (terminal) in which the
[0018]
Each process is composed of two processes: an operation process for controlling an operation performed by the own process, and a reception event process for processing an operation event transmitted from the own process or another process. FIG. 3 schematically shows a processing procedure after a certain process (“the operated process” in FIG. 3) receives the operation event.
[0019]
First, in the reception event process, an operation event is received in step T301. Next, in step T302, a suspend setting event is transmitted to all processes in order to prevent the process from transmitting an event during processing of the received operation event.
[0020]
After that, an operation corresponding to the operation event received in step T301 is executed (step T303), and when the operation execution is completed, a suspend release event is sent to all processes in order to release suppression of event transmission set for the process. The call is transmitted to the user (procedure T304).
[0021]
Here, in the processing executed in step T303, it is necessary to read a data file of shared data (scene data in a database) to be operated from the
[0022]
On the other hand, in the reception event processing in all processes other than the operated process in the present system, the suspend setting event is received in step T305, and the suspend is set (step T306). When the suspend release event transmitted in step T304 is received (procedure T307), the suspend is released (procedure T308). Therefore, it is impossible to transmit an event from the end of the procedure T306 to the end of the procedure T308. As a result, for example, if an attempt is made to transmit an operation event from the operation processing at the time shown in the procedure T309, the operation is not transmitted because of the suspension, and the suspension of the event is actually transmitted in the procedure T308. It will be the time shown in the procedure T310 later.
[0023]
FIG. 4 shows the flow of the entire process. When the process is started, a file in which data to be operated is recorded in step S401 is read from an external device via an external storage device (206 in FIG. 2) or an external IF unit (210 in FIG. 2). Performs a series of initializations required for process operation. Next, a network connection with another process is established (step S402).
[0024]
At this time, the
[0025]
In the present embodiment, data exchange between any two processes is performed by one-to-one socket communication using TCP / IP (Transmission Control Protocol / Internet Protocol). Therefore, if the total number of processes is N, each process has at least N-1 socket communication paths. However, the configuration of the communication path is not limited to this, and any configuration can be used as long as data can be logically exchanged between any two processes. For example, a configuration is possible in which a
[0026]
Subsequently, in step S403, the process branches to execute the operation process and the reception event process in parallel in this process, and an operation processing thread (step S404) for processing an operation command and a process for processing the reception event. Of the receiving event processing thread (step S406). The operation processing and the reception event processing thread will be described later in detail. The operation processing and reception event processing threads determine in step S405 and step S407 whether or not an end instruction has been issued. If there is no end instruction, the process returns to step S404 and step S406 to repeatedly process the operation instruction and reception event. On the other hand, if there is a termination instruction, the two threads are integrated in step S408, the network connection between the processes is disconnected (step S409), and all the processing is terminated.
[0027]
Here, the operation processing of step S404 performed by the operation processing thread of FIG. 4 will be described in detail with reference to the flowchart of FIG.
First, in step S501, the contents of the operation command are input. Next, an operation event corresponding to the operation command input in step S501 is generated (step S502). In step S503, the suspended flag is referred to, and it is determined whether the transmission of the event is suppressed by any process. If the event transmission is suppressed, the process returns to step S503. If the event transmission is not suppressed, the process proceeds to step S504, in which the operation event generated in step S502 is transmitted to all processes including the own process. finish.
[0028]
Next, the reception event processing of step S406 performed by the reception event processing thread of FIG. 4 will be described in detail with reference to the flowchart of FIG.
The reception event is received by an event communication unit (not shown), and is input to a reception event buffer set in advance as an area of a storage device such as the
[0029]
In step S603, a suspend setting event is transmitted to all processes. Note that the suspend setting event includes the ID of the process that transmits the suspend setting event. Subsequently, of the reception events stored in the reception event buffer, the operation content specified by the first event is analyzed and executed (step S604). In particular, when the event to be executed is a suspend setting event, the suspending flag corresponding to the process ID included in the event is set to ON. Conversely, if the event to be executed is a suspend release event, the suspending flag corresponding to the process ID included in the event is set to OFF. After the execution of the event, in step S605, an event for instructing cancellation of the suspension is transmitted to all processes, and the process ends.
[0030]
By performing the processing described above, it is possible to set so that all the processes do not emit an event while any of the processes operating in the system is performing an operation. As a result, the risk that the reception event buffer overflows due to the arrival of a large number of events during the execution of the operation and the operation is not reliably executed can be greatly reduced.
[0031]
■ (Second embodiment)
In the first embodiment, a suspend is always set when an operation on shared data is performed. If the capacity of the shared data to be operated is likely to be large, such as scene data that represents a virtual space, a remarkable buffer overflow prevention effect can be obtained with simple processing, but all processes are affected during the suspend setting. Therefore, it is more preferable that the number of times of suspend setting itself can be reduced. Therefore, the present embodiment is characterized in that it is determined whether to suspend based on a certain criterion.
[0032]
Here, a criterion for judging whether to suspend or not to set in the present embodiment will be described. This criterion is to suspend when the time margin until the reception event buffer is saturated is less than a certain value and when executing a predetermined type of event.
[0033]
The expression for this criterion is
S = f × Th (R (t), B) (Equation 1)
It can be expressed as. If the value S of this equation is 1, suspend is set, and if it is 0, suspend is not performed.
[0034]
Here, “f” is a flag determined for each type of event (hereinafter referred to as “suspend target flag”). In advance, f = 1 is set when suspending for each type of event, and f = 0 when suspending is not performed. Have been. "Th (a, b)" is a function for performing a binarization process, and returns 1 if the first argument a is less than the second argument b, and returns 0 if not. “R (t)” is a time until a time at which a suspend setting event must be transmitted at a certain time t in order to prevent saturation of the reception event buffer, and “B” is a positive value in units of time. Is a constant.
[0035]
In the present embodiment, R (t) in
R (t) = n (t) / (r (t) -p (t))-α (t) (Equation 2)
In
[0036]
Next, the processing flow of the process according to the present embodiment will be described. In the present embodiment, the processing flow of the entire process is the same as that of the first embodiment (FIG. 4) except for the contents of initialization (step S401) and reception event processing (step S406).
[0037]
In the present embodiment, the initialization process (step S401) holds initial values of the suspend target flag, the event arrival speed, the event processing speed, and the suspend setting delay time in addition to the initialization process performed in the first embodiment. The data file to be read is read from an external storage device (for example, 206 in FIG. 2) and is set for each parameter.
[0038]
In addition to the method of reading these parameters from a file, the method of setting these parameters in advance in a program representing the processing content, the method of inputting them from another device via an external IF unit (210 in FIG. 2), the system It is needless to say that the user can make an arbitrary setting such as an interactive setting.
[0039]
The reception event processing (corresponding to step S406 in FIG. 4) in the present embodiment will be described with reference to the flowchart shown in FIG.
When the reception event process is started, in step S701, information indicating the process start time is obtained from a clock existing inside the terminal, a time server existing on the system, or the like. In step S702, the reception event buffer is searched. In a succeeding step S703, it is determined whether or not a reception event has been input to the reception event buffer. If there is a reception event, the process proceeds to step S704. On the other hand, if it is determined that there is no reception event, the process ends.
[0040]
In step S704, the arrival speed of the event is calculated, and then the value of the above-described
[0041]
The remaining parameters used to obtain the value of
[0042]
In the next step S706, if S = 1, that is, if it is determined to execute the suspend, the process proceeds to step S707, and if not (S = 0), the process proceeds to step S712. In
[0043]
Next, in step S709, the suspend setting delay time is calculated and updated. In the present embodiment, information on the transmission time is also added to the suspend setting event transmitted in step S707, and the difference between the transmission time and the time when step S709 is executed is defined as the suspend setting delay time. That is, in the present embodiment, it is assumed that the delay time of the suspend setting event transmitted by the own process is substantially equal to the delay time of the suspend setting event transmitted by another process, and that the times of all terminals match. I assume. In order to match the time between the terminals configuring the system according to the present embodiment, for example, NTP (Network Time Protocol) can be used.
[0044]
Further, in step S710, a suspend release event is transmitted to all processes. In step S711, the event processing speed is calculated and updated, and then the process ends. In the present embodiment, the event processing speed is calculated based on information on the time acquired in step S701 and the time at which step S711 is executed. However, the calculation method is not limited to this, and can be calculated by any statistical method.
[0045]
On the other hand, if it is determined in step S706 that S = 0, an event is executed in step S712 in the same manner as in step S708, the event processing speed information is updated in step S711, and the process ends.
[0046]
As described above, according to the present embodiment, it is possible to set the suspend according to the specific condition. Therefore, it is possible to suppress the occurrence of the suspend setting while preventing the overflow of the reception buffer.
[0047]
■ (Third embodiment)
In the second embodiment, the event arrival speed r, the event processing speed p, and the suspend setting delay time α among the parameters used to determine whether to perform the suspend are updated each time the reception event process is performed. Any one or more of these parameters may be fixed to a preset value.
[0048]
The fixed value is described in a file and read in the initialization step (step S401), a method of setting in advance in a program representing the processing contents, and input from another device via the external IF unit (210 in FIG. 2). It can be set by any method, such as a method, a method of setting interactively by a user of the system.
[0049]
■ (Fourth embodiment)
In the second and third embodiments, it is determined whether or not to suspend using all of the suspend target flag f, the number of empty slots in the reception buffer n, the event arrival speed r, the event processing speed p, and the suspend setting delay time α. However, the determination may be made based on one or more of these.
[0050]
For example, the determination can be made based only on the type of the reception event (that is, only the value of the suspend target flag f) or based on only the value of the number n of empty slots in the reception buffer.
[0051]
■ (Fifth embodiment)
It is possible to configure so as to perform the selective suspend setting by a method different from the second to fourth embodiments. The present embodiment is characterized in that the suspend is set only when the event execution does not end within a certain time after the start of the event execution.
[0052]
In the following description, the time from the start of event execution to the transmission of the suspend setting event is “suspend standby time”, the time to transmit the suspend setting event is “timeout time”, and the fact that the event execution does not end by the timeout time is described as “ Timeout. "
[0053]
A part of the reception event processing (corresponding to step S406 in FIG. 4) according to the present embodiment will be described with reference to FIGS. FIG. 8 shows a procedure when no timeout occurs. In this case, the operation event is received (procedure T801) and the content of the operation is executed (procedure T802). However, since the operation execution is completed before the timeout time, the operation is not timed out and the suspend is not set. In addition, since the suspension is not performed, the suspension is not released.
[0054]
On the other hand, in the case of FIG. 9, the timeout event is reached (timeout occurs) while the operation event received in the procedure T901 is executed (procedure T902), so that the suspend setting event is transmitted in the procedure T904. Then, after the execution of the operation is completed, the suspend is released (procedure T903).
[0055]
FIG. 10 shows a processing flow of the reception event processing (corresponding to step S406 in FIG. 4) in the present embodiment. In FIG. 10, the same processes as those in FIG. 7 that describe the reception event process according to the second embodiment are denoted by the same reference numerals, and redundant description will be omitted. At the start of the processing shown in FIG. 10, a timer processing end flag described later is set to OFF.
[0056]
In step S1005, the value R (t) of the
[0057]
On the receiving event processing side, as described in the second embodiment, in steps S708 and S709, execution of the event and update processing of the suspend setting delay time α are performed, and in step S1009, the timer processing is instructed to end. Is set to ON. This ends the timer processing thread.
[0058]
In step S1010, the suspended flag is referred to. If the suspended flag corresponding to the own process is set to ON (that is, if the event execution in step S708 times out and the suspend setting is performed in the timer process), the process proceeds to step S1010. In S710, if it is set to OFF, the process proceeds to step SS711, and the process ends.
[0059]
Next, the flow of the timer process executed in the present embodiment will be described with reference to the flowchart of FIG. The timer process operates in parallel with the reception event process as described above. When the processing is started, it is determined in step S1101 whether or not the timer processing is ON by referring to the timer processing end flag. If it is determined to be ON, the process ends, and if it is not ON, the process proceeds to step S1102. In step S1102, the current time is referred to and compared with the timeout time (step S1103). If the current time is equal to or longer than the timeout time (if timeout occurs), the process proceeds to step S1104; otherwise, the process returns to step S1101. In step S1104, a suspend setting event is transmitted, and the process ends.
[0060]
As described above, according to the present embodiment, the suspend can be set adaptively only when the time required for processing the event is long and there is a risk that the reception event buffer is saturated.
[0061]
■ (Sixth embodiment)
In the fifth embodiment, as in the third embodiment, one or more of the event arrival speed, the event processing speed, and the suspend setting delay time may be fixed to a preset value.
[0062]
The fixed value is described in a file and read in the initialization step (step S401), a method of setting in advance in a program representing the processing content, another method via an input / output unit (210 in FIG. 2) with the outside of the terminal. It can be set by any method such as a method of inputting from the device, a method of interactively setting by a user of the system, and the like.
[0063]
■ (Seventh embodiment)
Also in the fifth and sixth embodiments, as described in the fourth embodiment, any one of the suspend target flag, the number of empty slots in the reception buffer, the event arrival speed, the event processing speed, and the suspend setting delay time Alternatively, the suspend standby time may be calculated based on a plurality of times.
For example, the suspend standby time may be calculated based only on the number n of empty slots in the reception buffer.
[0064]
■ (Eighth embodiment)
In the second to seventh embodiments, the event arrival speed r, the event processing speed p, and the suspend setting delay time α are calculated and used at a certain time t (however, the third embodiment and the sixth embodiment). Except for the case where a fixed value is used in the embodiment). However, other types of statistical numerical values such as an average value, a maximum value, and a minimum value may be used as these parameters.
[0065]
For example, if the event arrival speed r uses the maximum value, the event processing speed p uses the minimum value, and the suspend setting delay time α uses the maximum value, the risk of overflowing the reception buffer can be further reduced.
[0066]
■ (Ninth embodiment)
In the first to eighth embodiments, the data to be operated by each process is the virtual space scene database shared between the processes, but the data to be operated is data describing any other contents. Needless to say,
[0067]
[Other embodiments]
In the above-described embodiment, only the information processing apparatus including one device has been described. However, equivalent functions may be realized by a system including a plurality of devices.
[0068]
In addition, a software program for realizing the functions of the above-described embodiments is supplied to a system or an apparatus having a computer capable of executing the program directly from a recording medium or by using wired / wireless communication. The present invention includes a case where a computer achieves the same function by executing the supplied program.
[0069]
Therefore, the program code itself supplied and installed in the computer to implement the functional processing of the present invention by the computer also implements the present invention. That is, the present invention includes the computer program itself for implementing the functional processing of the present invention.
[0070]
In this case, any form of the program, such as an object code, a program executed by an interpreter, and script data to be supplied to the OS, may be used as long as the program has a function.
[0071]
As a recording medium for supplying the program, for example, a magnetic recording medium such as a flexible disk, a hard disk, a magnetic tape, an MO, a CD-ROM, a CD-R, a CD-RW, a DVD-ROM, a DVD-R, a DVD- There are optical / magneto-optical storage media such as RW, and nonvolatile semiconductor memories.
[0072]
As a method for supplying a program using wired / wireless communication, a computer program itself that forms the present invention on a server on a computer network, or a computer that forms the present invention on a client computer, such as a compressed file having an automatic installation function, etc. A method of storing a data file (program data file) that can be a program and downloading the program data file to a connected client computer may be used. In this case, the program data file can be divided into a plurality of segment files, and the segment files can be arranged on different servers.
[0073]
That is, the present invention also includes a server device that allows a plurality of users to download a program data file for implementing the functional processing of the present invention on a computer.
[0074]
Further, the program of the present invention is encrypted, stored in a storage medium such as a CD-ROM and distributed to users, and key information for decrypting the encryption for a user who satisfies predetermined conditions is transmitted to, for example, a homepage via the Internet. It is also possible to realize the program by supplying it by downloading it from, and using the key information to execute an encrypted program and install it on a computer.
[0075]
The functions of the above-described embodiments are implemented when the computer executes the read program, and an OS or the like running on the computer executes a part of the actual processing based on the instructions of the program. Alternatively, all the operations are performed, and the functions of the above-described embodiments can be realized by the processing.
[0076]
Further, after the program read from the recording medium is written into a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function expansion board or the The CPU or the like provided in the function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments can also be realized by the processing.
[0077]
【The invention's effect】
As described above, according to the present invention, in a system in which a plurality of processes cooperate based on data exchange, by limiting the transmission of event information based on various conditions, overflow of a reception buffer used by the processes. Can be prevented or suppressed, and highly reliable processing can be realized by a simple method.
[Brief description of the drawings]
FIG. 1 is a diagram showing a process configuration of an information processing system to which the present invention can be applied.
FIG. 2 is a block diagram illustrating a hardware configuration example of an information processing apparatus capable of constructing the information processing system of FIG. 1;
FIG. 3 is a diagram illustrating an information processing procedure according to the first embodiment.
FIG. 4 is a flowchart illustrating overall processing of a process according to the embodiment of the present invention.
FIG. 5 is a flowchart illustrating an operation process according to the first embodiment.
FIG. 6 is a flowchart illustrating a reception event process according to the first embodiment.
FIG. 7 is a flowchart illustrating a reception event process according to the second embodiment.
FIG. 8 is a diagram illustrating a processing procedure of a reception event process when a timeout has not occurred in a fifth embodiment.
FIG. 9 is a diagram illustrating a processing procedure of a reception event process when a timeout occurs in the fifth embodiment.
FIG. 10 is a flowchart illustrating a reception event process according to the fifth embodiment.
FIG. 11 is a flowchart illustrating a timer process according to a fifth embodiment.
Claims (10)
前記共有データに対する操作が発生した場合に、当該操作の内容を表す操作イベントを前記情報伝達媒体上に発信する発行工程と、
前記操作イベントを受信すると、当該操作イベントに対応する処理を自らが保有する前記共有データに対して実行する操作実行工程と、
前記操作イベントの受信に応じて、前記システム内の全プロセスに対し、新たな前記操作イベントの発信を停止するように通知する発信停止通知を発信する停止通知発信工程と、
前記システム内の全プロセスに対し、新たな前記操作イベントの発信停止を解除する停止解除通知を発信する解除通知発信工程とを有することを特徴とする情報処理方法。An information processing method in a system in which each of a plurality of processes holds shared data shared by the plurality of processes and uses communication via an information transmission medium to perform processing on the shared data,
When an operation on the shared data has occurred, an issuing step of transmitting an operation event representing the content of the operation on the information transmission medium,
Upon receiving the operation event, an operation execution step of executing a process corresponding to the operation event on the shared data owned by itself.
In response to receiving the operation event, to all processes in the system, a stop notification transmission step of transmitting a transmission stop notification that notifies the user to stop transmitting the new operation event,
A release notification transmitting step of transmitting a stop release notification for releasing the transmission stop of the new operation event to all processes in the system.
前記解除通知発信工程は、前記操作実行工程が前記操作イベントに対応する処理を実行した後に前記停止解除通知を発信することを特徴とする請求項1又は請求項2に記載の情報処理方法。The stop notification transmitting step, when receiving the operation event, transmits the transmission stop notification,
3. The information processing method according to claim 1, wherein the release notification transmission step transmits the stop release notification after the operation execution step performs a process corresponding to the operation event. 4.
前記停止通知発信工程は、前記バッファ手段の空き容量、前記操作実行工程が実行しようとする操作の種類、所定時間内に受信した前記操作イベントの数、所定時間内に前記操作実行工程が処理した前記操作イベントの数、前記発信停止通知を発信してから自プロセスにおいて前記設定工程が実行されるまでの時間の少なくとも1つに基づいて前記発信通知を行うか否かを決定することを特徴とする請求項2記載の情報処理方法。Each of the plurality of processes temporarily stores the received operation event in buffer means,
The stop notification sending step includes the following steps: the free space of the buffer means, the type of operation to be executed by the operation execution step, the number of operation events received within a predetermined time, and the operation execution step processed within a predetermined time. Determining whether or not to perform the transmission notification based on at least one of the number of the operation events and the time from when the transmission stop notification is transmitted to when the setting step is performed in the own process. 3. The information processing method according to claim 2, wherein
前記停止通知発信工程は、前記バッファ手段の空き容量、前記操作実行工程が実行しようとする操作の種類、所定時間内に受信した前記操作イベントの数、所定時間内に前記操作実行工程が処理した前記操作イベントの数、前記発信停止通知を発信してから自プロセスにおいて前記設定工程が実行されるまでの時間の少なくとも1つ以上に基づいて前記所定時間を決定することを特徴とする請求項5記載の情報処理方法。Each of the plurality of processes temporarily stores the received operation event in buffer means,
The stop notification sending step includes the following steps: the free space of the buffer means, the type of operation to be executed by the operation execution step, the number of operation events received within a predetermined time, and the operation execution step processed within a predetermined time. 6. The method according to claim 5, wherein the predetermined time is determined based on at least one of the number of the operation events and a time from when the transmission stop notification is transmitted to when the setting step is performed in the own process. The described information processing method.
前記操作実行工程は、前記共有データを読み込み、該読み込まれたデータに対して前記操作を行うことを特徴とする請求項1乃至請求項6のいずれか1項に記載の情報処理方法。The shared data is data describing the structure and attributes of a virtual space,
7. The information processing method according to claim 1, wherein the operation execution step reads the shared data and performs the operation on the read data. 8.
前記共有データに対する操作が発生した場合に、当該操作の内容を表す操作イベントを前記情報伝達媒体上に発信する発行手段と、
前記操作イベントを受信すると、当該操作イベントに対応する処理を自らが保有する前記共有データに対して実行する操作実行手段と、
前記操作イベントの受信に応じて、前記システム内の全プロセスに対し、新たな前記操作イベントの発信を停止するように通知する発信停止通知を発信する停止通知発信手段と、
前記システム内の全プロセスに対し、新たな前記操作イベントの発信停止を解除する停止解除通知を発信する解除通知発信手段とを有することを特徴とする情報処理装置。In a system in which each of a plurality of processes holds shared data shared by the plurality of processes and performs processing on the shared data using communication via an information transmission medium, at least one of the plurality of processes may be executed. An executable information processing device,
Issuance means for transmitting, when an operation on the shared data has occurred, an operation event indicating the content of the operation on the information transmission medium,
Upon receiving the operation event, an operation execution unit that executes a process corresponding to the operation event on the shared data owned by itself.
In response to receiving the operation event, a stop notification transmission unit that transmits a transmission stop notification that notifies all processes in the system to stop transmitting the new operation event,
An information processing apparatus, comprising: a release notification transmitting unit that transmits a stop release notification for releasing transmission stoppage of the new operation event to all processes in the system.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003053900A JP2004265062A (en) | 2003-02-28 | 2003-02-28 | Information processing method and device |
PCT/JP2004/002218 WO2004077298A1 (en) | 2003-02-28 | 2004-02-25 | Information processing method and apparatus |
US10/546,168 US7516204B2 (en) | 2003-02-28 | 2004-02-25 | Information processing method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003053900A JP2004265062A (en) | 2003-02-28 | 2003-02-28 | Information processing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2004265062A true JP2004265062A (en) | 2004-09-24 |
Family
ID=33118382
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003053900A Withdrawn JP2004265062A (en) | 2003-02-28 | 2003-02-28 | Information processing method and device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2004265062A (en) |
-
2003
- 2003-02-28 JP JP2003053900A patent/JP2004265062A/en not_active Withdrawn
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20050028171A1 (en) | System and method enabling multiple processes to efficiently log events | |
JPH03126158A (en) | Method and apparatus for scheduling | |
CN113641457A (en) | Container creation method, device, apparatus, medium, and program product | |
US8196145B2 (en) | Determining real time stateful business application processing in an otherwise stateless service-oriented architecture | |
KR19990082226A (en) | Application programming interface for data management and bus management over the bus structure | |
JP7354361B2 (en) | Processing equipment, processing method and program | |
US20150178229A1 (en) | Computer system and control method thereof | |
US10229010B2 (en) | Methods for preserving state across a failure and devices thereof | |
WO2006035730A1 (en) | Information processing device, communication processing method, and computer program | |
CN103201720A (en) | Virtual computer control apparatus, virtual computer control method, virtual computer control program, and integrated circuit | |
US6728834B2 (en) | System and method for effectively implementing isochronous processor cache | |
WO2020031675A1 (en) | Scheduling device, scheduling system, scheduling method, program, and non-transitory computer-readable medium | |
CN106933646B (en) | A method and apparatus for creating a virtual machine | |
CN113472638B (en) | Edge gateway control method, system, device, electronic equipment and storage medium | |
CN101411165A (en) | Technique of controlling communication of installed apparatus with outside by means of proxy server | |
JP2008124977A (en) | Message delivery method, apparatus and program | |
JP2004265062A (en) | Information processing method and device | |
US7516204B2 (en) | Information processing method and apparatus | |
CN115640100A (en) | Virtual machine information synchronization method and computer readable medium | |
CN115277398A (en) | Cluster network configuration method and device | |
US10951537B1 (en) | Adjustable receive queue for processing packets in a network device | |
JP2792866B2 (en) | Buffer pool pre-expansion device | |
JP5530878B2 (en) | Data replication management method in distributed system | |
CN113055832A (en) | Method for transmitting Beidou short messages through unified management of multi-link Beidou equipment | |
US20120065953A1 (en) | Computer-readable, non-transitory medium storing simulation program, simulation apparatus and simulation method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060221 |
|
A761 | Written withdrawal of application |
Free format text: JAPANESE INTERMEDIATE CODE: A761 Effective date: 20080110 |