JPH11175359A - Event monitoring part integration method between different kinds of platforms - Google Patents

Event monitoring part integration method between different kinds of platforms

Info

Publication number
JPH11175359A
JPH11175359A JP9347970A JP34797097A JPH11175359A JP H11175359 A JPH11175359 A JP H11175359A JP 9347970 A JP9347970 A JP 9347970A JP 34797097 A JP34797097 A JP 34797097A JP H11175359 A JPH11175359 A JP H11175359A
Authority
JP
Japan
Prior art keywords
platform
event
monitoring unit
event monitoring
platforms
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
JP9347970A
Other languages
Japanese (ja)
Inventor
Hiroyuki Maeomichi
浩之 前大道
Koji Yada
浩二 矢田
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP9347970A priority Critical patent/JPH11175359A/en
Publication of JPH11175359A publication Critical patent/JPH11175359A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To eliminate the delay of event detection, to reduce the work amount of protocol definition, to eliminate the delay by the streaming of data and to integrate platforms not corresponding to MT. SOLUTION: In threads 1 and 2 managed by an operating system, the platforms PFA and PFB and an application AP are respectively prepared. The event processing part of the thread 2 stores the data in a queue and sends activation signals to the event monitoring part of the thread through a pipe. The event processing of the thread 1 is executed.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、ファイル・ディス
クリプタ(FD)とイベント処理関数を結びつけること
ができるアプリケーション・プログラム・インターフェ
ース(API)を持つ第1、第2のプラットフォーム上
で実行される各イベント監視部を統合する方法に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to each event executed on a first and a second platform having an application program interface (API) capable of linking a file descriptor (FD) with an event processing function. A method for integrating a monitoring unit.

【0002】[0002]

【従来の技術】他のプログラムや、他の装置と通信する
ようなプログラム(通信プログラム)では、「イベント
のないときはCPUを使わず待ち、イベントが入ってく
ると、そのイベントに対応するイベント処理部で、直ち
にイベントの処理を開始し、イベントの処理が終了する
と、再び待ちに入る」プログラムの方式(イベント駆動
型プログラム)が用いられることが多い。イベントが入
ってくるまで待ち、イベントが入ってくると、対応する
イベント処理部を呼び出し、処理が終了すると再び待ち
に入る機能を実現する場所をイベント監視部と呼ぶこと
にする。
2. Description of the Related Art In other programs and programs (communication programs) that communicate with other devices, "when there is no event, wait without using the CPU, and when an event comes in, an event corresponding to the event occurs. In the processing section, the processing of an event is immediately started, and when the processing of the event is completed, the process is again waited for. " Wait until an event enters, and when an event enters, call the corresponding event processing unit, and when the processing ends, call the event monitoring unit a place that implements the function to wait again.

【0003】プロトコル処理機能、イベント監視機能な
どの機能をライブラリとして提供されたもの(通信プラ
ットフォーム)を利用することで、通信プログラムを効
率的に作成することができる。通信プラットフォームは
製品として提供されていることが多い。製品プラットフ
ォームの内部の情報は開示されていないことが多く、内
部の機能の変更も不可能である。
A communication program can be efficiently created by using a function (communication platform) provided as a library with functions such as a protocol processing function and an event monitoring function. Communication platforms are often offered as products. Information inside the product platform is often not disclosed, and it is impossible to change the internal functions.

【0004】スレッドの概念を取り入れていないプラッ
トフォームでは、イベント監視部はUNIX、またはそ
れに類するオペレーティングシステム(OS)の複数の
IDを監視するselect( )システムコール(またはpo
ll( )システムコール)の機能を用いて実装されてい
る。イベントはファイルディスクリプタ(FD)への入
出力で伝達され、select( )に複数のFDを監視する
ことにより、イベント監視を行う。イベントが入ってく
るとそれに対応するイベント処理部を呼び出す。イベン
ト処理部の処理が終了すると再び、イベント監視部に制
御が戻り、イベント待ちに入る。このようなプラットフ
ォームをセレクト型プラットフォームと呼ぶことにす
る。このタイプのプラットフォームのライブラリ関数は
一般にMTセーフ(並列に呼び出されてもよい回数)で
ないことが多い。逆に、MTセーフでないプラットフォ
ームはほとんどセレクト型プラットフォームである。
On platforms that do not incorporate the concept of threads, the event monitor monitors the select () system call (or po) for monitoring multiple IDs of UNIX or similar operating systems (OS).
ll () system call). The event is transmitted by input / output to / from a file descriptor (FD), and event monitoring is performed by monitoring a plurality of FDs in select (). When an event comes in, the corresponding event processing unit is called. When the processing of the event processing unit is completed, the control returns to the event monitoring unit again, and the process waits for an event. Such a platform is called a select platform. Library functions on this type of platform are often not MT safe (the number of times they may be called in parallel). Conversely, platforms that are not MT-safe are mostly select-type platforms.

【0005】スレッドの概念を取り入れたプラットフォ
ームでは、イベント監視部が複数のスレッド上で同時に
動作したり、イベント処理部を別スレッドで行うような
仕組みのイベント監視を持つものがある。このようなプ
ラットフォームをスレッド型プラットフォームと呼ぶこ
とにする。このタイプのプラットフォームのライブラリ
関数は一般にMTセーフである。
[0005] Some platforms that incorporate the concept of threads have an event monitoring mechanism in which an event monitoring unit operates simultaneously on a plurality of threads or an event processing unit is performed by another thread. Such a platform is called a thread type platform. Library functions for this type of platform are generally MT-safe.

【0006】近年、プロトコルの多様化により、プロト
コル変換器が必要とされている。プロトコル機能の実装
には多くの作業が伴うので、既存の通信プラットフォー
ムを複数組み合わせることで、プロトコル変換器の作成
を効率化することが望まれている。
In recent years, with the diversification of protocols, a protocol converter has been required. Since the implementation of the protocol function involves a lot of work, it is desired to efficiently create a protocol converter by combining a plurality of existing communication platforms.

【0007】プロトコルAで通信する機能を持ったアプ
リケーションAPA と、プロトコルBで通信する機能を
持ったアプリケーションAPB で通信を行うためには、
プロトコルAとプロトコルBの機能を具備するプロトコ
ル変換器が必要となる。図11にプロトコル変換の行わ
れる仕組みを示す。アプリケーションAPA がプロトコ
ルAでリクエスアトR1 をプロトコル変換器に出すと、
プロトコル変換器がプロトコルAをプロトコルBに変換
し、アプリケーションAPB に向かいリクエストR2
届ける。アプリケーションAPA は受け取ったリクエス
トに対する処理を行い、処理結果をレスポンスR3 とし
てプロトコル変換器へ返す。プロトコル変換器はレスポ
ンスR3 の結果よりレスポンスR4 を作り、プロトコル
Bを経て、アプリケーションAPB に返す。
In order to communicate between the application AP A having a function of communicating with the protocol A and the application AP B having a function of communicating with the protocol B,
A protocol converter having the functions of protocol A and protocol B is required. FIG. 11 shows a mechanism for performing the protocol conversion. When the application AP A issues a request R 1 to the protocol converter with the protocol A,
The protocol converter converts a protocol A to the protocol B, delivers the request R 2 towards the application AP B. Application AP A performs processing for request received, and returns to the protocol converter processing result as a response R 3. The protocol converter makes a response R 4 from the result of the response R 3, through the protocol B, and returns to the application AP B.

【0008】プロトコルスタックを実装するには多くの
作業が伴うため、プロトコルAをサポートする既存の通
信プラットフォームPFA とプロトコルBをサポートす
る既存の通信プラットフォームPFB を組み合わせてプ
ロトコル変換器を作成するのが効率的である。
[0008] Since with a lot of work to implement the protocol stack, to create a protocol converter by combining existing communication platform PF B to support existing communications platform PF A and protocol B that supports the protocol A Is efficient.

