JP2002259146A - Device and method for executing application - Google Patents

Device and method for executing application

Info

Publication number
JP2002259146A
JP2002259146A JP2001145592A JP2001145592A JP2002259146A JP 2002259146 A JP2002259146 A JP 2002259146A JP 2001145592 A JP2001145592 A JP 2001145592A JP 2001145592 A JP2001145592 A JP 2001145592A JP 2002259146 A JP2002259146 A JP 2002259146A
Authority
JP
Japan
Prior art keywords
application
unit
resource
heap area
library
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2001145592A
Other languages
Japanese (ja)
Inventor
Ryuichi Shiomi
隆一 塩見
Satoru Hayama
悟 葉山
Kenji Hiramoto
建志 平本
Yuuko Kubooka
祐子 久保岡
Shigenori Doi
繁則 土井
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2001145592A priority Critical patent/JP2002259146A/en
Publication of JP2002259146A publication Critical patent/JP2002259146A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Memory System (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an application execution device capable of recovering resources without using kernels and a Java application execution device capable of continuously executing Java applications without restarting Java middleware and reducing the load of garbage collection processing. SOLUTION: In providing a resource at the request for providing a resource from an application, a library part acquires an identifier(ID) for identifying the application requesting for provision of the resource and stores a pair of the provided resource and the acquired ID in a table. At the end of the application, the library part acquires the application ID of the ended application, specifies the resource corresponding to the acquired ID from the table and releases the specified resource.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、アプリケーション
実行装置において、アプリケーション終了により不必要
になった資源の回収を実行する技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a technique for executing, in an application execution apparatus, the recovery of resources that have become unnecessary due to the termination of an application.

【0002】[0002]

【従来の技術】一般的なアプリケーション実行装置にお
いては、オペレーティングシステムのカーネルが、アプ
リケーション終了等により不要になった資源(メモリ、
キーボードなどの各種デバイス)の回収を行っている。
ここで、「回収」とは、カーネル等のオペレーションシ
ステム側がアプリケーションに提供した資源をアプリケ
ーションから取り返すことをいう。カーネルは資源の回
収を行うために、資源の回収の手順をデバイス毎に記憶
している。これにより、アプリケーションが使用してい
たデバイスが不要になると、カーネルは当該デバイスの
回収の手順に従って、資源を回収することができ、資源
を効率よく利用することができる。
2. Description of the Related Art In a general application execution apparatus, a kernel of an operating system is provided with resources (memory,
Various devices such as keyboards).
Here, “collection” means that resources provided to the application by the operation system such as the kernel are returned from the application. The kernel stores a resource collection procedure for each device in order to perform resource collection. As a result, when the device used by the application becomes unnecessary, the kernel can collect the resources according to the collection procedure of the device, and can use the resources efficiently.

【0003】また、Javaアプリケーション実行装置にお
いて、例えばPCでは、メモリ以外の他の資源の回収につ
いては、Javaミドルウェア(いわゆるバーチャルマシ
ン)自体は資源の回収を行わず、Javaミドルウェアが終
了した時に、カーネルによって資源の回収が行われる。
一方、メモリの回収は、Javaミドルウェアによる「ガベ
ージコレクション」により行われる。「ガベージコレク
ション」とは、メモリ領域中の不必要になった領域を回
収することをいう。Javaでは、アプリケーションのロー
ドは、アプリケーションを構成する複数のクラスの各イ
ンスタンス(以下オブジェクトと記述)をメモリ中にロ
ードすることにより行われる。メモリ領域は、実行中の
アプリケーションのためにロードされるオブジェクトで
共有され、メモリ領域には、ロードされる順に領域が割
当てられる。従って、複数のアプリケーションから連続
的にオブジェクトがメモリ領域にロードされた場合に
は、1つのアプリケーションからロードされた各オブジ
ェクトがメモリ領域に不連続な形で割当てられることに
なる。メモリ領域がロードされたオブジェクトで不連続
に占有されると、メモリ不足を解消するため、ガベージ
コレクションが行われる。
[0003] In a Java application execution apparatus, for example, in the case of a PC, with respect to collection of resources other than memory, Java middleware (so-called virtual machine) itself does not collect resources. The resource is recovered by the operation.
On the other hand, collection of memory is performed by "garbage collection" by Java middleware. "Garbage collection" refers to collecting unnecessary areas in the memory area. In Java, an application is loaded by loading each instance (hereinafter referred to as an object) of a plurality of classes constituting the application into a memory. The memory area is shared by objects that are loaded for the running application, and the memory areas are allocated in the order in which they are loaded. Therefore, when objects are continuously loaded into the memory area from a plurality of applications, each object loaded from one application is allocated to the memory area in a discontinuous manner. If the memory area is discontinuously occupied by the loaded object, garbage collection is performed to resolve the memory shortage.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、上記に
説明した資源回収処理の技術には以下に示す問題点があ
る。第1に、アプリケーション実行装置におけるカーネ
ルによる資源の回収処理の場合には、新規にデバイスを
アプリケーション実行装置に追加する毎に、追加された
デバイスの回収手順を新たにカーネルに記憶させなけれ
ばならないという問題がある。
However, the technology of the resource recovery processing described above has the following problems. First, in the case of resource collection processing by the kernel in the application execution device, every time a new device is added to the application execution device, the procedure for collecting the added device must be newly stored in the kernel. There's a problem.

【0005】第2に、Javaアプリケーション実行装置に
おける資源の回収処理の場合には、Javaミドルウェアを
終了することなく、アプリケーションを逐次的に実行し
てゆくと、カーネルによるメモリ以外の資源の回収は、
Javaミドルウェアが終了するまで行われないため、1つ
のアプリケーションが終了しても、そのアプリケーショ
ンに提供された資源は回収されないので、次のアプリケ
ーションが同じ資源を必要とする場合には、次のアプリ
ケーションが実行できなくなるという問題がある。
[0005] Second, in the case of resource collection processing in the Java application execution device, if the application is sequentially executed without terminating the Java middleware, the collection of resources other than memory by the kernel becomes
Since this is not performed until the Java middleware terminates, even if one application terminates, the resources provided to that application are not collected. Therefore, if the next application needs the same resources, the next application There is a problem that it cannot be executed.

【0006】第3に、不連続な形でオブジェクトに割当
てられたメモリ領域が不要となった場合、メモリ領域の
ガベージコレクションの負荷が大きくなるという問題が
ある。上記の問題点に鑑み、本発明は、資源回収をカー
ネルによらずに実行するアプリケーション実行装置を提
供すること、Javaミドルウェアを再起動することなく、
連続的にJavaアプリケーションを実行することができる
Javaアプリケーション実行装置を提供すること、及びガ
ベージコレクション処理の負荷を軽減したJavaアプリケ
ーション実行装置を提供することを目的とする。
Third, when a memory area allocated to an object in a discontinuous manner becomes unnecessary, there is a problem that a load of garbage collection of the memory area increases. In view of the above problems, the present invention provides an application execution device that executes resource recovery without using a kernel, without restarting Java middleware,
Can run Java applications continuously
An object of the present invention is to provide a Java application execution device, and to provide a Java application execution device in which the load of garbage collection processing is reduced.

【0007】[0007]

【課題を解決するための手段】上記課題を解決するため
に、本発明に係るアプリケーション実行装置は、アプリ
ケーションに資源を提供する少なくとも1つ以上のライ
ブラリ部とカーネル部を備えるアプリケーション実行装
置であって、前記カーネル部は、アプリケーションが終
了すると、終了したアプリケーションがどれであるかを
資源を提供した各ライブラリ部に通知する通知手段を有
し、各ライブラリ部は、通知手段から通知されると、終
了したアプリケーションに提供した資源を回収する回収
手段を有することを特徴とする。本アプリケーション実
行装置における各手段をコンピュータに実現させるプロ
グラムを記録したコンピュータ読み取り可能な記録媒体
として実現することもできる。
According to an aspect of the present invention, there is provided an application execution apparatus including at least one library unit for providing resources to an application and a kernel unit. The kernel unit has a notifying unit for notifying each library unit that has provided resources of the terminated application when the application is terminated, and each library unit terminates when notified from the notifying unit. A collection means for collecting resources provided to the application. Each means in the application execution device may be realized as a computer-readable recording medium that stores a program for causing a computer to realize the means.

【0008】また、本発明に係るアプリケーション実行
装置は、アプリケーションに資源を提供するOS部とJava
ミドルウェア部を備えるアプリケーション実行装置であ
って、前記Javaミドルウェア部は、アプリケーションと
アプリケーションに対応するタスクとタスクを構成する
スレッドの対応関係を示すテーブルを保持する第1テー
ブル保持手段と、アプリケーション終了の指示を受ける
と、前記第1テーブル保持手段を参照して終了するアプ
リケーションに対応するタスクがどれであるかを通知す
る通知手段とを有し、前記OS部は、アプリケーション毎
にアプリケーションを実行するタスクを生成するタスク
生成手段と、前記タスクを構成するアプリケーション用
スレッドを複数生成するスレッド生成手段と、前記アプ
リケーション用スレッドを実行することにより、アプリ
ケーションのプログラムコードを実行し、アプリケーシ
ョンが要求する資源を提供し、提供した資源と前記スレ
ッドが属するタスクとの対応関係を示すテーブルを保持
する管理手段と、前記通知手段から通知されたタスクに
対応する資源を管理手段より特定し、アプリケーション
に提供されていた資源を回収する回収手段とを有するこ
とを特徴とする。本アプリケーション実行装置における
各手段をコンピュータに実現させるプログラムを記録し
たコンピュータ読み取り可能な記録媒体として実現する
こともできる。
Further, the application execution apparatus according to the present invention comprises an OS unit for providing resources to an application and a Java application.
An application execution device including a middleware unit, wherein the Java middleware unit includes a first table holding unit that holds a table indicating a correspondence between an application, a task corresponding to the application, and a thread configuring the task, and an instruction to end the application. Notification means for notifying which task is an application corresponding to the application to be terminated with reference to the first table holding means, and the OS unit executes a task for executing the application for each application. A task generating means for generating, a thread generating means for generating a plurality of application threads constituting the task, and executing the application threads to execute a program code of the application and to allocate resources requested by the application. Management means for holding a table indicating the correspondence between the provided resources and the tasks to which the threads belong, and resources corresponding to the tasks notified from the notification means specified by the management means and provided to the application. Collection means for collecting resources. Each means in the application execution device may be realized as a computer-readable recording medium that stores a program for causing a computer to realize the means.

【0009】本発明に係るアプリケーション実行装置
は、ガベージコレクションが必要なアプリケーションを
実行する装置であって、アプリケーションが起動される
毎に、メモリヒープ領域から分割ヒープ領域を獲得する
分割ヒープ領域獲得手段と、起動されたアプリケーショ
ンに、前記分割ヒープ領域獲得手段によって獲得された
分割ヒープ領域を割当てる割当て手段と、アプリケーシ
ョンが終了する毎に、当該アプリケーションに割当てら
れた分割ヒープ領域を解放するメモリ解放手段とを備え
ることを特徴とする。本アプリケーション実行装置にお
ける各手段等をステップとするメモリヒープ管理方法と
したり、それらステップをコンピュータに実行させるプ
ログラムを記録したコンピュータ読み取り可能な記録媒
体として実現することもできる。
An application execution apparatus according to the present invention is an apparatus for executing an application that requires garbage collection, wherein each time the application is started, a divided heap area acquiring unit acquires a divided heap area from a memory heap area. Allocating means for allocating the divided heap area acquired by the divided heap area acquiring means to the started application, and memory releasing means for releasing the divided heap area allocated to the application every time the application is terminated. It is characterized by having. The memory heap management method may be implemented by using each unit or the like in the application execution apparatus as a step, or may be realized as a computer-readable recording medium that records a program for causing a computer to execute the steps.

【0010】[0010]

【発明の実施の形態】(実施の形態1)本実施の形態に
おけるアプリケーション実行装置においては、アプリケ
ーションが終了等する毎にカーネル部ではなく、ライブ
ラリ部がアプリケーションに提供した資源の回収を行
う。ここで、「アプリケーション」は、プログラムとプ
ログラムが実行されることによる機能の何れかを指すも
のとする。「資源」とは、チューナー、MPEGオーディオ
デコーダ、MPEGビデオデコーダ、キーボード入力デバイ
ス、リモコン入力デバイス、マウス入力デバイス、トラ
ックボール入力デバイス、ミューテックス、セマフォ
ア、ネットワークデバイス、シリアルデバイス、IEEE13
94(シリアルインターフェース)、USB(Universal Ser
ial Bus)デバイスインターフェース、ファイルシステ
ム、ディスプレイデバイス、メモリ、モデム等をいう。
ライブラリ部は、アプリケーションの要求に応じて資源
を制御(資源の確保、管理、回収)するいわゆるデバイ
スドライバ群である。「回収」とは、カーネル等のオペ
レーションシステム側がアプリケーションに提供した資
源をアプリケーションから取り返すことをいう。
DESCRIPTION OF THE PREFERRED EMBODIMENTS (Embodiment 1) In an application execution apparatus according to the present embodiment, a library unit, rather than a kernel unit, collects resources provided to an application each time the application ends. Here, the “application” indicates one of a program and a function of executing the program. "Resources" means tuner, MPEG audio decoder, MPEG video decoder, keyboard input device, remote control input device, mouse input device, trackball input device, mutex, semaphore, network device, serial device, IEEE13
94 (serial interface), USB (Universal Ser
ial Bus) Device interface, file system, display device, memory, modem, etc.
The library unit is a so-called device driver group that controls resources (secure, manage, and collect resources) in response to a request from an application. “Recovery” means that resources provided to the application by the operation system, such as the kernel, are returned from the application.

【0011】具体的には、ライブラリ部はアプリケーシ
ョンからの資源の提供の要求に応じて、資源を提供した
ときに、資源の提供を要求したアプリケーションを識別
する識別子を取得し、提供した資源と取得したアプリケ
ーション識別子を組にしてテーブルに保持する。そし
て、アプリケーションが終了すると、終了したアプリケ
ーションのアプリケーション識別子を取得し、取得した
識別子に対応する資源をテーブルから特定し、特定した
資源を回収する。
More specifically, the library unit obtains an identifier for identifying the application that has requested the provision of the resource when the resource is provided in response to the request for the provision of the resource from the application. The set of application identifiers set is held in a table. When the application ends, the application identifier of the terminated application is obtained, the resource corresponding to the obtained identifier is specified from the table, and the specified resource is collected.

【0012】以下本アプリケーション実行装置の実施の
形態について、図面を用いて説明する。図1は、アプリ
ケーション実行装置10の構成を示すブロック図であ
る。アプリケーション実行装置10は、アプリケーショ
ン入力部11、アプリケーション記憶部12、カーネル
部13、ライブラリ格納部14、デバイス部15、指示
通知部16から構成される。
An embodiment of the present application execution apparatus will be described below with reference to the drawings. FIG. 1 is a block diagram showing a configuration of the application execution device 10. The application execution device 10 includes an application input unit 11, an application storage unit 12, a kernel unit 13, a library storage unit 14, a device unit 15, and an instruction notification unit 16.

【0013】アプリケーション入力部11は、フロッピ
ー(登録商標)ディスクドライブ、CDドライブ、ネット
ワークインターフェースボード、放送受信機器等で構成
され、実行すべきアプリケーションを受け付け、アプリ
ケーション記憶部12に記憶させる。アプリケーション
記憶部12は、RAM、ROM、ハードディスク、CDドライ
ブ、フロッピーディスク等で構成され、アプリケーショ
ン入力部11から出力されたアプリケーション又は予め
内蔵されているアプリケーションを記憶する。
The application input unit 11 is composed of a floppy (registered trademark) disk drive, a CD drive, a network interface board, a broadcast receiving device, etc., receives an application to be executed, and stores it in the application storage unit 12. The application storage unit 12 includes a RAM, a ROM, a hard disk, a CD drive, a floppy disk, and the like, and stores an application output from the application input unit 11 or a pre-installed application.

【0014】カーネル部13は、逐次実行部13a、資
源回収通知部13b、識別子提供部13cから構成され、
アプリケーション記憶部12が記憶するアプリケーショ
ンを実行する。逐次実行部13aは、実行するアプリケ
ーションがバイナリープログラムの場合、バイナリープ
ログラムをそのまま実行するCPU等で構成される。実行
するアプリケーションがJavaバイトコード(Javaは、米
国のSun Microsystems, Inc.の商標である。)のような
中間コードの場合は中間コードを逐次解析し、実行する
モジュール(バーチャルマシンやインタプリタ)等で構
成される。逐次実行部13aは、アプリケーション記憶
部12が記憶するアプリケーションを読み出し、実行す
る。さらに、実行するアプリケーションからライブラリ
格納部14に格納されるライブラリ部に資源の提供を要
求し、ライブラリ部からアプリケーションが要求する資
源の提供を受ける。
The kernel unit 13 comprises a sequential execution unit 13a, a resource recovery notifying unit 13b, and an identifier providing unit 13c.
The application stored in the application storage unit 12 is executed. When the application to be executed is a binary program, the sequential execution unit 13a is configured by a CPU or the like that executes the binary program as it is. If the application to be executed is an intermediate code such as Java bytecode (Java is a trademark of Sun Microsystems, Inc. in the United States), the intermediate code is sequentially analyzed and executed by a module (virtual machine or interpreter) or the like. Be composed. The sequential execution unit 13a reads and executes an application stored in the application storage unit 12. Further, the application to be executed requests the library unit stored in the library storage unit 14 to provide resources, and receives the resource requested by the application from the library unit.

【0015】資源回収通知部13bは、アプリケーショ
ンが終了等する毎に当該アプリケーションに資源を提供
しているライブラリ部に対して、資源回収の指示と当該
アプリケーション識別子とを通知する。具体的には、資
源回収通知部13bは、ライブラリ格納部14が格納す
るライブラリ部から、コールバック関数の登録を受けつ
け、指示通知部16からアプリケーションの終了又は中
断の通知を受けると、登録されているコールバック関数
を呼び出して実行し、当該アプリケーションの識別子を
ライブラリ部に通知する。
The resource recovery notifying unit 13b notifies the library unit which provides resources to the application every time the application is terminated, etc., with a resource recovery instruction and the application identifier. Specifically, the resource collection notifying unit 13b receives the registration of the callback function from the library unit stored in the library storage unit 14, and is registered when receiving the notification of the end or the interruption of the application from the instruction notifying unit 16. Calls and executes the callback function, and notifies the library unit of the identifier of the application.

【0016】ここで、「コールバック関数の登録」と
は、ライブラリ部がアプリケーションの要求に応じて、
当該アプリケーションに新たな資源の提供を開始したと
きに、「当該ライブラリ部に、当該アプリケーションが
終了又は中断すれば中断又は終了したアプリケーション
がどれであるかを、コールバック関数を呼び出して実行
することにより通知してくれるように」資源回収通知部
13bに依頼することをいう。
Here, "registration of the callback function" means that the library unit responds to the request of the application by
When the provision of new resources to the application is started, the following information is obtained by calling the callback function to execute the callback function in the library section to determine which application has been suspended or terminated if the application is terminated or suspended. Requesting the resource collection notifying unit 13b to notify us. "

【0017】図2は、コールバック関数を定義したC言
語プログラムの一例を示す。CALLBACK#fは、コールバッ
ク関数の型名を示す。このコールバック関数は返り値が
なく、引数に整数の値をとる。図3は、コールバック関
数の登録と削除と実行を記述したC言語プログラムの例
を示す。行番号6〜14は登録のプログラム例を示し、行
番号16-20は削除のプログラム例を示し、行番号22〜26
は実行のプログラム例を示す。
FIG. 2 shows an example of a C language program defining a callback function. CALLBACK # f indicates the type name of the callback function. This callback function has no return value and takes an integer value as an argument. FIG. 3 shows an example of a C language program in which registration, deletion, and execution of a callback function are described. Line numbers 6 to 14 show a registration program example, line numbers 16 to 20 show a deletion program example, and line numbers 22 to 26.
Shows an example of an execution program.

【0018】識別子提供部13cは、ライブラリ部から
の要求に応じて、アプリケーションの識別子を提供す
る。ライブラリ格納部14は、資源であるデバイスを制
御する複数のライブラリ部14a〜14nからなる。各
ライブラリ部は、デバイス部15の対応するデバイスを
制御する(例えばライブラリ部14aは、デバイス15a
を、ライブラリ部14bは、デバイス15bを制御す
る。)。実際にはライブラリ格納部14は、ROMやハー
ドディスクで構成され、各ライブラリ部では、デバイス
制御用の関数群を記述したプログラムがアプリケーショ
ンに呼び出されて実行されることによりデバイスの制御
が実現されている。
The identifier providing unit 13c provides an application identifier in response to a request from the library unit. The library storage unit 14 includes a plurality of library units 14a to 14n that control devices as resources. Each library unit controls a device corresponding to the device unit 15 (for example, the library unit 14a
The library unit 14b controls the device 15b. ). Actually, the library storage unit 14 is configured by a ROM or a hard disk, and in each library unit, a program that describes a function group for device control is called by an application and executed, whereby device control is realized. .

【0019】具体的には、各ライブラリ部は、以下に示
す処理を行うことにより資源を制御する。アプリケーシ
ョンの要求に応じて資源を提供し、資源回収通知部13
bにコールバック関数を登録する。次にアプリケーショ
ン識別部13cから資源を要求したアプリケーションの
アプリケーション識別子を取得し、提供した資源の資源
名と組にしてテーブルに保持する。さらに、登録したコ
ールバック関数が資源解放通知部13bにより実行さ
れ、回収すべき資源を使用しているアプリケーションの
アプリケーション識別子が通知されると、保持している
テーブルから通知されたアプリケーション識別子に対応
する資源名を特定し、特定した資源名の資源を回収す
る。
Specifically, each library unit controls resources by performing the following processing. The resource is provided according to the request of the application, and the resource collection notifying unit 13 is provided.
Register a callback function in b. Next, the application identifier of the application requesting the resource is acquired from the application identification unit 13c, and the acquired application identifier is stored in a table in combination with the resource name of the provided resource. Further, the registered callback function is executed by the resource release notifying unit 13b, and when the application identifier of the application using the resource to be collected is notified, the callback function corresponds to the application identifier notified from the held table. The resource name is specified, and the resource with the specified resource name is collected.

【0020】次に各ライブラリ部がアプリケーションの
要求に応じて行う資源提供の処理について図4を参照し
て説明する。図4は、各ライブラリ部が行う資源提供の
処理を示すフローチャートである。各ライブラリ部は、
アプリケーションの要求に応じて、資源を確保し(S30
1)、コールバック関数を既に登録しているか否かを判
断(例えばフラグを設定し、登録・未登録を判断)し
(S302)、登録していない場合(S302:N)は、資源回収
通知部13bにコールバック関数を登録する(S303)。
Next, a description will be given, with reference to FIG. 4, of a resource providing process performed by each library unit in response to an application request. FIG. 4 is a flowchart illustrating a resource providing process performed by each library unit. Each library section
Secure resources according to application requirements (S30
1), it is determined whether or not the callback function has already been registered (for example, a flag is set to determine registration / non-registration) (S302). If not registered (S302: N), the resource collection notification The callback function is registered in the unit 13b (S303).

【0021】次に識別子提供部13cを呼び出し、資源
を要求したアプリケーションのアプリケーション識別子
を取得し(S304)、取得したアプリケーション識別子と
確保した資源の資源名を組にしてテーブルに保持し(S3
05)、資源をアプリケーションに提供する(S306)。登
録している場合(S302:Y)は、コールバック関数を新た
に登録することなく、S304〜S306の処理を実行する。
Next, the identifier providing unit 13c is called to acquire the application identifier of the application which has requested the resource (S304), and the acquired application identifier and the resource name of the secured resource are set as a set and held in a table (S3).
05), providing resources to the application (S306). If registered (S302: Y), the processing of S304 to S306 is executed without newly registering the callback function.

【0022】上記テーブルの例を図5に示す。図5は、
ファイルシステムを制御するライブラリ部(以下ライブ
ラリ部Fと呼ぶ。)が保持するアプリケーション識別子
と資源名(ファイル名)とを組にしたテーブルを示す。
図5−(1)は、ライブラリ部Fが資源解放通知部13b
にコールバック関数を登録し、アプリケーション識別子
「1」のアプリケーションに対し、ファイル名「a.tx
t」の資源を提供していることを示す。アプリケーショ
ンがライブラリ部Fの関数を呼び出すことにより、資源
の提供を要求すると、ライブラリ部Fは、ファイル名
「b.txt」の資源を確保し、識別子提供部13cからアプ
リケーション識別子「2」を取得する。この場合、ライ
ブラリ部Fのコールバック関数は、既に登録済みなので
再登録はされない。ライブラリ部Fは、取得したアプリ
ケーション識別子「2」と確保した資源のファイル名
「b.txt」を組としてテーブルに保持し、図5−(2)
に示すようにテーブルを更新する。
FIG. 5 shows an example of the above table. FIG.
4 shows a table in which an application identifier and a resource name (file name) held by a library unit (hereinafter, referred to as a library unit F) that controls a file system are set.
FIG. 5A shows that the library unit F is the resource release notifying unit 13b.
And register the callback function in the file name "a.tx" for the application with the application identifier "1".
t "resource. When the application requests the provision of resources by calling the function of the library unit F, the library unit F secures the resource of the file name “b.txt” and acquires the application identifier “2” from the identifier providing unit 13c. . In this case, since the callback function of the library unit F has already been registered, it is not re-registered. The library unit F holds the acquired application identifier “2” and the file name “b.txt” of the secured resource as a set in a table, and FIG. 5- (2)
Update the table as shown in.

