JP2012173884A - Data transfer control device and program - Google Patents

Data transfer control device and program Download PDF

Info

Publication number
JP2012173884A
JP2012173884A JP2011033835A JP2011033835A JP2012173884A JP 2012173884 A JP2012173884 A JP 2012173884A JP 2011033835 A JP2011033835 A JP 2011033835A JP 2011033835 A JP2011033835 A JP 2011033835A JP 2012173884 A JP2012173884 A JP 2012173884A
Authority
JP
Japan
Prior art keywords
data
operating system
size
divided
shared memory
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.)
Granted
Application number
JP2011033835A
Other languages
Japanese (ja)
Other versions
JP5652242B2 (en
Inventor
Hiroshi Okubo
宏 大久保
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
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 filed Critical Fuji Xerox Co Ltd
Priority to JP2011033835A priority Critical patent/JP5652242B2/en
Publication of JP2012173884A publication Critical patent/JP2012173884A/en
Application granted granted Critical
Publication of JP5652242B2 publication Critical patent/JP5652242B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Multi Processors (AREA)

Abstract

PROBLEM TO BE SOLVED: To efficiently transfer data between different OSs even when a size of a shared memory is limited.SOLUTION: In the case that a data transfer instruction for transferring data from a first OS to a hardware device managed by a second OS is issued to the first OS, the data of a transfer object by the data transfer instruction is divided into two or more pieces of division data of a size smaller than a usable size of a shared memory to be shared and used by the first OS and the second OS and written to the shared memory. A division data transfer command specifying the data size of the division data as a transfer size is generated and issued to the second OS every time the division data is written to the shared memory so that the division data written to the shared memory is read in the second OS and transferred to the hardware device.

Description

本発明は、データ転送制御装置及びプログラムに関する。   The present invention relates to a data transfer control device and a program.

特許文献1には、共有メモリと割り込みを用いてプロセッサ間通信を行い、通信先のプロセッサ割り込み手段でオペレーティング・システム(OS)のシステムコールを発行し、その処理結果を別のプロセッサ間通信で通信元に通知する技術が開示されている。   In Patent Document 1, inter-processor communication is performed using a shared memory and an interrupt, an operating system (OS) system call is issued by a processor interrupt means of a communication destination, and the processing result is communicated by another inter-processor communication. A technique to notify the origin is disclosed.

特開平3−42762号公報JP-A-3-42762

本発明は、共有メモリのサイズに制限があっても、異なるOS間で効率的にデータ転送を行うことができるデータ転送制御装置及びプログラムを得ることを目的とする。   An object of the present invention is to provide a data transfer control device and program capable of efficiently transferring data between different OSs even when the size of the shared memory is limited.

請求項1の発明は、第1オペレーティング・システムから前記第1オペレーティング・システムとは異なる第2オペレーティング・システムで管理するハードウェア・デバイスへデータを転送するためのデータ転送命令が、前記第1オペレーティング・システムに対して発行された場合に、前記データ転送命令による転送対象のデータを、前記第1オペレーティング・システム及び前記第2オペレーティング・システムが共有して使用する共有メモリの使用可能なサイズよりも小さいサイズの複数個の分割データに分割して、前記共有メモリに書き込む書込手段と、前記書込手段で前記共有メモリに書き込まれた分割データが前記第2オペレーティング・システムにおいて読み出されて前記ハードウェア・デバイスに転送されるように、前記書込手段で前記分割データが前記共有メモリに書き込まれる毎に、前記分割データのデータサイズを転送サイズとして指定した分割データ転送コマンドを生成して前記第2オペレーティング・システムに対して発行する発行手段と、を備えたデータ転送制御装置である。   According to a first aspect of the present invention, there is provided a data transfer instruction for transferring data from a first operating system to a hardware device managed by a second operating system different from the first operating system. When issued to the system, the data to be transferred by the data transfer instruction is larger than the usable size of the shared memory that is shared and used by the first operating system and the second operating system. Writing means for dividing into a plurality of divided data of a small size and writing to the shared memory; and the divided data written to the shared memory by the writing means is read by the second operating system and To be transferred to the hardware device Issuing means for generating a divided data transfer command specifying the data size of the divided data as a transfer size and issuing it to the second operating system each time the divided data is written into the shared memory by the loading means; , A data transfer control device.

請求項2の発明は、第1オペレーティング・システムとは異なる第2オペレーティング・システムで管理するハードウェア・デバイスからデータを取得するためのデータ取得命令が、前記第1オペレーティング・システムに対して発行された場合に、前記第2オペレーティング・システムにおいて前記データ取得命令による取得対象のデータが、前記第1オペレーティング・システム及び前記第2オペレーティング・システムが共有して使用する共有メモリの使用可能なサイズよりも小さいサイズの複数個の分割データに分割されて、該分割データ毎に前記ハードウェア・デバイスから読み出されて前記共有メモリに書き込まれるように、該分割データのサイズを転送サイズとして指定した分割データ転送コマンドを生成し、該書き込まれた分割データが前記第1オペレーティング・システムにおいて読み出されるように、前記第2オペレーティング・システムに対して発行する発行手段と、前記第2オペレーティング・システムにより前記分割データ転送コマンドに応じて前記共有メモリに書き込まれた分割データを前記共有メモリから読出して前記データ取得命令の発行元に転送する転送手段と、を備えたデータ転送制御装置である。   According to the invention of claim 2, a data acquisition instruction for acquiring data from a hardware device managed by a second operating system different from the first operating system is issued to the first operating system. The data to be acquired by the data acquisition instruction in the second operating system is larger than the usable size of the shared memory shared and used by the first operating system and the second operating system. Divided data in which the size of the divided data is specified as the transfer size so that the divided data is divided into a plurality of divided data and is read from the hardware device and written to the shared memory for each divided data. Generate a transfer command and write it Issuing means for issuing to the second operating system so that split data is read in the first operating system, and writing to the shared memory in response to the split data transfer command by the second operating system And a transfer means for reading the divided data from the shared memory and transferring it to the issuer of the data acquisition instruction.

請求項3の発明は、請求項2に記載のデータ転送制御装置において、前記取得対象のデータの前記共有メモリへの転送が終了した場合に、前記第2オペレーティング・システムに対して既に発行された未実行の前記分割データ転送コマンドの実行が中止されるように制御する制御手段と、を更に備えている。   According to a third aspect of the present invention, in the data transfer control device according to the second aspect, when the transfer of the data to be acquired to the shared memory is completed, it has already been issued to the second operating system. Control means for controlling the execution of the unexecuted divided data transfer command to be stopped.

請求項4の発明は、請求項1〜請求項3のいずれか1項記載のデータ転送制御装置において、前記発行手段は、前記第2オペレーティング・システム上で前記分割データ転送コマンドに応じたデータ転送動作を行うデバイスドライバの転送処理単位サイズの整数倍のサイズであって、前記共有メモリの使用可能なサイズよりも小さいサイズが転送サイズとして指定された分割データ転送コマンドを生成して前記第2オペレーティング・システムに対して発行するものである。   According to a fourth aspect of the present invention, in the data transfer control device according to any one of the first to third aspects, the issuing means is configured to transfer data in accordance with the divided data transfer command on the second operating system. Generating a divided data transfer command having a size that is an integral multiple of the transfer processing unit size of the device driver that performs the operation and having a size smaller than the usable size of the shared memory as the transfer size;・ It is issued to the system.

請求項5の発明は、請求項1〜請求項4のいずれか1項記載のデータ転送制御装置において、前記第2オペレーティング・システム上で動作し、前記発行手段から発行された分割データ転送コマンドに応じてデータ転送動作を行うデバイスドライバを更に備えている。   According to a fifth aspect of the present invention, in the data transfer control device according to any one of the first to fourth aspects, the divided data transfer command issued from the issuing means operates on the second operating system. In response to this, a device driver for performing a data transfer operation is further provided.

請求項6の発明は、第1オペレーティング・システムから前記第1オペレーティング・システムとは異なる第2オペレーティング・システムで管理するハードウェア・デバイスへデータを転送するためのデータ転送命令が、前記第1オペレーティング・システムに対して発行された場合に、前記データ転送命令による転送対象のデータを、前記第1オペレーティング・システム及び前記第2オペレーティング・システムが共有して使用する共有メモリの使用可能なサイズよりも小さいサイズの複数個の第1分割データに分割して、前記共有メモリに書き込む書込手段と、前記書込手段で前記共有メモリに書き込まれた第1分割データが前記第2オペレーティング・システムにおいて読み出されて前記ハードウェア・デバイスに転送されるように、前記書込手段で前記第1分割データが前記共有メモリに書き込まれる毎に、前記第1分割データのデータサイズを転送サイズとして指定した第1分割データ転送コマンドを生成して前記第2オペレーティング・システムに対して発行する第1発行手段と、前記ハードウェア・デバイスからデータを取得するためのデータ取得命令が、前記第1オペレーティング・システムに対して発行された場合に、前記第2オペレーティング・システムにおいて前記データ取得命令による取得対象のデータが、前記共有メモリの使用可能なサイズよりも小さいサイズの複数個の第2分割データに分割されて、該第2分割データ毎に前記ハードウェア・デバイスから読み出されて前記共有メモリに書き込まれるように、該第2分割データのサイズを転送サイズとして指定した第2分割データ転送コマンドを生成し、該書き込まれた第2分割データが前記第1オペレーティング・システムにおいて読み出されるように、前記第2オペレーティング・システムに対して発行する第2発行手段と、前記第2オペレーティング・システムにより前記第2分割データ転送コマンドに応じて前記共有メモリに書き込まれた第2分割データを前記共有メモリから読出して前記データ取得命令の発行元に転送する転送手段と、を備えたデータ転送制御装置である。   According to a sixth aspect of the present invention, there is provided a data transfer instruction for transferring data from a first operating system to a hardware device managed by a second operating system different from the first operating system. When issued to the system, the data to be transferred by the data transfer instruction is larger than the usable size of the shared memory that is shared and used by the first operating system and the second operating system. The second operating system reads the first divided data written into the shared memory by the writing means by dividing the first divided data into a plurality of first divided data having a small size and the writing means reading the shared memory. To be transferred to the hardware device Each time the first divided data is written to the shared memory by the writing means, a first divided data transfer command specifying the data size of the first divided data as a transfer size is generated and the second operating data is generated. A first issuing means for issuing to the system; and a second operating system when a data acquisition command for acquiring data from the hardware device is issued to the first operating system. The data to be acquired by the data acquisition command is divided into a plurality of second divided data having a size smaller than the usable size of the shared memory, and the second divided data is separated from the hardware device for each second divided data. The size of the second divided data is transferred so that it can be read and written to the shared memory. A second issuing means for generating a second divided data transfer command designated as the second divided data and issuing the second divided data to the second operating system so that the written second divided data is read by the first operating system Transfer means for reading the second divided data written in the shared memory in response to the second divided data transfer command by the second operating system from the shared memory and transferring it to the issuer of the data acquisition instruction. , A data transfer control device.

請求項7の発明は、請求項6に記載のデータ転送制御装置において、前記第1発行手段は、前記第2オペレーティング・システム上で前記第1分割データ転送コマンドに応じたデータ転送動作を行うデバイスドライバの転送処理単位サイズの整数倍のサイズであって、前記共有メモリの使用可能なサイズよりも小さいサイズが転送サイズとして指定された第1分割データ転送コマンドを生成して前記第2オペレーティング・システムに対して発行し、前記第2発行手段は、前記第2オペレーティング・システム上で前記第2分割データ転送コマンドに応じたデータ転送動作を行うデバイスドライバの転送処理単位サイズの整数倍のサイズであって、前記共有メモリの使用可能なサイズよりも小さいサイズが転送サイズとして指定された第2分割データ転送コマンドを生成して前記第2オペレーティング・システムに対して発行する。   According to a seventh aspect of the present invention, in the data transfer control device according to the sixth aspect, the first issuing means performs a data transfer operation according to the first divided data transfer command on the second operating system. Generating a first divided data transfer command having a size that is an integral multiple of the transfer processing unit size of the driver and having a size smaller than the usable size of the shared memory as the transfer size; The second issuing means has a size that is an integral multiple of a transfer processing unit size of a device driver that performs a data transfer operation according to the second divided data transfer command on the second operating system. The second size in which a size smaller than the usable size of the shared memory is designated as the transfer size. And generates a data transfer command issued to the second operating system.

請求項8の発明は、請求項6又は請求項7に記載のデータ転送制御装置において、前記取得対象のデータの前記共有メモリへの転送が終了した場合に、前記第2オペレーティング・システムに対して既に発行された未実行の前記第2分割データ転送コマンドによりデータの転送が実行されないように制御する制御手段と、を更に備えている。   According to an eighth aspect of the present invention, in the data transfer control device according to the sixth or seventh aspect, when the transfer of the acquisition target data to the shared memory is completed, the second operating system is provided. And a control means for controlling so that data transfer is not executed by the already issued unexecuted second divided data transfer command.

請求項9の発明は、請求項6〜請求項8のいずれか1項記載のデータ転送制御装置において、前記第2オペレーティング・システム上で動作し、前記第1発行手段から発行された第1分割データ転送コマンド及び前記第2発行手段から発行された第2分割データ転送コマンドに応じてデータ転送動作を行うデバイスドライバを更に備えている。   A ninth aspect of the present invention is the data transfer control device according to any one of the sixth to eighth aspects, wherein the first division that operates on the second operating system and is issued from the first issuing means. A device driver is further provided for performing a data transfer operation in response to the data transfer command and the second divided data transfer command issued from the second issuing means.

請求項10の発明は、コンピュータを、第1オペレーティング・システムから前記第1オペレーティング・システムとは異なる第2オペレーティング・システムで管理するハードウェア・デバイスへデータを転送するためのデータ転送命令が、前記第1オペレーティング・システムに対して発行された場合に、前記データ転送命令による転送対象のデータを、前記第1オペレーティング・システム及び前記第2オペレーティング・システムが共有して使用する共有メモリの使用可能なサイズよりも小さいサイズの複数個の分割データに分割して、前記共有メモリに書き込む書込手段、及び前記書込手段で前記共有メモリに書き込まれた分割データが前記第2オペレーティング・システムにおいて読み出されて前記ハードウェア・デバイスに転送されるように、前記書込手段で前記分割データが前記共有メモリに書き込まれる毎に、前記分割データのデータサイズを転送サイズとして指定した分割データ転送コマンドを生成して前記第2オペレーティング・システムに対して発行する発行手段、として機能させるためのプログラムである。   According to a tenth aspect of the present invention, there is provided a data transfer instruction for transferring data from a first operating system to a hardware device managed by a second operating system different from the first operating system. When it is issued to the first operating system, the shared memory used by the first operating system and the second operating system for sharing the data to be transferred by the data transfer instruction can be used. The second operating system reads out the divided data written into the shared memory by the writing means, and the divided data written into the shared memory by dividing into a plurality of pieces of divided data having a size smaller than the size. Transferred to the hardware device. As described above, every time the divided data is written into the shared memory by the writing means, a divided data transfer command is generated by designating the data size of the divided data as a transfer size, and is sent to the second operating system. This is a program for functioning as an issuing means for issuing to a computer.

請求項11の発明は、コンピュータを、第1オペレーティング・システムとは異なる第2オペレーティング・システムで管理するハードウェア・デバイスからデータを取得するためのデータ取得命令が、前記第1オペレーティング・システムに対して発行された場合に、前記第2オペレーティング・システムにおいて前記データ取得命令による取得対象のデータが、前記第1オペレーティング・システム及び前記第2オペレーティング・システムが共有して使用する共有メモリの使用可能なサイズよりも小さいサイズの複数個の分割データに分割されて、該分割データ毎に前記ハードウェア・デバイスから読み出されて前記共有メモリに書き込まれるように、該分割データのサイズを転送サイズとして指定した分割データ転送コマンドを生成し、該書き込まれた分割データが前記第1オペレーティング・システムにおいて読み出されるように、前記第2オペレーティング・システムに対して発行する発行手段、及び前記第2オペレーティング・システムにより前記分割データ転送コマンドに応じて前記共有メモリに書き込まれた分割データを前記共有メモリから読出して前記データ取得命令の発行元に転送する転送手段、として機能させるためのプログラムである。   According to the eleventh aspect of the present invention, a data acquisition instruction for acquiring data from a hardware device that manages a computer with a second operating system different from the first operating system is provided to the first operating system. The data to be acquired by the data acquisition command in the second operating system can be used in a shared memory that is shared and used by the first operating system and the second operating system. The size of the divided data is designated as the transfer size so that the divided data is divided into a plurality of divided data smaller than the size, and the divided data is read from the hardware device and written to the shared memory. Generate split data transfer command , Issuing means for issuing to the second operating system so that the written divided data is read by the first operating system, and according to the divided data transfer command by the second operating system. It is a program for functioning as transfer means for reading the divided data written in the shared memory from the shared memory and transferring it to the issuer of the data acquisition instruction.

請求項12の発明は、コンピュータを、第1オペレーティング・システムから前記第1オペレーティング・システムとは異なる第2オペレーティング・システムで管理するハードウェア・デバイスへデータを転送するためのデータ転送命令が、前記第1オペレーティング・システムに対して発行された場合に、前記データ転送命令による転送対象のデータを、前記第1オペレーティング・システム及び前記第2オペレーティング・システムが共有して使用する共有メモリの使用可能なサイズよりも小さいサイズの複数個の第1分割データに分割して、前記共有メモリに書き込む書込手段、前記書込手段で前記共有メモリに書き込まれた第1分割データが前記第2オペレーティング・システムにおいて読み出されて前記ハードウェア・デバイスに転送されるように、前記書込手段で前記第1分割データが前記共有メモリに書き込まれる毎に、前記第1分割データのデータサイズを転送サイズとして指定した第1分割データ転送コマンドを生成して前記第2オペレーティング・システムに対して発行する第1発行手段、前記ハードウェア・デバイスからデータを取得するためのデータ取得命令が、前記第1オペレーティング・システムに対して発行された場合に、前記第2オペレーティング・システムにおいて前記データ取得命令による取得対象のデータが、前記共有メモリの使用可能なサイズよりも小さいサイズの複数個の第2分割データに分割されて、該第2分割データ毎に前記ハードウェア・デバイスから読み出されて前記共有メモリに書き込まれるように、該第2分割データのサイズを転送サイズとして指定した第2分割データ転送コマンドを生成し、該書き込まれた第2分割データが前記第1オペレーティング・システムにおいて読み出されるように、前記第2オペレーティング・システムに対して発行する第2発行手段、及び前記第2オペレーティング・システムにより前記第2分割データ転送コマンドに応じて前記共有メモリに書き込まれた第2分割データを前記共有メモリから読出して前記データ取得命令の発行元に転送する転送手段、として機能させるためのプログラムである。   The invention of claim 12 is directed to a data transfer instruction for transferring data from a first operating system to a hardware device managed by a second operating system different from the first operating system. When it is issued to the first operating system, the shared memory used by the first operating system and the second operating system for sharing the data to be transferred by the data transfer instruction can be used. Write means for dividing into a plurality of first divided data having a size smaller than the size, and writing to the shared memory, and the first divided data written to the shared memory by the writing means is the second operating system Read out in said hardware device Each time the first divided data is written into the shared memory by the writing means, a first divided data transfer command is generated that specifies the data size of the first divided data as the transfer size. First issue means for issuing to the second operating system, and when a data acquisition instruction for acquiring data from the hardware device is issued to the first operating system, the first In the two operating systems, the data to be acquired by the data acquisition command is divided into a plurality of second divided data having a size smaller than the usable size of the shared memory, and the hardware is divided for each second divided data. The second divided data so that it is read from the wear device and written to the shared memory. A second divided data transfer command that specifies the size as the transfer size is generated, and the second divided data is issued to the second operating system so that the written second divided data is read by the first operating system. 2 issuance means, and the second operating system reads out the second divided data written in the shared memory in response to the second divided data transfer command from the shared memory and transfers it to the issuer of the data acquisition instruction It is a program for functioning as a transfer means.

請求項1に記載の発明によれば、共有メモリのサイズに制限があっても、異なるOS間で効率的にデータ転送を行うことができる。   According to the first aspect of the present invention, even if the size of the shared memory is limited, data can be efficiently transferred between different OSs.

請求項2に記載の発明によれば、共有メモリのサイズに制限があっても、異なるOS間で効率的にデータ転送を行うことができる。   According to the second aspect of the present invention, even if the size of the shared memory is limited, data can be efficiently transferred between different OSs.

請求項3に記載の発明によれば、不要なコマンドの発行による存在しないデータの読み込み待ち状態がデータ転送装置で発生することを防止できる。   According to the third aspect of the present invention, it is possible to prevent the data transfer device from causing a non-existent data read waiting state due to an issuance of an unnecessary command.

請求項4に記載の発明によれば、分割データの転送サイズがデバイスドライバの転送処理単位サイズの整数倍のサイズでない場合に比べて、効率的に転送することができる。   According to the fourth aspect of the present invention, compared to a case where the transfer size of the divided data is not an integral multiple of the transfer processing unit size of the device driver, it can be transferred efficiently.

請求項5に記載の発明によれば、共有メモリのサイズに制限があっても、異なるOS間で効率的にデータ転送を行うことができる。   According to the fifth aspect of the present invention, even if the size of the shared memory is limited, data can be efficiently transferred between different OSs.

請求項6に記載の発明によれば、共有メモリのサイズに制限があっても、異なるOS間で効率的にデータ転送を行うことができる。   According to the sixth aspect of the present invention, even if the size of the shared memory is limited, data can be efficiently transferred between different OSs.

請求項7に記載の発明によれば、第1及び第2分割データの転送サイズがデバイスドライバの転送処理単位サイズの整数倍のサイズでない場合に比べて、効率的に転送することができる。   According to the seventh aspect of the present invention, it is possible to transfer the first and second divided data more efficiently than when the transfer size of the first and second divided data is not an integral multiple of the transfer processing unit size of the device driver.

請求項8に記載の発明によれば、不要なコマンドの発行による存在しないデータの読み込み待ち状態がデータ転送装置で発生することを防止できる。   According to the eighth aspect of the present invention, it is possible to prevent the data transfer device from causing a non-existent data read waiting state due to an issuance of an unnecessary command.

請求項9に記載の発明によれば、共有メモリのサイズに制限があっても、異なるOS間で本構成を有しない場合に比べて効率的にデータ転送を行うことができる。   According to the ninth aspect of the present invention, even if the size of the shared memory is limited, it is possible to transfer data more efficiently than in the case where this configuration is not provided between different OSs.

請求項10に記載の発明によれば、共有メモリのサイズに制限があっても、異なるOS間で効率的にデータ転送を行うことができる。   According to the tenth aspect of the present invention, even if the size of the shared memory is limited, data can be efficiently transferred between different OSs.

請求項11に記載の発明によれば、共有メモリのサイズに制限があっても、異なるOS間で効率的にデータ転送を行うことができる。   According to the invention described in claim 11, even if the size of the shared memory is limited, data can be efficiently transferred between different OSs.

請求項12に記載の発明によれば、共有メモリのサイズに制限があっても、異なるOS間で効率的にデータ転送を行うことができる。   According to the twelfth aspect of the present invention, even if the size of the shared memory is limited, data can be efficiently transferred between different OSs.

実施の形態に係る画像形成装置の構成図である。1 is a configuration diagram of an image forming apparatus according to an embodiment. 第1制御部の第1OSのアプリケーションと、第2OSで制御される第2制御部のインタフェースとの間でデータ転送を行う場合の動作に着目したときの、第1制御部の第1OS上で動作するソフトウェア構成図及び第2制御部の第2OS上で動作するソフトウェア構成図である。Operates on the first OS of the first control unit when focusing on the operation when data is transferred between the application of the first OS of the first control unit and the interface of the second control unit controlled by the second OS FIG. 2 is a software configuration diagram that operates on the second OS of the second control unit. 第1制御部の第1OS側で動作するHW非依存デバイスドライバに対して、アプリケーションからライト命令が発行された場合に、該HW非依存デバイスドライバで行われる処理ルーチンを示すフローチャートである。7 is a flowchart illustrating a processing routine performed by an HW-independent device driver when a write command is issued from an application to an HW-independent device driver operating on the first OS side of the first control unit. 第1制御部の第1OS側で動作するHW非依存デバイスドライバに対して、アプリケーションからライト命令が発行された場合に、該HW非依存デバイスドライバ34で行われる処理ルーチンを示すフローチャートである。7 is a flowchart illustrating a processing routine performed by the HW-independent device driver when a write command is issued from an application to the HW-independent device driver operating on the first OS side of the first control unit. 第2制御部の第2OS側のOS間通信モジュールが第1OS側のOS間通信モジュールからコマンドを受信した場合のコマンド受信処理の処理ルーチンを示すフローチャートである。It is a flowchart which shows the process routine of a command reception process when the communication module between OSs by the side of 2nd OS of a 2nd control part receives a command from the communication module between OSs by the side of 1st OS. OS間共有メモリの利用形態の一例である。It is an example of the usage form of the shared memory between OSs. (A)は、OS間通信モジュールにより生成されるデータ転送コマンド(ライトコマンド、リードコマンド)のフォーマットの一例を示す図であり、(B)は、OS間通信モジュールにより生成されるデータ転送終了メッセージ(ライト終了、リード終了)のフォーマットの一例を示す図である。(A) is a figure which shows an example of the format of the data transfer command (write command, read command) produced | generated by the communication module between OSs, (B) is the data transfer completion message produced | generated by the communication module between OSs. It is a figure which shows an example of a format of (write end, read end). ライト処理時の転送対象のデータのサイズが、OS間共有メモリの使用可能なサイズより大きい場合のデータ転送状態を示す模式図である。It is a schematic diagram which shows a data transfer state in case the size of the data of the transfer object at the time of a write process is larger than the usable size of the shared memory between OS. ライト処理時の転送対象のデータのサイズが、OS間共有メモリの使用可能なサイズより大きい場合のコマンド及びメッセージのタイミングチャートである。It is a timing chart of a command and a message when the size of data to be transferred at the time of write processing is larger than the usable size of the shared memory between OSs. ライト処理時の転送対象のデータのサイズが、OS間共有メモリの使用可能なサイズ以下である場合のデータ転送状態を示す模式図である。It is a schematic diagram which shows a data transfer state in case the size of the data of the transfer object at the time of a write process is below the usable size of the shared memory between OS. ライト処理時の転送対象のデータのサイズが、OS間共有メモリの使用可能なサイズ以下である場合のコマンド及びメッセージのタイミングチャートである。It is a timing chart of a command and a message when the size of data to be transferred at the time of write processing is equal to or smaller than the usable size of the shared memory between OSs. 図4に示す処理に代えて実行可能な処理を示すフローチャートである。It is a flowchart which shows the process which can be replaced with the process shown in FIG. 第1制御部の第1OS側で動作するHW非依存デバイスドライバに対して、アプリケーションからリード命令が発行された場合に、該HW非依存デバイスドライバで行われる処理ルーチンを示すフローチャートである。7 is a flowchart illustrating a processing routine performed by an HW-independent device driver when a read command is issued from an application to an HW-independent device driver operating on the first OS side of the first control unit. 第1制御部の第1OS側で動作するHW非依存デバイスドライバに対して、アプリケーションからリード命令が発行された場合に、該HW非依存デバイスドライバで行われる処理ルーチンを示すフローチャートである。7 is a flowchart illustrating a processing routine performed by an HW-independent device driver when a read command is issued from an application to an HW-independent device driver operating on the first OS side of the first control unit. リード処理時のアプリケーションの作業領域のサイズが、OS間共有メモリの使用可能なサイズより大きい場合のデータ転送状態を示す模式図である。It is a schematic diagram showing a data transfer state when the size of the work area of the application at the time of read processing is larger than the usable size of the inter-OS shared memory. リード処理時のアプリケーションの作業領域のサイズが、OS間共有メモリの使用可能なサイズ以下である場合のデータ転送状態を示す模式図である。It is a schematic diagram showing a data transfer state when the size of the work area of the application at the time of read processing is equal to or smaller than the usable size of the inter-OS shared memory. 第2制御部のOS間通信モジュールで行われるリードコマンド処理の処理ルーチンを示すフローチャートである。It is a flowchart which shows the processing routine of the read command process performed with the communication module between OS of a 2nd control part. リード処理時のアプリケーションの作業領域のサイズが、OS間共有メモリの使用可能なサイズより大きい場合のコマンド及びメッセージのタイミングチャートである。12 is a timing chart of commands and messages when the size of the application work area during the read processing is larger than the usable size of the inter-OS shared memory. 図14に示す処理に代えて実行可能な処理を示すフローチャートである。It is a flowchart which shows the process which can be replaced with the process shown in FIG.

以下、図面を参照して本発明の実施の形態の一例を詳細に説明する。図1には本実施の形態に係る画像形成装置10が示されている。画像形成装置10には、画像形成装置10の各部の動作を制御する第1制御部12及び第2制御部14と、セットされた読取対象の文書(紙原稿)を光学的に読み取って読取画像データを出力する画像読取部20と、入力された画像データが表す画像を記録用紙上に形成する画像形成部22と、LCD等から成る表示部18A及びテンキーやタッチパネル等から成り利用者による操作を受付ける操作受付部18Bが設けられた操作パネル18と、ファクシミリ装置としての機能を備えた他の機器と電話線及び公衆通信網(図示省略)経由で画情報の送受信(ファクシミリ通信)を行う画情報送受信部24と、PC(Personal Computer)等の情報処理装置とネットワークケーブル及びコンピュータネットワーク(図示省略)経由で情報の送受信を行うためのネットワーク通信制御部26と、が設けられており、これらはバス28を介して互いに接続されている。   Hereinafter, an example of an embodiment of the present invention will be described in detail with reference to the drawings. FIG. 1 shows an image forming apparatus 10 according to the present exemplary embodiment. The image forming apparatus 10 includes a first control unit 12 and a second control unit 14 that control the operation of each unit of the image forming apparatus 10, and an optically read document (paper document) that is set to be read. An image reading unit 20 that outputs data, an image forming unit 22 that forms an image represented by the input image data on a recording sheet, a display unit 18A composed of an LCD or the like, a numeric keypad, a touch panel, etc. Image information for transmitting / receiving image information (facsimile communication) to / from an operation panel 18 provided with an operation receiving unit 18B to be received and other devices having a function as a facsimile apparatus via a telephone line and a public communication network (not shown). A network for transmitting / receiving information via the transmission / reception unit 24 and an information processing apparatus such as a PC (Personal Computer) via a network cable and a computer network (not shown). And over click communication control unit 26, it is provided with, which are connected to one another via a bus 28.

第1制御部12はマイクロコンピュータ等から成り、CPU12A、メモリ12B、HDD(Hard Disk Drive)やフラッシュメモリ等から成る不揮発性の記憶部12Cが設けられている。記憶部12Cには、例えば、画像形成装置10の利用者に対して画像形成装置10の何らかの機能(例えば複写機能やファクシミリ送受信を行う機能等)を提供する処理を行うと共に、該機能を提供するための画面を表示部18Aに表示させる画面制御を行うアプリケーションのプログラムと、デバイスドライバに対するAPI(Application Programming interface)として機能する外部インタフェースのプログラムと、ハードウェア・デバイスを制御するためのデバイスドライバのプログラムと、これらプログラムを実行するためのプラットフォームとして機能するオペレーティング・システム(以下、第1OSという)のプログラムと、が各々記憶されている。   The first control unit 12 includes a microcomputer or the like, and is provided with a non-volatile storage unit 12C including a CPU 12A, a memory 12B, an HDD (Hard Disk Drive), a flash memory, and the like. The storage unit 12C performs, for example, processing for providing a user of the image forming apparatus 10 with some function of the image forming apparatus 10 (for example, a copying function or a function for performing facsimile transmission / reception) and provides the function. Program for controlling the screen to display the screen for display on the display unit 18A, an external interface program functioning as an API (Application Programming Interface) for the device driver, and a device driver program for controlling the hardware device And an operating system (hereinafter referred to as a first OS) program that functions as a platform for executing these programs.

第2制御部14はマイクロコンピュータ等から成り、CPU14A、メモリ14B、HDD(Hard Disk Drive)やフラッシュメモリ等から成る不揮発性の記憶部14Cが設けられている。記憶部14Cには、例えば、画像形成装置10の利用者に対して画像形成装置10の何らかの機能(例えば第1制御部で提供される機能とは異なる機能等)を提供する処理を行うと共に、該機能を提供するための画面を表示部18Aに表示させる画面制御を行うアプリケーションのプログラムと、デバイスドライバに対するAPI(Application Programming interface)として機能する外部インタフェースのプログラムと、ハードウェア・デバイスを制御するためのデバイスドライバのプログラムと、これらプログラムを実行するためのプラットフォームとして機能するオペレーティング・システム(以下、第2OSという)のプログラムとが各々記憶されている。   The second control unit 14 includes a microcomputer or the like, and is provided with a non-volatile storage unit 14C including a CPU 14A, a memory 14B, an HDD (Hard Disk Drive), a flash memory, and the like. For example, the storage unit 14C performs processing for providing a user of the image forming apparatus 10 with some function of the image forming apparatus 10 (for example, a function different from the function provided by the first control unit). In order to control an application program that performs screen control for displaying a screen for providing the function on the display unit 18A, an external interface program that functions as an API (Application Programming Interface) for a device driver, and a hardware device Device driver programs and an operating system (hereinafter referred to as second OS) program that functions as a platform for executing these programs are stored.

更にまた、第2制御部14には、第1制御部12には設けられていないUSB(Universal Serial Bus)ポート等のインタフェース14Dも設けられている。本実施の形態では、このインタフェース14Dを介したデータ転送に着目して説明する。   Furthermore, the second control unit 14 is also provided with an interface 14D such as a USB (Universal Serial Bus) port that is not provided in the first control unit 12. In the present embodiment, description will be given focusing on data transfer through the interface 14D.

なお、第2制御部14の記憶部14Cに記憶されているデバイスドライバのプログラムには、ハードウェア・デバイス(ここではインタフェースコントローラ込みのインタフェース14D)に依存し、実際にインタフェース14Dを制御する物理層としてのデバイスドライバ(以下、HW依存デバイスドライバ)のプログラムと、ハードウェア・デバイスに依存しない処理を行うインタフェース層及び論理層としてのデバイスドライバ(以下、HW非依存デバイスドライバ)のプログラムと、が含まれる。また、第1制御部12の記憶部12Cに記憶されているデバイスドライバは、(インタフェース14Dに着目した場合)HW非依存デバイスドライバである。なお、第1制御部12において、何らかのハードウェア・デバイスが装備されている場合には、該ハードウェア・デバイスに依存するHW依存デバイスドライバのプログラムが当然に記憶部12Cに記憶されているが、本実施の形態では前述したようにインタフェース14Dに着目して説明するため、説明を省略する。   Note that the device driver program stored in the storage unit 14C of the second control unit 14 depends on the hardware device (in this case, the interface 14D including the interface controller) and actually controls the interface 14D. Device driver (hereinafter referred to as HW-dependent device driver) program, and interface driver and logic layer device driver (hereinafter referred to as HW-independent device driver) program that perform processing independent of hardware and devices. It is. The device driver stored in the storage unit 12C of the first control unit 12 is a HW-independent device driver (when attention is paid to the interface 14D). If the first control unit 12 is equipped with any hardware device, the HW-dependent device driver program depending on the hardware device is naturally stored in the storage unit 12C. In the present embodiment, as described above, the description will be made focusing on the interface 14D, and thus the description thereof is omitted.

図2は、第1制御部12の第1OSのアプリケーション30と、第2OSで制御される第2制御部14のインタフェース14Dとの間でデータ転送を行う場合の動作に着目したときの、第1制御部12の第1OS上で動作するソフトウェア構成図及び第2制御部14の第2OS上で動作するソフトウェア構成図である。   FIG. 2 shows the first when attention is paid to the operation when data is transferred between the application 30 of the first OS of the first control unit 12 and the interface 14D of the second control unit 14 controlled by the second OS. 3 is a software configuration diagram that operates on the first OS of the control unit 12 and a software configuration diagram that operates on the second OS of the second control unit 14. FIG.

図示されるように、第1制御部12側は、上層から順に、アプリケーション30、外部インタフェース32、ハードウェア・デバイスに依存しないデバイスドライバ(HW非依存デバイスドライバ)34、OS間通信モジュール36の階層からなり、第2制御部14側は、上層から順に、OS間通信モジュール40、外部インタフェース42、HW非依存デバイスドライバ44、ハードウェア・デバイスに依存するデバイスドライバ(HW依存デバイスドライバ)46の階層からなる。   As shown in the figure, the first control unit 12 side, in order from the upper layer, is a hierarchy of an application 30, an external interface 32, a device driver (HW-independent device driver) 34 independent of hardware and devices, and an inter-OS communication module 36. The second control unit 14 has a hierarchy of inter-OS communication module 40, external interface 42, HW-independent device driver 44, and hardware / device-dependent device driver (HW-dependent device driver) 46 in order from the upper layer. Consists of.

アプリケーション30、外部インタフェース32、HW非依存デバイスドライバ34、外部インタフェース42、HW非依存デバイスドライバ44、及びHW依存デバイスドライバ46は、前述した通りであるため説明を省略し、ここでは、OS間通信モジュール36、及びOS間通信モジュール40について説明する。   Since the application 30, the external interface 32, the HW-independent device driver 34, the external interface 42, the HW-independent device driver 44, and the HW-dependent device driver 46 are as described above, the description thereof is omitted here. The module 36 and the inter-OS communication module 40 will be described.

OS間通信モジュール36及びOS間通信モジュール40は、異なるOS間同士で通信を行うときに使用されるモジュールであり、OS間通信モジュール36は第1OSの機能の一部として、OS間通信モジュール40は第2OSの機能の一部として設けられている。OS間通信のための技術としては一般的に知られている様々な技術を採用することができるが、本実施の形態では、第1OS及び第2OSが共有するメモリ領域(OS間共有メモリ)を利用した通信を行うものとする。   The inter-OS communication module 36 and the inter-OS communication module 40 are modules used when communicating between different OSs. The inter-OS communication module 36 is an inter-OS communication module 40 as a part of the function of the first OS. Are provided as part of the functions of the second OS. Various techniques that are generally known can be adopted as techniques for inter-OS communication. In this embodiment, a memory area (inter-OS shared memory) shared by the first OS and the second OS is used. The communication used shall be performed.

なお、OS間共有メモリは、例えば、第1制御部12のメモリ12B内に設けられていてもよいし、第2制御部14のメモリ14B内に設けられていてもよく、特に限定されない。   Note that the OS shared memory may be provided in the memory 12B of the first control unit 12, or may be provided in the memory 14B of the second control unit 14, for example, and is not particularly limited.

図6に示すように、第1OSから第2OSに対するメッセージ或いはコマンドは、予め定められたメモリ領域、ここではOS間共有メモリのOS間通信メッセージ領域50、に格納される。第1OSのOS間通信モジュール36は、第2OSに送信するメッセージ或いはコマンドをこのOS間通信メッセージ領域50に格納する。第2OSのOS間通信モジュール40は、このOS間通信メッセージ領域50に格納されたメッセージ或いはコマンドを取り出す。   As shown in FIG. 6, a message or command from the first OS to the second OS is stored in a predetermined memory area, here, the inter-OS communication message area 50 of the inter-OS shared memory. The inter-OS communication module 36 of the first OS stores a message or command to be transmitted to the second OS in the inter-OS communication message area 50. The inter-OS communication module 40 of the second OS takes out the message or command stored in the inter-OS communication message area 50.

一方、第2OSから第1OSに対するメッセージ或いはコマンドは、予め定められたメモリ領域、ここでは、OS間共有メモリのOS間通信メッセージ領域54に格納される。OS間通信モジュール40は、第1OSに送信するメッセージ或いはコマンドをこのOS間通信メッセージ領域54に格納する。第1OSのOS間通信モジュール36は、このOS間通信メッセージ領域54に格納されたメッセージ或いはコマンドを取り出す。   On the other hand, a message or command from the second OS to the first OS is stored in a predetermined memory area, here, an inter-OS communication message area 54 of the inter-OS shared memory. The inter-OS communication module 40 stores a message or command to be transmitted to the first OS in the inter-OS communication message area 54. The inter-OS communication module 36 of the first OS takes out the message or command stored in the inter-OS communication message area 54.

ところで、前述したようにインタフェース14Dは第2OS側に設けられ第2OS側で管理されるが、第2OS側のインタフェース14Dを制御するインタフェースコントローラ(USBコントローラなど)内のメモリ(FIFOなど)に対して第1OS側からデータを書き込んだり、インタフェース14Dを制御するインタフェースコントローラ(USBコントローラなど)内のメモリ(FIFOなど)からデータを読み出して第1OS側で該データを取得したりするデータ転送が行われる場合がある。   As described above, the interface 14D is provided on the second OS side and managed on the second OS side. However, the interface 14D is connected to a memory (FIFO or the like) in an interface controller (USB controller or the like) that controls the interface 14D on the second OS side. When data transfer is performed such that data is written from the first OS side or data is read from a memory (FIFO or the like) in an interface controller (USB controller or the like) that controls the interface 14D and the data is acquired on the first OS side. There is.

こうしたデータ転送は、第1OS側のアプリケーション30から出力される書込命令(以下、ライト命令)及び取得命令(以下、リード命令)に応じて行われる。   Such data transfer is performed in response to a write command (hereinafter, write command) and an acquisition command (hereinafter, read command) output from the application 30 on the first OS side.

より具体的には、アプリケーション30からライト命令が発行された場合には、転送対象のデータは、まず、HW非依存デバイスドライバ34により一端OS間共有メモリに書き込まれ、第1OS側から第2OS側に対してOS間通信によりライトコマンドが発行される。このライトコマンドを受けた第2OS側のHW非依存デバイスドライバ44が、該OS間共有メモリに書き込まれたデータを読み出し、このデータを、HW依存デバイスドライバ46がDMA転送によりインタフェース14Dを制御するインタフェースコントローラ(USBコントローラなど)内のメモリ(FIFOなど)に転送し書き込む。   More specifically, when a write command is issued from the application 30, data to be transferred is first written into the OS shared memory by the HW-independent device driver 34, and then from the first OS side to the second OS side. A write command is issued by inter-OS communication. The HW-independent device driver 44 on the second OS side that has received this write command reads the data written in the inter-OS shared memory, and the HW-dependent device driver 46 controls the interface 14D by DMA transfer. Transfer and write to memory (FIFO etc.) in the controller (USB controller etc.).

また、アプリケーション30からリード命令が発行された場合には、まず、第1OS側から第2OS側に対してOS間通信によりリードコマンドが発行される。第2OS側のHW依存デバイスドライバ46は、リードコマンドに応じて、DMA転送によりインタフェース14Dを制御するインタフェースコントローラ(USBコントローラなど)内のメモリ(FIFOなど)にDMAを起動してデータを読み出す。読み出されたデータは、HW非依存デバイスドライバ44がOS間共有メモリに書き込み、第1OS側のHW非依存デバイスドライバ34が、該OS間共有メモリに書き込まれたデータを読み出して、アプリケーション30に転送する。   When a read command is issued from the application 30, first, a read command is issued from the first OS side to the second OS side by inter-OS communication. The HW-dependent device driver 46 on the second OS side activates DMA to a memory (such as a FIFO) in an interface controller (such as a USB controller) that controls the interface 14D by DMA transfer in accordance with the read command and reads data. The read data is written to the inter-OS shared memory by the HW-independent device driver 44, and the HW-independent device driver 34 on the first OS side reads the data written to the shared memory between the OSs to the application 30. Forward.

ここで、ライト処理時のコマンド等の流れを図2を用いて説明する。   Here, the flow of commands and the like during the write process will be described with reference to FIG.

アプリケーション30は、外部インタフェース32を介してHW非依存デバイスドライバ34にライト命令を発行する、HW非依存デバイスドライバ34は、発行されたライト命令に従って、第2OS側にライトコマンドを発行するようOS間通信モジュール36にコマンド生成指示を出す。OS間通信モジュール36は、生成指示に従ってライトコマンドを生成して第2OS側のOS間通信モジュール40に発行する。   The application 30 issues a write command to the HW-independent device driver 34 via the external interface 32. The HW-independent device driver 34 issues a write command to the second OS side according to the issued write command. A command generation instruction is issued to the communication module 36. The inter-OS communication module 36 generates a write command according to the generation instruction and issues it to the inter-OS communication module 40 on the second OS side.

第2OS側のOS間通信モジュール40は、第1OS側から発行されたライトコマンドを外部インタフェース42を介してHW非依存デバイスドライバ44に出力する。HW非依存デバイスドライバ44は、ライトコマンドに従ってOS間共有メモリからデータを読み出す。そして、HW依存デバイスドライバ46が該読み出されたデータを、インタフェース14Dを制御するインタフェースコントローラ(USBコントローラなど)内のメモリ(FIFOなど)にDMAを起動して順次書き込む。HW依存デバイスドライバ46で書き込みが終了すると、HW非依存デバイスドライバ44からライト終了メッセージの生成指示がOS間通信モジュール40に出力される。OS間通信モジュール40は、ライト終了メッセージを生成して第1OS側のOS間通信モジュール36に発行する。OS間通信モジュール36で受け取ったライト終了メッセージは、HW非依存デバイスドライバ34に通知され、外部インタフェース32を介してアプリケーション30に通知される。リード処理時のコマンド等の流れも同様である。   The inter-OS communication module 40 on the second OS side outputs a write command issued from the first OS side to the HW-independent device driver 44 via the external interface 42. The HW-independent device driver 44 reads data from the inter-OS shared memory according to the write command. Then, the HW-dependent device driver 46 sequentially writes the read data to the memory (FIFO or the like) in the interface controller (USB controller or the like) that controls the interface 14D by starting the DMA. When writing by the HW-dependent device driver 46 is completed, a write end message generation instruction is output from the HW-independent device driver 44 to the inter-OS communication module 40. The inter-OS communication module 40 generates a write end message and issues it to the inter-OS communication module 36 on the first OS side. The write end message received by the inter-OS communication module 36 is notified to the HW-independent device driver 34 and is notified to the application 30 via the external interface 32. The flow of commands and the like during read processing is the same.

なお、アプリケーション30からライト命令が発行された場合に、該ライト命令により指定された転送対象のデータの転送サイズがOS間共有メモリの使用可能な領域のサイズ以下であれば、OS間通信モジュール36はアプリケーション30からの該転送サイズのデータを共有メモリに書き込むことができ、第1OS側から該転送サイズが指定されたライトコマンドを1つ第2OS側に発行すれば、上記のように第2OS側のインタフェース14Dへのデータ転送を行うことができるが、転送対象のデータのサイズ未満の領域しかOS間共有メモリに確保できない場合において、従来のように何らの工夫もなければ、OS間共有メモリに転送対象のデータを書き込むことができずに、メモリエラーがアプリケーション30側に返されることとなる。ここで、メモリエラーを受けたアプリケーション30は転送サイズを小さくして再度ライト命令を発行することもできるが、それでもなお転送サイズがOS間共有メモリで使用可能なサイズより大きければ、またメモリエラーが返されることになる。これを繰り返すことは非効率でもあるし、アプリケーション30が転送サイズを小さくしたライト命令を複数回発行する必要が生じる。リード命令の場合も同様である。   When the write command is issued from the application 30, if the transfer size of the transfer target data designated by the write command is equal to or smaller than the size of the usable area of the inter-OS shared memory, the inter-OS communication module 36 Can write data of the transfer size from the application 30 to the shared memory, and if one write command with the specified transfer size is issued from the first OS side to the second OS side, the second OS side as described above. Can be transferred to the interface 14D. However, when only an area smaller than the size of the data to be transferred can be secured in the shared memory between the OSs, if there is no contrivance as in the prior art, the shared memory between the OSs is used. The data to be transferred cannot be written and a memory error is returned to the application 30 side. It made. Here, the application 30 that has received the memory error can reduce the transfer size and issue the write command again. However, if the transfer size is still larger than the size that can be used in the shared memory between the OSs, the memory error also occurs. Will be returned. It is inefficient to repeat this, and the application 30 needs to issue a write command with a reduced transfer size a plurality of times. The same applies to the read command.

次に、本実施の形態におけるデータ転送動作の詳細について説明する。まず、第1OS側から第2OS側へデータを転送するライト処理について図3〜図12を用いて説明する。なお、以下では、OS間共有メモリを単に共有メモリと呼称する場合もある。   Next, details of the data transfer operation in the present embodiment will be described. First, write processing for transferring data from the first OS side to the second OS side will be described with reference to FIGS. In the following, the OS shared memory may be simply referred to as a shared memory.

HW非依存デバイスドライバ34に対して、アプリケーション30から外部インタフェース32を介してライト命令が発行されると、HW非依存デバイスドライバ34は、図3に示す処理ルーチンを実行する。   When a write command is issued from the application 30 to the HW-independent device driver 34 via the external interface 32, the HW-independent device driver 34 executes the processing routine shown in FIG.

ステップ100では、共有メモリから、ライト命令(図9(1)、図11(1)も参照。)において指定されている転送対象のデータの転送サイズ(データサイズN)の領域を獲得可能か否かを判断する。共有メモリで使用可能な領域のサイズがデータサイズNより小さければ、ステップ102に進み、共有メモリで使用可能な領域のサイズがデータサイズN以上であれば、図4のステップ130に進む。   In step 100, whether or not an area of the transfer size (data size N) of the transfer target data specified in the write command (see also FIG. 9 (1) and FIG. 11 (1)) can be acquired from the shared memory. Determine whether. If the size of the area usable in the shared memory is smaller than the data size N, the process proceeds to step 102. If the size of the area usable in the shared memory is equal to or larger than the data size N, the process proceeds to step 130 in FIG.

図8に示すように、共有メモリのサイズに制約があり、転送対象のデータが記憶されたアプリケーション30の作業領域のサイズが、共有メモリの使用可能な領域のサイズより大きい場合には、ステップ100で否定判断される。一方、図10に示すように、転送対象のデータが記憶されたアプリケーション30の作業領域のサイズが、共有メモリの使用可能な領域のサイズより小さい場合には、ステップ100で肯定判断される。なお、ここで、アプリケーション30の作業領域は、アプリケーション30がメモリ12Bに確保した領域であって、ライトの場合には、転送対象のデータのサイズに等しいサイズとなる。図8に対応するタイミングチャートを図9に示し、図10に対応するタイミングチャートを図11に示す。   As shown in FIG. 8, when the size of the shared memory is limited and the size of the work area of the application 30 in which the transfer target data is stored is larger than the size of the usable area of the shared memory, step 100 is performed. Is negatively determined. On the other hand, as shown in FIG. 10, when the size of the work area of the application 30 in which the transfer target data is stored is smaller than the size of the usable area of the shared memory, an affirmative determination is made in step 100. Here, the work area of the application 30 is an area secured by the application 30 in the memory 12B. In the case of writing, the work area has a size equal to the size of the data to be transferred. A timing chart corresponding to FIG. 8 is shown in FIG. 9, and a timing chart corresponding to FIG. 10 is shown in FIG.

まず、図8に示すように、共有メモリのサイズに制約があり、転送対象のデータのサイズよりも、共有メモリの使用可能な領域のサイズが小さい場合について、説明する。   First, as shown in FIG. 8, a case will be described where the size of the shared memory is limited and the size of the usable area of the shared memory is smaller than the size of the data to be transferred.

図3のステップ102において、共有メモリから使用可能な領域のサイズ以内で、予め定められたサイズα×m個分の領域52を獲得(確保)する(図6も参照。)。すなわち、共有メモリの使用可能な領域のサイズをMとすると、α×m<Mとなるように領域を獲得する。ここで、αは共有メモリの使用可能な領域のサイズより小さい値であって、mは1以上の整数である。なお、第2制御部14のHW非依存デバイスドライバ44及びHW依存デバイスドライバ46の作業領域のサイズに応じたサイズとしてもよい。   In step 102 in FIG. 3, a predetermined size α × m areas 52 are acquired (reserved) within the size of the usable area from the shared memory (see also FIG. 6). That is, if the size of the usable area of the shared memory is M, the area is acquired so that α × m <M. Here, α is a value smaller than the size of the usable area of the shared memory, and m is an integer of 1 or more. The size of the work area of the HW-independent device driver 44 and the HW-dependent device driver 46 of the second control unit 14 may be set.

ここで、ライト処理時において第2OS側では、ライトコマンドによりHW非依存デバイスドライバ44は、共有メモリからデータを読み出して予め定められたメモリ14Bの記憶領域(デバイスドライバの作業領域)へデータを転送し、更にHW依存デバイスドライバ46が該デバイスドライバの作業領域からDMA転送によりインタフェース14Dを制御するインタフェースコントローラ(USBコントローラなど)内のメモリ(FIFOなど)にDMAを起動して順次データを転送するようにしている。このデバイスドライバの作業領域は、共有メモリの使用可能なサイズよりも小さいサイズである。また、デバイスドライバの作業領域は通常、複数個(例えば2〜3個)設けられていることが多い。図8に示す例では、デバイスドライバの作業領域が2つ設けられている。この場合、一方の作業領域にHW非依存デバイスドライバ44がデータを書き込んでいる間に、HW依存デバイスドライバ46が他方の作業領域からデータを読み出してインタフェース14Dに転送することができる。作業領域が3つの場合も同様である。このデバイスドライバの作業領域の各々のサイズをdとしたとき、α=βdとしてもよい。ここで、βは1以上の整数である。なお、βを2以上の整数とすることで、デバイスドライバの作業領域を介したデータ転送において、前述したように書き込みと読出しが効率的に行われる。なお、図8に、共有メモリからデータ転送に使用するために獲得した領域を太破線で示した。   Here, at the time of the write process, on the second OS side, the HW-independent device driver 44 reads the data from the shared memory by the write command and transfers the data to a predetermined storage area (device driver work area) of the memory 14B. Furthermore, the HW-dependent device driver 46 starts DMA to transfer data sequentially from the work area of the device driver to a memory (such as a FIFO) in an interface controller (such as a USB controller) that controls the interface 14D by DMA transfer. I have to. The work area of the device driver is smaller than the usable size of the shared memory. Also, a plurality of device driver work areas are usually provided (for example, two to three). In the example shown in FIG. 8, two device driver work areas are provided. In this case, while the HW-independent device driver 44 writes data in one work area, the HW-dependent device driver 46 can read data from the other work area and transfer it to the interface 14D. The same applies when there are three work areas. If each size of the work area of the device driver is d, α = βd may be set. Here, β is an integer of 1 or more. Note that by setting β to an integer of 2 or more, writing and reading are efficiently performed as described above in data transfer through the work area of the device driver. In FIG. 8, the area acquired for use in data transfer from the shared memory is indicated by a thick broken line.

ステップ104では、分割数nを算出し、パラメータkに1をセットする。ここで、分割数nは、上記データサイズNをαで除算したときの商とする。なお、除算した結果、余りが出た場合には、商に1を加算した値をnとする。   In step 104, the division number n is calculated and 1 is set to the parameter k. Here, the division number n is a quotient obtained by dividing the data size N by α. When a remainder is obtained as a result of division, the value obtained by adding 1 to the quotient is set to n.

ステップ106には、パラメータsに1をセットし、アドレスaddに、上記共有メモリから獲得した領域52の先頭アドレスadd0をセットする。   In step 106, 1 is set to the parameter s, and the start address add0 of the area 52 acquired from the shared memory is set to the address add.

ステップ108では、共有メモリにデータの書き込みが可能か否かを判断する。本実施の形態では、共有メモリから獲得した領域52が転送対象のデータサイズNより小さい場合には、該獲得した領52をリングバッファの如く用いてデータ転送を行うようにしている。そして、HW非依存デバイスドライバ34は、アプリケーション30の作業領域に存在する転送対象のデータを先頭からデータサイズα毎に分割した分割データの各々を、獲得した領域52の先頭アドレスadd0から順に書き込んでいく。ここで、共有メモリに分割データを1つも書き込んでいない状態においては、ステップ108で書き込み可能であると判断できる。しかしながら、共有メモリから獲得した領域52の終端アドレスまで分割データを書き込んだ後は、その次からの分割データは、既に書き込まれたデータに上書きしなくてはらないため、第2OS側で該共有メモリに書き込まれたデータを読み出してデバイスドライバの作業領域に転送した後でないと、次の書き込みができない。従って、HW非依存デバイスドライバ34は、第2OS側から発行されるライト終了メッセージ(後述)により、共有メモリに分割データαを書き込み可能なだけのサイズがあるかを判断し、書き込み可能なサイズだけの領域ができるまで待機するようにしている。   In step 108, it is determined whether data can be written to the shared memory. In the present embodiment, when the area 52 acquired from the shared memory is smaller than the data size N to be transferred, the acquired area 52 is used as a ring buffer for data transfer. Then, the HW-independent device driver 34 writes each of the divided data obtained by dividing the data to be transferred existing in the work area of the application 30 for each data size α from the top in order from the top address add0 of the acquired area 52. Go. Here, in a state where no divided data is written in the shared memory, it can be determined in step 108 that writing is possible. However, after the divided data is written to the end address of the area 52 acquired from the shared memory, the subsequent divided data must be overwritten on the already written data. The next writing cannot be performed unless the data written in is read and transferred to the work area of the device driver. Accordingly, the HW-independent device driver 34 determines whether or not there is a size that allows the divided data α to be written in the shared memory based on a write end message (described later) issued from the second OS side. It waits until the area of is made.

本実施の形態では、後述するように、1つの分割データの書き込みに対して、1つのライトコマンドが第2OSに対して発行される。このライトコマンドに対するライト終了メッセージが第2OSから発行されれば、共有メモリの該分割データを書き込んだ領域は、次の分割データを書き込み可能な領域となる。   In this embodiment, as will be described later, one write command is issued to the second OS for writing one piece of divided data. When a write end message for this write command is issued from the second OS, the area where the divided data is written in the shared memory becomes an area where the next divided data can be written.

ステップ108で書き込み可能であると判断した後は、ステップ110に進む。   After determining in step 108 that writing is possible, the process proceeds to step 110.

ステップ110では、アプリケーション30の作業領域からサイズα分の分割データを読出し、共有メモリのアドレスaddが示す領域に該分割データを書き込む。   In step 110, the divided data corresponding to the size α is read from the work area of the application 30, and the divided data is written in the area indicated by the address add of the shared memory.

ステップ112では、アドレスaddからデータサイズαの分割データが第2OSのHW非依存デバイスドライバ44により読み出されて、HW依存デバイスドライバ46によりインタフェース14Dに転送されるように、該アドレスadd、及びデータサイズαが引数とされたライトコマンドの発行指令をOS間通信モジュール36に出す。OS間通信モジュール36はこの発行指令を受け、ライトコマンドを1つ生成して発行する(図9の(2)、(5)も参照。)。   In step 112, the address add and the data so that the divided data of the data size α is read from the address add by the HW-independent device driver 44 of the second OS and transferred to the interface 14D by the HW-dependent device driver 46. A command for issuing a write command with the size α as an argument is issued to the inter-OS communication module 36. The inter-OS communication module 36 receives this issuance command and generates and issues one write command (see also (2) and (5) in FIG. 9).

図7(A)に、OS間通信モジュール36により生成されるデータ転送コマンド(ライトコマンド、リードコマンド)のフォーマットの一例を示す。図示されるように、データ転送コマンドは、メッセージの発行元及び宛先を示すメッセージ通信ヘッダ情報、第2OSのデバイスドライバに対するコマンド(リード或いはライトを示す)、引数(アドレス)、引数(データサイズ)により構成される。   FIG. 7A shows an example of a format of a data transfer command (write command, read command) generated by the inter-OS communication module 36. As shown in the figure, the data transfer command is based on message communication header information indicating the source and destination of the message, a command (indicating read or write) to the device driver of the second OS, an argument (address), and an argument (data size). Composed.

なお、本実施の形態では、アプリケーション30からの1つのライト命令を受け取ると、転送対象のデータを分割し、転送サイズがデータサイズNより小さいライトコマンドを該分割数だけ発行するため、以下では、このライトコマンドを分割ライトコマンドと呼称する。   In the present embodiment, when one write command from the application 30 is received, the data to be transferred is divided, and a write command having a transfer size smaller than the data size N is issued by the number of divisions. This write command is referred to as a divided write command.

第2OSのOS間通信モジュール40は、分割ライトコマンドを受け取ると、該分割ライトコマンドを外部インタフェース42を介してHW非依存デバイスドライバ44に出力する。これにより、HW非依存デバイスドライバ44は、図5に示す処理ルーチンを実行する。なお、OS間通信モジュール40が分割ライトコマンドをHW非依存デバイスドライバ44に出力するタイミングは、第2OSのデバイスドライバの作業領域の少なくとも1つが使用可能なタイミングである。   When receiving the divided write command, the inter-OS communication module 40 of the second OS outputs the divided write command to the HW-independent device driver 44 via the external interface 42. Thereby, the HW-independent device driver 44 executes the processing routine shown in FIG. The timing at which the inter-OS communication module 40 outputs the divided write command to the HW-independent device driver 44 is a timing at which at least one of the work areas of the device driver of the second OS can be used.

具体的には、デバイスドライバの作業領域が1つである場合、OS間通信モジュール40が分割ライトコマンドを第1OS側から受け取ったときに、その1つ前に第1OS側から受け取ってHW非依存デバイスドライバ44に出力した分割ライトコマンド(ここで、先の分割ライトコマンドという)の実行が未処理の場合には、これから第2OS側のデバイスドライバ領域を用いたデータ転送が行われるか、或いはデータ転送実行中であるため、OS間通信モジュール40は、先の分割ライトコマンドの実行が終了する(例えば、先の分割ライトコマンドに対するリード終了コマンドの発行指令がある)まで、第1OS側から受け取った分割ライトコマンドのHW非依存デバイスドライバ44への出力を待つようにしている。   Specifically, when there is one device driver work area, when the inter-OS communication module 40 receives a split write command from the first OS side, it receives it from the first OS side one time before and receives HW independent. If the execution of the divided write command output to the device driver 44 (hereinafter referred to as the previous divided write command) has not yet been processed, data transfer using the device driver area on the second OS side will be performed, or data Since the transfer is being executed, the inter-OS communication module 40 received from the first OS side until the execution of the previous divided write command is completed (for example, there is an instruction to issue a read end command for the previous divided write command). The output of the divided write command to the HW-independent device driver 44 is waited for.

また、サイズdのデバイスドライバの作業領域が2つ設けられ、分割データのサイズα(分割ライトコマンドで引数として指定されたデータサイズ)が2dである場合には、先の分割ライトコマンドによるDMA転送(後述する)が一方の作業領域と他方の作業領域の各々で1回ずつ行われることとなるが、一方の作業領域のDMA転送が終了すれば、該一方の作業領域で次の分割ライトコマンドによるDMA転送が可能となるため、このタイミングで次の分割ライトコマンドを出力すればよい。   In addition, when two work areas of a device driver of size d are provided and the divided data size α (data size specified as an argument in the divided write command) is 2d, the DMA transfer by the previous divided write command is performed. (To be described later) is performed once in each of the one work area and the other work area. When the DMA transfer in one work area is completed, the next divided write command is executed in the one work area. Therefore, the next divided write command may be output at this timing.

なお、OS間通信モジュール40が受け取った分割ライトコマンドが、ライト命令による最初の分割ライトコマンドであれば、何ら処理を待つことなくHW非依存デバイスドライバ44に出力される。   If the divided write command received by the inter-OS communication module 40 is the first divided write command by the write command, it is output to the HW-independent device driver 44 without waiting for any processing.

ここで、図5を参照して、第2OS側のHW非依存デバイスドライバ44のコマンド受信処理について説明する。   Here, the command reception process of the HW-independent device driver 44 on the second OS side will be described with reference to FIG.

ステップ200で第1OS側からコマンドを受信すると、ステップ202で、受信したコマンドがライトかリードかを判断する。コマンドがライトであると判断した場合には、ステップ204に進み、分割ライトコマンドの引数で指定された共有メモリのアドレスから、引数で指定されたデータサイズのデータ(ここでは分割データ)を読み出して、デバイスドライバの作業領域に書き込み、ステップ206で、HW依存デバイスドライバ46に対してIOリクエストを出す(図9(3)も参照。)。このIOリクエストにより、デバイス処理が行われる。すなわち、デバイスドライバの作業領域に書き込まれたデータが、HW依存デバイスドライバ46により読み出され、インタフェース14Dに対して転送される(DMA(Direct Memory Access)転送)。DMA転送が終了すると、HW依存デバイスドライバ46からHW非依存デバイスドライバ44に対してDMA転送終了信号が出力される(図9(4)も参照。)。   When a command is received from the first OS side in step 200, it is determined in step 202 whether the received command is a write or a read. If it is determined that the command is a write command, the process proceeds to step 204, and data of the data size specified by the argument (here, the divided data) is read from the address of the shared memory specified by the argument of the split write command. In step 206, an I / O request is issued to the HW-dependent device driver 46 (see also FIG. 9 (3)). Device processing is performed by this IO request. That is, the data written in the work area of the device driver is read by the HW dependent device driver 46 and transferred to the interface 14D (DMA (Direct Memory Access) transfer). When the DMA transfer ends, a DMA transfer end signal is output from the HW-dependent device driver 46 to the HW-independent device driver 44 (see also FIG. 9 (4)).

なお、分割ライトコマンドで指定されたデータサイズが個々のデバイスドライバ領域のサイズdよりも大きなサイズである場合には、共有メモリからデバイスドライバ領域のサイズ分だけのデータを読出して転送する処理を繰り返すことにより指定されたサイズ分の分割データを転送する。なお、デバイスドライバの作業領域が複数個ある場合には、前述したように、書き込みが終了した作業領域からのデータの読み出しと他の作業領域への書き込みを並列に行うようにして、効率的に転送作業を行う。図8及び図9に示す例では、デバイスドライバの作業領域を2個設け、データサイズαをデバイスドライバの作業領域dの2倍としており、データサイズαの分割データが2回のDMA転送で転送されるようにしている。   If the data size specified by the divided write command is larger than the size d of each device driver area, the process of reading and transferring data corresponding to the size of the device driver area from the shared memory is repeated. As a result, the divided data of the specified size is transferred. If there are multiple work areas for the device driver, as described above, reading data from the work area where writing has been completed and writing to other work areas are performed in parallel, thereby improving efficiency. Perform transfer work. In the example shown in FIGS. 8 and 9, two device driver work areas are provided, the data size α is twice the device driver work area d, and the divided data of the data size α is transferred by two DMA transfers. To be.

ステップ208では、分割ライトコマンドで指定されたデータサイズ分のデータ転送が終了したか否かを判断し、終了していないと判断した場合には、ステップ204に戻って上記処理を繰り返す。また、ステップ208で、転送が終了したと判断した場合には、ステップ210に進む。   In step 208, it is determined whether or not the data transfer for the data size specified by the divided write command has been completed. If it is determined that the transfer has not ended, the process returns to step 204 and the above processing is repeated. If it is determined in step 208 that the transfer has been completed, the process proceeds to step 210.

ステップ210では、ライト終了メッセージの発行指令をOS間通信モジュール40に対して出力する。これにより、OS間通信モジュール40は、ライト終了メッセージを作成して第1OSのOS間通信モジュール36に発行する(図9(6)、(8)、(9)も参照。)。   In step 210, a command to issue a write end message is output to the inter-OS communication module 40. Thereby, the inter-OS communication module 40 creates a write end message and issues it to the inter-OS communication module 36 of the first OS (see also FIGS. 9 (6), (8), and (9)).

図7(B)は、OS間通信モジュール40により生成されるデータ転送終了メッセージ(ライト終了、リード終了)のフォーマットの一例を示す図である。図示されるように、データ転送終了メッセージは、メッセージの発行元及び宛先を示すメッセージ通信ヘッダ情報、ライト終了かリード終了かのステータスを示すステータス情報により構成される。ステータス情報には、転送したデータのサイズを示す情報を含めてもよい。   FIG. 7B is a diagram illustrating an example of a format of a data transfer end message (write end, read end) generated by the inter-OS communication module 40. As shown in the figure, the data transfer end message is composed of message communication header information indicating the source and destination of the message, and status information indicating the status of write end or read end. The status information may include information indicating the size of the transferred data.

なお、第2OSに発行されたコマンドが、分割ライトコマンドではなく、ライトコマンドであっても、第2OSにおけるHW非依存デバイスドライバ44及びHW依存デバイスドライバ46によるデータ転送は上記と同様に行われる。   Even if the command issued to the second OS is not a divided write command but a write command, data transfer by the HW-independent device driver 44 and the HW-dependent device driver 46 in the second OS is performed in the same manner as described above.

一方、HW非依存デバイスドライバ34は、ステップ112の発行指令を出した後、ステップ114で、sに1を加算し、kに1を加算する。また、アドレスaddにαを加算する。   On the other hand, the HW-independent device driver 34 issues an issue command in step 112, and then adds 1 to s and 1 to k in step 114. Further, α is added to the address add.

ステップ116では、kがnに等しいか否かを判断する。ここで否定判断した場合には、ステップ118に進む。ステップ118では、sがmより大きいか否かを判断する。ここで、sがmより大きいと判断した場合には、共有メモリに確保した領域52へのm個分の分割データの書き込みが終了したことを示すため、ステップ106に戻り、sに1をセットして初期化すると共に、アドレスaddに領域52の先頭アドレスadd0をセットして、上記説明した処理を繰り返す。一方、ステップ118で否定判断した場合には、共有メモリに確保した領域52へのm個分の分割データの書き込みが終了していないことを示すため、ステップ108に戻り、上記説明した処理を繰り返す。   In step 116, it is determined whether k is equal to n. If a negative determination is made here, the process proceeds to step 118. In step 118, it is determined whether s is larger than m. If it is determined that s is greater than m, the process returns to step 106 to indicate that writing of m pieces of divided data to the area 52 secured in the shared memory is completed, and 1 is set in s. At the same time, the initial address add0 of the area 52 is set to the address add, and the above-described processing is repeated. On the other hand, if a negative determination is made in step 118, the process returns to step 108 and repeats the above-described processing to indicate that writing of m pieces of divided data to the area 52 secured in the shared memory has not been completed. .

また、ステップ116で、kがnに等しいと判断した場合には、次に共有メモリに書き込む分割データは、最後の分割データ(すなわちn番目の分割データ)となるため、ステップ120に進む。ステップ120では、sがmより大きいか否かを判断し、大きいと判断したときは、ステップ122で、アドレスaddに領域52の先頭アドレスadd0をセットして、ステップ124に進む。また、ステップ120でsがm以下であると判断した場合には、ステップ122をスキップして、ステップ124に進む。   If it is determined in step 116 that k is equal to n, the next divided data to be written to the shared memory is the last divided data (that is, the nth divided data), so the process proceeds to step 120. In step 120, it is determined whether or not s is larger than m. If it is determined that s is larger, in step 122, the head address add0 of the area 52 is set in the address add and the process proceeds to step 124. If it is determined in step 120 that s is equal to or less than m, step 122 is skipped and the process proceeds to step 124.

ステップ124では、ステップ108と同様に分割データの書き込みが可能か否かを判断し、可能であると判断した場合には、ステップ126に進み、アプリケーション30の作業領域からn番目の分割データを読出し、共有メモリのアドレスaddが示す領域に該分割データを書き込む。   In step 124, it is determined whether or not the divided data can be written in the same manner as in step 108. If it is determined that the divided data can be written, the process proceeds to step 126 to read the nth divided data from the work area of the application 30. The divided data is written in the area indicated by the address add of the shared memory.

ステップ128では、アドレスadd、及びn番目の分割データのデータサイズ(n番目の分割データは、データサイズがαであるとは限らない)が引数とされた分割ライトコマンドの発行指令をOS間通信モジュール36に出す。OS間通信モジュール36はこの発行指令を受け、分割ライトコマンドを1つ生成して発行する(図9の(7)も参照。)。   In step 128, the OS issues a command to issue a divided write command with the address add and the data size of the n-th divided data (the data size of the n-th divided data is not necessarily α) as arguments. Deliver to module 36. The inter-OS communication module 36 receives this issuance command and generates and issues one divided write command (see also (7) in FIG. 9).

ステップ130では、転送対象のデータのライト処理が終了したか否かを判断する。ここでは、n番目の分割ライトコマンドに対するライト終了メッセージが第2OS側のOS間通信モジュール40から発行されたことをもって(図9(9)も参照。)ライト終了と判断する。ステップ130で肯定判断した場合には、ステップ132に進み、アプリケーション30に対して、ライト終了を示す結果を通知する(図9(10)も参照。)。   In step 130, it is determined whether or not the write processing of the data to be transferred has been completed. Here, when the write end message for the nth divided write command is issued from the inter-OS communication module 40 on the second OS side (see also FIG. 9 (9)), it is determined that the write is ended. If an affirmative determination is made in step 130, the process proceeds to step 132, and a result indicating the end of writing is notified to the application 30 (see also FIG. 9 (10)).

次に、図10に示すように、転送対象のデータのサイズが、OS間共有メモリの使用可能なサイズ以下であるためステップ100において肯定判断された場合の処理について説明する。図4のステップ140では、共有メモリから、ライト命令(図11(1)も参照。)において指定されたデータサイズN分のサイズの領域を獲得する。   Next, as shown in FIG. 10, a process when a positive determination is made in step 100 because the size of the transfer target data is equal to or smaller than the usable size of the inter-OS shared memory will be described. In step 140 of FIG. 4, an area of the data size N specified in the write command (see also FIG. 11 (1)) is acquired from the shared memory.

ステップ142では、分割数nを算出し、パラメータkに1をセットする。分割数nの算出方法は、ステップ104と同様である。   In step 142, the division number n is calculated and 1 is set to the parameter k. The calculation method of the division number n is the same as that in step 104.

ステップ144では、アドレスaddに、上記共有メモリから獲得した領域の先頭アドレスadd0をセットする。   In step 144, the start address add0 of the area acquired from the shared memory is set to the address add.

ステップ146では、アプリケーション30の作業領域からサイズαの分割データを読出し、共有メモリのアドレスaddが示す領域に該分割データを書き込む。   In step 146, the divided data of size α is read from the work area of the application 30, and the divided data is written in the area indicated by the address add of the shared memory.

ステップ148では、アドレスaddからデータサイズαの分割データが第2OSのHW非依存デバイスドライバ44により読み出されて、HW依存デバイスドライバ46によりインタフェース14Dに転送されるように、該アドレスadd、及びデータサイズαが引数とされた分割ライトコマンドの発行指令をOS間通信モジュール36に出す。OS間通信モジュール36はこの発行指令を受け、分割ライトコマンドを1つ生成して発行する(図11の(2)、(5)も参照。)。   In step 148, the divided data having the data size α from the address add is read by the HW-independent device driver 44 of the second OS and transferred to the interface 14D by the HW-dependent device driver 46. A split write command issuance command with the size α as an argument is issued to the inter-OS communication module 36. The inter-OS communication module 36 receives this issue command and generates and issues one divided write command (see also (2) and (5) in FIG. 11).

なお、第2OS側で分割ライトコマンドを受信した場合の処理については、上記説明した通りであるため、説明を省略する(図11の(3)、(4)、(6)、(8)も参照。)。   Note that the processing when the split write command is received on the second OS side is as described above, and thus the description thereof is omitted (also (3), (4), (6), and (8) in FIG. 11). reference.).

