[go: up one dir, main page]

JPH09101899A - Procedure procedure method - Google Patents

Procedure procedure method

Info

Publication number
JPH09101899A
JPH09101899A JP7258480A JP25848095A JPH09101899A JP H09101899 A JPH09101899 A JP H09101899A JP 7258480 A JP7258480 A JP 7258480A JP 25848095 A JP25848095 A JP 25848095A JP H09101899 A JPH09101899 A JP H09101899A
Authority
JP
Japan
Prior art keywords
library
function
program
subroutine
processing
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
Application number
JP7258480A
Other languages
Japanese (ja)
Inventor
Mitsuyo Hasegawa
充世 長谷川
Kenzo Kobayashi
賢造 小林
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP7258480A priority Critical patent/JPH09101899A/en
Publication of JPH09101899A publication Critical patent/JPH09101899A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)
  • Multi Processors (AREA)

Abstract

(57)【要約】 【課題】マルチプロセスのコンピュータシステムにおい
て、ある機能をプログラムに提供する際、実処理を行な
うプロセス部と、このプロセスの起動,パラメータ送
信,復帰情報の受信を行なうライブラリ部とに分離して
処理を行なわせる。 【解決手段】マルチプロセスのコンピュータシステムに
おいて、ある機能を任意プログラムへ提供する際に、こ
のコンピュータシステムを、実処理を行なうプロセス部
2と、このプロセスの起動と、このプロセスへのパラメ
ータの送信と、このプロセスからの復帰情報の受信とを
行なうライブラリ部1とに分離し、当該機能を使用する
プログラムは、この機能を呼び出すインタフェースと同
一のライブラリ呼び出しインタフェースを用いてこのラ
イブラリを呼び出すことによって、当該機能を実行す
る。
(57) Abstract: In a multi-process computer system, when a certain function is provided to a program, a process section that performs actual processing, and a library section that starts this process, sends parameters, and receives return information. To separate and process. SOLUTION: In a multi-process computer system, when a certain function is provided to an arbitrary program, the computer system is provided with a process section 2 for performing actual processing, starting this process, and transmitting parameters to this process. , A library unit 1 for receiving return information from this process and a program using the function is called by using the same library call interface as the interface for calling this function. Perform a function.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、手続きのプロセス
化方式に関し、特にマルチプロセスのコンピュータシス
テムにおいて、ある機能をプログラムに提供する際に、
実処理を行なうプロセス部と、このプロセスの起動,パ
ラメータ送信,復帰情報の受信を行なうライブラリ部と
に分離したプログラム処理方式に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a procedure processing method, and in particular, in providing a certain function to a program in a multi-process computer system,
The present invention relates to a program processing system which is separated into a process section which performs actual processing and a library section which starts up this process, transmits parameters, and receives return information.

【0002】[0002]

【従来の技術】マルチプロセスのコンピュータシステム
において、ある機能を任意プログラムに提供する際に
は、通常、サブルーチンの形で提供する。この場合のサ
ブルーチンの形態としては、単独サブルーチンのみ含ま
れるオブジェクトファイル、または、複数サブルーチン
のオブジェクトをアーカイブしたライブラリファイルの
形態をとる。
2. Description of the Related Art In a multi-process computer system, when a certain function is provided to an arbitrary program, it is usually provided in the form of a subroutine. In this case, the form of the subroutine takes the form of an object file containing only a single subroutine or a library file in which objects of a plurality of subroutines are archived.

【0003】そしてこれらのサブルーチンを使用するた
めのソース上のインタフェースは、サブルーチンコール
であり、呼び出し元プログラムを実行可能にするために
は、呼び出し元プログラムと上述のオブジェクトファイ
ルとをリンケージする必要がある。
The interface on the source for using these subroutines is a subroutine call, and in order to make the calling source program executable, it is necessary to link the calling source program with the above-mentioned object file. .

【0004】図11は、従来の同一ホスト内におけるサ
ブルーチン提供を例示したものであって、呼び出し元プ
ログラムソースにおいて、func(a,b,c)のサ
ブルーチンコールを行なったとき、サブルーチンソース
におけるfunc(a,b,c)が、コンパイルリンク
の段階でリンケージされて、実行可能形式となることが
示されている。
FIG. 11 exemplifies the conventional provision of a subroutine in the same host. When a subroutine call of func (a, b, c) is made in the calling source program source, func (in the subroutine source is It has been shown that a, b, c) are linked into an executable form at the stage of compiling and linking.

【0005】また、ネットワークを介して他ホストに対
して任意プログラムを提供する場合は、従来、リモート
シェル等の技術が知られている。または独自手順の通信
プロトコルを持って実現する場合もある。
Further, in the case of providing an arbitrary program to another host via a network, a technique such as a remote shell has been conventionally known. Alternatively, it may be realized by using a communication protocol of an original procedure.