【0023】次に各ライブラリ部が行う資源の回収処理
について図6を参照して説明する。図6は、各ライブラ
リ部が行う資源の回収処理を示すフローチャートであ
る。コールバック関数が呼び出されると、各ライブラリ
部はアプリケーション識別子を資源回収通知部13bよ
り取得し(S401)、テーブルに保持するアプリケーショ
ン識別子と資源名の組を1つ取り出し(S402)、取り出
したアプリケーション識別子と資源回収通知部13bよ
り取得したアプリケーション識別子を比較する(S40
3)。アプリケーション識別子が一致する場合は、取り
出した組の資源名の資源を回収し(S404)、テーブルか
ら当該組を削除し(S405)、テーブルに保持する全ての
組との比較が終了している場合(S406:Y)は処理を終
了する。例えば図5―(2)のテーブルの例で、取得し
たアプリケーション識別子が「2」の場合には、テーブ
ルからアプリケーション識別子「2」と対応するファイ
ル名「b.txt」の組が削除される(図5−(3))。全
ての組との比較が終了していない場合(S406:N)は次の
組を取り出し(S402)、同様の処理を繰り返す(S403〜
S406)。アプリケーション識別子が一致しない場合は、
テーブルに保持する全ての組との比較が終了している場
合(S406:Y)は処理を終了する。全ての組との比較が
終了していない場合(S406:N)は次の組を取り出し(S4
02)、同様の処理を繰り返す(S403〜S406)。
Next, the resource collection process performed by each library unit will be described with reference to FIG. FIG. 6 is a flowchart illustrating a resource collection process performed by each library unit. When the callback function is called, each library unit acquires the application identifier from the resource collection notifying unit 13b (S401), extracts one set of the application identifier and the resource name stored in the table (S402), and retrieves the extracted application identifier. And the application identifier acquired from the resource collection notifying unit 13b (S40).
3). If the application identifiers match, the resource of the resource name of the extracted set is collected (S404), the set is deleted from the table (S405), and the comparison with all the sets stored in the table has been completed. (S406: Y) ends the processing. For example, in the example of the table in FIG. 5- (2), when the acquired application identifier is “2”, the set of the file name “b.txt” corresponding to the application identifier “2” is deleted from the table ( FIG. 5- (3)). If comparison with all sets has not been completed (S406: N), the next set is taken out (S402), and the same processing is repeated (S403 to S403).
S406). If the application identifiers do not match,
If the comparison with all the sets held in the table has been completed (S406: Y), the processing ends. If comparison with all sets has not been completed (S406: N), the next set is taken out (S4
02), the same processing is repeated (S403 to S406).

【0024】デバイス15a〜15nは、メモリー、ディ
スプレイ、入力デバイス(キーボード、リモコン等)、
ファイルシステム、ネットワークデバイスなどを含み、
各デバイスはライブラリ格納部14が格納する各ライブ
ラリ部を介してなされるアプリケーションからの制御に
応じて作動する。指示通知部16は、アプリケーション
の開始、停止、再開、終了の処理をする。
The devices 15a to 15n are a memory, a display, an input device (keyboard, remote controller, etc.),
Including file systems, network devices, etc.
Each device operates according to control from an application performed through each library unit stored in the library storage unit 14. The instruction notifying unit 16 performs processing of starting, stopping, resuming, and terminating the application.

【0025】アプリケーションの開始の処理とは、逐次
実行部13aにアプリケーション記憶部12が記憶する
アプリケーションの実行を指示することをいう。アプリ
ケーション停止の処理とは、逐次実行部13aに実行し
ているアプリケーションを中断させ、必要に応じて資源
回収通知部13bにアプリケーションの中断を通知する
ことをいう。
The process of starting the application means instructing the sequential execution unit 13a to execute the application stored in the application storage unit 12. The process of stopping the application refers to interrupting the application being executed by the sequential execution unit 13a and notifying the resource collection notifying unit 13b of the interruption of the application as necessary.

【0026】アプリケーション再開の処理とは、逐次実
行部13aに中断しているアプリケーションの実行を指
示することをいう。アプリケーション終了の処理とは、
逐次実行部13aに実行しているアプリケーションの終
了を指示し、資源回収通知部13bにアプリケーション
の終了を通知することをいう。
The process of resuming the application means instructing the sequential execution unit 13a to execute the suspended application. Application termination processing
This means instructing the sequential execution unit 13a to terminate the application being executed and notifying the resource collection notifying unit 13b of the termination of the application.

【0027】本実施形態においては、アプリケーション
終了又は中断時に資源をアプリケーションに提供した各
ライブラリ部に通知されるアプリケーション識別子は、
1つであったが、複数のアプリケーションが同時に終了
する場合は、複数のアプリケーション識別子を、各ライ
ブラリ部に通知することとしてもよい。この場合の各ラ
イブラリ部が行う資源の回収処理のフローチャートを図
7に示す。各ライブラリ部は回収する資源を提供した複
数のアプリケーション識別子を資源回収通知部13bよ
り取得し(S751)、取得したアプリケーション識別子を
1つ取り出し(S752)、テーブルに保持するアプリケー
ション識別子と資源名の組を1つ取り出し(S753)、取
り出したアプリケーション識別子と資源回収通知部13
bより取得したアプリケーション識別子を比較する(S7
54)。アプリケーション識別子が一致する場合(S754:
Y)は、対応する資源名を回収対象の資源名として保持
し(S755)、テーブルから当該組を削除し(S756)、テ
ーブルに保持する全ての組との比較が終了している場合
(S757:Y)は、次のアプリケーション識別子を取得し
(S758、S752)、同様の処理を繰り返す。S751で取得し
た全てのアプリケーション識別子に対して比較が終了す
ると(S758:Y)、S755で回収対象の資源名として保持
している資源名に対応する資源を一括して回収する(S7
59)。
In the present embodiment, the application identifier notified to each library unit that provided resources to the application when the application is terminated or interrupted is:
Although the number is one, when a plurality of applications are simultaneously terminated, a plurality of application identifiers may be notified to each library unit. FIG. 7 shows a flowchart of the resource collection process performed by each library unit in this case. Each library unit obtains from the resource collection notifying unit 13b a plurality of application identifiers that provided the resources to be collected (S751), extracts one of the obtained application identifiers (S752), and sets the application identifier and the resource name stored in the table. Is retrieved (S753), the retrieved application identifier and the resource collection notifying unit 13
b to compare the application identifier obtained from
54). If the application identifier matches (S754:
Y) holds the corresponding resource name as the resource name to be collected (S755), deletes the set from the table (S756), and completes the comparison with all the sets stored in the table (S757). : Y) obtains the next application identifier (S758, S752) and repeats the same processing. When the comparison is completed for all the application identifiers acquired in S751 (S758: Y), the resources corresponding to the resource names held as the resource names to be collected in S755 are collectively collected (S7).
59).

【0028】これにより、ライブラリ部は、効果的に資
源回収を行うことができる。例えば、(1つの)ライブ
ラリ部が管理する資源が、複数のアプリケーションの終
了によって全て回収される場合、管理テーブルを初期化
する処理だけで迅速に資源を回収することができる。 (実施の形態2)実施形態1においては、ライブラリ部
は、アプリケーションが終了等した場合に呼び出される
コールバック関数をライブラリ部毎に登録したが、本実
施形態においては、実施形態1のコールバック関数に相
当する資源回収インスタンスを生成し、アプリケーショ
ンが終了等する毎にアプリケーションに提供した資源を
回収する。ここで、「資源回収インスタンス」は、ライ
ブラリ部が格納するクラス(Javaバイトコードのプログ
ラム)から生成され、各種の情報とその情報を取り出す
ための関数であるメソッドが記述されたプログラムであ
り、資源回収インスタンスは、資源の提供を要求したア
プリケーションと提供した資源の情報とこれらの情報を
取り出すためのメソッドを保持している。このメソッド
をプログラム上で呼び出すことにより保持している情報
が取り出される。
Thus, the library section can effectively collect resources. For example, when all the resources managed by the (one) library unit are collected by terminating a plurality of applications, the resources can be quickly collected only by processing for initializing the management table. (Embodiment 2) In the first embodiment, the library unit registers a callback function to be called when the application is terminated or the like for each library unit. In the present embodiment, the callback function of the first embodiment Is generated, and the resource provided to the application is collected every time the application is terminated. Here, the “resource recovery instance” is a program generated from a class (a Java bytecode program) stored in the library unit and describing various types of information and a method that is a function for extracting the information. The collection instance holds information on the application that has requested the provision of the resource and the provided resource, and a method for extracting the information. By calling this method on the program, the stored information is retrieved.

【0029】以下本アプリケーション実行装置の実施の
形態について、図面を用いて説明する。図8は、アプリ
ケーション実行装置20の構成を示すブロック図であ
る。アプリケーション実行装置20は、アプリケーショ
ン入力部11、アプリケーション記憶部12、OS部2
3、ライブラリ格納部24、デバイス部15、指示通知
部16から構成される。アプリケーション入力部11、
アプリケーション記憶部12、デバイス部15、指示通
知部16は、実施形態1の実行装置10に含まれるもの
と同一であるので、説明を省略する。
Hereinafter, an embodiment of the present application execution apparatus will be described with reference to the drawings. FIG. 8 is a block diagram illustrating a configuration of the application execution device 20. The application execution device 20 includes an application input unit 11, an application storage unit 12, and an OS unit 2.
3, a library storage unit 24, a device unit 15, and an instruction notification unit 16. Application input unit 11,
The application storage unit 12, the device unit 15, and the instruction notification unit 16 are the same as those included in the execution device 10 according to the first embodiment, and a description thereof will be omitted.

【0030】OS部23は、バーチャルマシン部23a、
アプリケーション管理部23bから構成され、アプリケ
ーション記憶部12が記憶するJavaアプリケーション
(以下アプリケーションという。)を実行する。バーチ
ャルマシン部23aは、アプリケーション記憶部12か
らアプリケーションをロードし、アプリケーションのバ
イトコードを逐次解析し、アプリケーションを実行す
る。また、ライブラリ格納部24に格納される各ライブ
ラリ部を介してデバイス部15に格納される各デバイス
を制御する。実際には、バーチャルマシン部23aが実
行するアプリケーションからデバイス制御を記述したプ
ログラムである各ライブラリ部のクラスが呼び出され、
クラスのプログラムが実行されることにより、各デバイ
スの制御が実現される。
The OS unit 23 includes a virtual machine unit 23a,
The application management unit 23b executes a Java application (hereinafter referred to as an application) stored in the application storage unit 12. The virtual machine unit 23a loads the application from the application storage unit 12, sequentially analyzes the bytecode of the application, and executes the application. Further, each device stored in the device unit 15 is controlled via each library unit stored in the library storage unit 24. Actually, an application executed by the virtual machine unit 23a calls a class of each library unit which is a program describing device control,
The control of each device is realized by executing the class program.

【0031】アプリケーション管理部23bは、実行さ
れているアプリケーションを管理し、また、実施形態1
の識別子提供部13cに相当する機能を有する。具体的
には、アプリケーション管理部23bは、アプリケーシ
ョン情報を格納する処理を定義するクラスから、処理を
実行するインスタンスをアプリケーション毎に生成し、
生成した各インスタンス(ここでは、アプリケーション
情報インスタンスと呼ぶ。)に、実行されている各アプ
リケーションのアプリケーション識別子を格納させ、生
成した各アプリケーション情報インスタンス(図8の2
3c〜23e)を用いて実行されているアプリケーション
を管理する。また各ライブラリ部がアプリケーションか
ら資源の提供を要求されたとき、要求したアプリケーシ
ョンを特定する識別子としてアプリケーション情報イン
スタンスを提供する。ここで、各アプリケーションの識
別子を各アプリケーション情報インスタンスに格納させ
る代わりに、アプリケーション情報インスタンスそのも
のをアプリケーションの識別子としてもよい。
The application management unit 23b manages an application that is being executed.
Has a function corresponding to the identifier providing unit 13c. Specifically, the application management unit 23b generates an instance for executing a process for each application from a class that defines a process for storing application information,
In each generated instance (here, called an application information instance), an application identifier of each application being executed is stored, and each generated application information instance (2 in FIG. 8) is stored.
3c to 23e) to manage the application being executed. Further, when each library unit is requested by an application to provide resources, the library unit provides an application information instance as an identifier for specifying the requested application. Here, instead of storing the identifier of each application in each application information instance, the application information instance itself may be used as the identifier of the application.

【0032】各アプリケーション情報インスタンスは、
実施形態1の資源回収通知部13bに相当する機能を有
する。具体的には、以下の処理を行う。各アプリケーシ
ョン情報インスタンスは、各ライブラリ部から資源回収
インスタンスの登録を受け付ける。ここで、「資源回収
インスタンスの登録」とは、ライブラリ部がアプリケー
ションに新たな資源を提供したときに、「当該ライブラ
リ部に、当該アプリケーションが終了又は中断すれば、
当該アプリケーションがどれであるかを通知してくれる
ように」当該アプリケーション識別子を格納するアプリ
ケーション情報インスタンスに依頼することをいう。上
記の通知は、登録時に生成される資源回収インスタンス
に実装されるメソッドを呼び出すことにより実行され
る。資源回収インスタンスは各ライブラリ部が格納する
各クラスから、以下に示すように生成される。各クラス
は、「インターフェース」を実装することにより、「イ
ンターフェース」が定義するメソッドを実装する。「イ
ンターフェース」は、クラスに実装されるべきメソッド
を定義する。図9は、このインターフェースの一例であ
る。この例では、ResourceCollectionListenerインター
フェースがupdateメソッドを定義している。各ライブラ
リ部が格納する各クラスは、このインターフェースを実
装することにより、updateメソッドに資源回収処理を記
述したクラスを用意し、用意したクラスから当該インタ
ーフェースを実装した資源回収インスタンスが生成さ
れ、アプリケーション情報インスタンスに生成した資源
回収インスタンスが登録される。この処理により、生成
された資源回収インスタンスには、インターフェースが
定義するメソッド(ここでは、updateメソッド)が実装
されていることが保証され、上記の通知はこのインター
フェースが定義するメソッドを呼び出すことにより実行
される。
Each application information instance is:
It has a function corresponding to the resource collection notification unit 13b of the first embodiment. Specifically, the following processing is performed. Each application information instance receives registration of a resource recovery instance from each library unit. Here, the “registration of the resource recovery instance” means that when the library unit provides a new resource to the application, “if the application is terminated or suspended in the library unit,
Requesting the application information instance that stores the application identifier to notify which application it is ". The above notification is executed by calling a method implemented in the resource recovery instance generated at the time of registration. A resource recovery instance is generated from each class stored in each library unit as shown below. Each class implements the method defined by the “interface” by implementing the “interface”. An "interface" defines a method to be implemented in a class. FIG. 9 is an example of this interface. In this example, ResourceCollectionListener interface defines update method. By implementing this interface, each class stored in each library section prepares a class that describes resource recovery processing in the update method, and a resource recovery instance that implements the interface is generated from the prepared class, and application information The resource recovery instance generated for the instance is registered. By this processing, it is guaranteed that the generated resource recovery instance has implemented the method defined by the interface (here, the update method), and the above notification is executed by calling the method defined by this interface Is done.

【0033】また、アプリケーションが終了又は中断し
た場合に、当該アプリケーション識別子を格納するアプ
リケーション情報インスタンスは、登録された資源回収
インスタンスに実装されているメソッド(ここでは、up
dateメソッド)を呼び出すことにより、当該アプリケー
ションに資源を提供しているライブラリ部に上記の通知
をする。
When the application is terminated or interrupted, the application information instance storing the application identifier is stored in a method (in this case, up
The above method is notified to the library section that provides resources to the application by calling the date method).

【0034】さらに、アプリケーション情報インスタン
スは、登録された資源回収インスタンスを削除するメソ
ッドを格納してもよいし、アプリケーションの状態を知
るためのメソッドを格納してもよい。図10は、上記の
メソッドを格納するアプリケーション情報インスタンス
を生成するクラスの一例を示す。図10において、アプ
リケーション情報インスタンスを生成するクラスである
applicationPropoxyは、アプリケーション名(applicati
on name)に相当する内部変数と、アプリケーションの状
態を知るためのgetStatusメソッド、資源回収インスタ
ンス(resourceCollectionLister)を登録するaddListe
nerメソッド、資源回収インスタンスの登録を削除するr
emoveListenerメソッドを定義している。
Further, the application information instance may store a method for deleting the registered resource recovery instance or a method for knowing the state of the application. FIG. 10 shows an example of a class for generating an application information instance storing the above method. In FIG. 10, it is a class for generating an application information instance.
applicationPropoxy is the application name (applicati
onName), getStatus method to know the status of the application, addListe to register the resource collection instance (resourceCollectionLister)
ner method, delete resource registration instance registration r
emoveListener method is defined.

【0035】ライブラリ格納部24は、複数のライブラ
リ部24a〜24nからなる。各ライブラリ部は、デバ
イス部15のデバイス15a〜15nを制御し、アプリ
ケーションからの要求に応じて資源であるデバイス提供
の処理と提供した資源回収の処理を行う。実際にはライ
ブラリ格納部24は、ROMやハードディスクで構成さ
れ、各ライブラリ部では、デバイス制御用のプログラム
であるクラス群に記述されたプログラムがアプリケーシ
ョンに呼び出されて実行されることによりデバイスの制
御が実現されている。
The library storage unit 24 includes a plurality of library units 24a to 24n. Each library unit controls the devices 15a to 15n of the device unit 15, and performs a process of providing a device as a resource and a process of collecting the provided resource in response to a request from an application. Actually, the library storage unit 24 is configured by a ROM or a hard disk. In each library unit, a program described in a class group, which is a device control program, is called by an application and executed, so that device control is performed. Has been realized.

【0036】最初に資源提供の処理について説明する。
各ライブラリ部は、アプリケーションから資源の提供を
要求されると、アプリケーションに要求された資源を提
供し、アプリケーション管理部23bを呼び出し、当該
アプリケーションに対応するアプリケーション情報イン
スタンスを取得し、資源回収クラスから資源回収インス
タンスを生成し、生成した資源回収インスタンスを当該
アプリケーション情報インスタンスに登録する。さら
に、各ライブラリ部は、提供した資源の資源名と当該ア
プリケーション情報インスタンスとを組にして資源回収
インスタンスに保持する。
First, the resource providing process will be described.
Each library unit, when requested to provide resources from the application, provides the requested resource to the application, calls the application management unit 23b, acquires an application information instance corresponding to the application, and obtains the resource information from the resource collection class. A collection instance is generated, and the generated resource collection instance is registered in the application information instance. Further, each library unit sets the resource name of the provided resource and the application information instance as a set and holds the set in the resource collection instance.

【0037】図11に資源回収クラスの一例を示す。図
11においては、ファイルシステムを制御する資源回収
クラスが定義されている。具体的には、資源回収インス
タンス生成時に作成される「フィールド」と呼ばれる内
部変数app(アプリケーション情報インスタンスに相当
する)とname(資源のファイル名に相当する)の情報と
アプリケーション終了時又は中断時に呼び出され、資源
回収の処理を実行するupdateメソッドが定義されてい
る。図12は、図11の資源回収クラスが生成した資源
回収インスタンスの例を示す。901は資源回収インス
タンスを保持するインスタンステーブルを示し、90
2、903は、生成された資源回収インスタンスを示
す。図12−(1)は、資源回収情報インスタンス90
2が提供した資源名(ここでは、ファイル名「a.tx
t」)とアプリケーション情報インスタンス(ここで
は、「1」とする。)を組にして保持していることを示
す。図12−(2)は、ライブラリが図12−(1)と
は別のアプリケーション情報インスタンス「2」に管理
されるアプリケーションに資源(ファイル名「b.txt」
のファイル)を提供し、新たに資源回収インスタンス9
03を生成したことを示す。
FIG. 11 shows an example of the resource recovery class. In FIG. 11, a resource collection class for controlling the file system is defined. Specifically, it is called at the time of termination or interruption of the application, information of internal variables app (corresponding to the application information instance) and name (corresponding to the file name of the resource) called "fields" created when the resource recovery instance is generated. In this case, an update method for executing resource collection processing is defined. FIG. 12 shows an example of a resource collection instance generated by the resource collection class of FIG. Reference numeral 901 denotes an instance table holding a resource collection instance;
2, 903 indicates a generated resource recovery instance. FIG. 12- (1) shows a resource collection information instance 90.
2 provided the resource name (here, the file name "a.tx
t ”) and an application information instance (here,“ 1 ”) as a set. FIG. 12- (2) shows resources (file name “b.txt”) assigned to an application whose library is managed by another application information instance “2” different from that of FIG. 12- (1).
File) and a new resource recovery instance 9
03 is generated.

【0038】以下図13を用いて、資源提供の処理をさ
らに詳しく説明する。図13は、各ライブラリ部が行う
資源提供の処理を示すフローチャートである。各ライブ
ラリ部は、アプリケーションから資源の提供を要求され
ると、要求に応じて資源を確保し(S1001)、アプリケ
ーション管理部23bから当該アプリケーションに対応
するアプリケーション情報インスタンスを取得する(S1
002)。次に保持している資源回収インスタンスの1つ
を取り出し(S1003)、アプリケーション管理部23bか
ら取得したアプリケーション情報インスタンスと取り出
された資源回収インスタンスに保持されるアプリケーシ
ョン情報インスタンスを比較する(S1004)。アプリケ
ーション情報インスタンスが一致する場合(S1004:Y)
は、当該アプリケーション情報インスタンスを保持する
資源回収インスタンスに確保した資源の資源名を保持し
(S1005)、確保した資源を当該アプリケーションに提
供する(S1009)。一方、S1004において、アプリケーシ
ョン情報インスタンスが一致しない場合(S1004:N)に
は、保持している他の全ての資源回収インスタンスに対
してアプリケーション情報インスタンスの比較を行い
(S1006)、一致するものがなければ(S1006:Y)、新た
に資源回収インスタンスを生成し、生成した資源回収イ
ンスタンスに、アプリケーション管理部23bから取得
したアプリケーション情報インスタンスと確保した資源
の資源名を組にして保持し(S1007)、生成した資源回
収インスタンスを資源の確保を要求したアプリケーショ
ンに対応するアプリケーション情報インスタンスに登録
し(S1008)、確保した資源をアプリケーションに提供
する(S1009)。
Hereinafter, the resource providing process will be described in more detail with reference to FIG. FIG. 13 is a flowchart illustrating a resource providing process performed by each library unit. When each application is requested to provide resources by an application, each library reserves resources in response to the request (S1001) and acquires an application information instance corresponding to the application from the application management unit 23b (S1).
002). Next, one of the held resource collection instances is extracted (S1003), and the application information instance acquired from the application management unit 23b is compared with the application information instance held in the extracted resource collection instance (S1004). When the application information instances match (S1004: Y)
Holds the resource name of the secured resource in the resource collection instance that holds the application information instance (S1005), and provides the secured resource to the application (S1009). On the other hand, in S1004, if the application information instances do not match (S1004: N), the application information instances are compared with all other held resource recovery instances (S1006), and there is no match. If (S1006: Y), a new resource recovery instance is generated, and the generated resource recovery instance holds the application information instance acquired from the application management unit 23b and the resource name of the secured resource as a set (S1007). The generated resource recovery instance is registered in the application information instance corresponding to the application that has requested the resource reservation (S1008), and the reserved resource is provided to the application (S1009).

【0039】次に資源回収の処理について説明する。ラ
イブラリ部は、アプリケーション終了又は中断時に当該
アプリケーション識別子を格納するアプリケーション情
報インスタンスから対応する資源回収インスタンスのメ
ソッドが呼び出されると、当該資源回収インスタンスに
保持されている資源名に対応する資源を回収する。上記
の場合において、アプリケーション情報インスタンスに
アプリケーションの状態を知るためのメソッド(以下ア
プリケーション状態メソッドという。)と資源回収イン
スタンスの登録を削除するメソッドとを用意した場合の
資源回収の処理について説明する。図14は、アプリケ
ーション情報インスタンスがアプリケーション状態メソ
ッドを有している場合のライブラリ部が行う回収の処理
を示すフローチャートである。ライブラリ部は、アプリ
ケーション情報インスタンスから登録した資源回収イン
スタンスのメソッドが呼び出されると、資源回収インス
タンスに保持されているアプリケーション情報インスタ
ンスのアプリケーション状態メソッドを呼び出し、アプ
リケーションが中断されたのか、終了されたかの情報を
取得し(S1101)、取得した情報に基いて資源を回収す
るか否かを判定し(S1102)、資源を回収する場合は、
当該資源回収インスタンスに保持されている資源名に対
応する資源を回収し(S1103)、当該資源回収インスタ
ンスの登録を削除するメソッドを呼び出し、当該メソッ
ドを実行することにより、当該資源回収インスタンスを
解放する(S1104)。
Next, resource recovery processing will be described. When the method of the corresponding resource recovery instance is called from the application information instance that stores the application identifier when the application is terminated or suspended, the library unit recovers the resource corresponding to the resource name held in the resource recovery instance. In the above case, a description will be given of a resource collection process when a method for knowing the state of an application (hereinafter referred to as an application state method) and a method for deleting the registration of the resource collection instance are prepared in the application information instance. FIG. 14 is a flowchart illustrating a collection process performed by the library unit when the application information instance has an application state method. When the method of the resource recovery instance registered from the application information instance is called, the library unit calls the application state method of the application information instance held in the resource recovery instance, and determines whether the application has been suspended or terminated. Acquisition (S1101), it is determined whether or not to collect resources based on the acquired information (S1102).
The resource corresponding to the resource name held in the resource collection instance is collected (S1103), a method for deleting the registration of the resource collection instance is called, and the resource collection instance is released by executing the method. (S1104).