【0009】これまでに、考えられているイベント監視
部の統合方法は3つある。
Up to now, there are three methods of integrating the event monitoring units.

【0010】MTセーフでないセレクト型プラットフォ
ームと、MTセーフでないセレクト型プラットフォーム
を統合する方法は以下の3つ(方式1,2,3)があ
る。
There are the following three methods (methods 1, 2, 3) for integrating a non-MT safe select type platform and a non-MT safe select type platform.

【0011】また、MTセーフでないセレクト型プラッ
トフォームと、スレッド型プラットフォームを統合する
方法は以下の方式2を用いることができる。
The following method 2 can be used as a method for integrating a select type platform which is not MT safe and a thread type platform.

【0012】(方式1 select( )の統合)プラット
フォームPFA とプラットフォームPFB を統合する場
合を考える。それぞれのプラットフォームは独自のsele
ct( )システムコールを呼び出す部分を持っている。
プラットフォームPFA を監視するファイルディスクリ
プタの集合をFAとし、プラットフォームPFBを監視す
るファイルディスクリプタの集合をFBとする。FC=F
AUFBを監視するselect( )システムコールを導入
し、このselect( )をイベント監視部とする。
[0012] Consider the case of integrating (method 1 Integration the select ()) platform PF A and platform PF B. Each platform has its own sele
Contains the part that calls the ct () system call.
A set of file descriptors that monitor the platform PF A is F A, and a set of file descriptors that monitor the platform PF B is F B. F C = F
Introducing a select () system call to monitor the A UF B, and an event monitoring unit The select ().

【0013】方式1にとられる方法はさらに以下の3つ
に分類できる。
The method used in the method 1 can be further classified into the following three methods.

【0014】(1−1)プラットフォームPFA のイベ
ント監視部で統合する方式 プラットフォームPFA のselect( )でプラットフォ
ームPFB のイベント処理部に関係するFDも監視す
る。
[0014] (1-1) Platform PF A also monitors FD relating to event processing of the platform PF B in select () method platform PF A to integrate the event monitoring unit.

【0015】(1−2)プラットフォームPFB のイベ
ント監視部で統合する方式 プラットフォームPFB のselect( )でプラットフォ
ームPFA のイベント処理部に関係するFDも監視す
る。
[0015] (1-2) platform PF FD which in select () method platform PF B to integrate the event monitoring unit related to the event processing section of the platform PF A and B also monitors.

【0016】(1−3)新たなイベント監視部で統合す
る方式 新たな関数を用意し、その中プラットフォームPFA
プラットフォームPF B の監視するFDの両方を監視す
るslect ( )を呼び出す。
(1-3) Integration with a new event monitoring unit
A new function is prepared and the platform PFA When
Platform PF B Monitor both FDs
Call ().

【0017】(方式2 ローカルプロトコルの導入)プ
ラットフォームPFA 、プラットフォームPFB をそれ
ぞれプロセスA、プロセスB上で実行する。プラットフ
ォームPFA のイベント処理部とプラットフォームPF
B のイベント処理部の間でユーザがローカルなプロトコ
ルを定義することにより、プラットフォームPFA とプ
ラットフォームPFB との連携を取る方式。
(Method 2 Introduction of Local Protocol) Platforms PF A and PF B are executed on process A and process B, respectively. Event processing part of platform PF A and platform PF
When the user defines a local protocol with the event processing unit of the B, taking the cooperation with the platform PF A and platform PF B method.

【0018】プラットフォームPFA 、プラットフォー
ムPFB の双方にFDと、そのFDに対応するコールバ
ック関数をイベント監視部が追加するAPIが必要とさ
れる。このAPIがない場合では方式2は使用すること
ができない。
Both the platform PF A and the platform PF B require an FD and an API for the event monitoring unit to add a callback function corresponding to the FD. Without this API, method 2 cannot be used.

