JP6946820B2 - Electronics, controls and programs - Google Patents

Electronics, controls and programs Download PDF

Info

Publication number
JP6946820B2
JP6946820B2 JP2017144669A JP2017144669A JP6946820B2 JP 6946820 B2 JP6946820 B2 JP 6946820B2 JP 2017144669 A JP2017144669 A JP 2017144669A JP 2017144669 A JP2017144669 A JP 2017144669A JP 6946820 B2 JP6946820 B2 JP 6946820B2
Authority
JP
Japan
Prior art keywords
command
status
function
thread
identification information
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.)
Active
Application number
JP2017144669A
Other languages
Japanese (ja)
Other versions
JP2019028557A (en
Inventor
大久保 宏
宏 大久保
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation 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 Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2017144669A priority Critical patent/JP6946820B2/en
Publication of JP2019028557A publication Critical patent/JP2019028557A/en
Application granted granted Critical
Publication of JP6946820B2 publication Critical patent/JP6946820B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Description

本発明は、電子機器、制御装置及びプログラムに関する。 The present invention relates to electronic devices, control devices and programs.

特許文献1には、新たな命令及びデータ伝達方式の追加をしたり、どちらかのプロセッサが別な物理的制限を持つプロセッサに変更された場合にも、柔軟に対処し得るマルチプロセッサ制御方式を提供することを課題とし、第1のプロセッサを持つ処理装置に対し、第2のプロセッサを持つ処理装置が接続されたマルチプロセッサシステムにおいて、第1のプロセッサの内部表記とシステムの標準表記との変換をする第1の変換手段を有し、かつ第2のプロセッサに対して、実行プログラム名と手続名とデータ部を含みかつそのデータ部を前記実行プログラム及び手続の種類に応じて可変長とした内部表記の要求情報を第1の変換手段で標準表記に変換して送出し、応答の種類に応じて可変長とした標準表記の応答情報を受取り第1の変換手段で内部表記に変換する第1の処理手段と、前記第1の処理手段からの標準表記に変換された可変長の要求情報を保持する要求情報バッファと、応答の種類により可変長とした標準表記の応答情報を保持する応答情報バッファと、第1の処理手段からの要求情報により起動され、要求情報バッファから要求情報を取り出す要求取り出し手段と、第2のプロセッサの内部表記とシステムの標準表記との変換をする第2の変換手段を有し、かつ、要求情報バッファから取り出した要求情報を解析して、要求情報で指定された実行プログラムを第2のプロセッサで実行させると共に、その実行の結果を応答の種類に応じて可変長とした内部表記の応答情報を作成し、その応答情報を第2の変換手段で内部表記から標準表記へ変換して保持する第2の処理手段と、第2の処理手段の実行完了により起動され、第2の処理手段から応答情報を取り出し前記応答情報バッファへ送る応答送り出し手段とを備えたことが開示されている。 Patent Document 1 provides a multi-processor control method that can flexibly deal with the addition of a new instruction and data transmission method or a change of either processor to a processor having another physical limitation. In a multi-processor system in which a processing device having a second processor is connected to a processing device having a first processor, the conversion between the internal notation of the first processor and the standard notation of the system is to be provided. The second processor has an execution program name, a procedure name, and a data part, and the data part has a variable length according to the type of the execution program and the procedure. The request information of the internal notation is converted into the standard notation by the first conversion means and sent, and the response information of the standard notation having a variable length according to the type of the response is received and converted into the internal notation by the first conversion means. 1. Processing means, request information buffer holding variable length request information converted into standard notation from the first processing means, and response holding standard notation response information having variable length depending on the type of response. A second processing means that is activated by the information buffer and the request information from the first processing means and retrieves the request information from the request information buffer, and a second that converts the internal notation of the second processor and the standard notation of the system. It has a conversion means, analyzes the request information fetched from the request information buffer, executes the execution program specified by the request information on the second processor, and executes the execution result according to the type of response. By creating the response information of the internal notation with variable length, converting the response information from the internal notation to the standard notation by the second conversion means and holding it, and by completing the execution of the second processing means. It is disclosed that the response sending means which is activated and takes out the response information from the second processing means and sends it to the response information buffer is provided.

特許文献2には、マルチプロセッサシステムのプロセッサ間でのコマンドの受け渡し後にいずれかのプロセッサでプログラムが再起動された場合の誤動作を防ぐことを課題とし、第1OS(Operating System)を実行する第1制御手段と、第2OSを実行する第2制御手段と、前記第2制御手段によって制御されるデバイスとを備え、前記第1制御手段は、前記第1OS上で動作中のプロセスが呼び出した関数を前記第1OSと前記第2OSとで共通に解釈されるコマンドに変換する第1変換手段と、前記第1変換手段によって変換されたコマンドを前記第2制御手段の記憶領域に書き込むコマンド書込手段と、前記コマンド書込手段によって書き込まれたコマンドに対応する前記第2OSのシステムコールの前記第2制御手段による実行の結果を示すステータスが前記記憶領域に書き込まれたことを示す通知を受けた場合に当該ステータスを前記記憶領域から読み出すステータス読出手段と、前記ステータス読出手段によって読み出された前記ステータスを前記プロセスが解釈する戻り値に変換し、当該戻り値を前記プロセスに返す第2変換手段と、前記コマンド書込手段による前記コマンドの書き込み後、前記ステータス読出手段によって前記ステータスが読み出される前に前記プロセスが再起動された場合に、前記プロセスの再起動後に前記ステータス読出手段によって読み出された前記ステータスを廃棄するステータス廃棄手段とを備えたことが開示されている。 Patent Document 2 has an object of preventing a malfunction when a program is restarted on one of the processors after passing a command between processors of a multi-processor system, and a first OS (Operating System) is executed. The first control means includes a control means, a second control means for executing the second OS, and a device controlled by the second control means, and the first control means performs a function called by a process running on the first OS. A first conversion means for converting into a command commonly interpreted by the first OS and the second OS, and a command writing means for writing the command converted by the first conversion means into the storage area of the second control means. , When a notification is received indicating that the status indicating the result of execution of the system call of the second OS corresponding to the command written by the command writing means by the second control means has been written to the storage area. A status reading means for reading the status from the storage area, a second conversion means for converting the status read by the status reading means into a return value interpreted by the process, and returning the return value to the process. If the process is restarted after the command writing means writes the command and before the status is read by the status reading means, the read by the status reading means after the process is restarted. It is disclosed that it is provided with a status disposal means for discarding the status.

特許第2976576号公報Japanese Patent No. 2976576 特開2015−005097号公報Japanese Unexamined Patent Publication No. 2015-005097

複数のOSを制御して、異なる関数をそれぞれ異なるデバイスで同時に実行させるマルチプロセッサ制御技術がある。このマルチプロセッサ制御技術では、1種類の関数を複数の異なるデバイスで同時に実行させることは考慮されていないため、コマンドの元となる関数を呼び出したスレッドを識別できない。
本発明は、関数を呼び出したスレッドを識別できる情報を付加して、関数からコマンドに変換できる電子機器、制御装置及びプログラムを提供することを目的としている。
There is a multiprocessor control technology that controls a plurality of OSs and executes different functions on different devices at the same time. Since this multiprocessor control technology does not consider executing one type of function on a plurality of different devices at the same time, it is not possible to identify the thread that called the function that is the source of the command.
An object of the present invention is to provide an electronic device, a control device, and a program that can convert a function into a command by adding information that can identify the thread that called the function.

かかる目的を達成するための本発明の要旨とするところは、次の各項の発明に存する。
発明[1]は、第1OSによる制御を実行する第1制御手段と、第2OSによる制御を実行する第2制御手段と、前記第2制御手段によって制御されるデバイスとを備え、前記第1制御手段は、前記第1OS上で動作中のプロセスが呼び出した関数を前記第1OSと前記第2OSとで共通に解釈されるコマンドに変換する第1変換手段と、前記第1変換手段によって変換されたコマンドを前記第2制御手段の記憶領域に書き込むコマンド書込手段と、前記コマンド書込手段によって書き込まれたコマンドに対応する前記第2OSのシステムコールの前記第2制御手段による実行の結果を示すステータスが前記記憶領域に書き込まれたことを示す通知を受けた場合に当該ステータスを前記記憶領域から読み出すステータス読出手段と、前記ステータス読出手段によって読み出された前記ステータスを前記プロセスが解釈する戻り値に変換し、当該戻り値を前記プロセスに返す第2変換手段を備え、前記プロセス内には複数のスレッドが実行されており、前記関数は、該スレッドが呼び出しており、前記第1変換手段は、前記関数が多重実行可能である場合、前記スレッドを識別するスレッド識別情報を付加したコマンドに変換し、前記ステータス読出手段は、前記ステータスとともにスレッド識別情報を読み出し、前記第2変換手段は、前記ステータス読出手段によって読み出された前記スレッド識別情報にしたがって、ステータスを前記スレッドが解釈する戻り値に変換する、電子機器である。
The gist of the present invention for achieving such an object lies in the inventions of the following items.
The invention [1] includes a first control means for executing control by the first OS, a second control means for executing control by the second OS, and a device controlled by the second control means, and the first control. The means were converted by the first conversion means for converting the function called by the process running on the first OS into a command commonly interpreted by the first OS and the second OS, and the first conversion means. A status indicating a command writing means for writing a command to the storage area of the second control means and a status indicating the result of execution of the system call of the second OS corresponding to the command written by the command writing means by the second control means. The status reading means that reads the status from the storage area when notified that the status has been written to the storage area, and the return value that the process interprets the status read by the status reading means. A second conversion means for converting and returning the return value to the process is provided, a plurality of threads are executed in the process, the function is called by the thread, and the first conversion means is When the function can be executed multiple times, it is converted into a command to which the thread identification information for identifying the thread is added, the status reading means reads the thread identification information together with the status, and the second conversion means reads the status. An electronic device that converts a status into a return value interpreted by the thread according to the thread identification information read by the reading means.

発明[2]は、前記第1変換手段は、前記関数に前記スレッド識別情報が付加されている場合は、該スレッド識別情報を付加したコマンドに変換する、発明[1]に記載の電子機器である。
The invention [2] is the electronic device according to the invention [1] , wherein the first conversion means converts the thread identification information into a command to which the thread identification information is added when the thread identification information is added to the function. be.

発明[3]は、前記第1変換手段は、前記関数に前記スレッド識別情報が付加されていない場合は、スレッド識別情報を生成し、生成したスレッド識別情報を付加したコマンドに変換する、発明[1]に記載の電子機器である。
According to the invention [3] , when the thread identification information is not added to the function, the first conversion means generates the thread identification information and converts the generated thread identification information into a command to which the thread identification information is added . 1] The electronic device according to the above.

発明[4]は、前記第1変換手段は、前記関数が多重実行可能でない場合は、該関数を呼び出したスレッドにエラーを返信する、発明[1]に記載の電子機器である。
The invention [4] is the electronic device according to the invention [1] , wherein the first conversion means returns an error to the thread that called the function when the function is not multi-executable.

発明[5]は、前記第1変換手段は、前記関数に前記スレッド識別情報が付加されている場合であって、前記関数が多重実行可能でないときは、スレッド識別情報を無効化し、該関数を呼び出したスレッドにエラーを返信する、発明[4]に記載の電子機器である。
According to the invention [5] , when the first conversion means adds the thread identification information to the function and the function cannot be executed multiple times, the thread identification information is invalidated and the function is used. The electronic device according to the invention [4] , which returns an error to the calling thread.

発明[6]は、前記第1変換手段は、前記関数に前記スレッド識別情報が付加されていない場合であって、前記関数が多重実行可能でないときは、該関数を呼び出したスレッドにエラーを返信する、発明[4]に記載の電子機器である。
In the invention [6] , the first conversion means returns an error to the thread that called the function when the thread identification information is not added to the function and the function cannot be executed multiple times. The electronic device according to the invention [4].

発明[7]は、前記コマンド書込手段による前記コマンドの書き込み後、前記ステータス読出手段によって前記ステータスが読み出される前に前記プロセスが再起動された場合に、前記プロセスの再起動後に前記ステータス読出手段によって読み出された前記ステータスを廃棄するステータス廃棄手段をさらに備えた発明[1]から[6]のいずれか一項に記載の電子機器である。
According to the invention [7] , when the process is restarted after the command writing means writes the command and before the status is read by the status reading means, the status reading means is restarted after the process is restarted. The electronic device according to any one of the inventions [1] to [6] , further comprising a status disposal means for discarding the status read by.

発明[8]は、前記コマンドが前記記憶領域に書き込まれた場合にONを示し、前記プロセスが再起動された場合にOFFを示すフラグを、前記コマンドの種類毎に記憶するフラグ記憶手段を備え、前記ステータス廃棄手段は、前記ステータス読出手段によるステータスの読み出し後に当該ステータスに対応するコマンドの種類と対応付けて前記フラグ記憶手段に記憶されているフラグがOFFを示す場合に、当該ステータスを廃棄する、発明[7]に記載の電子機器である。
The invention [8] includes a flag storage means for storing a flag indicating ON when the command is written in the storage area and OFF when the process is restarted for each type of the command. , The status discarding means discards the status when the flag stored in the flag storage means indicates OFF in association with the type of command corresponding to the status after the status is read by the status reading means. , The electronic device according to the invention [7].

発明[9]は、コマンドの種類毎に、前記コマンド書込手段によるコマンドの書き込み回数から、前記ステータス読出手段による当該コマンドの種類に対応するステータスの読み出し回数を差し引いた数を示すカウンタを記憶するカウンタ記憶手段を備え、前記ステータス廃棄手段は、前記ステータス読出手段によるステータスの読み出し後に、当該ステータスに対応するコマンドの種類と対応付けて前記フラグ記憶手段に記憶されているフラグが有効を示し、かつ、当該ステータスに対応するコマンドの種類と対応付けて前記カウンタ記憶手段に記憶されているカウンタが1を示さない場合に、当該ステータスを廃棄する、発明[8]に記載の電子機器である。
The present invention [9] stores a counter indicating the number of times a command is written by the command writing means minus the number of times a status read corresponding to the type of the command is read by the status reading means for each type of command. The status discarding means includes counter storage means, and after reading the status by the status reading means, the flag stored in the flag storage means is valid in association with the type of the command corresponding to the status. The electronic device according to the invention [8] , wherein the status is discarded when the counter stored in the counter storage means does not show 1 in association with the type of the command corresponding to the status.

発明[10]は、前記第1変換手段によって変換されたコマンドを保持するコマンド保持手段と、前記コマンド書込手段による前記コマンドの書き込み後、当該コマンドに対応する前記第2OSのシステムコールが前記第2制御手段によって実行される前に前記第2OSが再起動された場合に、前記コマンド保持手段によって保持された前記コマンドを前記記憶領域に書き込むコマンド再書込手段をさらに備えた発明[7]から[9]のいずれか一項に記載の電子機器である。
In the invention [10] , a command holding means for holding a command converted by the first conversion means and a system call of the second OS corresponding to the command after writing the command by the command writing means are the first. 2 From the invention [7] further provided with a command rewriting means for writing the command held by the command holding means to the storage area when the second OS is restarted before being executed by the control means. The electronic device according to any one of [9].

発明[11]は、前記コマンド再書込手段は、前記第2OSの再起動後にopenコマンドに対応するステータスが前記ステータス読出手段によって読み出された場合に、当該ステータスに含まれるファイルディスクリプタを引数とするコマンドを前記記憶領域に書き込む、発明[9]又は[10]に記載の電子機器である。
According to the invention [11] , when the status corresponding to the open command is read by the status reading means after the second OS is restarted, the command rewriting means takes a file descriptor included in the status as an argument. The electronic device according to the invention [9] or [10] , which writes a command to be executed in the storage area.

発明[12]は、前記デバイスは、画像データに基づいて画像を形成する、発明[1]から[11]のいずれか一項に記載の電子機器である。
According to the invention [12] , the device is an electronic device according to any one of the inventions [1] to [11] , which forms an image based on image data.

発明[13]は、第1OS上で動作中のプロセスが呼び出した関数を前記第1OSと第2OSとで共通に解釈されるコマンドに変換する第1変換手段と、前記第1変換手段によって変換されたコマンドを、前記第2OSを実行する第2の制御装置の記憶領域に書き込むコマンド書込手段と、前記コマンド書込手段によって書き込まれたコマンドに対応する前記第2OSのシステムコールの前記第2の制御装置による実行の結果を示すステータスが前記記憶領域に書き込まれたことを示す通知を受けた場合に当該ステータスを前記記憶領域から読み出すステータス読出手段と、前記ステータス読出手段によって読み出された前記ステータスを前記プロセスが解釈する戻り値に変換し、当該戻り値を前記プロセスに返す第2変換手段を備え、前記プロセス内には複数のスレッドが実行されており、前記関数は、該スレッドが呼び出しており、前記第1変換手段は、前記関数が多重実行可能である場合、前記スレッドを識別するスレッド識別情報を付加したコマンドに変換し、前記ステータス読出手段は、前記ステータスとともにスレッド識別情報を読み出し、前記第2変換手段は、前記ステータス読出手段によって読み出された前記スレッド識別情報にしたがって、ステータスを前記スレッドが解釈する戻り値に変換する、制御装置である。
The invention [13] is converted by the first conversion means for converting a function called by a process running on the first OS into a command commonly interpreted by the first OS and the second OS, and the first conversion means. The command writing means for writing the command to the storage area of the second control device that executes the second OS, and the second system call of the second OS corresponding to the command written by the command writing means. A status reading means for reading the status from the storage area when a notification indicating that the status indicating the result of execution by the control device has been written to the storage area is received, and the status read by the status reading means. Is converted into a return value interpreted by the process, and a second conversion means for returning the return value to the process is provided. A plurality of threads are executed in the process, and the function is called by the thread. When the function can be executed multiple times, the first conversion means converts the function into a command to which the thread identification information for identifying the thread is added, and the status reading means reads the thread identification information together with the status. The second conversion means is a control device that converts the status into a return value interpreted by the thread according to the thread identification information read by the status reading means.