【0040】なお、S1102における判定は、アプリケー
ションが使用している全ての資源ではなく、特定の一部
の資源を回収するという判定であってもよい。この場
合、S1104における資源回収インスタンスの解放は、全
ての資源が回収されたときに行われる。 (実施の形態3)本実施の形態におけるアプリケーショ
ン実行装置は、アプリケーション毎にスレッドを生成
し、生成したスレッドでアプリケーションが要求する資
源を確保し、アプリケーションが終了する毎に終了した
アプリケーションに提供した資源の解放を、生成したス
レッドと対応付けられたタスク単位でOS部が行うことに
より、不要な資源を回収し、Javaミドルウェア(いわゆ
るバーチャルマシン)を終了することなく次のアプリケ
ーションの実行を可能とするものである。ここで、「ス
レッド」とは、アプリケーションのプログラムコードを
逐次実行するコンテキスト(一連の処理の流れ)であ
る。Javaで記述されたアプリケーションは、複数のスレ
ッドを生成し、それぞれのスレッドがアプリケーション
のプログラムコードを並行して実行させることができ
る。本実施形態において、「タスク」とは、アプリケー
ションを実行する複数のスレッドの集合である。本実施
形態においてアプリケーションに割当てられる資源は、
この「タスク」と関連づけて管理される。
Note that the determination in S1102 may be a determination that some specific resources are to be collected instead of all resources used by the application. In this case, the release of the resource collection instance in S1104 is performed when all the resources have been collected. (Embodiment 3) The application execution apparatus according to the present embodiment generates a thread for each application, secures a resource requested by the application with the generated thread, and provides a resource provided to the terminated application each time the application ends. Release of unnecessary resources by the OS unit by the task unit associated with the created thread, enabling execution of the next application without terminating Java middleware (so-called virtual machine) Things. Here, the “thread” is a context (a flow of a series of processes) for sequentially executing the program code of the application. An application written in Java can generate a plurality of threads, and each thread can execute the application program code in parallel. In the present embodiment, a “task” is a set of a plurality of threads that execute an application. In this embodiment, the resources allocated to the application are:
It is managed in association with this “task”.

【0041】以下、本アプリケーション実行装置の実施
の形態について図面を用いて詳細に説明する。図15
は、アプリケーション実行装置30の構成を示すブロッ
ク図である。アプリケーション実行装置30は、アプリ
ケーション入力部11、アプリケーション記憶部12、
Javaミドルウェア部33、OS部34、ハードウェア部3
5、指示通知部36で構成される。アプリケーション入
力部11、アプリケーション記憶部12は、実施形態1
の実行装置10に含まれるものと同一であるので、説明
を省略する。
Hereinafter, embodiments of the present application execution apparatus will be described in detail with reference to the drawings. FIG.
3 is a block diagram illustrating a configuration of the application execution device 30. The application execution device 30 includes an application input unit 11, an application storage unit 12,
Java middleware section 33, OS section 34, hardware section 3
5. An instruction notification unit 36 is provided. The application input unit 11 and the application storage unit 12 correspond to the first embodiment.
Are the same as those included in the execution device 10 of FIG.

【0042】Javaミドルウェア部33は、VM(バーチャ
ルマシン)部33a、アプリケーション管理部33b、ク
ラスライブラリ格納部33cから構成され、アプリケー
ション記憶部12が記憶するアプリケーションを実行す
る。VM部33aは、アプリケーションを実行する。具体
的には、VM部33aは、以下に示す処理を行う。バイト
コードで記述されたアプリケーションをハードウェア部
35に含まれるCPU35aが実行できるバイナリコードに
逐次翻訳し、翻訳したバイナリコードをCPU35aに実行
させる。
The Java middleware unit 33 includes a VM (virtual machine) unit 33a, an application management unit 33b, and a class library storage unit 33c, and executes an application stored in the application storage unit 12. The VM unit 33a executes an application. Specifically, the VM unit 33a performs the following processing. The application described in the bytecode is sequentially translated into a binary code executable by the CPU 35a included in the hardware unit 35, and the translated binary code is executed by the CPU 35a.

【0043】また、VM部33aは、自己の動作とアプリ
ケーションの実行に必要な資源を確保する。具体的に
は、VM部33aは、クラスライブラリ格納部33cに含ま
れる各クラスライブラリ部を呼び出し、各クラスライブ
ラリ部を介して自己の動作に必要な資源を確保する。ま
た、アプリケーション実行中にアプリケーションから資
源の確保を要求されると、クラスライブラリ格納部33
cに含まれる各クラスライブラリ部を呼び出し、各クラ
スライブラリ部を介してアプリケーションが要求した資
源を確保する。
The VM unit 33a secures resources necessary for its own operation and application execution. Specifically, the VM unit 33a calls each class library unit included in the class library storage unit 33c, and secures resources necessary for its own operation via each class library unit. Further, when the application requests to secure resources during execution of the application, the class library storage unit 33
Call each class library section included in c, and secure resources requested by the application via each class library section.

【0044】また、VM部33aは、アプリケーションか
ら処理の終了したスレッドの削除を要求されると、カー
ネル34aに依頼してスレッドを削除させる。アプリケ
ーション管理部33bは、アプリケーション起動の処
理、アプリケーション実行中に追加又は削除されるスレ
ッドの管理、アプリケーション終了の処理を行う。
When the application requests deletion of the thread whose processing has been completed, the VM unit 33a requests the kernel 34a to delete the thread. The application management unit 33b performs a process of starting an application, managing a thread added or deleted during execution of the application, and a process of terminating the application.

【0045】最初に、アプリケーション起動の処理につ
いて説明する。アプリケーション管理部33bは、指示
通知部36からアプリケーションの開始指示を受ける
と、カーネル34aにタスクと、タスクに属する最初の
スレッドを生成させ、VM部33aに生成した最初のスレ
ッドで、アプリケーションを実行させることにより、VM
部33aの動作に必要な資源を確保させ、アプリケーシ
ョンを起動させる。
First, the process of starting the application will be described. Upon receiving the application start instruction from the instruction notification unit 36, the application management unit 33b causes the kernel 34a to generate a task and the first thread belonging to the task, and causes the VM unit 33a to execute the application with the generated first thread. By the VM
Resources required for the operation of the unit 33a are secured, and the application is started.

【0046】次にアプリケーション実行中に追加又は削
除されるスレッドの管理について説明する。アプリケー
ション管理部33bは、アプリケーションとアプリケー
ションに対応して生成されたタスクとタスクを構成する
スレッドとの対応関係を示すテーブルを保持し、アプリ
ケーションの要求によりスレッドが追加又は削除される
毎にテーブルを更新することにより、スレッドをアプリ
ケーションとタスクに対応づけて管理する。図16にテ
ーブルの例を示す。図16―(1)では2つのアプリケ
ーションが実行中であり、アプリケーションID「1」の
アプリケーションに対し、タスクID「201」のタスク
が生成され、タスクID「201」のタスクはスレッドID
「1」と「2」のスレッドで構成され、アプリケーショ
ンID「2」のアプリケーションに対し、タスクID「20
2」のタスクが生成され、タスクID「202」のタスク
はスレッドID「4」、「5」、「6」のスレッドにより
構成されていることを示し、図16−(2)は、アプリ
ケーションID「1」のアプリケーションを実行中に、新
たなスレッド(スレッドID「7」のスレッド)が生成さ
れ、生成されたスレッドのスレッドID「7」がテーブル
に追加されたことを示し、図16−(3)は、アプリケ
ーション「2」のアプリケーションを実行中にスレッド
ID「5」のスレッドが削除されたことを示す。
Next, management of a thread added or deleted during execution of an application will be described. The application management unit 33b holds a table indicating a correspondence relationship between an application, a task generated corresponding to the application, and a thread configuring the task, and updates the table each time a thread is added or deleted at the request of the application. By doing so, threads are managed in association with applications and tasks. FIG. 16 shows an example of the table. In FIG. 16- (1), two applications are being executed, a task with a task ID “201” is generated for an application with an application ID “1”, and a task with a task ID “201” is a thread ID.
It is composed of threads “1” and “2”, and the task ID “20” is assigned to the application ID “2”.
The task of task ID "202" is generated, and the task of task ID "202" is composed of threads with thread IDs "4", "5", and "6". While the application of “1” is being executed, a new thread (thread of thread ID “7”) is generated, and the thread ID “7” of the generated thread is added to the table, and FIG. 16- ( 3) is a thread while executing the application of application “2”.
This indicates that the thread with ID “5” has been deleted.

【0047】最後に、アプリケーション終了の処理につ
いて説明する。図17は、アプリケーション終了時にア
プリケーション管理部33bが行う処理を示すフローチ
ャートである。アプリケーション管理部33bは、指示
通知部36からアプリケーション終了の指示を受ける
と、カーネル34aに終了したアプリケーションに対応
するタスクのIDを通知し、資源回収を依頼し(S801)、
次に、クラスライブラリ格納部33cに含まれる各クラ
スライブラリ部に終了するアプリケーションのIDを通知
し(S802)、最後に終了したアプリケーションに対応す
るタスクを生成するために確保したメモリを解放してタ
スクを終了させる(S803)ことにより、アプリケーショ
ン終了の処理を行う。例えば、図16−(3)の例で
は、アプリケーションID「2」のアプリケーションが終
了した場合、アプリケーション管理部33bは、カーネ
ル34aにアプリケーションID「2」に対応するタスクI
D「202」を通知し、カーネル34aにタスクID「20
2」に対応する資源の回収を依頼し、次にクラスライブ
ラリ部に終了したアプリケーションID「2」を通知し、
最後にメモリを解放して生成したタスク「202」及び
その中に含まれるスレッド「4」と「6」を終了させ
る。
Finally, the process of terminating the application will be described. FIG. 17 is a flowchart illustrating a process performed by the application management unit 33b when the application ends. Upon receiving the application termination instruction from the instruction notification unit 36, the application management unit 33b notifies the kernel 34a of the ID of the task corresponding to the terminated application, and requests resource recovery (S801).
Next, the ID of the application to be terminated is notified to each class library unit included in the class library storage unit 33c (S802). (S803), the application is terminated. For example, in the example of FIG. 16- (3), when the application with the application ID “2” ends, the application management unit 33b stores the task I corresponding to the application ID “2” in the kernel 34a.
D “202” is notified and the task ID “20” is sent to the kernel 34a.
Requesting the collection of resources corresponding to "2", and then notifying the class library unit of the terminated application ID "2",
Finally, the task “202” generated by releasing the memory and the threads “4” and “6” included therein are terminated.

【0048】クラスライブラリ格納部33cは、複数の
クラスライブラリ部33c1〜33cnからなり、各クラ
スライブラリ部は、ハードウェア部35に含まれる資源
であるデバイスを制御し、資源提供の処理、リスナーの
管理とリスナーの呼び出しの処理を行う。実際には、ク
ラスライブラリ格納部33cは、ROMやハードディスクな
どで構成され、各クラスライブラリ部では、デバイス制
御用のプログラムであるクラス群に記述されたプログラ
ムがアプリケーションに呼び出されて実行されることに
よりデバイスの制御が実現されている。
The class library storage unit 33c is composed of a plurality of class library units 33c1 to 33cn. Each class library unit controls a device which is a resource included in the hardware unit 35, performs resource provision processing, and manages a listener. And the process of calling the listener. Actually, the class library storage unit 33c is configured by a ROM, a hard disk, or the like. In each class library unit, a program described in a class group as a device control program is called by an application and executed. Device control is realized.

【0049】最初に、各クラスライブラリ部が行う資源
提供の処理について説明する。クラスライブラリ部は、
VM部33aが実行するアプリケーションから呼び出さ
れ、資源であるデバイスの提供を要求されると、OS部3
4のライブラリ格納部34bに格納される当該デバイス
に対応するライブラリ部を呼び出し、要求された資源を
提供する。
First, the resource providing process performed by each class library unit will be described. The class library part is
When called by an application executed by the VM unit 33a and requested to provide a device as a resource, the OS unit 3
And calls the library unit corresponding to the device stored in the library storage unit 34b of No. 4 and provides the requested resource.

【0050】次に各クラスライブラリ部が行うリスナー
管理の処理について説明する。クラスライブラリ部は、
VM部33aが実行するアプリケーションから呼び出さ
れ、リスナー登録され、登録されたリスナーを呼び出す
処理をするスレッド(以後専用スレッドと呼ぶ。)を生
成する。クラスライブラリ部による専用スレッドの生成
はアプリケーションを実行しているスレッドで実行され
る。クラスライブラリ部は、アプリケーションを実行し
ているタスクに属するスレッドとして、リスナーを呼び
出す専用スレッドを生成する。
Next, the listener management process performed by each class library unit will be described. The class library part is
The thread is called from an application executed by the VM unit 33a, registered as a listener, and generates a thread (hereinafter, referred to as a dedicated thread) for performing a process of calling the registered listener. The generation of the dedicated thread by the class library unit is executed by the thread executing the application. The class library section generates a dedicated thread for calling the listener as a thread belonging to the task executing the application.

【0051】ここで、リスナーとはイベント(ユーザー
によってリモコン入力操作がされたことやモデムが相手
先から切断されたことなどによるデバイスの状態変化)
が発生したことの連絡を待ち受けるクラスまたはインタ
ーフェースであり、リスナーには、イベントがあった時
に呼び出されるメソッドが定義され、当該メソッドを呼
び出し、メソッドを実行することによりイベントの処理
が行われる。登録されたリスナーは、イベント発生時に
呼び出される。例えば、ユーザーによるリモコン操作入
力等のイベントがあったときに登録されたリスナーに定
義されたメソッドが呼び出され、呼び出されたメソッド
を実行することによってイベントが処理される。また、
「リスナー登録」とは、アプリケーションが「イベント
が発生すれば、当該アプリケーションに通知してくれる
ように」当該イベントを監視するクラスライブラリ部に
依頼することをいう。上記の通知は、当該クラスライブ
ラリ部がリスナー登録時に当該リスナーに定義されるメ
ソッドを呼び出すことにより実行される。
Here, the listener is an event (a change in the state of the device due to a remote control input operation performed by the user or a disconnection of the modem from the other party).
Is a class or interface that waits for notification of the occurrence of an event. A method to be called when an event occurs is defined in the listener, and the event is processed by calling the method and executing the method. The registered listener is called when an event occurs. For example, when an event such as a remote control operation input by the user occurs, a method defined in the registered listener is called, and the event is processed by executing the called method. Also,
“Listener registration” means that the application requests the class library unit that monitors the event to “notify the application when an event occurs”. The above notification is executed by the class library unit calling a method defined for the listener when the listener is registered.

【0052】また、クラスライブラリ部はリスナー登録
される際、アプリケーション管理部33bを呼び出し、
リスナー登録をするアプリケーションのIDを取得する。
アプリケーション管理部33bは、以下の処理を行うこ
とによりアプリケーションのIDを特定し、クラスライブ
ラリ部に特定したIDを提供する。アプリケーション管理
部33bは呼び出しを行ったスレッドのスレッドクラス
のインスタンスを取得し、当該インスタンスからインス
タンスが保持するハッシュコード値を取り出すメソッド
であるhashcode関数を用いて、呼び出しを行ったインス
タンスのID(スレッドID)を特定し、アプリケーション
管理部33bが管理するアプリケーションIDとスレッド
IDの対応関係を示すテーブルから、スレッドIDに対応す
るアプリケーションIDを特定し、クラスライブラリ部に
特定したIDを提供する。ここで、取り出されるハッシュ
コード値は、VM部33aが効率よく、クラスから生成さ
れたインスタンスを管理できるように、各インスタンス
に割り振った識別番号(ID)である。各クラスライブラ
リ部は、アプリケーション管理部33bから提供された
アプリケーションIDと生成した専用スレッドのIDと登録
されたリスナーのIDとを対応付けてテーブルに保持す
る。
When a listener is registered, the class library unit calls the application management unit 33b,
Fetch the ID of the application that performs listener registration.
The application management unit 33b specifies the ID of the application by performing the following processing, and provides the specified ID to the class library unit. The application management unit 33b obtains an instance of the thread class of the thread that has made the call, and uses the hashcode function that is a method for extracting the hash code value held by the instance from the instance, and uses the hashcode function to call the ID (thread ID) of the instance that made the call. ), And the application ID and thread managed by the application management unit 33b.
The application ID corresponding to the thread ID is specified from the table showing the ID correspondence, and the specified ID is provided to the class library unit. Here, the extracted hash code value is an identification number (ID) assigned to each instance so that the VM unit 33a can efficiently manage the instances generated from the class. Each class library unit stores the application ID provided from the application management unit 33b, the ID of the generated dedicated thread, and the registered listener ID in a table in association with each other.

【0053】図18は、クラスライブラリ部が行うリス
ナー管理の処理を示すフローチャートである。クラスラ
イブラリ部は、VM部33aが実行するアプリケーション
からリスナー登録のために呼び出されると、アプリケー
ション管理部33bを呼び出し、リスナー登録をするア
プリケーションのIDを取得し(S501)、登録されたリス
ナー、専用スレッド、アプリケーションIDの対応関係を
示すテーブルから、アプリケーションIDと専用スレッド
とリスナーの組の1つを取り出し(S502)、当該アプリ
ケーションIDと取得したアプリケーションIDを比較する
(S503)。
FIG. 18 is a flowchart showing a listener management process performed by the class library unit. When called from the application executed by the VM unit 33a for listener registration, the class library unit calls the application management unit 33b to acquire the ID of the application for which listener registration is to be performed (S501). Then, one of the set of the application ID, the dedicated thread, and the listener is extracted from the table indicating the correspondence between the application IDs (S502), and the application ID and the acquired application ID are compared (S503).

【0054】IDが一致する場合(S503:Y)は、当該IDに
対応付けて新たにリスナー登録されたリスナーをテーブ
ルに追加する(S504)。IDが不一致の場合(S503:N)
は、テーブルに保持されている次の組を取り出し(S50
5、S502)、同様の処理を繰り返す。IDが一致する場合
がなく、IDの比較を終了すると(S505:Y)、新たに登
録されたリスナーに対応する専用スレッドを生成し(S5
06)、取得したアプリケーションIDと生成した専用スレ
ッドと新たに登録されたリスナーの組をテーブルに追加
し、保持する(S507)。
If the IDs match (S503: Y), a newly registered listener is added to the table in association with the ID (S504). If the IDs do not match (S503: N)
Retrieves the next set held in the table (S50
5, S502), and repeat the same processing. If the IDs do not match and the ID comparison ends (S505: Y), a dedicated thread corresponding to the newly registered listener is generated (S5).
06), a set of the acquired application ID, the generated dedicated thread, and the newly registered listener is added to the table and held (S507).

【0055】これにより、テーブルに保持されたアプリ
ケーションが複数回リスナー登録をする場合に、アプリ
ケーションに対応する専用スレッドをテーブルから特定
することができ、アプリケーションによって登録された
複数のリスナーを、特定した1つの専用スレッドに対応
させてテーブルにまとめて保持することができる。従っ
て、1つの専用スレッドから対応する複数のリスナーを
呼び出すことができるので、アプリケーションからリス
ナー登録される毎に専用のスレッドを生成する必要がな
く、生成するスレッドの数を少なくすることができる。
Thus, when the application held in the table registers the listener a plurality of times, the dedicated thread corresponding to the application can be specified from the table, and the plurality of listeners registered by the application can be identified by the specified one. It can be stored in a table corresponding to one dedicated thread. Therefore, a plurality of corresponding listeners can be called from one dedicated thread, so that it is not necessary to create a dedicated thread every time a listener is registered from an application, and the number of threads to be created can be reduced.

【0056】図19は、クラスライブラリ部が保持する
テーブルの例である。図19−(1)は、アプリケーシ
ョンID「1」のアプリケーションがリスナー「L1」とリ
スナー「L4」を登録し、これらのリスナーに対応する専
用スレッド「thread10」が生成されていることを示す。
図19−(2)は、図19−(1)のテーブルにリスナ
ー「L6」が登録されて、テーブルが更新されたことを示
す。具体的には、リスナー「L6」がリスナー登録される
と、クラスライブラリ部は、アプリケーション管理部3
3bを呼び出して、リスナー登録をしたアプリケーショ
ンのアプリケーションIDを取得し(ここでは、ID「2」
を取得したものとする。)、図19−(1)のテーブル
に保持されるアプリケーションID「1」と一致するか否
かを判定し、一致しないと判定すると、新規に専用スレ
ッドを生成し、生成した専用スレッド「thread20」とア
プリケーションID「2」とリスナー「L6」とを対応させ
てテーブルに保持する。図19−(3)は、アプリケー
ションID「1」のアプリケーションが終了し、テーブル
に保持されていたアプリケーションID「1」と対応する
専用スレッド「thread10」、リスナー「L1」とリスナー
「L4」とがテーブルから削除されたことを示す。
FIG. 19 shows an example of a table held by the class library unit. FIG. 19- (1) shows that the application with the application ID “1” has registered the listeners “L1” and “L4”, and the dedicated thread “thread10” corresponding to these listeners has been generated.
FIG. 19- (2) shows that the listener “L6” has been registered in the table of FIG. 19- (1) and the table has been updated. Specifically, when the listener “L6” is registered as a listener, the class library unit
3b to obtain the application ID of the application that registered the listener (here, ID “2”
Shall be obtained. ), It is determined whether or not it matches the application ID “1” held in the table of FIG. 19- (1). If it does not match, a new dedicated thread is created and the created dedicated thread “thread20” is created. And the application ID “2” and the listener “L6” are stored in a table in association with each other. In FIG. 19- (3), the application having the application ID “1” is terminated, and the dedicated thread “thread10” corresponding to the application ID “1” held in the table, the listener “L1” and the listener “L4” are displayed. Indicates that it was deleted from the table.

【0057】次にイベントが発生してから、クラスライ
ブラリ部が専用スレッドから登録されたリスナーを呼び
出すまでに行われる処理について説明する。この処理
は、2つの処理から構成される。最初に行われる処理
は、イベントが発生したことを通知する処理であり、こ
の処理は、OS部34により生成されたスレッドにより実
行される。図20は、イベントが発生したことを通知す
る処理を示すフローチャートである。クラスライブラリ
部は、OS部34のライブラリ格納部34bに含まれるラ
イブラリ部からイベントがあったことを通知されると、
アプリケーションIDと専用スレッドと登録されたリスナ
ーとの組を保持したテーブルから組の1つを取り出し
(S601)、取り出した組の専用スレッドのキューにリス
ナー呼び出しに必要な呼び出し情報を保持する(S60
2)。ここで、キューは、スレッド間の情報伝達を行
い、「情報を1つ保持する」、「情報を1つ取り出す」
という2つの操作をすることができる。同様の処理をテ
ーブルに保持する全ての組について行う(S601〜S60
3)。
Next, processing performed from the occurrence of an event until the class library unit calls the registered listener from the dedicated thread will be described. This process is composed of two processes. The first process is a process of notifying that an event has occurred. This process is executed by a thread generated by the OS unit 34. FIG. 20 is a flowchart illustrating a process of notifying that an event has occurred. When the class library unit is notified of the event from the library unit included in the library storage unit 34b of the OS unit 34,
One of the sets is extracted from the table holding the set of the application ID, the dedicated thread, and the registered listener (S601), and the queue of the dedicated thread of the extracted set holds the call information necessary for calling the listener (S60).
2). Here, the queue transmits information between threads, and “holds one piece of information” and “takes out one piece of information”.
Two operations can be performed. The same process is performed for all the sets held in the table (S601 to S60
3).

【0058】次に行われる処理は、登録されたリスナー
を呼び出す処理であり、この処理は、クラスライブラリ
部が生成した専用スレッドにより実行される。図21
は、クラスライブラリ部が行うリスナー呼び出しの処理
を示すフローチャートである。リクラスライブラリ部
は、専用スレッドを実行させることにより、キューに呼
び出し情報が保持されているか否かを監視し(S701)、
キューに呼び出し情報があれば(S701:Y)、それを取り出
し(S702)、テーブルから専用スレッドに対応するリス
ナーを特定し(S703)、リスナーを呼び出す(S704)。
専用スレッドに対応するリスナーが複数ある場合は、こ
のリスナー呼び出し処理(S703、S704)を対応する全て
のリスナーについて行う(S703〜S705)。図22は、キ
ューを用いて専用スレッドからリスナーを呼び出す手順
の例を模式化した図である。
The next process is a process for calling the registered listener. This process is executed by a dedicated thread generated by the class library unit. FIG.
9 is a flowchart showing a listener call process performed by the class library unit. The reclass library unit monitors whether or not the call information is held in the queue by executing the dedicated thread (S701),
If there is call information in the queue (S701: Y), it is extracted (S702), a listener corresponding to the dedicated thread is specified from the table (S703), and the listener is called (S704).
When there are a plurality of listeners corresponding to the dedicated thread, the listener calling process (S703, S704) is performed for all the corresponding listeners (S703 to S705). FIG. 22 is a diagram schematically illustrating an example of a procedure for calling a listener from a dedicated thread using a queue.

【0059】図22において、411、412はそれぞ
れ、図19の専用スレッド「thread10」と専用スレッド
「thread20」に対して用意されたキューを示す。また、
401、402はそれぞれ、専用スレッド「thread10」
と専用スレッド「thread20」を示し、403はOS部34
のライブラリ格納部34bに格納されるライブラリ部か
らイベントが発生したことを通知するOS部34により生
成されたスレッドであり、破線421、422は情報を
保持させることを示し、黒丸431、432は保持され
た情報を示し、破線441、442は保持された情報を
取り出すことを示す。
In FIG. 22, reference numerals 411 and 412 denote queues prepared for the dedicated thread "thread10" and the dedicated thread "thread20" in FIG. Also,
401 and 402 are dedicated threads “thread10”, respectively.
403 indicates the OS thread 34
Are threads generated by the OS unit 34 for notifying that an event has occurred from the library unit stored in the library storage unit 34b. And the broken lines 441 and 442 indicate that the held information is to be retrieved.