【0019】(方式3 イベントの有無を調べる関数を
片側のselect( )のタイムアウト毎に呼び出す方式)
一方のプラットフォーム(PF1)にイベントが入って
きているかどうかをブロックすることなく調べるAPI
(check ( )とする。)と、処理可能なイベント処理
関数を一つ実行する(API(イベントを実行する関数
do event( )とする。)が用意されているものとす
る。もう一方のプラットフォーム(PF2)にselect
( )のタイムアウトを設定でき、コールバック関数を
設定できるAPIがあるとする。
(Method 3 A method for calling a function for checking the presence / absence of an event every time select () on one side times out)
API to check whether an event has entered one platform (PF1) without blocking
(Check ()), and executes one event processing function that can be processed (API (function for executing an event)
do event (). ) Is prepared. Select on the other platform (PF 2 )
It is assumed that there is an API that can set a timeout in () and set a callback function.

【0020】プラットフォームPF2のselect( )の
タイムアウトが起こると、ユーザの設定したコールバッ
ク関数が呼び出される。その中で、PF1のcheck
( )を呼び出し、PF1にイベントがきているか否か
を調べ、イベントがきているればそのイベントに対応す
る処理関数を実行するPF1のAPIのdo event( )
を呼び出す。その後コールバック関数を抜け、再度、P
2においてselect( )によるイベント待ちに入る。
When a timeout occurs in select () of the platform PF 2 , a callback function set by the user is called. Among them, check of PF1
() Call to examine whether the come event in PF1, do the API of PF 1 for executing processing function corresponding to the event if Re is coming events event ()
Call. Then, exit the callback function and again
In F 2 enters the event waiting by the select ().

【0021】このように主としてプラットフォームPF
2のイベントを監視し、タイムアウトの度にPF1のイベ
ントを監視する方式である。
As described above, mainly the platform PF
This is a method of monitoring the event No. 2 and monitoring the event of the PF 1 every time a timeout occurs.

【0022】[0022]

【課題を解決しようとする課題】上述した従来の3つの
方法にはそれぞれ次のような問題点がある。
The above three conventional methods have the following problems.

【0023】MTに対応していないプラットフォームど
うしの接続の場合 まず、2種類のプロトコルが別々にある従来技術の構成
を説明する。この説明に図12を用いる。プラットフォ
ームPFA とPFB は異なるプロトコルである。両プラ
ットフォーム間はつながっていない。各プラットフォー
ムPFA ,PF B の上部にはアプリケーション部分(A
P)がる。そして各プラットフォームPFA ,PFB
は通信処理部とイベント監視部があり、つながってい
る。また、アプリケーション部分APには複数のイベン
ト処理部があり、先のイベント監視部とつながってい
る。
Platforms that do not support MT
In the case of a cow connection First, a conventional configuration in which two types of protocols are separately provided
Will be described. FIG. 12 is used for this description. Platform
PFA And PFB Is a different protocol. Both plastics
The platform is not connected. Each platform
Mu PFA , PF B The application part (A
P) And each platform PFA , PFB To
Has a communication processing unit and an event monitoring unit, which are connected
You. In addition, the application part AP includes a plurality of events.
Event processing unit, which is connected to the previous event monitoring unit.
You.

【0024】(方式1 APIの必要性、またはプログ
ラムコードの開示)(1−1)の場合、プラットフォー
ムPFB が監視すべきFDの集合を返すAPI、プラッ
トフォームPFB にイベントがあるときに、イベントの
入ったFDの情報を元にプラットフォームPFB の対応
するイベント処理部を実行するAPIが必要となる。ま
た、プラットフォームPFB がイベント監視部で、FD
以外の情報を監視する場合は、その情報を調べるAPI
とそれに対応するイベント処理部を呼び出すAPIが必
要となる。
[0024] (need for method 1 API, or disclosure of the program code) case (1-1), API platform PF B returns a set of FD to be monitored, when there is an event to the platform PF B, the event corresponding API to perform event processing section of the containing the FD information based platform PF B a is required. The platform PF B is an event monitoring unit, and the FD
If you want to monitor other information, API to check the information
And an API for calling the corresponding event processing unit.

【0025】図13に方式1−1の構成図を示す。1つ
のプロセスにおいて、図12にない図13のプラットフ
ォームPFA のイベント監視部からプラットフォームP
Bの通信処理を結ぶ線は、プラットフォームPFA
イベント監視部がプラットフォームPFB の通信処理部
を監視していることを示す。また、図13のプラットフ
ォームPFA のイベント監視部からプラットフォームP
B のイベント処理部を結ぶ線は、プラットフォームP
A のイベント監視部が必要に応じて、プラットフォー
ムPFB のイベント処理部を選択し、実行することを示
す。
FIG. 13 shows a configuration diagram of the method 1-1. In one process, the platform P from the event monitoring unit platform PF A in FIG. 13 to FIG. 12
Line connecting the communication process F B indicates that the event monitor platform PF A is monitoring the communication processor platform PF B. Further, the platform P from the event monitoring unit platform PF A in FIG. 13
Line connecting the event processing unit of the F B the platform P
If necessary event monitoring unit of F A, select the event processing unit of the platform PF B, indicating that the run.

【0026】(1−2)の場合、プラットフォームPF
A が監視すべきFDの集合を返すAPI、プラットフォ
ームPFA にイベントがあるときに、イベントの入った
FDの情報を元にプラットフォームにPAA の対応する
イベント処理部を実行するAPIが必要となる。また、
プラットフォームPFA がイベント監視部で、FD以外
の情報を監視する場合は、その情報を調べるAPIとそ
れに対応するイベント処理部を呼び出すAPIが必要と
なる。
In the case of (1-2), the platform PF
An API for returning a set of FDs to be monitored by A , and an API for executing an event processing unit corresponding to PA A on the platform based on information of the FD including the event when an event is present on the platform PFA is required. . Also,
The platform PF A event monitoring unit, to monitor the information other than the FD, the API to call the event processing section and a corresponding API to examine the information needed.

【0027】図14に方式1−2の構成図を示す。図1
3で説明した場合とはプラットフォームが逆になり、プ
ラットフォームPFA のイベント監視部がプラットフォ
ームPFB のイベント監視部に、プラットフォームPF
B の通信処理部がプラットフォームPFA の通信処理部
に、プラットフォームPFB のイベント処理がプラット
フォームPFA のイベント処理になっている。
FIG. 14 shows a configuration diagram of the method 1-2. FIG.
The platform is reversed from the case described in 3, and the event monitoring unit of the platform PF A is provided to the event monitoring unit of the platform PF B by the platform PF
The communication processing unit of the B is the communication center of the platform PF A, event processing platform PF B is in event processing platform PF A.

【0028】(1−3)の場合、プラットフォームPF
A ,PFB ともに、監視すべきFDの集合を返すAP
I、プラットフォームPFA にイベントがあるときにイ
ベントの入ったFDの情報を元にプラットフォームPF
A の対応するイベント処理部を実行するAPI、プラッ
トフォームPFB にイベントがあるときにイベントの入
ったFDの情報を元にプラットフォームPFB の対応す
るイベント処理部を実行するAPIが必要である。
In the case of (1-3), the platform PF
A, PF B together, AP that returns a set of to be monitored FD
I, when there is an event in platform PF A , platform PF
API to perform the corresponding event processing unit of the A, it is necessary corresponding API to perform event processing section of the platform PF B platform PF B based on the information of the FD containing the event when there is an event.

【0029】図15に方式1−3の構成図を示す。この
場合、イベント監視部が各プラットフォームPFA ,P
B にはなく、APとして作られた独自のイベント監視
部がある。このイベント監視部は各プラットフォームP
A ,PFB の通信処理部を監視制御し、また各プラッ
トフォームPFA ,PFB 上のイベント処理部をそれぞ
れのプラットフォームPFを介して適宜、選択して実行
する。
FIG. 15 shows a configuration diagram of the method 1-3. In this case, the event monitoring unit sets each platform PF A , P
It not in the F B, has its own event monitoring unit made as AP. This event monitoring unit is
F A, and monitors and controls the communication processing unit of the PF B, and each platform PF A, suitably through a respective platform PF event processing unit of the PF B, selecting and executing.

【0030】プラットフォームPFA がイベント監視部
で、FD以外の情報を監視する場合は、その情報を調べ
るAPIとそれに対応するイベント処理部を呼び出すA
PIが必要となる。
The platform PF A is the event monitoring unit, to monitor the information other than the FD, calls the event processing section and a corresponding API to examine the information A
PI is required.

【0031】プラットフォームPFB がイベント監視部
で、FD以外の情報を監視する場合は、その情報を調べ
るAPIとそれに対応するイベント処理部を呼び出すA
PIが必要となる。
The platform PF B is the event monitoring unit, to monitor the information other than the FD, calls the event processing section and a corresponding API to examine the information A
PI is required.

【0032】上記に示したAPIがない場合はこの方式
で統合するためには、ソースコードの開示が必要であ
る。
If there is no API described above, the source code must be disclosed in order to integrate in this manner.

【0033】(方式2 データの交換、仲介プロトコル
の作成)方式2ではプラットフォームPFA とプラット
フォームPFB を仲介するローカルプロトコル(ユーザ
ーが独自に選択したプロトコル)をユーザーレベルで定
義する必要がある。これには作業量が必要となってしま
う。取り扱うデータをストリーム型データに直して、プ
ロセス間で送受信するために遅延が生じる。
[0033] (exchange scheme 2 data, mediation creation protocol) is necessary to define scheme 2, the platform PF A and platform PF local protocol which mediates B (user independently selected protocol) at the user level. This requires a lot of work. A delay occurs because data to be handled is converted into stream-type data and transmitted and received between processes.

【0034】これまでの方式は図13〜図15に示した
ように、1つのプロセスにおいて、プラットフォームP
A ,PFB 間を接続するものであった。方式2は図1
6にその構成を示すように、各プラットフォームPF
A ,PFB は別々のプロセスとなっている。プラットフ
ォームPFA のプロセスがプラットフォームPFB のイ
ベント処理部にある処理を行う場合は、図16に示した
ようにローカルプロトコル上の2つのプロセスの通信処
理部を介して実行される。
In the conventional method, as shown in FIGS. 13 to 15, in one process, the platform P
F A, was to connect the PF B. Method 2 is shown in FIG.
As shown in Fig. 6, each platform PF
A, PF B has a separate process. When the process of the platform PF A performs the processing in the event processing unit of the platform PF B , the process is executed via the communication processing unit of the two processes on the local protocol as shown in FIG.

【0035】(方式3 select (poll) システムコール
における遅延)タイムアウト時間を有限時間に設定した
場合では、主でない方のイベントの検出に遅延が生じる
ことは明らかである。
(Method 3 Delay in select (poll) System Call) When the timeout time is set to a finite time, it is apparent that a delay occurs in the detection of the non-main event.

【0036】図17を使って従来技術の方式3での遅延
発生を説明する。右方向への横軸を時間の進む軸をと
り、下側が主たるイベント監視、上側が副たるイベント
監視の状態を示す。下側ではselect( )が実行されて
おり、タイムアウトで上側のcheck( )へ移る。ここ
でもし、select( )の実行途中、つまりタイムアウト
する前にイベントが発生しても、タイムアウトで check
( )に移り、イベントが検出され、do event( )で
実行されるまでは遅延が生じてしまう。
With reference to FIG. 17, a description will be given of the occurrence of a delay in the method 3 of the prior art. The horizontal axis to the right indicates the time axis, and the lower side indicates the main event monitoring state and the upper side indicates the secondary event monitoring state. Select () is executed on the lower side, and it moves to upper side check () by timeout. Here, even if an event occurs during the execution of select (), that is, before the timeout,
Move to (), event is detected, do There will be a delay until it is executed in event ().

【0037】また、方式3で遅延をなくすために、sele
ct( )のタイムアウト時間を0にすると、CPUを占
有してしまう。
In order to eliminate the delay in the method 3, sele
If the timeout time of ct () is set to 0, the CPU is occupied.

【0038】図18を使って従来技術の方式3でCPU
の占有を説明する。図17と同じく時間軸に各イベント
監視の状態を示す。図17と異なるのは主たるイベント
監視のselect( )のタイムアウト時間を極端に短くし
ている。こうすると、イベントが発生した直後にcheck
( )となり、do event( )で実行されるまでの遅延
が短くなる。しかし、副たるイベント監視、つまりchec
k( )が頻繁に行われて、CPUがcheck ( )で占
有される結果になる。
Referring to FIG. 18, the CPU according to the prior art method 3 is used.
Occupancy will be described. As in FIG. 17, the status of each event monitoring is shown on the time axis. The difference from FIG. 17 is that the timeout period of select () of the main event monitoring is extremely shortened. In this case, check immediately after the event occurs
() And do The delay before execution by event () becomes shorter. But secondary event monitoring, ie chec
k () is performed frequently, resulting in the CPU being occupied with check ().

【0039】MTに対応していないプラットフォームP
A とMTに対応したプラットフォームPFB とを接続
する場合 一般に、MT不可な関数はメインスレッド(最初に作ら
れたスレッド)以外のスレッドから呼び出すことはでき
ない。プラットフォームPFA の通信処理部やイベント
処理はマルチスレッド(シングルプロセスが複数の実行
を持つことができるプログラミングパラダイム。プロセ
スが並列に多数仕事を行うことができる)不可であるこ
とが多い。これを踏まえると、event が入ってくるたび
にスレッドを作り、その上でイベントを実行するような
プラットフォーム、また複数のスレッドでイベントを待
つようなイベント監視部のプラットフォームの場合で
は、プラットフォームPFB のイベント処理関数は、メ
インスレッド以外のスレッドで実行される。そのため、
プラットフォームPFB のイベント処理関数の中から、
プラットフォームPFA のイベント処理関数や通信処理
部を呼び出すことができない。このため、(方式1)と
(方式2)と(方式3)の方法は使用できない。(方式
2)の場合でも使用できるが、上に述べた問題点と同じ
問題が発生する。
Platform P not supporting MT
When F A is Connected to Platform PF B Corresponding to MT Generally, a function that cannot be MT cannot be called from a thread other than the main thread (the thread created first). Platform communication processor and event handling PF A is often multithreading is (single-process multiple programming paradigms that can have execution. Process can be performed multiple jobs in parallel) are not allowed. Based on this, in the case of a platform that creates a thread each time an event enters and executes the event on it, and a platform of the event monitoring unit that waits for events in multiple threads, the platform PF B The event processing function is executed by a thread other than the main thread. for that reason,
From the event processing functions of platform PF B ,
It can not be called an event handling function and a communication processor platform PF A. Therefore, the methods (method 1), (method 2), and (method 3) cannot be used. Although it can be used in the case of (method 2), the same problem as described above occurs.

【0040】本発明の目的は、イベント検出の遅延がな
く、プロトコル定義の作業量が小さく、データのストリ
ーム化によるデータの遅延がなく、MT対応でないプラ
ットフォームの統合が可能な、異種プラットフォーム間
のイベント監視部統合方法を提供することにある。
It is an object of the present invention to provide an event-cross-platform event that has no delay in event detection, a small amount of work for protocol definition, no data delay due to data streaming, and integration of non-MT compatible platforms. An object of the present invention is to provide a monitoring unit integration method.

【0041】[0041]

【課題を解決するための手段】本発明の異種プラットフ
ォーム間のイベント監視部統合方法は、ファイル・ディ
スクリプタとイベント処理関数を結びつけることができ
るアプリケーション・プログラム・インターフェースを
持つ第1、第2のプラットホームで実行される各イベン
ト監視部を統合する方法であって、オペレーティングシ
ステムが管理するスレッドを作成し、それぞれのスレッ
ドの上で、前記プラットフォーム上の異なるイベント監
視部を実行し、また、セレクトで待っているイベント監
視部にパイプまたはソケットを通じてwrite( )
システムコールで書き込むことにより、第1のプラット
フォーム上のイベント監視部からイベントの発生を第2
のプラットフォーム上のイベント監視部へ通知し、呼び
出す関数のポインタ、呼び出す関数の引数およびセマフ
ォ構造体で構成される構造体を前記キューにつなぎ、ス
レッド間で受け渡しする。
According to the present invention, there is provided a method for integrating an event monitor between heterogeneous platforms, comprising first and second platforms having an application program interface capable of linking a file descriptor with an event processing function. A method of integrating each event monitor to be executed, by creating threads managed by the operating system, executing different event monitors on the platform on each thread, and selecting and waiting. Write () through the pipe or socket to the existing event monitor
By writing in the system call, the event generation from the event monitoring unit on the first platform
To the event monitoring unit on the platform, and a structure composed of a pointer of a function to be called, an argument of the function to be called, and a semaphore structure is connected to the queue, and is passed between threads.

【0042】本発明においては、2つのプラットフォー
ムでのOSがスケジューリングを行うスレッドを作成
し、それぞれのスレッドの上で、2つのイベント監視部
を実行する。
In the present invention, the threads on which the OS on the two platforms performs scheduling are created, and two event monitoring units are executed on each thread.

【0043】また、select( )の監視しているFDに
パイプまたはソケットを通じてwrite を送ることによ
り、遅延なく第1のイベント監視部から関数(実施形態
ではF2に当たる)が起動できる。
Also, by sending a write to the FD monitored by select () through a pipe or a socket, a function (corresponding to F2 in the embodiment) can be started from the first event monitoring unit.

【0044】呼び出す関数のポインタ、引数、セマフォ
構造体からなる構造体をキューにつなぎ、スレッド間で
受け渡しする仕組みを導入する。キューを操作する部分
はmutex を用いて排他的に操作するため、複数のスレッ
ドからキューにアクセスすることを可能としている。こ
のことにより、監視するFDごとにスレッドを作成して
いるようなイベント監視部や、プラットフォームPFB
がイベントが入るたびに新たなスレッドを起こし、その
スレッド上で関数(実施形態ではF4に当たる)を実行
するようなイベント監視部も対応できる。
A structure is introduced in which a structure including a pointer of a function to be called, an argument, and a semaphore structure is connected to a queue and transferred between threads. Since the part that operates the queue is operated exclusively using the mutex, it is possible to access the queue from multiple threads. As a result, an event monitoring unit that creates a thread for each FD to be monitored, a platform PF B
Wakes up a new thread each time an event enters, and executes an event monitoring unit that executes a function (corresponding to F4 in the embodiment) on that thread.

【0045】[0045]

【発明の実施の形態】次に、本発明の実施の形態につい
て図面を参照して説明する。
Next, embodiments of the present invention will be described with reference to the drawings.

【0046】図3は第1の実施形態をスレッドの観点か
ら見た図である。横軸は右方向へ時間の流れを示してい
る。そしてT1はプラットフォームPFB 、T2はプラ
ットフォームPFA のスレッドを示す。また、幅の細い
関数は待ちの状態を示し、太い方は実行を示す。F1,
F2,F3,・・・,F6は関数を示している。
FIG. 3 is a diagram showing the first embodiment viewed from a thread point of view. The horizontal axis shows the flow of time to the right. The T1 platform PF B, T2 indicates the thread platform PF A. A narrow function indicates a waiting state, and a thick function indicates execution. F1,
F2, F3,..., F6 indicate functions.

【0047】F1,F4はイベントの種類に応じて別な
関数となり、ユーザが定義する。一方F2,F3は本発
明のパイプによるwrite ( ),read( )の処理、キ
ューの操作が含まれている関数で、イベントの種類によ
らず共通である。
F1 and F4 are different functions according to the type of event, and are defined by the user. On the other hand, F2 and F3 are functions that include write () and read () processing and queue operations by the pipe of the present invention, and are common regardless of the type of event.

【0048】2つのプラットフォームPFA ,PFB
イベント監視部をOSに割り当て、それぞれのスレッド
で各々のイベント監視部を動かした。これらのイベント
監視部は同時に実行される。
The event monitoring units of the two platforms PF A and PF B were allocated to the OS, and each event monitoring unit was operated by each thread. These event monitoring units are executed simultaneously.

【0049】プラットフォームPFA はF6において、
プラットフォームPFB にF5においてイベントを待っ
ている。F5においてプラットフォームPFB の通信処
理部よりイベントが入ってくると、そのイベントに対応
するイベント処理部F4が起動される。
The platform PF A in the F6,
Waiting for event at F5 on platform PF B. When platform event from the communication processing unit of the PF B comes in at F5, the event processing unit F4 corresponding to the event is activated.

【0050】イベント処理のうち、プラットフォームP
A の機能を使用する部分(プラットフォームPFA
通信処理部や、MT不可なライブラリ関数)は関数F1
を書いておく。
In the event processing, the platform P
F A function (communication processing section and the platform PF A, MT Call library functions) portion used for the function F1
Write down.

【0051】F4ではF1のポインタおよびF1を呼ぶ
ときの引数を引数としてF3を呼び出す。
In F4, F3 is called using the pointer of F1 and the argument for calling F1 as arguments.

【0052】F3内部では、まずセマフォを作り、この
セマフォをlockする。すなわち、セマフォカウンタの数
0にして、他のスレンドがセマフォをアクセスしようと
すると、ブロックする。セマフォとF1のポインタとF
1を呼び出すときの引数の情報を持った構造体をキュー
につなぐ。その後、パイプまたはソケットに対して、wr
ite ( )システムコールで書き込みを行う。その後、
セマフォが解放されるまでのCPUを消費せずに待つ、
つまり他のプロセスの実行を妨げない関数sema wait
( )を呼び出す。ここで、F3は一時停止する。
Inside F3, first, a semaphore is created.
Lock the semaphore. That is, the number of semaphore counters
Set to 0 and another sled tries to access the semaphore
Then block. Semaphore, F1 pointer and F
Queue structure with argument information when calling 1
Connect to Then, for a pipe or socket, wr
Write using the ite () system call. afterwards,
Wait without consuming CPU until the semaphore is released,
In other words, the function sema that does not hinder the execution of other processes wait
Call (). Here, F3 is temporarily stopped.

【0053】プラットフォームPFA のイベント監視部
F6で実行されているパイプまたはソケットに対して書
き込みが行われるため、パイプのFDに対応するイベン
ト処理部F2が呼び出される。
[0053] Since the write to the platform PF A event monitoring unit F6 pipe or socket running on is made, the event processing section F2 corresponding to the FD of the pipe is called.

【0054】F2においては、キューから、構造体を一
つ外しデータを読み込む。F1のポインタとF1を読み
出すときの引数が得られるのでこれを使用してF1を呼
び出す。
In F2, one structure is removed from the queue and data is read. Since the pointer of F1 and the argument for reading F1 are obtained, F1 is called using this.

【0055】F1においては、F1に書かれている処理
(プラットフォームPFA の機能を使う処理)を行う。
[0055] In F1 performs processing, which is written in F1 (function the use processing of the platform PF A).

【0056】F1が終了すると、F2に実行が戻る。F
2においては、構造体に書かれているセマフォを解放す
る(sema post ( )を呼び出す。)。F2が終了し、
イベント監視部F6に実行が戻る。
When F1 ends, execution returns to F2. F
In 2, release the semaphore written in the structure (semaphore Call post (). ). F2 is over,
Execution returns to the event monitoring unit F6.

【0057】時刻t2において、セマフォが解放された
ため、一時停止していたF3が再び動き始める。F3は
F4の実行を戻す。
At time t2, since the semaphore has been released, the temporarily stopped F3 starts to move again. F3 returns execution of F4.

【0058】これまで、イベント監視部のやりとりを時
間経過で説明したが、これを各プラットフォームでの動
作フローで説明する。
Although the exchange of the event monitoring unit has been described with the passage of time, this will be described with reference to the operation flow of each platform.

【0059】図1はプラットフォームPFA の(selec
t)側の動作フローであり、図1(a)はメイン(loop
1)の動作フローを示し、図1(b)はサブ(sub 1)の
動作フローを示している。
[0059] FIG. 1 of the platform PF A (selec
The operation flow on the t) side is shown in FIG.
FIG. 1B shows the operation flow of FIG. The operation flow of 1) is shown.