【0006】図12は、従来の他ホストへの機能提供の
例を示したものである。ホスト1から、リモートシェル
を利用して、LAN/WAN/INS等の通信回線を介
して、ホスト2に対して、コマンド名とパラメータを送
り、ホスト2においてサーバプログラムがこれを処理し
て、処理結果をホスト1に戻すことによって、サブルー
チンYYYを提供する。
[0006] FIG. 12 shows an example of conventional function provision to another host. Using the remote shell, the host 1 sends a command name and parameters to the host 2 via a communication line such as LAN / WAN / INS, and the server program in the host 2 processes this and processes it. The subroutine YYY is provided by returning the result to the host 1.

【0007】[0007]

【発明が解決しようとする課題】従来方式のサブルーチ
ン提供では、同一ホスト内の場合には、オペレーティン
グシステム(OS)がダイナミックリンク機能を有しな
い場合は、各呼び出し元プログラムが、プロセス単位で
それぞれ当該サブルーチンを内包することになるので、
実行のために必要になるメモリ容量が増えるとともに、
サブルーチンの内容を変更する際には、全プロセスにつ
いて再リンクを行なわなければならないという問題があ
った。これらは、サブルーチンが大きく、また同時使用
プロセス数が増加したとき、特に顕著となる。
In the conventional method of providing a subroutine, when the operating system (OS) does not have the dynamic link function in the same host, each calling source program is processed by the process unit. Since it contains a subroutine,
As the memory capacity required for execution increases,
When changing the contents of the subroutine, there was a problem that all processes had to be relinked. These become particularly noticeable when the subroutine is large and the number of concurrently used processes increases.

【0008】また他ホストのサブルーチン提供の場合に
は、リモートシェルのような、標準的インタフェースを
使用する場合、入出力可能な情報に制限があった。例え
ば、入力にメモリブロックを渡すことや、復帰値として
メモリブロックを得ることは、リモートシェルでは不可
能である。また独自インタフェースを使用する場合に
は、インタフェースを個々に設計する必要があり、開発
効率が悪いという問題ががあった。
In the case of providing a subroutine of another host, when a standard interface such as a remote shell is used, the information that can be input / output is limited. For example, passing a memory block as an input or obtaining a memory block as a return value is impossible with a remote shell. In addition, when using a unique interface, it is necessary to design each interface individually, and there is a problem that development efficiency is poor.

【0009】本発明は、このような従来技術の課題を解
決しようとするものであって、マルチプロセスのコンピ
ュータシステムにおいて、ある機能を任意プログラムに
提供する際に、任意プログラムに提供したい機能を、実
処理を行なうプロセスと、プロセスの起動,パラメータ
の送信,復帰情報の受信を行なうライブラリとに分離す
ることによって、このような問題を解決することを目的
としている。
The present invention is intended to solve such a problem of the prior art, and in a multi-process computer system, when a certain function is provided to an arbitrary program, the function desired to be provided to the arbitrary program is The purpose is to solve such a problem by separating the process that performs actual processing from the library that performs process startup, parameter transmission, and return information reception.

【0010】[0010]

【課題を解決するための手段】本発明においては、任意
プログラムへ提供したい機能を、実処理を行なうプロセ
スと、このプロセスの起動,パラメータの送信,復帰情
報の受信を行なうライブラリとに分離する。
In the present invention, the function to be provided to an arbitrary program is divided into a process for performing actual processing and a library for starting this process, transmitting parameters, and receiving return information.

【0011】図1は、本発明の動作原理を示したもので
あって、1はライブラリ部、2はプロセス部をそれぞれ
示している。図1は、プロセスAがライブラリ部の処理
を行ない、プロセスBがプロセス部の処理を行なう場合
の、それぞれの動作のフローを示したものである。
FIG. 1 shows the operating principle of the present invention, where 1 is a library section and 2 is a process section. FIG. 1 shows a flow of respective operations in the case where the process A processes the library part and the process B processes the process part.

【0012】本発明方式においては、従来方式によるサ
ブルーチンをfunc(a,b,c)としたとき、ライ
ブラリ部とプロセス部との処理分担を次のようにする。
In the system of the present invention, when the subroutine of the conventional system is func (a, b, c), the processing division between the library section and the process section is as follows.

【0013】(a) ライブラリ部の処理(プロセスA) プロセス部を起動する。 パラメータ情報をプロセス間通信を介してプロセス
部へ送信する。 プロセス部からの処理結果をプロセス間通信を介し
て受信する。 受信情報を変換して、呼び出し元に復帰する。
(A) Processing of library section (process A) The process section is started. The parameter information is transmitted to the process section via interprocess communication. The processing result from the process unit is received via interprocess communication. Converts the received information and returns to the caller.

【0014】(b) プロセス部の処理(プロセスB) ライブラリ部からの入力情報を受信する。 func(a,b,c)を実行する。 実行結果を変換して、ライブラリ部へ送信する。(B) Process of process section (process B) Input information is received from the library section. execute func (a, b, c). The execution result is converted and sent to the library section.