続いて、ステップ150では、kに1を加算し、アドレスaddにαを加算する。   Subsequently, in step 150, 1 is added to k, and α is added to address add.

ステップ152では、kがnに等しいか否かを判断する。ここで否定判断した場合には、ステップ146に戻り、上記説明した処理を繰り返す。また、ステップ152で肯定判断した場合には、次に共有メモリに書き込む分割データは、最後の分割データ(すなわちn番目の分割データ)となるため、ステップ154に進む。   In step 152, it is determined whether k is equal to n. If a negative determination is made here, the process returns to step 146 and the above-described processing is repeated. If the determination in step 152 is affirmative, the divided data to be written next to the shared memory is the last divided data (that is, the nth divided data), and thus the process proceeds to step 154.

ステップ154では、アプリケーション30の作業領域からn番目の分割データを読出し、共有メモリのアドレスaddが示す領域に該分割データを書き込む。   In step 154, the nth divided data is read from the work area of the application 30, and the divided data is written in the area indicated by the address add of the shared memory.

ステップ156では、アドレスadd、及びn番目の分割データのデータサイズ(n番目の分割データは、データサイズがαであるとは限らない)が引数とされた分割ライトコマンドの発行指令をOS間通信モジュール36に出す。OS間通信モジュール36はこの発行指令を受け、分割ライトコマンドを1つ生成して発行する(図11の(7)も参照。)。   In step 156, the OS issues a divided write command issuance command with the address add and the data size of the nth divided data (the data size of the nth divided data is not necessarily α) as arguments. Deliver to module 36. The inter-OS communication module 36 receives this issuance command and generates and issues one divided write command (see also (7) in FIG. 11).