発明[14]は、コンピュータを、第1OS上で動作中のプロセスが呼び出した関数を前記第1OSと第2OSとで共通に解釈されるコマンドに変換する第1変換手段と、前記第1変換手段によって変換されたコマンドを、前記第2OSを実行する第2のコンピュータの記憶領域に書き込むコマンド書込手段と、前記コマンド書込手段によって書き込まれたコマンドに対応する前記第2OSのシステムコールの前記第2のコンピュータによる実行の結果を示すステータスが前記記憶領域に書き込まれたことを示す通知を受けた場合に当該ステータスを前記記憶領域から読み出すステータス読出手段と、前記ステータス読出手段によって読み出された前記ステータスを前記プロセスが解釈する戻り値に変換し、当該戻り値を前記プロセスに返す第2変換手段として機能させ、前記プロセス内には複数のスレッドが実行されており、前記関数は、該スレッドが呼び出しており、前記第1変換手段は、前記関数が多重実行可能である場合、前記スレッドを識別するスレッド識別情報を付加したコマンドに変換し、前記ステータス読出手段は、前記ステータスとともにスレッド識別情報を読み出し、前記第2変換手段は、前記ステータス読出手段によって読み出された前記スレッド識別情報にしたがって、ステータスを前記スレッドが解釈する戻り値に変換する、プログラムである。
The invention [14] comprises a first conversion means for converting a computer into a command called by a process running on the first OS into a command commonly interpreted by the first OS and the second OS, and the first conversion means. The command writing means for writing the command converted by the second OS to the storage area of the second computer executing the second OS, and the first system call of the second OS corresponding to the command written by the command writing means. A status reading means for reading the status from the storage area when a notification indicating that the status indicating the result of execution by the computer of 2 has been written to the storage area is received, and the status reading means read by the status reading means. A plurality of threads are executed in the process by converting the status into a return value interpreted by the process and functioning as a second conversion means for returning the return value to the process. When the function can be executed multiple times, the first conversion means converts the function into a command to which the thread identification information for identifying the thread is added, and the status reading means outputs the thread identification information together with the status. Reading, the second conversion means is a program that converts the status into a return value interpreted by the thread according to the thread identification information read by the status reading means.

発明[1]の電子機器によれば、関数を呼び出したスレッドを識別できる情報を付加して、関数からコマンドに変換できる。
According to the electronic device of the invention [1] , information that can identify the thread that called the function can be added, and the function can be converted into a command.

発明[2]の電子機器によれば、関数にスレッド識別情報が付加されている場合は、そのスレッド識別情報を付加したコマンドに変換することができる。
According to the electronic device of the invention [2] , when the thread identification information is added to the function, it can be converted into a command to which the thread identification information is added.

発明[3]の電子機器によれば、関数にスレッド識別情報が付加されていない場合は、スレッド識別情報を生成し、生成したスレッド識別情報を付加したコマンドに変換することができる。
According to the electronic device of the invention [3] , when the thread identification information is not added to the function, the thread identification information can be generated and converted into a command to which the generated thread identification information is added.

発明[4]の電子機器によれば、関数が多重実行可能でない場合は、その関数を呼び出したスレッドにエラーを返信することができる。
According to the electronic device of the invention [4] , if the function cannot be executed multiple times, an error can be returned to the thread that called the function.

発明[5]の電子機器によれば、関数にスレッド識別情報が付加されている場合であって、関数が多重実行可能でないときは、スレッド識別情報を無効化し、その関数を呼び出したスレッドにエラーを返信することができる。
According to the electronic device of the invention [5] , when the thread identification information is added to the function and the function cannot be executed multiple times, the thread identification information is invalidated and an error occurs in the thread that called the function. Can be replied.

発明[6]の電子機器によれば、関数にスレッド識別情報が付加されていない場合であって、関数が多重実行可能でないときは、その関数を呼び出したスレッドにエラーを返信することができる。
According to the electronic device of the invention [6] , when the thread identification information is not added to the function and the function cannot be executed multiple times, an error can be returned to the thread that called the function.

発明[7]の電子機器によれば、マルチプロセッサシステムのプロセッサ間でのコマンドの受け渡し後にいずれかのプロセッサでプログラムが再起動された場合の誤動作を防ぐことができる。
According to the electronic device of the invention [7] , it is possible to prevent a malfunction when a program is restarted on any of the processors after passing a command between the processors of the multiprocessor system.

発明[8]の電子機器によれば、読み出されたステータスに対応するコマンドの種類毎にステータスを廃棄するか否かを判断することができる。
According to the electronic device of the invention [8] , it is possible to determine whether or not to discard the status for each type of command corresponding to the read status.

発明[9]の電子機器によれば、プログラムの再起動を伴わないプロセッサの不具合がある場合であっても、プロセッサの誤動作を防ぐことができる。
According to the electronic device of the invention [9] , even if there is a problem with the processor without restarting the program, it is possible to prevent the processor from malfunctioning.

発明[10]の電子機器によれば、マルチプロセッサシステムのプロセッサ間でのコマンドの受け渡し後にいずれかのプロセッサでプログラムが再起動された場合の誤動作を防ぐことができる。
According to the electronic device of the invention [10] , it is possible to prevent a malfunction when a program is restarted on any of the processors after passing a command between the processors of the multiprocessor system.

発明[11]の電子機器によれば、第2OSの再起動後にファイルが特定できなくなることを防ぐことができる。
According to the electronic device of the invention [11] , it is possible to prevent the file from becoming unidentifiable after the second OS is restarted.

発明[12]の電子機器によれば、マルチプロセッサシステムのプロセッサ間でのコマンドの受け渡し後にいずれかのプロセッサでプログラムが再起動された場合の誤動作を防ぐことができる。
According to the electronic device of the invention [12] , it is possible to prevent a malfunction when a program is restarted on any of the processors after passing a command between the processors of the multiprocessor system.

発明[13]の制御装置によれば、関数を呼び出したスレッドを識別できる情報を付加して、関数からコマンドに変換できる。
According to the control device of the invention [13] , information that can identify the thread that called the function can be added, and the function can be converted into a command.

発明[14]のプログラムによれば、関数を呼び出したスレッドを識別できる情報を付加して、関数からコマンドに変換できる。 According to the program of the invention [14] , the function can be converted into a command by adding information that can identify the thread that called the function.

従来システム(多重コール禁止/シングルプロセッサ)の例を示している。An example of a conventional system (multiple call prohibition / single processor) is shown. 従来システム(多重コール禁止/マルチプロセッサ)の例を示している。An example of a conventional system (multiple call prohibition / multiprocessor) is shown. 従来システム(多重コール許可/シングルプロセッサ)の例を示している。An example of a conventional system (multiple call permission / single processor) is shown. 本実施の形態のシステム(多重コール許可/マルチプロセッサ)の例を示している。An example of the system (multiple call permission / multiprocessor) of this embodiment is shown. 本実施の形態を実現するコンピュータのハードウェア構成例を示すブロック図である。It is a block diagram which shows the hardware configuration example of the computer which realizes this embodiment. 従来システムにおけるコマンドフォーマットの例を示している。An example of the command format in the conventional system is shown. 従来システムにおけるステータスフォーマットの例を示している。An example of the status format in the conventional system is shown. コマンドフォーマットの例を示している。An example of the command format is shown. ステータスフォーマットの例を示している。An example of the status format is shown. 本実施の形態におけるシステム(多重実行判別機能)の例を示している。An example of the system (multiple execution discrimination function) in the present embodiment is shown. 本実施の形態における多重実行判別機能の例を示している。An example of the multiple execution discrimination function in this embodiment is shown. 本実施の形態における多重実行判別機能の各コマンドID毎の構成内訳図の例を示している。An example of a configuration breakdown diagram for each command ID of the multiple execution determination function in the present embodiment is shown. 本実施の形態における実施例(不要なステータス廃棄機能)の例を示している。An example of an embodiment (unnecessary status disposal function) in this embodiment is shown. 本実施の形態における不要なステータス廃棄機能の例を示している。An example of an unnecessary status discard function in this embodiment is shown. 本実施の形態における不要なステータス廃棄機能の各コマンドID毎の構成内訳図の例を示している。An example of a configuration breakdown diagram for each command ID of the unnecessary status discard function in this embodiment is shown. 本実施の形態における実施例(コマンド再発行機能)の例を示している。An example of an embodiment (command reissue function) in this embodiment is shown. 本実施の形態におけるコマンド再発行機能の例を示している。An example of the command reissue function in this embodiment is shown. 本実施の形態におけるコマンド再発行機能の各コマンドID毎の構成内訳図の例を示している。An example of the configuration breakdown diagram for each command ID of the command reissue function in the present embodiment is shown. 本実施の形態におけるコマンド再発行機能のopenコマンド再発行機能の構成内訳図の例を示している。An example of the configuration breakdown diagram of the open command reissue function of the command reissue function in the present embodiment is shown. 多重実行判別機能のコマンド発行処理シーケンスの例を示している。An example of the command issuance processing sequence of the multiple execution discrimination function is shown. 多重実行判別機能のコマンド発行処理シーケンスの例を示している。An example of the command issuance processing sequence of the multiple execution discrimination function is shown. 不要なステータス廃棄機能の初期化処理シーケンスの例を示している。An example of the initialization processing sequence of the unnecessary status discard function is shown. 不要なステータス廃棄機能のopenメソッド内での処理シーケンスの例を示している。An example of the processing sequence in the open method of the unnecessary status discard function is shown. 不要なステータス廃棄機能のwriteメソッド内での処理シーケンスの例を示している。An example of the processing sequence in the write method of the unnecessary status discard function is shown. 不要なステータス廃棄機能のreadメソッド内での処理シーケンスの例を示している。An example of the processing sequence in the read method of the unnecessary status discard function is shown. コマンド再発行機能の初期化処理シーケンスの例を示している。An example of the initialization processing sequence of the command reissue function is shown. コマンド再発行機能のwriteメソッド内での処理シーケンスの例を示している。An example of the processing sequence in the write method of the command reissue function is shown. コマンド再発行機能のreadメソッド内での処理シーケンスの例を示している。An example of the processing sequence in the read method of the command reissue function is shown.

図面に基づき本発明を実現するにあたっての好適な一実施の形態の例を説明する。
なお、モジュールとは、一般的に論理的に分離可能なソフトウェア(コンピュータ・プログラム)、ハードウェア等の部品を指す。したがって、本実施の形態におけるモジュールはコンピュータ・プログラムにおけるモジュールのことだけでなく、ハードウェア構成におけるモジュールも指す。それゆえ、本実施の形態は、それらのモジュールとして機能させるためのコンピュータ・プログラム(コンピュータにそれぞれの手順を実行させるためのプログラム、コンピュータをそれぞれの手段として機能させるためのプログラム、コンピュータにそれぞれの機能を実現させるためのプログラム)、システム及び方法の説明をも兼ねている。ただし、説明の都合上、「記憶する」、「記憶させる」、これらと同等の文言を用いるが、これらの文言は、実施の形態がコンピュータ・プログラムの場合は、記憶装置に記憶させる、又は記憶装置に記憶させるように制御するという意味である。また、モジュールは機能に一対一に対応していてもよいが、実装においては、1モジュールを1プログラムで構成してもよいし、複数モジュールを1プログラムで構成してもよく、逆に1モジュールを複数プログラムで構成してもよい。また、複数モジュールは1コンピュータによって実行されてもよいし、分散又は並列環境におけるコンピュータによって1モジュールが複数コンピュータで実行されてもよい。なお、1つのモジュールに他のモジュールが含まれていてもよい。また、以下、「接続」とは物理的な接続の他、論理的な接続(データの授受、指示、データ間の参照関係等)の場合にも用いる。「予め定められた」とは、対象としている処理の前に定まっていることをいい、本実施の形態による処理が始まる前はもちろんのこと、本実施の形態による処理が始まった後であっても、対象としている処理の前であれば、そのときの状況・状態にしたがって、又はそれまでの状況・状態にしたがって定まることの意を含めて用いる。「予め定められた値」が複数ある場合は、それぞれ異なった値であってもよいし、2以上の値(もちろんのことながら、全ての値も含む)が同じであってもよい。また、「Aである場合、Bをする」という記載は、「Aであるか否かを判断し、Aであると判断した場合はBをする」の意味で用いる。ただし、Aであるか否かの判断が不要である場合を除く。また、「A、B、C」等のように事物を列挙した場合は、断りがない限り例示列挙であり、その1つのみを選んでいる場合(例えば、Aのみ)を含む。
また、システム又は装置とは、複数のコンピュータ、ハードウェア、装置等がネットワーク(一対一対応の通信接続を含む)等の通信手段で接続されて構成されるほか、1つのコンピュータ、ハードウェア、装置等によって実現される場合も含まれる。「装置」と「システム」とは、互いに同義の用語として用いる。もちろんのことながら、「システム」には、人為的な取り決めである社会的な「仕組み」(社会システム)にすぎないものは含まない。
また、各モジュールによる処理毎に又はモジュール内で複数の処理を行う場合はその処理毎に、対象となる情報を記憶装置から読み込み、その処理を行った後に、処理結果を記憶装置に書き出すものである。したがって、処理前の記憶装置からの読み込み、処理後の記憶装置への書き出しについては、説明を省略する場合がある。なお、ここでの記憶装置としては、ハードディスク、RAM(Random Access Memory)、外部記憶媒体、通信回線を介した記憶装置、CPU(Central Processing Unit)内のレジスタ等を含んでいてもよい。
An example of a preferred embodiment for realizing the present invention will be described with reference to the drawings.
The module generally refers to parts such as software (computer program) and hardware that can be logically separated. Therefore, the module in this embodiment refers not only to the module in the computer program but also to the module in the hardware configuration. Therefore, in the present embodiment, a computer program for functioning as those modules (a program for causing the computer to execute each procedure, a program for causing the computer to function as each means, and each function for the computer). It also serves as an explanation of the program), system and method for realizing the above. However, for convenience of explanation, words equivalent to "remember" and "remember" are used, but these words are stored in a storage device or stored when the embodiment is a computer program. It means that it is controlled so that it is stored in the device. Further, the modules may have a one-to-one correspondence with the functions, but in mounting, one module may be configured by one program, a plurality of modules may be configured by one program, and conversely, one module may be configured. May be composed of a plurality of programs. Further, the plurality of modules may be executed by one computer, or one module may be executed by a plurality of computers by a computer in a distributed or parallel environment. In addition, one module may include another module. In addition, hereinafter, "connection" is used not only for physical connection but also for logical connection (data transfer, instruction, reference relationship between data, etc.). "Predetermined" means that it is determined before the target process, not only before the process according to the present embodiment starts, but also after the process according to the present embodiment starts. However, if it is before the target process, it is used with the intention that it is determined according to the situation / state at that time or according to the situation / state up to that point. When there are a plurality of "predetermined values", they may be different values, or two or more values (including all values, of course) may be the same. Further, the description "if A, do B" is used to mean "determine whether or not it is A, and if it is determined to be A, do B". However, this excludes cases where it is not necessary to determine whether or not it is A. Further, when a thing is listed such as "A, B, C", it is an example list unless otherwise specified, and includes a case where only one of them is selected (for example, only A).
In addition, a system or device is configured by connecting a plurality of computers, hardware, devices, etc. by communication means such as a network (including a one-to-one correspondence communication connection), and one computer, hardware, device, etc. It also includes cases where it is realized by such means. "Device" and "system" are used as synonymous terms. Of course, the "system" does not include anything that is nothing more than a social "mechanism" (social system) that is an artificial arrangement.
In addition, for each process by each module or when multiple processes are performed in the module, the target information is read from the storage device, and after the processes are performed, the process results are written to the storage device. be. Therefore, the description of reading from the storage device before processing and writing to the storage device after processing may be omitted. The storage device here may include a hard disk, a RAM (Random Access Memory), an external storage medium, a storage device via a communication line, a register in a CPU (Central Processing Unit), and the like.

本実施の形態は、2つのCPUを備えた、いわゆるマルチプロセッサシステムを基本構成とするが、ここで、シングルプロセッサシステムとマルチプロセッサシステムの基本的なソフトウェア構成について説明する。なお、以下の説明では、便宜上、ソフトウェアの構成要素を動作の主体とする。
特許文献1に記載の技術は、第1のプロセッサと第2のプロセッサ間での要求情報とその応答情報の種類は複数サポートされているが、1つの種類の要求情報とその応答情報を複数実行することは想定されていない。また、特許文献2に記載の技術では、例外処理に対応しているが、1つの種類の要求情報とその応答情報を複数実行することは想定されていない。
The present embodiment has a so-called multiprocessor system including two CPUs as a basic configuration, and here, a basic software configuration of a single processor system and a multiprocessor system will be described. In the following description, for convenience, software components will be the main body of operation.
The technique described in Patent Document 1 supports a plurality of types of request information and its response information between the first processor and the second processor, but executes a plurality of one type of request information and its response information. It is not supposed to be done. Further, although the technique described in Patent Document 2 supports exception handling, it is not assumed that one type of request information and a plurality of response information thereof are executed.

図1は、従来システム(多重コール禁止/シングルプロセッサ)の例を示している。OS(Operating System)には、デバイス(図示省略)を制御するドライバ8が備えられている。プロセス1は、アプリケーションプログラムを構成するプロセスである。プロセス1では、スレッド[1]:2、スレッド[2]:3、スレッド[3]:4がそれぞれAPI(Application Programming Interface)5、6、7を介したシステムコール10によってドライバ8を呼び出す。呼び出されたドライバ8は、システムコール10の内容に応じた処理を実行し、それぞれの処理の実行結果を表す戻り値11をAPI5、6、7を介してプロセス1に返す。このシステムでは、シングルプロセッサ上での多重コール禁止のシステムを示している。 FIG. 1 shows an example of a conventional system (multiple call prohibition / single processor). The OS (Operating System) includes a driver 8 that controls a device (not shown). Process 1 is a process that constitutes an application program. In process 1, thread [1]: 2, thread [2]: 3, and thread [3]: 4 call the driver 8 by system call 10 via API (Application Programming Interface) 5, 6, and 7, respectively. The called driver 8 executes a process according to the content of the system call 10, and returns a return value 11 representing the execution result of each process to the process 1 via APIs 5, 6 and 7. This system shows a system that prohibits multiple calls on a single processor.