【0015】また、ライブラリfunc’()の呼び出
しインタフェースは、サブルーチンfunc()の呼び
出しインタフェースと同一とする。
The calling interface of the library func '() is the same as the calling interface of the subroutine func ().

【0016】上記の構造をとった場合、可変となる処理
部分は、入出力情報の送受信処理と実処理を行なう部分
である。これらの可変部分は、func(a,b,c)
のインタフェースに依存する部分であって、このインタ
フェース情報を与えることによって、可変部分のプログ
ラムソースコードを自動生成することができる。
When the above-mentioned structure is adopted, the variable processing part is a part for performing input / output information transmission / reception processing and actual processing. These variable parts are func (a, b, c)
, Which is a part depending on the interface, can supply the interface information to automatically generate the program source code of the variable part.

【0017】本発明によれば、実処理部を別プロセスと
して分離するので、各呼び出し元プロセスが、同一サブ
ルーチンの実処理部分を内包する必要がなくなる。この
場合、呼び出し側プログラムから見ると、従来のサブル
ーチン呼び出しと同じである。
According to the present invention, since the actual processing part is separated as a separate process, each calling process does not need to include the actual processing part of the same subroutine. In this case, the calling program sees the same as a conventional subroutine call.

【0018】すなわち、可変となる処理部分の自動生成
が可能になるので、設計者は、従来と同じサブルーチン
設計作業のみを行なえばよく、プロセス間通信等の設計
と作成は不要であって、上述の構造をとることによる工
数は、殆ど発生しないという利点がある。
That is, since it becomes possible to automatically generate a variable processing part, the designer only has to perform the same subroutine design work as in the conventional case, and the design and creation of interprocess communication etc. are not required. There is an advantage that man-hours due to adopting the structure of (2) hardly occur.

【0019】以下、本発明の課題を解決するための、具
体的手段を掲げる。
Specific means for solving the problems of the present invention will be given below.

【0020】(1) マルチプロセスのコンピュータシステ
ムにおいて、ある機能を任意プログラムへ提供する際
に、コンピュータシステムを、実処理を行なうプロセス
部2と、このプロセスの起動と、このプロセスへのパラ
メータの送信と、このプロセスからの復帰情報の受信と
を行なうライブラリ部1とに分離し、当該機能を使用す
るプログラムは、この機能を呼び出すインタフェースと
同一のライブラリ呼び出しインタフェースを用いてこの
ライブラリを呼び出すことによって、当該機能を実行す
る。
(1) In a multi-process computer system, when a certain function is provided to an arbitrary program, the computer system performs a process section 2 for performing actual processing, starting this process, and sending parameters to this process. And a library unit 1 that receives return information from this process, and a program that uses the function calls this library by using the same library call interface as the interface that calls this function. Perform the function.

【0021】(2) (1) の場合のライブラリ部1とプロセ
ス部2とを、当該機能のインタフェース情報を与えてサ
ブルーチンソースから自動生成することによって、任意
のサブルーチンを、ライブラリルーチンと実処理プロセ
スとからなるプログラム構造によって提供する。
(2) In the case of (1), the library unit 1 and the process unit 2 are automatically generated from the subroutine source by giving the interface information of the function concerned, so that an arbitrary subroutine can be generated as a library routine and an actual processing process. It is provided by a program structure consisting of and.

【0022】(3) (1) の場合に、プロセス部を、ライブ
ラリ部となるホストとネットワークを介して接続された
他のホストに置いて実処理を行なわせる。
(3) In the case of (1), the process section is placed in another host connected to the library section host via a network to perform actual processing.

【0023】(4) (3) の場合のライブラリ部とプロセス
部とを、当該機能のインタフェース情報を与えてサブル
ーチンソースから自動生成することによって、任意のサ
ブルーチンを、一方のホストで動作するライブラリルー
チンと、他方のホストで動作する実処理プロセスとから
なるプログラム構造によって提供する。
(4) A library routine and a process section in the case of (3) are automatically generated from a subroutine source by giving interface information of the function concerned, so that an arbitrary subroutine can be run on one host. And a program structure consisting of an actual processing process running on the other host.

【0024】[0024]

【発明の実施の形態】以下、本発明の実施形態(1) を説
明する。なお、説明の都合上、プロセスのソースコード
は、C言語で記述する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiment (1) of the present invention will be described below. For convenience of description, the source code of the process is described in C language.

【0025】まず、サブルーチンへの入出力情報を、プ
ロセス間通信で送受信するためのフォーマットを規定す
る。図2は、本発明の実施形態(1) におけるサブルーチ
ン入出力情報の変換を示したものである。
First, a format for transmitting / receiving the input / output information to / from the subroutine by interprocess communication is defined. FIG. 2 shows conversion of subroutine input / output information in the embodiment (1) of the present invention.