ステップ158では、転送対象のデータのライト処理が終了したか否かを判断する。ここでは、n番目の分割ライトコマンドに対するライト終了メッセージが第2OS側のOS間通信モジュール40から発行されたことをもって(図11(9)も参照。)ライト終了と判断する。ステップ158で肯定判断した場合には、図3のステップ132に進み、アプリケーション30に対して、ライト終了を示す結果を通知する(図11(10)も参照。)。   In step 158, it is determined whether or not the write processing of the data to be transferred has been completed. Here, when the write end message for the nth divided write command is issued from the inter-OS communication module 40 on the second OS side (see also FIG. 11 (9)), it is determined that the write is ended. If the determination in step 158 is affirmative, the process proceeds to step 132 in FIG. 3 to notify the application 30 of the result indicating the end of writing (see also FIG. 11 (10)).

なお、上記実施の形態では、ステップ100で肯定判断した場合にも転送対象のデータを複数に分割して共有メモリに書き込み、第2OSに対して分割ライトコマンドを発行する例について説明したが、これに限定されない。例えば、ステップ100で肯定判断した場合には、転送対象のデータを分割せずに共有メモリに書き込み、転送対象のデータのデータサイズNを引数とするライトコマンドを第2OSに発行するようにしてもよい。   In the above embodiment, the example in which the transfer target data is divided into a plurality of pieces and written to the shared memory and the divided write command is issued to the second OS even when an affirmative determination is made in step 100 has been described. It is not limited to. For example, if the determination in step 100 is affirmative, the transfer target data is written to the shared memory without being divided, and a write command using the data size N of the transfer target data as an argument is issued to the second OS. Good.