図2は、従来システム(多重コール禁止/マルチプロセッサ)の例を示している。ただし、本実施の形態のベースシステムになり得るものである。プロセス1は第1制御手段側で動作し、ドライバ8は第2制御手段側で動作するため、プロセス1内のスレッド[1]:2、スレッド[2]:3、スレッド[3]:4は、第1OS17の共有ライブラリ15を介してシステムコール10を実行する。具体的には、API12、13、14で呼び出されるシステムコール10をライブラリ15で解釈される関数21に予め対応付けていてもよいし、あるいは、プロセス1が関数21を直接呼び出すように構成されていてもよい。関数21が呼び出されると、ライブラリ15は、第2OS9にこの関数21の内容を渡すために、この関数21を第1OS17と第2OS9とで共通に解釈されるコマンド29に変換してOS間通信ドライバ16に渡す。OS間通信ドライバ16は、このコマンド29をOS間通信によってPCle18を介してOS間通信ドライバ19に送信する。OS間通信のインターフェースはいかなる方式でもよいが、本実施形態では、PCI(Peripheral Component Interconnect)Express(登録商標。以下、PCIeと略す。)を用いた例を示す。 FIG. 2 shows an example of a conventional system (multiple call prohibition / multiprocessor). However, it can be the base system of this embodiment. Since the process 1 operates on the first control means side and the driver 8 operates on the second control means side, the threads [1]: 2, threads [2]: 3, and threads [3]: 4 in the process 1 are , The system call 10 is executed via the shared library 15 of the first OS17. Specifically, the system call 10 called by APIs 12, 13 and 14 may be associated with the function 21 interpreted by the library 15 in advance, or the process 1 is configured to directly call the function 21. You may. When the function 21 is called, the library 15 converts the function 21 into a command 29 that is commonly interpreted by the first OS 17 and the second OS 9 in order to pass the contents of the function 21 to the second OS 9, and the OS-to-OS communication driver. Pass to 16. The inter-OS communication driver 16 transmits this command 29 to the inter-OS communication driver 19 via the PCle 18 by inter-OS communication. The interface for inter-OS communication may be any method, but in the present embodiment, an example using PCI (Peripheral Component Interconnect) Express (registered trademark, hereinafter abbreviated as PCIe) will be shown.

OS間通信ドライバ19は、受信したコマンド29をタスク20に渡す。コマンド29を受け取ったタスク20は、コマンド29を、それぞれドライバ8で解釈されるシステムコール10に変換し、それぞれAPI5、6、7を介したシステムコール10によってドライバ8を呼び出す。呼び出されたドライバ8は、システムコール10の内容に応じた処理を実行し、それぞれの処理の実行結果を表す戻り値11をAPI5、6、7を介してタスク20に返す。 The inter-OS communication driver 19 passes the received command 29 to the task 20. Upon receiving the command 29, the task 20 converts the command 29 into a system call 10 interpreted by the driver 8, and calls the driver 8 by the system call 10 via APIs 5, 6 and 7, respectively. The called driver 8 executes a process according to the content of the system call 10, and returns a return value 11 representing the execution result of each process to the task 20 via APIs 5, 6, and 7.

戻り値11を受け取ったタスク20は、第1OS17に戻り値11の内容を渡すために、この戻り値11を第1OS17と第2OS9とで共通に解釈されるステータス30に変換してOS間通信ドライバ19に渡す。OS間通信ドライバ19は、このステータス30をOS間通信によってOS間通信ドライバ16に送信する。OS間通信ドライバ16は、受信したステータス30をライブラリ15に渡す。ステータス30を受け取ったライブラリ15は、それぞれステータス30をプロセス1で解釈される戻り値22に変換し、この戻り値22をそれぞれAPI12、13、14を介してプロセス1に返す。このようにして、シングルプロセッサシステムにおいてプロセス1がドライバ8を直接呼び出した場合と同じ処理結果が、マルチプロセッサシステムによって得られる。 The task 20 that has received the return value 11 converts the return value 11 into a status 30 that is commonly interpreted by the first OS 17 and the second OS 9 in order to pass the contents of the return value 11 to the first OS 17, and an inter-OS communication driver. Pass to 19. The inter-OS communication driver 19 transmits this status 30 to the inter-OS communication driver 16 by inter-OS communication. The inter-OS communication driver 16 passes the received status 30 to the library 15. The library 15 that has received the status 30 converts the status 30 into a return value 22 interpreted by the process 1, and returns the return value 22 to the process 1 via the APIs 12, 13, and 14, respectively. In this way, the multiprocessor system obtains the same processing result as when process 1 directly calls the driver 8 in the single processor system.

図3は、従来システム(多重コール許可/シングルプロセッサ)の例を示している。図1に示したシステム例では、API5はドライバ8と1つのスレッド[1]:2だけの間にあったが、図3に示すシステム例では、API5はドライバ8と2つのスレッド(スレッド[1]:2、スレッド[2]:3)の間にある。これによって、スレッド[1]:2、スレッド[2]:3とでシステムコール10を同時実行できるようにしている。つまり、1つのAPIに対して、複数のシステムコール10が同時実行できるようになっている。 FIG. 3 shows an example of a conventional system (multiple call permission / single processor). In the system example shown in FIG. 1, the API 5 was between the driver 8 and one thread [1]: 2, but in the system example shown in FIG. 3, the API 5 is between the driver 8 and two threads (thread [1]: 2. 2. Between threads [2]: 3). As a result, the system call 10 can be executed simultaneously with the thread [1]: 2 and the thread [2]: 3. That is, a plurality of system calls 10 can be executed simultaneously for one API.

図4は、本実施の形態のシステム(多重コール許可/マルチプロセッサ)の例を示している。図2に示したシステム例では、API12はライブラリ15と1つのスレッド[1]:2だけの間にあり、API5はドライバ8と1つのタスク20だけの間にあったが、図4に示すシステム例では、API12はライブラリ15と2つのスレッド(スレッド[1]:2、スレッド[2]:3)の間にあり、API5はドライバ8と2つのコタスク(コタスク[1]:25、コタスク[2]:26)の間にある。これによって、スレッド[1]:2、スレッド[2]:3とで関数21を同時実行できるようにしている。つまり、1つのAPIに対して、複数の関数21が同時実行できるようになっている。
なお、第1OSによる制御を実行する第1制御手段100は、プロセス1、API12、API13、ライブラリ15、OA間通信ドライバ16、第1OS17によって構成されている。第2制御手段200は、OA間通信ドライバ19、タスク20、API5、API6、ドライバ8を有する第2OS9によって構成されている。
ライブラリ15は、第1OS17上で動作中のプロセス1が呼び出した関数21を第1OS17と第2OS9とで共通に解釈されるコマンド29に変換する。そして、その変換されたコマンドを第2OS9がアクセス可能な記憶領域に書き込む。
そして、その書き込まれたコマンドに対応する第2OS9のシステムコールのドライバ8によって制御されるデバイス300による実行の結果を示すステータス30が記憶領域に書き込まれたことを示す通知を受けた場合に、そのステータス30を記憶領域から読み出す。次に、その読み出されたステータス30をプロセスが解釈する戻り値22に変換し、その戻り値22をプロセス1に返す。
この場合、プロセス1には複数のスレッド(図4の例では、スレッド[1]:2、スレッド[2]:3、スレッド[3]:4)が実行されており、関数21は、そのスレッドが呼び出す。ライブラリ15は、関数21が多重実行可能であるか否かを判断し、多重実行可能であると判断した場合、スレッドを識別するスレッド識別情報を付加したコマンド29に変換する。そして、ステータス30とともにスレッド識別情報を読み出し、その読み出されたスレッド識別情報にしたがって、ステータス30をスレッドが解釈する戻り値22に変換する。
FIG. 4 shows an example of the system (multiple call permission / multiprocessor) of the present embodiment. In the system example shown in FIG. 2, the API 12 was between the library 15 and one thread [1]: 2, and the API 5 was between the driver 8 and only one task 20, but in the system example shown in FIG. , API 12 is between library 15 and two threads (thread [1]: 2, thread [2]: 3), API 5 is driver 8 and two cotasks (cotask [1]: 25, cotask [2]: It is between 26). As a result, the function 21 can be executed simultaneously in the thread [1]: 2 and the thread [2]: 3. That is, a plurality of functions 21 can be executed simultaneously for one API.
The first control means 100 that executes control by the first OS is composed of a process 1, an API 12, an API 13, a library 15, an inter-OA communication driver 16, and a first OS 17. The second control means 200 is composed of a second OS 9 having an inter-OA communication driver 19, a task 20, API 5, API 6, and a driver 8.
The library 15 converts the function 21 called by the process 1 running on the first OS 17 into a command 29 that is commonly interpreted by the first OS 17 and the second OS 9. Then, the converted command is written in the storage area accessible to the second OS9.
Then, when a notification indicating that the status 30 indicating the result of execution by the device 300 controlled by the driver 8 of the system call of the second OS 9 corresponding to the written command has been written to the storage area is received, the notification is received. Read status 30 from the storage area. Next, the read status 30 is converted into a return value 22 interpreted by the process, and the return value 22 is returned to the process 1.
In this case, a plurality of threads (in the example of FIG. 4, thread [1]: 2, thread [2]: 3, thread [3]: 4) are executed in process 1, and the function 21 is the thread. Calls. The library 15 determines whether or not the function 21 can be executed multiple times, and if it is determined that the function 21 can be executed multiple times, converts it into a command 29 to which thread identification information for identifying a thread is added. Then, the thread identification information is read together with the status 30, and the status 30 is converted into a return value 22 interpreted by the thread according to the read thread identification information.

本実施の形態では、OS間通信を使用するライブラリ毎に、各ライブラリがサポートする関数それぞれが多重実行可能か否かを判別する多重実行判別機能を備えている。
そして、OS間通信を使用するライブラリ15は、上位ソフトウェア(プロセス1又はスレッド)からユーザIDが指定された場合には、指定された関数21が多重実行可能か否かを多重実行判別機能により判定する。そして、実行可能な場合には、そのユーザIDを有効として、そのユーザIDを付加したコマンド29を発行する。また、上位ソフトウェア(プロセス1又はスレッド)からユーザIDが指定されていない場合には、多重実行判別機能によりその関数が実行可能な場合には、ユーザIDを割り振り、そのユーザIDを付加したコマンド29を発行する。
また、OS間通信を使用するライブラリ15は、上位ソフトウェア(プロセス1又はスレッド)からユーザIDが指定された場合には、指定された関数が多重実行可能か否かを多重実行判別機能により判定する。そして、実行可能でない場合には、そのユーザIDを無効として、上位ソフトウェア(プロセス1又はスレッド)にエラーを返す。また、上位ソフトウェア(プロセス1又はスレッド)からユーザIDが指定されていない場合には、多重実行判別機能によりその関数が実行可能でない場合には、上位ソフトウェア(プロセス1又はスレッド)にエラーを返す。
In the present embodiment, each library that uses inter-OS communication is provided with a multiple execution determination function that determines whether or not each function supported by each library can be executed multiple times.
Then, when the user ID is specified by the higher-level software (process 1 or thread), the library 15 that uses the inter-OS communication determines whether or not the specified function 21 can be executed multiple times by the multiple execution determination function. do. Then, when it is feasible, the user ID is valid and the command 29 to which the user ID is added is issued. If the user ID is not specified by the higher-level software (process 1 or thread) and the function can be executed by the multiple execution determination function, the user ID is assigned and the user ID is added to the command 29. Is issued.
Further, when the user ID is specified by the higher-level software (process 1 or thread), the library 15 that uses inter-OS communication determines whether or not the specified function can be executed multiple times by the multiple execution determination function. .. Then, if it is not executable, the user ID is invalidated and an error is returned to the higher-level software (process 1 or thread). If the user ID is not specified by the higher-level software (process 1 or thread) and the function cannot be executed by the multiple execution determination function, an error is returned to the higher-level software (process 1 or thread).

これらの処理によって、1つの種類の要求情報とその応答情報を複数実行可能とすることにより同時実行が可能となるので、複数のスレッドからそれぞれ1つの種類の要求情報とその応答情報を処理すること(並列処理)が可能となる。
さらに、ライブラリの多重実行判別機能のみでユーザIDを割り振らず、上位ソフトウェアからのユーザIDの指定を優先させることにより、最終段の処理(第2のプロセッサ上で動作するドライバ内における連続するハードウェア処理など)を固定することができるようになる。
By making it possible to execute one type of request information and its response information in a plurality of times by these processes, simultaneous execution is possible. Therefore, one type of request information and its response information are processed from a plurality of threads. (Parallel processing) becomes possible.
Furthermore, by prioritizing the specification of the user ID from the higher-level software without allocating the user ID only by the multiple execution determination function of the library, the final stage processing (continuous hardware in the driver running on the second processor). Processing etc.) can be fixed.

次に、図5の例を用いて、本実施の形態のハードウェア構成について説明する。画像形成装置1000は、本実施の形態に係る電子機器の一例である。画像形成装置1000の主な構成要素は、第1制御手段100、第2制御手段200及びデバイス300である。第1制御手段100は、第2制御手段200を制御する。第2制御手段200は、デバイス300を制御する。なお、画像形成装置1000として、例えば、複写機、ファックス、スキャナ、プリンタ、複合機(スキャナ、プリンタ、複写機、ファックス等のいずれか2つ以上の機能を有している画像処理装置)等がある。 Next, the hardware configuration of the present embodiment will be described with reference to the example of FIG. The image forming apparatus 1000 is an example of the electronic device according to the present embodiment. The main components of the image forming apparatus 1000 are the first control means 100, the second control means 200, and the device 300. The first control means 100 controls the second control means 200. The second control means 200 controls the device 300. The image forming apparatus 1000 includes, for example, a copying machine, a fax machine, a scanner, a printer, a multifunction device (an image processing device having any two or more functions of a scanner, a printer, a copying machine, a fax machine, etc.) and the like. be.

第1制御手段100は、CPU101などの演算装置、RAM(Random Access Memory)102やROM(Read Only Memory)103などの記憶装置、通信I/F(Interface)104、HDD(Hard Disk Drive)105などの外部記憶装置及びLAN(Local Area Network)端子106を備え、これらの構成要素はバス110に接続されている。CPU101は、RAM102をワークエリアとして、プログラムを実行する。ROM103には、ブートローダなどが記憶されている。通信I/F104は、例えばPCIeのスロットであり、第2制御手段200に備えられたPCIeのスロットである通信I/F204と信号線で接続される。HDD105には、第1OS17やアプリケーションプログラムなどが記憶されており、画像形成装置1000に電源が投入されると、CPU101がROM103からブートローダを読み出し、ブートローダに記述されている手順にしたがってHDD105から第1OS17を読み出して実行する。第1OS17は、例えばLinux(登録商標)である。LAN端子106には信号線が接続され、CPU101は、LAN経由で外部の情報処理装置などと通信する。 The first control means 100 includes a computing device such as a CPU 101, a storage device such as a RAM (Random Access Memory) 102 or a ROM (Read Only Memory) 103, a communication I / F (Interface) 104, an HDD (Hard Disk Drive) 105, or the like. The external storage device and the LAN (Local Area Network) terminal 106 are provided, and these components are connected to the bus 110. The CPU 101 executes the program using the RAM 102 as a work area. A boot loader or the like is stored in the ROM 103. The communication I / F 104 is, for example, a PCIe slot, and is connected to the communication I / F204, which is a PCIe slot provided in the second control means 200, by a signal line. The HDD 105 stores the first OS 17, an application program, and the like. When the power is turned on to the image forming apparatus 1000, the CPU 101 reads the boot loader from the ROM 103 and sets the first OS 17 from the HDD 105 according to the procedure described in the boot loader. Read and execute. The first OS17 is, for example, Linux®. A signal line is connected to the LAN terminal 106, and the CPU 101 communicates with an external information processing device or the like via the LAN.

第2制御手段200は、CPU201などの演算装置、RAM202やROM203などの記憶装置及び通信I/F204を備え、これらの構成要素はバス210に接続されている。CPU201は、RAM202をワークエリアとして、プログラムを実行する。ROM203には、第2OS9が記憶されており、CPU201は、第1制御手段100からの命令にしたがってROM203から第2OS9を読み出して実行する。第2OS9は、例えばRTOS(Real Time OS)であり、デバイス300を制御するドライバの機能を備える。 The second control means 200 includes an arithmetic unit such as CPU 201, a storage device such as RAM 202 and ROM 203, and communication I / F 204, and these components are connected to the bus 210. The CPU 201 executes the program using the RAM 202 as a work area. The second OS 9 is stored in the ROM 203, and the CPU 201 reads the second OS 9 from the ROM 203 and executes it according to an instruction from the first control means 100. The second OS 9 is, for example, an RTOS (Real Time OS), and has a driver function for controlling the device 300.

画像形成装置1000は、1つ以上のデバイス300を備える。デバイス300は、画像データに基づいて画像を形成する装置、例えば、イメージスキャナ301、プリンタ302、UI(User Interface)303、圧縮/伸長装置304などである。なお、デバイスの数は、いくつでもよい。イメージスキャナ301は、例えば、光源、光学系、撮像素子など(図示省略)を備え、光源が原稿に光を照射し、原稿で反射された反射光が光学系を介して撮像素子に入射し、撮像素子が原稿の画像を表す信号を生成して出力する。プリンタ302は、例えば、画像データに基づくトナー像を形成するプリントエンジン、紙などの記録媒体を収容する収容部、記録媒体を搬送路に沿って搬送する搬送機構など(図示省略)を備え、第1制御手段100から第2制御手段200を介して供給された画像データに基づく画像を電子写真方式で記録媒体に印刷する。UI303は、例えば、タッチパネルやキーパッドなど(図示省略)を備え、ユーザによる操作を受け付ける。タッチパネルには、ユーザが画像形成装置1000を操作するための仮想的な操作子や、画像形成装置1000の状態を表す情報などが表示される。キーパッドは、画像形成装置1000の動作の開始や停止を指示するためのキーや、数字を入力するためのテンキーなどを備える。圧縮/伸長装置304は、イメージスキャナ301が読み込んだ画像を圧縮したり、受け取った圧縮画像を伸長してプリンタ302で印刷できる画像に変換したりする。 The image forming apparatus 1000 includes one or more devices 300. The device 300 is a device that forms an image based on image data, such as an image scanner 301, a printer 302, a UI (User Interface) 303, and a compression / decompression device 304. The number of devices may be any number. The image scanner 301 includes, for example, a light source, an optical system, an image pickup element, and the like (not shown), the light source irradiates the document with light, and the reflected light reflected by the document is incident on the image pickup element via the optical system. The image sensor generates and outputs a signal representing the image of the original. The printer 302 includes, for example, a print engine that forms a toner image based on image data, a storage unit that stores a recording medium such as paper, a transport mechanism that transports the recording medium along a transport path (not shown), and the like. An image based on the image data supplied from the first control means 100 to the second control means 200 is printed on a recording medium by an electrophotographic method. The UI 303 includes, for example, a touch panel, a keypad, and the like (not shown), and accepts operations by the user. On the touch panel, a virtual operator for the user to operate the image forming apparatus 1000, information indicating the state of the image forming apparatus 1000, and the like are displayed. The keypad includes a key for instructing the start and stop of the operation of the image forming apparatus 1000, a numeric keypad for inputting a number, and the like. The compression / decompression device 304 compresses the image read by the image scanner 301, or decompresses the received compressed image and converts it into an image that can be printed by the printer 302.