【0026】サブルーチンへの入力は、値を渡すもの
と、メモリアドレスを渡すものとがある。図2に示す関
数func()では、p1は値渡し、*P2,*P3は
アドレス渡しを示し、A,Bは*P2,*P3に対応す
るアドレスであって、,はアドレスA,Bのデータ
サイズである。パラメータが値渡しのときは、それを示
す0と、パラメータ値が入力される。一方、パラメータ
がアドレス渡しのときは、データサイズとそのオフセッ
トとが入力される。
The inputs to the subroutine include passing a value and passing a memory address. In the function func () shown in FIG. 2, p1 indicates passing by value, * P2 and * P3 indicate passing by address, A and B are addresses corresponding to * P2 and * P3, and are of addresses A and B. This is the data size. When the parameter is passed by value, 0 indicating it and the parameter value are input. On the other hand, when the parameter is an address, the data size and its offset are input.

【0027】またサブルーチンからの出力は、C言語で
いうところの関数値のように、処理結果を値で返すもの
と、サブルーチン呼び出し時に指定されたメモリアドレ
ス上に、結果を書き込んで復帰するものとがある。図2
において、関数値は、サブルーチンにおける処理結果の
情報を示している。
The output from the subroutine is that the processing result is returned as a value like a function value in C language, and that the result is written and restored on the memory address specified at the time of calling the subroutine. There is. FIG.
In, the function value indicates information on the processing result in the subroutine.

【0028】これらのパラメータを、図2に示されたフ
ォーマットでメモリブロック化して、これをプロセスと
の送受信データとして用いる。
These parameters are formed into a memory block in the format shown in FIG. 2 and used as transmission / reception data with the process.

【0029】次に同一ホスト内のサブルーチン提供の場
合の実施形態として、プロセス間通信にソケットペアを
使用した場合の、プログラム構成について説明する。図
3は、ソケットペアを用いた場合のプログラム構成を示
したものである。
Next, as an embodiment in the case of providing a subroutine in the same host, a program configuration when a socket pair is used for interprocess communication will be described. FIG. 3 shows the program structure when a socket pair is used.

【0030】呼び出し元プロセスは、ライブラリfun
c’()を呼び出す。func’()は、サブルーチン
func()と同一の呼び出しインタフェースを持って
いる。その後、ライブラリ部とプロセス部は、それぞれ
以下のような処理を行なう。
The calling process is a library fun.
Call c '(). func '() has the same call interface as the subroutine func (). After that, the library unit and the process unit each perform the following processing.

【0031】(a) ライブラリ部の処理(呼出元プロセ
ス) 呼び出し元プログラムからの入力情報を、上述のフ
ォーマットに変換する。 プロセス部を起動する。 ソケットペアを生成し、で変換された呼び出し元
プログラムからの入力情報をソケットペアへライトす
る。 プロセス部における処理結果をソケットペアからリ
ードする。 受信情報を逆変換して、呼び出し元へ復帰する。
(A) Processing of library unit (calling source process) Input information from the calling source program is converted into the above-mentioned format. Start the process part. Create a socket pair, and write the input information from the calling program converted in to the socket pair. The processing result in the process unit is read from the socket pair. It reverses the received information and returns to the caller.

【0032】(b) プロセス部の処理 ライブラリ部からの入力情報を、ソケットペアから
リードする。 受信データを(a) のと逆変換する。 func(a,b,c)を実行する。 実行結果を上述のフォーマットに変換して、ライブ
ラリ部へ送信する。
(B) Input information from the processing library section of the process section is read from the socket pair. The received data is converted back to that in (a). execute func (a, b, c). The execution result is converted into the above format and transmitted to the library section.

【0033】次に、func()ソースファイルおよび
func()のパラメータ情報から、上述の構成を持つ
プログラムを自動生成する方法について説明する。自動
生成が必要になる部分、すなわちfunc()のインタ
フェースによって可変となる部分は、(a)-, (a)-,
(a)-と、(b)-, (b)-, (b)-である。
Next, a method for automatically generating a program having the above-mentioned configuration from the func () source file and the parameter information of func () will be described. The parts that need to be automatically generated, that is, the parts that can be changed by the func () interface are (a)-, (a)-,
(a)-and (b)-, (b)-, (b)-.

【0034】まず、func()の各パラメータ情報を
得るために、当該情報を設計者が入力するためのHMI
(Human Machine Interface)を自動生成ツールに設け
る。
First, in order to obtain each parameter information of func (), an HMI for the designer to input the information.
(Human Machine Interface) is provided in the automatic generation tool.