このように処理する場合には、図4に示すステップ140〜ステップ158に示す処理に代えて、図12に示すステップ160〜ステップ166に示す処理を行う。   In the case of processing in this way, the processing shown in step 160 to step 166 shown in FIG. 12 is performed instead of the processing shown in step 140 to step 158 shown in FIG.

ステップ160では、共有メモリから、ライト命令において指定されたデータサイズN分のサイズの領域52を獲得する。   In step 160, the area 52 having a size corresponding to the data size N specified in the write command is acquired from the shared memory.

ステップ162では、アプリケーション30の作業領域から転送対象のデータの全てを読出し、共有メモリの上記獲得した領域52に書き込む。   In step 162, all the data to be transferred is read from the work area of the application 30, and written in the acquired area 52 of the shared memory.

ステップ148では、上記獲得した領域52の先頭アドレスadd0からデータサイズNのデータが第2OSのHW非依存デバイスドライバ44により読み出されて、HW依存デバイスドライバ46によりインタフェース14DにDMAにより順次転送されるように、該アドレスadd0、及びデータサイズNが引数とされたライトコマンドの発行指令をOS間通信モジュール36に出す。OS間通信モジュール36はこの発行指令を受け、ライトコマンドを1つ生成して発行する。なお、第2OSに発行されるコマンドが、分割ライトコマンドではなく、ライトコマンドであっても、そのフォーマットは、前述したフォーマットと共通である。また、ライトコマンドによる第2OS側の処理は、上記分割ライトコマンドによる処理と同様に行われる。   In step 148, data of data size N is read by the HW-independent device driver 44 of the second OS from the start address add0 of the acquired area 52, and sequentially transferred to the interface 14D by the HW-dependent device driver 46 by DMA. As described above, a command for issuing a write command with the address add0 and the data size N as arguments is issued to the inter-OS communication module 36. The inter-OS communication module 36 receives this issuance command and generates and issues one write command. Even if the command issued to the second OS is not a divided write command but a write command, the format is the same as the format described above. The processing on the second OS side by the write command is performed in the same manner as the processing by the divided write command.