なお、図5示す画像形成装置1000のハードウェア構成は、1つの構成例を示すものであり、本実施の形態は、図5に示す構成に限らず、本実施の形態において説明したモジュールを実行可能な構成であればよい。例えば、一部のモジュールを専用のハードウェア(例えば特定用途向け集積回路(Application Specific Integrated Circuit:ASIC)等)で構成してもよく、一部のモジュールは外部のシステム内にあり通信回線で接続している形態でもよく、さらに図5示すシステムが複数互いに通信回線によって接続されていて互いに協調動作するようにしてもよい。 The hardware configuration of the image forming apparatus 1000 shown in FIG. 5 shows one configuration example, and the present embodiment is not limited to the configuration shown in FIG. 5, and the module described in the present embodiment is executed. Any configuration may be possible. For example, some modules may be configured with dedicated hardware (for example, Applied Special Integrated Circuit (ASIC), etc.), and some modules are in an external system and connected by a communication line. Further, a plurality of systems shown in FIG. 5 may be connected to each other by a communication line so as to cooperate with each other.

本実施の形態では、図10の例に示すように、OS間通信ドライバ16とOS間通信ドライバ19とがコマンドバッファ1029及びステータスバッファ1030を介してコマンド29及びステータス30のやりとりを行う。コマンドバッファ1029及びステータスバッファ1030は、RAM202の記憶領域を利用してもよいし、RAM202とは別のメモリを第2制御手段200に設けて、このメモリの記憶領域をコマンドバッファ1029及びステータスバッファ1030として用いてもよい。コマンドバッファ1029及びステータスバッファ1030は、例えばFIFO(First In, First Out)方式のバッファであり、それぞれの記憶領域の状態を表すFULL/NOT FULL/EMPTY/NOT EMPTY情報をインタラプト28によってOS間通信ドライバ16及びOS間通信ドライバ19に通知する機能を有する。 In the present embodiment, as shown in the example of FIG. 10, the inter-OS communication driver 16 and the inter-OS communication driver 19 exchange commands 29 and status 30 via the command buffer 1029 and the status buffer 1030. The command buffer 1029 and the status buffer 1030 may use the storage area of the RAM 202, or a memory different from the RAM 202 is provided in the second control means 200, and the storage areas of this memory are used as the command buffer 1029 and the status buffer 1030. May be used as. The command buffer 1029 and the status buffer 1030 are, for example, FIFO (First In, First Out) type buffers, and are FULL / NOT FULL / EMPTY / NOT EMPTY information representing the state of each storage area, and are inter-OS communication drivers by the interrupt 28. It has a function of notifying the 16 and the inter-OS communication driver 19.

一例として、プロセス1が以下に示す関数21を呼び出す例について説明する。この例では、プロセス1がライブラリ15の関数21を直接呼び出すように構成されており、各関数の戻り値22のエラーチェックは省略されている。
int param[4] = [0, 0, 0, 0] ;
fd = do_open(DRV_1, 0, 0); /* 1番目の関数呼び出し */
status = do_ioctl(fd, DRV_1_READ_PARAM, param); /* 2番目の関数呼び出し */
status = do_close(fd) ; /* 3番目の関数呼び出し */
As an example, an example in which process 1 calls the function 21 shown below will be described. In this example, the process 1 is configured to directly call the function 21 of the library 15, and the error check of the return value 22 of each function is omitted.
int param [4] = [0, 0, 0, 0];
fd = do_open (DRV_1, 0, 0); / * First function call * /
status = do_ioctl (fd, DRV_1_READ_PARAM, param); / * Second function call * /
status = do_close (fd); / * Third function call * /

図6は、従来システムにおけるコマンド29のフォーマットを示す図である。コマンド29は、第1OS17と第2OS9とで共通に解釈される情報であり、コマンドヘッダ31とコマンドデータ32とを含む。プロセス1が関数21を呼び出すと、関数21に対応するライブラリ15の処理ルーチンがコマンドデータ32を生成する。コマンドデータ32は、コマンドID(Identifier)39とパラメータ40とを含む可変長のデータである。処理ルーチンは、コマンド29の種類を表す識別子をコマンドID39に設定し、関数21の引数をパラメータ40に設定する。処理ルーチンは、このようにして生成したコマンドデータ32をOS間通信ドライバ16に渡す。 FIG. 6 is a diagram showing the format of the command 29 in the conventional system. The command 29 is information that is commonly interpreted by the first OS 17 and the second OS 9, and includes a command header 31 and command data 32. When the process 1 calls the function 21, the processing routine of the library 15 corresponding to the function 21 generates the command data 32. The command data 32 is variable-length data including a command ID (Identifier) 39 and a parameter 40. The processing routine sets an identifier representing the type of command 29 in command ID 39 and sets the argument of the function 21 in parameter 40. The processing routine passes the command data 32 generated in this way to the inter-OS communication driver 16.

ここで、上記の関数呼び出しの例で2番目に呼び出される関数であるdo_ioctl()の第3引数が記憶領域の論理アドレスを示すポインタになっているが、第1制御手段100と第2制御手段200とで論理アドレスが異なる場合、このポインタをそのまま第2制御手段200に渡しても第2制御手段200はそのポインタが指し示す記憶領域へアクセスすることができないため、処理ルーチンは、コマンドデータ32の生成時に、ポインタの値ではなく、そのポインタが指し示す記憶領域(4Byte×4=16Byte)をパラメータ40として設定する。上記の例では、ポインタが指し示す領域が0で初期化されているので、パラメータ40に設定された記憶領域も0で初期化される。 Here, the third argument of do_ioctl (), which is the second function to be called in the above function call example, is a pointer indicating the logical address of the storage area, but the first control means 100 and the second control means If the logical address is different from that of 200, even if this pointer is passed to the second control means 200 as it is, the second control means 200 cannot access the storage area pointed to by the pointer. At the time of generation, the storage area (4Byte × 4 = 16Byte) pointed to by the pointer is set as the parameter 40 instead of the value of the pointer. In the above example, since the area pointed to by the pointer is initialized with 0, the storage area set in the parameter 40 is also initialized with 0.

コマンドデータ32を受け取ったOS間通信ドライバ16は、OS間通信ドライバ19とのOS間通信に必須の情報であるコマンドヘッダ31を生成する。コマンドヘッダ31は、タスクID35と通信路ID36とコマンドID37とコマンドサイズ38とを含む。OS間通信ドライバ16は、コマンドデータ32の解釈を行う第2OS9側のタスク20(又はコタスク[1]:25)の識別子をタスクID35に設定し、OS間通信の通信路27の識別子を通信路ID36に設定し、コマンドデータ32のコマンドID39の設定値をコマンドID37に設定し、コマンドデータ32のサイズをコマンドサイズ38に設定する。OS間通信ドライバ16は、このようにして生成したコマンドヘッダ31をコマンドデータ32と結合することによってコマンド29を生成し、生成したコマンド29をOS間通信によってコマンドバッファ1029に書き込む。そして、OS間通信ドライバ16は、インタラプト28によりOS間通信ドライバ19にNOT EMPTYを通知する。 The inter-OS communication driver 16 that has received the command data 32 generates a command header 31 that is essential information for inter-OS communication with the inter-OS communication driver 19. The command header 31 includes a task ID 35, a communication path ID 36, a command ID 37, and a command size 38. The inter-OS communication driver 16 sets the identifier of the task 20 (or cotask [1]: 25) on the second OS 9 side that interprets the command data 32 in the task ID 35, and sets the identifier of the communication path 27 of the inter-OS communication as the communication path. The ID 36 is set, the set value of the command ID 39 of the command data 32 is set to the command ID 37, and the size of the command data 32 is set to the command size 38. The inter-OS communication driver 16 generates a command 29 by combining the command header 31 generated in this way with the command data 32, and writes the generated command 29 to the command buffer 1029 by inter-OS communication. Then, the inter-OS communication driver 16 notifies the inter-OS communication driver 19 of NOT EMPTY by the interrupt 28.

NOT EMPTYの通知を受けたOS間通信ドライバ19は、コマンドバッファ1029からコマンド29を読み出し、コマンドヘッダ31のタスクID35によって、このコマンド29を処理するタスク(又はコタスク)を判別する。この例では、コタスク[1]:25がコマンド29を処理するタスクであるので、OS間通信ドライバ19は、コタスク[1]:25にコマンド29を渡す。OS間通信ドライバ19は、コマンドバッファ1029が空になるまでコマンド29をコタスク[1]:25に渡すことを繰り返し、コマンドバッファ1029が空になったならば、OS間通信ドライバ16からNOT EMPTYが通知されるのを待つ。 Upon receiving the NOT EMPTY notification, the inter-OS communication driver 19 reads the command 29 from the command buffer 1029, and determines the task (or cotask) for processing the command 29 by the task ID 35 of the command header 31. In this example, since the cotask [1]: 25 is the task for processing the command 29, the inter-OS communication driver 19 passes the command 29 to the cotask [1]: 25. The inter-OS communication driver 19 repeatedly passes the command 29 to the cotask [1]: 25 until the command buffer 1029 becomes empty, and when the command buffer 1029 becomes empty, the inter-OS communication driver 16 sends NOT EMPTY. Wait for notification.

コマンド29を受け取ったコタスク[1]:25は、コマンドデータ32をドライバ8で解釈されるシステムコール10に変換し、API5を介してドライバ8を呼び出す。ここで、上記の関数呼び出しの例におけるdo_ioctl()に対応するパラメータ40は、前述のとおり、論理アドレスを示すポインタではなく、そのポインタが指し示す記憶領域(4Byte×4=16Byte)であるから、コタスク[1]:25は、その記憶領域を第2制御手段200のメモリ上で確保し、確保した記憶領域を初期化し、その記憶領域のポインタをシステムコール10の第3引数として設定する。ドライバ8は、システムコール10を実行し、実行の結果を表す戻り値11をコタスク[1]:25に返す。コタスク[1]:25は、この戻り値11に基づいて、ステータス30を生成する。 Upon receiving the command 29, the cotask [1]: 25 converts the command data 32 into the system call 10 interpreted by the driver 8 and calls the driver 8 via the API 5. Here, as described above, the parameter 40 corresponding to do_ioctl () in the above function call example is not a pointer indicating a logical address, but a storage area (4Byte × 4 = 16Byte) pointed to by the pointer. [1]: 25 allocates the storage area on the memory of the second control means 200, initializes the secured storage area, and sets the pointer of the storage area as the third argument of the system call 10. The driver 8 executes the system call 10 and returns a return value 11 representing the execution result to the cotask [1]: 25. Cotasking [1]: 25 generates status 30 based on this return value 11.

図7は、従来システムにおけるステータス30のフォーマットを示す図である。ステータス30は、第1OS17と第2OS9とで共通に解釈される情報であり、ステータスヘッダ33とステータスデータ34とを含む。ステータスデータ34は、ステータスID45とパラメータ46とを含む可変長のデータである。コタスク[1]:25は、システムコール10に対応するステータスの種類を示す識別子をステータスID45に設定する。ここで、コタスク[1]:25は、ステータスID45の最上位ビットを1にマスクすることによって当該ステータスID45に対応するコマンドID39が得られるように、ステータスID45を設定する。コタスク[1]:25は、ドライバ8から受け取った戻り値11をパラメータ46に設定する。ここで、戻り値11が正常終了を示す場合、上記の関数呼び出しの例における2番目の関数do_ioctl()に対応するシステムコール10の第3引数に設定したポインタが指し示す記憶領域にデータが書き込まれているので、コタスク[1]:25は、戻り値11に加えて、そのデータもパラメータ46に設定する。 FIG. 7 is a diagram showing the format of status 30 in the conventional system. The status 30 is information that is commonly interpreted by the first OS 17 and the second OS 9, and includes the status header 33 and the status data 34. The status data 34 is variable length data including the status ID 45 and the parameter 46. Cotasking [1]: 25 sets the status ID 45 to an identifier indicating the type of status corresponding to the system call 10. Here, the cotask [1]: 25 sets the status ID 45 so that the command ID 39 corresponding to the status ID 45 can be obtained by masking the most significant bit of the status ID 45 to 1. Cotasking [1]: 25 sets the return value 11 received from the driver 8 in parameter 46. Here, when the return value 11 indicates normal termination, data is written to the storage area pointed to by the pointer set in the third argument of the system call 10 corresponding to the second function do_ioctl () in the above function call example. Therefore, in the cotask [1]: 25, in addition to the return value 11, the data is also set in the parameter 46.

ステータスヘッダ33は、タスクID41と通信路ID42とステータスID43とステータスサイズ44とを含む。コタスク[1]:25は、コマンド29に設定されていたタスクID35の設定値をタスクID41に設定し、コマンド29に設定されていた通信路ID36の設定値を通信路ID42に設定する。コタスク[1]:25は、ステータスデータ34のステータスID45の設定値をステータスID43に設定し、ステータスデータ34のサイズをステータスサイズ44に設定する。コタスク[1]:25は、このようにして生成したステータス30を、OS間通信ドライバ19に渡す。ステータス30を受け取ったOS間通信ドライバ19は、ステータス30をステータスバッファ1030に書き込む。そして、OS間通信ドライバ19は、インタラプト28によりOS間通信ドライバ16にNOT EMPTYを通知する。 The status header 33 includes a task ID 41, a communication channel ID 42, a status ID 43, and a status size 44. The cotask [1]: 25 sets the setting value of the task ID 35 set in the command 29 to the task ID 41, and sets the setting value of the communication path ID 36 set in the command 29 to the communication path ID 42. Cotasking [1]: 25 sets the setting value of the status ID 45 of the status data 34 to the status ID 43, and sets the size of the status data 34 to the status size 44. The cotask [1]: 25 passes the status 30 generated in this way to the inter-OS communication driver 19. The inter-OS communication driver 19 that has received the status 30 writes the status 30 to the status buffer 1030. Then, the inter-OS communication driver 19 notifies the inter-OS communication driver 16 of NOT EMPTY by the interrupt 28.

NOT EMPTYの通知を受けたOS間通信ドライバ16は、OS間通信によりステータスバッファ1030からステータス30を読み出し、ステータスヘッダ33の通信路ID42から、このステータスデータ34を処理するライブラリを判別する。この例では、ライブラリ15がステータスデータ34を処理するので、OS間通信ドライバ16は、ライブラリ15にステータス30を渡す。OS間通信ドライバ16は、ステータスバッファ1030が空になるまで、ステータス30をライブラリ15に渡すことを繰り返し、ステータスバッファ1030が空になったならば、OS間通信ドライバ19からNOT EMPTYが通知されるのを待つ。 Upon receiving the NOT EMPTY notification, the inter-OS communication driver 16 reads the status 30 from the status buffer 1030 by inter-OS communication, and determines the library that processes the status data 34 from the communication path ID 42 of the status header 33. In this example, since the library 15 processes the status data 34, the OS-to-OS communication driver 16 passes the status 30 to the library 15. The inter-OS communication driver 16 repeatedly passes the status 30 to the library 15 until the status buffer 1030 is empty, and when the status buffer 1030 is empty, the inter-OS communication driver 19 notifies NOT EMPTY. Wait for

ステータス30を受け取ったライブラリ15は、ステータスデータ34をプロセス1で解釈される戻り値22に変換し、戻り値22をプロセス1に返す。ここで、上記の関数呼び出しの例における2番目の関数do_ioctl()に対応するステータスデータ34には、戻り値22に変換される情報に加えてデータが設定されているので、ライブラリ15は、do_ioctl()の第3引数で指定されたアドレスにそのデータを書き込む。 Upon receiving the status 30, the library 15 converts the status data 34 into the return value 22 interpreted by the process 1 and returns the return value 22 to the process 1. Here, since the status data 34 corresponding to the second function do_ioctl () in the above function call example is set with data in addition to the information to be converted to the return value 22, the library 15 is set to do_ioctl (). The data is written to the address specified by the third argument of ().

図8は、本実施の形態で用いるコマンドフォーマットの例を示している。図8の例に示すコマンド29は、図6の例に示したコマンド29にユーザID47を追加したものである。具体的には、コマンドデータ(可変長)32内のコマンドID39の次(パラメータ40の前)にユーザID47を追加したものである。
OA間通信ドライバ16は、関数21が多重実行可能である場合、スレッドを識別するスレッド識別情報(以下、ユーザIDともいう)を付加したコマンド29に変換する。具体的には、OS間通信ドライバ16は、関数21が多重実行可能であるか否かを判断し、多重実行可能である場合は、関数21を送信したスレッドを識別するスレッド識別情報をユーザID47に設定する。
この場合、OA間通信ドライバ16は、関数21にスレッド識別情報が付加されている場合は、そのスレッド識別情報を付加したコマンド29に変換する(スレッド識別情報をユーザID47に設定する)。
また、OA間通信ドライバ16は、関数21にスレッド識別情報が付加されていない場合は、スレッド識別情報を生成し、その生成したスレッド識別情報を付加したコマンド29に変換する(スレッド識別情報をユーザID47に設定する)ようにしてもよい。
また、OA間通信ドライバ16は、関数21が多重実行可能でない場合は、その関数を呼び出したスレッドにエラーを返信するようにしてもよい。
また、OA間通信ドライバ16は、関数21にスレッド識別情報が付加されている場合であって、関数21が多重実行可能でないときは、スレッド識別情報を無効化し、その関数21を呼び出したスレッドにエラーを返信するようにしてもよい。
また、OA間通信ドライバ16は、関数21にスレッド識別情報が付加されていない場合であって、関数21が多重実行可能でないときは、その関数を呼び出したスレッドにエラーを返信するようにしてもよい。
FIG. 8 shows an example of the command format used in this embodiment. The command 29 shown in the example of FIG. 8 is the command 29 shown in the example of FIG. 6 with the user ID 47 added. Specifically, the user ID 47 is added after the command ID 39 in the command data (variable length) 32 (before the parameter 40).
When the function 21 can be executed multiple times, the inter-OA communication driver 16 converts the function 21 into a command 29 to which thread identification information (hereinafter, also referred to as a user ID) for identifying a thread is added. Specifically, the inter-OS communication driver 16 determines whether or not the function 21 can be executed multiple times, and if it is possible to execute the function 21 multiple times, the user ID 47 provides thread identification information for identifying the thread that transmitted the function 21. Set to.
In this case, if the thread identification information is added to the function 21, the inter-OA communication driver 16 converts the thread identification information into a command 29 to which the thread identification information is added (the thread identification information is set in the user ID 47).
If the thread identification information is not added to the function 21, the inter-OA communication driver 16 generates the thread identification information and converts the generated thread identification information into a command 29 to which the generated thread identification information is added (the thread identification information is converted into the user). It may be set to ID47).
Further, the inter-OA communication driver 16 may return an error to the thread that called the function when the function 21 cannot be executed multiple times.
Further, when the thread identification information is added to the function 21 and the function 21 cannot be executed multiple times, the inter-OA communication driver 16 invalidates the thread identification information and sends the thread that called the function 21 to the thread. You may want to reply with an error.
Further, the inter-OA communication driver 16 may return an error to the thread that called the function when the thread identification information is not added to the function 21 and the function 21 cannot be executed multiple times. good.