【0060】図1(a)のメイン(loop 1) はまず、イ
ベントがあるか?をselect( )機能で常時判断してい
る。イベントがある場合、次に進み、順次イベント1、
イベント12、・・・・、イベント1n-1 に該当するか
判断する。これらの判断で全て違っていれば、イベント
nに当たる。どのイベントか区別されると、イベント
に対応したサブの動作フローsub 11,sub 12,sub
1n-1,sub n へ処理が投げられる。図1(b)がサブ
sub 1x(x=1-n)の動作フローの一例である。このサブの
動作フロー処理が終了すると、再び、イベントの有無を
判断する最初の状態に戻される。
The main (loop) shown in FIG. 1) First,
Is there a vent? Is always determined by the select () function.
You. If there is an event, proceed to the next event,
Event 1Two, ..., Event 1n-1 Whether or not
to decide. If these judgments are all different, the event
1nHit. When you distinguish which event, the event
Sub operation flow corresponding to 11, Sub 1Two, Sub
1n-1, Sub 1n Processing is thrown. FIG. 1 (b) shows the sub
sub 1xIt is an example of the operation flow of (x = 1-n). This sub
When the operation flow process is completed, it is again determined whether or not there is an event.
It is returned to the initial state to judge.

【0061】図1(b)のサブ動作フローではまず、re
ad( )を呼ぶ、その次から順にキューから1つ関数と
パラメータの組(func, param1,param2, ・・・,para
m n)を取り、その取り出した関数funcを実行する。キュ
ーを操作する部分はmutex(mutual exclusion lock、相
互排他ロック(コード部分を保護するために使用される
同期変数))を用いて排他的に操作する。最後に、セマ
フォ変数をインクリメントするsema post ( )を実行
してsub 2 を抜ける。また、sema post ( )実行終了
とともにsema wait ( )も抜ける。このとき後述する
プラットフォームPFB 側のsub 2でのsema wait
( )にも通知する。以上を終えるとloop 1の最初状態
に戻る。
In the sub-operation flow shown in FIG.
call ad (), and one function and parameter pair (func, param1, param2, ..., para)
mn) and executes the extracted function func. The part that operates the queue operates exclusively using a mutex (mutual exclusion lock, a mutual exclusion lock (a synchronization variable used to protect the code part)). Finally, the semaphore that increments the semaphore variable Execute post () and sub Exit 2 Also, sema post () sema at the end of execution wait () also exits. At this time, the sub on the platform PF B Sema in 2 wait
Also notify (). After finishing the above, loop Return to the first state of 1.