ステップ166では、転送対象のデータのライト処理が終了したか否かを判断する。ここでは、ライトコマンドに対するライト終了メッセージが第2OS側のOS間通信モジュール40から発行されたことをもってライト終了と判断する。ステップ166で肯定判断した場合には、図3のステップ132に進み、アプリケーション30に対して、ライト終了を示す結果を通知する。   In step 166, it is determined whether or not the write processing of the data to be transferred has been completed. Here, the write end message for the write command is issued from the inter-OS communication module 40 on the second OS side, and the write end is determined. If the determination in step 166 is affirmative, the process proceeds to step 132 in FIG. 3 to notify the application 30 of the result indicating the end of writing.

次に、第1OSのアプリケーション30が第2OS側のインタフェース14Dを制御するインタフェースコントローラ(USBコントローラなど)内のメモリ(FIFOなど)からデータを取得するするリード処理について図13〜図19、及び図5を用いて説明する。なお、リード処理の場合も、上記ライト処理と同様に、転送対象のデータを複数個に分割した分割データ毎に共有メモリに書き込んで転送するものとする。また、第1OS側から第2OS側に対して分割データ毎に発行されるリードコマンドを、分割リードコマンドと呼称する。   Next, a read process in which the first OS application 30 acquires data from a memory (such as a FIFO) in an interface controller (such as a USB controller) that controls the interface 14D on the second OS side will be described with reference to FIGS. Will be described. In the case of a read process, as in the write process, data to be transferred is divided into a plurality of divided data and written to a shared memory for transfer. A read command issued for each piece of divided data from the first OS side to the second OS side is referred to as a divided read command.

HW非依存デバイスドライバ34に対して、アプリケーション30から外部インタフェース32を介してリード命令が発行されると、HW非依存デバイスドライバ34は、図13に示す処理ルーチンを実行する。   When a read command is issued from the application 30 to the HW-independent device driver 34 via the external interface 32, the HW-independent device driver 34 executes a processing routine shown in FIG.

ステップ300では、共有メモリから、リード命令において指定されている転送対象のデータの転送サイズ(データサイズN)の領域を獲得可能か否かを判断する。共有メモリで使用可能な領域のサイズがデータサイズNより小さければ、ステップ302に進み、共有メモリで使用可能な領域のサイズがデータサイズN以上であれば、図14のステップ340に進む。なお、リードの場合には、取得するデータが第2OS側に存在するため、リード命令を出す段階において第1OS側のアプリケーション30は、取得するデータの実サイズはわからない。従って、アプリケーション30では、予め定められた大きさ(転送可能な程度に十分な大きさ)の作業領域をメモリ12Bに確保し、この作業領域のサイズを転送サイズ(データサイズN)としてリード命令で指定するようにしている。   In step 300, it is determined whether or not an area of the transfer size (data size N) of the transfer target data specified in the read command can be acquired from the shared memory. If the size of the area usable in the shared memory is smaller than the data size N, the process proceeds to step 302. If the size of the area usable in the shared memory is equal to or larger than the data size N, the process proceeds to step 340 in FIG. In the case of reading, since the data to be acquired exists on the second OS side, the application 30 on the first OS side does not know the actual size of the data to be acquired at the stage of issuing the read command. Therefore, the application 30 secures a work area of a predetermined size (sufficiently large enough to be transferred) in the memory 12B, and sets the size of the work area as a transfer size (data size N) by a read command. I am trying to specify.

図15に示すように、共有メモリのサイズに制約があり、転送対象のデータを取得するために確保されたアプリケーション30の作業領域のサイズが、共有メモリの使用可能な領域のサイズより大きい場合には、ステップ300で否定判断される。一方、図16に示すように、転送対象のデータを取得するために確保されたアプリケーション30の作業領域のサイズが、共有メモリの使用可能な領域のサイズより小さい場合には、ステップ300で肯定判断される。なお、ここでは、図15に示すリード処理のタイミングチャートの例は省略し、図16に示すリード処理のタイミングチャートの例を図18に示す。   As shown in FIG. 15, when the size of the shared memory is limited and the size of the work area of the application 30 secured for acquiring the transfer target data is larger than the size of the area that can be used in the shared memory. Is negatively determined at step 300. On the other hand, as shown in FIG. 16, when the size of the work area of the application 30 secured for acquiring the transfer target data is smaller than the size of the usable area of the shared memory, an affirmative determination is made in step 300. Is done. Here, an example of the timing chart of the read process shown in FIG. 15 is omitted, and an example of the timing chart of the read process shown in FIG. 16 is shown in FIG.

まず、図15に示すように、共有メモリのサイズに制約があり、アプリケーション30の作業領域のサイズよりも、共有メモリの使用可能な領域のサイズが小さい場合について、説明する。   First, as shown in FIG. 15, a case where the size of the shared memory is limited and the size of the usable area of the shared memory is smaller than the size of the work area of the application 30 will be described.

図13のステップ302において、共有メモリから使用可能な領域のサイズ以内で、予め定められたサイズα×m個分の領域52を獲得(確保)する。この処理は、ライトの場合のステップ102と同様である。   In step 302 in FIG. 13, a predetermined size α × m areas 52 are acquired (reserved) within the size of the usable area from the shared memory. This process is the same as step 102 in the case of writing.

ステップ304では、分割数nを算出し、パラメータkに1をセットする。ここで、分割数nは、上記データサイズNをαで除算したときの商とする。なお、除算した結果、余りが出た場合には、商に1を加算した値をnとする。   In step 304, the division number n is calculated and 1 is set to the parameter k. Here, the division number n is a quotient obtained by dividing the data size N by α. When a remainder is obtained as a result of division, the value obtained by adding 1 to the quotient is set to n.

ステップ306には、パラメータsに1をセットし、アドレスaddに、上記共有メモリから獲得した領域の先頭アドレスadd0をセットする。   In step 306, 1 is set to the parameter s, and the start address add0 of the area acquired from the shared memory is set to the address add.

ステップ308では、第2OS側における転送対象のデータのリード処理が終了したか否かを判断する。ここでは、転送対象のデータの最後の分割データのリード処理が終了したことを示すリード終了メッセージが第2OS側のOS間通信モジュール40から発行されたことをもって、リード終了と判断する。第2OS側のOS間通信モジュール40は、最後の分割データのリード処理が終了した場合には、リード終了メッセージのステータス情報(図7(B)も参照。)に、最後の分割データのリード処理終了を示す情報を含めてリード終了メッセージを生成する(後述)。従って、HW非依存デバイスドライバ34は、リード終了メッセージのステータス情報からステップ308を判断する。なお、転送対象のデータの最後の分割データが、n番目の分割データであるとは限らない。これは、前述したように、第1OS側のアプリケーション30は、第2OS側から取得する転送対象のデータの正確なサイズを把握していないため、上記データサイズNよりも転送対象のデータのサイズが小さければ、上記算出したnよりも少ない数の分割リードコマンドでリード処理が終了することがあるからである。   In step 308, it is determined whether or not the read processing of the data to be transferred on the second OS side has been completed. Here, the read end message indicating that the read processing of the last divided data of the transfer target data has been completed is issued from the inter-OS communication module 40 on the second OS side, and the read end is determined. When the read processing of the last divided data is completed, the inter-OS communication module 40 on the second OS side adds the read processing of the last divided data to the status information of the read end message (see also FIG. 7B). A read end message is generated including information indicating the end (described later). Therefore, the HW-independent device driver 34 determines Step 308 from the status information of the read end message. Note that the last divided data of the transfer target data is not necessarily the nth divided data. As described above, since the application 30 on the first OS side does not know the exact size of the transfer target data acquired from the second OS side, the size of the transfer target data is larger than the data size N. This is because if it is smaller, the read process may be completed with a smaller number of divided read commands than the calculated n.

また、分割リードコマンドを1つも出していない初期の段階では、ステップ308は当然ながら否定判断される。従って、ステップ310に進む。   In the initial stage where no divided read command has been issued, the determination in step 308 is of course negative. Accordingly, the process proceeds to step 310.

ステップ310では、共有メモリにデータの書き込みが可能か否かを判断する。リード処理においては、第2OSに対する分割リードコマンドの発行により、第2OS側のHW非依存デバイスドライバ44が共有メモリに転送対象のデータを書き込む。書き込みが終了すると後述するようにリード終了メッセージが第2OS側から第1OS側に発行されるが、このメッセージをもって、第1OS側のHW非依存デバイスドライバ34は、共有メモリに書き込まれた分割データを読み出して、アプリケーション30の作業領域に転送する。なお、この共有メモリからアプリケーション30の作業領域へのデータ転送は、OS間通信モジュール36を介して入力される第2OS側からのリード終了メッセージに応じて逐次行われるが、本フローチャートでは図示を省略している。   In step 310, it is determined whether data can be written to the shared memory. In the read process, the HW-independent device driver 44 on the second OS side writes the data to be transferred to the shared memory by issuing a divided read command to the second OS. When the writing is finished, a read end message is issued from the second OS side to the first OS side as will be described later. With this message, the HW-independent device driver 34 on the first OS side sends the divided data written in the shared memory. Read out and transfer to the work area of the application 30. Note that data transfer from the shared memory to the work area of the application 30 is sequentially performed according to the read end message from the second OS side input via the inter-OS communication module 36, but is not shown in this flowchart. is doing.