図9は、本実施の形態で用いるステータスフォーマットの例を示している。図9の例に示すステータス30は、図7の例に示したステータス30にユーザID48を追加したものである。具体的には、ステータスデータ(可変長)34内のステータスID45の次(パラメータ46の前)にユーザID48を追加したものである。コタスク[1]:25(又はタスク20)は、関数21を送信したスレッド(ステータス30を受け取るスレッド)を識別するスレッド識別情報をユーザID48に設定する。 FIG. 9 shows an example of the status format used in this embodiment. The status 30 shown in the example of FIG. 9 is the status 30 shown in the example of FIG. 7 with the user ID 48 added. Specifically, the user ID 48 is added after the status ID 45 (before the parameter 46) in the status data (variable length) 34. Cotasking [1]: 25 (or task 20) sets the thread identification information that identifies the thread that sent the function 21 (the thread that receives the status 30) in the user ID 48.

図10は、本実施の形態におけるシステム(多重実行判別機能)の例を示している。
前述したように、第1OS17と第2OS9との間には、PCle18があり、そのPCle18内では、通信路27を介してコマンド29、ステータス30の通信が行われる。そして、第1OS17と第2OS9との処理速度差を緩衝するために、コマンド29を一時保管する記憶領域であるコマンドバッファ1029、ステータス30を一時保管する記憶領域であるステータスバッファ1030がある。OA間通信ドライバ19は、コマンドバッファ1029、ステータスバッファ1030の状態を表すFULL/NOT FULL/EMPTY/NOT EMPTY情報をインタラプト28によってOS間通信ドライバ16に通知する。
ライブラリ15内に多重実行判別モジュール1033がある。
FIG. 10 shows an example of the system (multiple execution determination function) in the present embodiment.
As described above, there is a PCle18 between the first OS17 and the second OS9, and within the PCle18, communication of the command 29 and the status 30 is performed via the communication path 27. Then, in order to buffer the processing speed difference between the first OS 17 and the second OS 9, there are a command buffer 1029 which is a storage area for temporarily storing the command 29 and a status buffer 1030 which is a storage area for temporarily storing the status 30. The inter-OA communication driver 19 notifies the inter-OS communication driver 16 of the FULL / NOT FULL / EMPTY / NOT EMPTY information indicating the status of the command buffer 1029 and the status buffer 1030 by the interrupt 28.
There is a multiple execution determination module 1033 in the library 15.

図11は、本実施の形態における多重実行判別機能の例を示している。
ライブラリ15の多重実行判別モジュール1033は、コマンド群データ49を参照して、関数21は多重実行可能であるか否かを判断する。
コマンド群データ49は、複数のコマンドデータ50によって構成されている。コマンド29の種類として、ここではn個ある。そして、各コマンドデータ50は、図11の例に示すようなデータ構成になっている。図12は、本実施の形態における多重実行判別機能の各コマンドID毎の構成内訳図の例を示している。コマンドデータ50は、図12の例に示すように、多重実行回数51とロック[m]:52によって構成されている。多重実行回数51には、そのコマンドを複数並列で実行可能となっているか否かを示す値が設定されている。例えば、「1」である場合は、多重実行可能でないことを示している。「2」以上の値であるならば、多重実行可能であることを示している。有効フラグ62は行列になっており、その行列の大きさは多重実行回数51に設定されている値である。ロック[m]:52のその行列内の値は、既にその関数21が使用されているか否かを示す値が設定されている。例えば、多重実行回数51に「2」が設定されている場合は、ロック[m]:52のロック[1]に使用されていることを示す値が設定されており、ロック[2]に使用されていないことを示す値が設定されている場合は、もう1つだけ、その関数21を実行可能であることを示している。ロック[1]、ロック[2]ともに、使用されていることを示す値が設定されている場合は、それ以上、その関数21は実行できないことを示している。
FIG. 11 shows an example of the multiple execution discriminating function in the present embodiment.
The multiple execution determination module 1033 of the library 15 refers to the command group data 49 and determines whether or not the function 21 is capable of multiple execution.
The command group data 49 is composed of a plurality of command data 50. There are n types of commands 29 here. Each command data 50 has a data structure as shown in the example of FIG. FIG. 12 shows an example of a configuration breakdown diagram for each command ID of the multiple execution determination function in the present embodiment. As shown in the example of FIG. 12, the command data 50 is composed of a multiple execution number 51 and a lock [m]: 52. A value indicating whether or not the command can be executed in parallel is set in the multiple execution number 51. For example, when it is "1", it indicates that multiple execution is not possible. If the value is "2" or more, it indicates that multiple executions are possible. The valid flag 62 is a matrix, and the size of the matrix is a value set in the number of multiple executions 51. The value in the matrix of the lock [m]: 52 is set to a value indicating whether or not the function 21 is already used. For example, when "2" is set for the number of multiple executions 51, a value indicating that the lock [m]: 52 is used for the lock [1] is set and the lock [2] is used. If a value indicating that the function 21 is not set is set, it indicates that the function 21 can be executed. When both the lock [1] and the lock [2] are set to a value indicating that they are being used, it indicates that the function 21 cannot be executed any more.

<ステータス廃棄機能>
次に、ステータス廃棄機能について説明する。
コマンド29の書き込み後、ステータス30が読み出される前にプロセス1が再起動された場合に、プロセス1の再起動後に読み出されたステータス30を廃棄する。
また、コマンド29が記憶領域に書き込まれた場合にONを示し、プロセス1が再起動された場合にOFFを示すフラグを、コマンド29の種類毎に記憶するフラグテーブルを有していてもよい。
そして、ステータス30の読み出し後にそのステータス30に対応するコマンド29の種類と対応付けて記憶されているフラグがOFFを示す場合に、そのステータス30を廃棄するようにしてもよい。
また、コマンドの種類毎に、コマンド29の書き込み回数から、コマンド29の種類に対応するステータス30の読み出し回数を差し引いた数を示すカウンタを記憶するカウンタテーブルを有していてもよい。
そして、ステータス30の読み出し後に、そのステータス30に対応するコマンド29の種類と対応付けてフラグテーブルに記憶されているフラグが有効を示し、かつ、ステータス30に対応するコマンド29の種類と対応付けてカウンタテーブルに記憶されているカウンタが1を示さない場合に、そのステータス30を廃棄するようにしてもよい。
また、変換されたコマンド29を保持し、コマンド29の書き込み後、そのコマンド29に対応する第2OS9のシステムコール10がドライバ8によって制御されるデバイス300によって実行される前に第2OS9が再起動された場合に、保持されたコマンド29を記憶領域に書き込むようにしてもよい。
また、第2OS9の再起動後にopenコマンドに対応するステータス30が読み出された場合に、そのステータス30に含まれるファイルディスクリプタを引数とするコマンドを記憶領域に書き込むようにしてもよい。
<Status discard function>
Next, the status discard function will be described.
If the process 1 is restarted after the command 29 is written and before the status 30 is read, the status 30 read after the restart of the process 1 is discarded.
Further, it may have a flag table for storing a flag indicating ON when the command 29 is written to the storage area and OFF when the process 1 is restarted for each type of the command 29.
Then, after reading the status 30, if the flag stored in association with the type of the command 29 corresponding to the status 30 indicates OFF, the status 30 may be discarded.
Further, each command type may have a counter table that stores a counter indicating the number of times the command 29 is written minus the number of times the status 30 is read corresponding to the type of the command 29.
Then, after reading the status 30, the flag stored in the flag table is valid in association with the type of the command 29 corresponding to the status 30, and is associated with the type of the command 29 corresponding to the status 30. If the counter stored in the counter table does not show 1, the status 30 may be discarded.
In addition, the converted command 29 is retained, and after writing the command 29, the second OS 9 is restarted before the system call 10 of the second OS 9 corresponding to the command 29 is executed by the device 300 controlled by the driver 8. In that case, the retained command 29 may be written to the storage area.
Further, when the status 30 corresponding to the open command is read after the second OS 9 is restarted, the command with the file descriptor included in the status 30 as an argument may be written in the storage area.

図13は、本実施の形態における実施例(不要なステータス廃棄機能)の例を示している。
OA間通信ドライバ16内に不要ステータス廃棄モジュール1331がある。
コマンドバッファ1029へのコマンド29の書き込み後にいずれかのプロセスが異常終了した場合(例えば、プロセス1、又はライブラリ15等が異常終了)に、以下のような問題が発生することがある。ここでは一例として、プロセス1が異常終了した場合について説明する。異常終了前にプロセス1が呼び出した関数21は、ライブラリ15によってコマンド29に変換され、このコマンド29がコマンドバッファ1029に書き込まれ、NOT EMPTYがOS間通信ドライバ19に通知される。その後、プロセス1が異常終了しても第2制御手段200は動作を続けるから、コマンドバッファ1029から読み出されたコマンド29がシステムコール10に変換され、このシステムコール10にしたがってドライバ8が処理を実行し、その実行結果を表すステータス30が生成されてステータスバッファ1030に書き込まれる。しかし、プロセス1が異常終了するとライブラリ15による処理も終了するので、通信路27に対するreadメソッドは実行されずに、ステータス30がステータスバッファ1030から読み出されないままとなる。
FIG. 13 shows an example of an embodiment (unnecessary status discard function) in the present embodiment.
There is an unnecessary status discard module 1331 in the inter-OA communication driver 16.
If any of the processes terminates abnormally after writing the command 29 to the command buffer 1029 (for example, process 1 or library 15 abnormally terminates), the following problems may occur. Here, as an example, a case where the process 1 terminates abnormally will be described. The function 21 called by the process 1 before the abnormal termination is converted into a command 29 by the library 15, this command 29 is written in the command buffer 1029, and NOT EMPTY is notified to the inter-OS communication driver 19. After that, since the second control means 200 continues to operate even if the process 1 terminates abnormally, the command 29 read from the command buffer 1029 is converted into the system call 10, and the driver 8 processes according to the system call 10. It is executed, and the status 30 representing the execution result is generated and written to the status buffer 1030. However, when the process 1 terminates abnormally, the processing by the library 15 also terminates, so that the read method for the communication path 27 is not executed, and the status 30 remains unread from the status buffer 1030.

異常終了したプロセス1が再起動されると、プロセス1に対応するライブラリ15が通信路27に対するopenメソッドを実行し、再起動後の最初のコマンド29が生成され、このコマンド29がコマンドバッファ1029に書き込まれる。その後、このコマンド29の実行結果を表すステータス30がステータスバッファ1030に書き込まれ、OS間通信ドライバ16にNOT EMPTYが通知される。ところが、プロセス1の異常終了前にコマンドバッファ1029に書き込んだコマンド29の実行結果を表すステータス30がステータスバッファ1030に残っているから、このステータス30がOS間通信ドライバ16によって読み出されると、コマンド29とステータス30との対応関係にずれが生じ、マルチプロセッサシステムが誤動作するおそれがある。そこで、本実施の形態では、不要ステータス廃棄モジュール1331が第1OS17に設けられている。ステータス廃棄機能を実現する不要ステータス廃棄モジュール1331は、通信路毎にOS間通信ドライバ16に設けられており、不要ステータス廃棄モジュール1331による処理は、通信路毎に実行される。不要ステータス廃棄モジュール1331は、OA間通信ドライバ16によるコマンド29の書き込み後、タスク20によってステータス30が読み出される前にプロセスが再起動された場合に、プロセスの再起動後にタスク20によって読み出されたステータス30を廃棄する。なお、この不要ステータス廃棄モジュール1331による処理は、特許文献2に記載の技術と同等である。 When the abnormally terminated process 1 is restarted, the library 15 corresponding to the process 1 executes the open method for the communication path 27, the first command 29 after the restart is generated, and this command 29 is sent to the command buffer 1029. Written. After that, the status 30 indicating the execution result of this command 29 is written in the status buffer 1030, and the inter-OS communication driver 16 is notified of NOT EMPTY. However, since the status 30 indicating the execution result of the command 29 written in the command buffer 1029 before the abnormal termination of the process 1 remains in the status buffer 1030, when this status 30 is read by the inter-OS communication driver 16, the command 29 There is a risk that the multi-processor system will malfunction due to a deviation in the correspondence between the status 30 and the status 30. Therefore, in the present embodiment, the unnecessary status disposal module 1331 is provided in the first OS 17. The unnecessary status discard module 1331 that realizes the status discard function is provided in the inter-OS communication driver 16 for each communication path, and the processing by the unnecessary status discard module 1331 is executed for each communication path. The unnecessary status discard module 1331 was read by the task 20 after the process was restarted if the process was restarted after the command 29 was written by the inter-OA communication driver 16 and before the status 30 was read by the task 20. Discard status 30. The processing by the unnecessary status disposal module 1331 is equivalent to the technique described in Patent Document 2.

図14は、本実施の形態における不要なステータス廃棄機能の例を示している。
不要ステータス廃棄モジュール1331が、データ群53を有している。不要ステータス廃棄モジュール1331は、このデータ群53を参照して、不要なステータスを廃棄する。
データ群53は、複数のデータ58によって構成されている。多重実行されている場合は、2つ以上のデータ58がリスト構造として接続されている。図14の例では、コマンドIDが「3」と「n−1」が多重実行されている場合である。そして、各データ58は、図15の例に示すようなデータ構成になっている。図15は、本実施の形態における不要なステータス廃棄機能の各コマンドID毎の構成内訳図の例を示している。データ58は、図15の例に示すように、ユーザID54、有効フラグ55、カウンタ56、Next57によって構成されている。ユーザID54には、スレッド識別情報が設定されている。したがって、スレッド毎に管理可能である。特に、ステータス30は有効であるか無効であるかを判断をすることが可能となる。有効フラグ55は、コマンドID毎に、そのコマンドIDに対応するコマンド29の実行結果を示すステータス30が有効か否かを示すフラグである。有効フラグ55がONならばそのステータス30は有効であり、有効フラグ55がOFFならばそのステータス30は無効である。カウンタ56は、コマンドID毎に、そのコマンドIDに対応するコマンド29のコマンドバッファ1029への書き込み回数から、そのコマンドIDに対応するステータス30のステータスバッファ1030からの読み出し回数を差し引いた数を表す。Next57は、次のデータ58を指し示すポインタである。このNext57を辿ることによってリスト構造が構成される。なお、ステータスの読み込みが正常終了した場合は、そのデータ58を消去し、その消去したデータ58を指し示していたNext57(1つ前のデータ58におけるNext57)を、消去されたデータ58のNext57で置換すればよい。
FIG. 14 shows an example of an unnecessary status discard function in the present embodiment.
The unnecessary status discard module 1331 has a data group 53. The unnecessary status discard module 1331 refers to this data group 53 and discards unnecessary status.
The data group 53 is composed of a plurality of data 58. When multiple executions are performed, two or more data 58 are connected as a list structure. In the example of FIG. 14, the command IDs “3” and “n-1” are executed multiple times. Each data 58 has a data structure as shown in the example of FIG. FIG. 15 shows an example of a configuration breakdown diagram for each command ID of the unnecessary status discard function in the present embodiment. The data 58 is composed of a user ID 54, a valid flag 55, a counter 56, and Next 57, as shown in the example of FIG. Thread identification information is set in the user ID 54. Therefore, it can be managed for each thread. In particular, it is possible to determine whether the status 30 is valid or invalid. The valid flag 55 is a flag indicating whether or not the status 30 indicating the execution result of the command 29 corresponding to the command ID is valid for each command ID. If the valid flag 55 is ON, the status 30 is valid, and if the valid flag 55 is OFF, the status 30 is invalid. The counter 56 represents the number of times the command 29 corresponding to the command ID is written to the command buffer 1029 minus the number of times the command 29 is read from the status buffer 1030 corresponding to the command ID for each command ID. Next 57 is a pointer that points to the next data 58. A list structure is constructed by following this Next57. When the reading of the status is completed normally, the data 58 is deleted, and Next 57 (Next 57 in the previous data 58) pointing to the deleted data 58 is replaced with Next 57 of the deleted data 58. do it.