【0060】クラスライブラリ部は、ライブラリ部から
イベントが発生したことをスレッド403により通知さ
れると、リスナー呼び出しに必要な情報(431、43
2)をキュー411、412に保持させる(421、4
22)。専用スレッド401、402は、キュー41
1、412に情報が保持されているか否かを監視し、情
報が保持されていると、その情報を取り出し対応するリ
スナーを呼び出す。すなわち、専用スレッド401はリ
スナー「L1」とリスナー「L4」を、専用スレッド402
はリスナー「L6」を呼び出す。
When the thread 403 notifies the class library that an event has occurred, the class library receives information (431, 43) necessary for calling the listener.
2) are held in the queues 411 and 412 (421 and 4).
22). The dedicated threads 401 and 402
It is monitored whether or not information is held in 1, 412. If the information is held, the information is retrieved and the corresponding listener is called. That is, the dedicated thread 401 sets the listener “L1” and the listener “L4” to the dedicated thread 402
Calls the listener "L6".

【0061】OS部34は、カーネル34aとライブラリ
格納部34bから構成され、Javaミドルウェア部33を
動作させることにより、アプリケーションを間接的に動
作させる。カーネル34aは、アプリケーションに提供
された資源をアプリケーションに対応するタスク単位で
管理する。具体的には、カーネル34aは、アプリケー
ション管理部33bからの指示により、アプリケーショ
ンに対応するタスクとタスクに属する最初のスレッドを
生成し、最初のスレッドでVM部33aの動作に必要な資
源を確保する。またアプリケーションが要求するスレッ
ドを生成し、生成したスレッドでアプリケーションが要
求する資源を提供し、提供した資源の資源名をスレッド
が属するタスクIDに対応付けて保持する。アプリケーシ
ョン管理部33aから終了したアプリケーションに対応
するタスクIDの通知を受けると、通知されたタスクIDに
対応づけて保持された資源名の資源を全て回収する。
The OS section 34 is composed of a kernel 34a and a library storage section 34b, and operates the application indirectly by operating the Java middleware section 33. The kernel 34a manages resources provided to the application in units of tasks corresponding to the application. Specifically, the kernel 34a generates a task corresponding to the application and a first thread belonging to the task according to an instruction from the application management unit 33b, and secures resources necessary for the operation of the VM unit 33a in the first thread. . In addition, a thread requested by the application is generated, a resource requested by the application is provided by the generated thread, and a resource name of the provided resource is held in association with a task ID to which the thread belongs. When the notification of the task ID corresponding to the terminated application is received from the application management unit 33a, all the resources of the resource name held in association with the notified task ID are collected.

【0062】ライブラリ格納部34bは、資源であるデ
バイスを制御する複数のライブラリ部34b1〜34bn
からなる。各ライブラリ部は、ハードウェア部35の対
応するデバイスを制御する(例えばライブラリ部34b1
は、デバイス35b1を、ライブラリ部34b2は、デバイ
ス35b2を制御する。)。実際にはライブラリ格納部3
4bは、ROMやハードディスクで構成され、各ライブラリ
部では、デバイス制御用の関数群を記述したプログラム
がクラスライブラリのクラスに呼び出されて実行される
ことによりデバイスの制御が実現されている。
The library storage section 34b includes a plurality of library sections 34b1 to 34bn for controlling devices as resources.
Consists of Each library unit controls a device corresponding to the hardware unit 35 (for example, the library unit 34b1
Controls the device 35b1, and the library unit 34b2 controls the device 35b2. ). Actually library storage unit 3
Reference numeral 4b denotes a ROM or a hard disk, and in each library unit, a program describing a device control function group is called by a class of a class library and executed to implement device control.

【0063】ハードウェア部35は、OS部34やJavaミ
ドルウェア部33を動作させるCPU35a及びデバイス3
5b1〜35bnで構成される。CPU35aは、カーネル
34aが生成したスレッドを実行することによりアプリ
ケーションのプログラムコードを実行する。デバイス3
5b1〜35bnは、メモリーデバイス、ディスプレイデ
バイス、入力デバイス(キーボード、リモコン等)、フ
ァイルシステム、ネットワークデバイスなどを含み、各
デバイスはクラスライブラリ及びライブラリ部を介して
なされるアプリケーションからの制御に応じて作動す
る。
The hardware unit 35 includes a CPU 35 a for operating the OS unit 34 and the Java middleware unit 33 and the device 3.
5b1 to 35bn. The CPU 35a executes the application program code by executing the thread generated by the kernel 34a. Device 3
5b1 to 35bn include a memory device, a display device, an input device (keyboard, remote controller, etc.), a file system, a network device, and the like. Each device operates according to control from an application performed through a class library and a library unit. I do.

【0064】指示通知部36は、アプリケーションの開
始及び終了をアプリケーション管理部33bに指示す
る。具体的には、アプリケーション管理部33bにアプ
リケーション開始の指示をし、外部からアプリケーショ
ン終了の指示を受けると、アプリケーション管理部33
bにアプリケーションの終了を指示する。以上、本発明
の実施の形態について説明したが、本発明はこの実施の
形態に限定されないのは言うまでもない。
The instruction notifying section 36 instructs the application management section 33b to start and end the application. Specifically, the application management unit 33b instructs the application management unit 33b to start the application, and receives an instruction to end the application from the outside.
Instruct b to terminate the application. The embodiments of the present invention have been described above, but it is needless to say that the present invention is not limited to the embodiments.

【0065】なお、図21のフローチャートでは、クラ
スライブラリは専用スレッドを実行させて、常にキュー
に呼び出し情報が保持されているか否かを監視する(S7
01)としたが、S701において、専用スレッドをウエイト
状態にして、キューに呼び出し情報が保持されたとき
に、専用スレッドのウエイト状態を解除し、専用スレッ
ドを実行させて、S702〜S705の処理を行わせることとし
てもよい。これにより、資源を効率的に利用することが
できる。
In the flowchart of FIG. 21, the class library executes a dedicated thread and constantly monitors whether or not the call information is held in the queue (S7).
01), the dedicated thread is put into a wait state in S701, and when the call information is held in the queue, the wait state of the dedicated thread is released, the dedicated thread is executed, and the processing in S702 to S705 is performed. It may be performed. Thereby, resources can be used efficiently.

【0066】なお、図17のS801とS802は順序を逆にし
てもよい。また、アプリケーション毎に生成されるスレ
ッドの数は図16の例に限らない。この例より多くても
少なくてもよい。また、本実施の形態において、資源の
管理は、カーネル34aが行うとしたが、ライブラリ格
納部34bに含まれる各ライブラリ部が行うこととして
もよい。この場合、資源供給の際にカーネル34aに資
源を供給するタスクを問い合わせ、カーネル34aより
当該タスクのIDの通知を受けると、通知を受けたタスク
IDと供給する資源の資源名を組にして保持し、カーネル
34aより特定のタスクIDの資源回収の指示があると、
指示されたタスクIDに対応する資源名を保持した組から
特定し、特定した資源名の資源を回収する。また、本実
施の形態においては、VM部33aは、アプリケーション
を実行するタスクに含まれる最初のスレッドでVM部33
aに必要な資源が確保されるとしたが、アプリケーショ
ンを実行するスレッドから独立したシステム専用スレッ
ドをクラスライブラリ部に生成させ、生成させたシステ
ム専用スレッドで必要な資源を確保することとしてもよ
い。この場合のクラスライブラリ部の行う処理を図23
を用いて説明する。図23は、VM部33aがシステム専
用のスレッドを獲得する処理を示すフローチャートであ
る。クラスライブラリ部は、アプリケーションを実行す
るスレッドで、実行すべき処理(例えばアプリケーショ
ンが要求する資源を提供)し(S5401)、次にシステム
専用のスレッドを生成し(S5402)、生成したシステム
専用スレッドで実行すべき処理(例えばVM部33aに必要
な資源を提供する処理)を実行し(S5403)、処理が終了
すると処理結果をアプリケーションに通知する(S540
4)。アプリケーションを実行するスレッドとシステム
専用のスレッドの処理は、任意の回数、交互に繰り返し
実行してもよいし、並行して実行してもよい。また、S5
404の通知は、不要としてもよい。
The order of S801 and S802 in FIG. 17 may be reversed. Further, the number of threads generated for each application is not limited to the example in FIG. There may be more or less than this example. In the present embodiment, the resource management is performed by the kernel 34a, but may be performed by each library unit included in the library storage unit 34b. In this case, when the resource is supplied, the kernel 34a is inquired about the task for supplying the resource, and when the ID of the task is received from the kernel 34a, the notified task is received.
The ID and the resource name of the resource to be supplied are held as a set, and when there is an instruction to recover the resource of a specific task ID from the kernel 34a,
The resource name corresponding to the designated task ID is specified from the set holding the resource name, and the resource having the specified resource name is collected. Further, in the present embodiment, the VM unit 33a uses the first thread included in the task for executing the application in the VM unit 33a.
Although the resources required for a are reserved, the class library unit may generate a system-specific thread independent of the thread that executes the application, and the generated system-specific threads may reserve the necessary resources. The processing performed by the class library unit in this case is shown in FIG.
This will be described with reference to FIG. FIG. 23 is a flowchart illustrating a process in which the VM unit 33a acquires a thread dedicated to the system. The class library unit executes processing to be executed (for example, provides resources required by the application) with a thread that executes the application (S5401), and then generates a system-specific thread (S5402). A process to be executed (for example, a process for providing a necessary resource to the VM unit 33a) is executed (S5403), and when the process is completed, the result of the process is notified to the application (S540).
Four). The process of the thread that executes the application and the process of the thread dedicated to the system may be executed alternately and repeatedly an arbitrary number of times, or may be executed in parallel. Also, S5
The notification of 404 may be unnecessary.

【0067】これにより、VM部33aが必要とする資源
は、システム専用のスレッドで確保されるので、VM部3
3aはアプリケーションが終了しても自己に必要な資源
を再取得することなく、次のアプリケーションを実行す
ることができる。また、上記のシステム専用スレッドで
クラスライブラリ部が自己に必要な資源を確保すること
としてもよい。例えば、図19に例として示すアプリケ
ーションIDとスレッドインスタンスとリスナーインスタ
ンスの対応関係を示すテーブルを保持するのに必要なメ
モリを上記システム専用スレッドで確保することとして
もよい。
As a result, the resources required by the VM unit 33a are secured by a thread dedicated to the system.
3a can execute the next application without reacquiring the resources necessary for itself even if the application ends. In addition, the class library section may secure necessary resources for itself by the above-mentioned system dedicated thread. For example, the system-dedicated thread may reserve a memory necessary to hold a table indicating the correspondence between the application ID, the thread instance, and the listener instance shown in FIG. 19 as an example.

【0068】また、本実施の形態においては、クラスラ
イブラリ部が専用のスレッドを生成するとしたが、アプ
リケーション実行中に画面に描画するための機能を提供
するComponentクラスからComponentインスタンスを生成
する時にも生成したインスタンスに格納されるpaintメ
ソッドを呼び出すための呼び出し用スレッドを生成する
こととしてもよい。さらに、アプリケーションによるリ
スナー登録のためのクラスライブラリ部による専用スレ
ッドの生成をアプリケーション起動時に完了することと
してもよい。
In the present embodiment, the class library unit creates a dedicated thread. However, the thread is also created when a Component instance is provided from a Component class that provides a function for drawing on a screen during execution of an application. A calling thread for calling the paint method stored in the instance may be generated. Furthermore, the generation of the dedicated thread by the class library unit for the listener registration by the application may be completed when the application is started.

【0069】これにより、クラスライブラリ部はリスナ
ー登録する毎に専用スレッドの有無を確認する必要がな
くなり、リスナー登録の処理を短時間で完了することが
できる。 (実施の形態4)本実施の形態におけるアプリケーショ
ン実行装置においては、各ライブラリ部がアプリケーシ
ョンに提供する資源の回収を行い、アプリケーションが
終了等する毎にアプリケーションが使用した資源を回収
する。
This eliminates the need for the class library unit to check for the presence of a dedicated thread every time a listener is registered, and can complete the listener registration process in a short time. (Embodiment 4) In the application execution apparatus according to the present embodiment, each library section collects resources provided to the application, and collects resources used by the application each time the application is terminated.

【0070】具体的には、以下の処理を行う。各ライブ
ラリ部は各クラスライブラリ部を介してアプリケーショ
ンから資源の提供を要求されると、要求された資源を提
供し、各クラスライブラリ部に資源を要求したアプリケ
ーションのIDを取得し、取得したアプリケーションIDと
提供した資源の資源名とを組にしてテーブルに保持す
る。ライブラリ部は、カーネル44aより終了したアプ
リケーションIDの通知を受けると、通知されたアプリケ
ーションIDに対応する資源名を、保持しているテーブル
から特定し、特定した資源名の資源を全て回収する。
Specifically, the following processing is performed. When each library section is requested to provide a resource from an application via each class library section, the library section provides the requested resource, obtains the ID of the application that requested the resource from each class library section, and obtains the obtained application ID. And the resource name of the provided resource as a set, and retains the set in the table. Upon receiving the notification of the terminated application ID from the kernel 44a, the library unit specifies the resource name corresponding to the notified application ID from the held table, and collects all the resources with the specified resource name.

【0071】以下本アプリケーション実行装置の実施の
形態について、図面を用いて説明する。図24は、アプ
リケーション実行装置40の構成を示すブロック図であ
る。アプリケーション実行装置40は、アプリケーショ
ン入力部11、アプリケーション記憶部12、Javaミド
ルウェア部43、OS部44、ハードウェア部45、指示
通知部46から構成される。
Hereinafter, embodiments of the present application execution apparatus will be described with reference to the drawings. FIG. 24 is a block diagram illustrating a configuration of the application execution device 40. The application execution device 40 includes an application input unit 11, an application storage unit 12, a Java middleware unit 43, an OS unit 44, a hardware unit 45, and an instruction notification unit 46.

【0072】アプリケーション入力部11、アプリケー
ション記憶部12は、実施形態1の実行装置10に含ま
れるものと同一であるので、説明を省略する。Javaミド
ルウェア部43は、VM部43a、アプリケーション管理
部43b、クラスライブラリ格納部43cから構成され、
アプリケーション記憶部42が記憶するアプリケーショ
ンを実行する。
The application input unit 11 and the application storage unit 12 are the same as those included in the execution device 10 according to the first embodiment, and the description is omitted. The Java middleware unit 43 includes a VM unit 43a, an application management unit 43b, and a class library storage unit 43c.
The application stored in the application storage unit 42 is executed.

【0073】VM部43aはアプリケーション記憶部12
からアプリケーションをロードし、アプリケーションの
バイトコードを逐次解析し、アプリケーションを実行す
る。アプリケーション管理部43bは、VM部43bが実行
するアプリケーションの起動の処理、実行中のアプリケ
ーションの管理、アプリケーション終了の処理を行う。
The VM unit 43a stores the application storage unit 12
Load the application from, sequentially analyze the bytecode of the application, and execute the application. The application management unit 43b performs a process of starting the application executed by the VM unit 43b, a management of the running application, and a process of terminating the application.

【0074】はじめにアプリケーション起動の処理につ
いて説明する。アプリケーション管理部43bは、クラ
スローダのインスタンスをアプリケーション毎に生成
し、クラスローダのインスタンスを用いてアプリケーシ
ョンを構成する全てのクラスファイルをロードする。こ
こで、クラスローダは、Javaプログラムで使用されるク
ラスファイルをメモリに読み込むクラスである。
First, the process of starting the application will be described. The application management unit 43b generates an instance of a class loader for each application, and loads all class files constituting the application using the instance of the class loader. Here, the class loader is a class that reads a class file used in a Java program into a memory.

【0075】次に実行中のアプリケーションの管理につ
いて説明する。アプリケーション管理部43bは、起動
したアプリケーションを構成するクラスファイルをロー
ドするクラスローダのインスタンスと当該アプリケーシ
ョンに割当てられたIDを組にしたテーブルを保持する。
なお、IDはOS部44のカーネル44aによって、起動さ
れたアプリケーション毎にそれぞれ異なるIDが割当てら
れる。図25は、アプリケーション管理部43bが保持
するクラスローダのインスタンスと対応するアプリケー
ションIDを組にしたテーブルの例を示す。
Next, management of a running application will be described. The application management unit 43b holds a table in which an instance of a class loader that loads a class file configuring the started application and an ID assigned to the application are set.
Note that a different ID is assigned to each of the launched applications by the kernel 44a of the OS unit 44. FIG. 25 shows an example of a table in which an application ID corresponding to an instance of a class loader held by the application management unit 43b is set.

【0076】次にアプリケーション終了の処理について
説明する。アプリケーション管理部43bは、制御部4
6からアプリケーション終了の指示を受けると、カーネ
ル44aとクラスライブラリ格納部43cが格納するクラ
スライブラリ部に終了するアプリケーションIDを通知す
る。アプリケーション管理部43bは、さらに資源をア
プリケーションに提供したクラスライブラリ部から呼び
出され、当該アプリケーションのアプリケーションID通
知の要求があると、以下の処理を行って当該アプリケー
ションIDを特定し、クラスライブラリに通知する。
Next, the process of terminating the application will be described. The application management unit 43b controls the control unit 4
When the application termination instruction is received from 6, the kernel 44 a and the class library unit stored in the class library storage unit 43 c are notified of the application ID to be terminated. The application management unit 43b is further called from the class library unit that has provided resources to the application, and upon receiving a request for notification of the application ID of the application, performs the following processing to identify the application ID and notifies the class library. .

【0077】アプリケーション管理部43bは、クラス
の呼び出し情報を格納したスタックを参照し、アプリケ
ーションをロードしたクラスローダのインスタンスを取
得し、保持しているテーブルから取得したクラスローダ
のインスタンスに対応するアプリケーションIDを特定
し、特定したアプリケーションIDを当該クラスライブラ
リ部に通知する。ここで、スタックは、クラスのメソッ
ドの作業領域として割当てられるメモリ領域であり、メ
ソッドの呼び出しによりクラスの呼び出しが行われる毎
に、呼び出されたクラスの作業領域がスタック中に割当
てられ、スタック中に呼び出し情報を保持するクラスが
順番に格納される。呼び出し情報には、メソッドの呼び
出し元を特定する情報が格納される。
The application management unit 43b refers to the stack storing the call information of the class, acquires an instance of the class loader loaded with the application, and acquires the application ID corresponding to the instance of the class loader acquired from the held table. And notifies the class library unit of the specified application ID. Here, the stack is a memory area that is allocated as a work area of a method of the class. Each time a class is called by a method call, the work area of the called class is allocated in the stack. Classes that hold call information are stored in order. The call information stores information that specifies the caller of the method.

【0078】以下具体例を挙げて、アプリケーションID
を特定する処理について詳しく説明する。図26はアプ
リケーション管理部43bが生成したクラスローダのイ
ンスタンスとスタックとの関係を示す模式図である。こ
こでは、クラスローダのインスタンス6301がアプリ
ケーションを構成するクラスAのメソッドを呼び出し、
呼び出されたクラスAがアプリケーションを構成する別
のクラスBのメソッドを呼び出し、次にクラスBがアプリ
ケーションを構成する別のクラスCを呼び出し、最後に
クラスCがクラスライブラリ部に格納するクラスDのメソ
ッドを呼び出し、資源の確保を要求した場合の例を用い
て説明する。この場合、スタック中には、呼び出しがさ
れる毎に、呼び出されたクラスの作業領域が割当てら
れ、割当てられた作業領域に呼び出し情報が格納され
る。6300は、アプリケーション管理部43bが管理
するクラスローダの格納場所を表し、ここでは、2つの
クラスローダ6301と6302が格納されている。6
310は、スタックを表し、6311〜6314はスタ
ック6310に格納されているクラスA〜Dに保持された
呼び出し情報を示す。アプリケーション管理部43b
は、クラスDに呼び出されたクラスライブラリ部からア
プリケーションIDの特定要求があると、スタック631
0に格納された呼び出し情報6314〜6311を順に
参照することにより、アプリケーションをロードしたク
ラスローダのインスタンス6301を取得する。アプリ
ケーション管理部43bは、保持しているテーブルを参
照し、取得したクラスローダのインスタンスに対応する
アプリケーションIDを特定する。
The application ID will be described below using a specific example.
The process of specifying the is described in detail. FIG. 26 is a schematic diagram showing a relationship between a class loader instance generated by the application management unit 43b and a stack. Here, the class loader instance 6301 calls the method of the class A constituting the application,
The called class A calls the method of another class B that constitutes the application, then class B calls another class C that constitutes the application, and finally the method of class D that class C stores in the class library section Will be described using an example in which a request for securing resources is made. In this case, the work area of the called class is allocated in the stack every time a call is made, and the call information is stored in the allocated work area. Reference numeral 6300 denotes a storage location of a class loader managed by the application management unit 43b. Here, two class loaders 6301 and 6302 are stored. 6
Reference numeral 310 denotes a stack, and 6311 to 6314 indicate call information stored in the classes A to D stored in the stack 6310. Application management unit 43b
When there is a request for specifying an application ID from the class library unit called by the class D, the stack 631
By sequentially referring to the call information 6314 to 6311 stored in “0”, an instance 6301 of the class loader loaded with the application is acquired. The application management unit 43b refers to the held table and specifies the application ID corresponding to the acquired class loader instance.

【0079】クラスライブラリ格納部43cは、複数の
クラスライブラリ部43c1〜43cnからなり、各クラ
スライブラリ部は、ライブラリ格納部44bに含まれる
対応する各ライブラリ部を介して、ハードウェア部45
に含まれる資源である各デバイスを制御する。実際に
は、クラスライブラリ格納部43cは、ROMやハードディ
スクなどで構成され、各クラスライブラリ部では、各デ
バイス制御用のプログラムであるクラス群に記述された
プログラムがアプリケーションに呼び出されて実行され
ることにより各デバイスの制御が実現されている。
The class library storage unit 43c is composed of a plurality of class library units 43c1 to 43cn.
To control each device which is a resource included in. Actually, the class library storage unit 43c is configured by a ROM, a hard disk, or the like, and in each class library unit, a program described in a class group, which is a program for controlling each device, is called by an application and executed. Controls the respective devices.

【0080】各クラスライブラリ部は、アプリケーショ
ンから呼び出され、資源であるデバイスの提供を要求さ
れると、ライブラリ格納部44bに含まれる当該デバイ
スに対応するライブラリ部を呼び出し、要求された資源
を当該アプリケーションに提供する。さらに、クラスラ
イブラリ部は当該アプリケーションのアプリケーション
IDをアプリケーション管理部44bから取得し、当該ラ
イブラリ部に取得したアプリケーションIDを通知する。
When each class library unit is called from an application and requested to provide a device as a resource, the class library unit corresponding to the device included in the library storage unit 44b is called, and the requested resource is stored in the application application. To provide. Further, the class library section is an application of the application.
The ID is acquired from the application management unit 44b, and the acquired application ID is notified to the library unit.

【0081】カーネル44aは、アプリケーション管理
部43bからアプリケーション終了の通知と終了したア
プリケーションのアプリケーションIDの通知を受け、各
ライブラリ部に受け取ったアプリケーションIDを通知
し、資源の回収を指示する。ライブラリ格納部44b
は、デバイスを制御する複数のライブラリ部44b1〜4
4bnからなる。各ライブラリ部は、ハードウェア部4
5の対応するデバイスを制御する(例えばライブラリ部
44b1は、デバイス45b1を、ライブラリ部44b2は、
デバイス45b2を制御する。)。
The kernel 44a receives the notification of the application termination and the notification of the application ID of the terminated application from the application management unit 43b, notifies each library unit of the received application ID, and instructs the resource collection. Library storage unit 44b
Are a plurality of library units 44b1 to 44b4 for controlling devices.
4bn. Each library unit has a hardware unit 4
5 (for example, the library unit 44b1 controls the device 45b1, and the library unit 44b2 controls the device 45b1.
The device 45b2 is controlled. ).

【0082】実際にはライブラリ格納部44bは、ROMや
ハードディスクで構成され、各ライブラリ部では、デバ
イス制御用の関数群を記述したプログラムが各クラスラ
イブラリ部のクラスに呼び出されて実行されることによ
り資源であるデバイスの制御が実現されている。具体的
には、各ライブラリ部はクラスライブラリ部からの呼び
出しに応じて、アプリケーションに対して資源を提供
し、クラスライブラリ部から当該アプリケーションのア
プリケーションIDの通知を受け、提供した資源の資源名
と受け取ったアプリケーションIDを組にしてテーブルに
保持する。カーネル44aより終了したアプリケーショ
ンのアプリケーションIDの通知を受けると、保持してい
るテーブルから通知を受けたアプリケーションIDに対応
する資源名を特定し、特定した資源名の資源を回収す
る。図27は、提供した資源の資源名とアプリケーショ
ンIDを組にしたテーブルの一例である。ここでは、ライ
ブラリ部が2つのアプリケーションに資源(ファイル)
を提供していることを示す。
Actually, the library storage section 44b is constituted by a ROM or a hard disk. In each library section, a program describing a function group for device control is called by a class of each class library section and executed. Control of a device as a resource is realized. Specifically, each library unit provides resources to the application in response to a call from the class library unit, receives a notification of the application ID of the application from the class library unit, receives the resource name of the provided resource, and The set of application IDs is stored in a table. When the notification of the application ID of the terminated application is received from the kernel 44a, the resource name corresponding to the notified application ID is specified from the held table, and the resource of the specified resource name is collected. FIG. 27 is an example of a table in which a resource name of a provided resource and an application ID are paired. In this example, the library unit provides resources (files) to two applications.
Is provided.

