JPH02156332A - Inter-process shared code management method - Google Patents
Inter-process shared code management methodInfo
- Publication number
- JPH02156332A JPH02156332A JP63310827A JP31082788A JPH02156332A JP H02156332 A JPH02156332 A JP H02156332A JP 63310827 A JP63310827 A JP 63310827A JP 31082788 A JP31082788 A JP 31082788A JP H02156332 A JPH02156332 A JP H02156332A
- Authority
- JP
- Japan
- Prior art keywords
- shared
- compiled code
- code object
- data
- address
- 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
Landscapes
- Devices For Executing Special Programs (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、コンパイラが出力するコンパイルドコードオ
ブジェクトをインタプリタが実行、管理するような言語
プロセッサを1つのプロセスとして複数実行する情報処
理装置において、コンパイルドコードオブジェクトを複
数のインタプリタで共有することのできるプロセス間共
有コード管理方式に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an information processing apparatus that executes a plurality of language processors as one process in which an interpreter executes and manages compiled code objects output by a compiler. The present invention relates to an inter-process shared code management method that allows compiled code objects to be shared by multiple interpreters.
言語プロセッサの一方式として、例えば第5図に示すよ
うに、実行効率を向上させるためにソースプログラムを
翻訳してコンパイルドコードオブジェクト44を生成す
るコンパイラ42と、ソースプログラム以外に上記のコ
ンパイルドコードオブジェクト44の記憶域管理、実行
管理を行うインタプリタ41とを設けた言語プロセッサ
がある。As one method of a language processor, for example, as shown in FIG. 5, there is a compiler 42 that translates a source program to generate a compiled code object 44 in order to improve execution efficiency, and a compiler 42 that generates a compiled code object 44 in addition to the source program. There is a language processor provided with an interpreter 41 that manages the storage area and execution of objects 44.
このような言語プロセッサにおける従来のコンパイルド
コードオブジェクト44は、同図に示すように、成る種
のヘッダ情報(そのコンパイルドコードオブジェクトを
識別するための名前例えば関数名、サイズ等を含む)を
格納するヘッダ領域45と、機械語命令列の並びを格納
するl!械話語命令列領域46、インタプリタ41が生
成管理しているヒープ領域43に格納されているデータ
を機械語命令列領域46中の機械語命令から参照するた
めに使用するアドレスを格納するアドレス格納領域47
とを含む形式を有している。ここで、コンパビルドコー
ドオブジェクト44内からヒープ領域43上のデータを
参照する場合、ソースプログラムのコンパイル時にはヒ
ープ領域43上のデータのアドレスを決定することがで
きないので、インタプリタ41は、コンパイルドコード
オブジェクト44を記憶域空間40にロードする際にヒ
ープ領域43上のデータのアドレスを確定し、その確定
したアドレスをアドレス格納領域、47の予め定められ
た場所に格納するようにしている。従って、コンパイラ
42は、コンパイル時点ではコンパイルドコードオフ゛
ジェクト44内にヒープ領域43上のアドレスが確定で
きた時点でそのアドレスをインタプリタ41が格納する
為のアドレス格納領域47を設けておき、またそのアド
レス格納領域47のどの場所にどの機械語命令で参照す
るデータのアドレスを格納するかを予め決め、その場所
を経由してデータを参照するような構造の機械語命令を
生成している。A conventional compiled code object 44 in such a language processor stores various types of header information (including a name for identifying the compiled code object, such as a function name, size, etc.), as shown in the figure. A header area 45 for storing the sequence of machine language instructions, and l! for storing the sequence of machine language instruction sequences. Machine language instruction string area 46, address storage area for storing addresses used for referencing data stored in the heap area 43 generated and managed by the interpreter 41 from machine language instructions in the machine language instruction string area 46. 47
It has a format that includes. Here, when referring to data on the heap area 43 from within the compiler build code object 44, since the address of the data on the heap area 43 cannot be determined when compiling the source program, the interpreter 41 uses the compiled code object 44 into the storage space 40, the address of the data on the heap area 43 is determined, and the determined address is stored in a predetermined location in the address storage area 47. Therefore, at the time of compilation, the compiler 42 provides an address storage area 47 in the compiled code object 44 for the interpreter 41 to store the address when the address on the heap area 43 is determined, and also It is determined in advance in which location in the storage area 47 the address of data to be referenced by which machine language instruction is to be stored, and a machine language instruction having a structure such that the data is referenced via that location is generated.
例えば、コンパイルドコードオブジェクト44に対応す
るソースプログラムの中でヒープ領域43上のデータ4
9(“abc”なる文字列データ)を参照する機械語命
令がある場合、コンパイラ42は、データ49のヒープ
領域43上のアドレスをアドレス格納領域47の例えば
第3番目(3ワード目)の場所48に格納するように決
めると共に、その機械語命令として場所48を経由して
データを参照する命令を生成し、インタプリタ4Iでは
、コンパイルドコードオブジェクト44のロード時に、
データ49のヒープ領域43上のアドレスをその場所4
8に格納するものである。これによって、インタプリタ
41の解釈実行に際し使用されるペースレジスタRがコ
ンパイルドコードオブジェクト44の先頭をポイントし
、ヘッダ領域45+機械語命令列領域46の大きさをα
バイトとすると、ペースレジスタRからの相対位置が(
αハイド+3ワード目)となる領域48に格納されてい
るアドレスが、文字列“abc”のデータ49を指すポ
インタデータとなる。For example, data 4 on the heap area 43 in the source program corresponding to the compiled code object 44 is
9 (character string data “abc”), the compiler 42 sets the address of the data 49 on the heap area 43 to, for example, the third (third word) location in the address storage area 47. 48 and generates an instruction that refers to the data via the location 48 as a machine language instruction, and when the interpreter 4I loads the compiled code object 44,
The address on the heap area 43 of data 49 is set to location 4.
8. As a result, the pace register R used when interpreting and executing the interpreter 41 points to the beginning of the compiled code object 44, and the size of the header area 45 + machine language instruction string area 46 is set to α
If it is a byte, the relative position from the pace register R is (
The address stored in the area 48 (αhide+3rd word) becomes pointer data pointing to the data 49 of the character string “abc”.
(発明が解決しようとする課題〕
ところで、この種の言語プロセッサは1つのプロセスと
して他のプロセスと並行して情報処理装置で実行される
ものであり、情報処理装置によっては、そのような言語
プロセッサを複数個並行して実行するものがある。この
ようなとき、従来のコンパイルドコードオブジェクト管
理方式においては、コンパイルドコードオブジェクトか
らヒープ6N域上のデータを参照し得るようにする為に
、コンパイルドコードオブジェクトを記憶域空間に割り
付ける際にヒープ領域上のデータのアドレスを確定して
コンパイルドコードオブジェクトと一体化したアドレス
格納領域にそのアドレスを格納するような構造を採用し
ているため、個々のプロセスとして実行される複数のイ
ンタプリタでコンパイルドコードオブジェクトを共有す
ることができないという問題点があった。従って、記憶
域空間を有効に活用するようなシステムを構築すること
が困難であった。(Problem to be Solved by the Invention) By the way, this type of language processor is executed as one process in parallel with other processes in an information processing device, and depending on the information processing device, such a language processor In such cases, in the conventional compiled code object management method, in order to be able to refer to the data on the heap 6N area from the compiled code object, When a compiled code object is allocated to a storage space, the address of the data in the heap area is determined and the address is stored in the address storage area integrated with the compiled code object. There was a problem in that compiled code objects could not be shared among multiple interpreters executed as processes.Therefore, it was difficult to construct a system that effectively utilized storage space.
本発明はこのような事情に鑑みて為されたものであり、
その目的は、各インタプリタ間でコンパイルドコードオ
ブジェクトを共有することができるようにすることにあ
る。The present invention has been made in view of these circumstances,
Its purpose is to allow compiled code objects to be shared between each interpreter.
〔課題を解決するための手段〕
本発明のプロセス間共有コード管理方式は、上記の目的
を達成するために、複数プロセスの並列実行が可能で且
つプロセス間で共有できるプロセス間共有空間を有し、
ソースプログラムを翻訳するごとによりデータを参照す
る機械語命令を含むコンパイルドコードオブジェクトを
出力するコンパイラと前記コンパイルドコードオブジェ
クトを解釈実行するインタプリタとを含む言語プロセッ
サを1つのプロセスとして複数実行する情報処理装置に
おいて、プロセス間で共有するコンパイルドコードオブ
ジェクトを前記プロセス間共有空間に割り付け、この割
り付けられた共有コンパイルドコードオブジェクトを解
釈実行するインタプリタは、その共有コンパイルドコー
ドオブジェクト中の前記機械語命令が参照するデータに
相当する自ヒープ領域上のデータのアドレスを、自ヒー
プ領域上に生成したアドレス格納領域に格納し、このア
ドレス格納領域を使用して前記共有コンパイルドコード
オブジェクトの解釈実行を進める。[Means for Solving the Problems] In order to achieve the above object, the inter-process shared code management method of the present invention has an inter-process shared space that enables parallel execution of multiple processes and that can be shared among the processes. ,
Information processing that executes multiple language processors as one process, including a compiler that outputs a compiled code object containing machine language instructions that refer to data each time a source program is translated, and an interpreter that interprets and executes the compiled code object. In the apparatus, a compiled code object shared between processes is allocated to the inter-process shared space, and an interpreter that interprets and executes the allocated shared compiled code object recognizes that the machine language instruction in the shared compiled code object is The address of the data on the own heap area corresponding to the data to be referenced is stored in the address storage area generated on the own heap area, and this address storage area is used to advance the interpretation and execution of the shared compiled code object.
本発明のプロセス間共有コード管理方式においては、プ
ロセス間で共有するコンパイルドコードオブジェクトが
プロセス間共有空間に割り付けられることにより、その
共有コンパイルドコードオブジェクトを解釈実行する複
数のインタプリタによるコンパイルドコードオブジェク
ト中の機械語命令等の参照が可能となり、また各インタ
プリタが、その共有コンパイルドコードオブジェクト中
の@成語命令が参照するデータに相当する自ヒープ領域
上のデータのアドレスを、自ヒープ領域上に生成したア
ドレス格納領域に格納することにより、上記参照した共
有コンパイルドコードオブジェクト中の機械語命令によ
る自ヒープ領域上のデータの参照が個別に可能となる。In the inter-process shared code management method of the present invention, a compiled code object shared between processes is allocated to an inter-process shared space, so that a plurality of interpreters interpret and execute the shared compiled code object. It becomes possible to refer to machine language instructions, etc. in the shared compiled code object, and each interpreter stores the address of the data in its own heap area that corresponds to the data referenced by the @compound instruction in the shared compiled code object, in its own heap area. By storing in the generated address storage area, data on the own heap area can be individually referenced by machine language instructions in the referenced shared compiled code object.
次に、本発明の実施例について図面を参照して詳細に説
明する。Next, embodiments of the present invention will be described in detail with reference to the drawings.
第1図は本発明の一実施例の構成図である。同図におい
て、インタプリタ4−1とコンパイラ5−1とは一つの
言語プロセッサを構成し、インタプリタ4−2とコンパ
イラ5−2とは別の一つの言語プロセッサを構成する。FIG. 1 is a block diagram of an embodiment of the present invention. In the figure, an interpreter 4-1 and a compiler 5-1 constitute one language processor, and an interpreter 4-2 and a compiler 5-2 constitute another language processor.
インタプリタ4−1を含む言語プロセッサとインタプリ
タ4−2を含む言語プロセッサは、それぞれプロセスl
、プロセス2として、本発明が適用される情報処理装置
で並行して実行される。プロセス1には、インタプリタ
4−1が生成、管理しているヒープ領域9−1があって
、その中にインタプリタ4−1によって生成、管理され
るデータ11−1等が存在する。同様にプロセス2には
、インタプリタ4−2が生成、管理しているヒープ領域
9−2があって、その中にインタプリタ4−2によって
生成、管理されるデータ11−2等が存在する。プロセ
ス間共有空間3は、プロセスlとプロセス2との間で共
有される記憶域空間である。The language processor including the interpreter 4-1 and the language processor including the interpreter 4-2 are each a process l.
, as process 2, are executed in parallel by the information processing device to which the present invention is applied. The process 1 has a heap area 9-1 that is generated and managed by the interpreter 4-1, and there exists data 11-1 and the like that are generated and managed by the interpreter 4-1. Similarly, the process 2 has a heap area 9-2 generated and managed by the interpreter 4-2, in which data 11-2 and the like generated and managed by the interpreter 4-2 exist. Inter-process shared space 3 is a storage space shared between process 1 and process 2.
このような構成において、プロセスlとして動作するイ
ンタプリタ4−1及びプロセス2として動作するインタ
プラク4−2間でコンパイルドコードオブジェクトを共
有する場合、同図に示すように、共有するコンパイルド
コードオブジェクト6がプロセス間共有空間3に割り付
けられると共に、その共有コンパベルドコードオブジェ
クト6中の機械語命令が参照するデータに相当する自己
のデータ(インタプリタ4−1にあってはヒープ領域9
−1上のデータ11−1等、インタプリタ4−2にあっ
てはヒープ領域9−2上のデータ11−2等のデータ)
のアドレスを格納したアドレス格納領域10−1.10
−2を、それぞれのし−プ領域9−1.9−2に生成す
る。即ち、従来コンパイルドコードオブジェクトと一体
化されていたアドレス格納領域を機械語命令列を含むオ
ブジェクト本体から分離し、オブジェクト本体はコンパ
イルドコードオブジェクト6としてプロセス間共有空間
3に割り付け、アドレス格納領域は各インタプリタが生
成、管理するヒープ領域9−1゜9−2上におけるデー
タの存在アドレスに見合った内容にして個別に各ヒープ
領域9−1.9−2に設けるものである。このように、
機械語命令を含む本体をプロセス間共有空間3に割り付
けることにより複数のインタプリタ4−1.4−2から
の参照が可能となり、またアドレス格納領域を個別に設
けることにより、上記の機械語命令が参照するデータを
正しくアクセスすることが可能となり、コンパイルドコ
ードオブジェクトを複数のインタプリタで共有すること
ができる。なお、第1図の破線で示すデータ参照手段8
−1.8−2は、コンパイルドコードオブジェクト6か
ら各プロセス上のインタプリタ4−1.4−2が生成、
管理しているヒープ領域9−1.9−2上のデータ11
−1.11−2等を参照する手段を構成している。In such a configuration, when a compiled code object is shared between the interpreter 4-1 operating as process 1 and the interpreter 4-2 operating as process 2, the shared compiled code object 6 is shared as shown in the figure. is allocated to the inter-process shared space 3, and its own data (in the interpreter 4-1, the heap area 9
-1, data 11-1, etc. on interpreter 4-2, data 11-2, etc. on heap area 9-2)
Address storage area 10-1.10 that stores the address of
-2 is generated in each of the slope areas 9-1 and 9-2. That is, the address storage area that was conventionally integrated with the compiled code object is separated from the object body containing the machine language instruction sequence, the object body is allocated to the inter-process shared space 3 as the compiled code object 6, and the address storage area is The contents are individually provided in each heap area 9-1, 9-2 with contents commensurate with the existing addresses of data on the heap areas 9-1, 9-2, which are generated and managed by each interpreter. in this way,
By allocating the main body containing machine language instructions to the inter-process shared space 3, it can be referenced from multiple interpreters 4-1.4-2, and by providing individual address storage areas, the machine language instructions mentioned above can be Reference data can be accessed correctly, and compiled code objects can be shared by multiple interpreters. Note that the data reference means 8 indicated by the broken line in FIG.
-1.8-2 is generated by the interpreter 4-1.4-2 on each process from the compiled code object 6,
Data 11 on managed heap area 9-1.9-2
-1.11-2 etc. is constituted.
以下、本実施例の構成および動作をより詳細に説明する
。The configuration and operation of this embodiment will be explained in more detail below.
第2図はコンパイラ5−1.コンパイラ5−2が出力す
る共有コンパイルドコードオブジェクトの論理的な構成
例を示す、同図に示すようにコンパイルドコードオブジ
ェクトは、そのコンパイルドコードオブジェクトを識別
するための名前やサイズ等を含むヘッダ情報を格納する
ヘッダ領域21と、機械語命令24で例示する如くし−
プ領域上のデータを参照する機械語命令の並びを格納す
る機械語命令列領域22と、この機械語命令列領域22
中の機械語命令によって参照しているヒープ領域上のデ
ータを識別することができるデータ、例えばソースプロ
グラム上の形式と同じ外部形式のデータを所定の順序で
格納するアドレス生成用データ領域23とで構成される
。なお、上記機械語命令24は、文字列“abc”の先
頭アドレスをレジスタRxへ移送することを示す例えば
m。FIG. 2 shows the compiler 5-1. As shown in the figure, which shows an example of the logical structure of a shared compiled code object output by the compiler 5-2, a compiled code object has a header that includes a name, size, etc. for identifying the compiled code object. As exemplified by a header area 21 for storing information and a machine language instruction 24,
a machine language instruction string area 22 that stores a sequence of machine language instructions that refer to data on the tap area;
and an address generation data area 23 that stores data in a predetermined order that can identify the data on the heap area referenced by the machine language instructions inside, for example, data in the same external format as the format in the source program. configured. Note that the machine language instruction 24 is, for example, m, which indicates that the start address of the character string "abc" is to be transferred to the register Rx.
vc abc、Rxなるソース形式をコンパイルし
たものであり、 abc”のアドレスは後述するアド
レス格納領域の先頭の要素に格納するものと決めている
為、O(R)となっており、且つ、 abc”がアド
レス生成用データ領域23の先頭に格納されているもの
である。上記のアドレス生成用データ領域23は、当該
コンパイルドコードオブジェクトを解釈実行するインタ
プリタが後述するアドレス格納領域生成処理を行う際に
利用されるものである。It is a compilation of the source format vc abc, Rx, and the address of "abc" is determined to be stored in the first element of the address storage area described later, so it is O(R), and abc ” is stored at the beginning of the address generation data area 23. The address generation data area 23 is used when an interpreter that interprets and executes the compiled code object performs address storage area generation processing, which will be described later.
第3図は第1図のインタプリタ、ll−1,4−2が有
するコンパイルドコードオブジェクト割り付は手段7〜
1.7−2の処理の一例を示し、第4図は第1図のプロ
セス間共有空間3.プロセス1のヒープ領域9−1およ
びプロセス2のヒープ領域9−2を抜き出してより詳細
に図示したものである0次に、第3図および第4図を参
照して、各インタプリタ4−1.4−2が有するコンパ
イルドコードオブジェクト割り付は手段7−1.72の
動作を説明する。FIG. 3 shows the compiled code object allocation of the interpreter ll-1 and 4-2 shown in FIG.
1.7-2 is shown, and FIG. 4 shows an example of the processing of 3.7-2 in the inter-process shared space of FIG. Next, with reference to FIGS. 3 and 4, each interpreter 4-1. The compiled code object allocation that 4-2 has explains the operation of means 7-1.72.
コンパイルドコードオブジェクト割り付は手段7−1.
7−2は、コンパイルドコードオブジェクトのロード要
求が発生すると、ロードしたいコンパイルドコードオブ
ジェクト(これはコンパイラ5−1あるいは5−2が出
力したもので、図示しないファイル等に格納されている
)がプロセス間で共存するコンパイルドコードオブジェ
クトか否かをチエツクする(S 1 ) 、もしプロセ
ス間で共有しないコンパイルドコードオブジェクトであ
れば、自分自身のプロセス空間へ割り付ける(S2)、
プロセス間で共有するコンパイルドコードオブジェクト
の場合は、そのコンパイルドコードオブジェクトが既に
プロセス間共有空間3に割り付けられているか否かをチ
エツクする(S3)。Compiled code object allocation is performed by means 7-1.
7-2, when a request to load a compiled code object occurs, the compiled code object to be loaded (this is output by the compiler 5-1 or 5-2 and is stored in a file, etc. not shown) is Check whether the compiled code object coexists between processes (S1). If it is a compiled code object that is not shared between processes, allocate it to its own process space (S2).
In the case of a compiled code object shared between processes, it is checked whether the compiled code object has already been allocated to the interprocess shared space 3 (S3).
まだプロセス間共有空間3に割り付けられていなければ
、その共有コンパイルドコードオブジェクトをプロセス
間共有空間3に割り付け(S4)、そのコンパイルドコ
ードオブジェクト中の機械語命令列から自ヒープ領域9
−1.9−2上のデータの参照を解決するためアドレス
格納領域生成処理を行う(S5)、このアドレス格納領
域生成処理については後に詳述する。また、共有コンパ
イルドコードオブジェクトが既にプロセス間共有空間3
に割り付けられているときは、アドレス格納領域生成処
理だけを行う(S6)、従って、例えば成る共有コンパ
イルドコードオブジェクトのロード要求がインタプリタ
4−1で先に発生した場合、インタプリタ4−1はその
共有コンパイルドコードオブジェクトをプロセス間共有
空間3に割り付けると共に、自ヒープ領域9−1にアド
レス格納領域10−1を生成することになり、その後に
インタプリタ4−2でその共有コンパイルドコードオブ
ジェクトのロード要求が発生した場合には、既にプロセ
ス間共有空間3に割り付けられているので、インタプリ
タ4−2は自ヒープ領域10−2にアドレス格納領域1
0−2を生成するだけで良いことになる。これが、既に
プロセス間共有空間3に割り付けられている共有コンパ
イルドコードオブジェクトに対するロード処理となる。If it has not yet been allocated to the inter-process shared space 3, the shared compiled code object is allocated to the inter-process shared space 3 (S4), and the self-heap area 9 is allocated from the machine language instruction sequence in the compiled code object.
In order to resolve the data reference on -1.9-2, address storage area generation processing is performed (S5). This address storage area generation processing will be described in detail later. Also, if the shared compiled code object is already in the inter-process shared space 3
, only the address storage area generation processing is performed (S6). Therefore, for example, if a load request for a shared compiled code object occurs first in the interpreter 4-1, the interpreter 4-1 A shared compiled code object is allocated to the inter-process shared space 3, and an address storage area 10-1 is generated in the own heap area 9-1.Then, the interpreter 4-2 loads the shared compiled code object. When a request occurs, the interpreter 4-2 stores the address storage area 1 in its own heap area 10-2 because it has already been allocated to the inter-process shared space 3.
It is sufficient to generate 0-2. This is a load process for the shared compiled code object already allocated to the inter-process shared space 3.
次に、アドレス格納領域生成処理S5.S6について説
明する。このアドレス格納領域生成処理は、第4図に図
示した共有コンパビルドコードオブジェクト6中のアド
レス生成用データ領域63上に格納されているデータを
使用して行う、先ず、アドレス格納領域生成処理では、
プロセス間共有空間3に割り付けられたコンパベルドコ
ードオブジェクト6中のアドレス生成用データ領域63
に格納されているデータの個数に見合ったサイズのアド
レス格納領域10−1.10−2を自ヒープ領域9−1
.9−2に生成する0次に、アドレス生成用データ領域
63に格納されているデータをその先頭から順次に評価
し、そのデータに相当する自ヒープ領域9−1.9−2
上のデータのアドレスを求め、そのアドレスを上記生成
したアドレス格納領域10−1.10−2へその先頭の
要素から順番に書き込んでいく0例えば、第4図に示す
ように、アドレス生成用データ領域63の先頭に機械語
命令64が参照する文字列“abc”にかかるデータが
あって、プロセスlのヒープ領域9−1上ではそのデー
タ11−1がアドレスαに存在していたとすると、イン
タプリタ4−1によるアドレス格納領域生成処理では、
そのアドレスαをアドレス格納領域10−1の先頭の要
素(1バイト目)100−1に書き込むものである。ま
た、プロセス2のヒープ領域9−2では同じデータ11
−2がアドレスβに存在していたとすると、インタプリ
タ4−2のアドレス格納領域生成処理では、そのアドレ
スβをアドレス格納領域1〇−2の最初の要素(1バイ
ト目)too−2に格納するものである。このようにし
て、自ヒープ領域上のデータの存在するアドレスに見合
ったアドレス群を格納するアドレス格納領域を独自に生
成するものである。Next, address storage area generation processing S5. S6 will be explained. This address storage area generation process is performed using data stored in the address generation data area 63 in the shared comparator build code object 6 shown in FIG. 4. First, in the address storage area generation process,
Address generation data area 63 in the compatible code object 6 allocated to the inter-process shared space 3
Address storage area 10-1 and address storage area 10-2 of a size commensurate with the number of data stored in own heap area 9-1
.. Next, the data stored in the address generation data area 63 is evaluated sequentially from the beginning, and the own heap area 9-1.9-2 corresponding to the data is evaluated.
Find the address of the above data and write the address to the address storage area 10-1.10-2 generated above in order from the first element.0For example, as shown in FIG. Assuming that there is data related to the character string "abc" referred to by the machine language instruction 64 at the beginning of the area 63, and that data 11-1 exists at address α on the heap area 9-1 of process l, the interpreter In the address storage area generation process according to 4-1,
The address α is written into the first element (first byte) 100-1 of the address storage area 10-1. Also, in the heap area 9-2 of process 2, the same data 11
-2 exists at address β, in the address storage area generation process of interpreter 4-2, the address β is stored in the first element (first byte) too-2 of address storage area 10-2. It is something. In this way, an address storage area for storing a group of addresses corresponding to the address where data exists on the own heap area is independently generated.
さて、以上のようにして各ヒープ領域9−1゜9−2に
自プロセス専用のアドレス格納領域10−1.10−2
が出来上がると、各インタプリタ4−1.4−2はそれ
を使用して共有コンパイルドコードオブジェクト6の解
釈実行を進めることが可能となる0例えば第4図に示す
ようにコンパイルドコードオブジェクト6の機械語命令
列領域62における機械語命令rmove O(R)
RXJ (これは第2回で説明したように、文字列a
b c ” 領域の先頭アドレスをレジスタRxへ移
送することを示すmove abc、Rxのソース
形式をコンパイルした機械語命令である)のように、
abc”を参照している場合、どのプロセス上でもレジ
スタRが自分自身のアドレス格納領域10−1.10−
2の先頭を指すようにすれば、 abc”を指すアド
レスは各アドレス格納領域10−1.10−2の最初の
要素100−1,100−2に格納されることになって
いるので、レジスタRの指す場所から相対位置O番目の
領域すなわち要素100〜1,100−2からabc”
を指すアドレスを得ることができる。Now, as described above, address storage areas 10-1, 10-2 dedicated to the own process are created in each heap area 9-1 and 9-2.
Once completed, each interpreter 4-1.4-2 can use it to proceed with the interpretation and execution of the shared compiled code object 6. For example, as shown in FIG. Machine language instruction rmove O(R) in machine language instruction string area 62
RXJ (As explained in Part 2, this is the string a
b c ” move abc, which indicates to move the start address of the area to register Rx (this is a machine language instruction compiled from the source format of Rx),
abc", register R is in its own address storage area 10-1.10- on any process.
2, the address pointing to "abc" will be stored in the first element 100-1, 100-2 of each address storage area 10-1, 10-2, so the register abc” from the O-th area relative to the location pointed to by R, that is, elements 100 to 1,100-2
You can get the address pointing to .
これはプロセス1でもプロセス2でも共通であるため、
move O(R)、Rxとすることにより、プロセ
ス間共通とすることができる。This is common to both process 1 and process 2, so
By using move O(R) and Rx, it can be made common between processes.
以上説明したように、本発明のプロセス間共存コード管
理方式においては、各プロセスで共有するコンパイルド
コードオブジェクトをプロセス間共有空間に割り付け、
その共有コンパイルドコードオブジェクト中の機械語命
令で参照しているデータに相当する自ヒープ領域上のデ
ータのアドレスを、自ヒープ領域に独自に設けたアドレ
ス格納領域に格納したことにより、コンパイルドコード
オブジェクトを各プロセス上で動作するインタプリタで
共有することができる効果がある。これにより、インタ
プリタとコンパイラとから構成される言語プロセッサを
複数同時並行して実行させた’Jd合に、各言語プロセ
ッサ間でコンパイルドコードオブジェクトの共有が可能
となり、記憶域空間の効率的な使用、記憶域空間の消費
量の削減が可能となる。As explained above, in the inter-process coexistence code management method of the present invention, compiled code objects shared by each process are allocated to the inter-process shared space,
The compiled code This has the effect of allowing objects to be shared by interpreters running on each process. As a result, when multiple language processors consisting of interpreters and compilers are executed in parallel, compiled code objects can be shared among the language processors, resulting in efficient use of storage space. , it is possible to reduce the consumption of storage space.
第1図は本発明の一実施例の構成図、
第2図はコンパイラ5−1.5−2が出力する共有コン
パイルドコードオブジェクトの論理的な構成を示す図、
第3図はコンパイルドコードオブジェクト割り付は手段
7−’1.7−2の処理例の流れ図、第4図はプロセス
間共有空間6.各プロセスのヒープ領域をより詳細に示
す図および、第5図は従来方式の構成図である。
図において、
1.2・・・プロセス
3・・・プロセス間共有空間
4−1.4−2・・・インタプリタ
5−1 5−2・・・コンパイラ
6・・・コンパイルドコードオブジェクト7−1.7−
2・・・コンパイルドコードオブジェクト割り付は手段
8−1.8−2・・・データ参照手段
9−1.9−2・・・ヒープ領域
1(1−1,10−2・・・アドレス格納領域11−1
.11−2・・・データFig. 1 is a block diagram of an embodiment of the present invention; Fig. 2 is a diagram showing the logical structure of a shared compiled code object output by the compiler 5-1.5-2; Fig. 3 is a compiled code Object allocation is a flowchart of a processing example of means 7-'1.7-2, and FIG. 4 is an inter-process shared space 6. A diagram showing the heap area of each process in more detail and FIG. 5 are configuration diagrams of the conventional system. In the figure, 1.2...Process 3...Inter-process shared space 4-1.4-2...Interpreter 5-1 5-2...Compiler 6...Compiled code object 7-1 .7-
2... Compiled code object allocation means 8-1.8-2... Data reference means 9-1.9-2... Heap area 1 (1-1, 10-2... Address Storage area 11-1
.. 11-2...Data
Claims (1)
できるプロセス間共有空間を有し、ソースプログラムを
翻訳することによりデータを参照する機械語命令を含む
コンパイルドコードオブジェクトを出力するコンパイラ
と前記コンパイルドコードオブジェクトを解釈実行する
インタプリタとを含む言語プロセッサを1つのプロセス
として複数実行する情報処理装置において、 プロセス間で共有するコンパイルドコードオブジェクト
を前記プロセス間共有空間に割り付け、該割り付けられ
た共有コンパイルドコードオブジェクトを解釈実行する
インタプリタは、その共有コンパイルドコードオブジェ
クト中の前記機械語命令が参照するデータに相当する自
ヒープ領域上のデータのアドレスを、自ヒープ領域上に
生成したアドレス格納領域に格納し、該アドレス格納領
域を使用して前記共有コンパイルドコードオブジェクト
の解釈実行を進めることを特徴とするプロセス間共有コ
ード管理方式。[Claims] A computer that can execute multiple processes in parallel, has an inter-process shared space that can be shared between processes, and outputs a compiled code object that includes machine language instructions that refer to data by translating a source program. In an information processing device that executes a plurality of language processors as one process, each including a compiler that interprets and executes the compiled code object, and an interpreter that interprets and executes the compiled code object, the compiled code object that is shared between processes is allocated to the interprocess shared space, The interpreter that interprets and executes the allocated shared compiled code object generates in its own heap area the address of the data in its own heap area that corresponds to the data referenced by the machine language instruction in the shared compiled code object. An inter-process shared code management method characterized in that the shared compiled code object is stored in an address storage area, and the shared compiled code object is interpreted and executed using the address storage area.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63310827A JPH02156332A (en) | 1988-12-08 | 1988-12-08 | Inter-process shared code management method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63310827A JPH02156332A (en) | 1988-12-08 | 1988-12-08 | Inter-process shared code management method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH02156332A true JPH02156332A (en) | 1990-06-15 |
Family
ID=18009885
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP63310827A Pending JPH02156332A (en) | 1988-12-08 | 1988-12-08 | Inter-process shared code management method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH02156332A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0744372A (en) * | 1993-07-30 | 1995-02-14 | Nec Corp | Patch processing system for compiled code object |
-
1988
- 1988-12-08 JP JP63310827A patent/JPH02156332A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0744372A (en) * | 1993-07-30 | 1995-02-14 | Nec Corp | Patch processing system for compiled code object |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11175896B2 (en) | Handling value types | |
| US6029207A (en) | Apparatus and method for dynamic linking of computer software components | |
| KR100518584B1 (en) | Shared library system and method for constructing the system | |
| EP1955153B1 (en) | Method and apparatus for converting program code with access coordination for a shared resource | |
| US5812852A (en) | Software implemented method for thread-privatizing user-specified global storage objects in parallel computer programs via program transformation | |
| EP0620522A2 (en) | High performance dynamic linking through caching | |
| US20060095483A1 (en) | Modified computer architecture with finalization of objects | |
| JPH0256640A (en) | Reduction in access emulation to common block | |
| US10635472B2 (en) | Import mechanism for hardware intrinsics | |
| US6260191B1 (en) | User controlled relaxation of optimization constraints related to volatile memory references | |
| JP2000347876A (en) | Stack slot allocation method and apparatus | |
| Theobald et al. | Overview of the Threaded-C language | |
| US5062039A (en) | Sharing of workspaces in interactive processing using workspace name tables for linking of workspaces | |
| US6959430B2 (en) | Specialized heaps for creation of objects in object-oriented environments | |
| JPH02156332A (en) | Inter-process shared code management method | |
| US6789253B1 (en) | Method, system, and apparatus to improve performance of multi-threaded computer programs | |
| Namashivayam et al. | OpenSHMEM as a portable communication layer for PGAS models: a case study with coarray fortran | |
| JPH0660047A (en) | Multiprocessor processing unit | |
| JPH02156333A (en) | Inter-process shared code management method | |
| JPH064498A (en) | Multiprocessor | |
| JPS6234240A (en) | Data allotting system | |
| JP3239963B2 (en) | Multi-processor computer system | |
| JPH0535496A (en) | Inter-process shared data reference system | |
| Arvind et al. | A multithreaded substrate and compilation model for the implicitly parallel language pH | |
| Kaemmer et al. | Split objects for multiconsistent shared memory |