図16は、本実施の形態における実施例(コマンド再発行機能)の例を示している。
図13の例では、第1OS17側(プロセス1又はライブラリ15)が異常終了した場合の例を示したが、図16は、第2OS9が異常終了した場合の例を示している。
OA間通信ドライバ16は、コマンド再発行モジュール1632を有している。コマンド再発行モジュール1632は、OA間通信ドライバ16がOA間通信ドライバ19に対して、コマンド29を書き込んだ後に、第2OS9が異常終了した場合であって、第2OS9が再起動したときは、既に書き込んだコマンド29を再発行する。なお、第2OS9の異常終了として、例えば、省電力モードに移行した場合等が該当する。
OA間通信ドライバ16のコマンド再発行モジュール1632が、コマンド群データ60を有している。そして、コマンド再発行モジュール1632は、コマンド群データ60を参照して、コマンド29の再発行を行う。図17は、本実施の形態におけるコマンド再発行機能の例を示している。
コマンド群データ60は、複数のコマンドデータ66と1つのfdデータ70によって構成されている。多重実行されている場合は、2つ以上のコマンドデータ66がリスト構造として接続されている。図17の例では、コマンドIDが「3」と「n−1」が多重実行されている場合である。そして、各コマンドデータ66は、図18の例に示すようなデータ構成になっている。図18は、本実施の形態におけるコマンド再発行機能の各コマンドID毎の構成内訳図の例を示している。コマンドデータ66は、図18の例に示すように、ユーザID61、有効フラグ62、カウンタ63、発行済みコマンド保持領域へのポインタ64、Next65によって構成されている。ユーザID61には、スレッド識別情報が設定されている。したがって、スレッド毎に管理可能である。特に、コマンド29の再発行が必要であるか否かを判断をすることが可能となる。有効フラグ62は、コマンドID毎に、そのコマンドIDに対応するコマンド29の実行結果を示すステータス30が有効か否かを示すフラグである。有効フラグ62がONならばそのステータス30は有効であり、有効フラグ62がOFFならばそのステータス30は無効である。カウンタ63は、コマンドID毎に、そのコマンドIDに対応するコマンド29のコマンドバッファ1029への書き込み回数から、そのコマンドIDに対応するステータス30のステータスバッファ1030からの読み出し回数を差し引いた数を表す。OS間通信ドライバ16は、コマンドバッファ1029に書き込んだコマンド29の複製をRAM102等の記憶領域に書き込む。この記憶領域を、発行済みコマンド保持領域といい、この記憶領域の論理アドレスを示すポインタが、発行済みコマンド保持領域へのポインタ64である。Next65は、次のコマンドデータ66を指し示すポインタである。このNext65を辿ることによってリスト構造が構成される。なお、ステータスの読み込みが正常終了した場合は、そのコマンドデータ66を消去し、その消去したコマンドデータ66を指し示していたNext65(1つ前のコマンドデータ66におけるNext65)を、消去されたコマンドデータ66のNext65で置換すればよい。
FIG. 16 shows an example of an embodiment (command reissue function) in the present embodiment.
In the example of FIG. 13, an example in which the first OS 17 side (process 1 or library 15) terminates abnormally is shown, but FIG. 16 shows an example in which the second OS 9 terminates abnormally.
The inter-OA communication driver 16 has a command reissue module 1632. The command reissue module 1632 is a case where the second OS9 terminates abnormally after the inter-OA communication driver 16 writes a command 29 to the inter-OA communication driver 19, and when the second OS9 is restarted, the command reissue module 1632 has already been used. The written command 29 is reissued. The abnormal termination of the second OS 9 corresponds to, for example, the case of shifting to the power saving mode.
The command reissue module 1632 of the inter-OA communication driver 16 has the command group data 60. Then, the command reissue module 1632 reissues the command 29 with reference to the command group data 60. FIG. 17 shows an example of the command reissue function in the present embodiment.
The command group data 60 is composed of a plurality of command data 66 and one fd data 70. When multiple executions are performed, two or more command data 66 are connected as a list structure. In the example of FIG. 17, the command IDs “3” and “n-1” are executed multiple times. Each command data 66 has a data structure as shown in the example of FIG. FIG. 18 shows an example of a configuration breakdown diagram for each command ID of the command reissue function in the present embodiment. As shown in the example of FIG. 18, the command data 66 is composed of a user ID 61, a valid flag 62, a counter 63, a pointer 64 to the issued command holding area, and Next65. Thread identification information is set in the user ID 61. Therefore, it can be managed for each thread. In particular, it is possible to determine whether or not the command 29 needs to be reissued. The valid flag 62 is a flag indicating whether or not the status 30 indicating the execution result of the command 29 corresponding to the command ID is valid for each command ID. If the valid flag 62 is ON, the status 30 is valid, and if the valid flag 62 is OFF, the status 30 is invalid. The counter 63 represents the number of times the command 29 corresponding to the command ID is written to the command buffer 1029 minus the number of times the command 29 is read from the status buffer 1030 corresponding to the command ID for each command ID. The inter-OS communication driver 16 writes a copy of the command 29 written in the command buffer 1029 to a storage area such as the RAM 102. This storage area is referred to as an issued command holding area, and a pointer indicating the logical address of this storage area is a pointer 64 to the issued command holding area. Next65 is a pointer that points to the next command data 66. A list structure is constructed by following this Next65. When the reading of the status is completed normally, the command data 66 is deleted, and Next65 (Next65 in the previous command data 66) indicating the deleted command data 66 is deleted. It may be replaced with Next65 of.

図19は、本実施の形態におけるコマンド再発行機能のopenコマンド再発行機能の構成内訳図の例を示している。
コマンド再発行モジュール1632は、通信路毎にfdデータ70を生成し、生成したfdデータ70をRAM102又はHDD105に記憶する。fdデータ70は、仮想fd67と、実fd68と、発行済みopenコマンド保持領域へのポインタ69とを対応付けたテーブルである。仮想fd67は、openコマンドで開かれたファイルに対して第1制御手段100が割り当てる仮想的なファイルディスクリプタである。実fd68は、そのファイルに対して第2制御手段200が割り当てるファイルディスクリプタである。OS間通信ドライバ16は、コマンドバッファ1029に書き込んだopenコマンドの複製をRAM102等の記憶領域に書き込む。この記憶領域を、発行済みopenコマンド保持領域といい、この記憶領域の論理アドレスを示すポインタが、発行済みopenコマンド保持領域へのポインタ69である。
FIG. 19 shows an example of a configuration breakdown diagram of the open command reissue function of the command reissue function in the present embodiment.
The command reissue module 1632 generates fd data 70 for each communication path, and stores the generated fd data 70 in the RAM 102 or the HDD 105. The fd data 70 is a table in which the virtual fd67, the actual fd68, and the pointer 69 to the issued open command holding area are associated with each other. The virtual fd67 is a virtual file descriptor assigned by the first control means 100 to the file opened by the open command. The actual fd68 is a file descriptor assigned by the second control means 200 to the file. The inter-OS communication driver 16 writes a copy of the open command written in the command buffer 1029 to a storage area such as the RAM 102. This storage area is referred to as an issued open command holding area, and a pointer indicating the logical address of this storage area is a pointer 69 to the issued open command holding area.

図20は、多重実行判別機能(多重実行判別モジュール1033)の初期化処理シーケンスの例を示している。
ステップS1からステップS6までの処理をコマンドID(1,1,n)分繰り返す。つまり、多重実行判別モジュール1033が、コマンドIDループカウンタ(初期値は1)に1を加算する。
ステップS2では、多重実行回数を設定する。
ステップS3からステップS5までの処理を多重実行回数(1,1,m)分繰り返す。つまり、多重実行判別モジュール1033が、多重実行回数ループカウンタ(初期値は1)に1を加算する。
ステップS4では、ロック(図12の例で示したコマンドデータ50のロック[m]:52)にFALSEを設定する。
ステップS5においては、多重実行判別モジュール1033が、多重実行回数ループカウンタがmに達したか否かを判定し、多重実行回数ループカウンタがmに達していないならばステップS3に戻り、mに達したならばステップS6に移る。
ステップS6においては、多重実行判別モジュール1033が、コマンドIDループカウンタがnに達したか否かを判定し、コマンドIDループカウンタがnに達していないならばステップS1に戻り、nに達したならば処理を終了する。
FIG. 20 shows an example of the initialization processing sequence of the multiple execution determination function (multiple execution determination module 1033).
The processing from step S1 to step S6 is repeated for the command ID (1,1, n). That is, the multiple execution determination module 1033 adds 1 to the command ID loop counter (initial value is 1).
In step S2, the number of multiple executions is set.
The processing from step S3 to step S5 is repeated for the number of multiple executions (1,1, m). That is, the multiple execution determination module 1033 adds 1 to the multiple execution count loop counter (initial value is 1).
In step S4, FALSE is set in the lock (lock [m]: 52 of the command data 50 shown in the example of FIG. 12).
In step S5, the multiple execution number loop counter 1033 determines whether or not the multiple execution count loop counter has reached m, and if the multiple execution count loop counter has not reached m, the process returns to step S3 and reaches m. If so, the process proceeds to step S6.
In step S6, the multiple execution determination module 1033 determines whether or not the command ID loop counter has reached n, returns to step S1 if the command ID loop counter has not reached n, and if n has been reached. If so, the process ends.

図21は、多重実行判別機能(多重実行判別モジュール1033)のコマンド発行処理シーケンスの例を示している。
ステップS10では、多重実行判別モジュール1033が、ユーザIDの指定があるか否かを判断し、指定がある場合はステップS11へ進み、それ以外の場合はステップS14へ進む。ここでユーザIDとは、スレッドを識別する情報である。
ステップS11では、多重実行判別モジュール1033が、ロックはFALSEか否かを判断し、FALSEの場合はステップS12へ進み、それ以外の場合はエラーとして処理を終了する。指定された関数は多重実行可能であるか否かを判別していることになる。「Yes」(ロックはFALSE)の場合は、多重実行可能であり、「No」の場合は、多重実行不可である。
FIG. 21 shows an example of a command issuance processing sequence of the multiple execution determination function (multiple execution determination module 1033).
In step S10, the multiple execution determination module 1033 determines whether or not the user ID is specified, and if it is specified, the process proceeds to step S11, and if not, the process proceeds to step S14. Here, the user ID is information that identifies the thread.
In step S11, the multiple execution determination module 1033 determines whether or not the lock is FALSE, proceeds to step S12 in the case of FALSE, and ends the process as an error in other cases. It means that the specified function determines whether or not it can be executed multiple times. In the case of "Yes" (lock is FALSE), multiple execution is possible, and in the case of "No", multiple execution is not possible.

ステップS12では、多重実行判別モジュール1033が、ロックにTRUEを設定する。
ステップS13では、多重実行判別モジュール1033が、コマンド生成処理を行う。ライブラリ15及びOS間通信ドライバ16がコマンド29を生成する。具体的には、関数21に対応するライブラリ15の処理ルーチンがコマンドデータ32を生成してOS間通信ドライバ16に渡す。コマンドデータ32を受け取ったOS間通信ドライバ16は、コマンドヘッダ31を生成し、生成したコマンドヘッダ31をコマンドデータ32と結合することによってコマンド29を生成する。
具体的には、図8の例に示したコマンド29のフォーマットにしたがってコマンドを生成する。つまり、ユーザID47を付加したコマンドを生成する。
なお、ユーザIDの指定がなかった場合(ステップS10で「No」の場合)、ユーザIDを多重実行判別モジュール1033は新たに生成してユーザID47を付加したコマンドを生成する。
In step S12, the multiple execution determination module 1033 sets TRUE for the lock.
In step S13, the multiple execution determination module 1033 performs a command generation process. The library 15 and the inter-OS communication driver 16 generate the command 29. Specifically, the processing routine of the library 15 corresponding to the function 21 generates command data 32 and passes it to the inter-OS communication driver 16. The inter-OS communication driver 16 that has received the command data 32 generates the command header 31, and generates the command 29 by combining the generated command header 31 with the command data 32.
Specifically, a command is generated according to the format of the command 29 shown in the example of FIG. That is, a command with the user ID 47 added is generated.
If the user ID is not specified (in the case of "No" in step S10), the multiple execution determination module 1033 newly generates the user ID and generates a command to which the user ID 47 is added.

ステップS14からステップS16までの処理を多重実行回数(1,1,m)分繰り返す。つまり、多重実行判別モジュール1033が、多重実行回数ループカウンタ(初期値は1)に1を加算する。
ステップS15では、多重実行判別モジュール1033が、ロックはFALSEか否かを判断し、FALSEの場合はステップS12へ進み、それ以外の場合はエラーとして処理を終了する。指定された関数は多重実行可能であるか否かを判別していることになる。「Yes」(ロックはFALSE)の場合は、多重実行可能であり、「No」の場合は、多重実行不可である。
ステップS16においては、多重実行判別モジュール1033が、多重実行回数ループカウンタがmに達したか否かを判定し、多重実行回数ループカウンタがmに達していないならばステップS14に戻り、mに達したならば処理をエラーとして終了する。
The processing from step S14 to step S16 is repeated for the number of multiple executions (1,1, m). That is, the multiple execution determination module 1033 adds 1 to the multiple execution count loop counter (initial value is 1).
In step S15, the multiple execution determination module 1033 determines whether or not the lock is FALSE, proceeds to step S12 in the case of FALSE, and ends the process as an error in other cases. It means that the specified function determines whether or not it can be executed multiple times. In the case of "Yes" (lock is FALSE), multiple execution is possible, and in the case of "No", multiple execution is not possible.
In step S16, the multiple execution number loop counter 1033 determines whether or not the multiple execution count loop counter has reached m, and if the multiple execution count loop counter has not reached m, the process returns to step S14 and reaches m. If so, the process ends as an error.

図22は、不要なステータス廃棄機能(不要ステータス廃棄モジュール1331)の初期化処理シーケンスの例を示している。
ステップS51からステップS54までの処理をコマンドID(1,1,n)分繰り返す。つまり、不要ステータス廃棄モジュール1331が、コマンドIDループカウンタ(初期値は1)に1を加算する。
ステップS52では、不要ステータス廃棄モジュール1331が、データ58内のユーザID54を0とし、Next57をNULLで初期化する。
ステップS53では、不要ステータス廃棄モジュール1331が、データ58内の有効フラグ55をオフにし、カウンタ56を0で初期化する。
ステップS54においては、不要ステータス廃棄モジュール1331が、コマンドIDループカウンタがnに達したか否かを判定し、コマンドIDループカウンタがnに達していないならばステップS51に戻り、nに達したならば処理を終了する。
FIG. 22 shows an example of the initialization processing sequence of the unnecessary status discard function (unnecessary status discard module 1331).
The processing from step S51 to step S54 is repeated for the command ID (1,1, n). That is, the unnecessary status discard module 1331 adds 1 to the command ID loop counter (initial value is 1).
In step S52, the unnecessary status discard module 1331 sets the user ID 54 in the data 58 to 0 and initializes Next 57 with NULL.
In step S53, the unnecessary status discard module 1331 turns off the valid flag 55 in the data 58 and initializes the counter 56 with 0.
In step S54, the unnecessary status discard module 1331 determines whether or not the command ID loop counter has reached n, returns to step S51 if the command ID loop counter has not reached n, and if n has been reached. If so, the process ends.

図23は、不要なステータス廃棄機能(不要ステータス廃棄モジュール1331)のopenメソッド内での処理シーケンスの例を示している。
ステップS55では、不要ステータス廃棄モジュール1331が、openメソッド処理を行う。プロセス1がライブラリ15を呼び出し、ライブラリ15が通信路27に対してopenメソッド処理を実行する。そして、openメソッド処理の戻り値として、通信路27を示すファイルディスクリプタがライブラリ15に返され、これ以降、処理の対象となる通信路27は、このファイルディスクリプタによって特定される。
FIG. 23 shows an example of the processing sequence in the open method of the unnecessary status discard function (unnecessary status discard module 1331).
In step S55, the unnecessary status discard module 1331 performs the open method processing. The process 1 calls the library 15, and the library 15 executes the open method processing for the communication path 27. Then, as a return value of the open method processing, a file descriptor indicating the communication path 27 is returned to the library 15, and thereafter, the communication path 27 to be processed is specified by this file descriptor.

ステップS56からステップS60までの処理をコマンドID(1,1,n)分繰り返す。つまり、不要ステータス廃棄モジュール1331が、コマンドIDループカウンタ(初期値は1)に1を加算する。
ステップS57では、不要ステータス廃棄モジュール1331が、データ58の有効フラグ55をオフにする。
ステップS58では、不要ステータス廃棄モジュール1331が、データ58のNext57を参照して、「Next=NULL」であるか否かを判断し、「Next=NULL」の場合はステップS60へ進み、それ以外の場合はステップS59へ進む。
ステップS59では、不要ステータス廃棄モジュール1331が、データ58のNext57から構造体(データ58)のアドレスを獲得し、ステップS57へ戻る。
ステップS60においては、不要ステータス廃棄モジュール1331が、コマンドIDループカウンタがnに達したか否かを判定し、コマンドIDループカウンタがnに達していないならばステップS56に戻り、nに達したならば処理を終了する。
The processing from step S56 to step S60 is repeated for the command ID (1,1, n). That is, the unnecessary status discard module 1331 adds 1 to the command ID loop counter (initial value is 1).
In step S57, the unnecessary status discard module 1331 turns off the valid flag 55 of the data 58.
In step S58, the unnecessary status discard module 1331 refers to Next 57 of the data 58 to determine whether or not “Next = NULL”, and if “Next = NULL”, proceeds to step S60, and otherwise proceeds to step S60. In the case, the process proceeds to step S59.
In step S59, the unnecessary status discard module 1331 acquires the address of the structure (data 58) from Next 57 of the data 58, and returns to step S57.
In step S60, the unnecessary status discard module 1331 determines whether or not the command ID loop counter has reached n, returns to step S56 if the command ID loop counter has not reached n, and if n has been reached. If so, the process ends.

図24は、不要なステータス廃棄機能(不要ステータス廃棄モジュール1331)のwriteメソッド内での処理シーケンスの例を示している。
ステップS61では、不要ステータス廃棄モジュール1331が、コマンド生成処理を行う。
ステップS62では、不要ステータス廃棄モジュール1331が、コマンド書き込み処理を行う。OS間通信ドライバ16が、生成したコマンド29をOS間通信によってコマンドバッファ1029に書き込む。
ステップS63では、不要ステータス廃棄モジュール1331が、対応するコマンドIDの先頭の構造体(データ58)のユーザID54が0であるか否かを判断し、0の場合はステップS64へ進み、それ以外の場合はステップS66へ進む。ステップS63で「Yes」の場合は、初期化がされている場合である。
ステップS64では、不要ステータス廃棄モジュール1331が、ユーザIDを更新する。
FIG. 24 shows an example of the processing sequence in the write method of the unnecessary status discard function (unnecessary status discard module 1331).
In step S61, the unnecessary status discard module 1331 performs a command generation process.
In step S62, the unnecessary status discard module 1331 performs a command writing process. The inter-OS communication driver 16 writes the generated command 29 to the command buffer 1029 by inter-OS communication.
In step S63, the unnecessary status discard module 1331 determines whether or not the user ID 54 of the structure (data 58) at the beginning of the corresponding command ID is 0, and if it is 0, the process proceeds to step S64, and other than that. In the case, the process proceeds to step S66. If "Yes" in step S63, it means that the initialization has been performed.
In step S64, the unnecessary status discard module 1331 updates the user ID.