【0083】なお、本実施形態においては、各ライブラ
リ部が提供した資源の資源名とアプリケーションIDを組
にしたテーブルを保持することとしたが、カーネル44
aがテーブルを保持することとしてもよい。また、本実
施形態においては、カーネル44aがアプリケーションI
Dを生成することとしているので、複数のミドルウェア
を同時に動作させる場合においても、2つのミドルウェ
アがそれぞれ個別にIDを生成することにより生じるIDの
重複を防ぐことができ、カーネル44aが正しく資源を
管理することができる。 (実施の形態5)図28は、本発明の実施の形態における
アプリケーション実行装置100の構成を示すブロック
図である。アプリケーション実行装置100は、アプリ
ケーション/クラスライブラリ記憶部101、アプリケ
ーション管理部102、VM(Virtual Machine)部10
3、メモリヒープ管理部104、メモリ105を備え
る。ここで、メモリヒープ管理部104は、オブジェク
ト領域獲得部104a、分割ヒープ領域獲得部104b、
分割ヒープ領域解放部104c、GC部104d、ロック部
104e、メモリヒープ領域管理テーブル104fを備
える。
In this embodiment, a table in which the resource names of the resources provided by the respective library units and the application IDs are set is held.
a may hold a table. Also, in the present embodiment, the kernel 44a
Since D is generated, even when multiple middlewares are operated simultaneously, ID duplication caused by two middlewares generating IDs individually can be prevented, and the kernel 44a manages resources correctly. can do. (Embodiment 5) FIG. 28 is a block diagram showing a configuration of an application execution apparatus 100 according to an embodiment of the present invention. The application execution device 100 includes an application / class library storage unit 101, an application management unit 102, a VM (Virtual Machine) unit 10
3. It includes a memory heap management unit 104 and a memory 105. Here, the memory heap management unit 104 includes an object area acquisition unit 104a, a divided heap area acquisition unit 104b,
The system includes a divided heap area release unit 104c, a GC unit 104d, a lock unit 104e, and a memory heap area management table 104f.

【0084】メモリ105は、複数の分割ヒープ領域1
05a〜105nを含むメモリヒープ領域を有する。各
分割ヒープ領域は、1つのアプリケーションに対応して
設けられ、対応するアプリケーションに関連するオブジ
ェクトを保持するための領域である。アプリケーション
個別に分割ヒープ領域が設けられるのは、1回のガベー
ジコレクションの対象領域をメモリヒープ領域全体では
なく分割ヒープ領域単位にするためである。加えて、ア
プリケーション終了時にはメモリヒープ領域は分割ヒー
プ領域単位に解放される。
The memory 105 has a plurality of divided heap areas 1
05a to 105n. Each divided heap area is provided corresponding to one application and is an area for holding an object related to the corresponding application. The reason why the divided heap area is provided for each application is that the target area of one garbage collection is not a whole memory heap area but a divided heap area unit. In addition, when the application ends, the memory heap area is released in divided heap area units.

【0085】アプリケーション/クラスライブラリ記憶
部101は複数のアプリケーション及び既存のクラスラ
イブラリを記憶する。アプリケーション管理部102
は、外部からアプリケーションの起動及び終了の指示を
受け、VM部103に当該アプリケーションの起動及び
終了を指示する。また、アプリケーション管理部102
は、アプリケーションが終了すると、分割ヒープ領域解
放部104cに当該アプリケーションに関連するオブジ
ェクトが配置された分割ヒープ領域の解放を指示する。
The application / class library storage unit 101 stores a plurality of applications and an existing class library. Application management unit 102
Receives an instruction to start and end the application from outside, and instructs the VM unit 103 to start and end the application. The application management unit 102
Instructs the divided heap area release unit 104c to release the divided heap area in which the objects related to the application are arranged when the application ends.

【0086】VM部103は、アプリケーション管理部
102からアプリケーションの起動指示を受けると、当
該アプリケーション用に分割ヒープ領域の割り当てをメ
モリヒープ管理部104に行なわせ、割り当てられた分
割ヒープ領域にアプリケーション/クラスライブラリ記
憶部101から当該アプリケーションをロードするとと
もにロードしたアプリケーションを実行する。
Upon receiving the application start instruction from the application management unit 102, the VM unit 103 causes the memory heap management unit 104 to allocate a divided heap area for the application, and stores the application / class in the allocated divided heap area. The application is loaded from the library storage unit 101 and the loaded application is executed.

【0087】より詳しく説明すると、アプリケーション
のロードは、第1にクラスローダオブジェクトのロー
ド、第2にアプリケーションに関連する個々のオブジェ
クトのロードに分けられる。まず、クラスローダオブジ
ェクトのロードについて説明する。VM部103は、ア
プリケーション管理部102から上記アプリケーション
起動指示として、当該アプリケーション用のクラスロー
ダオブジェクトの生成指示を受け、当該クラスローダオ
ブジェクト用のオブジェクト領域の獲得指示(以下、第
1獲得指示と呼ぶ。)をオブジェクト領域獲得部104
aに出力する。ここで、クラスローダオブジェクトと
は、対応するアプリケーションに関連するオブジェクト
をアプリケーション/クラスライブラリ記憶部101か
ら分割ヒープ領域にロードするためのオブジェクトであ
る。
More specifically, the loading of an application can be divided into firstly loading a class loader object and secondly loading individual objects related to the application. First, loading of the class loader object will be described. The VM unit 103 receives an instruction to generate a class loader object for the application as the application activation instruction from the application management unit 102, and acquires an object area for the class loader object (hereinafter, referred to as a first acquisition instruction). ) To the object area acquisition unit 104
output to a. Here, the class loader object is an object for loading an object related to a corresponding application from the application / class library storage unit 101 into the divided heap area.

【0088】VM部103は、第1獲得指示に対して、
オブジェクト領域獲得部104aから、分割ヒープ領域
の割り当て及びオブジェクト領域の割り当てを受ける
と、アプリケーション/クラスライブラリ記憶部101
から当該オブジェクト領域にクラスローダオブジェクト
をロードして当該クラスローダオブジェクトを実行す
る。
The VM unit 103 responds to the first acquisition instruction
Upon receiving the allocation of the divided heap area and the allocation of the object area from the object area obtaining unit 104a, the application / class library storage unit 101
And loads the class loader object into the object area and executes the class loader object.

【0089】次に、アプリケーションに関連する個々の
オブジェクトのロードについて説明する。VM部103
は、このクラスローダオブジェクトを実行することによ
り、対応するアプリケーションに関連する個々のオブジ
ェクトをアプリケーション/クラスライブラリ記憶部1
01からオブジェクト領域獲得部104aによって割り
当てられたオブジェクト領域にロードする。すなわち、
VM部103は、対応するアプリケーションに関連する
オブジェクトについてオブジェクト領域の獲得指示(以
下、第2獲得指示と呼ぶ)をオブジェクト領域獲得部1
04aに出力し、第2獲得指示に対する応答として、オ
ブジェクト領域獲得部104aからオブジェクト領域の
割り当てを受けると、アプリケーション/クラスライブ
ラリ記憶部101から当該オブジェクト領域にオブジェ
クトをロードして当該オブジェクトを実行する。上記第
2獲得指示は、クラスローダオブジェクト以外のオブジ
ェクトに対するオブジェクト領域の獲得指示であって、
実行中のアプリケーションから他のオブジェクトの生成
要求があればVM部103から出力される。
Next, loading of individual objects related to the application will be described. VM unit 103
Executes this class loader object to store individual objects related to the corresponding application in the application / class library storage unit 1.
From 01, the data is loaded into the object area allocated by the object area obtaining unit 104a. That is,
The VM unit 103 sends an object area acquisition instruction (hereinafter, referred to as a second acquisition instruction) for an object related to the corresponding application to the object area acquisition unit 1.
When the object area is allocated from the object area acquisition unit 104a as a response to the second acquisition instruction, the object is loaded from the application / class library storage unit 101 to the object area and the object is executed. The second acquisition instruction is an instruction to acquire an object area for an object other than the class loader object,
If there is a request to generate another object from the running application, the object is output from the VM unit 103.

【0090】オブジェクト領域獲得部104aは、VM部
103からの第1獲得指示を受けると、分割ヒープ領域
獲得部104bに分割ヒープ領域の獲得を指示して分割
ヒープ領域の割り当てを受けると、当該分割ヒープ領域
内にクラスローダオブジェクト領域を獲得し、当該クラ
スローダオブジェクト領域をVM部103に通知する。
When receiving the first acquisition instruction from the VM unit 103, the object area acquisition unit 104a instructs the divided heap area acquisition unit 104b to acquire a divided heap area, and receives the allocation of the divided heap area. The class loader object area is acquired in the heap area, and the class loader object area is notified to the VM unit 103.

【0091】メモリヒープ管理テーブル104fは、分
割ヒープ領域獲得部104bによって獲得された分割ヒ
ープ領域に関する情報(以下分割ヒープ領域情報と呼
ぶ。)から構成される。図29に示すように各分割ヒー
プ領域情報は、分割ヒープ領域のID、分割ヒープ領域に
ロードされるクラスローダオブジェクトのID、分割ヒー
プ領域の先頭アドレス、分割ヒープ領域全体のサイズ、
分割ヒープ領域中の未使用領域を示す自由領域の先頭ア
ドレス、当該分割ヒープ領域中の自由領域のサイズから
構成される。メモリヒープ管理テーブル104fへの分
割ヒープ領域情報の新規登録は、分割ヒープ領域獲得部
104bがオブジェクト領域獲得部104aからの分割
ヒープ領域の獲得の指示を受けて分割ヒープ領域を獲得
した時に、分割ヒープ領域獲得部104bによって行わ
れる。 上記の分割ヒープ領域情報中の自由領域の先頭
アドレス及び分割ヒープ領域中の自由領域のサイズに関
する情報は、VM部103からの第1又は第2獲得指示に
よってオブジェクト領域獲得部104aがオブジェクト
領域を獲得する毎に更新される。又アプリケーション終
了後、アプリケーション管理部102の指示に応じて分
割ヒープ領域解放部104cが終了したアプリケーショ
ンに割当てられた分割ヒープ領域を解放した際に、当該
分割ヒープ領域に関する分割ヒープ領域情報はメモリヒ
ープ管理テーブル104fから削除される。
The memory heap management table 104f is composed of information on the divided heap area acquired by the divided heap area acquiring unit 104b (hereinafter, referred to as divided heap area information). As shown in FIG. 29, each divided heap area information includes an ID of the divided heap area, an ID of a class loader object loaded in the divided heap area, a start address of the divided heap area, a size of the entire divided heap area,
It is composed of the start address of a free area indicating an unused area in the divided heap area, and the size of the free area in the divided heap area. The new registration of the divided heap area information in the memory heap management table 104f is performed when the divided heap area acquiring unit 104b acquires the divided heap area in response to the instruction to acquire the divided heap area from the object area acquiring unit 104a. This is performed by the area acquisition unit 104b. The information about the start address of the free area in the divided heap area information and the size of the free area in the divided heap area is obtained by the object area obtaining unit 104a by the first or second obtaining instruction from the VM unit 103. It is updated every time. When the divided heap area release unit 104c releases the divided heap area allocated to the terminated application according to an instruction from the application management unit 102 after the application is terminated, the divided heap area information on the divided heap area is stored in the memory heap management. It is deleted from the table 104f.

【0092】また、オブジェクト領域獲得部104a
は、VM部103からの第2獲得指示を受けると、当該第
2獲得指示の要求元アプリケーションをロードしたクラ
スローダオブジェクトを特定し、特定したクラスローダ
オブジェクトに対応する分割ヒープ領域をメモリヒープ
領域管理テーブル104fを参照して特定(例えば特定
したクラスローダがCL2である場合には、分割ヒープ領
域bを特定)し、特定した分割ヒープ領域内でオブジェ
クト領域の獲得を試みる。オブジェクト領域獲得部10
4aは特定した分割ヒープ領域からオブジェクト領域を
獲得できた場合、当該オブジェクト領域をVM部103
に通知し、メモリヒープ管理テーブル104fの当該分
割ヒープ領域の情報(当該分割ヒープ領域中の自由領域
の先頭アドレス、当該分割ヒープ領域中の自由領域のサ
イズ)を更新する。
The object area obtaining unit 104a
Receives the second acquisition instruction from the VM unit 103, identifies the class loader object loaded with the application requesting the second acquisition instruction, and manages the divided heap area corresponding to the identified class loader object in the memory heap area management. With reference to the table 104f, identification is performed (for example, when the identified class loader is CL2, the divided heap area b is identified), and an attempt is made to acquire an object area within the identified divided heap area. Object area acquisition unit 10
4a, when an object area can be obtained from the specified divided heap area, the object area is stored in the VM unit 103
To update the information of the divided heap area (the start address of the free area in the divided heap area, the size of the free area in the divided heap area) in the memory heap management table 104f.

【0093】一方、オブジェクト領域獲得部104a
は、当該分割ヒープ領域からオブジェクト領域を獲得で
きなかった場合は、GC部104dに対し、当該分割ヒー
プ領域のガベージコレクションを指示し、ガベージコレ
クション終了後に再度オブジェクト領域の獲得を試み
る。分割ヒープ領域獲得部104bは、オブジェクト領
域獲得部104aからの分割ヒープ領域獲得指示を受け
ると、メモリヒープ領域から分割ヒープ領域を獲得す
る。分割ヒープ領域獲得部104bは、獲得した分割ヒ
ープ領域105aの情報をクラスローダオブジェクトのI
Dと組にしてヒープメモリ領域管理テーブル104fに
登録する。
On the other hand, the object area obtaining unit 104a
If the object area cannot be acquired from the divided heap area, the garbage collection unit instructs the GC unit 104d to perform garbage collection of the divided heap area, and attempts to acquire the object area again after the garbage collection ends. Upon receiving the divided heap region acquisition instruction from the object region acquiring unit 104a, the divided heap region acquiring unit 104b acquires the divided heap region from the memory heap region. The divided heap area acquisition unit 104b transmits the information of the acquired divided heap area 105a to the class loader object
A pair with D is registered in the heap memory area management table 104f.

【0094】分割ヒープ領域解放部104cは、アプリ
ケーション管理部102からアプリケーションの終了を
指示されると、アプリケーション管理部102からの分
割ヒープ領域の解放指示に応じて、終了したアプリケー
ションをロードしたクラスローダオブジェクトに対応す
る分割ヒープ領域をメモリヒープ領域管理テーブル10
4fから特定し、特定した分割ヒープ領域を解放し、解
放した分割ヒープ領域の情報(解放した分割ヒープ領域
のID、当該分割ヒープ領域に対応するクラスローダオブ
ジェクトのID、当該分割ヒープ領域の先頭アドレス、当
該分割ヒープ領域全体のサイズ、当該分割ヒープ領域中
の自由領域の先頭アドレス、当該分割ヒープ領域中の自
由領域のサイズとそれに対応するクラスローダオブジェ
クトのID)をメモリヒープ領域管理テーブル104fか
ら削除する。
Upon receiving an instruction to terminate the application from the application management unit 102, the divided heap area release unit 104c, in response to the instruction to release the divided heap area from the application management unit 102, loads the class loader object loaded with the terminated application. Heap area corresponding to the memory heap area management table 10
4f, the specified divided heap area is released, information on the released divided heap area (the ID of the released divided heap area, the ID of the class loader object corresponding to the divided heap area, the start address of the divided heap area) , The size of the entire divided heap area, the start address of the free area in the divided heap area, the size of the free area in the divided heap area, and the ID of the class loader object corresponding thereto) from the memory heap area management table 104f. I do.

【0095】GC部104dは、オブジェクト領域獲得部
104aの指示に応じて分割ヒープ領域のガベージコレ
クションを行う。ロック部104eは、GC部104dが
分割ヒープ領域のガベージコレクションを行っている
間、当該分割ヒープ領域を使用するアプリケーションの
実行を停止する。
The GC unit 104d performs garbage collection of the divided heap area according to an instruction from the object area obtaining unit 104a. The lock unit 104e stops the execution of the application using the divided heap area while the GC unit 104d performs the garbage collection of the divided heap area.

【0096】図30は、VM部103よりオブジェクト領
域獲得指示(第1獲得指示又は第2獲得指示)を受けた
後のアプリケーション実行装置100によるオブジェク
ト領域獲得動作を示すフローチャートを示す。オブジェ
クト領域獲得部104aは、VM部からのオブジェクト領
域獲得指示が第1(クラスローダオブジェクト)獲得指
示か第2(クラスローダ以外のオブジェクト)獲得指示
かを判定する(S1301)。
FIG. 30 is a flowchart showing an object area obtaining operation by the application execution apparatus 100 after receiving an object area obtaining instruction (first obtaining instruction or second obtaining instruction) from the VM unit 103. The object area acquisition unit 104a determines whether the object area acquisition instruction from the VM unit is a first (class loader object) acquisition instruction or a second (object other than the class loader) acquisition instruction (S1301).

【0097】第1獲得指示の場合(S1301:Y)、オブジ
ェクト領域獲得部104aは、当該クラスローダオブジ
ェクトに対応する分割ヒープ領域の獲得を分割ヒープ領
域獲得部104bに要求し、分割ヒープ領域獲得部10
4bは、メモリ105から分割ヒープ領域を獲得する
(S1302)。分割ヒープ領域獲得部104bは、図29
の例に示す通り、メモリヒープ領域管理テーブル104
fに当該クラスローダオブジェクトのIDと獲得した分割
ヒープ領域の情報を組にして登録する(S1303)。次に
オブジェクト領域獲得部104aは、分割ヒープ領域獲
得部104bが獲得した分割ヒープ領域内に当該クラス
ローダオブジェクトのオブジェクト領域を獲得し(S130
6、S1307)、当該分割ヒープ領域に対応するメモリヒー
プ領域管理テーブル104fの情報を更新する(S130
9)。
In the case of the first acquisition instruction (S1301: Y), the object area acquiring unit 104a requests the divided heap area acquiring unit 104b to acquire a divided heap area corresponding to the class loader object, and the divided heap area acquiring unit 10
4b acquires a divided heap area from the memory 105 (S1302). The divided heap area acquisition unit 104b
As shown in the example of FIG.
The ID of the class loader object and the acquired information of the divided heap area are registered as a group in f (S1303). Next, the object area acquiring unit 104a acquires an object area of the class loader object in the divided heap area acquired by the divided heap area acquiring unit 104b (S130).
6, S1307), and updates information in the memory heap area management table 104f corresponding to the divided heap area (S130).
9).

【0098】第2獲得指示の場合(S1301:N)、オブジ
ェクト領域獲得部104aは、VM部103から当該オブ
ジェクトが保有するクラスローダIDを取得し(S130
4)、メモリヒープ領域管理テーブル104fから上記
クラスローダIDに対応する分割ヒープ領域を特定する
(S1305)。次に、オブジェクト領域獲得部104aは、
特定した分割ヒープ領域内にオブジェクト領域を獲得す
る(S1306)。オブジェクト領域獲得部104aは、オブ
ジェクト領域の獲得に成功したか否かを判定する(S130
7)。
In the case of the second acquisition instruction (S1301: N), the object area acquiring unit 104a acquires the class loader ID held by the object from the VM unit 103 (S130).
4) A divided heap area corresponding to the class loader ID is specified from the memory heap area management table 104f (S1305). Next, the object area acquiring unit 104a
An object area is acquired in the specified divided heap area (S1306). The object area obtaining unit 104a determines whether the object area has been successfully obtained (S130).
7).

【0099】オブジェクト領域獲得部104aは、オブ
ジェクト領域の獲得に成功した場合(S1307:Y)、当該
分割ヒープ領域に対応するメモリヒープ領域管理テーブ
ル104fの情報を更新する(S1309)。オブジェクト
領域獲得部104aは、オブジェクト領域の獲得に失敗
した場合(S1307:N)、GC部104dに獲得に失敗した
分割ヒープ領域内のガベージコレクションを行うことを
指示する。GC部104dは指示に応じて当該分割ヒープ
領域のガベージコレクション処理を行う(S1308)。GC
部104dがガベージコレクション処理を行っている
間、ロック部104eは、当該分割ヒープ領域を使用す
るアプリケーションの実行を停止する。オブジェクト領
域獲得部104aはガベージコレクション処理後、再度
当該分割ヒープ領域からオブジェクト領域を獲得し(S3
06)、オブジェクト領域の獲得に成功した場合(S1307:
Y)、当該分割ヒープ領域に対応するメモリヒープ領域
管理テーブル104fの情報を更新する(S1309)。
When the object area has been successfully obtained (S1307: Y), the object area obtaining unit 104a updates the information of the memory heap area management table 104f corresponding to the divided heap area (S1309). If the acquisition of the object area has failed (S1307: N), the object area acquisition unit 104a instructs the GC unit 104d to perform garbage collection in the divided heap area that failed to acquire. The GC unit 104d performs garbage collection processing of the divided heap area according to the instruction (S1308). GC
While the unit 104d is performing the garbage collection process, the lock unit 104e stops the execution of the application using the divided heap area. After the garbage collection process, the object area acquisition unit 104a acquires an object area from the divided heap area again (S3
06), if the acquisition of the object area is successful (S1307:
Y), the information of the memory heap area management table 104f corresponding to the divided heap area is updated (S1309).

【0100】このように、アプリケーション管理装置1
00においては、生成したオブジェクトを配置するため
のオブジェクト領域をアプリケーション毎に分割したメ
モリサイズの小さい分割ヒープ領域として割当てるた
め、GC部104dによる1回のガベージコレクション処
理の負荷を軽減することができる。又、VM部103が複
数のアプリケーションを実行させている場合、ロック部
104fは分割ヒープ領域のガベージコレクション処理
の実行中、当該分割ヒープ領域を使用するアプリケーシ
ョンだけを停止させるため、VM部103はその他の分割
ヒープ領域を使用しているアプリケーションを引き続き
実行させることができる。
As described above, the application management apparatus 1
In 00, since the object area for arranging the generated objects is allocated as a divided heap area having a small memory size divided for each application, the load of one garbage collection process by the GC unit 104d can be reduced. When the VM unit 103 is executing a plurality of applications, the lock unit 104f stops only the application that uses the divided heap area during the garbage collection process of the divided heap area. The application using the divided heap area can be continuously executed.

【0101】図31は、アプリケーション終了時のアプ
リケーション実行装置100による分割ヒープ領域の解
放の動作を示すフローチャートである。アプリケーショ
ン管理部102は、アプリケーションが終了すると、分
割ヒープ領域解放部104cに、終了したアプリケーシ
ョンをロードしたクラスローダオブジェクトに対応する
分割ヒープ領域の解放を指示する(S1401)。分割ヒー
プ領域解放部104cは、メモリヒープ領域管理テーブ
ル104fから当該アプリケーションをロードしたクラ
スローダオブジェクトに対応する分割ヒープ領域を特定
し(S1402)、その情報に基いて当該分割ヒープ領域を
解放する(S1403)。分割ヒープ領域解放部104c
は、解放した分割ヒープ領域の情報と対応するクラスロ
ーダオブジェクトのIDをメモリヒープ領域管理テーブル
104fから削除する(S1404)。これにより、アプリ
ケーション実行装置100においては、アプリケーショ
ン終了する毎に、対応する分割ヒープ領域を一括して、
短時間で解放することができる。
FIG. 31 is a flowchart showing the operation of releasing the divided heap area by the application execution device 100 when the application is terminated. When the application ends, the application management unit 102 instructs the divided heap area release unit 104c to release the divided heap area corresponding to the class loader object loaded with the terminated application (S1401). The divided heap area release unit 104c specifies the divided heap area corresponding to the class loader object loaded with the application from the memory heap area management table 104f (S1402), and releases the divided heap area based on the information (S1403). ). Split heap area release unit 104c
Deletes the ID of the class loader object corresponding to the released divided heap area information from the memory heap area management table 104f (S1404). Accordingly, in the application execution device 100, each time the application is terminated, the corresponding divided heap area is collectively
Can be released in a short time.

