JP5020121B2 - Information processing apparatus, image forming apparatus, and information processing method - Google Patents
Information processing apparatus, image forming apparatus, and information processing method Download PDFInfo
- Publication number
- JP5020121B2 JP5020121B2 JP2008040269A JP2008040269A JP5020121B2 JP 5020121 B2 JP5020121 B2 JP 5020121B2 JP 2008040269 A JP2008040269 A JP 2008040269A JP 2008040269 A JP2008040269 A JP 2008040269A JP 5020121 B2 JP5020121 B2 JP 5020121B2
- Authority
- JP
- Japan
- Prior art keywords
- resource
- virtual machine
- amount
- function
- information processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Description
本発明は、情報処理装置、画像形成装置および情報処理方法に関するものである。 The present invention relates to an information processing apparatus, an image forming apparatus, and an information processing method.
従来から、画像形成装置でプログラムが実行される際に使用されるリソースを適切に管理することが要求されている。リソースを適切に管理しないと、印刷処理などの途中でメモリ領域、ネットワークソケットなどのリソースが足りなくなり、処理がエラー終了することがある。 Conventionally, it is required to appropriately manage resources used when a program is executed in an image forming apparatus. If resources are not properly managed, resources such as memory areas and network sockets may be insufficient during printing processing, and processing may end in error.
また、最近では、画像形成装置の基本的な機能の他に、機能を拡張するための様々なアプリケーションを追加することが提案されており、リソース使用量が増大する傾向にあるため、リソース管理の重要性はさらに高まってきている。 Recently, in addition to the basic functions of the image forming apparatus, it has been proposed to add various applications for expanding the functions, and the resource usage tends to increase. Importance is increasing.
そのようなリソース管理を行う画像形成装置が提案されている(例えば、特許文献1,2参照)。 Image forming apparatuses that perform such resource management have been proposed (see, for example, Patent Documents 1 and 2).
さらに、オペレーティングシステム(以下、OSという)上で動作する仮想マシンが設けられ、仮想マシン上でアプリケーションを実行可能な画像形成装置が提案されている(例えば特許文献1参照)。特許文献1では、仮想マシンで使用されるリソース量を管理するリソース管理部がOS上に設けられている。つまり、このリソース管理部により仮想マシン上で使用されるリソース量が一定量以下に制限される。 Furthermore, there has been proposed an image forming apparatus provided with a virtual machine that operates on an operating system (hereinafter referred to as OS) and capable of executing an application on the virtual machine (see, for example, Patent Document 1). In Patent Document 1, a resource management unit that manages the amount of resources used in a virtual machine is provided on the OS. That is, the resource management unit limits the amount of resources used on the virtual machine to a certain amount or less.
上記の装置では、OS上でリソース管理部が動作するため、仮想マシンでの使用リソース量を管理するためには、仮想マシンから使用リソース量への通知が必要になる。このため、仮想マシンをカスタム化する必要があり、汎用の仮想マシンをそのまま使用することは困難である。 In the above apparatus, since the resource management unit operates on the OS, in order to manage the used resource amount in the virtual machine, it is necessary to notify the used resource amount from the virtual machine. For this reason, it is necessary to customize the virtual machine, and it is difficult to use a general-purpose virtual machine as it is.
本発明は、上記の問題に鑑みてなされたものであり、仮想マシンをカスタム化せずに、仮想マシン上で使用されるリソースの量を管理することができる情報処理装置、画像形成装置および情報処理方法を得ることを目的とする。 The present invention has been made in view of the above problems, and is an information processing apparatus, an image forming apparatus, and information capable of managing the amount of resources used on a virtual machine without customizing the virtual machine. The object is to obtain a processing method.
上記の課題を解決するために、本発明では以下のようにした。 In order to solve the above problems, the present invention is configured as follows.
本発明に係る情報処理装置は、演算処理装置で動作する仮想マシンと、仮想マシン上で動作し、仮想マシン上で動作するアプリケーションが使用するリソースの使用量を管理するリソース管理部と、仮想マシン上で実行されるリソース操作関数を含むリソース操作ライブラリと、仮想マシン上で動作し、アプリケーションにおいて使用されているクラスのオブジェクトをメモリに展開するとともに、クラスデータを解析し、オブジェクト内に記述されているリソース操作ライブラリにおけるリソース操作関数を、カスタム関数に置き換えるクラスローダとを備える。そして、カスタム関数が実行されると、カスタム関数の実行によるリソース使用量の変化量がリソース管理部に通知される。 An information processing apparatus according to the present invention includes a virtual machine that operates on an arithmetic processing unit, a resource management unit that manages the amount of resources used by an application that operates on the virtual machine and operates on the virtual machine, and a virtual machine The resource operation library that includes the resource operation function that is executed above, and the object of the class that operates on the virtual machine and is used in the application is expanded in the memory, and the class data is analyzed and described in the object. A class loader that replaces the resource operation function in the resource operation library with a custom function . When the custom function is executed, the resource management unit is notified of the amount of change in the resource usage due to the execution of the custom function.
これにより、リソース管理部が仮想マシン上で動作するため、仮想マシン自体は、汎用の仮想マシンを使用することができる。このため、仮想マシンをカスタム化せずに、仮想マシン上で使用されるリソースの量を管理することができる。ひいては、リソース管理のために必要となる開発規模を小さくすることができる。また、実行されるとリソース量が増加または減少するライブラリ関数が、リソース使用量の変化量を通知する関数へ置き換えられるため、リソース管理部は、アプリケーションが使用するライブラリ関数で使用/解放されるリソース量を考慮して、リソース量を管理することができる。 Thereby, since the resource management unit operates on the virtual machine, the general-purpose virtual machine can be used as the virtual machine itself. Therefore, the amount of resources used on the virtual machine can be managed without customizing the virtual machine. As a result, the development scale required for resource management can be reduced. In addition, since the library function that increases or decreases the resource amount when executed is replaced with a function that notifies the change amount of the resource usage, the resource management unit uses the resource that is used / released by the library function used by the application. The amount of resources can be managed in consideration of the amount.
また、本発明に係る情報処理装置は、上記の情報処理装置に加え、次のようにしてもよい。この場合、クラスローダは、メモリに展開するオブジェクトのメモリ使用量をリソース管理部に通知する。 In addition to the information processing apparatus described above, the information processing apparatus according to the present invention may be configured as follows. In this case, the class loader notifies the resource management unit of the memory usage amount of the object developed in the memory.
これにより、リソース管理部は、クラスローディングによるメモリ使用量に基づき、リソースとしてのメモリ領域を管理することができる。 As a result, the resource management unit can manage the memory area as a resource based on the memory usage by the class loading.
また、本発明に係る情報処理装置は、上記の情報処理装置のいずれかに加え、次のようにしてもよい。この場合、クラスローダは、使用可能なメモリ領域がオブジェクトの展開に必要なメモリ領域より少ない場合には、オブジェクトの展開を禁止する。 An information processing apparatus according to the present invention may be as follows in addition to any of the information processing apparatuses described above. In this case, the class loader prohibits the object expansion when the usable memory area is smaller than the memory area necessary for the object expansion.
これにより、クラスローディングによりメモリ領域が使用される際に、仮想マシン上で使用しているメモリ使用量が、メモリ領域の容量上限値を超えることを防止することができる。 As a result, when the memory area is used by class loading, it is possible to prevent the amount of memory used on the virtual machine from exceeding the upper limit of the capacity of the memory area.
また、本発明に係る情報処理装置は、上記の情報処理装置のいずれかに加え、次のようにしてもよい。この場合、オブジェクトが解放される場合、オブジェクトの解放によるリソース使用量の減少量がリソース管理部に通知される。 An information processing apparatus according to the present invention may be as follows in addition to any of the information processing apparatuses described above. In this case, when the object is released, the resource management unit is notified of a decrease in the resource usage due to the release of the object.
これにより、リソース管理部は、オブジェクト解放を考慮して、リソースとしてのメモリ領域を管理することができる。 Thereby, the resource management unit can manage the memory area as the resource in consideration of the object release.
また、本発明に係る情報処理装置は、上記の情報処理装置のいずれかに加え、次のようにしてもよい。この場合、カスタム関数が実行されると、カスタム関数の実行によるリソース使用量の変化量がリソース管理部に通知されるとともに、そのカスタム関数に置き換えられたリソース操作関数が呼び出され実行される。 An information processing apparatus according to the present invention may be as follows in addition to any of the information processing apparatuses described above. In this case, when the custom function is executed, the resource management unit is notified of the amount of change in the resource usage due to the execution of the custom function, and the resource operation function replaced with the custom function is called and executed.
これにより、カスタム関数自体には、リソース使用量の変化量を通知する処理のみを実行すればよいため、カスタム関数の開発が簡単になる。 This makes it easy to develop a custom function because only the process for notifying the amount of change in resource usage needs to be executed for the custom function itself.
また、本発明に係る情報処理装置は、上記の情報処理装置のいずれかに加え、次のようにしてもよい。この場合、カスタム関数が実行されると、使用可能なリソース量が、カスタム関数が使用するリソース量より少ない場合には、リソース操作関数の実行が禁止される。 An information processing apparatus according to the present invention may be as follows in addition to any of the information processing apparatuses described above. In this case, when the custom function is executed, the execution of the resource operation function is prohibited if the amount of available resources is smaller than the amount of resources used by the custom function.
これにより、ライブラリ関数が実行される際に、仮想マシン上で使用しているリソース量が、リソース量の上限値を超えることを防止することができる。 Thereby, when the library function is executed, the resource amount used on the virtual machine can be prevented from exceeding the upper limit value of the resource amount.
また、本発明に係る情報処理装置は、上記の情報処理装置のいずれかに加え、次のようにしてもよい。この場合、リソース管理部は、リソース使用量の変化量の通知に応じて、各時点での使用リソース量または使用可能なリソース量の情報を保持する。 An information processing apparatus according to the present invention may be as follows in addition to any of the information processing apparatuses described above. In this case, the resource management unit holds information on the used resource amount or the available resource amount at each time point in response to the notification of the change amount of the resource usage amount.
また、本発明に係る情報処理装置は、上記の情報処理装置のいずれかに加え、次のようにしてもよい。この場合、リソースは、所定量のメモリ領域、所定数のネットワークソケットおよび所定数のスレッドのうちの少なくとも1つを含むものとされる。 An information processing apparatus according to the present invention may be as follows in addition to any of the information processing apparatuses described above. In this case, the resource includes at least one of a predetermined amount of memory area, a predetermined number of network sockets, and a predetermined number of threads.
また、本発明に係る情報処理装置は、上記の情報処理装置のいずれかに加え、次のようにしてもよい。この場合、仮想マシンは、Java仮想マシンとされる。 An information processing apparatus according to the present invention may be as follows in addition to any of the information processing apparatuses described above. In this case, the virtual machine is a Java virtual machine.
これにより、仮想マシンとして、汎用のJava仮想マシンを使用することができるため、リソース管理のために必要となる開発規模を小さくすることができる。 Thereby, since a general-purpose Java virtual machine can be used as a virtual machine, the development scale required for resource management can be reduced.
また、本発明に係る情報処理装置は、上記の情報処理装置のいずれかに加え、次のようにしてもよい。この場合、仮想マシンは、演算処理装置で動作するオペレーティングシステム上で動作する。 An information processing apparatus according to the present invention may be as follows in addition to any of the information processing apparatuses described above. In this case, the virtual machine operates on an operating system that operates on the arithmetic processing unit.
本発明に係る画像形成装置は、画像形成処理を行う画像形成処理部と、演算処理装置で動作する仮想マシンと、仮想マシン上で動作し画像形成処理部を使用するアプリケーションと、仮想マシン上で動作し、アプリケーションが使用するリソースの使用量を管理するリソース管理部と、仮想マシン上で実行されるリソース操作関数を含むリソース操作ライブラリと、仮想マシン上で動作し、アプリケーションにおいて使用されているクラスのオブジェクトをメモリに展開するとともに、クラスデータを解析し、オブジェクト内に記述されているリソース操作ライブラリにおけるリソース操作関数を、カスタム関数に置き換えるクラスローダとを備える。そして、カスタム関数が実行されると、カスタム関数の実行によるリソース使用量の変化量がリソース管理部に通知される。 An image forming apparatus according to the present invention includes an image forming processing unit that performs image forming processing, a virtual machine that operates on an arithmetic processing device, an application that operates on the virtual machine and uses the image forming processing unit, and a virtual machine A resource management unit that manages the usage of resources that operate and are used by applications , a resource operation library that includes resource operation functions that are executed on virtual machines, and classes that operate on virtual machines and are used in applications And a class loader that analyzes the class data and replaces the resource operation function in the resource operation library described in the object with a custom function . When the custom function is executed, the resource management unit is notified of the amount of change in the resource usage due to the execution of the custom function.
これにより、リソース管理部が仮想マシン上で動作するため、仮想マシン自体は、汎用の仮想マシンを使用することができる。このため、仮想マシンをカスタム化せずに、仮想マシン上で使用されるリソースの量を管理することができる。 Thereby, since the resource management unit operates on the virtual machine, the general-purpose virtual machine can be used as the virtual machine itself. Therefore, the amount of resources used on the virtual machine can be managed without customizing the virtual machine.
本発明に係る情報処理方法は、演算処理装置で仮想マシンを動作させ、仮想マシン上で動作するアプリケーションが使用するリソースの使用量を管理するリソース管理部を仮想マシン上で動作させ、仮想マシン上で動作するクラスローダで、アプリケーションにおいて使用されているクラスのオブジェクトをメモリに展開するとともに、クラスデータを解析し、オブジェクト内に記述されている、仮想マシン上で実行されるリソース操作ライブラリにおけるリソース操作関数を、カスタム関数に置き換え、カスタム関数が実行されると、カスタム関数の実行によるリソース使用量の変化量をリソース管理部に通知するものである。 An information processing method according to the present invention operates a virtual machine on an arithmetic processing unit, operates a resource management unit that manages the amount of resources used by an application operating on the virtual machine on the virtual machine, In the class loader that operates in, the object of the class used in the application is expanded in the memory, the class data is analyzed, and the resource operation in the resource operation library executed in the virtual machine described in the object When the function is replaced with a custom function and the custom function is executed, the resource management unit is notified of the amount of change in the resource usage due to the execution of the custom function .
これにより、リソース管理部が仮想マシン上で動作するため、仮想マシン自体は、汎用の仮想マシンを使用することができる。このため、仮想マシンをカスタム化せずに、仮想マシン上で使用されるリソースの量を管理することができる。 Thereby, since the resource management unit operates on the virtual machine, the general-purpose virtual machine can be used as the virtual machine itself. Therefore, the amount of resources used on the virtual machine can be managed without customizing the virtual machine.
本発明によれば、仮想マシンをカスタム化せずに、仮想マシン上で使用されるリソースの量を管理することができる。 According to the present invention, the amount of resources used on a virtual machine can be managed without customizing the virtual machine.
以下、図に基づいて本発明の実施の形態を説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
図1は、本発明の実施の形態に係る画像形成装置の構成を示すブロック図である。図1に示す画像形成装置は、情報処理装置の一例である。 FIG. 1 is a block diagram showing a configuration of an image forming apparatus according to an embodiment of the present invention. The image forming apparatus illustrated in FIG. 1 is an example of an information processing apparatus.
図1において、CPU11は、プログラムを実行し、プログラムに記述された処理を実行する演算処理装置である。また、ROM12は、プログラムおよびデータを予め記憶した不揮発性のメモリである。また、RAM13は、プログラムを実行する際にそのプログラムおよびデータを一時的に記憶するメモリである。
In FIG. 1, a
HDD14は、各種プログラム、データなどを格納する記録媒体としてのハードディスク駆動装置である。HDD14には、OSプログラム31、VMプログラム32、基本リソース操作ライブラリ33、カスタムリソース操作ライブラリ34、アプリケーション管理プログラム35、リソース管理プログラム36、基本機能プログラム37、およびアプリケーションプログラム38が格納されている。
The HDD 14 is a hard disk drive as a recording medium that stores various programs, data, and the like. The HDD 14 stores an
OSプログラム31は、オペレーティングシステムのプログラムである。オペレーティングシステムとしては、Linux(登録商標)、VxWorksなどが使用される。
The
VMプログラム32は、仮想マシンのプログラムである。仮想マシンとしては、この実施の形態では、Java(登録商標)仮想マシンが使用される。Java(登録商標)仮想マシン環境では、バイトコードと呼ばれる中間コードで記述されたプログラムが仮想マシンにより解釈され実行される。
The
基本リソース操作ライブラリ33は、リソースを使用したり解放したりする処理を記述されたライブラリ関数(以下、リソース操作関数という)を有するプログラムである。リソースとしては、所定量のメモリ領域、所定数のネットワークソケット、所定数のスレッドなどが考えられる。
The basic
カスタムリソース操作ライブラリ34は、基本リソース操作ライブラリ33の各リソース操作関数に対応するライブラリ関数(以下、カスタム関数という)を有するプログラムである。カスタム関数には、対応するリソース操作関数を呼び出す処理、およびカスタム関数(呼び出すリソース操作関数を含む)により使用または解放されるリソース量(つまり、空きリソースの変化量)を通知する処理が記述される。
The custom
アプリケーション管理プログラム35は、アプリケーションプログラム38をロードしてアプリケーションを起動する処理が記述されたプログラムである。アプリケーション管理プログラム35には、クラスローダプログラムが含まれる。
The
リソース管理プログラム36は、仮想マシン上で使用されるリソース量を管理する処理が記述されたプログラムである。
The
基本機能プログラム37は、印刷、コピー、ファクシミリ送信、ファクシミリ受信などの画像形成処理が記述されたプログラムである。
The
アプリケーションプログラム38は、基本機能プログラムによる画像形成処理を使用するアプリケーションのプログラムである。
The
なお、ライブラリ33,34およびプログラム35〜38は、仮想マシン上で動作するプログラムである。
The
図2は、図1に示すライブラリ33,34およびプログラム35〜38により実現される処理部を階層的に示す図である。
FIG. 2 is a diagram hierarchically showing processing units realized by the
図2において、OS51は、CPU11によりOSプログラム31が実行されることで実現される処理部である。
In FIG. 2, an
また、VM52は、CPU11によりVMプログラム32が実行されることで実現される処理部である。VM52は、OS51上で動作する仮想マシンである。
The
また、基本リソース操作処理部53は、CPU11により基本リソース操作ライブラリ33の1または複数のライブラリ関数(つまり、リソース操作関数)が実行されることで実現される処理部である。
The basic resource
また、カスタムリソース操作処理部54は、CPU11によりカスタムリソース操作ライブラリ34の1または複数のライブラリ関数(つまり、カスタム操作関数)が実行されることで実現される処理部である。カスタム関数が実行されると、カスタム関数の実行によるリソース量の変化量がリソース管理部56に通知される。カスタム関数が実行されると、使用可能なリソース量が、カスタム関数が使用するリソース量より少ない場合には、リソース操作関数の実行が禁止される。つまり、カスタムリソース操作処理部54は、使用可能なリソース量が、カスタム関数が使用するリソース量より少ない場合には、リソース操作関数の実行を禁止し、カスタム関数の実行によるリソース量の変化量をリソース管理部56に通知する。なお、リソース操作関数の実行が禁止される場合には、使用リソース量は増減しないため、リソース管理部56への通知は行われない。
The custom resource
また、アプリケーション管理部55は、CPU11によりアプリケーション管理プログラム35が実行されることで実現される処理部である。アプリケーション管理部55は、カスタムクラスローダ61を有する。
The
カスタムクラスローダ61は、アプリケーション58において使用されているクラスのオブジェクトをRAM13に展開する処理部である。さらに、カスタムクラスローダ61は、そのオブジェクトのメモリ使用量をリソース管理部56に通知する。また、カスタムクラスローダ61は、使用可能なメモリ領域がオブジェクトの展開に必要なメモリ領域より少ない場合には、オブジェクトの展開を禁止する。なお、オブジェクトの展開が禁止された場合、メモリ使用量は増加しないため、リソース管理部56への通知は行われない。
The
また、カスタムクラスローダ61は、アプリケーション58において使用されているクラスのクラスデータを取得して解析し、オブジェクト内に記述されているリソース操作ライブラリにおけるリソース操作関数を、カスタム関数に置き換える。
Further, the
また、リソース管理部56は、CPU11によりリソース管理プログラム36が実行されることで実現される処理部である。リソース管理部56は、VM52上で動作するアプリケーション58が使用するリソースの使用量を管理する処理部である。リソース管理部56は、使用しているリソース量の変化量の通知に応じて、各時点での使用リソース量または使用可能なリソース量の情報を保持するリソース監視部と、リソースの残存量を測定し、リソース残存量の問い合わせに応答するリソース測定部とを有する。
The
また、基本機能処理部57は、CPU11により基本機能プログラム37が実行されることで実現される処理部である。基本機能処理部57は、VM52に依存せず、OS51上で動作し、画像形成処理に必要なデータ処理を実行するとともに、通信装置16、印刷装置17および読取装置18を制御する。
The basic
また、アプリケーション58は、CPU11によりアプリケーションプログラム38が実行されることで実現される処理部である。アプリケーション58は、基本機能処理部57の機能を使用した複雑なアプリケーション処理を実行する。
The
処理部53,54,57、管理部55,56およびアプリケーション58は、それぞれ、VM52上で動作する。VM52がJava(登録商標)仮想マシンである場合、処理部53,54,57、管理部55,56およびアプリケーション58のプログラムは、それぞれ、バイトコードで記述され、Java仮想マシンで解釈された上でCPU11により実行される。
The
また、図1において、操作パネル15は、入力装置と表示装置を有する。入力装置は、ユーザによる操作を検出し、操作に応じた電気信号を出力する装置である。入力装置としては、例えばタッチパネル、キーなどが使用される。表示装置は、画像データに対応する画像信号を生成し表示する装置である。表示装置としては、液晶ディスプレイなどが使用される。
In FIG. 1, the
また、通信装置16は、コンピュータネットワークおよび/または電話回線に接続され、基本機能処理部57により制御され、外部から印刷、ファクシミリ送信などのジョブを受信したり、外部へのファクシミリ送信を実行したりする装置である。通信装置16としては、ネットワークインタフェースカード、モデムなどが使用される。
The
また、印刷装置17は、基本機能処理部57により制御され印刷データに基づき所定の媒体への印刷を行う装置である。
The
また、読取装置18は、基本機能処理部57により制御され所定の媒体から光学的に画像を読み取り画像データとして出力する装置である。
The
これらの装置16,17,18により、印刷、コピー、ファクシミリ送信、ファクシミリ受信などの画像形成処理が実現される。
These
次に、上記装置の動作について説明する。 Next, the operation of the above apparatus will be described.
VM52がJava(登録商標)仮想マシンとされる場合、VM52で実行されるプログラムは、クラス単位で定義されている。そして、プログラムの実行時には、クラスのインスタンスであるオブジェクトがRAM13に展開される。オブジェクトはバイトコードで記述される。そして、オブジェクトの内容が順番にVM52により解釈されて、プログラムに記述されている処理が順番に実行される。このとき、処理によっては、リソースを確保したり、解放したりすることがある。
When the
以下、(a)クラスローディング、(b)オブジェクトの実行、(c)オブジェクトの解放の順番で、本実施の形態におけるリソース管理について説明する。 Hereinafter, resource management in this embodiment will be described in the order of (a) class loading, (b) object execution, and (c) object release.
まず、クラスローディングにおけるリソース管理処理について説明する。図3は、図2におけるカスタムクラスローダ61の動作を説明するフローチャートである。
First, resource management processing in class loading will be described. FIG. 3 is a flowchart for explaining the operation of the
クラスローダ61は、対象のクラスデータを、アプリケーションプログラム38、ライブラリ33などから取得する(ステップS1)。アプリケーションプログラム38、ライブラリ33などは、ファイルとしてHDD14に格納されていてもよいし、外部サーバに格納されていてもよい。外部サーバからクラスデータを取得する場合には、クラスローダ61は、通信装置16により外部サーバにアクセスし、クラスデータをダウンロードする。
The
クラスローダ61は、クラスデータを取得すると、クラスデータの先頭から順番に1ラインずつコードを読み込み(ステップS2)、そのコード内に基本リソース操作ライブラリ33のリソース操作関数の呼出が存在するか否かを判定する(ステップS3)。
When the
そのコードにリソース操作関数の呼出が存在する場合、クラスローダ61は、そのリソース操作関数の呼出を、そのリソース操作関数に対応するカスタム関数の呼出に置き換えた後(ステップS4)、そのコードを解釈する(ステップS5)。
If a call to a resource operation function exists in the code, the
一方、そのコードにリソース操作関数の呼出が存在しない場合、クラスローダ61は、そのコードをそのまま解釈する(ステップS5)。
On the other hand, if there is no call for a resource operation function in the code, the
そして、クラスローダ61は、クラスデータにおけるコードをすべて解釈したか否かを判定する(ステップS6)。解釈していないコードがある場合には、クラスローダ61は、次のコードを読み込み(ステップS2)、そのコードについてステップS3からステップS5までの処理を同様に実行する。
Then, the
このようにして、クラスデータにおけるすべてのコードの解釈が完了すると、クラスローダ61は、すべてのコードの解釈結果に基づきRAM13に展開されるオブジェクトのサイズを計算し(ステップS7)、リソース管理部56に通知する(ステップS8)。
When the interpretation of all codes in the class data is completed in this way, the
そして、クラスローダ61は、すべてのコードの解釈結果に基づきそのクラスに対応するオブジェクトをRAM13に展開する(ステップS9)。
Then, the
なお、ステップS8でリソース管理部56にメモリ使用量の増加を通知する前に、クラスローダ61は、RAM13に確保されているリソースとしてのメモリ領域において、増加分以上の空き領域があるか否かをリソース管理部56に問い合わせ、十分な空き領域がある場合のみ、ステップS8およびステップS9の処理を実行するようにしてもよい。十分な空き領域がない場合には、エラー処理が実行され、ステップS8およびステップS9の処理は実行されない。
Note that before notifying the
このようにして、クラスローディング時には、オブジェクト展開による所定のメモリ領域における使用量が考慮されて、リソース管理が行われる。 In this way, at the time of class loading, resource management is performed in consideration of the usage amount in a predetermined memory area by object expansion.
次に、オブジェクト実行時のリソース管理処理について説明する。図4は、実施の形態におけるカスタム関数実行時の処理について説明するフローチャートである。 Next, resource management processing during object execution will be described. FIG. 4 is a flowchart for explaining processing at the time of executing a custom function in the embodiment.
オブジェクト実行時に、クラスローダ61により置き換えられたカスタム関数が呼び出されると、まず、そのカスタム関数で使用されるリソースが、そのカスタム関数で使用される量だけ確保可能か否かが判定される(ステップS21)。このとき、リソース管理部56に、そのリソースについての残存量が問い合わせられ、それに対する応答、およびカスタム関数で記述されている使用リソース量に基づき、判定が行われる。
When the custom function replaced by the
そのカスタム関数で使用されるリソースが、そのカスタム関数で使用される量だけ確保可能であると判定された場合、カスタム関数の実行で増加するリソース使用量がリソース管理部56に通知され(ステップS22)、そのカスタム関数に対応するリソース操作関数が呼び出される(ステップS23)。
If it is determined that the resources used in the custom function can be secured by the amount used in the custom function, the
一方、そのカスタム関数で使用されるリソースが、そのカスタム関数で使用される量だけ確保可能ではないと判定された場合、リソース操作関数は呼び出されず、エラー処理が実行される(ステップS24)。 On the other hand, if it is determined that the resources used in the custom function cannot be secured by the amount used in the custom function, the resource operation function is not called and error processing is executed (step S24).
なお、リソースを解放するリソース操作関数がカスタム関数で呼び出される場合には、カスタム関数の実行で減少するリソース使用量がリソース管理部56に通知され、そのカスタム関数に対応するリソース操作関数が呼び出される。
When a resource operation function that releases resources is called by a custom function, the
このようにして、オブジェクト実行時には、リソース操作を行う関数の呼び出しによるリソース使用量の増減が考慮されて、リソース管理が行われる。 In this way, at the time of object execution, resource management is performed in consideration of increase / decrease in resource usage due to calling a function that performs resource operations.
次に、オブジェクト解放時のリソース管理処理について説明する。図5は、実施の形態におけるオブジェクト解放時の処理について説明するフローチャートである。 Next, resource management processing at the time of object release will be described. FIG. 5 is a flowchart for explaining processing at the time of object release in the embodiment.
クラスローディングにより展開されたオブジェクトは、オブジェクトを解放するリソース操作関数の呼出、またはガベージコレクタによるガベージコレクションにより解放される。オブジェクトが解放されると、そのオブジェクトにおいて使用されていたリソースも解放される。なお、オブジェクトを解放するリソース操作関数の呼出は、クラスローダ61により、対応するカスタム関数の呼び出しに置き換えられる。
An object expanded by class loading is released by calling a resource operation function for releasing the object or by garbage collection by a garbage collector. When an object is released, the resources used by that object are also released. Note that the call of the resource operation function for releasing the object is replaced by the call of the corresponding custom function by the
そして、オブジェクトを解放するカスタム関数の呼び出し、またはガベージコレクションが発生すると、解放されるリソース量、つまりリソース使用量の減少分がリソース管理部56に通知され(ステップS41)、リソース操作関数を呼び出すことでリソースが解放される(ステップS42)。
When a custom function that releases an object or garbage collection occurs, the
このようにして、オブジェクト解放時には、解放されるリソース量に基づく、リソース使用量の減少が考慮されて、リソース管理が行われる。 In this way, when an object is released, resource management is performed in consideration of a decrease in resource usage based on the released resource amount.
以上のように、上記実施の形態によれば、リソース管理部56は、VM52上で動作し、VM52上で動作するアプリケーション58が使用するリソースの使用量を管理する。これにより、リソース管理部56が仮想マシン上で動作するため、仮想マシン自体は、汎用の仮想マシンを使用することができる。このため、仮想マシンをカスタム化せずに、仮想マシン上で使用されるリソースの量を管理することができる。ひいては、リソース管理のために必要となる開発規模を小さくすることができる。また、リソース管理部56は、VM52上で動作するため、OS51に依存せずに済む。つまり、同一種類のVM52が実装されていれば、OS51の種類に関係なく、同一のリソース管理部56を使用することができる。
As described above, according to the above-described embodiment, the
また、上記実施の形態によれば、クラスローダ61は、VM52上で動作し、RAM13に展開するオブジェクトのメモリ使用量をリソース管理部56に通知する。これにより、リソース管理部56は、クラスローディングによるメモリ使用量に基づき、リソースとしてのメモリ領域を管理することができる。また、クラスローダ61は、使用可能なメモリ領域がオブジェクトの展開に必要なメモリ領域より少ない場合には、オブジェクトの展開を禁止するようにしてもよい。これにより、クラスローディングによりメモリ領域が使用される際に、仮想マシン上で使用しているメモリ使用量が、メモリ領域の容量上限値を超えることを防止することができる。
Further, according to the above embodiment, the
また、上記実施の形態によれば、オブジェクトが解放される場合、オブジェクトの解放によるリソース使用量の減少量がリソース管理部56に通知される。これにより、リソース管理部56は、オブジェクト解放を考慮して、リソースとしてのメモリ領域を管理することができる。
Further, according to the above embodiment, when an object is released, the
また、上記実施の形態によれば、クラスローダ61は、クラスデータを解析し、オブジェクト内に記述されている基本リソース操作ライブラリ33におけるリソース操作関数を、カスタム関数に置き換える。そして、カスタム関数がVM52上で実行されると、カスタム関数の実行によるリソース使用量の変化量がリソース管理部56に通知される。これにより、実行されるとリソース量が増加または減少するライブラリ関数が、リソース量の変化量を通知する関数へ置き換えられるため、リソース管理部56は、アプリケーションが使用するライブラリ関数で使用/解放されるリソース量を考慮して、リソース量を管理することができる。
Further, according to the above embodiment, the
上述のように、リソース管理に関連する処理部(リソース管理部56、カスタムリソース操作処理部54およびクラスローダ61)は、すべてVM52上で動作するため、OS51に依存せずに済む。つまり、同一種類のVM52が実装されていれば、OS51の種類に関係なく、これらを使用することができる。
As described above, the processing units (
なお、上述の実施の形態は、本発明の好適な例であるが、本発明は、これらに限定されるものではなく、本発明の要旨を逸脱しない範囲において、種々の変形、変更が可能である。 The above-described embodiments are preferred examples of the present invention, but the present invention is not limited to these, and various modifications and changes can be made without departing from the scope of the present invention. is there.
例えば、上記実施の形態では、情報処理装置の一例として画像形成装置を挙げているが、画像形成装置以外の組み込み装置にも適用可能である。 For example, in the above embodiment, an image forming apparatus is cited as an example of an information processing apparatus, but the present invention can also be applied to an embedded apparatus other than the image forming apparatus.
また、上記実施の形態において、VM52として、Java仮想マシンの代わりに、他の仮想実行環境を使用してもよい。
In the above embodiment, another virtual execution environment may be used as the
また、上記実施の形態において、図1および図2では、アプリケーションプログラム38およびアプリケーション58は、1つのみを示しているが、それらは複数でもよい。
Moreover, in the said embodiment, although only one
また、上記の実施の形態では、クラスローダ61によりクラスローディング時にリソース操作関数がカスタム関数に置き換えられているが、事前にアプリケーションプログラム38においてリソース操作関数の代わりにカスタム関数が記述されるようにしてもよい。
In the above embodiment, the resource operation function is replaced with a custom function at the time of class loading by the
また、上記の実施の形態において、リソース使用量の上限値は、機能ごと、アプリケーション58ごとなど、複数の条件のそれぞれに対して異なるように設定してもよい。また、予め設定されるリソース使用量の上限値に対する所定の割合に到達したらリソースを新たに確保できないようにしてもよい。
Further, in the above embodiment, the upper limit value of the resource usage may be set to be different for each of a plurality of conditions such as for each function and for each
本発明は、例えば、仮想マシンを備えている組み込み装置に適用可能である。 The present invention can be applied to, for example, an embedded device including a virtual machine.
11 CPU(演算処理装置)
13 RAM(メモリ)
33 基本リソース操作ライブラリ(リソース操作ライブラリ)
51 オペレーティングシステム
52 VM(仮想マシン)
56 リソース管理部
57 基本機能処理部(画像形成処理部)
58 アプリケーション
61 カスタムクラスローダ(クラスローダ)
11 CPU (arithmetic processing unit)
13 RAM (memory)
33 Basic resource operation library (resource operation library)
51
56
58
Claims (12)
前記仮想マシン上で動作し、前記仮想マシン上で動作するアプリケーションが使用するリソースの使用量を管理するリソース管理部と、
前記仮想マシン上で実行されるリソース操作関数を含むリソース操作ライブラリと、
前記仮想マシン上で動作し、前記アプリケーションにおいて使用されているクラスのオブジェクトをメモリに展開するとともに、クラスデータを解析し、前記オブジェクト内に記述されている前記リソース操作ライブラリにおけるリソース操作関数を、カスタム関数に置き換えるクラスローダとを備え、
前記カスタム関数が実行されると、前記カスタム関数の実行によるリソース使用量の変化量が前記リソース管理部に通知されること、
を特徴とする情報処理装置。 A virtual machine that runs on an arithmetic processing unit;
A resource management unit that operates on the virtual machine and manages the amount of resources used by an application that operates on the virtual machine;
A resource operation library including a resource operation function executed on the virtual machine;
An object of a class that operates on the virtual machine and is used in the application is expanded in a memory, class data is analyzed, and a resource operation function in the resource operation library described in the object is customized. A class loader that replaces functions,
When the custom function is executed, a change amount of the resource usage due to the execution of the custom function is notified to the resource management unit,
An information processing apparatus characterized by the above.
を特徴とする請求項1記載の情報処理装置。 The class loader notifies the resource management unit of memory usage of an object to be expanded in the memory;
The information processing apparatus according to claim 1.
演算処理装置で動作する仮想マシンと、
前記仮想マシン上で動作し前記画像形成処理部を使用するアプリケーションと、
前記仮想マシン上で動作し、前記アプリケーションが使用するリソースの使用量を管理するリソース管理部と、
前記仮想マシン上で実行されるリソース操作関数を含むリソース操作ライブラリと、
前記仮想マシン上で動作し、前記アプリケーションにおいて使用されているクラスのオブジェクトをメモリに展開するとともに、クラスデータを解析し、前記オブジェクト内に記述されている前記リソース操作ライブラリにおけるリソース操作関数を、カスタム関数に置き換えるクラスローダとを備え、
前記カスタム関数が実行されると、前記カスタム関数の実行によるリソース使用量の変化量が前記リソース管理部に通知されること、
を特徴とする画像形成装置。 An image formation processing unit for performing image formation processing;
A virtual machine that runs on an arithmetic processing unit;
An application that operates on the virtual machine and uses the image forming processing unit;
A resource management unit that operates on the virtual machine and manages the amount of resources used by the application;
A resource operation library including a resource operation function executed on the virtual machine;
An object of a class that operates on the virtual machine and is used in the application is expanded in a memory, class data is analyzed, and a resource operation function in the resource operation library described in the object is customized. A class loader that replaces functions,
When the custom function is executed, a change amount of the resource usage due to the execution of the custom function is notified to the resource management unit,
An image forming apparatus.
前記仮想マシン上で動作するアプリケーションが使用するリソースの使用量を管理するリソース管理部を前記仮想マシン上で動作させ、
前記仮想マシン上で動作するクラスローダで、前記アプリケーションにおいて使用されているクラスのオブジェクトをメモリに展開するとともに、クラスデータを解析し、前記オブジェクト内に記述されている、前記仮想マシン上で実行されるリソース操作ライブラリにおけるリソース操作関数を、カスタム関数に置き換え、
前記カスタム関数が実行されると、前記カスタム関数の実行によるリソース使用量の変化量を前記リソース管理部に通知する、
ことを特徴とする情報処理方法。 Operate the virtual machine with the processing unit,
A resource management unit that manages the amount of resources used by an application that operates on the virtual machine is operated on the virtual machine ,
A class loader operating on the virtual machine, which expands an object of a class used in the application to a memory, analyzes class data, and is executed on the virtual machine described in the object Replace the resource operation function in the resource operation library with a custom function.
When the custom function is executed, the resource management unit is notified of a change amount of the resource usage due to the execution of the custom function.
An information processing method characterized by the above.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008040269A JP5020121B2 (en) | 2008-02-21 | 2008-02-21 | Information processing apparatus, image forming apparatus, and information processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2008040269A JP5020121B2 (en) | 2008-02-21 | 2008-02-21 | Information processing apparatus, image forming apparatus, and information processing method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2009199334A JP2009199334A (en) | 2009-09-03 |
| JP5020121B2 true JP5020121B2 (en) | 2012-09-05 |
Family
ID=41142764
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2008040269A Expired - Fee Related JP5020121B2 (en) | 2008-02-21 | 2008-02-21 | Information processing apparatus, image forming apparatus, and information processing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5020121B2 (en) |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040215444A1 (en) * | 2002-03-25 | 2004-10-28 | Patel Mukesh K. | Hardware-translator-based custom method invocation system and method |
| JP2003323405A (en) * | 2002-05-02 | 2003-11-14 | Itmanage Inc | Application server monitoring system |
| JP2004312711A (en) * | 2003-03-25 | 2004-11-04 | Ricoh Co Ltd | Image forming apparatus and method for operating image forming apparatus by remote application |
| JP4215037B2 (en) * | 2004-12-27 | 2009-01-28 | セイコーエプソン株式会社 | Resource management system, printer, printer network card, resource management program, and resource management method |
-
2008
- 2008-02-21 JP JP2008040269A patent/JP5020121B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2009199334A (en) | 2009-09-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9542228B2 (en) | Image processing apparatus, control method thereof and storage medium | |
| JP2014170515A (en) | Device, information storage program, and information storage method | |
| US20130139075A1 (en) | Image forming device having a plurality of platforms and method for performing application thereof | |
| EP3789867A1 (en) | Application and information processing apparatus | |
| US20100332914A1 (en) | Dump output control apparatus and dump output control method | |
| JP5782055B2 (en) | Image forming apparatus | |
| CN109660688B (en) | Information processing apparatus and control method thereof | |
| JP5381059B2 (en) | Device, log recording control method, and program | |
| US8719705B2 (en) | Apparatus and method of controlling information processing apparatus, and recording medium storing controlling program | |
| JP5020121B2 (en) | Information processing apparatus, image forming apparatus, and information processing method | |
| US8261288B2 (en) | Application platform | |
| JP6179200B2 (en) | Information processing apparatus, device, information processing system, information processing method, and information processing program | |
| JP2013149026A (en) | Information processing apparatus, control method, and program thereof | |
| US11397603B2 (en) | Information processing apparatus, control method therefor, and program | |
| JP2015197845A (en) | Information processing apparatus, control method therefor, and program | |
| JP6078515B2 (en) | Electronic equipment and programs | |
| JP2011197827A (en) | Information processor, information processing method, and information processing program | |
| US11146707B2 (en) | Method for installing application by image formation device, and image formation device using same method | |
| JP2011060236A (en) | Information processor, development support program, and software integrated development environment | |
| JP2019046001A (en) | Application porting support apparatus, application porting support program and application porting method | |
| JP6555908B2 (en) | Information processing apparatus, control method therefor, and program | |
| JP5836814B2 (en) | Image forming apparatus, control method, and program | |
| JP2016095792A (en) | Information processing apparatus, control method thereof, and program | |
| JP5337686B2 (en) | Application program generation method and image forming apparatus | |
| JP2020177424A (en) | Information processing equipment, its control method, and programs |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20101122 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120120 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120214 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120403 |
|
| 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: 20120516 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20120612 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 5020121 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150622 Year of fee payment: 3 |
|
| LAPS | Cancellation because of no payment of annual fees |