【0035】パラメータと送受信データとの相互の変換
の際に必要になるデータは、データフォーマットから明
らかなように、func()の各パラメータのデータ形
式、および値渡しと、アドレス渡しの種別である。ま
た、プロセスの起動に必要な情報は、プロセス名称、サ
ブルーチン呼び出しに必要な情報は、サブルーチン名称
である。
As is clear from the data format, the data required for the mutual conversion between the parameter and the transmission / reception data is the data format of each parameter of func (), and the type of value passing and address passing. . The information necessary for starting the process is the process name, and the information required for calling the subroutine is the subroutine name.

【0036】これらの入力値および入力値から導かれる
パラメータ数,アドレス渡しデータの総バイト数を、メ
モリ上またはファイルに記録する。
The input value, the number of parameters derived from the input value, and the total number of bytes of the address passing data are recorded in a memory or a file.

【0037】図4は、HMIによるパラメータ情報入力
の例を示したものであって、HMIと記憶内容との対応
を示している。図中において、各パラメータ情報に0を
入力した場合は値渡しを示し、0以外のときはアドレス
渡しであって、入力された数値が、データサイズである
と解釈するものとする。
FIG. 4 shows an example of parameter information input by the HMI and shows the correspondence between the HMI and the stored contents. In the figure, when 0 is input to each parameter information, passing by value is shown, and when other than 0, passing by address is performed, and the input numerical value is interpreted as the data size.

【0038】プログラム自動生成ツールでは、記憶され
た情報を元に、ソースコード自動生成を行なう。
The automatic program generation tool automatically generates the source code based on the stored information.

【0039】(A) ライブラリ部 ワーク用ファイルに、以下のソースコードを順に追記す
る。なお、以下において、固定処理部については説明を
省略する。
(A) Library part The following source code is added to the work file in order. In the following, the description of the fixed processing unit will be omitted.

【0040】(a)- 図5は、ソースコード生成プログラムの例を示したもの
であって、UNIXのshプログラムの例と、それに対
応する生成結果とを示したものである。また図6は、ソ
ースコード生成結果を示している。
(A)-FIG. 5 shows an example of a source code generation program, and shows an example of a UNIX sh program and a generation result corresponding thereto. FIG. 6 shows the source code generation result.

【0041】・記憶情報のアドレス渡しデータの総バイ
ト数とパラメータ数とを元に、送受信フォーマットに必
要なメモリ領域(以下、送信メモリという)を獲得する
ソースコード(図5(ア))。 ・送信メモリにパラメータ数を設定するソースコード
(図5(イ))。 ・送信メモリに所定のフォーマットで全パラメータをコ
ピーするソースコード(図5(ウ))。
A source code (FIG. 5A) for acquiring a memory area required for the transmission / reception format (hereinafter referred to as a transmission memory) based on the total number of bytes of the address passing data of the storage information and the number of parameters. -Source code that sets the number of parameters in the transmission memory (Fig. 5 (a)). -Source code that copies all parameters in a specified format to the transmission memory (Fig. 5 (c)).

【0042】図5,図6の例では、パラメータ情報とし
て、図4に示されたものを使用し、本情報が格納されて
いるファイル名が、シェル変数PARAFILEに既に
格納されているものとし、本情報のうち、アドレス渡し
の総バイト数は、シェル変数PDATALENに既に格
納されているものとする。また、可変数パラメータを扱
うC標準ライブラリのvarargsを使用している。
In the examples of FIGS. 5 and 6, the information shown in FIG. 4 is used as the parameter information, and the file name in which this information is stored is already stored in the shell variable PARAFILE. In this information, the total number of bytes passed by address is already stored in the shell variable PDATALEN. Also, varargs of C standard library that handles a variable number of parameters is used.

【0043】(a)- ・記憶情報内のプロセス名を元に、この名称のプロセス
を起動するソースコード。 (a)- ・受信情報を全パラメータへコピーし直すソースコー
ド。
(A) -A source code for starting a process with this name based on the process name in the stored information. (a)-・ Source code that copies the received information to all parameters again.

【0044】(B) プロセス部 図7は、本発明の実施形態(1) におけるプロセス部自動
生成用テンプレートを示したものであって、プロセス部
ソースコードを自動生成するために用いられるものを示
し、可変部分にキーワードを埋め込んだソースファイル
からなっている。
(B) Process part FIG. 7 shows a template for automatically generating a process part in the embodiment (1) of the present invention, which is used for automatically generating a process part source code. , It consists of a source file with keywords embedded in the variable part.

【0045】キーワードとなるのは、パラメータ数を示
すPARAMETERCOUNT(図7(ア))、アド
レス渡しパラメータの総バイト数を示すPARAMET
ERDLEN(図7(イ))、および関数呼び出し処理
を示すFUNCTION CALL(図7(ウ))であ
る。
The keyword is the number of parameters.
SU PARAMETERCOUNT (Fig. 7 (a)), ad
PARAMET indicating the total number of bytes of the non-pass parameter
ERDREN (Fig. 7 (a)) and function call processing
FUNCTION indicating CALL (Fig. 7 (c))
You.