【0102】なお、本実施形態においては、分割ヒープ
領域獲得部104bは、システムクラスローダオブジェ
クトを意識することなく、分割ヒープ領域をシステムク
ラスローダオブジェクト用の分割ヒープ領域として割当
てているが、図32に示すようにメモリ105全体をシ
ステムクラスローダ用のメモリ領域(システムヒープ領
域105−1)として割当て、その領域内に分割ヒープ
領域獲得部104bが他のクラスローダオブジェクトに
対応する分割ヒープ領域を獲得するようにしてもよい
(図32)。この場合、オブジェクト領域獲得部104
aがシステム起動時にシステムクラスローダオブジェク
トのオブジェクト領域をシステムヒープ領域105−1
内に獲得し、システムクラスローダオブジェクトのIDと
獲得した領域(説明の便宜上、分割ヒープ領域105a0
と呼ぶ。)の情報(分割ヒープ領域ID(a0)、クラスロ
ーダID(SCL)、領域先頭アドレス(MA-0)、全体領域
サイズ(MS-0)、自由領域先頭アドレス(FA-0)、自
由領域サイズ(FS-0))を組にしてメモリヒープ領域
管理テーブル105fに登録する。以後本実施形態の場
合と同様に、分割ヒープ領域獲得部104bがシステム
ヒープ領域105−1から分割ヒープ領域をクラスロー
ダオブジェクト領域用に獲得する毎に、分割ヒープ領域
獲得部104bは、図32に示すようにメモリヒープ領
域管理テーブル104fに当該クラスローダオブジェク
トのIDと獲得した分割ヒープ領域の情報を組にして追加
し、オブジェクト領域獲得部は図30のフローチャート
に従って分割ヒープ領域獲得部104bによって獲得さ
れた分割ヒープ領域内にオブジェクト領域を獲得し(S1
306)、オブジェクト領域の獲得に失敗した場合(S130
7)、オブジェクト領域獲得部104bは、GC部104
dに獲得に失敗した分割ヒープ領域内のガベージコレク
ションを行うことを指示し、GC部104dは指示に応じ
て当該分割ヒープ領域内のガベージコレクションを行う
(S1308)。また、アプリケーションが終了すると、ア
プリケーション管理部102は、分割ヒープ領域解放部
104cに、終了したアプリケーションをロードしたク
ラスローダオブジェクトに対応する分割ヒープ領域の解
放を指示し、分割ヒープ領域解放部104cは、指示に
応じて、図31のフローチャートに従って当該分割ヒー
プ領域を解放する。また、GC部104dはシステムヒー
プ領域105−1全体をガベージコレクションの対象と
し、分割ヒープ領域を単位に解放された分割ヒープ領域
同士をひとまとめにするので、システムヒープ領域10
5−1を効率的に使用することができる。
In this embodiment, the divided heap area acquisition unit 104b allocates the divided heap area as the divided heap area for the system class loader object without being aware of the system class loader object. , The entire memory 105 is allocated as a memory area for the system class loader (system heap area 105-1), and the divided heap area acquisition unit 104b acquires a divided heap area corresponding to another class loader object in that area. (FIG. 32). In this case, the object area acquisition unit 104
“a” sets the object area of the system class loader object to the system heap area 105-1 at system startup.
And the ID of the system class loader object and the acquired area (for convenience of explanation, the divided heap area 105a0
Call. ) Information (divided heap area ID (a0), class loader ID (SCL), area start address (MA-0), total area size (MS-0), free area start address (FA-0), free area size (FS-0)) is registered as a set in the memory heap area management table 105f. Thereafter, as in the case of the present embodiment, each time the divided heap area acquisition unit 104b acquires the divided heap area from the system heap area 105-1 for the class loader object area, the divided heap area acquisition unit 104b returns to FIG. As shown, the ID of the class loader object and the information of the acquired divided heap area are added as a set to the memory heap area management table 104f, and the object area acquiring section is acquired by the divided heap area acquiring section 104b according to the flowchart of FIG. An object area in the divided heap area (S1
306) If the acquisition of the object area fails (S130)
7), the object area obtaining unit 104b
d instructs to perform garbage collection in the failed divided heap area, and the GC unit 104d performs garbage collection in the divided heap area according to the instruction (S1308). When the application ends, the application management unit 102 instructs the divided heap area release unit 104c to release the divided heap area corresponding to the class loader object loaded with the terminated application, and the divided heap area release unit 104c According to the instruction, the divided heap area is released according to the flowchart of FIG. Further, the GC unit 104d sets the entire system heap area 105-1 as a target of garbage collection and collects the divided heap areas released in units of the divided heap area, so that the system heap area 10
5-1 can be used efficiently.

【0103】なお、本実施形態における図28のアプリ
ケーション実行装置100の構成は、機能ブロック図と
して示されているが、実際はCPU、メモリ、外部との入
出力を行う入出力装置を含むハードウエア及びソフトウ
エアを実行することにより実現される。このソフトウエ
アは図28に示した各ブロックの機能を管理するように
設計されている。また上記ソフトウエアを、CD-ROMから
ロードする場合はCD-ROM読み取りインターフェースを用
いてもよい。メモリは、RAM、ROM、ハードディスクや、
CDドライブ、フロッピーディスク、メモリカードなどの
リムーバブルメディアで構成される。
Although the configuration of the application execution apparatus 100 of FIG. 28 according to the present embodiment is shown as a functional block diagram, actually, a CPU, a memory, hardware including an input / output device for performing input / output with the outside, and hardware and This is realized by executing software. This software is designed to manage the function of each block shown in FIG. When loading the software from a CD-ROM, a CD-ROM reading interface may be used. Memory is RAM, ROM, hard disk,
Consists of removable media such as CD drives, floppy disks, and memory cards.

【0104】本実施形態においては、アプリケーション
に、割当てられる分割ヒープ領域の数は、1つに限らず
複数であってもよい。例えば、アプリケーション自身が
クラスローダを保有している場合には、当該クラスロー
ダに対しても分割ヒープ領域が割当てられる。また、本
実施形態において、分割ヒープ領域獲得部104bによ
って獲得される分割ヒープ領域の大きさは、分割ヒープ
領域獲得部104bへのプログラム指示により可変とす
ることができる。
In the present embodiment, the number of divided heap areas allocated to an application is not limited to one, but may be plural. For example, when the application itself has a class loader, a divided heap area is also allocated to the class loader. In the present embodiment, the size of the divided heap area acquired by the divided heap area acquisition unit 104b can be made variable by a program instruction to the divided heap area acquisition unit 104b.

【0105】[0105]

【発明の効果】本発明は、アプリケーションに資源を提
供する少なくとも1つ以上のライブラリ部とカーネル部
を備えるアプリケーション実行装置であって、前記カー
ネル部は、アプリケーションが終了すると、終了したア
プリケーションがどれであるかを資源を提供した各ライ
ブラリ部に通知する通知手段を有し、各ライブラリ部
は、通知手段から通知されると、終了したアプリケーシ
ョンに提供した資源を回収する回収手段を有することを
特徴とする。また、上記アプリケーション実行装置にお
ける各手段をコンピュータに実現させるプログラムを記
録したコンピュータ読み取り可能な記録媒体として実現
することとしてもよいし、前記回収手段は、アプリケー
ションとアプリケーションに提供した資源との対応関係
を示すテーブルを保持するテーブル保持手段と、前記通
知手段によって通知されたアプリケーションに提供した
資源を前記テーブル保持手段により特定する資源特定手
段とを有することとしてもよいし、前記各ライブラリ部
はさらに、アプリケーションからの要求に応じて資源を
提供する提供手段と、前記提供手段がアプリケーション
に新たな資源の提供を開始したとき、本ライブラリ部に
アプリケーションが終了すれば前記通知を行うよう依頼
する依頼手段とを有することとしてもよい。
According to the present invention, there is provided an application execution apparatus including at least one library unit for providing resources to an application and a kernel unit, wherein the kernel unit determines which of the terminated applications when the application is terminated. It has a notifying means for notifying each library unit which has provided the resource whether there is, and each library unit has a collecting means for collecting the resources provided to the terminated application when notified from the notifying means. I do. Further, each means in the application execution device may be realized as a computer-readable recording medium storing a program for causing a computer to execute, or the collection means may determine a correspondence between an application and resources provided to the application. A table holding unit for holding a table indicated by the notifying unit, and a resource specifying unit for specifying, by the table holding unit, a resource provided to the application notified by the notifying unit. A providing means for providing a resource in response to a request from the client; and a requesting means for requesting the library unit to perform the notification when the providing means starts providing a new resource to the application and the application is terminated. Having and It may be.

【0106】この構成により、アプリケーションが終了
する毎に、カーネル部ではなくライブラリ部により不必
要になった資源が回収されるので、新規の資源が追加さ
れる毎にカーネル部を修正する必要がなくなるという効
果が得られる。ここで、前記通知手段は、アプリケーシ
ョン毎に前記通知を行う複数の通知部を有し、前記各ラ
イブラリ部はさらに、アプリケーションからの要求に応
じて資源を提供する提供手段と、前記提供手段がアプリ
ケーションに新たな資源の提供を開始したとき、本ライ
ブラリ部に当該アプリケーションが終了すれば前記通知
を行うよう当該アプリケーションに対応する通知部に依
頼する依頼手段とを有し、前記依頼手段は、前記本ライ
ブラリ部が前記通知を受け取るために生成した資源回収
インスタンスのメソッドの呼び出しにより前記通知を行
うよう前記通知部に依頼し、依頼された前記通知部は、
前記当該アプリケーションが終了すると、資源回収イン
スタンスのメソッドを呼び出すことにより、前記通知を
行うこととしてもよい。
According to this configuration, each time the application is terminated, unnecessary resources are collected by the library unit instead of the kernel unit. Therefore, it is not necessary to modify the kernel unit each time a new resource is added. The effect is obtained. Here, the notifying unit includes a plurality of notifying units that perform the notification for each application, and each of the library units further includes a providing unit that provides a resource in response to a request from the application; Requesting a notification unit corresponding to the application to provide the notification to the library unit when the application ends when the provision of a new resource is started, and the request unit includes: The library unit requests the notifying unit to perform the notification by calling a method of a resource recovery instance generated to receive the notification, and the requested notifying unit includes:
When the application ends, the notification may be made by calling a method of a resource collection instance.

【0107】この構成により、終了したアプリケーショ
ンに資源を提供しているライブラリ部にのみ、終了した
アプリケーションがどれであるかが通知されるので、当
該資源を提供していないライブラリ部への無駄な通知を
することなく、当該資源を回収することができるという
効果が得られる。ここで、前記回収手段は、アプリケー
ションとアプリケーションに提供した資源との対応関係
を示すテーブルを保持するテーブル保持手段と、前記通
知手段によって通知されたアプリケーションに提供した
資源を前記テーブル保持手段により特定する資源特定手
段とを有し、前記通知手段は、複数のアプリケーション
が同時に終了した場合に、終了した複数のアプリケーシ
ョンがどれであるかを、資源を提供したライブラリ部に
通知し、前記資源特定手段は、通知された複数のアプリ
ケーションに対応する複数の資源を前記テーブル保持手
段により特定し、前記回収手段は、特定された複数の資
源を回収することとしてもよい。
According to this configuration, only the library unit that provides the resource to the terminated application is notified of the terminated application, so that unnecessary notification to the library unit that does not provide the resource is provided. The effect is obtained that the resource can be collected without performing the above. Here, the collecting unit specifies a table holding unit that holds a table indicating a correspondence relationship between an application and a resource provided to the application, and specifies the resource provided to the application notified by the notifying unit by the table holding unit. And a resource specifying unit, wherein the notifying unit notifies the library unit that provided the resource which of the plurality of terminated applications is to be provided when the plurality of applications are terminated simultaneously. The plurality of resources corresponding to the plurality of notified applications may be specified by the table holding unit, and the collection unit may collect the specified plurality of resources.

【0108】この構成により、ライブラリ部は、終了し
た複数のアプリケーションに提供した資源を一括して回
収できるので、より効果的な資源の回収を行うことがで
きる。ここで、前記通知手段は、さらにアプリケーショ
ンが終了した時と中断した時の何れかの時に、前記各ラ
イブラリ部に通知し、前記各ライブラリ部はさらに、通
知されたアプリケーションが終了したか、中断したかに
応じて、当該アプリケーションに提供した資源を回収す
るか否かを判定する判定手段を有し、前記回収手段は、
さらに資源を回収すると判定された場合に、通知された
アプリケーションに提供した資源を回収することとして
もよい。また、上記アプリケーション実行装置における
各手段をコンピュータに実現させるプログラムを記録し
たコンピュータ読み取り可能な記録媒体として実現する
こととしてもよい。
With this configuration, the library section can collectively collect resources provided to a plurality of terminated applications, so that more effective resource collection can be performed. Here, the notifying unit notifies each of the library units when the application is terminated or when the application is interrupted, and each of the library units further terminates or suspends the notified application. Depending on whether or not to collect the resources provided to the application,
Further, when it is determined that resources are to be collected, the resources provided to the notified application may be collected. Further, each unit in the application execution device may be realized as a computer-readable recording medium in which a program for causing a computer to be realized is recorded.

【0109】この構成により、アプリケーションが中断
しているか、終了しているかに応じて、資源を回収すべ
きか否かを判定し、特定の一部の資源のみ回収すること
ができる。また、本発明は、アプリケーションに資源を
提供するOS部とJavaミドルウェア部を備えるアプリケー
ション実行装置であって、前記Javaミドルウェア部は、
アプリケーションとアプリケーションに対応するタスク
とタスクを構成するスレッドの対応関係を示すテーブル
を保持する第1テーブル保持手段と、アプリケーション
終了の指示を受けると、前記第1テーブル保持手段を参
照して終了するアプリケーションに対応するタスクがど
れであるかを通知する通知手段とを有し、前記OS部は、
アプリケーション毎にアプリケーションを実行するタス
クを生成するタスク生成手段と、前記タスクを構成する
アプリケーション用スレッドを複数生成するスレッド生
成手段と、前記アプリケーション用スレッドを実行する
ことにより、アプリケーションのプログラムコードを実
行し、アプリケーションが要求する資源を提供し、提供
した資源と前記スレッドが属するタスクとの対応関係を
示すテーブルを保持する管理手段と、前記通知手段から
通知されたタスクに対応する資源を管理手段より特定
し、アプリケーションに提供されていた資源を回収する
回収手段とを有することを特徴としてもよい。また、上
記アプリケーション実行装置における各手段をコンピュ
ータに実現させるプログラムを記録したコンピュータ読
み取り可能な記録媒体として実現することとしてもよ
い。
With this configuration, it is possible to determine whether resources should be collected depending on whether the application is suspended or terminated, and it is possible to collect only a specific part of resources. Further, the present invention is an application execution device including an OS unit for providing resources to an application and a Java middleware unit, wherein the Java middleware unit includes:
A first table holding unit for holding a table indicating a correspondence between an application and a task corresponding to the application and a thread constituting the task; Notifying means for notifying the task corresponding to the, the OS unit,
A task generating means for generating a task for executing the application for each application; a thread generating means for generating a plurality of application threads constituting the task; and executing the application thread by executing the application thread. A management unit that provides a resource requested by an application and holds a table indicating a correspondence between the provided resource and a task to which the thread belongs, and specifies a resource corresponding to the task notified from the notification unit by the management unit. And a collection unit for collecting resources provided to the application. Further, each unit in the application execution device may be realized as a computer-readable recording medium in which a program for causing a computer to be realized is recorded.

【0110】この構成により、アプリケーションが終了
する毎に不必要になった資源が回収されるので、Javaア
プリケーションを連続して実行するための資源を確保で
きるという効果が得られる。ここで、前記Javaミドルウ
ェア部はさらに、前記タスクを構成する前記アプリケー
ション用スレッドとは別に、前記Javaミドルウェア部に
必要な資源を確保する資源確保用スレッドを生成する資
源確保用スレッド生成手段と、生成した資源確保用スレ
ッドを実行することにより前記Javaミドルウェア部に必
要な資源を確保する資源確保手段とを有し、前記回収手
段は、前記資源確保手段によって確保された前記Javaミ
ドルウェア部に必要な資源を回収することなく、前記通
知手段から通知されたタスクに対応する資源を前記管理
手段より特定し、アプリケーションに提供されていた資
源を回収することとしてもよい。
With this configuration, unnecessary resources are collected every time the application is terminated, so that there is an effect that resources for continuously executing the Java application can be secured. Here, the Java middleware unit further includes a resource securing thread generating unit configured to generate a resource securing thread for securing resources required for the Java middleware unit, separately from the application thread configuring the task. Resource securing means for securing resources necessary for the Java middleware section by executing the resource securing thread obtained, wherein the collecting means includes resources required for the Java middleware section secured by the resource securing means. Without collecting the resource, the resource corresponding to the task notified from the notifying unit may be specified by the managing unit, and the resource provided to the application may be collected.

【0111】この構成により、Javaミドルウェア部に必
要な資源が確保され、アプリケーションが終了しても当
該資源は回収されないので、より短い時間で新たなアプ
リケーションを実行させることができる。また、本発明
はガベージコレクションが必要なアプリケーション用の
メモリヒープ領域を管理するアプリケーション実行装置
であって、アプリケーションが起動される毎に、メモリ
ヒープ領域から分割ヒープ領域を獲得する分割ヒープ領
域獲得手段と、起動されたアプリケーションに、前記分
割ヒープ領域獲得手段によって獲得された分割ヒープ領
域を割当てる割当て手段と、アプリケーションが終了す
る毎に、当該アプリケーションに割当てられた分割ヒー
プ領域を解放するメモリ解放手段とを備えることを特徴
としてもよい。また上記アプリケーション実行装置にお
ける各手段をステップとするメモリヒープ管理方法とし
てもよいし、上記アプリケーション実行装置における各
手段をコンピュータに実現させるプログラムを記録した
コンピュータ読み取り可能な記録媒体として実現するこ
ととしてもよい。
According to this configuration, resources required for the Java middleware section are secured, and the resources are not collected even when the application ends, so that a new application can be executed in a shorter time. Further, the present invention is an application execution device that manages a memory heap area for an application that requires garbage collection, and a divided heap area acquisition unit that acquires a divided heap area from the memory heap area every time an application is started. Allocating means for allocating the divided heap area acquired by the divided heap area acquiring means to the started application, and memory releasing means for releasing the divided heap area allocated to the application every time the application is terminated. It may be provided with a feature. Also, a memory heap management method may be implemented in which each unit in the application execution device is a step, or a computer-readable recording medium that records a program for causing a computer to implement each unit in the application execution device may be implemented. .

【0112】この構成により、アプリケーションが終了
する毎に、終了したアプリケーションに割当てられた分
割ヒープ領域が解放され、解放された分割ヒープ領域の
内部ではガベージコレクションが不要になるので、ガベ
ージコレクションの負荷を軽減することができる。ここ
で、前記アプリケーション実行装置はさらに、アプリケ
ーションに関連するオブジェクトに対して、当該アプリ
ケーションに割当てられた分割ヒープ領域内でオブジェ
クト領域を獲得するオブジェクト領域獲得手段と、前記
分割ヒープ領域を対象にガベージコレクションを行うガ
ベージコレクション手段とを備えることとしてもよい。
また、上記アプリケーション実行装置における各手段を
ステップとするメモリヒープ管理方法としてもよいし、
上記アプリケーション実行装置における各手段をコンピ
ュータに実現させるプログラムを記録したコンピュータ
読み取り可能な記録媒体として実現することとしてもよ
い。
With this configuration, every time the application is terminated, the divided heap area allocated to the terminated application is released, and garbage collection is not required inside the released divided heap area. Can be reduced. Here, the application execution apparatus further includes: an object area obtaining unit that obtains an object area in the divided heap area allocated to the application for an object related to the application; and a garbage collection for the divided heap area. Garbage collection means for performing
Further, a memory heap management method in which each unit in the application execution device is set as a step,
Each unit in the application execution device may be realized as a computer-readable recording medium storing a program for causing a computer to realize the means.

【0113】この構成により、メモリヒープ領域全体よ
りもメモリサイズの小さい分割ヒープ領域を対象として
ガベージコレクションを行うために、1回のガベージコ
レクションの負荷を軽減することができる。ここで、前
記アプリケーション実行装置はさらに、前記ガベージコ
レクション手段によって対象となる分割ヒープ領域のガ
ベージコレクションが行われている間、当該分割ヒープ
領域を使用するアプリケーションのみ実行を停止させ、
他の分割ヒープ領域を使用するアプリケーションは継続
して実行させるロック手段を備えることとしてもよい。
また、上記アプリケーション実行装置における各手段を
ステップとするメモリヒープ管理方法としてもよいし、
上記アプリケーション実行装置における各手段をコンピ
ュータに実現させるプログラムを記録したコンピュータ
読み取り可能な記録媒体として実現することとしてもよ
い。
With this configuration, the load of one garbage collection can be reduced because garbage collection is performed on a divided heap area having a smaller memory size than the entire memory heap area. Here, the application execution device further stops execution of only applications that use the divided heap area while garbage collection of the target divided heap area is being performed by the garbage collection unit,
An application that uses another divided heap area may be provided with a lock unit that continuously executes the application.
Further, a memory heap management method in which each unit in the application execution device is set as a step,
Each unit in the application execution device may be realized as a computer-readable recording medium storing a program for causing a computer to realize the means.

【0114】この構成により、ガベージコレクションが
行われている間も、当該処理の対象となっている分割ヒ
ープ領域を使用するアプリケーション以外のアプリケー
ションの実行を継続させるので、ユーザーは当該処理が
終わるのを待つことなく、他のアプリケーションを使っ
た作業を続行することができる。
With this configuration, even while the garbage collection is being performed, the execution of applications other than the application that uses the divided heap area that is the target of the process is continued, so that the user can terminate the process. You can continue working with other applications without having to wait.

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

【図1】アプリケーション実行装置10の構成を示すブ
ロック図である。
FIG. 1 is a block diagram showing a configuration of an application execution device 10.

【図2】コールバック関数を定義したC言語プログラム
の一例を示す。
FIG. 2 shows an example of a C language program defining a callback function.

【図3】コールバック関数の登録と呼び出し実行を記述
したC言語プログラムの例を示す。
FIG. 3 shows an example of a C language program in which registration and call execution of a callback function are described.

【図4】各ライブラリ部が行う資源提供の処理を示すフ
ローチャートである。
FIG. 4 is a flowchart illustrating a resource providing process performed by each library unit.

【図5】ファイルシステムを制御するライブラリ部(以
下ライブラリ部Fと呼ぶ。)が保持するアプリケーショ
ン識別子と資源名(ファイル名)とを組にしたテーブル
を示す。
FIG. 5 shows a table in which an application identifier and a resource name (file name) held by a library unit (hereinafter, referred to as a library unit F) that controls a file system are set.

【図6】各ライブラリ部が行う資源の回収処理を示すフ
ローチャートである。
FIG. 6 is a flowchart illustrating a resource collection process performed by each library unit.

【図7】複数のアプリケーションが一斉に終了する場合
の各ライブラリ部が行う資源の回収処理のフローチャー
トを示す。
FIG. 7 is a flowchart illustrating a resource collection process performed by each library unit when a plurality of applications are terminated at the same time.

【図8】アプリケーション実行装置20の構成を示すブ
ロック図である。
FIG. 8 is a block diagram illustrating a configuration of an application execution device 20.

【図9】インターフェースを定義するJavaプログラムの
例を示す。
FIG. 9 shows an example of a Java program that defines an interface.

【図10】アプリケーション情報インスタンスを生成す
るクラスの一例を示す。
FIG. 10 shows an example of a class for generating an application information instance.

【図11】資源回収クラスの一例を示す。FIG. 11 shows an example of a resource collection class.

【図12】資源回収クラスが生成した資源回収インスタ
ンスの例を示す。
FIG. 12 shows an example of a resource collection instance generated by a resource collection class.

【図13】各ライブラリ部が行う資源提供の処理を示す
フローチャートである。
FIG. 13 is a flowchart illustrating a resource providing process performed by each library unit.

【図14】アプリケーション情報インスタンスがアプリ
ケーションの状態を知るためのメソッドと資源回収イン
スタンスの登録を削除するメソッドを格納している場合
の各ライブラリ部が行う回収の処理を示すフローチャー
トである。
FIG. 14 is a flowchart illustrating a collection process performed by each library unit when an application information instance stores a method for knowing the state of an application and a method for deleting registration of a resource collection instance.

【図15】アプリケーション実行装置30の構成を示す
ブロック図である。
FIG. 15 is a block diagram illustrating a configuration of an application execution device 30.

【図16】アプリケーションとアプリケーションに対応
して生成されたタスクとタスクを構成するスレッドとの
対応関係を示すテーブルの例を示す。
FIG. 16 shows an example of a table showing a correspondence between applications, tasks generated corresponding to the applications, and threads constituting the tasks.

【図17】アプリケーション終了時にアプリケーション
管理部33bが行う処理を示すフローチャートである。
FIG. 17 is a flowchart illustrating a process performed by an application management unit 33b when an application ends.

【図18】クラスライブラリ部が行うリスナー管理の処
理を示すフローチャートである。
FIG. 18 is a flowchart illustrating a listener management process performed by a class library unit.

【図19】クラスライブラリ部が保持するテーブルの例
である。
FIG. 19 is an example of a table held by a class library unit.

【図20】イベントが発生したことを通知する処理を示
すフローチャートである。
FIG. 20 is a flowchart illustrating a process of notifying that an event has occurred.

【図21】クラスライブラリ部が行うリスナー呼び出し
の処理を示すフローチャートである。
FIG. 21 is a flowchart illustrating a listener call process performed by a class library unit.

【図22】キューを用いて専用スレッドからリスナーを
呼び出す手順の例を模式化した図である。
FIG. 22 is a diagram schematically illustrating an example of a procedure for calling a listener from a dedicated thread using a queue.

【図23】VM部33aがシステム専用のスレッドを獲得
する処理を示すフローチャートである。
FIG. 23 is a flowchart showing a process in which the VM unit 33a acquires a thread dedicated to the system.

【図24】アプリケーション実行装置40の構成を示す
ブロック図である。
FIG. 24 is a block diagram showing a configuration of an application execution device 40.

【図25】アプリケーション管理部43bが保持するク
ラスローダのインスタンスと対応するアプリケーション
IDを組にしたテーブルの例を示す。
FIG. 25 shows an application corresponding to an instance of a class loader held by an application management unit 43b.
An example of a table in which IDs are set is shown.

【図26】アプリケーション管理部43bが生成したク
ラスローダのインスタンスとスタックとの関係を示す模
式図である。
FIG. 26 is a schematic diagram illustrating a relationship between a class loader instance generated by an application management unit 43b and a stack.

【図27】提供した資源の資源名とアプリケーションID
を組にしたテーブルの一例を示す。
FIG. 27 shows a resource name and an application ID of a provided resource.
Is shown as an example of a table in which.

【図28】アプリケーション実行装置100の構成を示
すブロック図である。
FIG. 28 is a block diagram showing a configuration of an application execution device 100.

【図29】メモリヒープ領域管理テーブル104fとメ
モリ105の状態を示す図である。
FIG. 29 is a diagram showing states of a memory heap area management table 104f and a memory 105.

