JPH10207709A - Method for sharing object - Google Patents

Method for sharing object

Info

Publication number
JPH10207709A
JPH10207709A JP715397A JP715397A JPH10207709A JP H10207709 A JPH10207709 A JP H10207709A JP 715397 A JP715397 A JP 715397A JP 715397 A JP715397 A JP 715397A JP H10207709 A JPH10207709 A JP H10207709A
Authority
JP
Japan
Prior art keywords
instance
name
packet
class
processes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP715397A
Other languages
Japanese (ja)
Inventor
Yukimasa Shiyou
行正 招
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
Original Assignee
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Meidensha Corp, Meidensha Electric Manufacturing Co Ltd filed Critical Meidensha Corp
Priority to JP715397A priority Critical patent/JPH10207709A/en
Publication of JPH10207709A publication Critical patent/JPH10207709A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a method for sharing an object so that the object can be shared between processes by generating the same object for another object by packet transmission or using a shared memory. SOLUTION: A transmission process generates an object, and then transmits the class name, instance name, and object main body of the object to a receiving process as a packet P, and the receiving process generates an object having the same class name, instance name, and object main body as the received packet, and shares the object. The transmitting process arranges the generated object on a shared memory, and the receiving process receives the class name, instance name, and object address as the packet P, and shared the object on the share memory.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、オブジェクト指向
プログラミング技術を用いたコンピュータソフトウェア
におけるプロセス間のオブジェクトの共有方法に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for sharing objects between processes in computer software using an object-oriented programming technique.

【0002】[0002]

【従来の技術】コンピュータのソフトウェアにおけるオ
ブジェクト指向技術では、クラスとインスタンスが設計
されて目的とするプロセス機能を実現している。クラス
とはオブジェクトの上位概念を定義するオブジェクトで
あり、インスタンスとはクラスの具体化した実体と定義
する。以下ではクラスオブジェクト、インスタンスオブ
ジェクトを総称してオブジェクトと呼ぶ。
2. Description of the Related Art In object-oriented technology in computer software, classes and instances are designed to realize a target process function. A class is an object that defines a superordinate concept of an object, and an instance is defined as a concrete substance of the class. Hereinafter, a class object and an instance object are collectively called an object.

【0003】1つの世界ではすべてのオブジェクトが同
一空間に配置され、クラスの継承、オブジェクト間の関
係などすべてのオブジェクトから同じように見える。
In one world, all objects are located in the same space and look the same from all objects, such as class inheritance and relationships between objects.

【0004】さらに、生成されたオブジェクトの手続き
(以下メソッド)呼び出しなどが当然のようにできる。
Further, it is possible to call a procedure (hereinafter referred to as a method) of the generated object.

【0005】[0005]

【発明が解決しようとする課題】従来のオブジェクト指
向プログラミング技術を用いたソフトウェアは、全ての
クラスとオブジェクトが単一のスレッド及びプロセス内
に限定されて設計されている。このため、オブジェクト
の生成などがスレッド、プロセス、ネットワークを越え
て設計された場合には対応できない。
Software using conventional object-oriented programming techniques is designed such that all classes and objects are limited to a single thread and process. For this reason, it is not possible to cope with the case where the creation of an object is designed across threads, processes, and networks.

【0006】図3は、マルチスレッド、マルチプロセス
でネットワークに接続されたコンピュータシステムを示
し、プロセスP1〜PNは、それぞれコンピュータ内で
プロセス個別に固有なアドレス空間を持ち、他のプロセ
スとはメモリを共有しない。スレッドSはプロセスのア
ドレス空間を共有するが、処理の単位がプロセスとは独
立している。
FIG. 3 shows a computer system connected to a network by multi-threading and multi-processing. Each of the processes P1 to PN has a unique address space for each process in the computer, and a memory for the other processes. Do not share. The thread S shares the address space of the process, but the processing unit is independent of the process.

【0007】このシステム構成においては、各プロセス
のオブジェクトの取り扱いは、所属するプロセス内に限
定されてしまうため、オブジェクト同士には以下の機能
が限定されてしまう。
In this system configuration, the handling of objects of each process is limited to the process to which the process belongs, so that the following functions are limited between objects.