【0062】もう一方のプラットフォームPFB (スレ
ッド)側の動作フローを図2に示す。この図2の中で図
2(a)はメイン(loop 2) の動作フローであり、同図
(b)はサブ(sub 2)の動作フローである。図2(a)
は図1(a)と同じ動作フローをしていて、イベント発
生の確認とどのイベントが起きたかを常に判断してい
る。そして、発生したイベントに応じ、図2(b)のサ
ブ(sub 2)の動作フローに移る。図2(b)では、呼び
出し関数から引数をキューにつなぐ。Loop 1の監視をし
ているファイルディスクリプタ(fd) にwrite( )す
る。上記の図1(b)sema post ( )実行終了ととも
にsema wait ( )を抜けたとき図2(b)ではsema w
ait ( )される、と順次処理される。この中でLoop 1
の監視をしているfdにwrite( )すると、Loop 1の判
断・イベントがあるか?>が“Yes”となる。このよう
に、図1(b)sub 2 の処理が完了すれば、図2(a)
Loop 2の最初の状態に戻る。
The other platform PFB (sushi
FIG. 2 shows an operation flow on the memory card side. Figure in this Figure 2
2 (a) is the main (loop It is the operation flow of 2).
(B) is a sub This is the operation flow of 2). FIG. 2 (a)
Has the same operation flow as that of FIG.
Always check the liveness and what events have occurred
You. Then, according to the event that has occurred, the service shown in FIG.
Sub Move to the operation flow of 2). In FIG.
Connect the argument from the issuing function to the queue. Loop Monitor 1
Write () to the file descriptor (fd)
You. Figure 1 (b) above post () With the end of execution
To sema When exiting wait (), sema in Figure 2 (b) w
When ait () is performed, it is processed sequentially. Loop in this 1
When write () is performed on fd that is monitoring 1 size
Are there any interruptions / events? > Becomes “Yes”. like this
Figure 1 (b) sub When the processing of step 2 is completed, FIG.
Loop Return to the first state of 2.