ステップS65では、不要ステータス廃棄モジュール1331が、データ58の有効フラグ55をオンにし、カウンタ56を1増加させ、処理を終了する。
ステップS66では、不要ステータス廃棄モジュール1331が、データ58のユーザID54を参照して、「構造体のユーザID=ユーザID」であるか否かを判断し、「構造体のユーザID=ユーザID」の場合はステップS65へ進み、それ以外の場合はステップS67へ進む。
ステップS67では、不要ステータス廃棄モジュール1331が、データ58のNext57を参照して、「Next=NULL」であるか否かを判断し、「Next=NULL」の場合はステップS68へ進み、それ以外の場合はステップS69へ進む。
ステップS68では、不要ステータス廃棄モジュール1331が、構造体(データ58)の領域を確保し、アドレスをNext57に設定し、ステップS64へ進む。
ステップS69では、不要ステータス廃棄モジュール1331が、次のデータ58のユーザID54を参照して、「次の構造体のユーザID=ユーザID」であるか否かを判断し、「次の構造体のユーザID=ユーザID」の場合はステップS65へ進み、それ以外の場合はステップS67へ戻る。
In step S65, the unnecessary status discard module 1331 turns on the valid flag 55 of the data 58, increments the counter 56 by 1, and ends the process.
In step S66, the unnecessary status discard module 1331 refers to the user ID 54 of the data 58, determines whether or not “user ID of the structure = user ID”, and “user ID of the structure = user ID”. In the case of, the process proceeds to step S65, and in other cases, the process proceeds to step S67.
In step S67, the unnecessary status discard module 1331 refers to Next 57 of the data 58 to determine whether or not “Next = NULL”, and if “Next = NULL”, the process proceeds to step S68, and other than that. In the case, the process proceeds to step S69.
In step S68, the unnecessary status discard module 1331 secures the area of the structure (data 58), sets the address to Next57, and proceeds to step S64.
In step S69, the unnecessary status discard module 1331 refers to the user ID 54 of the next data 58, determines whether or not "user ID of the next structure = user ID", and determines whether or not "user ID of the next structure = user ID". If "user ID = user ID", the process proceeds to step S65, and if not, the process returns to step S67.

図25は、不要なステータス廃棄機能(不要ステータス廃棄モジュール1331)のreadメソッド内での処理シーケンスの例を示している。
ステップS70では、不要ステータス廃棄モジュール1331が、ステータス読み込み処理を行う。つまり、不要ステータス廃棄モジュール1331が、OS間通信によりステータスバッファ1030からステータス30を読み出す。具体的には、OS間通信ドライバ19からのNOT EMPTYの通知を受け取るまでOS間通信ドライバ16が待機する。NOT EMPTYの通知を受け取ると、OS間通信ドライバ16が、OS間通信によりステータスバッファ1030からステータス30を読み出す。
ステップS71では、不要ステータス廃棄モジュール1331が、ステータス読み込みが成功したか否かを判断し、成功した場合はステップS72へ進み、それ以外の場合は処理を終了する。
ステップS72では、不要ステータス廃棄モジュール1331が、対応するコマンドID/ユーザIDの有効フラグ(データ58の有効フラグ55)をチェックし、有効フラグがオフの場合はステップS77へ進み、それ以外の場合はステップS73へ進む。
FIG. 25 shows an example of the processing sequence in the read method of the unnecessary status discard function (unnecessary status discard module 1331).
In step S70, the unnecessary status discard module 1331 performs the status reading process. That is, the unnecessary status discard module 1331 reads the status 30 from the status buffer 1030 by inter-OS communication. Specifically, the inter-OS communication driver 16 waits until the notification of NOT EMPTY from the inter-OS communication driver 19 is received. Upon receiving the NOT EMPTY notification, the inter-OS communication driver 16 reads the status 30 from the status buffer 1030 by inter-OS communication.
In step S71, the unnecessary status discard module 1331 determines whether or not the status reading is successful, and if it succeeds, the process proceeds to step S72, and if not, the process ends.
In step S72, the unnecessary status discard module 1331 checks the valid flag of the corresponding command ID / user ID (valid flag 55 of data 58), proceeds to step S77 if the valid flag is off, and proceeds to step S77 otherwise. The process proceeds to step S73.

ステップS73では、不要ステータス廃棄モジュール1331が、対応するコマンドID/ユーザIDのカウンタ(データ58のカウンタ56)をチェックし、カウンタが0の場合はステップS75へ進み、それ以外の場合はステップS74へ進む。
ステップS74では、不要ステータス廃棄モジュール1331が、データ58のカウンタ56を1減少させ、カウンタ56が0になった場合はステップS76へ進み、それ以外の場合はステップS75へ進む。
ステップS75では、不要ステータス廃棄モジュール1331が、ステータス30を廃棄する。
ステップS76では、不要ステータス廃棄モジュール1331が、データ58の有効フラグ55をオフにし、処理を終了する。
ステップS77では、不要ステータス廃棄モジュール1331が、対応するコマンドID/ユーザIDのカウンタ(データ58のカウンタ56)をチェックし、カウンタが0の場合はステップS79へ進み、それ以外の場合はステップS78へ進む。
ステップS78では、不要ステータス廃棄モジュール1331が、カウンタ56を1減少させる。
ステップS79では、不要ステータス廃棄モジュール1331が、ステータス30を廃棄し、処理を終了する。
In step S73, the unnecessary status discard module 1331 checks the counter of the corresponding command ID / user ID (counter 56 of the data 58), and if the counter is 0, the process proceeds to step S75, otherwise the process proceeds to step S74. move on.
In step S74, the unnecessary status discard module 1331 decrements the counter 56 of the data 58 by 1, and if the counter 56 becomes 0, the process proceeds to step S76, otherwise the process proceeds to step S75.
In step S75, the unnecessary status discard module 1331 discards status 30.
In step S76, the unnecessary status discard module 1331 turns off the valid flag 55 of the data 58 and ends the process.
In step S77, the unnecessary status discard module 1331 checks the counter of the corresponding command ID / user ID (counter 56 of the data 58), and if the counter is 0, the process proceeds to step S79, otherwise the process proceeds to step S78. move on.
In step S78, the unwanted status discard module 1331 decrements the counter 56 by one.
In step S79, the unnecessary status discard module 1331 discards the status 30 and ends the process.

図26は、コマンド再発行機能(コマンド再発行モジュール1632)の初期化処理シーケンスの例を示している。
ステップS101では、コマンド再発行モジュール1632が、不要なステータス廃棄機能初期化処理を行う。具体的には、図22の例に示した処理を行う。
ステップS102からステップS104までの処理をコマンドID(1,1,n)分繰り返す。つまり、コマンド再発行モジュール1632が、コマンドIDループカウンタ(初期値は1)に1を加算する。
ステップS103では、コマンド再発行モジュール1632が、コマンドデータ66の発行済みコマンド保持領域へのポインタ64をNULLで初期化する。
ステップS104においては、コマンド再発行モジュール1632が、コマンドIDループカウンタがnに達したか否かを判定し、コマンドIDループカウンタがnに達していないならばステップS102に戻り、nに達したならばステップS105に移る。
FIG. 26 shows an example of the initialization processing sequence of the command reissue function (command reissue module 1632).
In step S101, the command reissue module 1632 performs an unnecessary status discard function initialization process. Specifically, the process shown in the example of FIG. 22 is performed.
The processing from step S102 to step S104 is repeated for the command ID (1,1, n). That is, the command reissue module 1632 adds 1 to the command ID loop counter (initial value is 1).
In step S103, the command reissue module 1632 initializes the pointer 64 to the issued command holding area of the command data 66 with NULL.
In step S104, the command reissue module 1632 determines whether or not the command ID loop counter has reached n, returns to step S102 if the command ID loop counter has not reached n, and if n has been reached. Then, the process proceeds to step S105.

ステップS105では、コマンド再発行モジュール1632が、コマンドデータ66の発行済みコマンド保持領域へのポインタ64をNULLで初期化する。
ステップS106では、コマンド再発行モジュール1632が、fdデータ70の仮想fd67をx(正の値)とし、fdデータ70の実fd68を−1で初期化する。
In step S105, the command reissue module 1632 initializes the pointer 64 to the issued command holding area of the command data 66 with NULL.
In step S106, the command reissue module 1632 sets the virtual fd67 of the fd data 70 to x (positive value) and initializes the real fd68 of the fd data 70 to -1.

図27は、コマンド再発行機能(コマンド再発行モジュール1632)のwriteメソッド内での処理シーケンスの例を示している。
ステップS107では、コマンド再発行モジュール1632が、コマンド生成処理(仮想fdを実fdに変換する処理)を行う。
ステップS108では、コマンド再発行モジュール1632が、コマンド書き込み処理を行う。
ステップS109では、コマンド再発行モジュール1632が、不要なステータス廃棄機能のwriteメソッド処理を行う。具体的には、図24の例に示した処理を行う。
FIG. 27 shows an example of a processing sequence in the write method of the command reissue function (command reissue module 1632).
In step S107, the command reissue module 1632 performs a command generation process (a process of converting a virtual fd into a real fd).
In step S108, the command reissue module 1632 performs a command writing process.
In step S109, the command reissue module 1632 performs write method processing of an unnecessary status discard function. Specifically, the process shown in the example of FIG. 24 is performed.

ステップS110では、コマンド再発行モジュール1632が、openコマンドであるか否かを判断し、openコマンドの場合はステップS111へ進み、それ以外の場合はステップS112へ進む。
ステップS111では、コマンド再発行モジュール1632が、保持領域を確保し、openコマンドをコピーし、fdデータ70の発行済みopenコマンド保持領域へのポインタ69に保持領域のアドレスを設定し、処理を終了する。
ステップS112では、コマンド再発行モジュール1632が、非同期コマンドであるか否かを判断し、非同期コマンドの場合はステップS113へ進み、それ以外の場合は処理を終了する。
ステップS113では、コマンド再発行モジュール1632が、保持領域を確保し、非同期コマンドをコピーし、対応するコマンドID/ユーザIDの発行済み非同期コマンド保持領域へのポインタに保持領域のアドレスを設定し、処理を終了する。
In step S110, the command reissue module 1632 determines whether or not it is an open command, and if it is an open command, the process proceeds to step S111, and if not, the process proceeds to step S112.
In step S111, the command reissue module 1632 secures a holding area, copies the open command, sets the address of the holding area to the pointer 69 to the issued open command holding area of the fd data 70, and ends the process. ..
In step S112, the command reissue module 1632 determines whether or not it is an asynchronous command, proceeds to step S113 if it is an asynchronous command, and ends the process in other cases.
In step S113, the command reissue module 1632 secures the holding area, copies the asynchronous command, sets the address of the holding area in the pointer to the issued asynchronous command holding area of the corresponding command ID / user ID, and processes it. To finish.

図28は、コマンド再発行機能(コマンド再発行モジュール1632)のreadメソッド内での処理シーケンスの例を示している。
ステップS114では、コマンド再発行モジュール1632が、ステータス読み込み処理を行う。コマンド再発行モジュール1632が、OS間通信によりステータスバッファ1030からステータス30を読み出す。具体的には、OS間通信ドライバ19からのNOT EMPTYの通知を受け取るまでOS間通信ドライバ16が待機する。NOT EMPTYの通知を受け取ると、OS間通信ドライバ16が、OS間通信によりステータスバッファ1030からステータス30を読み出す。
ステップS115では、コマンド再発行モジュール1632が、不要なステータス廃棄機能のreadメソッド処理を行う。具体的には、図25の例に示した処理を行う。
FIG. 28 shows an example of a processing sequence in the read method of the command reissue function (command reissue module 1632).
In step S114, the command reissue module 1632 performs the status reading process. The command reissue module 1632 reads the status 30 from the status buffer 1030 by inter-OS communication. Specifically, the inter-OS communication driver 16 waits until the notification of NOT EMPTY from the inter-OS communication driver 19 is received. Upon receiving the NOT EMPTY notification, the inter-OS communication driver 16 reads the status 30 from the status buffer 1030 by inter-OS communication.
In step S115, the command reissue module 1632 performs the read method processing of the unnecessary status discard function. Specifically, the process shown in the example of FIG. 25 is performed.

ステップS116では、コマンド再発行モジュール1632が、closeコマンドであるか否かを判断し、closeコマンドの場合はステップS117へ進み、それ以外の場合はステップS119へ進む。
ステップS117では、コマンド再発行モジュール1632が、保持領域を解放し、fdデータ70の発行済みopenコマンド保持領域へのポインタ69にNULLを設定する。
ステップS118では、コマンド再発行モジュール1632が、コマンド再発行機能の実fdを−1でリセットし、処理を終了する。
In step S116, the command reissue module 1632 determines whether or not it is a close command, and if it is a close command, the process proceeds to step S117, and if not, the process proceeds to step S119.
In step S117, the command reissue module 1632 releases the holding area and sets NULL for the pointer 69 to the issued open command holding area of the fd data 70.
In step S118, the command reissue module 1632 resets the actual fd of the command reissue function by -1, and ends the process.

ステップS119では、コマンド再発行モジュール1632が、非同期コマンドであるか否かを判断し、非同期コマンドの場合はステップS120へ進み、それ以外の場合はステップS121へ進む。
ステップS120では、コマンド再発行モジュール1632が、保持領域を解放し、対応するコマンドID/ユーザIDの発行済み非同期コマンド保持領域へのポインタにNULLを設定し、処理を終了する。
ステップS121では、コマンド再発行モジュール1632が、openコマンドであり、かつ「fd≧0」であるか否かを判断し、openコマンドであり、かつ「fd≧0」の場合はステップS122へ進み、それ以外の場合は処理を終了する。
ステップS122では、コマンド再発行モジュール1632が、ステータスデータのパラメータ領域に含まれるfdをコマンド再発行機能の実fdに設定する。
ステップS123では、コマンド再発行モジュール1632が、ステータスデータのパラメータ領域に含まれるfdをコマンド再発行機能の仮想fdに変換し、処理を終了する。
In step S119, the command reissue module 1632 determines whether or not the command is an asynchronous command, and if it is an asynchronous command, the process proceeds to step S120, and if not, the process proceeds to step S121.
In step S120, the command reissue module 1632 releases the holding area, sets NULL as a pointer to the issued asynchronous command holding area of the corresponding command ID / user ID, and ends the process.
In step S121, it is determined whether or not the command reissue module 1632 is an open command and “fd ≧ 0”, and if it is an open command and “fd ≧ 0”, the process proceeds to step S122. In other cases, the process ends.
In step S122, the command reissue module 1632 sets the fd included in the parameter area of the status data to the actual fd of the command reissue function.
In step S123, the command reissue module 1632 converts the fd included in the parameter area of the status data into the virtual fd of the command reissue function, and ends the process.

なお、各モジュール(プロセス1、スレッド[1]:2、スレッド[2]:3、スレッド[3]:4、API12、API13、ライブラリ15、OA間通信ドライバ16、第1OS17、PCle18、第2OS9、OA間通信ドライバ19、タスク20、コタスク[1]:25、コタスク[2]:26、API5、API6、ドライバ8、コマンドバッファ1029、ステータスバッファ1030、多重実行判別モジュール1033、不要ステータス廃棄モジュール1331、コマンド再発行モジュール1632等)の処理内容として背景技術で説明した技術を採用してもよい。 Each module (process 1, thread [1]: 2, thread [2]: 3, thread [3]: 4, API12, API13, library 15, OA-to-OA communication driver 16, 1st OS17, PCle18, 2nd OS9, Inter-OA communication driver 19, task 20, cotasking [1]: 25, cotasking [2]: 26, API5, API6, driver 8, command buffer 1029, status buffer 1030, multiple execution determination module 1033, unnecessary status discard module 1331, The technique described in the background technique may be adopted as the processing content of the command reissue module 1632, etc.).

また、説明したプログラムについては、記録媒体に格納して提供してもよく、また、そのプログラムを通信手段によって提供してもよい。その場合、例えば、前記説明したプログラムについて、「プログラムを記録したコンピュータ読み取り可能な記録媒体」の発明として捉えてもよい。
「プログラムを記録したコンピュータ読み取り可能な記録媒体」とは、プログラムのインストール、実行、プログラムの流通等のために用いられる、プログラムが記録されたコンピュータで読み取り可能な記録媒体をいう。
なお、記録媒体としては、例えば、デジタル・バーサタイル・ディスク(DVD)であって、DVDフォーラムで策定された規格である「DVD−R、DVD−RW、DVD−RAM等」、DVD+RWで策定された規格である「DVD+R、DVD+RW等」、コンパクトディスク(CD)であって、読出し専用メモリ(CD−ROM)、CDレコーダブル(CD−R)、CDリライタブル(CD−RW)等、ブルーレイ・ディスク(Blu−ray(登録商標) Disc)、光磁気ディスク(MO)、フレキシブルディスク(FD)、磁気テープ、ハードディスク、読出し専用メモリ(ROM)、電気的消去及び書換可能な読出し専用メモリ(EEPROM(登録商標))、フラッシュ・メモリ、ランダム・アクセス・メモリ(RAM)、SD(Secure Digital)メモリーカード等が含まれる。
そして、前記のプログラムの全体又はその一部は、前記記録媒体に記録して保存や流通等させてもよい。また、通信によって、例えば、ローカル・エリア・ネットワーク(LAN)、メトロポリタン・エリア・ネットワーク(MAN)、ワイド・エリア・ネットワーク(WAN)、インターネット、イントラネット、エクストラネット等に用いられる有線ネットワーク、又は無線通信ネットワーク、さらにこれらの組み合わせ等の伝送媒体を用いて伝送させてもよく、また、搬送波に乗せて搬送させてもよい。
さらに、前記のプログラムは、他のプログラムの一部分若しくは全部であってもよく、又は別個のプログラムと共に記録媒体に記録されていてもよい。また、複数の記録媒体に分割して記録されていてもよい。また、圧縮や暗号化等、復元可能であればどのような態様で記録されていてもよい。
Further, the described program may be stored in a recording medium and provided, or the program may be provided by a communication means. In that case, for example, the program described above may be regarded as an invention of "a computer-readable recording medium on which the program is recorded".
The "computer-readable recording medium on which a program is recorded" means a computer-readable recording medium on which a program is recorded, which is used for program installation, execution, program distribution, and the like.
The recording medium is, for example, a digital versatile disc (DVD), which is a standard established by the DVD Forum "DVD-R, DVD-RW, DVD-RAM, etc." and DVD + RW. Standards such as "DVD + R, DVD + RW, etc.", compact discs (CD), read-only memory (CD-ROM), CD recordable (CD-R), CD rewritable (CD-RW), etc., Blu-ray discs (CD-RW) Blu-ray (registered trademark) Disc), optical magnetic disk (MO), flexible disk (FD), magnetic tape, hard disk, read-only memory (ROM), electrically erasable and rewritable read-only memory (EEPROM (registered trademark)) )), Flash memory, random access memory (RAM), SD (Secure Digital) memory card and the like.
Then, the whole or a part of the program may be recorded on the recording medium and stored, distributed, or the like. Further, by communication, for example, a wired network used for a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), the Internet, an intranet, an extranet, or wireless communication. It may be transmitted using a transmission medium such as a network or a combination thereof, or may be carried on a carrier.
Further, the program may be a part or all of other programs, or may be recorded on a recording medium together with a separate program. Further, the recording may be divided into a plurality of recording media. Further, it may be recorded in any mode as long as it can be restored, such as compression and encryption.