【0008】(1)クラス定義が伝播できない。クラス
継承、関係が伝播できない (2)インスタンスの生成が伝播できない。オブジェク
トが共有できない (3)メソッド呼び出しが伝播できない。メソッド呼び
出しができない 本発明の目的は、プロセス間でオブジェクトを共有でき
るようにしたオブジェクトの共有方法を提供することに
ある。
(1) The class definition cannot be propagated. Class inheritance and relationship cannot be propagated. (2) Instance generation cannot be propagated. Objects cannot be shared (3) Method calls cannot be propagated. An object of the present invention is to provide an object sharing method that enables an object to be shared between processes.

【0009】[0009]

【課題を解決するための手段】本発明は、プロセス間の
オブジェクトの共有には、あるプロセスで生成したオブ
ジェクトをパケット送信により他のオブジェクトにも同
じオブジェクトを生成する方法、又は共有メモリを使っ
てプロセス間でオブジェクトを共有する方法とするもの
で、以下の方法を特徴とする。
SUMMARY OF THE INVENTION The present invention provides a method for sharing an object between processes using a method of generating the same object for another object by packet transmission of an object generated by one process, or using a shared memory. A method for sharing objects between processes, characterized by the following method.

【0010】(第1の発明)オブジェクト指向プログラ
ミング技術を用いたコンピュータソフトウェアにおける
プロセス間でオブジェクトを共有するにおいて、あるプ
ロセスがオブジェクトを生成したときに、該オブジェク
トのクラス名とインスタンス名及びオブジェクト本体を
パケット送信で他のプロセスに送信し、他のプロセスは
受信したパケットと同じクラス名とインスタンス名及び
オブジェクト本体をもつオブジェクトを生成してオブジ
ェクトを共有することを特徴とする。
(First Invention) In sharing an object between processes in computer software using object-oriented programming technology, when a certain process generates an object, a class name, an instance name, and an object body of the object are changed. The packet is transmitted to another process, and the other process generates an object having the same class name, instance name, and object body as the received packet, and shares the object.

【0011】(第2の発明)オブジェクト指向プログラ
ミング技術を用いたコンピュータソフトウェアにおける
プロセス間でオブジェクトを共有するにおいて、あるプ
ロセスが生成するオブジェクトをそのインスタンスの実
体が複数のプロセスのプロセス空間で見ることができる
共有メモリ上に配置し、該生成したオブジェクトのクラ
ス名とインスタンス名及びオブジェクトアドレスをパケ
ット送信で他のプロセスに送信し、他のプロセスは受信
したパケットと同じクラス名とインスタンス名及びオブ
ジェクトアドレスから前記共有メモリ上のオブジェクト
を共有することを特徴とする。
(Second Invention) In sharing an object between processes in computer software using object-oriented programming technology, it is possible for an entity generated by a certain process to see an object of an instance in a process space of a plurality of processes. Placed on a shared memory where the class name, instance name, and object address of the generated object are transmitted to another process by packet transmission, and the other process uses the same class name, instance name, and object address as the received packet. The object on the shared memory is shared.

【0012】[0012]

【発明の実施の形態】BEST MODE FOR CARRYING OUT THE INVENTION

(第1の実施形態)図1は、本発明の実施形態を示し、
図3における1つのコンピュータ間又はネットワークに
またがった2つのプロセス間でオブジェクトを独立的に
共有する場合である。
(First Embodiment) FIG. 1 shows an embodiment of the present invention.
This is a case where objects are independently shared between one computer or two processes across a network in FIG.

【0013】図1において、送信プロセスが持つインス
タンスオブジェクトを受信プロセスが共有するにおい
て、送信プロセス及び受信プロセスは、それぞれクラス
情報をリスト構造のテーブル1S、1Rに保持する。ク
ラス情報にはクラス名、インスタンスを生成するための
メソッドのポインタ(コンストラクタポインタ)、イン
スタンスリストを持つ。前提として送・受信プロセスで
同じクラス定義を参照し、インスタンス情報をリスト構
造のテーブル2S、2Rに保持する。
In FIG. 1, when the receiving process shares the instance object possessed by the transmitting process, the transmitting process and the receiving process respectively hold class information in tables 1S and 1R having a list structure. The class information includes a class name, a pointer of a method for generating an instance (a constructor pointer), and an instance list. As a premise, the same class definition is referred to in the sending / receiving process, and the instance information is held in the tables 2S and 2R of the list structure.

【0014】必要なプロセスでクラス・コンストラクタ
ポインタテーブルを生成し、クラス定義情報を予めテー
ブル1S,1Rに追加する。初期のインスタンスリスト
は空である。
A class constructor pointer table is generated by a necessary process, and class definition information is added to the tables 1S and 1R in advance. The initial instance list is empty.