一方、前述したように、共有メモリのサイズに制約があり、上記確保した領域52をリングバッファの如く用いて使用する。ここで、共有メモリに分割データが1つも書き込まれていない状態(分割リードコマンドが1つも発行されていない状態)においては、ステップ310で書き込み可能であると判断できる。しかしながら、共有メモリから獲得した領域52の終端アドレスまで分割データが書き込まれた後は、次の分割データは、既に書き込まれたデータに上書きしなくてはらないため、第1OS側のHW非依存デバイスドライバ34が該共有メモリに書き込まれたデータを読み出してアプリケーション30の作業領域に転送した後でないと、第2OS側のHW非依存デバイスドライバ44は次の書き込みができない。HW非依存デバイスドライバ34は、自身が実行する転送処理とリード終了コマンドとに応じて、共有メモリに分割データαを書き込み可能なだけのサイズがあるかを判断し、書き込み可能な領域ができるまでステップ310では書き込み不能であると判断して待機するようにしている。   On the other hand, as described above, the size of the shared memory is limited, and the reserved area 52 is used as a ring buffer. Here, in a state where no divided data is written in the shared memory (a state where no divided read command is issued), it can be determined in step 310 that writing is possible. However, after the divided data is written up to the end address of the area 52 acquired from the shared memory, the next divided data must be overwritten on the already written data, so the HW-independent device on the first OS side The HW-independent device driver 44 on the second OS side cannot perform the next writing unless the driver 34 has read the data written in the shared memory and transferred it to the work area of the application 30. The HW-independent device driver 34 determines whether the shared memory has a size sufficient to write the divided data α in accordance with the transfer process executed by itself and the read end command, and until a writable area is created. In step 310, it is determined that writing is impossible, and the process waits.

本実施の形態では、後述するように、1つの分割リードコマンドに対して、1つの分割データが書き込まれ、1つの分割データの書き込みに対して、1つのリード終了メッセージが第2OSから発行される。この分割リードコマンドに対応するリード終了メッセージが第2OSから発行され、この分割データをHW非依存デバイスドライバ34が読み出してアプリケーション30の作業領域に転送すれば、共有メモリの該分割データを書き込んだ領域は、次の分割データを書き込み可能な領域となる。   In the present embodiment, as will be described later, one divided data is written for one divided read command, and one read end message is issued from the second OS for one divided data write. . If a read end message corresponding to this divided read command is issued from the second OS, and the divided data is read by the HW-independent device driver 34 and transferred to the work area of the application 30, the area in which the divided data is written in the shared memory Is an area in which the next divided data can be written.

ステップ310で書き込み可能であると判断した後は、ステップ312に進む。   After determining in step 310 that writing is possible, the process proceeds to step 312.

ステップ312では、第2OS側のHW依存デバイスドライバ46によりインタフェース14Dを介して転送対象のデータを分割したデータサイズαの分割データが読み出され、第2OSのHW非依存デバイスドライバ44により該読み出された分割データが共有メモリのアドレスaddに書き込まれるように、該アドレスadd、及びデータサイズαが引数とされたリードコマンドの発行指令をOS間通信モジュール36に出す。OS間通信モジュール36はこの発行指令を受け、リードコマンドを1つ生成して発行する。   In step 312, the HW-dependent device driver 46 on the second OS side reads the divided data of the data size α obtained by dividing the data to be transferred via the interface 14D, and the HOS-independent device driver 44 of the second OS reads the read data. A command for issuing a read command with the address add and the data size α as arguments is issued to the inter-OS communication module 36 so that the divided data is written to the address add of the shared memory. The inter-OS communication module 36 receives this issuance command and generates and issues one read command.

ステップ314では、sに1を加算し、kに1を加算する。また、アドレスaddにαを加算する。   In step 314, 1 is added to s, and 1 is added to k. Further, α is added to the address add.

ステップ316では、kがnに等しいか否かを判断する。ここで否定判断した場合には、ステップ318に進む。ステップ318では、sがmより大きいか否かを判断する。ここで、sがmより大きいと判断した場合には、共有メモリに確保した領域52へのm個分の分割データの転送のための分割リードコマンドの発行が終了したことを示すため、ステップ306に戻り、sに1をセットして初期化すると共に、アドレスaddに領域52の先頭アドレスadd0をセットして、上記説明した処理を繰り返す。一方、ステップ318で否定判断した場合には、共有メモリに確保した領域52へのm個分の分割データの転送のための分割リードコマンドの発行が終了していないことを示すため、ステップ308に戻り、上記説明した処理を繰り返す。   In step 316, it is determined whether k is equal to n. If a negative determination is made here, the process proceeds to step 318. In step 318, it is determined whether s is greater than m. Here, when it is determined that s is larger than m, in order to indicate that the issue of the divided read command for transferring m pieces of divided data to the area 52 secured in the shared memory is completed, step 306 is performed. Returning to, the initialization is performed by setting 1 to s, and the head address add0 of the area 52 is set to address add, and the above-described processing is repeated. On the other hand, if a negative determination is made in step 318, in order to indicate that the issue of the divided read command for transferring m pieces of divided data to the area 52 secured in the shared memory has not been completed, step 308 is executed. Return and repeat the process described above.

また、ステップ316で、kがnに等しいと判断した場合には、次に発行する分割リードコマンドはn番目の分割リードコマンドであるため、ステップ320に進む。ステップ320では、sがmより大きいか否かを判断し、大きいと判断したときは、ステップ322で、アドレスaddに領域52の先頭アドレスadd0をセットして、ステップ324に進む。また、ステップ320でsがm以下であると判断した場合には、ステップ322をスキップして、ステップ324に進む。   If it is determined in step 316 that k is equal to n, the next divided read command to be issued is the nth divided read command, and thus the process proceeds to step 320. In step 320, it is determined whether or not s is larger than m. If it is determined that s is larger, in step 322, the head address add0 of the area 52 is set in the address add, and the process proceeds to step 324. If it is determined in step 320 that s is equal to or less than m, step 322 is skipped and the process proceeds to step 324.

ステップ324では、ステップ308と同様に、第2OS側における転送対象のデータのリード処理が終了したか否かを判断する。ステップ324で、転送対象のデータのリード処理が終了していないと判断した場合には、ステップ326に進む。ステップ326では、ステップ310と同様に、分割データの書き込みが可能か否かを判断し、可能であると判断した場合には、ステップ328に進み、アドレスadd、及びn番目の分割データのデータサイズ(n番目の分割データは、データサイズがαであるとは限らない)が引数とされた分割リードコマンドの発行指令をOS間通信モジュール36に出す。OS間通信モジュール36はこの発行指令を受け、分割リードコマンドを1つ生成して発行する。   In step 324, as in step 308, it is determined whether or not the read processing of data to be transferred on the second OS side has been completed. If it is determined in step 324 that the read process of the data to be transferred has not been completed, the process proceeds to step 326. In step 326, as in step 310, it is determined whether or not the divided data can be written. If it is determined that the divided data can be written, the process proceeds to step 328, where the address add and the data size of the nth divided data are obtained. A command for issuing a divided read command with an argument of (the data size of the nth divided data is not necessarily α) is issued to the inter-OS communication module 36. The inter-OS communication module 36 receives this issue command and generates and issues one divided read command.

ステップ330では、ステップ308と同様に、第2OS側における転送対象のデータのリード処理が終了したか否かを判断する。   In step 330, as in step 308, it is determined whether or not the read processing of the data to be transferred on the second OS side has been completed.

ステップ308、324、及び330で肯定判断した場合には、ステップ332に進み、共有メモリから最後の分割データを読み出してアプリケーション30の作業領域に転送したか否かを判断し、否定判断中は、待機状態を続ける。また、ステップ332で肯定判断した場合には、ステップ334に進み、アプリケーション30に対して、リード終了を示す結果を通知する。すなわち、転送対象のデータの全てがアプリケーション30の作業領域に書き込まれた段階で、アプリケーション30に対して結果通知を出すようにしている。   If an affirmative determination is made in steps 308, 324, and 330, the process proceeds to step 332 to determine whether the last divided data has been read from the shared memory and transferred to the work area of the application 30. Continue waiting. If an affirmative determination is made in step 332, the process proceeds to step 334 to notify the application 30 of the result indicating the end of reading. That is, a result notification is issued to the application 30 when all the transfer target data is written in the work area of the application 30.

なお、ステップ308、324の段階で、第2OS側における転送対象のデータのリード処理が終了したと判断した場合には、n番目の分割リードコマンドを発行する前に分割リードコマンドの発行が中止されることになる。これは、前述したように、第1OS側のアプリケーション30は、第2OS側から取得する転送対象のデータの正確なサイズを把握していないため、上記データサイズNよりも転送対象のデータのサイズが小さければ、上記算出したnよりも少ない数の分割リードコマンドでリード処理が終了することがあるからである。従って、データサイズNよりも転送対象のデータのサイズが小さければ、図15、及び図16に示すように、アプリケーション30がメモリ12Bに確保した作業領域に、未使用領域が生じることもある。   If it is determined in steps 308 and 324 that the read processing of the data to be transferred on the second OS side has been completed, the issue of the divided read command is stopped before the nth divided read command is issued. Will be. As described above, since the application 30 on the first OS side does not know the exact size of the transfer target data acquired from the second OS side, the size of the transfer target data is larger than the data size N. This is because if it is smaller, the read process may be completed with a smaller number of divided read commands than the calculated n. Therefore, if the size of the data to be transferred is smaller than the data size N, an unused area may be generated in the work area secured in the memory 12B by the application 30, as shown in FIGS.

次に、図16に示すように、データサイズNが、OS間共有メモリの使用可能なサイズ以下であるためステップ300において肯定判断された場合の処理について説明する。   Next, as shown in FIG. 16, processing when the data size N is equal to or smaller than the usable size of the inter-OS shared memory and a positive determination is made in step 300 will be described.

ステップ300で肯定判断されると、図14のステップ340に進み、共有メモリから、リード命令(図18(1)も参照。)において指定されたデータサイズN分のサイズの領域を獲得する。   If an affirmative determination is made in step 300, the process proceeds to step 340 in FIG. 14, and an area of the data size N specified in the read command (see also FIG. 18 (1)) is acquired from the shared memory.

ステップ342では、分割数nを算出し、パラメータkに1をセットする。分割数nの算出方法は、ステップ304と同様である。   In step 342, the division number n is calculated and 1 is set to the parameter k. The calculation method of the division number n is the same as that in step 304.

ステップ344では、アドレスaddに、上記共有メモリから獲得した領域52の先頭アドレスadd0をセットする。   In step 344, the start address add0 of the area 52 acquired from the shared memory is set to the address add.

ステップ346では、ステップ308と同様に、転送対象のデータのリード処理が終了したか否かを判断する。   In step 346, as in step 308, it is determined whether or not the read processing for the data to be transferred has been completed.

ステップ346で否定判断した場合には、ステップ348に進み、第2OS側のHW依存デバイスドライバ46によりインタフェース14Dを介して転送対象のデータを分割したデータサイズαの分割データが読み出され、第2OSのHW非依存デバイスドライバ44により該読み出された分割データが共有メモリのアドレスaddに書き込まれるように、該アドレスadd、及びデータサイズαが引数とされたリードコマンドの発行指令をOS間通信モジュール36に出す。OS間通信モジュール36はこの発行指令を受け、リードコマンドを1つ生成して発行する(図18(2)、(5)、(6)、(8)も参照。)。   If a negative determination is made in step 346, the process proceeds to step 348, where the HW-dependent device driver 46 on the second OS side reads the divided data of the data size α obtained by dividing the transfer target data via the interface 14D, and the second OS The inter-OS communication module issues a read command issuance command with the address add and the data size α as arguments so that the divided data read by the HW-independent device driver 44 is written to the address add of the shared memory. Take out to 36. The inter-OS communication module 36 receives this issuance command and generates and issues one read command (see also FIGS. 18 (2), (5), (6), and (8)).

ステップ350では、kに1を加算し、アドレスaddにαを加算する。   In step 350, 1 is added to k, and α is added to address add.

ステップ352では、kがnに等しいか否かを判断する。ここで否定判断した場合には、ステップ346に戻り、上記説明した処理を繰り返す。また、ステップ352で肯定判断した場合には、ステップ354に進み、ステップ308と同様に、転送対象のデータのリード処理が終了したか否かを判断する。   In step 352, it is determined whether k is equal to n. If a negative determination is made here, the process returns to step 346 and the above-described processing is repeated. If the determination in step 352 is affirmative, the process proceeds to step 354, where it is determined whether or not the read processing of the data to be transferred has been completed as in step 308.

ステップ354で否定判断した場合には、ステップ356に進み、アドレスadd、及びn番目の分割データのデータサイズ(n番目の分割データは、データサイズがαであるとは限らない)が引数とされた分割リードコマンドの発行指令をOS間通信モジュール36に出す。OS間通信モジュール36はこの発行指令を受け、分割リードコマンドを1つ生成して発行する。   If a negative determination is made in step 354, the process proceeds to step 356, and the address add and the data size of the nth divided data (the data size of the nth divided data is not necessarily α) are used as arguments. The divided read command issuance command is issued to the inter-OS communication module 36. The inter-OS communication module 36 receives this issue command and generates and issues one divided read command.

ステップ358では、ステップ308と同様に、転送対象のデータのリード処理が終了したか否かを判断する。   In step 358, as in step 308, it is determined whether or not the read processing of the data to be transferred has been completed.

ステップ346、354、及び358で肯定判断した場合には、ステップ332に進み、ステップ332で肯定判断された場合には、ステップ334で、アプリケーション30に対して、リード終了を示す結果を通知する(図18(11)も参照。)。   If an affirmative determination is made in steps 346, 354, and 358, the process proceeds to step 332. If an affirmative determination is made in step 332, a result indicating the end of reading is notified to the application 30 in step 334 ( (See also FIG. 18 (11)).

一方、第2OS側のHW非依存デバイスドライバ44は、OS間通信モジュール40を介して第1OS側からの分割リードコマンドを受け取ると、図5に示す処理ルーチンを実行する。   On the other hand, when the HW-independent device driver 44 on the second OS side receives the divided read command from the first OS side via the inter-OS communication module 40, it executes the processing routine shown in FIG.

ステップ200で第1OS側からコマンドを受信すると、ステップ202で、受信したコマンドがライトかリードかを判断する。コマンドがリードであると判断した場合には、ステップ212に進み、HW依存デバイスドライバ46に対してIOリクエストを出す(図18の(3)も参照)。このIOリクエストにより、デバイス処理が行われる。すなわち、HW依存デバイスドライバ46は、IOリクエストに応じて、インタフェース14Dを制御するインタフェースコントローラ(USBコントローラなど)内のメモリ(FIFOなど)からデータを読み出して、デバイスドライバの作業領域に書き込む(DMA転送)。DMA転送が終了すると、HW依存デバイスドライバ46からHW非依存デバイスドライバ44に対してDMA転送終了信号が出力される(図18の(4)も参照)。ステップ214では、デバイスドライバの作業領域に書き込まれたデータが、HW非依存デバイスドライバ44により読み出され、共有メモリに書き込まれる。   When a command is received from the first OS side in step 200, it is determined in step 202 whether the received command is a write or a read. If it is determined that the command is read, the process proceeds to step 212, and an IO request is issued to the HW-dependent device driver 46 (see also (3) in FIG. 18). Device processing is performed by this IO request. That is, the HW-dependent device driver 46 reads data from a memory (FIFO or the like) in an interface controller (USB controller or the like) that controls the interface 14D in response to an IO request, and writes the data to the device driver work area (DMA transfer). ). When the DMA transfer ends, a DMA transfer end signal is output from the HW-dependent device driver 46 to the HW-independent device driver 44 (see also (4) in FIG. 18). In step 214, the data written in the work area of the device driver is read by the HW-independent device driver 44 and written in the shared memory.

なお、分割リードコマンドで指定されたデータサイズが個々のデバイスドライバ領域のサイズdよりも大きなサイズである場合には、分割リードコマンドで指定されたデータサイズ分だけDMA転送されるように、HW非依存デバイスドライバ44からHW依存デバイスドライバ46に対してIOリクエストが複数回出力される。なお、デバイスドライバの作業領域が複数個ある場合には、前述したように、書き込みが終了した作業領域からのデータの読み出しと他の作業領域への書き込みを並列に行うようにして、効率的に転送作業を行う。   Note that if the data size specified by the divided read command is larger than the size d of each device driver area, the HW non-HW is set so that DMA transfer is performed by the data size specified by the divided read command. An IO request is output from the dependent device driver 44 to the HW dependent device driver 46 a plurality of times. If there are multiple work areas for the device driver, as described above, reading data from the work area where writing has been completed and writing to other work areas are performed in parallel, thereby improving efficiency. Perform transfer work.

図18に示す例では、デバイスドライバの作業領域を2個設け、データサイズαをデバイスドライバの作業領域dの2倍としており、データサイズαの分割データが2回のDMA転送で読み出されて転送されるようにしている。   In the example shown in FIG. 18, two device driver work areas are provided, the data size α is twice the device driver work area d, and the divided data of the data size α is read out by two DMA transfers. To be transferred.

ステップ216では、分割リードコマンドで指定されたデータサイズ分のデータ転送(共有メモリへの書き込み)が終了したか否かを判断し、終了していないと判断した場合には、ステップ212に戻って上記処理を繰り返す。また、ステップ216で、転送が終了したと判断した場合には、ステップ218に進む。   In step 216, it is determined whether or not the data transfer (writing to the shared memory) for the data size specified by the divided read command has been completed. If it is determined that the transfer has not ended, the process returns to step 212. Repeat the above process. If it is determined in step 216 that the transfer has been completed, the process proceeds to step 218.