1…プロセス
2…スレッド[1]
3…スレッド[2]
4…スレッド[3]
5…API
6…API
7…API
8…ドライバ
9…第2OS
10…システムコール
11…戻り値
12…API
13…API
14…API
15…ライブラリ
16…OA間通信ドライバ
17…第1OS
18…PCle
19…OA間通信ドライバ
20…タスク
21…関数
22…戻り値
25…コタスク[1]
26…コタスク[2]
27…通信路
28…インタラプト
29…コマンド
30…ステータス
100…第1制御手段
101…CPU
102…RAM
103…ROM
104…通信I/F
105…HDD
106…LAN端子
110…バス
200…第2制御手段
201…CPU
202…RAM
203…ROM
204…通信I/F
210…バス
300…デバイス
301…イメージスキャナ
302…プリンタ
303…UI
304…圧縮/伸長装置
1000…画像形成装置
1029…コマンドバッファ
1030…ステータスバッファ
1033…多重実行判別モジュール
1331…不要ステータス廃棄モジュール
1632…コマンド再発行モジュール
1 ... Process 2 ... Thread [1]
3 ... Thread [2]
4 ... Thread [3]
5 ... API
6 ... API
7 ... API
8 ... Driver 9 ... 2nd OS
10 ... System call 11 ... Return value 12 ... API
13 ... API
14 ... API
15 ... Library 16 ... Communication driver between OA 17 ... 1st OS
18 ... PCle
19 ... OA communication driver 20 ... task 21 ... function 22 ... return value 25 ... cotasking [1]
26 ... Cotasking [2]
27 ... Communication path 28 ... Interrupt 29 ... Command 30 ... Status 100 ... First control means 101 ... CPU
102 ... RAM
103 ... ROM
104 ... Communication I / F
105 ... HDD
106 ... LAN terminal 110 ... Bus 200 ... Second control means 201 ... CPU
202 ... RAM
203 ... ROM
204 ... Communication I / F
210 ... Bus 300 ... Device 301 ... Image Scanner 302 ... Printer 303 ... UI
304 ... Compression / decompression device 1000 ... Image forming device 1029 ... Command buffer 1030 ... Status buffer 1033 ... Multiple execution determination module 1331 ... Unnecessary status discard module 1632 ... Command reissue module

Claims (11)

第1OSによる制御を実行する第1制御手段と、
第2OSによる制御を実行する第2制御手段と、
前記第2制御手段によって制御されるデバイスと
を備え、
前記第1制御手段は、
前記第1OS上で動作中のプロセスが呼び出した関数を前記第1OSと前記第2OSとで共通に解釈されるコマンドに変換する第1変換手段と、
前記第1変換手段によって変換されたコマンドを前記第2制御手段の記憶領域に書き込むコマンド書込手段と、
前記コマンド書込手段によって書き込まれたコマンドに対応する前記第2OSのシステムコールの前記第2制御手段による実行の結果を示すステータスが前記記憶領域に書き込まれたことを示す通知を受けた場合に当該ステータスを前記記憶領域から読み出すステータス読出手段と、
前記ステータス読出手段によって読み出された前記ステータスを前記プロセスが解釈する戻り値に変換し、当該戻り値を前記プロセスに返す第2変換手段
を備え、
前記プロセス内には複数のスレッドが実行されており、前記関数は、該スレッドが呼び出しており、
前記第1変換手段は、前記関数が多重実行可能である場合、前記スレッドを識別するスレッド識別情報を付加したコマンドに変換し、
前記ステータス読出手段は、前記ステータスとともにスレッド識別情報を読み出し、
前記第2変換手段は、前記ステータス読出手段によって読み出された前記スレッド識別情報にしたがって、ステータスを前記スレッドが解釈する戻り値に変換し、
前記第1変換手段は、前記関数が多重実行可能でない場合は、該関数を呼び出したスレッドにエラーを返信する、
電子機器。
A first control means that executes control by the first OS,
A second control means that executes control by the second OS,
A device controlled by the second control means is provided.
The first control means
A first conversion means for converting a function called by a process running on the first OS into a command commonly interpreted by the first OS and the second OS.
A command writing means for writing a command converted by the first conversion means to the storage area of the second control means, and a command writing means.
When a notification is received indicating that the status indicating the result of execution of the system call of the second OS corresponding to the command written by the command writing means by the second control means has been written in the storage area. A status reading means for reading the status from the storage area, and
A second conversion means for converting the status read by the status reading means into a return value interpreted by the process and returning the return value to the process is provided.
A plurality of threads are executed in the process, and the function is called by the thread.
When the function can be executed multiple times, the first conversion means converts the function into a command to which thread identification information for identifying the thread is added.
The status reading means reads the thread identification information together with the status, and reads the thread identification information.
The second conversion means converts the status into a return value interpreted by the thread according to the thread identification information read by the status reading means .
If the function is not multi-executable, the first conversion means returns an error to the thread that called the function.
Electronics.
前記第1変換手段は、前記関数に前記スレッド識別情報が付加されている場合であって、前記関数が多重実行可能でないときは、スレッド識別情報を無効化し、該関数を呼び出したスレッドにエラーを返信する、
請求項に記載の電子機器。
When the thread identification information is added to the function and the function cannot be executed multiple times, the first conversion means invalidates the thread identification information and sends an error to the thread that called the function. Send back,
The electronic device according to claim 1.
前記第1変換手段は、前記関数に前記スレッド識別情報が付加されていない場合であって、前記関数が多重実行可能でないときは、該関数を呼び出したスレッドにエラーを返信する、
請求項に記載の電子機器。
The first conversion means returns an error to the thread that called the function when the thread identification information is not added to the function and the function cannot be executed multiple times.
The electronic device according to claim 1.
前記コマンド書込手段による前記コマンドの書き込み後、前記ステータス読出手段によって前記ステータスが読み出される前に前記プロセスが再起動された場合に、前記プロセスの再起動後に前記ステータス読出手段によって読み出された前記ステータスを廃棄するステータス廃棄手段
をさらに備えた請求項1からのいずれか一項に記載の電子機器。
If the process is restarted after the command writing means writes the command and before the status is read by the status reading means, the status read means is read after the process is restarted. The electronic device according to any one of claims 1 to 3 , further comprising a status disposal means for discarding the status.
前記コマンドが前記記憶領域に書き込まれた場合にONを示し、前記プロセスが再起動された場合にOFFを示すフラグを、前記コマンドの種類毎に記憶するフラグ記憶手段を備え、
前記ステータス廃棄手段は、前記ステータス読出手段によるステータスの読み出し後に当該ステータスに対応するコマンドの種類と対応付けて前記フラグ記憶手段に記憶されているフラグがOFFを示す場合に、当該ステータスを廃棄する、
請求項に記載の電子機器。
A flag storage means for storing a flag indicating ON when the command is written to the storage area and OFF when the process is restarted for each type of the command is provided.
The status discarding means discards the status when the flag stored in the flag storage means indicates OFF in association with the type of command corresponding to the status after the status is read by the status reading means.
The electronic device according to claim 4.
コマンドの種類毎に、前記コマンド書込手段によるコマンドの書き込み回数から、前記ステータス読出手段による当該コマンドの種類に対応するステータスの読み出し回数を差し引いた数を示すカウンタを記憶するカウンタ記憶手段を備え、
前記ステータス廃棄手段は、前記ステータス読出手段によるステータスの読み出し後に、当該ステータスに対応するコマンドの種類と対応付けて前記フラグ記憶手段に記憶されているフラグが有効を示し、かつ、当該ステータスに対応するコマンドの種類と対応付けて前記カウンタ記憶手段に記憶されているカウンタが1を示さない場合に、当該ステータスを廃棄する、
請求項に記載の電子機器。
For each type of command, a counter storage means for storing a counter indicating the number obtained by subtracting the number of times of reading the status corresponding to the type of the command by the status reading means from the number of times the command is written by the command writing means is provided.
After reading the status by the status reading means, the status discarding means indicates that the flag stored in the flag storage means is valid in association with the type of the command corresponding to the status, and corresponds to the status. If the counter stored in the counter storage means does not show 1 in association with the command type, the status is discarded.
The electronic device according to claim 5.
前記第1変換手段によって変換されたコマンドを保持するコマンド保持手段と、
前記コマンド書込手段による前記コマンドの書き込み後、当該コマンドに対応する前記第2OSのシステムコールが前記第2制御手段によって実行される前に前記第2OSが再起動された場合に、前記コマンド保持手段によって保持された前記コマンドを前記記憶領域に書き込むコマンド再書込手段
をさらに備えた請求項からのいずれか一項に記載の電子機器。
A command holding means for holding the command converted by the first conversion means, and
When the second OS is restarted after the command writing means writes the command and before the system call of the second OS corresponding to the command is executed by the second control means, the command holding means. The electronic device according to any one of claims 4 to 6 , further comprising a command rewriting means for writing the command held by the user in the storage area.
前記コマンド再書込手段は、前記第2OSの再起動後にopenコマンドに対応するステータスが前記ステータス読出手段によって読み出された場合に、当該ステータスに含まれるファイルディスクリプタを引数とするコマンドを前記記憶領域に書き込む、
請求項に記載の電子機器。
The command rewriting means stores a command in which a file descriptor included in the status is an argument when the status corresponding to the open command is read by the status reading means after the second OS is restarted. Write to,
The electronic device according to claim 7.
前記デバイスは、画像データに基づいて画像を形成する、
請求項1からのいずれか一項に記載の電子機器。
The device forms an image based on the image data.
The electronic device according to any one of claims 1 to 8.
第1OS上で動作中のプロセスが呼び出した関数を前記第1OSと第2OSとで共通に解釈されるコマンドに変換する第1変換手段と、
前記第1変換手段によって変換されたコマンドを、前記第2OSを実行する第2の制御装置の記憶領域に書き込むコマンド書込手段と、
前記コマンド書込手段によって書き込まれたコマンドに対応する前記第2OSのシステムコールの前記第2の制御装置による実行の結果を示すステータスが前記記憶領域に書き込まれたことを示す通知を受けた場合に当該ステータスを前記記憶領域から読み出すステータス読出手段と、
前記ステータス読出手段によって読み出された前記ステータスを前記プロセスが解釈する戻り値に変換し、当該戻り値を前記プロセスに返す第2変換手段
を備え、
前記プロセス内には複数のスレッドが実行されており、前記関数は、該スレッドが呼び出しており、
前記第1変換手段は、前記関数が多重実行可能である場合、前記スレッドを識別するスレッド識別情報を付加したコマンドに変換し、
前記ステータス読出手段は、前記ステータスとともにスレッド識別情報を読み出し、
前記第2変換手段は、前記ステータス読出手段によって読み出された前記スレッド識別情報にしたがって、ステータスを前記スレッドが解釈する戻り値に変換し、
前記第1変換手段は、前記関数が多重実行可能でない場合は、該関数を呼び出したスレッドにエラーを返信する、
制御装置。
A first conversion means that converts a function called by a process running on the first OS into a command that is commonly interpreted by the first OS and the second OS.
A command writing means for writing a command converted by the first conversion means to a storage area of a second control device that executes the second OS, and a command writing means.
When a notification is received indicating that the status indicating the result of execution of the system call of the second OS corresponding to the command written by the command writing means by the second control device has been written to the storage area. A status reading means for reading the status from the storage area and
A second conversion means for converting the status read by the status reading means into a return value interpreted by the process and returning the return value to the process is provided.
A plurality of threads are executed in the process, and the function is called by the thread.
When the function can be executed multiple times, the first conversion means converts the function into a command to which thread identification information for identifying the thread is added.
The status reading means reads the thread identification information together with the status, and reads the thread identification information.
The second conversion means converts the status into a return value interpreted by the thread according to the thread identification information read by the status reading means .
If the function is not multi-executable, the first conversion means returns an error to the thread that called the function.
Control device.
コンピュータを、
第1OS上で動作中のプロセスが呼び出した関数を前記第1OSと第2OSとで共通に解釈されるコマンドに変換する第1変換手段と、
前記第1変換手段によって変換されたコマンドを、前記第2OSを実行する第2のコンピュータの記憶領域に書き込むコマンド書込手段と、
前記コマンド書込手段によって書き込まれたコマンドに対応する前記第2OSのシステムコールの前記第2のコンピュータによる実行の結果を示すステータスが前記記憶領域に書き込まれたことを示す通知を受けた場合に当該ステータスを前記記憶領域から読み出すステータス読出手段と、
前記ステータス読出手段によって読み出された前記ステータスを前記プロセスが解釈する戻り値に変換し、当該戻り値を前記プロセスに返す第2変換手段
として機能させ、
前記プロセス内には複数のスレッドが実行されており、前記関数は、該スレッドが呼び出しており、
前記第1変換手段は、前記関数が多重実行可能である場合、前記スレッドを識別するスレッド識別情報を付加したコマンドに変換し、
前記ステータス読出手段は、前記ステータスとともにスレッド識別情報を読み出し、
前記第2変換手段は、前記ステータス読出手段によって読み出された前記スレッド識別情報にしたがって、ステータスを前記スレッドが解釈する戻り値に変換し、
前記第1変換手段は、前記関数が多重実行可能でない場合は、該関数を呼び出したスレッドにエラーを返信する、
プログラム。
Computer,
A first conversion means that converts a function called by a process running on the first OS into a command that is commonly interpreted by the first OS and the second OS.
A command writing means for writing a command converted by the first conversion means to a storage area of a second computer executing the second OS, and a command writing means.
When a notification is received indicating that the status indicating the result of execution of the system call of the second OS corresponding to the command written by the command writing means by the second computer has been written to the storage area. A status reading means for reading the status from the storage area and
The status read by the status reading means is converted into a return value interpreted by the process, and the return value is returned to the process as a second conversion means.
A plurality of threads are executed in the process, and the function is called by the thread.
When the function can be executed multiple times, the first conversion means converts the function into a command to which thread identification information for identifying the thread is added.
The status reading means reads the thread identification information together with the status, and reads the thread identification information.
The second conversion means converts the status into a return value interpreted by the thread according to the thread identification information read by the status reading means .
If the function is not multi-executable, the first conversion means returns an error to the thread that called the function.
program.
JP2017144669A 2017-07-26 2017-07-26 Electronics, controls and programs Active JP6946820B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017144669A JP6946820B2 (en) 2017-07-26 2017-07-26 Electronics, controls and programs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017144669A JP6946820B2 (en) 2017-07-26 2017-07-26 Electronics, controls and programs

Publications (2)

Publication Number Publication Date
JP2019028557A JP2019028557A (en) 2019-02-21
JP6946820B2 true JP6946820B2 (en) 2021-10-06

Family

ID=65478354

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017144669A Active JP6946820B2 (en) 2017-07-26 2017-07-26 Electronics, controls and programs

Country Status (1)

Country Link
JP (1) JP6946820B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000227860A (en) * 1999-02-08 2000-08-15 Nec Corp Parallel access control method, parallel access controller and multi-thread process method
JP6098389B2 (en) * 2013-06-20 2017-03-22 富士ゼロックス株式会社 Electronic device, control device and program

Also Published As

Publication number Publication date
JP2019028557A (en) 2019-02-21

Similar Documents

Publication Publication Date Title
RU2665307C2 (en) Recovery of application from snapshot
JP6413813B2 (en) Electronic device, control device and program
US11625209B2 (en) Image formation apparatus and for transmitting print data to a folder
EP2765525B1 (en) Apparatus, non-transitory computer readable information recording medium and information recording method
KR19990013514A (en) How to restart the operating system
US11140291B2 (en) Information processing apparatus, control method thereof, and storage medium
JP6098389B2 (en) Electronic device, control device and program
US20220284103A1 (en) Information processing apparatus, information processing method, and storage medium
JP2021012598A (en) Information processing apparatus and control method
JP6946820B2 (en) Electronics, controls and programs
JP6876235B2 (en) Electronic equipment and image processing equipment
US20220374256A1 (en) Information processing system, information processing apparatus, method of controlling the same, and storage medium
US11397603B2 (en) Information processing apparatus, control method therefor, and program
US11550620B2 (en) Task dispatch
US11461490B1 (en) Systems, methods, and devices for conditionally allowing processes to alter data on a storage device
JP6497157B2 (en) Information management apparatus, information management method, information management program, data structure, and software asset management system
JP7139926B2 (en) Electronic device, anomaly detection method and program
US20190303580A1 (en) Information processing apparatus, and information processing method
US11842066B2 (en) Control apparatus and information processing system for providing a bridge apparatus between a host controller and a non-volatile storage medium to encrypt and decrypt data
US11687287B2 (en) Control apparatus and information processing system
JP7206769B2 (en) Electronic device and method of operation
US10951787B2 (en) Information processing apparatus that controls timing for enabling an application, control method of information processing apparatus, and recording medium
US11829670B2 (en) Information processing apparatus and control method for information processing apparatus
JP2018192740A (en) Image formation device, information processing method and program
JP2006344022A (en) Equipment and program starting method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200619

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210430

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210601

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210728

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20210817

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210830

R150 Certificate of patent or registration of utility model

Ref document number: 6946820

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150