【0063】図7に示す第1の実施形態の構成は図12
に示す異なるプラットフォームが別にある構成にキュー
とパイプを加えたものである。プラットフォームPF
A ,PFB がスレッド1、スレッド2に対応している。
この構成で図1と図2で説明した動作が実行される。ま
ず、スレッド2のイベント処理部がキューにデータを格
納し、次にパイプを介してスレッド1のイベント監視部
へ起動信号を送る。そして、スレッド1のイベント処理
部が実行される。
The structure of the first embodiment shown in FIG.
The different platforms shown here are separate configurations with queues and pipes. Platform PF
A, PF B thread 1, which corresponds to thread 2.
With this configuration, the operation described with reference to FIGS. 1 and 2 is performed. First, the event processing unit of thread 2 stores the data in the queue, and then sends an activation signal to the event monitoring unit of thread 1 via a pipe. Then, the event processing unit of the thread 1 is executed.

【0064】以上、本発明の2つのプラットフォームの
イベント監視部の統合方法を示した。そこで、従来例と
本発明がいかに違っているかを表1により説明する。
The method of integrating the event monitoring units of the two platforms according to the present invention has been described above. Therefore, how the conventional example differs from the present invention will be described with reference to Table 1.

【0065】[0065]

【表1】 表1を見ると(1)イベント検出の遅延、(2)プロト
コル定義に撚る作業量(3)データのストリーム化によ
る遅延、(4)コード化維持またはAPIの必要性、
(5)MT対応がポイントとなる。
[Table 1] Table 1 shows that (1) event detection delay, (2) workload to twist on protocol definition, (3) data streaming delay, (4) the need to maintain coding or API,
(5) The point is MT correspondence.

【0066】第1のポイントはイベント検出の遅延であ
る。方式3では、上に示したように主となるイベント監
視部でない方のプラットフォームへきたプラットフォー
ムのイベントを検出するまでの時間がかかってしまう。
The first point is a delay in event detection. In the method 3, as described above, it takes time to detect an event of a platform that has arrived at a platform other than the main event monitoring unit.

【0067】第2のポイントはプロトコル定義の作業量
であるが、方式2では新たにプロトコルを定義しなけれ
ばならない。本発明ではプロトコル定義ではなく、プロ
グラム呼び出しという形であるため、作業量が比較的小
さい。
The second point is the amount of work for defining the protocol. In the method 2, a new protocol must be defined. In the present invention, the amount of work is relatively small because it is not a protocol definition but a program call.

【0068】第3のポイントはデータのストリーム化に
よるデータの遅延である。本発明ではプラットフォーム
PFA とプラットフォームPFB は同一のプロセスで動
作しているため、同一のメモリ空間を共有するため、高
速である。
The third point is a delay in data due to data streaming. In the present invention, since the platform PF A and the platform PF B operate in the same process, they share the same memory space, so that the speed is high.

【0069】第4のポイントのコード開示性について
は、上記に示すように本発明ではセレクト型プラットフ
ォームにFDとそれに対応したコールバック関数を設定
できるAPIがあれば、実現できる。その他の方式は他
のAPIが必要か、もしくはソースコードの開示、改造
が必要である。
As described above, the fourth point of the present invention can be realized if the select type platform has an API that can set an FD and a callback function corresponding to the FD, as described above. Other methods require other APIs, or require disclosure and modification of source code.

【0070】第5のポイントはMT対応である。上に示
したように、MT対応のプラットフォームと、MT対応
でないプラットフォームの統合が本方式では可能であ
る。
The fifth point is for MT. As described above, the present system can integrate an MT-compatible platform and a non-MT-compatible platform.

【0071】プラットフォームPFA がイベントが入る
と新たなスレッドを作成し、その上でイベント処理部を
実行するような、イベント監視部を持つ場合も第1の実
施形態と同じ方式で接続される。
[0071] Platform PF A creates a new thread the event enters, so as to perform the event processing unit thereon, are connected in the same manner also in the first embodiment if it has an event monitoring unit.

【0072】図4は第2の実施形態をスレッドの観点か
ら見た図である、図3と巣の見方は同じである。図4の
プラットフォームPFB がマルチスレッドな状態、つま
りT1,T3がある場合を示している。T1にイベント
が発生して、T1はF5で待ち状態になっている。そし
て、T3が作られ、その上でF4,F3を実行し、その
後、途中は図3と同じである。最後に、F4が終了する
とT3が消される。
FIG. 4 is a view of the second embodiment from the viewpoint of threads, and the nest is the same as that of FIG. Figure 4 Platform PF B multithreaded state, that is, shows a case where there is T1, T3. An event occurs at T1, and T1 is waiting at F5. Then, T3 is created, and F4 and F3 are executed thereon. Thereafter, the process is the same as in FIG. Finally, when F4 ends, T3 is erased.

【0073】この場合、第1の実施形態との違いはプラ
ットフォームPFA のイベントを同時に受け付けること
があるという点である。図5にそれを示す。
[0073] In this case, it is that the difference from the first embodiment is able to accept events platform PF A simultaneously. FIG. 5 shows this.