【0046】自動生成ツールは、記録情報内のパラメー
タ数やサブルーチン名を読みだし、これらのキーワード
部分を修正して、プロセス部のソースファイルを生成す
る。
The automatic generation tool reads out the number of parameters and the name of the subroutine in the recorded information, corrects these keyword parts, and creates the source file of the process part.

【0047】図8は、テンプレートにおけるキーワード
部分の修正を説明するものである。PARAMETER
COUNTの場合は、パラメータ数に置き替える(単純
置換)。例えばパラメータ数が3のとき、図8(a) に示
すようになる。PARAMETERDLENの場合は、
アドレス渡しパラメータの総バイト数に置き替える(文
字列の単純置換)。例えばパラメータ数が384のと
き、図8(b) に示すようになる。FUNCTION
ALLの場合は、図8(d) に示す要領でサブルーチン呼
び出し部分の文字列を作成した結果を置き替えることに
よって、図8(c)に示すようになる。
FIG. 8 explains the correction of the keyword portion in the template. PARAMETER
In the case of COUNT, replace with the number of parameters (simple replacement). For example, when the number of parameters is 3, it becomes as shown in FIG. In the case of PARAMETERDLEN,
Replace with the total number of bytes of the address passing parameter (simple replacement of character string). For example, when the number of parameters is 384, it becomes as shown in FIG. FUNCTION C
In the case of ALL, by replacing the result of creating the character string of the subroutine calling portion in the manner shown in FIG. 8 (d), the result becomes as shown in FIG. 8 (c).

【0048】図9は、実施形態(1) によるファイル関連
を示したものであって、前述の (A) に示すライブラリ
部の処理結果、生成されたソースファイルをfunc
1,cとし、 (B) に示すプロセス部の処理結果、生成
されたソースファイルをfunc p,cとし、元とな
るサブルーチンのソースファイルをfunc.cとした
とき、実行に必要な形式のファイルを作成するまでのフ
ァイル関連を示している。
FIG. 9 shows the file association according to the embodiment (1), in which the source file generated as a result of the processing of the library section shown in (A) above is a func.
1, c, and the source file generated as a result of the processing of the process part shown in (B) is func. p and c, and the source file of the original subroutine is func. In the case of c, the file relations until the file of the format required for execution is created are shown.

【0049】図9において、点線枠内は、func()
のインタフェースが変わらない限り、変更不要である。
なお、func()機能を使用するプログラムは、fu
nc 1,oをリンクする。func 1,o内の関数名
は、実体の関数名と同じとするが、処理は異なる。
In FIG. 9, the inside of the dotted line frame is func ().
No change is required unless the interface of is changed.
A program that uses the func () function is fu
nc Link 1, o. func Function name in 1, o
Is the same as the actual function name, but the processing is different.

【0050】図10は、本発明の実施形態(2) の動作を
説明するものであって、ソケットを用いて、プロセス部
を別ホスト上で動作させる場合を示している。
FIG. 10 is a diagram for explaining the operation of the embodiment (2) of the present invention, and shows a case where a process unit is operated on another host by using a socket.

【0051】図10に示された形態が実施形態(1) と異
なる点は、パラメータの送受信処理部分と、プロセス部
の起動処理部分である。また、どのホスト内のプロセス
を起動するのかを指定する手段が新たに必要となる。
The embodiment shown in FIG. 10 differs from the embodiment (1) in the parameter transmission / reception processing portion and the process portion activation processing portion. In addition, a new means for specifying in which host the process is to be started is required.

【0052】ホストの指定方法としては、定義ファイル
による方法や、呼び出し元プロセスに環境変数として設
定する方法等が考えられるが、ここでは、定義ファイル
を使用する方法で説明する。
As a method of specifying the host, a method using a definition file, a method of setting an environment variable in the calling process, and the like are conceivable. Here, a method of using the definition file will be described.

【0053】他ホストのプロセスを起動するために、被
起動ホスト内に、プロセス起動受け付け用のサーバプロ
グラム(以下、単にサーバという)を設ける。サーバ
は、ライブラリ部からのソケット接続を監視する。
In order to start the process of another host, a server program for accepting the process start (hereinafter, simply referred to as a server) is provided in the host to be started. The server monitors the socket connection from the library section.

【0054】ライブラリ部は、上記の定義ファイルから
接続先ホスト名を読み出し、ソケット接続処理を行な
う。接続が確立したのち、ライブラリ部分は、起動する
プロセス名称をソケットに送信する。
The library section reads the connection destination host name from the above definition file and performs socket connection processing. After the connection is established, the library part sends the name of the process to start to the socket.

【0055】サーバは、この情報を受信したとき、自ホ
スト内にあるプロセスを起動して、接続中のソケットポ
ートを、そのプロセスに繋ぎ替える。
When the server receives this information, the server starts a process in its own host and switches the socket port being connected to the process.