なお、ここで、HW非依存デバイスドライバ44は、HW依存デバイスドライバ46により、データがデバイスドライバの作業領域の途中までしかDMA転送されなかった場合(デバイスドライバの作業領域のサイズよりもDMA転送されたデータのサイズが小さかった場合)には、分割リードコマンドで指定されたデータサイズより転送したデータサイズのサイズが小さくても、転送対象のデータの全てが、インタフェース14Dを制御するインタフェースコントローラ(USBコントローラなど)内のメモリ(FIFOなど)から読み出されたと判断して、このデータをデバイスドライバの作業領域から共有メモリに転送したときに、ステップ216で肯定判断し、ステップ218に進むものとする。   Here, the HW-independent device driver 44 is DMA-transferred by the HW-dependent device driver 46 only when the data is transferred only partway through the work area of the device driver (the data is transferred by DMA rather than the size of the work area of the device driver). If the data size is smaller), even if the transferred data size is smaller than the data size specified by the divided read command, all the transfer target data is the interface controller (USB When it is determined that the data has been read from the memory (FIFO or the like) in the controller or the like and this data is transferred from the device driver work area to the shared memory, an affirmative determination is made in step 216 and the process proceeds to step 218.

ステップ218では、リード終了メッセージの発行指令をOS間通信モジュール40に対して出力する。これにより、OS間通信モジュール40は、リード終了メッセージを作成して第1OSのOS間通信モジュール36に発行する(図18(7)、(9)、(10)も参照)。リード終了メッセージのフォーマットは、図7(B)を用いて説明した通りである。   In step 218, a read end message issuance command is output to the inter-OS communication module 40. As a result, the inter-OS communication module 40 creates a read end message and issues it to the inter-OS communication module 36 of the first OS (see also FIGS. 18 (7), (9), and (10)). The format of the read end message is as described with reference to FIG.

ただし、本実施の形態では、リード終了メッセージにより、転送対象のデータの転送(共有メモリへの書き込み)が終了したか否かの判断ができるように、ステータス情報に、対応する分割リードコマンドに応じて転送したデータのサイズの情報を含めるようにしている。例えば、転送したデータのサイズが分割リードコマンドで指定したデータ転送サイズより小さければ、転送対象のデータの転送(共有メモリへの書き込み)が終了したと判断できる。これにより、第1OS側のOS間通信モジュール36及びHW非依存デバイスドライバ34は、図13、図14のステップ308、324、330、346、354、358における判断が可能となる。なお、ステータス情報に、転送したデータのサイズと共に、或いはデータのサイズの代わりに、転送対象のデータについての転送が全て終了した旨の状態情報を含めるようにしてもよい。   However, in the present embodiment, the status information corresponds to the corresponding divided read command so that it can be determined whether or not the transfer of data to be transferred (writing to the shared memory) is completed by the read end message. Information on the size of the transferred data is included. For example, if the size of the transferred data is smaller than the data transfer size specified by the divided read command, it can be determined that the transfer of the data to be transferred (writing to the shared memory) has been completed. As a result, the inter-OS communication module 36 and the HW-independent device driver 34 on the first OS side can make determinations in steps 308, 324, 330, 346, 354, and 358 of FIGS. The status information may include status information indicating that the transfer of all the data to be transferred is completed together with the size of the transferred data or instead of the size of the data.

これにより、第2OSにおいて転送対象のデータの全てのデータ転送が終了した旨を示すステータス情報が生成され、該ステータス情報を含むリード終了メッセージ(以下、最終リード終了メッセージという)が生成され発行される(図18(10)も参照)。   As a result, status information indicating that all data transfer of the data to be transferred has been completed in the second OS is generated, and a read end message including the status information (hereinafter referred to as final read end message) is generated and issued. (See also FIG. 18 (10)).

なお、第2OSに発行されたコマンドが、分割リードコマンドではなく、リードコマンドであっても、第2OSにおけるHW非依存デバイスドライバ44及びHW依存デバイスドライバ46によるデータ転送は上記と同様に行われる。   Even if the command issued to the second OS is not a divided read command but a read command, data transfer by the HW-independent device driver 44 and the HW-dependent device driver 46 in the second OS is performed in the same manner as described above.

ここで、リード処理時における第2OS側のOS間通信モジュール40の処理について説明する。図17は、第2制御部14のOS間通信モジュール40で行われるリードコマンド処理の処理ルーチンを示すフローチャートである。   Here, the process of the inter-OS communication module 40 on the second OS side during the read process will be described. FIG. 17 is a flowchart illustrating a processing routine of read command processing performed by the inter-OS communication module 40 of the second control unit 14.

ステップ400では、第2OS側における転送対象のデータのリード処理(共有メモリへの書き込み)が終了したか否かを判断する。例えば、OS間通信モジュール40は、HW非依存デバイスドライバ44からのリード終了メッセージの発行指令に、ステータス情報を生成するための情報として「転送したデータのサイズ」が含まれている場合に、該転送したデータのサイズが、該リード終了メッセージに対応する分割リードコマンドで指定されたデータサイズよりも小さければ、第2OS側において転送対象のデータのリード処理が終了したと判断するようにしてもよい。或いは、データサイズではなく、明示的に最終分割データのリード処理が終了したことを示すステータス情報が生成されるように発行指令を出してもよい。   In step 400, it is determined whether or not the read processing (writing to the shared memory) of the data to be transferred on the second OS side has been completed. For example, the inter-OS communication module 40, when the read end message issuance command from the HW-independent device driver 44 includes “the size of transferred data” as information for generating status information, If the size of the transferred data is smaller than the data size specified by the divided read command corresponding to the read end message, the second OS may determine that the read processing of the data to be transferred has been completed. . Alternatively, the issue command may be issued so that status information indicating that the read processing of the final divided data has ended explicitly is generated instead of the data size.

ステップ400で否定判断した場合には、ステップ402で通常のリードコマンド出力処理を行う。ここで、通常のリードコマンド出力処理とは、第2OSのOS間通信モジュール40は、分割リードコマンドを受け取った場合に、予め定められた出力タイミングで該分割リードコマンドを外部インタフェース42を介してHW非依存デバイスドライバ44に出力する処理いう。該分割リードコマンドを受け取ったHW非依存デバイスドライバ44は、図5に示す処理ルーチンを実行する。なお、OS間通信モジュール40が分割リードコマンドをHW非依存デバイスドライバ44に出力するタイミングは、第2OSのデバイスドライバの作業領域の少なくとも1つが使用可能なタイミングである。なお、このタイミングは、分割ライトコマンドの出力タイミングについての説明と同様であるため、ここでは説明を省略する。   If a negative determination is made in step 400, normal read command output processing is performed in step 402. Here, the normal read command output processing means that when the inter-OS communication module 40 of the second OS receives a divided read command, the divided read command is sent to the HW via the external interface 42 at a predetermined output timing. This process is output to the independent device driver 44. The HW-independent device driver 44 that has received the divided read command executes the processing routine shown in FIG. The timing at which the inter-OS communication module 40 outputs the divided read command to the HW-independent device driver 44 is a timing at which at least one of the work areas of the device driver of the second OS can be used. Since this timing is the same as the description of the output timing of the divided write command, the description is omitted here.

一方、ステップ400で肯定判断した場合には、ステップ404でアボート処理を行う。第2OS側における転送対象のデータのリード処理(共有メモリへの書き込み)が終了した場合には、第1OS側で最終リード終了メッセージを受け取る前に発行され、HW非依存デバイスドライバ44に対して未出力の分割リードコマンドについては、HW非依存デバイスドライバ44に出力する必要はないため、これら分割リードコマンドをHW非依存デバイスドライバ44に出力せずに消去する処理を行う。これをアボート処理という。例えば、図18に示す例では、3番目の分割リードコマンド(図18の(6))に対するリード終了メッセージ(図18の(10))の発行指令により、第2OS側の転送対象のデータのリード処理が終了したことがわかるため、4番目の分割リードコマンドは出力しなくてよい。従って、4番目の分割リードコマンドをアボートする(図18の(8)も参照。)。   On the other hand, if an affirmative determination is made in step 400, an abort process is performed in step 404. When read processing (writing to the shared memory) of data to be transferred on the second OS side is completed, it is issued before receiving the final read end message on the first OS side, and is not yet sent to the HW-independent device driver 44. Since it is not necessary to output the divided read command for output to the HW-independent device driver 44, the divided read command is erased without being output to the HW-independent device driver 44. This is called abort processing. For example, in the example shown in FIG. 18, in response to the issuance instruction of the read end message ((10) in FIG. 18) for the third divided read command ((6) in FIG. 18), the read of data to be transferred on the second OS side is performed. Since it is known that the processing has been completed, the fourth divided read command need not be output. Therefore, the fourth divided read command is aborted (see also (8) in FIG. 18).

なお、上記実施の形態では、ステップ300で肯定判断した場合にも、第2OSに対して分割リードコマンドを発行する例について説明したが、これに限定されない。例えば、ステップ300で肯定判断した場合には、転送対象のデータのデータサイズNを引数とするリードコマンドを第2OSに発行するようにしてもよい。   In the above embodiment, the example in which the divided read command is issued to the second OS even when an affirmative determination is made in step 300 has been described. However, the present invention is not limited to this. For example, if an affirmative determination is made in step 300, a read command that uses the data size N of the data to be transferred as an argument may be issued to the second OS.

このように処理する場合には、図14に示すステップ340〜ステップ358に示す処理に代えて、図19に示すステップ360〜ステップ364に示す処理を行う。   In the case of processing in this way, the processing shown in steps 360 to 364 shown in FIG. 19 is performed instead of the processing shown in steps 340 to 358 shown in FIG.

ステップ360では、共有メモリから、リード命令において指定されたデータサイズN分のサイズの領域52を獲得する。   In step 360, the area 52 having a size corresponding to the data size N specified in the read command is acquired from the shared memory.

ステップ362では、第2OS側のHW依存デバイスドライバ46によりインタフェース14Dを介して転送対象のデータが読み出され、第2OSのHW非依存デバイスドライバ44により該読み出されたデータが共有メモリのアドレスadd0に書き込まれるように、該アドレスadd0、及びデータサイズNが引数とされたリードコマンドの発行指令をOS間通信モジュール36に出す。OS間通信モジュール36はこの発行指令を受け、リードコマンドを1つ生成して発行する。なお、第2OSに発行されるコマンドが、分割リードコマンドではなく、リードコマンドであっても、そのフォーマットは、前述したフォーマットと共通である。   In step 362, the HW-dependent device driver 46 on the second OS side reads the data to be transferred via the interface 14D, and the read data is read by the HW-independent device driver 44 of the second OS at the address add0 of the shared memory. Is issued to the inter-OS communication module 36 with the address add0 and the data size N as arguments. The inter-OS communication module 36 receives this issuance command and generates and issues one read command. Even if the command issued to the second OS is not a divided read command but a read command, the format is the same as that described above.

ステップ364では、第2OS側における転送対象のデータのリード処理が終了したか否かを判断する。ここでは、ステップ362で発行したリードコマンドに対するリード終了メッセージを受け取ったことをもってリード処理が終了したと判断する。ここで、肯定判断した場合には、図13のステップ332に進み、ここで肯定判断された場合には、ステップ334で、アプリケーション30に対して、リード終了を示す結果を通知する。   In step 364, it is determined whether or not the read processing of the data to be transferred on the second OS side has been completed. Here, it is determined that the read process is completed when the read end message for the read command issued in step 362 is received. If an affirmative determination is made here, the process proceeds to step 332 in FIG. 13. If an affirmative determination is made here, a result indicating the end of reading is notified to the application 30 in step 334.

上記実施の形態では、分割データのデータサイズαを予め定められたサイズ(固定)とする例について説明したが、これに限定されず、例えばHW非依存デバイスドライバ44が、アプリケーション30の作業領域のサイズ(すなわち、ライト命令或いはリード命令で指定されたデータサイズN。なお、アプリケーション30においてライト命令或いはリード命令時に動的に確保される領域であって固定のサイズではない)と、共有メモリの使用可能な領域のサイズ(データ転送用に予め設けられた領域であるため固定サイズ)と、第2OS側のデバイスドライバの作業領域(固定サイズ)及びその個数と、に応じて、効率的に転送可能な分割データのサイズを決定し、分割ライトコマンド、或いは分割リードコマンドを発行するようにしてもよい。   In the above-described embodiment, the example in which the data size α of the divided data is set to a predetermined size (fixed) has been described. However, the present invention is not limited to this. Size (that is, data size N specified by the write command or read command, which is an area that is dynamically secured in the application 30 at the time of the write command or read command and is not a fixed size), and the use of the shared memory Efficient transfer is possible according to the size of the possible area (fixed size because it is an area provided in advance for data transfer), the work area (fixed size) and the number of device drivers on the second OS side Determine the size of the appropriate split data and issue a split write command or split read command. Good.

また、上記実施の形態では、第2制御部14に設けられ、第2OS側で管理・制御されるハードウェア・デバイスとして、USBポート等のインタフェース14Dを例に挙げて説明したが、これに限定するものではなく、他のハードウェア・デバイスであってもよい。例えば、第2制御部14にHDD等のハードウェア・デバイスが設けられている場合には、該HDDであってもよいし、CD−RW等の記憶媒体に対して書き込み及び読出し可能なデバイスであってもよい。このようなハードウェア・デバイスであっても、上記実施の形態のように第1OS側から分割データ転送コマンドを発行して、上記のようにデータを読み出したり、書き込んだりすることがなされる。   In the above embodiment, the interface 14D such as a USB port has been described as an example of a hardware device provided in the second control unit 14 and managed and controlled on the second OS side. However, the present invention is not limited to this. It may be other hardware devices. For example, when the second control unit 14 is provided with a hardware device such as an HDD, it may be the HDD or a device that can write to and read from a storage medium such as a CD-RW. There may be. Even in such a hardware device, a divided data transfer command is issued from the first OS side as in the above embodiment, and data is read or written as described above.

また、HW非依存デバイスドライバ34が、共有メモリから、予め定められたデータサイズα×m個の領域52を獲得する例について説明したが、獲得するサイズは、共有メモリの使用可能な領域のサイズより小さいサイズであればよく、α×mでははくてもよい。   Further, the example has been described in which the HW-independent device driver 34 acquires a predetermined data size α × m areas 52 from the shared memory. However, the acquired size is the size of the usable area of the shared memory. Any smaller size is acceptable, and α × m may be applied.

また、上記実施の形態では、データ転送制御装置が適用される例として画像形成装置を例に挙げて説明したが、これに限定されるものではなく、複数のOSが動作する様々な装置に適用可能である。   In the above-described embodiment, the image forming apparatus is described as an example to which the data transfer control apparatus is applied. However, the present invention is not limited to this and is applied to various apparatuses in which a plurality of OSs operate. Is possible.

10 画像形成装置
12 第1制御部
12A CPU
12B メモリ
12C 記憶部
14 第2制御部
14A CPU
14B メモリ
14C 記憶部
14D インタフェース
30 アプリケーション
32 外部インタフェース
34 HW非依存デバイスドライバ
36 OS間通信モジュール
40 OS間通信モジュール
42 外部インタフェース
44 HW非依存デバイスドライバ
46 HW依存デバイスドライバ
10 Image forming apparatus 12 First control unit 12A CPU
12B Memory 12C Storage unit 14 Second control unit 14A CPU
14B Memory 14C Storage unit 14D Interface 30 Application 32 External interface 34 HW independent device driver 36 Inter-OS communication module 40 Inter-OS communication module 42 External interface 44 HW independent device driver 46 HW dependent device driver

Claims (12)

第1オペレーティング・システムから前記第1オペレーティング・システムとは異なる第2オペレーティング・システムで管理するハードウェア・デバイスへデータを転送するためのデータ転送命令が、前記第1オペレーティング・システムに対して発行された場合に、前記データ転送命令による転送対象のデータを、前記第1オペレーティング・システム及び前記第2オペレーティング・システムが共有して使用する共有メモリの使用可能なサイズよりも小さいサイズの複数個の分割データに分割して、前記共有メモリに書き込む書込手段と、
前記書込手段で前記共有メモリに書き込まれた分割データが前記第2オペレーティング・システムにおいて読み出されて前記ハードウェア・デバイスに転送されるように、前記書込手段で前記分割データが前記共有メモリに書き込まれる毎に、前記分割データのデータサイズを転送サイズとして指定した分割データ転送コマンドを生成して前記第2オペレーティング・システムに対して発行する発行手段と、
を備えたデータ転送制御装置。
A data transfer instruction for transferring data from the first operating system to a hardware device managed by a second operating system different from the first operating system is issued to the first operating system. The data to be transferred by the data transfer instruction is divided into a plurality of divisions having a size smaller than the usable size of the shared memory shared and used by the first operating system and the second operating system. Writing means for dividing into data and writing to the shared memory;
The divided data is read from the shared memory by the writing means so that the divided data written to the shared memory by the writing means is read by the second operating system and transferred to the hardware device. Issuing means for generating a divided data transfer command specifying the data size of the divided data as a transfer size and issuing the divided data transfer command to the second operating system,
A data transfer control device.
第1オペレーティング・システムとは異なる第2オペレーティング・システムで管理するハードウェア・デバイスからデータを取得するためのデータ取得命令が、前記第1オペレーティング・システムに対して発行された場合に、前記第2オペレーティング・システムにおいて前記データ取得命令による取得対象のデータが、前記第1オペレーティング・システム及び前記第2オペレーティング・システムが共有して使用する共有メモリの使用可能なサイズよりも小さいサイズの複数個の分割データに分割されて、該分割データ毎に前記ハードウェア・デバイスから読み出されて前記共有メモリに書き込まれるように、該分割データのサイズを転送サイズとして指定した分割データ転送コマンドを生成し、該書き込まれた分割データが前記第1オペレーティング・システムにおいて読み出されるように、前記第2オペレーティング・システムに対して発行する発行手段と、
前記第2オペレーティング・システムにより前記分割データ転送コマンドに応じて前記共有メモリに書き込まれた分割データを前記共有メモリから読出して前記データ取得命令の発行元に転送する転送手段と、
を備えたデータ転送制御装置。
When a data acquisition instruction for acquiring data from a hardware device managed by a second operating system different from the first operating system is issued to the first operating system, the second In the operating system, the data to be acquired by the data acquisition instruction is divided into a plurality of pieces having a size smaller than the usable size of the shared memory shared and used by the first operating system and the second operating system. A divided data transfer command that specifies the size of the divided data as a transfer size so that the divided data is read from the hardware device and written to the shared memory for each divided data; The divided data written is As read in the operating system, and issuing means for issuing to the second operating system,
Transfer means for reading out the divided data written in the shared memory in response to the divided data transfer command by the second operating system from the shared memory and transferring it to the issuer of the data acquisition instruction;
A data transfer control device.
前記取得対象のデータの前記共有メモリへの転送が終了した場合に、前記第2オペレーティング・システムに対して既に発行された未実行の前記分割データ転送コマンドの実行が中止されるように制御する制御手段と、
を更に備えた
請求項2に記載のデータ転送制御装置。
Control for controlling execution of the unexecuted divided data transfer command that has already been issued to the second operating system when the transfer of the data to be acquired to the shared memory is completed Means,
The data transfer control device according to claim 2, further comprising:
前記発行手段は、前記第2オペレーティング・システム上で前記分割データ転送コマンドに応じたデータ転送動作を行うデバイスドライバの転送処理単位サイズの整数倍のサイズであって、前記共有メモリの使用可能なサイズよりも小さいサイズが転送サイズとして指定された分割データ転送コマンドを生成して前記第2オペレーティング・システムに対して発行する
請求項1〜請求項3のいずれか1項記載のデータ転送制御装置。
The issuing means has a size that is an integral multiple of a transfer processing unit size of a device driver that performs a data transfer operation according to the divided data transfer command on the second operating system, and is a usable size of the shared memory The data transfer control device according to any one of claims 1 to 3, wherein a divided data transfer command in which a smaller size is designated as a transfer size is generated and issued to the second operating system.
前記第2オペレーティング・システム上で動作し、前記発行手段から発行された分割データ転送コマンドに応じてデータ転送動作を行うデバイスドライバを更に備えた
請求項1〜請求項4のいずれか1項記載のデータ転送制御装置。
The device driver according to claim 1, further comprising a device driver that operates on the second operating system and performs a data transfer operation in response to a divided data transfer command issued from the issuing unit. Data transfer control device.
第1オペレーティング・システムから前記第1オペレーティング・システムとは異なる第2オペレーティング・システムで管理するハードウェア・デバイスへデータを転送するためのデータ転送命令が、前記第1オペレーティング・システムに対して発行された場合に、前記データ転送命令による転送対象のデータを、前記第1オペレーティング・システム及び前記第2オペレーティング・システムが共有して使用する共有メモリの使用可能なサイズよりも小さいサイズの複数個の第1分割データに分割して、前記共有メモリに書き込む書込手段と、
前記書込手段で前記共有メモリに書き込まれた第1分割データが前記第2オペレーティング・システムにおいて読み出されて前記ハードウェア・デバイスに転送されるように、前記書込手段で前記第1分割データが前記共有メモリに書き込まれる毎に、前記第1分割データのデータサイズを転送サイズとして指定した第1分割データ転送コマンドを生成して前記第2オペレーティング・システムに対して発行する第1発行手段と、
前記ハードウェア・デバイスからデータを取得するためのデータ取得命令が、前記第1オペレーティング・システムに対して発行された場合に、前記第2オペレーティング・システムにおいて前記データ取得命令による取得対象のデータが、前記共有メモリの使用可能なサイズよりも小さいサイズの複数個の第2分割データに分割されて、該第2分割データ毎に前記ハードウェア・デバイスから読み出されて前記共有メモリに書き込まれるように、該第2分割データのサイズを転送サイズとして指定した第2分割データ転送コマンドを生成し、該書き込まれた第2分割データが前記第1オペレーティング・システムにおいて読み出されるように、前記第2オペレーティング・システムに対して発行する第2発行手段と、
前記第2オペレーティング・システムにより前記第2分割データ転送コマンドに応じて前記共有メモリに書き込まれた第2分割データを前記共有メモリから読出して前記データ取得命令の発行元に転送する転送手段と、
を備えたデータ転送制御装置。
A data transfer instruction for transferring data from the first operating system to a hardware device managed by a second operating system different from the first operating system is issued to the first operating system. The data to be transferred by the data transfer instruction is a plurality of second data having a size smaller than the usable size of the shared memory shared and used by the first operating system and the second operating system. Writing means for dividing into one divided data and writing to the shared memory;
The first divided data is written by the writing means so that the first divided data written to the shared memory by the writing means is read by the second operating system and transferred to the hardware device. A first issuing means for generating a first divided data transfer command specifying the data size of the first divided data as a transfer size and issuing the first divided data transfer command to the second operating system each time data is written to the shared memory ,
When a data acquisition command for acquiring data from the hardware device is issued to the first operating system, data to be acquired by the data acquisition command in the second operating system is: It is divided into a plurality of second divided data having a size smaller than the usable size of the shared memory, and is read from the hardware device and written to the shared memory for each second divided data. Generating a second divided data transfer command designating the size of the second divided data as the transfer size, and reading the second divided data written in the first operating system so as to be read by the first operating system. A second issuing means for issuing to the system;
Transfer means for reading the second divided data written in the shared memory in response to the second divided data transfer command by the second operating system from the shared memory and transferring it to an issuer of the data acquisition instruction;
A data transfer control device.
前記第1発行手段は、前記第2オペレーティング・システム上で前記第1分割データ転送コマンドに応じたデータ転送動作を行うデバイスドライバの転送処理単位サイズの整数倍のサイズであって、前記共有メモリの使用可能なサイズよりも小さいサイズが転送サイズとして指定された第1分割データ転送コマンドを生成して前記第2オペレーティング・システムに対して発行し、
前記第2発行手段は、前記第2オペレーティング・システム上で前記第2分割データ転送コマンドに応じたデータ転送動作を行うデバイスドライバの転送処理単位サイズの整数倍のサイズであって、前記共有メモリの使用可能なサイズよりも小さいサイズが転送サイズとして指定された第2分割データ転送コマンドを生成して前記第2オペレーティング・システムに対して発行する
請求項6に記載のデータ転送制御装置。
The first issuing means has a size that is an integral multiple of a transfer processing unit size of a device driver that performs a data transfer operation according to the first divided data transfer command on the second operating system, and Generating a first divided data transfer command in which a size smaller than the usable size is designated as a transfer size, and issuing it to the second operating system;
The second issuing means has a size that is an integral multiple of a transfer processing unit size of a device driver that performs a data transfer operation according to the second divided data transfer command on the second operating system, and The data transfer control device according to claim 6, wherein a second divided data transfer command in which a size smaller than a usable size is designated as a transfer size is generated and issued to the second operating system.
前記取得対象のデータの前記共有メモリへの転送が終了した場合に、前記第2オペレーティング・システムに対して既に発行された未実行の前記第2分割データ転送コマンドによりデータの転送が実行されないように制御する制御手段と、
を更に備えた
請求項6又は請求項7に記載のデータ転送制御装置。
When transfer of the data to be acquired to the shared memory is completed, data transfer is not executed by the unexecuted second divided data transfer command that has already been issued to the second operating system. Control means for controlling;
The data transfer control device according to claim 6 or 7, further comprising:
前記第2オペレーティング・システム上で動作し、前記第1発行手段から発行された第1分割データ転送コマンド及び前記第2発行手段から発行された第2分割データ転送コマンドに応じてデータ転送動作を行うデバイスドライバを更に備えた
請求項6〜請求項8のいずれか1項記載のデータ転送制御装置。
It operates on the second operating system and performs a data transfer operation in response to a first divided data transfer command issued from the first issuing means and a second divided data transfer command issued from the second issuing means. The data transfer control device according to any one of claims 6 to 8, further comprising a device driver.
コンピュータを、
第1オペレーティング・システムから前記第1オペレーティング・システムとは異なる第2オペレーティング・システムで管理するハードウェア・デバイスへデータを転送するためのデータ転送命令が、前記第1オペレーティング・システムに対して発行された場合に、前記データ転送命令による転送対象のデータを、前記第1オペレーティング・システム及び前記第2オペレーティング・システムが共有して使用する共有メモリの使用可能なサイズよりも小さいサイズの複数個の分割データに分割して、前記共有メモリに書き込む書込手段、及び
前記書込手段で前記共有メモリに書き込まれた分割データが前記第2オペレーティング・システムにおいて読み出されて前記ハードウェア・デバイスに転送されるように、前記書込手段で前記分割データが前記共有メモリに書き込まれる毎に、前記分割データのデータサイズを転送サイズとして指定した分割データ転送コマンドを生成して前記第2オペレーティング・システムに対して発行する発行手段、
として機能させるためのプログラム。
Computer
A data transfer instruction for transferring data from the first operating system to a hardware device managed by a second operating system different from the first operating system is issued to the first operating system. The data to be transferred by the data transfer instruction is divided into a plurality of divisions having a size smaller than the usable size of the shared memory shared and used by the first operating system and the second operating system. Write means for dividing into data and writing to the shared memory, and the divided data written to the shared memory by the writing means is read by the second operating system and transferred to the hardware device So that the writing means Issuing means for generating a divided data transfer command specifying the data size of the divided data as a transfer size and issuing it to the second operating system each time the divided data is written to the shared memory;
Program to function as.
コンピュータを、
第1オペレーティング・システムとは異なる第2オペレーティング・システムで管理するハードウェア・デバイスからデータを取得するためのデータ取得命令が、前記第1オペレーティング・システムに対して発行された場合に、前記第2オペレーティング・システムにおいて前記データ取得命令による取得対象のデータが、前記第1オペレーティング・システム及び前記第2オペレーティング・システムが共有して使用する共有メモリの使用可能なサイズよりも小さいサイズの複数個の分割データに分割されて、該分割データ毎に前記ハードウェア・デバイスから読み出されて前記共有メモリに書き込まれるように、該分割データのサイズを転送サイズとして指定した分割データ転送コマンドを生成し、該書き込まれた分割データが前記第1オペレーティング・システムにおいて読み出されるように、前記第2オペレーティング・システムに対して発行する発行手段、及び
前記第2オペレーティング・システムにより前記分割データ転送コマンドに応じて前記共有メモリに書き込まれた分割データを前記共有メモリから読出して前記データ取得命令の発行元に転送する転送手段、
として機能させるためのプログラム。
Computer
When a data acquisition instruction for acquiring data from a hardware device managed by a second operating system different from the first operating system is issued to the first operating system, the second In the operating system, the data to be acquired by the data acquisition instruction is divided into a plurality of pieces having a size smaller than the usable size of the shared memory shared and used by the first operating system and the second operating system. A divided data transfer command that specifies the size of the divided data as a transfer size so that the divided data is read from the hardware device and written to the shared memory for each divided data; The divided data written is Issuing means for issuing to the second operating system so as to be read by the operating system; and the divided data written to the shared memory in response to the divided data transfer command by the second operating system Transfer means for reading from the shared memory and transferring to the issuer of the data acquisition instruction;
Program to function as.
コンピュータを、
第1オペレーティング・システムから前記第1オペレーティング・システムとは異なる第2オペレーティング・システムで管理するハードウェア・デバイスへデータを転送するためのデータ転送命令が、前記第1オペレーティング・システムに対して発行された場合に、前記データ転送命令による転送対象のデータを、前記第1オペレーティング・システム及び前記第2オペレーティング・システムが共有して使用する共有メモリの使用可能なサイズよりも小さいサイズの複数個の第1分割データに分割して、前記共有メモリに書き込む書込手段、
前記書込手段で前記共有メモリに書き込まれた第1分割データが前記第2オペレーティング・システムにおいて読み出されて前記ハードウェア・デバイスに転送されるように、前記書込手段で前記第1分割データが前記共有メモリに書き込まれる毎に、前記第1分割データのデータサイズを転送サイズとして指定した第1分割データ転送コマンドを生成して前記第2オペレーティング・システムに対して発行する第1発行手段、
前記ハードウェア・デバイスからデータを取得するためのデータ取得命令が、前記第1オペレーティング・システムに対して発行された場合に、前記第2オペレーティング・システムにおいて前記データ取得命令による取得対象のデータが、前記共有メモリの使用可能なサイズよりも小さいサイズの複数個の第2分割データに分割されて、該第2分割データ毎に前記ハードウェア・デバイスから読み出されて前記共有メモリに書き込まれるように、該第2分割データのサイズを転送サイズとして指定した第2分割データ転送コマンドを生成し、該書き込まれた第2分割データが前記第1オペレーティング・システムにおいて読み出されるように、前記第2オペレーティング・システムに対して発行する第2発行手段、及び
前記第2オペレーティング・システムにより前記第2分割データ転送コマンドに応じて前記共有メモリに書き込まれた第2分割データを前記共有メモリから読出して前記データ取得命令の発行元に転送する転送手段、
として機能させるためのプログラム。
Computer
A data transfer instruction for transferring data from the first operating system to a hardware device managed by a second operating system different from the first operating system is issued to the first operating system. The data to be transferred by the data transfer instruction is a plurality of second data having a size smaller than the usable size of the shared memory shared and used by the first operating system and the second operating system. Writing means for dividing into one divided data and writing to the shared memory;
The first divided data is written by the writing means so that the first divided data written to the shared memory by the writing means is read by the second operating system and transferred to the hardware device. First issuing means for generating a first divided data transfer command specifying the data size of the first divided data as a transfer size and issuing the first divided data transfer command to the second operating system each time
When a data acquisition command for acquiring data from the hardware device is issued to the first operating system, data to be acquired by the data acquisition command in the second operating system is: It is divided into a plurality of second divided data having a size smaller than the usable size of the shared memory, and is read from the hardware device and written to the shared memory for each second divided data. Generating a second divided data transfer command designating the size of the second divided data as the transfer size, and reading the second divided data written in the first operating system so as to be read by the first operating system. A second issuing means for issuing to the system, and the second operation Transfer means for reading the second divided data written in the shared memory in response to the second divided data transfer command from the shared memory and transferring it to the issuer of the data acquisition instruction,
Program to function as.
JP2011033835A 2011-02-18 2011-02-18 Data transfer control device and program Active JP5652242B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011033835A JP5652242B2 (en) 2011-02-18 2011-02-18 Data transfer control device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011033835A JP5652242B2 (en) 2011-02-18 2011-02-18 Data transfer control device and program

Publications (2)

Publication Number Publication Date
JP2012173884A true JP2012173884A (en) 2012-09-10
JP5652242B2 JP5652242B2 (en) 2015-01-14

Family

ID=46976755

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011033835A Active JP5652242B2 (en) 2011-02-18 2011-02-18 Data transfer control device and program

Country Status (1)

Country Link
JP (1) JP5652242B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015215684A (en) * 2014-05-08 2015-12-03 富士ゼロックス株式会社 Information processing apparatus and information processing program
JP7484633B2 (en) 2020-09-30 2024-05-16 株式会社デンソー Shared storage management device and shared storage management method
JP7501287B2 (en) 2020-09-30 2024-06-18 株式会社デンソー Shared storage management device and shared storage management method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11120156A (en) * 1997-10-17 1999-04-30 Nec Corp Data communication system in multiprocessor system
JP2006155377A (en) * 2004-11-30 2006-06-15 Fujitsu Ltd Data update system
JP2010165022A (en) * 2009-01-13 2010-07-29 Ricoh Co Ltd Inter-processor communication device, inter-processor communication method, program, and recording medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11120156A (en) * 1997-10-17 1999-04-30 Nec Corp Data communication system in multiprocessor system
JP2006155377A (en) * 2004-11-30 2006-06-15 Fujitsu Ltd Data update system
JP2010165022A (en) * 2009-01-13 2010-07-29 Ricoh Co Ltd Inter-processor communication device, inter-processor communication method, program, and recording medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015215684A (en) * 2014-05-08 2015-12-03 富士ゼロックス株式会社 Information processing apparatus and information processing program
JP7484633B2 (en) 2020-09-30 2024-05-16 株式会社デンソー Shared storage management device and shared storage management method
JP7501287B2 (en) 2020-09-30 2024-06-18 株式会社デンソー Shared storage management device and shared storage management method

Also Published As

Publication number Publication date
JP5652242B2 (en) 2015-01-14

Similar Documents

Publication Publication Date Title
JP4694270B2 (en) Image processing apparatus, method, and program
JP4694266B2 (en) Image processing apparatus, method, and program
TWI400652B (en) Dual operating system parallel processing methods, recording media and computer program products
JP5479519B2 (en) Image processing apparatus, method, and program
JP4694267B2 (en) Image processing apparatus, method, and program
JP4694268B2 (en) Image processing apparatus, method, and program
JP4694265B2 (en) Image processing apparatus, method, and program
JP4694264B2 (en) Image processing apparatus, method, and program
JP5414656B2 (en) Data storage device, memory control device, and memory control method
JP2008009697A (en) Image processor and program
JP4694269B2 (en) Image processing apparatus, method, and program
JP4619868B2 (en) Image processing apparatus, method, and program
JP5652242B2 (en) Data transfer control device and program
JP2011192130A (en) Control device, image forming apparatus, and control program
JP2008009803A (en) Information storage device, information transfer method, information transfer system, program and recording medium
US20080162763A1 (en) Interrupt mailbox in host memory
JP2011242946A (en) Image formation control program, image formation program, and data structure of image formation setting information
JP5091694B2 (en) Information processing system and information processing program
JP2015215684A (en) Information processing apparatus and information processing program
US20110022995A1 (en) Circuit design information generating equipment, function execution system, and memory medium storing program
US7558901B2 (en) Apparatus and method for connecting processor to bus
JP2010152645A (en) Simulation support program, simulation device, and simulation support method
JP2004288147A (en) Xip system to serial memory and its method
JP2016103112A (en) Data transfer control device, information processing device, and image forming apparatus
JP5440129B2 (en) Image processing apparatus, image forming apparatus, and image processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140121

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141010

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: 20141021

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20141103

R150 Certificate of patent or registration of utility model

Ref document number: 5652242

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350