【0015】送信プロセスで生成したインスタンスを受
信プロセスへ送信する場合、送信プロセスでクラス名を
指定し生成すると、クラス・コンストラクタポインタテ
ーブル1Sをクラス名で検索し、一致したクラス情報の
コンストラクタを呼び出し該当クラスのインスタンス3
Sを生成する。インスタンスが生成されると、インスタ
ンスリスト2Sへ追加され登録される。同時に、インス
タンスを共有するべき受信プロセスヘパケットPを送信
する。また、パケットの送受信に仮想関数テーブル4
S,4Rが用意される。
When an instance created in the sending process is sent to the receiving process, when the sending process specifies and creates a class name, the class constructor pointer table 1S is searched by the class name, and the constructor of the matched class information is called. Class instance 3
Generate S. When an instance is generated, it is added to the instance list 2S and registered. At the same time, the packet P is transmitted to the receiving process that should share the instance. The virtual function table 4 is used for packet transmission and reception.
S, 4R are prepared.

【0016】パケットPとして、クラス名十インスタン
ス名十オブジェクト本体が送られる。パケットを受信し
た受信プロセスでは、そのオブジェクトと同じものをプ
ロセス内へ再現する。これはパケットからクラス名を取
り出し、クラス・コンストラクタポインタテーブル1R
を検索しパケット内のインスタンス名でコンストラクタ
を呼び出しインスタンス3Rを生成する。さらに、パケ
ット内のインスタンス本体を生成されたインスタンスヘ
コピーする。
As the packet P, the class name, the instance name, and the object body are transmitted. The receiving process that has received the packet reproduces the same object as the object in the process. This extracts the class name from the packet and stores the class constructor pointer table 1R
And calls a constructor with the instance name in the packet to generate an instance 3R. Further, the instance body in the packet is copied to the generated instance.

【0017】本実施形態では、送受信プロセス間のオブ
ジェクトの共有は、送信プロセスで生成されたインスタ
ンスをパケットとして受信プロセスでコピーする方法で
あり、プロセスがネットワークをまたいでいても実現で
きる。
In the present embodiment, the sharing of the object between the transmitting and receiving processes is a method of copying the instance generated in the transmitting process as a packet in the receiving process, and can be realized even if the process is over a network.

【0018】また、プロセスの数は制限されないため、
規模の大きなマルチプロセスのアプリケーションに対応
することができる。
Further, since the number of processes is not limited,
It can handle large multi-process applications.

【0019】(第2の実施形態)第1の実施形態ではイ
ンスタンス本体を送信することによって複数のプロセス
間でオブジェクトのコピーを作成することでその共有を
することができる。この場合には同じオブジェクトが複
数作成されるため、オブジェクトの同一性、同期を考え
た場合、オブジェクトが唯一の場合が有効である場合が
ある。
(Second Embodiment) In the first embodiment, a copy of an object can be shared between a plurality of processes by transmitting an instance body to create a copy of the object. In this case, since a plurality of the same objects are created, in consideration of the identity and synchronization of the objects, it may be effective to use only one object.

【0020】そこで、本実施形態では、プロセス間のオ
ブジェクトの共有にもそれが唯一のオブジェクトとする
方法を提供する。
Therefore, the present embodiment provides a method for sharing an object between processes as the only object.

【0021】本実施形態によるオブジェクト共有方法を
図2に示す。図1と同様にクラス・コンストラクタポイ
ンタテーブル1S、1Rを持ちクラス情報を保持する。
この方式の特徴は、インスタンスの実体が複数のプロセ
スのプロセス空間で見ることができる共有メモリM上に
配置されることである。共有メモリ上に配置することに
より、インスタンスが1つの実体のみとなる。
FIG. 2 shows an object sharing method according to the present embodiment. Like FIG. 1, it has class / constructor pointer tables 1S, 1R and holds class information.
The feature of this method is that the entity of the instance is arranged on the shared memory M which can be seen in the process space of a plurality of processes. By arranging on the shared memory, the instance becomes only one entity.

【0022】生成手順は、送信プロセスで第1の実施形
態と同様に生成したいクラス名をキーにクラス・コンス
トラクタポインタテーブル1Sを検索し、指定されたイ
ンスタンス名でコンストラクタを呼び出し、インスタン
スを生成する。そのインスタンスは共有メモリM上へ生
成される。
In the generation procedure, a class constructor pointer table 1S is searched using a class name to be generated as a key in the transmission process as in the first embodiment, and a constructor is called with a specified instance name to generate an instance. The instance is generated on the shared memory M.