【0056】パラメータの送受信処理は、実施形態(1)
における、ソケットペアへのリード/ライトを、送信/
受信に置き換えるだけでよい。
The parameter transmission / reception process is performed in the embodiment (1).
Send / read read / write to socket pair
All you have to do is replace it with reception.

【0057】[0057]

【発明の効果】以上説明したように本発明によれば、次
のような効果が得られる。 (1) 同一ホスト内の処理の場合 本発明方式によれば、処理の実行に必要なメモリ容量を
削減することができる。これは、リンクすべきライブラ
リは、定型の小規模プログラムのみであるからである。
また、パラメータ数,パラメータタイプ,入出力メモリ
サイズ等の、サブルーチンの呼び出しインタフェースの
変更がない限り、実処理部分の変更を行なう場合には、
プロセス部のみ変更すればよく、呼び出し元プロセスに
手を加える必要がない。従って、実処理部分の規模が大
きく、また汎用的であるとき、すなわち、多くのプロセ
スが使用するとき、より効果が大きい。
As described above, according to the present invention, the following effects can be obtained. (1) In the case of processing within the same host According to the method of the present invention, it is possible to reduce the memory capacity required for executing the processing. This is because the library to be linked is only a small fixed program.
In addition, unless the subroutine call interface such as the number of parameters, parameter type, input / output memory size, etc. is changed, when changing the actual processing part,
Only the process part needs to be changed, and there is no need to change the calling process. Therefore, it is more effective when the scale of the actual processing part is large and general, that is, when many processes are used.

【0058】(2) 他ホストによる処理の場合 他ホスト内にあるプログラムを、サブルーチン呼び出し
のイメージで使用することができるので、処理分散を図
ることが容易になる。従って、システム設計の柔軟度が
高くなるという利点がある。
(2) Processing by another host Since the program in the other host can be used as an image of calling a subroutine, the processing can be distributed easily. Therefore, there is an advantage that flexibility of system design is increased.

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

【図1】本発明の動作原理を示す図である。FIG. 1 is a diagram showing the operation principle of the present invention.

【図2】本発明の実施形態(1) におけるサブルーチン入
出力情報の変換を示す図である。
FIG. 2 is a diagram showing conversion of subroutine input / output information in the embodiment (1) of the present invention.

【図3】ソケットペアを用いた場合のプログラム構成を
示す図である。
FIG. 3 is a diagram showing a program configuration when a socket pair is used.

【図4】HMIによるパラメータ情報入力の例を示す図
である。
FIG. 4 is a diagram showing an example of parameter information input by HMI.

【図5】ソースコード生成プログラムの例を示す図であ
る。
FIG. 5 is a diagram showing an example of a source code generation program.

【図6】ソースコード生成結果を示す図である。FIG. 6 is a diagram showing a source code generation result.

【図7】本発明の実施形態(1) におけるプロセス部自動
生成用テンプレートを示す図である。
FIG. 7 is a diagram showing a template for automatic process part generation according to the embodiment (1) of the present invention.

【図8】テンプレートにおけるキーワード部分の修正を
説明する図である。
FIG. 8 is a diagram illustrating correction of a keyword portion in a template.

【図9】実施形態(1) によるファイル関連を示す図であ
る。
FIG. 9 is a diagram showing file association according to the embodiment (1).

【図10】本発明の実施形態(2) の動作を説明する図で
ある。
FIG. 10 is a diagram illustrating the operation of the embodiment (2) of the present invention.

【図11】従来の同一ホスト内におけるサブルーチン提
供を例示する図である。
FIG. 11 is a diagram exemplifying conventional provision of a subroutine in the same host.

【図12】従来の他ホストへの機能提供の例を示す図で
ある。
FIG. 12 is a diagram showing an example of conventional function provision to another host.

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