【0074】時刻t1にプラットフォームPFB にイベ
ントが入ると、新規スレッド(T3)が作られ、そのス
レッド上でF4がコールバックされている。F4はF1
のポインタ引数をF3に渡す。F3の内部でパイプに1
バイトのダミーデータをwrite ( )で書き込むことに
よりプラットフォームPFA のほうでFG2がコールバ
ックされる。キューにつながれた情報からF1が呼び出
される。さて、T1は新規スレッド(T3)を作ると、
次のイベント待ちを開始する。時刻t2に新しいイベン
トが入ってくると、さらに新しいスレッド(T4)を作
り、そのスレッド上でコールバック関数F4’を呼び出
す。F4はF1’のポインタ引数をF3に渡す。ここ
で、時刻t3の時点ではキューに2つの構造体がつなが
れている。T3のF3がwrite ( )を行うと、F2が
コールバックされる。監視FDよりread( )で1バイ
トのデータを読み出す。キューから構造体を取り、F1
へのポインタを得て、F1を呼び出す。F1が終了し、
F2が終了すると、T2は一旦、イベント監視部へ戻
る。このときFDにはあと1バイトのデータが残ってい
るので、select( )から抜け、再度F2がコールバッ
クされる。この後は同様にF1’が呼び出される。
[0074] When time t1 platform PF event enters B, new thread (T3) is made, F4 are callback on that thread. F4 is F1
Is passed to F3. 1 inside the pipe inside F3
FG2 in more of the platform PF A is called back by writing a byte of dummy data in the write (). F1 is called from the information connected to the queue. Now, T1 creates a new thread (T3),
Start waiting for the next event. When a new event arrives at time t2, a new thread (T4) is created, and a callback function F4 'is called on that thread. F4 passes the pointer argument of F1 'to F3. Here, at time t3, the two structures are connected to the queue. When F3 of T3 performs write (), F2 is called back. 1-byte data is read from the monitoring FD by read (). Take structure from queue, F1
Get F1 and call F1. F1 is over,
When F2 ends, T2 temporarily returns to the event monitoring unit. At this time, since one byte of data remains in the FD, select () is exited and F2 is called back again. Thereafter, F1 'is similarly called.

【0075】このようにして一つのイベントの処理が終
る前に、次のイベントがきても第1の実施形態で取った
方法を用いることができる。
As described above, even if the next event comes before the processing of one event ends, the method used in the first embodiment can be used.

【0076】図8に第2の実施形態の構成図を示す。第
1の実施形態の構成である図7と異なる点はプラットフ
ォームPFB のイベントの処理部がイベント毎に別々の
スレッド上で実行される。そこでのイベント処理の動作
は図7の場合と同じである。
FIG. 8 shows a configuration diagram of the second embodiment. Figure 7 differs from the configuration of the first embodiment processor event platform PF B is run on a separate thread for each event. The operation of the event processing there is the same as in the case of FIG.

【0077】図6は第3の実施形態をスレッドの視点か
ら見た図である。ここでは、T1,T3は異なるFDの
引数を実行している様子を示している。プラットフォー
ムPFB がFD毎にスレッドを作り、それぞれのスレッ
ド上でイベント監視部を動かす場合でも第2の実施形態
と同様の方法で接続できる。
FIG. 6 is a diagram showing the third embodiment viewed from a thread point of view. Here, T1 and T3 indicate that different FD arguments are being executed. Platform PF B is to make a thread for each FD, can be connected in the second embodiment the same way even when moving the event monitoring unit on each thread.

【0078】図9に第3の実施形態の構成図を示す。図
8と異なる点はFD毎にスレッドが割り当てられてい
る。このとき、イベント処理部がイベント監視部、通信
処理部は1つのスレッド上にある。そこでのイベント処
理の動作は図8の場合と同じである。
FIG. 9 shows a configuration diagram of the third embodiment. The difference from FIG. 8 is that a thread is assigned for each FD. At this time, the event processing unit is on the event monitoring unit, and the communication processing unit is on one thread. The operation of the event processing there is the same as in the case of FIG.

【0079】[0079]

【発明の効果】本発明のイベント監視部統合法を用い
て、既存通信プラットフォームを用いることにより、効
率的にプロトコル変換器の作成が可能となる。また、従
来方式ではプログラムコードが開示されなければ接続す
ることができなかったプラットフォームについても、本
方式で接続が可能となる。
According to the present invention, the protocol converter can be efficiently created by using the existing communication platform by using the event monitoring unit integration method of the present invention. Also, a platform that could not be connected unless the program code was disclosed in the conventional method can be connected by the present method.

【0080】より現実的な用途にプラットフォームPF
A のプロトコルとしては、Common Management Infomati
on Protocol (CMIP)が当てはある。CMIPは通信網オ
ペレーションシステム(OpS)の分野でITU−Tで
標準化されたプロトコルである。
Platform PF for more realistic applications
A 's protocol is Common Management Infomati
on Protocol (CMIP). CMIP is a protocol standardized by ITU-T in the field of communication network operation system (OpS).

【0081】また、プラットフォームPFBは、 Common
Object Request Broker Architecture (CORBA)が当て
はまる。CORBAは分散オブジェクトプラットフォー
ムとしてObject Management Group (OMG) より決めら
れ、注目されている。CMIPを本発明に基づくプロト
コル変換器によりCORBAを理解する管理装置から、
CMIPを理解する被管理装置を管理することが可能と
なる。
The platform PF B is a Common Platform
Object Request Broker Architecture (CORBA) applies. CORBA has been determined by the Object Management Group (OMG) as a distributed object platform and has been receiving attention. From a management device that understands CORBA with a protocol converter according to the present invention,
It becomes possible to manage a managed device that understands CMIP.

【0082】したがって、CMIPで管理されている通
信ネットワーク制御を計算機のオペレーション環境であ
るCORBA上から簡便に行うことができる。その様子
を図10のCORBA/CMIP接続の概念図に示す。
図10の上側に示された複数台のPCは通信ネットワー
ク制御を行う監視制御部分である。このオペレーション
環境はこれまで説明してきたプラットフォームPFB
相当するCORBAである。同図の下側に示された複数
台の伝送装置は、これまで説明してきたプラットフォー
ムPFA に相当するCMIPを用い管理されている。真
ん中のWSがその両者のプラットフォームを統合してい
るプロトコル変換器である。
Therefore, communication network control managed by CMIP can be easily performed from CORBA, which is the operation environment of the computer. This is shown in the conceptual diagram of the CORBA / CMIP connection in FIG.
The plurality of PCs shown in the upper part of FIG. 10 are a monitoring control unit that performs communication network control. The operating environment is CORBA corresponding to the platform PF B described so far. The plurality of transmission apparatus shown in the lower figure, are managed using the CMIP corresponding to the platform PF A described so far. The WS in the middle is the protocol converter that integrates both platforms.

【0083】本発明によれば、図10に示すようなシス
テム、言い換えれば、既存の制御監視(OpS)システ
ムを持つ伝送装置を、これまた既存の環境のPCで監視
・制御することに加えて、異種のプラットフォームを統
合することが容易に実現される。この際にプラットフォ
ーム間のやりとりで生じる遅延時間も短く、プラットフ
ォームの詳細なソースコードを知らなくとも済むという
利点がある。
According to the present invention, in addition to monitoring and controlling a transmission apparatus having a system as shown in FIG. 10, in other words, an existing control and monitoring (OpS) system, using a PC in an existing environment. , It is easy to integrate heterogeneous platforms. In this case, there is an advantage that the delay time generated in the exchange between the platforms is short, and it is not necessary to know the detailed source code of the platform.

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

【図1】プラットフォームPFAA の動作を示すフロー
チャートである。
FIG. 1 is a flowchart showing an operation of a platform PFA A.

【図2】プラットフォームPFB の動作を示すフローチ
ャートである。
2 is a flowchart showing the operation of the platform PF B.

【図3】第1の実施形態をスレッドの観点から見た図で
ある。
FIG. 3 is a diagram of the first embodiment viewed from a thread point of view.

【図4】第2の実施形態をスレッドの観点から見た図で
ある。
FIG. 4 is a diagram of the second embodiment viewed from a thread point of view.

【図5】第2の実施形態(複数のイベントが同時にきた
場合)をスレッドの観点から見た図である。
FIG. 5 is a diagram showing the second embodiment (when a plurality of events come at the same time) from the viewpoint of a thread.

【図6】第3の実施形態をスレッドの観点から見た図で
ある。
FIG. 6 is a diagram of the third embodiment viewed from a thread point of view.