【0023】インスタンスが生成されたらインスタンス
リスト2Sへ追加する。同時に、インスタンスを共有す
るべき受信プロセスへパケットPを送信する。パケット
Pとしては、クラス名十インスタンス名十オブジェクト
アドレスが送られる。パケットを受信したプロセスで
は、パケットのクラス名をキーにクラス情報を取得しイ
ンスタンスリスト2Rヘオブジェクトアドレスを追加
し、共有メモリ上のインスタンスを指すようにする。
When an instance is generated, it is added to the instance list 2S. At the same time, the packet P is transmitted to the receiving process that should share the instance. As the packet P, a class name, an instance name, and an object address are transmitted. The process that has received the packet acquires the class information using the class name of the packet as a key, adds the object address to the instance list 2R, and points to the instance on the shared memory.

【0024】本実施形態では、複数のプロセスで同一実
体のオブジェクトを共有するため、メモリ資源等が少な
くて済むし、オブジェクト間の情報の送受信も必要がな
いため通信量を減少させ高速な実行が可能となる。
In the present embodiment, a plurality of processes share an object of the same substance, so that memory resources and the like can be reduced, and there is no need to transmit / receive information between objects. It becomes possible.

【0025】[0025]

【発明の効果】以上のとおり、本発明によれば、あるプ
ロセスで生成したオブジェクトをパケット送信により他
のオブジェクトにも同じオブジェクトを生成、又は共有
メモリを使ってプロセス間でオブジェクトを共有するよ
うにしたため、各プロセスのオブジェクトの取り扱いが
所属するプロセス内に限定される場合にも、クラス定義
の伝播、クラス継承関係の伝播、インスタンスの生成伝
播、メソッド呼び出しの伝播などでオブジェクトの共有
ができる。
As described above, according to the present invention, an object generated in a certain process is generated in the other object by packet transmission, or the object is shared between processes using a shared memory. Therefore, even when the handling of the object of each process is limited to the process to which the process belongs, the object can be shared by the propagation of the class definition, the propagation of the class inheritance relationship, the propagation of the generation of the instance, the propagation of the method call, and the like.

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

【図1】本発明の実施形態を示すオブジェクトをプロセ
スで独立的に共有する方法。
FIG. 1 illustrates a method of independently sharing objects in a process according to an embodiment of the present invention.

【図2】本発明の他の実施形態を示すオブジェクトをプ
ロセス間で共有する方法。
FIG. 2 illustrates a method of sharing objects between processes according to another embodiment of the present invention.

【図3】オブジェクト指向プログラミングにおけるスレ
ッド、プロセス、ネットワークの関係図。
FIG. 3 is a diagram showing the relationship among threads, processes, and networks in object-oriented programming.

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

P1、P2、PN…プロセス S…スレッド 1S、1R…クラス・コンストラクタポインタテーブル 2S、2R…インスタンステーブル 3S、3R…インスタンス 4S、4R…仮想関数テーブル P…パケット M…共有メモリ P1, P2, PN: Process S: Thread 1S, 1R: Class / constructor pointer table 2S, 2R: Instance table 3S, 3R: Instance 4S, 4R: Virtual function table P: Packet M: Shared memory

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 オブジェクト指向プログラミング技術を
用いたコンピュータソフトウェアにおけるプロセス間で
オブジェクトを共有するにおいて、 あるプロセスがオブジェクトを生成したときに、該オブ
ジェクトのクラス名とインスタンス名及びオブジェクト
本体をパケット送信で他のプロセスに送信し、他のプロ
セスは受信したパケットと同じクラス名とインスタンス
名及びオブジェクト本体をもつオブジェクトを生成して
オブジェクトを共有することを特徴とするオブジェクト
の共有方法。
Claims 1. In sharing an object between processes in computer software using object-oriented programming technology, when a process generates an object, the class name and instance name of the object and the object body are transmitted by packet transmission to another process. And an other process generates an object having the same class name, instance name, and object body as the received packet and shares the object.
【請求項2】 オブジェクト指向プログラミング技術を
用いたコンピュータソフトウェアにおけるプロセス間で
オブジェクトを共有するにおいて、 あるプロセスが生成するオブジェクトをそのインスタン
スの実体が複数のプロセスのプロセス空間で見ることが
できる共有メモリ上に配置し、該生成したオブジェクト
のクラス名とインスタンス名及びオブジェクトアドレス
をパケット送信で他のプロセスに送信し、他のプロセス
は受信したパケットと同じクラス名とインスタンス名及
びオブジェクトアドレスから前記共有メモリ上のオブジ
ェクトを共有することを特徴とするオブジェクトの共有
方法。
2. In sharing an object between processes in computer software using object-oriented programming technology, an object generated by a certain process is placed on a shared memory in which an entity of the instance can be seen in a process space of a plurality of processes. And sends the generated object's class name, instance name, and object address to another process by packet transmission. The other process uses the same class name, instance name, and object address as the received packet on the shared memory. An object sharing method, characterized by sharing an object.
JP715397A 1997-01-20 1997-01-20 Method for sharing object Pending JPH10207709A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP715397A JPH10207709A (en) 1997-01-20 1997-01-20 Method for sharing object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP715397A JPH10207709A (en) 1997-01-20 1997-01-20 Method for sharing object