【図30】VM部103よりオブジェクト領域獲得指示を
受けた後のアプリケーション実行装置100によるオブ
ジェクト領域獲得の動作を示すフローチャートである。
FIG. 30 is a flowchart showing an operation of acquiring an object area by the application execution apparatus 100 after receiving an instruction to acquire an object area from the VM unit 103.

【図31】アプリケーション終了時のアプリケーション
実行装置100による分割ヒープ領域の解放の動作を示
すフローチャートである。
FIG. 31 is a flowchart showing an operation of releasing the divided heap area by the application execution device 100 when the application is terminated.

【図32】システムヒープ領域105−1がメモリヒー
プ領域管理テーブル104fに登録されている状態を示
す図である。
FIG. 32 is a diagram showing a state in which a system heap area 105-1 is registered in a memory heap area management table 104f.

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

1 メモリヒープ管理部 2 ヒープ領域獲得部 3 GC(ガベージコレクション)部 10 アプリケーション実行装置 11 アプリケーション入力部 12 アプリケーション記憶部 13 カーネル部 13a 逐次実行部 13b 資源回収通知部 13c 識別子提供部 14 ライブラリ格納部 14a〜n ライブラリ部 15 デバイス部 15a〜n デバイス 20 アプリケーション実行装置 23 OS部 23a バーチャルマシーン部 23b アプリケーション管理部 23c〜e アプリケーション情報インスタンス 24 ライブラリ格納部 24a〜n ライブラリ部 30 アプリケーション実行装置 33 Javaミドルウェア部 33a VM部 33b アプリケーション管理部 33c クラスライブラリ格納部 33c1〜c2 クラスライブラリ部 34 OS部 34a カーネル 34b ライブラリ格納部 34b1〜b2ライブラリ部 35 ハードウェア部 35a CPU 35b1〜b2デバイス 40 アプリケーション実行装置 43 Javaミドルウェア部 43a VM部 43b アプリケーション管理部 43c クラスライブラリ格納部 43c1〜c2 クラスライブラリ部 44 OS部 44a カーネル 44b ライブラリ格納部 44b1〜b2ライブラリ部 45 ハードウェア部 45a CPU 45b1〜b2デバイス 100 アプリケーション実行装置 101 アプリケーション/クラスライブラリ記憶部 102 アプリケーション管理部 103 VM部 104 メモリヒープ管理部 104a オブジェクト領域獲得部 104b 分割ヒープ領域獲得部 104c 分割ヒープ領域解放部 104d GC部 104e ロック部 104f メモリヒープ領域管理テーブル 105 メモリ 105a〜105n 分割ヒープ領域 Reference Signs List 1 memory heap management unit 2 heap area acquisition unit 3 GC (garbage collection) unit 10 application execution unit 11 application input unit 12 application storage unit 13 kernel unit 13a sequential execution unit 13b resource collection notification unit 13c identifier providing unit 14 library storage unit 14a To n library unit 15 device unit 15a to n device 20 application execution unit 23 OS unit 23a virtual machine unit 23b application management unit 23c to e application information instance 24 library storage unit 24a to n library unit 30 application execution unit 33 Java middleware unit 33a VM unit 33b Application management unit 33c Class library storage unit 33c1-c2 Class library unit 34 OS unit 34a Kernel 34b Library storage unit 34 b1 to b2 library unit 35 hardware unit 35a CPU 35b1 to b2 device 40 application execution unit 43 Java middleware unit 43a VM unit 43b application management unit 43c class library storage unit 43c1 to c2 class library unit 44 OS unit 44a kernel 44b library storage unit 44b1 to b2 library unit 45 hardware unit 45a CPU 45b1 to b2 device 100 application execution unit 101 application / class library storage unit 102 application management unit 103 VM unit 104 memory heap management unit 104a object area acquisition unit 104b divided heap area acquisition unit 104c Divided heap area release unit 104d GC unit 104e Lock unit 104f Memory heap area management table 105 Memory 105a to 105n Divided heap area

───────────────────────────────────────────────────── フロントページの続き (72)発明者 平本 建志 大阪府門真市大字門真1006番地 松下電器 産業 株式会社内 (72)発明者 久保岡 祐子 大阪府門真市大字門真1006番地 松下電器 産業 株式会社内 (72)発明者 土井 繁則 大阪府門真市大字門真1006番地 松下電器 産業 株式会社内 Fターム(参考) 5B060 AA10 5B098 GD03 GD07 GD14 GD22  ──────────────────────────────────────────────────の Continuing on the front page (72) Inventor Kenji Hiramoto 1006 Kazuma Kadoma, Osaka Prefecture Matsushita Electric Industrial Co., Ltd. (72) Inventor Shigenori Doi 1006 Kadoma, Kazuma, Osaka Prefecture Matsushita Electric Industrial Co., Ltd.F-term (reference) 5B060 AA10 5B098 GD03 GD07 GD14 GD22

Claims (50)

【特許請求の範囲】[Claims] 【請求項1】 アプリケーションに資源を提供する少な
くとも1つ以上のライブラリ部とカーネル部を備えるア
プリケーション実行装置であって、 前記カーネル部は、 アプリケーションが終了すると、終了したアプリケーシ
ョンがどれであるかを資源を提供した各ライブラリ部に
通知する通知手段を有し、 各ライブラリ部は、 通知手段から通知されると、終了したアプリケーション
に提供した資源を回収する回収手段を有することを特徴
とするアプリケーション実行装置。
1. An application execution apparatus comprising at least one library unit and a kernel unit for providing resources to an application, wherein the kernel unit, when the application is terminated, determines which of the terminated applications is a resource. An application execution device, comprising: a notifying unit for notifying each library unit that provided the application, and each library unit having a collection unit for collecting resources provided to the terminated application when notified from the notifying unit. .
【請求項2】 前記回収手段は、 アプリケーションとアプリケーションに提供した資源と
の対応関係を示すテーブルを保持するテーブル保持手段
と、前記通知手段によって通知されたアプリケーション
に提供した資源を前記テーブル保持手段により特定する
資源特定手段とを有することを特徴とする請求項1記載
のアプリケーション実行装置。
2. The information processing apparatus according to claim 1, wherein the collection unit includes: a table holding unit that holds a table indicating a correspondence relationship between the application and the resource provided to the application; and a table holding unit that stores the resource provided to the application notified by the notification unit. 2. The application execution device according to claim 1, further comprising a resource specifying unit for specifying.
【請求項3】 前記各ライブラリ部はさらに、 アプリケーションからの要求に応じて資源を提供する提
供手段と、 資源を提供したアプリケーションがどれであるかの通知
を前記カーネル部から受け取り、前記テーブルに、資源
を提供したアプリケーションと提供した資源を対応付け
て組にして登録する登録手段と、 登録した資源が前記回収手段により回収されると、回収
された資源と対応するアプリケーションとの対応関係を
示す組を前記テーブルから削除する削除手段とを有する
ことを特徴とする請求項2記載のアプリケーション実行
装置。
3. The library unit further includes: a providing unit that provides a resource in response to a request from an application; and a notification as to which application provided the resource from the kernel unit. A registration unit for registering the provided application and the provided resource in association with each other as a set, and a set indicating a correspondence between the collected resource and the corresponding application when the registered resource is collected by the collection unit. 3. The application execution device according to claim 2, further comprising: a deletion unit configured to delete the application from the table.
【請求項4】 前記各ライブラリ部はさらに、 アプリケーションからの要求に応じて資源を提供する提
供手段と、 前記提供手段がアプリケーションに新たな資源の提供を
開始したとき、本ライブラリ部にアプリケーションが終
了すれば前記通知を行うよう依頼する依頼手段とを有す
ることを特徴とする請求項1記載のアプリケーション実
行装置。
4. Each of the library units further includes: a providing unit that provides a resource in response to a request from an application; and when the providing unit starts providing a new resource to the application, the library unit terminates the application. 2. The application execution device according to claim 1, further comprising request means for requesting the notification.
【請求項5】 前記依頼手段は、コールバック関数の呼
び出しを前記カーネル部に依頼し、 前記カーネル部は、アプリケーションが終了すると、依
頼されたコールバック関数を呼び出して実行することに
より、前記通知手段として前記通知を行うことを特徴と
する請求項4記載のアプリケーション実行装置。
5. The notifying unit requests the kernel unit to call a callback function, and the kernel unit calls and executes the requested callback function when the application is terminated, whereby the notifying unit notifies the notification unit. 5. The application execution device according to claim 4, wherein the notification is performed as:
【請求項6】 前記通知手段は、アプリケーション毎に
前記通知を行う複数の通知部を有し、 前記各ライブラリ部はさらに、 アプリケーションからの要求に応じて資源を提供する提
供手段と、 前記提供手段がアプリケーションに新たな資源の提供を
開始したとき、本ライブラリ部に当該アプリケーション
が終了すれば前記通知を行うよう当該アプリケーション
に対応する通知部に依頼する依頼手段とを有することを
特徴とする請求項1記載のアプリケーション実行装置。
6. The notifying unit includes a plurality of notifying units that make the notification for each application, wherein each of the library units further provides a resource in response to a request from the application; Request means for requesting a notification unit corresponding to the application to make a notification to the library unit when the application ends when the application starts providing new resources to the application. The application execution device according to 1.
【請求項7】 前記依頼手段は、前記本ライブラリ部が
前記通知を受け取るために生成した資源回収インスタン
スのメソッドの呼び出しにより前記通知を行うよう前記
通知部に依頼し、 依頼された前記通知部は、前記当該アプリケーションが
終了すると、資源回収インスタンスのメソッドを呼び出
すことにより、前記通知を行うことを特徴とする請求項
6記載のアプリケーション実行装置。
7. The requesting means requests the notifying unit to perform the notification by calling a method of a resource recovery instance generated by the book library unit to receive the notification, and the requested notifying unit is 7. The application execution device according to claim 6, wherein when the application is terminated, the notification is performed by calling a method of a resource recovery instance.
【請求項8】 前記回収手段は、 アプリケーションとアプリケーションに提供した資源と
の対応関係を示すテーブルを保持するテーブル保持手段
と、 前記通知手段によって通知されたアプリケーションに提
供した資源を前記テーブル保持手段により特定する資源
特定手段とを有し、 前記通知手段は、複数のアプリケーションが同時に終了
した場合に、終了した複数のアプリケーションがどれで
あるかを、資源を提供したライブラリ部に通知し、 前記資源特定手段は、通知された複数のアプリケーショ
ンに対応する複数の資源を前記テーブル保持手段により
特定し、 前記回収手段は、特定された複数の資源を回収すること
を特徴とする請求項1記載のアプリケーション実行装
置。
8. The collection unit includes: a table holding unit that holds a table indicating a correspondence between an application and a resource provided to the application; and a table holding unit that stores the resource provided to the application notified by the notification unit. A resource specifying unit for specifying, when the plurality of applications are simultaneously terminated, the notifying unit notifies the library unit that provided the resource which of the plurality of terminated applications is, 2. The application execution method according to claim 1, wherein the means specifies a plurality of resources corresponding to the notified applications by the table holding means, and the collection means collects the specified resources. apparatus.
【請求項9】 前記各ライブラリ部は、前記資源とし
て、チューナー、MPEGデコーダ、リモコン、ファイルシ
ステム、メモリ、モデムの何れかをアプリケーションに
提供することを特徴とする請求項1記載のアプリケーシ
ョン実行装置。
9. The application execution device according to claim 1, wherein each of the library units provides any one of a tuner, an MPEG decoder, a remote controller, a file system, a memory, and a modem as the resource to the application.
【請求項10】 前記回収手段は、 アプリケーションとアプリケーションに提供した資源と
の対応関係を示すテーブルを保持するテーブル保持手段
と、 前記通知手段によって通知されたアプリケーションに提
供した資源を前記テーブル保持手段により特定する資源
特定手段とを有することを特徴とする請求項9記載のア
プリケーション実行装置。
10. The collection unit includes: a table holding unit that holds a table indicating a correspondence between an application and a resource provided to the application; and a table holding unit that stores the resource provided to the application notified by the notification unit. 10. The application execution device according to claim 9, further comprising a resource specifying unit for specifying.
【請求項11】 前記各ライブラリ部はさらに、アプリ
ケーションからの要求に応じて資源を提供する提供手段
と、 資源を提供したアプリケーションがどれであるかの通知
を前記カーネル部から受け取り、前記テーブルに、資源
を提供したアプリケーションと提供した資源を対応付け
て登録する登録手段と、 登録した資源が前記回収手段により回収されると、回収
された資源と対応するアプリケーションを前記テーブル
から削除する削除手段とを有することを特徴とする請求
項10記載のアプリケーション実行装置。
11. Each of the library units further includes: a providing unit that provides a resource in response to a request from an application; and a notification as to which application provided the resource from the kernel unit. Registration means for registering the application that provided the resource and the provided resource in association with each other; and deleting means for deleting the application corresponding to the recovered resource from the table when the registered resource is recovered by the recovery means. The application execution device according to claim 10, further comprising:
【請求項12】 前記各ライブラリ部はさらに、 アプリケーションからの要求に応じて資源を提供する提
供手段と、 前記提供手段がアプリケーションに新たな資源の提供を
開始したとき、本ライブラリ部にアプリケーションが終
了すれば前記通知を行うよう依頼する依頼手段とを有す
ることを特徴とする請求項9記載のアプリケーション実
行装置。
12. Each of the library units further includes: a providing unit that provides a resource in response to a request from an application; and when the providing unit starts providing a new resource to the application, the library unit terminates the application. 10. The application execution apparatus according to claim 9, further comprising request means for requesting the notification.
【請求項13】 前記依頼手段は、コールバック関数の
呼び出しを前記カーネル部に依頼し、 前記カーネル部は、アプリケーションが終了すると、依
頼されたコールバック関数を呼び出して実行することに
より、前記通知手段として前記通知を行うことを特徴と
する請求項12記載のアプリケーション実行装置。
13. The notifying unit requests the kernel unit to call a callback function. When the application is terminated, the kernel unit calls and executes the requested callback function to execute the notification unit. 13. The application execution apparatus according to claim 12, wherein the notification is performed as:
【請求項14】 前記通知手段は、アプリケーション毎
に前記通知を行う複数の通知部を備え、 各ライブラリ部はさらに、 アプリケーションからの要求に応じて資源を提供する提
供手段と、 前記提供手段がアプリケーションに新たな資源の提供を
開始したとき、本ライブラリ部に当該アプリケーション
が終了すれば前記通知を行うよう当該アプリケーション
に対応する通知部に依頼する依頼手段とを有することを
特徴とする請求項9記載のアプリケーション実行装置。
14. The notifying unit includes a plurality of notifying units that perform the notification for each application, each of the library units further includes a providing unit that provides a resource in response to a request from the application, and the providing unit includes: 10. A requesting means for requesting a notifying unit corresponding to the application to perform the notification when the application ends in the library unit when the provision of a new resource is started. Application execution device.
【請求項15】 前記依頼手段は、前記本ライブラリ部
が前記通知を受け取るために生成した資源回収インスタ
ンスのメソッドの呼び出しにより前記通知を行うよう前
記通知部に依頼し、 依頼された前記通知部は、前記当該アプリケーションが
終了すると、資源回収インスタンスのメソッドを呼び出
すことにより、前記通知を行うことを特徴とする請求項
14記載のアプリケーション実行装置。
15. The requesting unit requests the notifying unit to perform the notification by calling a method of a resource recovery instance generated by the book library unit to receive the notification, and the requested notifying unit is 15. The application execution apparatus according to claim 14, wherein when the application is terminated, the notification is performed by calling a method of a resource recovery instance.
【請求項16】 前記回収手段は、 アプリケーションとアプリケーションに提供した資源と
の対応関係を示すテーブルを保持するテーブル保持手段
と、 前記通知手段によって通知されたアプリケーションに提
供した資源を前記テーブル保持手段により特定する資源
特定手段とを有し、 前記通知手段は、複数のアプリケーションが同時に終了
した場合に、終了した複数のアプリケーションがどれで
あるかを、資源を提供したライブラリ部に通知し、 前記資源特定手段は、通知された複数のアプリケーショ
ンに対応する複数の資源を前記テーブル保持手段により
特定し、 前記回収手段は、特定された複数の資源を回収すること
を特徴とする請求項9記載のアプリケーション実行装
置。
16. The collection means, wherein: a table holding means for holding a table indicating a correspondence between an application and resources provided to the application; and a resource provided to the application notified by the notifying means, by the table holding means. A resource specifying unit for specifying, when the plurality of applications are simultaneously terminated, the notifying unit notifies the library unit that provided the resource which of the plurality of terminated applications is, The application execution according to claim 9, wherein the means specifies a plurality of resources corresponding to the notified applications by the table holding means, and the collection means collects the specified resources. apparatus.
【請求項17】 前記通知手段は、さらにアプリケーシ
ョンが終了した時と中断した時の何れかの時に、前記各
ライブラリ部に通知し、 前記各ライブラリ部はさらに、通知されたアプリケーシ
ョンが終了したか、中断したかに応じて、当該アプリケ
ーションに提供した資源を回収するか否かを判定する判
定手段を有し、 前記回収手段は、さらに資源を回収すると判定された場
合に、通知されたアプリケーションに提供した資源を回
収することを特徴とする請求項1記載のアプリケーショ
ン実行装置。
17. The notifying means further notifies each of the library units when the application is terminated or when the application is interrupted, and each of the library units further determines whether or not the notified application is terminated. A determining unit that determines whether to recover the resources provided to the application according to whether the application has been interrupted, and the recovery unit provides the notified application when it is determined that the resources are to be further recovered. 2. The application execution device according to claim 1, wherein the resource is collected.
【請求項18】 前記通知手段は、アプリケーション毎
に前記通知を行う複数の通知部を備え、 前記各ライブラリ部はさらに、 アプリケーションからの要求に応じて資源を提供する提
供手段と、 前記提供手段がアプリケーションに新たな資源の提供を
開始したとき、本ライブラリ部に当該アプリケーション
が終了した時と中断した時の何れかの時に、前記通知を
してくれるように当該アプリケーションに対応する通知
部に依頼する依頼手段とを有することを特徴とする請求
項17記載のアプリケーション実行装置。
18. The notifying unit includes a plurality of notifying units that perform the notification for each application, wherein each of the library units further includes: a providing unit that provides a resource in response to a request from the application; When the provision of new resources to the application is started, the library unit requests the notification unit corresponding to the application to notify the library unit when the application is terminated or when the application is interrupted. 18. The application execution device according to claim 17, further comprising request means.
【請求項19】 前記依頼手段は、前記本ライブラリ部
が前記通知を受け取るために生成した資源回収インスタ
ンスのメソッドの呼び出しにより前記通知を行うよう前
記通知部に依頼し、 依頼された前記通知部は、前記当該アプリケーションが
終了した時と中断した時の何れかの時に、前記資源回収
インスタンスのメソッドを呼び出すことにより、前記通
知を行い、 前記判定手段は、前記通知を受け取ると、アプリケーシ
ョンが終了したか、中断したかについての情報を取得
し、前記情報に応じて当該アプリケーションに提供した
資源を回収するか否かを判定することを特徴とする請求
項18記載のアプリケーション実行装置。
19. The requesting unit requests the notifying unit to perform the notification by calling a method of a resource recovery instance generated by the book library unit to receive the notification, and the requested notifying unit is The notification is performed by calling the method of the resource recovery instance either when the application is terminated or when the application is interrupted. When the determination unit receives the notification, the application terminates. 19. The application execution apparatus according to claim 18, wherein information about whether or not the application has been interrupted is obtained, and whether to collect resources provided to the application is determined according to the information.
【請求項20】 アプリケーションに資源を提供するOS
部とJavaミドルウェア部を備えるアプリケーション実行
装置であって、 前記Javaミドルウェア部は、 アプリケーションとアプリケーションに対応するタスク
とタスクを構成するスレッドの対応関係を示すテーブル
を保持する第1テーブル保持手段と、 アプリケーション終了の指示を受けると、前記第1テー
ブル保持手段を参照して終了するアプリケーションに対
応するタスクがどれであるかを通知する通知手段とを有
し、 前記OS部は、 アプリケーション毎にアプリケーションを実行するタス
クを生成するタスク生成手段と、 前記タスクを構成するアプリケーション用スレッドを複
数生成するスレッド生成手段と、 前記アプリケーション用スレッドを実行することによ
り、アプリケーションのプログラムコードを実行し、ア
プリケーションが要求する資源を提供し、提供した資源
と前記スレッドが属するタスクとの対応関係を示すテー
ブルを保持する管理手段と、 前記通知手段から通知されたタスクに対応する資源を管
理手段より特定し、アプリケーションに提供されていた
資源を回収する回収手段とを有することを特徴とするア
プリケーション実行装置。
20. An OS for providing resources to an application
An application execution device comprising a Java middleware unit and a Java middleware unit, the Java middleware unit comprising: a first table holding unit that holds a table indicating a correspondence relationship between an application, a task corresponding to the application, and a thread configuring the task; Notifying means for receiving a termination instruction and notifying which task corresponds to the application to be terminated with reference to the first table holding means, wherein the OS unit executes the application for each application A task generating means for generating a task to be executed; a thread generating means for generating a plurality of application threads constituting the task; and executing the application thread to execute an application program code. Management means for providing a resource to be provided, and holding a table indicating a correspondence relationship between the provided resource and the task to which the thread belongs; and specifying, from the management means, a resource corresponding to the task notified from the notification means from the management means. An application execution device comprising: a collection unit configured to collect the provided resources.
【請求項21】 前記Javaミドルウェア部はさらに、 デバイスの状態の変化を、実行中のアプリケーションに
通知してくれるように依頼する依頼手段と、 前記依頼に応じて、前記変化を検知すると、前記アプリ
ケーションに前記変化があったことの通知をする状態変
化通知手段とを有することを特徴とする請求項20記載
のアプリケーション実行装置。
21. A requesting means for requesting a running application to be notified of a change in the state of a device, the Java middleware unit further comprising: 21. The application execution apparatus according to claim 20, further comprising: a status change notification unit configured to notify that the change has occurred.
【請求項22】 前記依頼手段は、前記変化があったこ
との連絡を待ち受けるリスナーの呼び出しを前記状態変
化通知手段に依頼し、 前記状態変化通知手段は、前記変化を検知すると、依頼
された前記リスナーの呼び出しを行うことにより、前記
通知をすることを特徴とする請求項21記載のアプリケ
ーション実行装置。
22. The requesting unit requests the state change notifying unit to call a listener waiting for a notification that the change has occurred, and the state change notifying unit detects the change when detecting the change. 22. The application execution device according to claim 21, wherein the notification is made by calling a listener.
【請求項23】 前記状態変化通知手段は、前記リスナ
ーの呼び出しを実行する専用スレッドを生成し、当該専
用スレッドを実行することにより前記リスナーの呼び出
しを行い、 前記Javaミドルウェア部はさらに、前記リスナーと前記
専用スレッドと前記アプリケーションとの対応関係を示
すテーブルを保持する第2テーブル保持手段と、 前記依頼手段が前記リスナーの呼び出しを前記状態変化
通知手段に依頼する毎に、前記テーブルを参照し、前記
リスナーと対応関係にあるアプリケーションが前記テー
ブルに保持されているか否かを判定し、保持されている
場合は、当該アプリケーションに対応づけて当該リスナ
ーを前記テーブルに追加するテーブル更新手段と、 前記状態変化通知手段は、前記テーブル更新手段によっ
て当該アプリケーションが保持されていると判定された
場合は、前記専用スレッドを新たに生成せず、保持され
ていないと判定された場合は、前記専用スレッドを新た
に生成することを特徴とする請求項22記載のアプリケ
ーション実行装置。
23. The state change notifying means generates a dedicated thread for executing the call of the listener, and calls the listener by executing the dedicated thread. The Java middleware unit further includes: A second table holding unit for holding a table indicating a correspondence relationship between the dedicated thread and the application, and each time the request unit requests the state change notification unit to call the listener, the table is referred to, A table updating means for determining whether or not an application corresponding to the listener is held in the table, and if held, adding the listener to the table in association with the application; and Notifying means is provided by the table updating means. The dedicated thread is not newly generated when it is determined that the dedicated thread is held, and the dedicated thread is newly generated when it is determined that the dedicated thread is not held. 23. The application execution device according to 22.
【請求項24】 前記専用スレッドは、スレッド間の情
報伝達を行うキューに、前記変化が発生したことを示す
情報が保持されているか否かを監視し、情報が保持され
ている場合に対応する前記リスナーの呼び出しを行うこ
とを特徴とする請求項23記載のアプリケーション実行
装置。
24. The dedicated thread monitors whether information indicating that the change has occurred is held in a queue for transmitting information between threads, and responds to the case where the information is held. The application execution device according to claim 23, wherein the listener is called.
【請求項25】 前記専用スレッドは、スレッド間の情
報伝達を行うキューに、前記変化が発生したことを示す
情報が保持される前はウエイト状態であり、キューに情
報が保持されると実行状態に移行し、対応する前記リス
ナーの呼び出しを行うことを特徴とする請求項23記載
のアプリケーション実行装置。
25. The dedicated thread is in a wait state before information indicating the occurrence of the change is held in a queue for transmitting information between threads, and is in an execution state when information is held in the queue. 24. The application execution device according to claim 23, wherein the process proceeds to step (b), and the corresponding listener is called.
【請求項26】 前記Javaミドルウェア部はさらに、 前記タスクを構成する前記アプリケーション用スレッド
とは別に、前記Javaミドルウェア部に必要な資源を確保
する資源確保用スレッドを生成する資源確保用スレッド
生成手段と、 生成した資源確保用スレッドを実行することにより前記
Javaミドルウェア部に必要な資源を確保する資源確保手
段とを有し、 前記回収手段は、前記資源確保手段によって確保された
前記Javaミドルウェア部に必要な資源を回収することな
く、前記通知手段から通知されたタスクに対応する資源
を前記管理手段より特定し、アプリケーションに提供さ
れていた資源を回収することを特徴とする請求項20記
載のアプリケーション実行装置。
26. The Java middleware unit further comprises: a resource securing thread generating unit configured to generate a resource securing thread for securing resources required for the Java middleware unit, separately from the application thread configuring the task. By executing the generated resource securing thread,
A resource securing unit for securing resources required for the Java middleware unit, wherein the collecting unit notifies the Java middleware unit from the notifying unit without collecting the resources required for the Java middleware unit secured by the resource securing unit. 21. The application execution apparatus according to claim 20, wherein a resource corresponding to the task specified is specified by the management unit, and the resource provided to the application is collected.
【請求項27】 アプリケーションに資源を提供するOS
部とミドルウェア部を備えるアプリケーション実行装置
であって、 前記ミドルウェア部は、 前記OS部からの要求に応じて資源の提供を要求したアプ
リケーションがどれであるかを通知し、アプリケーショ
ンが終了すると、終了したアプリケーションがどれであ
るかを通知する通知手段を有し、 前記OS部は、 資源の提供を要求したアプリケーションがどれであるか
の通知を要求する要求手段と、 通知されたアプリケーションと資源との対応関係を示す
テーブルを保持する資源管理テーブル手段と、 通知手段から終了したアプリケーションがどれであるか
が通知されると、前記資源管理テーブル手段により終了
したアプリケーションに対応する資源を特定し、特定し
た資源を回収する資源回収手段とを有することを特徴と
するアプリケーション実行装置。
27. An OS for providing resources to an application
An application execution device comprising a unit and a middleware unit, wherein the middleware unit notifies which application has requested the provision of resources in response to a request from the OS unit, and terminates when the application ends. A notification unit for notifying an application, the OS unit includes a request unit for requesting a notification of an application which has requested the provision of the resource, and a correspondence between the notified application and the resource A resource management table means for holding a table indicating the relationship; and a notification means for notifying which application has been terminated, a resource corresponding to the terminated application is specified by the resource management table means, and the specified resource Having resource recovery means for recovering resources Execution device.
【請求項28】 前記通知手段は、 資源の提供を要求したアプリケーションをロードしたク
ラスローダを特定するローダ特定手段と、 アプリケーションをロードしたクラスローダとアプリケ
ーションとの対応関係を示すテーブルを保持するテーブ
ル手段と、 前記ローダ特定手段によって特定されたクラスローダに
対応するアプリケーションを前記テーブルから特定する
アプリケーション特定手段とを有することを特徴とする
請求項27記載のアプリケーション実行装置。
28. The notifying unit includes: a loader specifying unit that specifies a class loader that has loaded an application requesting provision of resources; and a table unit that holds a table indicating a correspondence between the class loader that has loaded the application and the application. 28. The application execution device according to claim 27, further comprising: an application specifying unit that specifies an application corresponding to the class loader specified by the loader specifying unit from the table.
【請求項29】 前記ローダ特定手段は、アプリケーシ
ョンを構成するクラスの呼び出し元情報を格納するスタ
ックを参照することにより、資源の提供を要求したアプ
リケーションをロードしたクラスローダを特定すること
を特徴とする請求項28記載のアプリケーション実行装
置。
29. The method according to claim 29, wherein the loader specifying unit specifies a class loader loaded with the application that has requested the provision of the resource by referring to a stack storing caller information of a class configuring the application. 29. The application execution device according to claim 28.
【請求項30】 前記OS部はさらに、アプリケーション
毎にアプリケーションを特定するIDを割当てる割当て手
段を有し、 前記通知手段は、前記割当て手段によって割当てられた
IDを通知することにより、資源を提供したアプリケーシ
ョンがどれであるかを通知し、終了したアプリケーショ
ンがどれであるかを通知することを特徴とする請求項2
9記載のアプリケーション実行装置。
30. The OS unit further comprises an assigning means for assigning an ID for specifying an application for each application, wherein the notifying means is assigned by the assigning means.
3. The method according to claim 2, wherein by notifying the ID, the application which provided the resource is notified, and the application which has been terminated is notified.
9. The application execution device according to item 9.
【請求項31】 前記OS部はさらに、 アプリケーション毎にアプリケーションを特定するIDを
割当てる割当て手段を有し、 前記通知手段は、前記割当て手段によって割当てられた
IDを通知することにより、資源を提供したアプリケーシ
ョンがどれであるかを通知し、終了したアプリケーショ
ンがどれであるかを通知することを特徴とする請求項2
8記載のアプリケーション実行装置。
31. The OS unit further comprises an assigning means for assigning an ID for specifying an application for each application, wherein the notifying means is assigned by the assigning means.
3. The method according to claim 2, wherein by notifying the ID, the application which provided the resource is notified, and the application which has been terminated is notified.
9. The application execution device according to 8.
【請求項32】 前記OS部はさらに、アプリケーション
毎にアプリケーションを特定するIDを割当てる割当て手
段を有し、 前記通知手段は、前記割当て手段によって割当てられた
IDを通知することにより、資源を提供したアプリケーシ
ョンがどれであるかを通知し、終了したアプリケーショ
ンがどれであるかを通知することを特徴とする請求項2
7記載のアプリケーション実行装置。
32. The OS unit further comprises an assigning means for assigning an ID for specifying an application for each application, wherein the notifying means is assigned by the assigning means.
3. The method according to claim 2, wherein by notifying the ID, the application which provided the resource is notified, and the application which has been terminated is notified.
8. The application execution device according to 7.
【請求項33】 アプリケーションに資源を提供する複
数のライブラリ部とカーネル 部を備えるアプリケーシ
ョン実行装置に用いられるプログラムを記録したコンピ
ュータ 読み取り可能な記録媒体であって、 前記プログラムは、請求項1、17の何れか1項に記載
の手段をコンピュータに実現させることを特徴とする記
録媒体。
33. A computer-readable recording medium recording a program used for an application execution device including a plurality of library units and a kernel unit for providing resources to an application, wherein the program is a computer-readable recording medium. A recording medium which causes a computer to realize the means according to any one of the preceding claims.
【請求項34】 アプリケーションに資源を提供するOS
部とJavaミドルウェア部を備えるアプリケーション実行
装置に用いられるプログラムを記録したコンピュータ読
み取り可能な記録媒体であって、 前記プログラムは、請求項20に記載の手段をコンピュ
ータに実現させることを特徴とする記録媒体。
34. An OS for providing resources to an application
21. A computer-readable recording medium recording a program used in an application execution device including a unit and a Java middleware unit, wherein the program causes a computer to realize the means according to claim 20. .
【請求項35】 アプリケーションに資源を提供するOS
部とミドルウェア部を備えるアプリケーション実行装置
に用いられるプログラムを記録したコンピュータ読み取
り可能な記録媒体であって、 前記プログラムは、請求項27に記載の手段をコンピュ
ータに実現させることを特徴とする記録媒体。
35. An OS for providing resources to an application
28. A computer-readable recording medium recording a program used for an application execution device including a unit and a middleware unit, wherein the program causes a computer to realize the unit according to claim 27.
【請求項36】 ガベージコレクションが必要なアプリ
ケーション用のメモリヒープ領域を管理するアプリケー
ション実行装置であって、 アプリケーションが起動される毎に、メモリヒープ領域
から分割ヒープ領域を獲得する分割ヒープ領域獲得手段
と、 起動されたアプリケーションに、前記分割ヒープ領域獲
得手段によって獲得された分割ヒープ領域を割当てる割
当て手段と、 アプリケーションが終了する毎に、当該アプリケーショ
ンに割当てられた分割ヒープ領域を解放するメモリ解放
手段とを備えることを特徴とするアプリケーション実行
装置。
36. An application execution device that manages a memory heap area for an application that requires garbage collection, wherein each time an application is started, a divided heap area acquiring unit acquires a divided heap area from the memory heap area. Allocating means for allocating the divided heap area acquired by the divided heap area acquiring means to the started application; and memory releasing means for releasing the divided heap area allocated to the application every time the application is terminated. An application execution device, comprising:
【請求項37】 前記アプリケーション実行装置はさら
に、 アプリケーションに関連するオブジェクトに対して、当
該アプリケーションに割当てられた分割ヒープ領域内で
オブジェクト領域を獲得するオブジェクト領域獲得手段
と、 前記分割ヒープ領域を対象にガベージコレクションを行
うガベージコレクション手段とを備えることを特徴とす
る請求項36記載のアプリケーション実行装置。
37. The application execution device, further comprising: an object area acquiring means for acquiring an object area in an object related to the application within a divided heap area allocated to the application; The application execution apparatus according to claim 36, further comprising garbage collection means for performing garbage collection.
【請求項38】 前記アプリケーション実行装置はさら
に、前記ガベージコレクション手段によって対象となる
分割ヒープ領域のガベージコレクションが行われている
間、当該分割ヒープ領域を使用するアプリケーションの
み実行を停止させ、他の分割ヒープ領域を使用するアプ
リケーションは継続して実行させるロック手段を備える
ことを特徴とする請求項37記載のアプリケーション実
行装置。
38. While the garbage collection unit is performing garbage collection of the target divided heap area, the application execution apparatus stops execution of only an application that uses the divided heap area, and executes another division. 38. The application execution apparatus according to claim 37, wherein the application using the heap area includes a lock unit that continuously executes the application.
【請求項39】 前記アプリケーション実行装置はさら
に、起動中のアプリケーションと分割ヒープ領域との対
応関係示すテーブルを保持するテーブル手段を備え、 前記メモリ解放手段は、終了したアプリケーションに対
応する分割ヒープ領域を前記テーブル手段から特定して
解放することを特徴とする請求項36記載のアプリケー
ション実行装置。
39. The application execution device further comprises table means for holding a table indicating a correspondence between a running application and a divided heap area, and the memory releasing means stores a divided heap area corresponding to the terminated application. 37. The application execution device according to claim 36, wherein the application execution device is specified and released from the table.
【請求項40】 前記アプリケーション実行装置はさら
に、起動中のアプリケーションと分割ヒープ領域との対
応関係示すテーブルを保持するテーブル手段を備え、 前記割当て手段は、さらに、アプリケーションが起動さ
れる毎に、当該アプリケーションと分割領域との新たな
対応関係をテーブルに追加することを特徴とする請求項
36記載のアプリケーション実行装置。
40. The application execution apparatus further comprises table means for holding a table indicating a correspondence between the running application and the divided heap area, and the allocating means further comprises: 37. The application execution device according to claim 36, wherein a new correspondence between the application and the divided area is added to the table.
【請求項41】 ガベージコレクションが必要なアプリ
ケーション用のメモリヒープ領域を管理するアプリケー
ション実行装置であって、 メモリヒープ領域全体をシステムヒープ領域として割当
てるシステムヒープ領域割当て手段と、 システム関連のオブジェクト領域をシステムヒープ領域
内に獲得するオブジェクト領域獲得手段と、 アプリケーションが起動される毎に、システムヒープ領
域から分割ヒープ領域を獲得する分割ヒープ領域獲得手
段と、 起動されたアプリケーションに、獲得された分割ヒープ
領域を割当てる割当て手段と、 アプリケーションの終了時に、当該アプリケーションに
対して割当てられた分割ヒープ領域を解放するメモリ解
放手段とを備えることを特徴とするアプリケーション実
行装置。
41. An application execution apparatus for managing a memory heap area for an application requiring garbage collection, comprising: a system heap area allocating means for allocating an entire memory heap area as a system heap area; Means for obtaining an object area in a heap area, means for obtaining a divided heap area from a system heap area each time an application is started, and means for obtaining a divided heap area for a started application. An application execution apparatus, comprising: an allocating means for allocating; and a memory releasing means for releasing a divided heap area allocated to the application when the application ends.
【請求項42】 前記アプリケーション実行装置はさら
に、システムヒープ領域内部を対象に、分割ヒープ領域
を単位にガベージコレクションを行うガベージコレクシ
ョン手段を備えることを特徴とする請求項41記載のア
プリケーション実行装置。
42. The application execution device according to claim 41, wherein the application execution device further comprises a garbage collection unit that performs garbage collection in units of a divided heap region for a system heap region.
【請求項43】 ガベージコレクションが必要なアプリ
ケーション用のメモリヒープ領域を管理するメモリヒー
プ管理方法であって、 アプリケーションが起動される毎に、メモリヒープ領域
から分割ヒープ領域を獲得する分割ヒープ領域獲得ステ
ップと、 起動されたアプリケーションに、前記分割ヒープ領域獲
得ステップによって獲得された分割ヒープ領域を割当て
る割当てステップと、 アプリケーションが終了する毎に、当該アプリケーショ
ンに割当てられた分割ヒープ領域を解放するメモリ解放
ステップとを含むことを特徴とするメモリヒープ管理方
法。
43. A memory heap management method for managing a memory heap area for an application that requires garbage collection, wherein each time the application is started, a divided heap area is acquired from the memory heap area. An allocation step of allocating the divided heap area acquired by the divided heap area acquisition step to the started application; and a memory releasing step of releasing the divided heap area allocated to the application every time the application ends. A memory heap management method, comprising:
【請求項44】 前記メモリヒープ管理方法はさらに、 アプリケーションに関連するオブジェクトに対して、当
該アプリケーションに割当てられた分割ヒープ領域内で
オブジェクト領域を獲得するオブジェクト領域獲得ステ
ップと、 オブジェクト領域獲得ステップにおいてオブジェクト領
域の獲得に失敗したとき、個々の分割ヒープ領域を対象
にガベージコレクションを行うガベージコレクションス
テップとを含むことを特徴とする請求項43記載のメモ
リヒープ管理方法。
44. The memory heap management method, further comprising: for an object related to an application, an object area acquiring step of acquiring an object area within a divided heap area allocated to the application; 44. The memory heap management method according to claim 43, further comprising a garbage collection step of performing garbage collection for each of the divided heap areas when the acquisition of the area has failed.
【請求項45】 前記メモリヒープ管理方法はさらに、
前記ガベージコレクションステップによって対象となる
分割ヒープ領域のガベージコレクションが行われている
間、当該分割ヒープ領域を使用するアプリケーションの
み実行を停止させ、他の分割ヒープ領域を使用するアプ
リケーションは継続して実行させるロックステップを含
むことを特徴とする請求項44記載のメモリヒープ管理
方法。
45. The memory heap management method further comprises:
While the garbage collection of the target divided heap area is being performed by the garbage collection step, only the application using the divided heap area stops executing, and the application using the other divided heap area is continuously executed. The memory heap management method according to claim 44, further comprising a lock step.
【請求項46】 前記メモリヒープ管理方法はさらに、
起動中のアプリケーションと分割ヒープ領域との対応関
係示すテーブルを保持するテーブル保持ステップを含
み、 前記メモリ解放ステップは、終了したアプリケーション
に対応する分割ヒープ領域を前記テーブルから特定して
解放することを特徴とする請求項43記載のメモリヒー
プ管理方法。
46. The memory heap management method further comprises:
The method further includes a table holding step of holding a table indicating a correspondence relationship between a running application and a divided heap area, wherein the memory releasing step specifies and releases a divided heap area corresponding to the terminated application from the table. The memory heap management method according to claim 43, wherein
【請求項47】 前記メモリヒープ管理方法はさらに、
起動中のアプリケーションと分割ヒープ領域との対応関
係示すテーブルを保持するテーブル保持ステップを含
み、 前記割り当てステップは、さらに、アプリケーションが
起動される毎に、当該アプリケーションと分割領域との
新たな対応関係を前記テーブルに追加することを特徴と
する請求項43記載のメモリヒープ管理方法。
47. The memory heap management method further comprises:
A table holding step of holding a table indicating a correspondence relationship between the running application and the divided heap area, wherein the assigning step further includes, every time the application is started, a new correspondence between the application and the divided area. The memory heap management method according to claim 43, wherein the memory heap is added to the table.
【請求項48】 ガベージコレクションが必要なアプリ
ケーション用のメモリヒープ領域を管理するメモリヒー
プ管理方法であって、 メモリヒープ領域全体をシステムヒープ領域として割当
てるシステムヒープ領域割当てステップと、 システム関連のオブジェクト領域をシステムヒープ領域
内に獲得するオブジェクト領域獲得ステップと、 アプリケーションが起動される毎に、システムヒープ領
域から分割ヒープ領域を獲得する分割ヒープ領域獲得ス
テップと、 起動されたアプリケーションに、獲得された分割ヒープ
領域を割り当てる割当てステップと、 アプリケーションの終了時に、当該アプリケーションに
対して割当てられた分割ヒープ領域を解放するメモリ解
放ステップとを含むことを特徴とするメモリヒープ管理
方法。
48. A memory heap management method for managing a memory heap area for an application requiring garbage collection, comprising: a system heap area allocating step of allocating the entire memory heap area as a system heap area; An object area acquiring step for acquiring in the system heap area, a divided heap area acquiring step for acquiring a divided heap area from the system heap area every time the application is started, and a divided heap area acquired for the started application. A memory heap management method, comprising: an allocation step of allocating the application; and a memory release step of releasing a divided heap area allocated to the application when the application ends.
【請求項49】 前記メモリヒープ管理方法はさらに、
分割ヒープ領域獲得ステップが分割ヒープ領域の獲得に
失敗したとき、システムヒープ領域内部を対象に、分割
ヒープ領域を単位にガベージコレクションを行うガベー
ジコレクションステップを含むことを特徴とする請求項
48記載のメモリヒープ管理方法。
49. The memory heap management method further comprises:
49. The memory according to claim 48, further comprising a garbage collection step of performing garbage collection in units of the divided heap area for the inside of the system heap area when the divided heap area acquisition step fails to acquire the divided heap area. Heap management method.
【請求項50】 ガベージコレクションが必要なアプ
リケーションを実行する装置に用いられるプログラムを
記録したコンピュータ読み取り可能な記録媒体であっ
て、 前記プログラムは、請求項43〜49の何れか1項に記
載のステップをコンピュータに実行させることを特徴と
する記録媒体。
50. A computer-readable recording medium recording a program used for an apparatus for executing an application that requires garbage collection, wherein the program is a program according to any one of claims 43 to 49. Recording medium characterized by causing a computer to execute the following.
JP2001145592A 2000-05-15 2001-05-15 Device and method for executing application Withdrawn JP2002259146A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001145592A JP2002259146A (en) 2000-05-15 2001-05-15 Device and method for executing application