【図7】第1の実施形態の構成図である。FIG. 7 is a configuration diagram of the first embodiment.

【図8】第2の実施形態の構成図である。FIG. 8 is a configuration diagram of a second embodiment.

【図9】第3の実施形態の構成図である。FIG. 9 is a configuration diagram of a third embodiment.

【図10】CORBA/CMIP接続の概念図である。FIG. 10 is a conceptual diagram of a CORBA / CMIP connection.

【図11】プロトコル変換器の動作を示すブロック図で
ある。
FIG. 11 is a block diagram showing the operation of the protocol converter.

【図12】従来例のプラットフォーム結合前の構成図で
ある。
FIG. 12 is a configuration diagram of a conventional example before platform connection.

【図13】従来例(方式1−1)の構成図である。FIG. 13 is a configuration diagram of a conventional example (method 1-1).

【図14】従来例(方式1−2)の構成図である。FIG. 14 is a configuration diagram of a conventional example (method 1-2).

【図15】従来例(方式1−3)の構成図である。FIG. 15 is a configuration diagram of a conventional example (method 1-3).

【図16】従来例(方式2)の構成図である。FIG. 16 is a configuration diagram of a conventional example (method 2).

【図17】従来例(方式3)の欠点の説明図である。FIG. 17 is an explanatory diagram of a defect of a conventional example (method 3).

【図18】従来例(方式3)の欠点の説明図である。FIG. 18 is an explanatory diagram of a defect of a conventional example (method 3).

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 ファイル・ディスクリプタとイベント処
理関数を結びつけることができるアプリケーション・プ
ログラム・インターフェースを持つ第1、第2のプラッ
トフォーム上で実行される各イベント監視部を統合する
方法であって、 オペレーティングシステムが管理するスレッドを作成
し、 それぞれのスレッドの上で、前記各プラットフォーム上
の異なるイベント監視部を実行し、 また、セレクトで待っているイベント監視部にパイプま
たはソケットを通じてwrite( )システムコールで書
き込むことにより、第1のプラットフォーム上のイベン
ト監視部からイベントの発生を第2のプラットフォーム
上のイベント監視部へ通知し、 呼び出す関数のポインタ、呼び出す関数の引数およびセ
マフォ構造体から構成される構造体を前記キューにつな
ぎ、スレッド間で受け渡しする、異種プラットフォーム
間のイベント監視部統合方法。
1. A method for integrating event monitoring units running on first and second platforms having an application program interface capable of linking a file descriptor with an event processing function, comprising: an operating system Creates the threads managed by, executes the different event monitoring units on each platform on each thread, and writes to the event monitoring unit waiting by select with the write () system call through a pipe or socket Thus, the occurrence of an event is notified from the event monitoring unit on the first platform to the event monitoring unit on the second platform. The queue The tether is passed between threads, event monitoring unit integration method between heterogeneous platforms.
【請求項2】 前記第1のプラットフォームと前記第2
のプラットフォームの両方がセレクト型のイベント監視
部を実行する請求項1記載の異種プラットフォーム間の
イベント監視部統合方法。
2. The first platform and the second platform
2. The method of claim 1, wherein both platforms execute a select type event monitor.
【請求項3】 前記第1のプラットフォーム上ではセレ
クト型のイベント監視部を実行し、前記第2のプラット
フォームがスレッド型のイベント監視部を実行する請求
項1に記載の異種プラットフォーム間のイベント監視部
統合方法。
3. The event monitoring unit according to claim 1, wherein the first platform executes a select type event monitoring unit, and the second platform executes a thread type event monitoring unit. Integration method.
【請求項4】 前記第1のプラットフォーム上と前記第
2のプラットフォーム上とでそれぞれ1つのイベント監
視部を実行する請求項1から3のいずれか1項に記載の
異種プラットフォーム間のイベント監視部統合方法。
4. The event monitoring unit integration between different platforms according to claim 1, wherein one event monitoring unit is executed on each of the first platform and the second platform. Method.
【請求項5】 前記第1のプラットフォーム上と前記第
2のプラットホーム上とで複数のイベント監視部を実行
し、第2のプラットフォームに同種または異種のイベン
ト監視部がある請求項1または請求項3に記載の異種プ
ラットフォーム間のイベント監視部統合方法。
5. The system according to claim 1, wherein a plurality of event monitors are executed on the first platform and on the second platform, and the second platform has the same or different event monitor. 3. The method for integrating an event monitoring unit between heterogeneous platforms according to item 1.
JP9347970A 1997-12-17 1997-12-17 Event monitoring part integration method between different kinds of platforms Pending JPH11175359A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9347970A JPH11175359A (en) 1997-12-17 1997-12-17 Event monitoring part integration method between different kinds of platforms

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9347970A JPH11175359A (en) 1997-12-17 1997-12-17 Event monitoring part integration method between different kinds of platforms

Publications (1)

Publication Number Publication Date
JPH11175359A true JPH11175359A (en) 1999-07-02

Family

ID=18393855

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9347970A Pending JPH11175359A (en) 1997-12-17 1997-12-17 Event monitoring part integration method between different kinds of platforms

Country Status (1)

Country Link
JP (1) JPH11175359A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106557360A (en) * 2016-11-09 2017-04-05 青岛海信电器股份有限公司 Task run method and device
JP2020173870A (en) * 2014-12-18 2020-10-22 インテル コーポレイション Improved function callback mechanism between central processing unit (cpu) and auxiliary processor

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020173870A (en) * 2014-12-18 2020-10-22 インテル コーポレイション Improved function callback mechanism between central processing unit (cpu) and auxiliary processor
CN106557360A (en) * 2016-11-09 2017-04-05 青岛海信电器股份有限公司 Task run method and device
CN106557360B (en) * 2016-11-09 2020-06-16 海信视像科技股份有限公司 Task running method and device

Similar Documents

Publication Publication Date Title
US5060140A (en) Universal programmable data communication connection system
US5212792A (en) Method and apparatus for controlling execution of tools in a computer-aided software engineering system
US8234631B2 (en) Method and system for tracing individual transactions at the granularity level of method calls throughout distributed heterogeneous applications without source code modifications
US5319782A (en) Method for synchronizing the dispatching of tasks among multitasking operating systems
US7013464B2 (en) Method of communicating across an operating system
US20050149908A1 (en) Graphical development of fully executable transactional workflow applications with adaptive high-performance capacity
US8006246B2 (en) Apparatus for forcibly terminating thread blocked on input/output operation and method for the same
JPH03126158A (en) Method and apparatus for scheduling
CA2386658A1 (en) System of reusable software parts for implementing concurrency and hardware access, and methods of use
EP0834808B1 (en) Method and apparatus for user-level support for multiple event synchronization
KR20110047753A (en) Method and system of data processing for deadlock free
US5553298A (en) Method and apparatus for mutual exclusion in self-directed distributed systems
CN101424941B (en) Control implementing method and system
CN100442240C (en) Data processing system having a plurality of processing elements, a method of controlling a data processing system having a plurality of processing elements
JPH11175359A (en) Event monitoring part integration method between different kinds of platforms
CN110825536B (en) Communication method and device between tasks in embedded real-time operating system
US7552440B1 (en) Process communication multiplexer
US20010037354A1 (en) Computer system using a queuing system and method for managing a queue and heterogeneous data structures
US6934953B2 (en) Deferred procedure call in interface description language
KR101341885B1 (en) System for synthesizing software components
KR101607716B1 (en) Data flow network
CN112583927B (en) Service management system based on airborne embedded real-time operating system
JP3544140B2 (en) Exclusive control method in distributed object environment
CN113965561B (en) Asynchronous event driven-based airborne file transmission system
CN117762595A (en) Python process pool optimization method, device, equipment and storage medium