Publications (1)

Publication Number Publication Date
JPH10207709A true JPH10207709A (en) 1998-08-07

Family

ID=11658134

Family Applications (1)

Application Number Title Priority Date Filing Date
JP715397A Pending JPH10207709A (en) 1997-01-20 1997-01-20 Method for sharing object

Country Status (1)

Country Link
JP (1) JPH10207709A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7246135B2 (en) * 2001-01-08 2007-07-17 Intel Corporation Sharing classes between programs
JP2013542497A (en) * 2010-09-24 2013-11-21 インテル コーポレイション Sharing virtual functions in virtual memory shared among heterogeneous processors of computing platforms
JP2015038770A (en) * 2014-10-23 2015-02-26 インテル コーポレイション Sharing of virtual function in virtual memory shared between heterogeneous processors of calculation platform
JP2016157445A (en) * 2016-03-10 2016-09-01 インテル コーポレイション Sharing virtual functions in virtual memory shared between heterogeneous processors of computing platform

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7246135B2 (en) * 2001-01-08 2007-07-17 Intel Corporation Sharing classes between programs
JP2013542497A (en) * 2010-09-24 2013-11-21 インテル コーポレイション Sharing virtual functions in virtual memory shared among heterogeneous processors of computing platforms
US8997113B2 (en) 2010-09-24 2015-03-31 Intel Corporation Sharing virtual functions in a shared virtual memory between heterogeneous processors of a computing platform
JP2015038770A (en) * 2014-10-23 2015-02-26 インテル コーポレイション Sharing of virtual function in virtual memory shared between heterogeneous processors of calculation platform
JP2016157445A (en) * 2016-03-10 2016-09-01 インテル コーポレイション Sharing virtual functions in virtual memory shared between heterogeneous processors of computing platform

Similar Documents

Publication Publication Date Title
Bhatia et al. WebFlow–a visual programming paradigm for Web/Java based coarse grain distributed computing
Mullender et al. Amoeba: A distributed operating system for the 1990s
Burns et al. LAM: An open cluster environment for MPI
JP2544905B2 (en) Work station for collaborative work in network and method of collaborative work
EP1370968B1 (en) Computer architecture and software cells for broadband networks
US5555375A (en) Method and apparatus for network computer systems management group administration
JP2002505466A (en) Remote method invocation method and apparatus
Naef et al. The blue-c distributed scene graph
JP2001522115A (en) Method and apparatus for implementing an extensible authentication mechanism in a web application server
US20040216125A1 (en) Wireless device operating system (OS) application programmer's interface (API)
EP0816969A2 (en) Capability security for distributed object systems
JP2001522113A (en) Distributed web application server
JPH0922392A (en) Method and device for conspiracy between objects
WO2002001390A2 (en) Coordination-centric framework for software design in a distributed environment
Watson et al. An architecture for support of network operating system services
Chung et al. A mechanism for supporting client migration in a shared window system
KR100288843B1 (en) Object-oriented programming environment that provides object encapsulation via encryption
JPH10207709A (en) Method for sharing object
JP2002505491A (en) Apparatus and method for dynamic information certification in a distributed system
Watsen et al. Bamboo-supporting dynamic protocols for virtual environments
Anderson et al. The DASH project: An overview
Watabe et al. A distributed multiparty desktop conferencing system and its architecture
Fahmy et al. Communicable memory and lazy barriers for bulk synchronous parallelism in bspk
Jain et al. A Framework for the Non-Monolithic Implementation of Protocols in the x-kernel.
CN115277419B (en) Acceleration network starting method in service-free calculation