Applications Claiming Priority (7)

Application Number Priority Date Filing Date Title
JP2000141492 2000-05-15
JP2000-141492 2000-05-15
JP2000-141493 2000-05-15
JP2000141493 2000-05-15
JP2000-398746 2000-12-27
JP2000398746 2000-12-27
JP2001145592A JP2002259146A (en) 2000-05-15 2001-05-15 Device and method for executing application

Publications (1)

Publication Number Publication Date
JP2002259146A true JP2002259146A (en) 2002-09-13

Family

ID=27481290

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001145592A Withdrawn JP2002259146A (en) 2000-05-15 2001-05-15 Device and method for executing application

Country Status (1)

Country Link
JP (1) JP2002259146A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005064467A1 (en) * 2003-12-26 2005-07-14 Ntt Docomo, Inc. Communication terminal and program
JP2006134136A (en) * 2004-11-08 2006-05-25 Mitsubishi Electric Corp Application processing device, garbage collection execution method, storage area management method and garbage collection execution program
JP2006236245A (en) * 2005-02-28 2006-09-07 Toshiba Corp Arithmetic processing unit
JP2007226790A (en) * 2006-02-21 2007-09-06 Samsung Electronics Co Ltd Device and method for managing resource in containment framework environment
KR100772872B1 (en) * 2006-02-24 2007-11-02 삼성전자주식회사 Apparatus and method for managing resource using virtual ID under multiple java applications environment
KR101116615B1 (en) 2007-03-28 2012-03-07 삼성전자주식회사 Resource management system and method for applications and threads in JAVA Virtual Machine
US8332483B2 (en) 2003-12-15 2012-12-11 International Business Machines Corporation Apparatus, system, and method for autonomic control of grid system resources
WO2013018593A1 (en) * 2011-07-29 2013-02-07 日本電気株式会社 Information processing apparatus, information processing system, information processing method, and control program storage medium
JP2014206871A (en) * 2013-04-12 2014-10-30 富士通株式会社 Control method, control device, control program and recording medium
JP2016054410A (en) * 2014-09-03 2016-04-14 日本放送協会 Receiver and program
JP6070866B1 (en) * 2016-01-07 2017-02-01 鉄道情報システム株式会社 Thread safe system, thread safe method, thread safe program, and storage medium
WO2019049542A1 (en) * 2017-09-07 2019-03-14 ソニー株式会社 Information processing device and information processing method
JP2021096857A (en) * 2019-12-16 2021-06-24 ベイジン バイドゥ ネットコム サイエンス アンド テクノロジー カンパニー リミテッド Data processing method, device, electronic apparatus, and storage medium

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8332483B2 (en) 2003-12-15 2012-12-11 International Business Machines Corporation Apparatus, system, and method for autonomic control of grid system resources
US7496922B2 (en) 2003-12-26 2009-02-24 Ntt Docomo, Inc. Communication terminal and program therefor
WO2005064467A1 (en) * 2003-12-26 2005-07-14 Ntt Docomo, Inc. Communication terminal and program
JP4641176B2 (en) * 2004-11-08 2011-03-02 三菱電機株式会社 Application processing apparatus and application processing program
JP2006134136A (en) * 2004-11-08 2006-05-25 Mitsubishi Electric Corp Application processing device, garbage collection execution method, storage area management method and garbage collection execution program
JP2006236245A (en) * 2005-02-28 2006-09-07 Toshiba Corp Arithmetic processing unit
JP4557748B2 (en) * 2005-02-28 2010-10-06 株式会社東芝 Arithmetic processing unit
JP2007226790A (en) * 2006-02-21 2007-09-06 Samsung Electronics Co Ltd Device and method for managing resource in containment framework environment
KR100772872B1 (en) * 2006-02-24 2007-11-02 삼성전자주식회사 Apparatus and method for managing resource using virtual ID under multiple java applications environment
US8302103B2 (en) 2007-03-28 2012-10-30 Samsung Electronics Co., Ltd. System and method for managing resources of applications and threads performed on java virtual machine
KR101116615B1 (en) 2007-03-28 2012-03-07 삼성전자주식회사 Resource management system and method for applications and threads in JAVA Virtual Machine
WO2013018593A1 (en) * 2011-07-29 2013-02-07 日本電気株式会社 Information processing apparatus, information processing system, information processing method, and control program storage medium
JP2014206871A (en) * 2013-04-12 2014-10-30 富士通株式会社 Control method, control device, control program and recording medium
JP2016054410A (en) * 2014-09-03 2016-04-14 日本放送協会 Receiver and program
JP6070866B1 (en) * 2016-01-07 2017-02-01 鉄道情報システム株式会社 Thread safe system, thread safe method, thread safe program, and storage medium
WO2019049542A1 (en) * 2017-09-07 2019-03-14 ソニー株式会社 Information processing device and information processing method
JPWO2019049542A1 (en) * 2017-09-07 2020-10-15 ソニー株式会社 Information processing device and information processing method
JP7230811B2 (en) 2017-09-07 2023-03-01 ソニーグループ株式会社 Information processing device and information processing method
US11720383B2 (en) 2017-09-07 2023-08-08 Sony Corporation Information processing apparatus and information processing method
JP2021096857A (en) * 2019-12-16 2021-06-24 ベイジン バイドゥ ネットコム サイエンス アンド テクノロジー カンパニー リミテッド Data processing method, device, electronic apparatus, and storage medium
JP7194162B2 (en) 2019-12-16 2022-12-21 阿波▲羅▼智▲聯▼(北京)科技有限公司 Data processing method, device, electronic device and storage medium

Similar Documents

Publication Publication Date Title
EP1164485A2 (en) Apparatus and method for collecting resources which became unnecessary
JP5212360B2 (en) Control program, control system, and control method
JP5015665B2 (en) Method, apparatus, and computer program for sharing kernel services between kernels
US4916608A (en) Provision of virtual storage resources to an operating system control program
CN100568182C (en) The method and system of distribution work in the data handling system of subregion logically
JP2002259146A (en) Device and method for executing application
US7770177B2 (en) System for memory reclamation based on thread entry and release request times
US20070203959A1 (en) Apparatus and method for managing resources using virtual ID in multiple Java application environment
US5355488A (en) Method for adaptively building a library of program threads
JP2008107966A (en) Computer system
JP6543219B2 (en) Virtual machine allocation apparatus and resource management method
CN102047217A (en) Regaining control of a processing resource that executes an external execution context
JP2001306341A (en) Computer system and computer readable recording medium
JPH0799674A (en) Partial file updating system for information processor
KR101552580B1 (en) Method for system recovery including mobile device and backup supporting multi operation system
JP2022539956A (en) MEMORY MANAGEMENT METHOD AND RELATED PRODUCTS
JP5699665B2 (en) Server apparatus, process execution method, and program
JPH01126738A (en) System for control data set competition in execution of multiple job
JPH06110717A (en) Complex computer system
JPH10312297A (en) Resource managing method, resource managing device and recording medium for information processing system having multi-task function
JP2002287986A (en) Server calculator distributed processing environment system, program, and distributed processing environment method
JPH04346136A (en) Virtual instruction processor structure control method
CN114443286A (en) Equipment resource management method, system, electronic equipment and storage medium
JPH05113894A (en) File resource managing system in virtual computer system
JP2010231333A (en) Job processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080425

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20091203