1 ライブラリ部 2 プロセス部 1 library section 2 process section

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 マルチプロセスのコンピュータシステム
において、ある機能を任意プログラムへ提供する際に、 該コンピュータシステムを実処理を行なうプロセス部
と、該プロセスの起動と、該プロセスへのパラメータの
送信と、該プロセスからの復帰情報の受信とを行なうラ
イブラリ部とに分離し、 当該機能を使用するプログラムは、該機能を呼び出すイ
ンタフェースと同一のライブラリ呼び出しインタフェー
スを用いて該ライブラリを呼び出すことによって、当該
機能を実行することを特徴とする手続きのプロセス化方
式。
1. In a multi-process computer system, when a certain function is provided to an arbitrary program, a process unit for actually performing the computer system, starting the process, and transmitting parameters to the process, A program that separates the function into a library part that receives return information from the process and uses the function is called by a program that calls the library using the same library call interface as the interface that calls the function. A method of processing a procedure characterized by being executed.
【請求項2】 請求項1に記載のライブラリ部とプロセ
ス部とを当該機能のインタフェース情報を与えてサブル
ーチンソースから自動生成することによって、任意のサ
ブルーチンをライブラリルーチンと実処理プロセスとか
らなるプログラム構造によって提供することを特徴とす
る手続きのプロセス化方式。
2. A program structure including a library routine and an actual processing process for automatically generating a library part and a process part according to claim 1 from a subroutine source by giving interface information of the function concerned. Procedural process method characterized by being provided by.
【請求項3】 請求項1に記載の手続きのプロセス化方
式において、前記プロセス部を、前記ライブラリ部とな
るホストとネットワークを介して接続された他のホスト
に置いて実処理を行なわせることを特徴とする手続きの
プロセス化方式。
3. The process method of claim 1, wherein the process unit is placed in another host connected to the library unit host via a network for actual processing. A method of processing the characteristic procedure.
【請求項4】 請求項3に記載のライブラリ部とプロセ
ス部とを当該機能のインタフェース情報を与えてサブル
ーチンソースから自動生成することによって、任意のサ
ブルーチンを、一方のホストで動作するライブラリルー
チンと、他方のホストで動作する実処理プロセスとから
なるプログラム構造によって提供することを特徴とする
手続きのプロセス化方式。
4. A library routine and a process routine according to claim 3 are automatically generated from a subroutine source by giving interface information of the function concerned, and a library routine which operates on one host, A procedure process method characterized by being provided by a program structure consisting of an actual processing process that operates on the other host.
JP7258480A 1995-10-05 1995-10-05 Procedure procedure method Withdrawn JPH09101899A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7258480A JPH09101899A (en) 1995-10-05 1995-10-05 Procedure procedure method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7258480A JPH09101899A (en) 1995-10-05 1995-10-05 Procedure procedure method

Publications (1)

Publication Number Publication Date
JPH09101899A true JPH09101899A (en) 1997-04-15

Family

ID=17320804

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7258480A Withdrawn JPH09101899A (en) 1995-10-05 1995-10-05 Procedure procedure method

Country Status (1)

Country Link
JP (1) JPH09101899A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006051902A1 (en) * 2004-11-11 2006-05-18 Japan Science And Technology Agency Calculation processing system, calculation processing method, user program system, library program system, program, and recording medium containing the program
WO2011001527A1 (en) 2009-07-02 2011-01-06 富士通株式会社 Algorithm selection program, algorithm selection device, and method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006051902A1 (en) * 2004-11-11 2006-05-18 Japan Science And Technology Agency Calculation processing system, calculation processing method, user program system, library program system, program, and recording medium containing the program
GB2434897A (en) * 2004-11-11 2007-08-08 Japan Science & Tech Agency Calculation processing system, calculation processing method, user program system, library program system, program, and recording medium
GB2434897B (en) * 2004-11-11 2009-04-22 Japan Science & Tech Agency Computing system, computing method, user program system, library program system, program, and storage medium containing program
US8281325B2 (en) 2004-11-11 2012-10-02 Japan Science And Technology Agency Computing system including user program system executing user program and library program system, executing library programs to be used in user program, computing method, user program system, library program system, and storage medium containing program
WO2011001527A1 (en) 2009-07-02 2011-01-06 富士通株式会社 Algorithm selection program, algorithm selection device, and method
US8739139B2 (en) 2009-07-02 2014-05-27 Fujitsu Limited Algorithm selection device and algorithm selection method

Similar Documents

Publication Publication Date Title
JP2666847B2 (en) Heterogeneous language communication method
JPH10283198A (en) User mode proxy for kernel mode operation in computer operating system
JPH10133987A (en) Client server system, client device, server device, data processing method, program creation device and method, information storage medium
US20030046660A1 (en) Computer program for generating another computer program based on STM
JPH08106390A (en) Data-processing system
JPH09101899A (en) Procedure procedure method
JPH03229352A (en) How to change the program
JP2005108082A (en) Device driver interface method
CN113992941B (en) Cloud-edge collaborative video analysis system and method based on serverless function computing
CN114356462A (en) A flow chart-based visual inspection method, device, equipment and medium
CN111641667A (en) Network centric process control
JP3260264B2 (en) How to create and operate patches at a high-level language level
JP6626596B1 (en) Interface device and program
JPH09245003A (en) Parallel distributed processing system and method
JPH0863363A (en) Virtual execution environment implementation system
JP2008299763A (en) Distributed object development tool
JP2907174B2 (en) User interface system for supervisory control system
JP2000066906A (en) Microcomputer embedded control system
JPH09160762A (en) Program conversion method
JP2003330729A (en) Compiler unit
JP2000207186A (en) Remote object communication program generation system, remote object communication system, and computer-readable recording medium recording remote object communication program generation program
JP2000267844A (en) Software development system
JP2003296146A (en) Message dependency display device, message dependency display method, program, and recording medium
JPH03266064A (en) Method and device for constituting program
JP3570870B2 (en) System construction apparatus, system construction method, and medium recording system construction program

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20030107