JP2010009149A - Dynamic library loading method and device - Google Patents

Dynamic library loading method and device Download PDF

Info

Publication number
JP2010009149A
JP2010009149A JP2008165118A JP2008165118A JP2010009149A JP 2010009149 A JP2010009149 A JP 2010009149A JP 2008165118 A JP2008165118 A JP 2008165118A JP 2008165118 A JP2008165118 A JP 2008165118A JP 2010009149 A JP2010009149 A JP 2010009149A
Authority
JP
Japan
Prior art keywords
library
program
execution
dynamic library
control information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008165118A
Other languages
Japanese (ja)
Inventor
Mitsuru Hanada
満 花田
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2008165118A priority Critical patent/JP2010009149A/en
Publication of JP2010009149A publication Critical patent/JP2010009149A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a dynamic library loading method and device. <P>SOLUTION: The method for a device having a program, one or two or more dynamic libraries used by the program and a table associating the dynamic library with control information to load the dynamic library is provided. The method includes steps of reading the control information associated with the dynamic library; dynamically connecting, when the read control information shows that the dynamic library can be used in a first process that is equal to a process for executing the program, the first process to the dynamic library; and generating, when the information does not show that the dynamic library can be used in the first process that is equal to the process for executing the program, a second process different from the first process and dynamically connecting the second process to the dynamic library. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、動的ライブラリロード方法及び装置に関する。   The present invention relates to a dynamic library loading method and apparatus.

一般的に携帯電話端末は、仮想機械(Virtual Machine:VM)を介してJava(登録商標)などで記述されたプログラムを実行するか、又は当該携帯電話端末のCPUで直接動作可能な任意のプログラムをインストールし実行することができる。ここでVMは現実のコンピューター内に仮想的に作成されたコンピューターであり、CPU、メモリ、ネットワーク設定などの資源を仮想的に有する。従ってソフトウェアはVMを現実のコンピューターと同様に扱うことができる。VMプロセスはVMを実行するために生成されたプロセスである。プロセスは、プログラムの動作中のインスタンスであり、プログラムの実行に必要な全ての変数及び状態を有している。プロセスは処理を実行するために生成され、OSから記憶領域を割り当てられる。複数のプロセスはOSにより提供されるプロセス間通信機能により互いに情報を通信し、円滑な処理を実現する。あるプログラムを実行するために生成されたプロセスを主プロセスとし、主プロセスから派生する1又は複数の処理をそれぞれ1又は複数の副プロセスにより実行することにより、副プロセスのうちの1又は複数にエラーが生じた場合に主プロセス、つまりプログラムへの影響を最小限にとどめることができる。   Generally, a mobile phone terminal executes a program described in Java (registered trademark) or the like via a virtual machine (VM), or any program that can be directly operated by the CPU of the mobile phone terminal. Can be installed and run. Here, the VM is a computer virtually created in an actual computer, and virtually has resources such as a CPU, memory, and network settings. Therefore, the software can handle the VM like a real computer. A VM process is a process created to execute a VM. A process is a running instance of a program and has all the variables and states needed to execute the program. A process is generated to execute processing, and a storage area is allocated from the OS. The plurality of processes communicate information with each other by an inter-process communication function provided by the OS, thereby realizing smooth processing. An error occurs in one or more of the sub-processes by executing one or more processes derived from the main process as one or more sub-processes, with the process generated to execute a program as the main process. If this happens, the impact on the main process, that is, the program can be minimized.

しかしながら、Java(登録商標) VMを介してプログラムを動作させる場合、JNI(Java(登録商標) Native Interface)を使用することによりCPUで直接動作可能な任意のライブラリをインストール、ロードする。この場合、CPUで直接動作可能なライブラリはVMプロセスによりロードされ、VMプロセスの中で動作する。ライブラリの実行によりプロセスに致命的なエラーが発生した場合、VM自体の動作にも影響を与えてしまう恐れがある。また、プロセスごとにセキュリティーレベルを設定するOSでは、ライブラリはVMと同じセキュリティーレベルで動作するため、ライブラリごとにセキュリティーレベルを設定することができない。   However, when a program is operated via a Java (registered trademark) VM, an arbitrary library that can be directly operated by the CPU is installed and loaded by using JNI (Java (registered trademark) Native Interface). In this case, the library that can be directly operated by the CPU is loaded by the VM process and operates in the VM process. If a fatal error occurs in the process due to the execution of the library, the operation of the VM itself may be affected. Further, in the OS that sets the security level for each process, the library operates at the same security level as that of the VM, and therefore the security level cannot be set for each library.

従って、インストールされたライブラリの品質によってはVMごと異常終了してしまう可能性がある。特にVMが複数の処理を行っている場合には、動作中の全ての処理に影響が及んでしまうという問題があった。また、VMプロセスのセキュリティーを変えることができない場合には、ライブラリごとに独自のセキュリティーレベルを設定することができないという問題があった。   Therefore, depending on the quality of the installed library, the VM may end abnormally. In particular, when the VM performs a plurality of processes, there is a problem in that all processes in operation are affected. In addition, when the security of the VM process cannot be changed, there is a problem that a unique security level cannot be set for each library.

特許文献1は1つのCPUが複数の実行モードを提供し、1つのプログラムを再コンパイルせずに複数の実行モードで動作させる方法を開示している。しかしながら、特許文献1の方法は、プログラム毎にCPUの実行モードを変更するが、当該プログラムの呼び出し元プロセスと同一の又は異なるプロセスでライブラリを実行することはできない。従って、依然として上述の問題が残る。
特許第3968377号
Patent Document 1 discloses a method in which one CPU provides a plurality of execution modes and operates in a plurality of execution modes without recompiling one program. However, although the method of Patent Document 1 changes the execution mode of the CPU for each program, the library cannot be executed in the same or different process as the calling process of the program. Therefore, the above problem still remains.
Patent No. 3968377

本発明は、ライブラリ毎に実行するプロセスを選択することにより、当該ライブラリを使用するプログラム及び当該プログラムを実行する装置の信頼度を向上する方法及び装置を提供することである。   An object of the present invention is to provide a method and apparatus for improving the reliability of a program that uses the library and an apparatus that executes the program by selecting a process to be executed for each library.

本発明の第1の態様によると、プログラム、前記プログラムにより使用される1又は複数の動的ライブラリ、及び前記動的ライブラリと制御情報を対応付けるテーブルを有する装置が前記動的ライブラリをロードする方法が提供される。当該方法は、前記動的ライブラリに対応付けられた前記制御情報を読み出す段階、読み出された前記制御情報が、前記動的ライブラリは前記プログラムが実行されるプロセスと同一の第1のプロセスで使用され得ると示す場合、前記第1のプロセスと前記動的ライブラリを動的に結合する段階、及び読み出された前記制御情報が、前記動的ライブラリは前記プログラムが実行されるプロセスと同一の第1のプロセスで使用され得ると示さない場合、前記第1のプロセスと異なる第2のプロセスを生成し前記第2のプロセスと前記動的ライブラリを動的に結合する段階、を有する。   According to a first aspect of the present invention, there is provided a method for loading a dynamic library by an apparatus having a program, one or more dynamic libraries used by the program, and a table associating the dynamic library with control information. Provided. The method includes the step of reading the control information associated with the dynamic library, and the read control information is used in a first process that is the same as a process in which the program is executed. The dynamic library is dynamically coupled to the first process and the read control information indicates that the dynamic library is the same as the process in which the program is executed. Generating a second process different from the first process and dynamically combining the second process and the dynamic library if not indicated to be usable in one process.

本発明の第2の態様によると、装置が提供される。当該装置は、プログラム、前記プログラムにより使用される1又は複数の動的ライブラリ、及び前記動的ライブラリと前記制御情報を対応付けるテーブル、を有し、前記動的ライブラリに対応付けられた前記制御情報を読み出す手段、読み出された前記制御情報が、前記動的ライブラリは前記プログラムが実行されるプロセスと同一の第1のプロセスで使用され得ると示す場合、前記第1のプロセスと前記動的ライブラリを動的に結合する手段、及び読み出された前記制御情報が、前記動的ライブラリは前記プログラムが実行されるプロセスと同一の第1のプロセスで使用され得ると示さない場合、前記第1のプロセスと異なる第2のプロセスを生成し前記第2のプロセスと前記動的ライブラリを動的に結合する手段、を有する。   According to a second aspect of the invention, an apparatus is provided. The apparatus includes a program, one or a plurality of dynamic libraries used by the program, and a table that associates the dynamic library with the control information. The control information associated with the dynamic library is stored in the apparatus. Means for reading, if the read control information indicates that the dynamic library can be used in the same first process as the process in which the program is executed, the first process and the dynamic library Means for dynamically combining, and the read control information does not indicate that the dynamic library can be used in the same first process as the process in which the program is executed; And generating a second process different from the first process, and dynamically coupling the second process and the dynamic library.

本発明によると、ライブラリの品質に応じて当該ライブラリを動的に結合するプロセスを選択できるので、VMの動作の安全性を向上することができる。   According to the present invention, the process of dynamically combining the libraries can be selected according to the quality of the library, so that the safety of the operation of the VM can be improved.

図1は本発明を実施する装置の構成図である。装置100は、CPU1、メインメモリ2、不揮発性メモリ3、LED4を有する。装置100は、例えば携帯電話端末、PDA、PCのような、Symbian、ITRON、Windows(登録商標)、UNIX(登録商標)、MacOS、LINUXそれらに基づくその他のOS、又はプロセス間通信に対応しライブラリを実行し得る如何なる他のOSを有する装置であっても良い。図1はSymbianOSを搭載した場合の例である。DRAMのようなメインメモリ2にはJava(登録商標)アプリケーションのようなプログラム2−3を動作させるためのファームウェアが格納され、NAND型フラッシュROMのような不揮発性メモリ3には実行プログラムや制御情報が格納される。LED4は任意であり1又は複数の色を発光する。   FIG. 1 is a block diagram of an apparatus for carrying out the present invention. The device 100 includes a CPU 1, a main memory 2, a nonvolatile memory 3, and an LED 4. The device 100 corresponds to, for example, a mobile phone terminal, PDA, PC, Symbian, ITRON, Windows (registered trademark), UNIX (registered trademark), MacOS, LINUX, another OS based on them, or a library corresponding to interprocess communication. It may be a device having any other OS capable of executing the above. FIG. 1 shows an example when a Symbian OS is installed. Firmware for operating a program 2-3 such as a Java (registered trademark) application is stored in a main memory 2 such as a DRAM, and an execution program and control information are stored in a nonvolatile memory 3 such as a NAND flash ROM. Is stored. The LED 4 is optional and emits one or more colors.

Java(登録商標)VMのようなプログラム実行プロセス2−1は、インストールされた任意のプログラム2−3を動作するために生成されたプロセスである。プログラム実行部2−1−1は、インストールされた任意のプログラムを実行する。ライブラリロード部2−1−2は、プログラム実行部2−1−1からライブラリ2−4のロード要求を受けると、制御情報3−1に従い、自身がライブラリ2−4をロードするか、又はライブラリ実行プロセス2−2を生成する。ライブラリ実行制御部2−1−3は、プログラム実行プロセス2―1からの要求によりライブラリ関数を呼び出し実行するか、又はライブラリ実行要求実行部2−2−1にライブラリ関数の呼び出し及び実行を依頼する。   The program execution process 2-1 such as Java (registered trademark) VM is a process generated to operate an arbitrary installed program 2-3. The program execution unit 2-1-1 executes an installed arbitrary program. Upon receiving a load request for the library 2-4 from the program execution unit 2-1-1, the library load unit 2-1-2 loads the library 2-4 according to the control information 3-1, or the library An execution process 2-2 is generated. The library execution control unit 2-1-3 calls and executes a library function in response to a request from the program execution process 2-1, or requests the library execution request execution unit 2-2-1 to call and execute the library function. .

図2は制御情報3−1の例を示す。制御情報3−1はテーブル形式で不揮発性メモリ3に格納される。制御情報3−1はライブラリ名又は番号のようなライブラを識別するライブラリ識別子、及びライブラリが直接実行されるべきか間接実行されるべきかを定める実行条件を有する。図2では、例としてライブラリ識別子としてライブラリ名LIB−A、LIB−Bのライブラリに対しそれぞれ実行条件として直接実行と間接実行が関連付けられている。例えばVMと同様の品質のプログラムや実行速度が求められるようなライブラリはVMプロセスと同じプロセスで実行することにより、高速に実行することができる。一方、動作を十分に保証されていないなどVMより品質の劣るライブラリや、VMと異なるセキュリティーレベルを設定すべきプログラムやライブラリはVMプロセスと別のプロセスで実行させることにより、VM自体の実行に影響を与えないようにできる。制御情報3−1はテキスト形式であっても良い。制御情報3−1はライブラリ2−4が装置100にインストールされる際にライブラリ2−4に付属する情報から得られて良く、装置100の製造時に設定されても良い。制御情報3−1は、ライブラリ2−4の作成者若しくは販売者、装置100の製造者、装置100に通信サービスを提供する通信事業者、又は他の如何なる団体により、ネットワークを介して又は記憶媒体を介して提供されても良く、或いはユーザーにより必要に応じて設定されても良い。   FIG. 2 shows an example of the control information 3-1. The control information 3-1 is stored in the nonvolatile memory 3 in a table format. The control information 3-1 has a library identifier for identifying a library such as a library name or number, and an execution condition that determines whether the library should be directly executed or indirectly executed. In FIG. 2, as an example, direct execution and indirect execution are associated with each of the library names LIB-A and LIB-B as library identifiers as execution conditions. For example, a program having the same quality as a VM and a library that requires an execution speed can be executed at high speed by executing it in the same process as the VM process. On the other hand, a library that is inferior in quality compared to a VM, such as the operation is not sufficiently guaranteed, or a program or library that should have a security level different from that of the VM is executed in a process different from the VM process, thereby affecting the execution of the VM itself. Can not be given. The control information 3-1 may be in text format. The control information 3-1 may be obtained from information attached to the library 2-4 when the library 2-4 is installed in the apparatus 100, and may be set when the apparatus 100 is manufactured. The control information 3-1 is stored on the storage medium via the network by the creator or seller of the library 2-4, the manufacturer of the device 100, the telecommunications carrier providing the communication service to the device 100, or any other organization. Or may be set as needed by the user.

図3は本発明によりライブラリをロードする方法を説明するフローチャートである。ライブラリロード部2−1−2はライブラリ2―4をロードするよう指示されると、不揮発性メモリ3に格納された制御情報3―1にアクセスし(段階310)、要求されたライブラリに関連付けられた実行条件を読み出し直接実行か間接実行かを判断する(段階320)。ライブラリ2−4に対応する実行条件が直接実行を示す場合、ライブラリロード部2−1−2はライブラリ2−4と動的に結合する(段階330)。つまりプログラム実行プロセス2―1がライブラリ2−4と動的に結合される。図3に示された動作は、1つのライブラリをロードする毎に1回行われる。   FIG. 3 is a flowchart illustrating a method for loading a library according to the present invention. When the library load unit 2-1-2 is instructed to load the library 2-4, it accesses the control information 3-1 stored in the nonvolatile memory 3 (step 310), and is associated with the requested library. The execution condition is read and it is determined whether it is direct execution or indirect execution (step 320). If the execution condition corresponding to the library 2-4 indicates direct execution, the library load unit 2-1-2 dynamically combines with the library 2-4 (step 330). That is, the program execution process 2-1 is dynamically combined with the library 2-4. The operation shown in FIG. 3 is performed once every time one library is loaded.

図4は本発明によるライブラリ関数を実行する方法を説明するフローチャートである。ライブラリ実行制御部2−1−3は、ライブラリ2―4の実行を指示されると、ライブラリ2−4と関連付けられた制御情報3―1にアクセスし(段階410)、要求されたライブラリに関連付けられた実行条件を読み出し直接実行か間接実行かを判断する(段階420)。段階410及び420は、前述の段階310及び320で得た実行条件をライブラリロード部2−1−2から受信することにより省略されても良い。ライブラリ2−4に対応する実行条件が直接実行を示す場合、ライブラリ実行制御部2−1−3は、実行するよう要求されたライブラリ関数のアドレスを検索し(段階430)、検索されたアドレスでライブラリ関数を読み出す(段階440)。ライブラリ2−4に対応する実行条件が直接実行を示す場合、ライブラリ実行制御部2−1−3は、プロセス間通信に従いRSessionBase.SendReceiveを用い、プログラム実行プロセス2―1と異なるプロセスであるライブラリ実行プロセス2−2のライブラリ実行要求実行部2−2−1にライブラリ関数の実行を依頼する(段階450)。ライブラリ実行プロセス2−2は要求を受けると(段階460)、要求されたライブラリ関数のアドレスを検索し(段階470)、検索されたアドレスでライブラリ関数を呼び出す(段階480)。図4に示された動作は、ライブラリ関数を呼び出す毎に1回行われる。   FIG. 4 is a flowchart illustrating a method for executing a library function according to the present invention. When instructed to execute the library 2-4, the library execution control unit 2-1-3 accesses the control information 3-1 associated with the library 2-4 (step 410) and associates it with the requested library. The execution condition is read and it is determined whether it is direct execution or indirect execution (step 420). Steps 410 and 420 may be omitted by receiving the execution conditions obtained in steps 310 and 320 described above from the library load unit 2-1-2. When the execution condition corresponding to the library 2-4 indicates direct execution, the library execution control unit 2-1-3 searches for the address of the library function requested to be executed (step 430), and uses the searched address. A library function is read (step 440). When the execution condition corresponding to the library 2-4 indicates direct execution, the library execution control unit 2-1-3 performs the RSBase. Using SendReceive, the library execution request execution unit 2-2-1 of the library execution process 2-2, which is a process different from the program execution process 2-1, is requested to execute the library function (step 450). Upon receiving the request (step 460), the library execution process 2-2 retrieves the address of the requested library function (step 470), and calls the library function with the retrieved address (step 480). The operation shown in FIG. 4 is performed once every time a library function is called.

図5は本発明による直接実行の場合のプロセス間のシーケンスを示す。プログラム2−3はライブラリ2−4を使用する必要がある場合、プログラム実行部2−1−1に対しSystem#laodLibraryを発行し、ライブラリ2−4のライブラリ名を渡してライブラリ2−4をロードするよう要求する(段階510)。次にプログラム実行部2−1−1はライブラリロード部2−1−2に対しライブラリ2−4のライブラリ名を渡してライブラリ2―4をロードするよう指示する(段階520)。ライブラリロード部2−1−2は制御情報3―1にアクセスしライブラリ2−4が直接実行と関連付けられていた場合(段階530)、自身とライブラリ2―4を動的に結合する(段階540)。   FIG. 5 shows the sequence between processes in the case of direct execution according to the invention. When the program 2-3 needs to use the library 2-4, it issues a System # loadLibrary to the program execution unit 2-1-1, passes the library name of the library 2-4, and loads the library 2-4. (Step 510). Next, the program execution unit 2-1-1 instructs the library load unit 2-1-2 to load the library 2-4 by passing the library name of the library 2-4 (step 520). When the library loading unit 2-1-2 accesses the control information 3-1 and the library 2-4 is directly associated with execution (step 530), the library loading unit 2-1-2 dynamically couples itself with the library 2-4 (step 540). ).

図5の下半分は直接実行のライブラリのライブラリ関数を実行する場合のプロセス間のシーケンスを示す。プログラム2−3はライブラリ2−4のライブラリ関数を実行する場合、プログラム実行部2−1−1に対しライブラリ関数名及び必要な引数、例えば文字描画関数の場合は文字列及び書き出し座標など共にライブラリ関数実行要求を送出する(段階550)。プログラム実行部2−1−1はライブラリ関数実行要求を受けると、ライブラリ実行制御部2−1−3に対し当該ライブラリ関数名と引数とを渡してライブラリ関数を実行するよう指示する(段階560)。ライブラリ関数実行指示を受けたライブラリ実行制御部2−1−3は、制御情報3―1にアクセスしライブラリ2−4が直接実行と関連付けられていた場合(段階570)、ライブラリ関数を実行する(段階580)。段階570は、段階530で読み出した実行条件をライブラリロード部2−1−2から得ることにより置き換えられても良い。   The lower half of FIG. 5 shows a sequence between processes when executing a library function of a directly executed library. When the program 2-3 executes a library function of the library 2-4, the library function name and necessary arguments for the program execution unit 2-1-1, for example, a character drawing function, a character string, a write coordinate, and the like are libraries. A function execution request is sent (step 550). Upon receiving the library function execution request, the program execution unit 2-1-1 instructs the library execution control unit 2-1-3 to execute the library function by passing the library function name and the argument (step 560). . Upon receiving the library function execution instruction, the library execution control unit 2-1-3 accesses the control information 3-1 and executes the library function when the library 2-4 is directly associated with the execution (step 570) (step 570). Step 580). Step 570 may be replaced by obtaining the execution condition read in step 530 from the library loading unit 2-1-2.

図6は本発明による間接実行の場合のプロセス間のシーケンスを示す。段階610及び段階620は図5の段階510及び段階520と同様である。次にライブラリロード部2−1−2は制御情報3―1にアクセスしライブラリ2−4が間接実行と関連付けられていた場合(段階630)、ライブラリ実行プロセス2−2を生成する(段階640)。ライブラリ実行プロセス2−2は生成されると自身とライブラリ2―4を動的に結合し(段階650)、更にライブラリ関数実行要求実行部2−2−1を生成する(段階660)。   FIG. 6 shows a sequence between processes in the case of indirect execution according to the present invention. Steps 610 and 620 are similar to steps 510 and 520 of FIG. Next, when the library load unit 2-1-2 accesses the control information 3-1 and the library 2-4 is associated with indirect execution (step 630), the library load unit 2-1-2 generates a library execution process 2-2 (step 640). . When the library execution process 2-2 is generated, the library execution process 2-2 dynamically couples itself with the library 2-4 (step 650), and further generates a library function execution request execution unit 2-2-1 (step 660).

図6の下半分は間接実行のライブラリのライブラリ関数を実行する場合のプロセス間のシーケンスを示す。段階670及び段階680は図5の段階550及び段階560と同様である。次にライブラリ関数実行指示を受けたライブラリ実行制御部2−1−3は、制御情報3―1にアクセスしライブラリ2−4が間接実行と関連付けられていた場合(段階690)、ライブラリ実行要求実行部2−2−1に対し、ライブラリ関数名及び必要な引数を渡してライブラリ関数の実行を要求する(段階700)。ライブラリ実行要求実行部2−2−1は実行を要求されたライブラリ関数を実行する(段階710)。   The lower half of FIG. 6 shows a sequence between processes when executing a library function of an indirectly executed library. Steps 670 and 680 are similar to steps 550 and 560 of FIG. Next, upon receiving the library function execution instruction, the library execution control unit 2-1-3 accesses the control information 3-1 and, if the library 2-4 is associated with indirect execution (step 690), executes the library execution request. The library function is requested to be executed by passing the library function name and necessary arguments to the section 2-2-1 (step 700). The library execution request execution unit 2-2-1 executes the library function requested to be executed (step 710).

LED4の制御について説明する。LED4は赤、青、緑の3色のLEDであって良い。プログラム実行部2−1−1がプログラム2−3の制御を開始する際にLED4は青色を点灯する。その後、ライブラリ実行制御部2−1−3は直接実行の場合にライブラリ関数を呼び出す際に赤を点灯、ライブラリ関数終了後に青を点灯する。同じく間接実行の場合にライブラリ実行プロセスに要求を出す際に緑を点灯、要求終了後に青を点灯する。このようにLED4がプログラム実行プロセス2―1又はライブラリ実行プロセス2−2の動作状態に応じて異なる方法で点灯されることにより、装置100が実行しているプロセスの安定性のレベルをユーザーに示され、ユーザーは現在どのような処理が行われているかを認識できる。LED4は連続点灯、点滅、又はそれらを組み合わせて点灯されても良い。別の実施例では、装置100は画面を有し、間接実行か直接実行かに依存して当該画面にメッセージ、グラフィック、静止画又は動画、又はそれらの組合せを表示しても良い。更に別の実施例では、画面表示とLEDの点灯が組み合わされても良い。   Control of the LED 4 will be described. The LED 4 may be a red, blue, or green LED. When the program execution unit 2-1-1 starts controlling the program 2-3, the LED 4 lights up in blue. Thereafter, the library execution control unit 2-1-3 lights up red when calling a library function in the case of direct execution, and lights up blue after the library function ends. Similarly, in the case of indirect execution, green is lit when a request is issued to the library execution process, and blue is lit after the request is completed. In this way, the LED 4 is lit in a different manner depending on the operating state of the program execution process 2-1 or the library execution process 2-2, thereby indicating to the user the level of stability of the process executed by the apparatus 100. Thus, the user can recognize what processing is currently being performed. The LED 4 may be lit continuously, blinking, or a combination thereof. In another embodiment, the device 100 may have a screen and display a message, graphic, still image or video, or a combination thereof on the screen depending on whether it is indirect or direct execution. In yet another embodiment, screen display and LED lighting may be combined.

以上に説明された本発明によると、例えば、携帯電話端末であるライブラリを使用するゲーム・アプリケーションを実行するために主プロセスであるVMプロセスが生成される。ユーザーはゲームを行っている間にゲーム内のキャラクターを画面内で移動させるために何からかのキーを押したとする。キャラクターを画面内で移動させる処理は、VMプロセスから派生した処理である。VMプロセスは当該ライブラリの実行条件に応じて自身を当該ライブラリと動的に結合して実行するか、新たなプロセスを生成し当該新たなプロセスと当該ライブラリを動的に結合し、プロセス間通信を介して必要な情報、例えばキャラクターの種類、移動方向、移動量などを当該新たなプロセスへ渡し、当該処理を実行させる。ここで当該新たなプロセスにエラーが生じた場合、当該新たなプロセスはVMプロセスに応答を返さずに、又はエラーを返して終了してしまうかも知れない。しかしながらVMプロセスは終了せずに、ユーザーに再入力を要求し当該処理をやり直すという程度の影響を受けるに過ぎない。従って本発明によると、ライブラリの品質に応じて当該ライブラリを動的に結合するプロセスを選択できるので、VMの動作の安全性を向上することができる。   According to the present invention described above, for example, a VM process that is a main process for generating a game application that uses a library that is a mobile phone terminal is generated. It is assumed that the user presses a key in order to move a character in the game on the screen while playing the game. The process of moving the character within the screen is a process derived from the VM process. Depending on the execution conditions of the library, the VM process dynamically executes itself with the library, or creates a new process and dynamically combines the new process with the library, and performs inter-process communication. Necessary information, for example, character type, moving direction, moving amount, etc. is passed to the new process, and the processing is executed. If an error occurs in the new process, the new process may end without returning a response to the VM process or returning an error. However, the VM process is not terminated, and is only affected to the extent that the user is requested to input again and the process is repeated. Therefore, according to the present invention, the process of dynamically combining the libraries can be selected according to the quality of the library, so that the safety of the operation of the VM can be improved.

本発明を実施する装置の構成図である。It is a block diagram of the apparatus which implements this invention. 本発明の制御情報の例を示す。The example of the control information of this invention is shown. 本発明によるライブラリをロードする方法を説明するフローチャートである。5 is a flowchart illustrating a method for loading a library according to the present invention. 本発明によるライブラリ関数を実行する方法を説明するフローチャートである。4 is a flowchart illustrating a method for executing a library function according to the present invention. 本発明による直接実行の場合のプロセス間のシーケンスを示す。Fig. 4 shows a sequence between processes in the case of direct execution according to the invention. 本発明による間接実行の場合のプロセス間のシーケンスを示す。Fig. 5 shows a sequence between processes in the case of indirect execution according to the present invention.

符号の説明Explanation of symbols

1 CPU
2 メインメモリ
2−1 プログラム実行プロセス
2−1−1 プログラム実行部
2−1−2 ライブラリロード部
2−1−3 ライブラリ実行制御部
2−2 ライブラリ実行プロセス
2−2−1 ライブラリ実行要求実行部
2−3 プログラム
2−4 ライブラリ
3 不揮発性メモリ
3−1 制御情報
4 LED
1 CPU
2 Main memory 2-1 Program execution process 2-1-1 Program execution unit 2-1-2 Library load unit 2-1-3 Library execution control unit 2-2 Library execution process 2-2-1 Library execution request execution unit 2-3 Program 2-4 Library 3 Non-volatile memory 3-1 Control information 4 LED

Claims (4)

プログラム、前記プログラムにより使用される1又は複数の動的ライブラリ、及び前記動的ライブラリと制御情報を対応付けるテーブルを有する装置が前記動的ライブラリをロードする方法であって、
前記動的ライブラリに対応付けられた前記制御情報を読み出す段階、
読み出された前記制御情報が、前記動的ライブラリは前記プログラムが実行されるプロセスと同一の第1のプロセスで使用され得ると示す場合、前記第1のプロセスと前記動的ライブラリを動的に結合する段階、及び
読み出された前記制御情報が、前記動的ライブラリは前記プログラムが実行されるプロセスと同一の第1のプロセスで使用され得ると示さない場合、前記第1のプロセスと異なる第2のプロセスを生成し前記第2のプロセスと前記動的ライブラリを動的に結合する段階、を有する動的ライブラリロード方法。
A device having a program, one or more dynamic libraries used by the program, and a table associating the dynamic library with control information is a method of loading the dynamic library,
Reading the control information associated with the dynamic library;
If the read control information indicates that the dynamic library can be used in the same first process as the process in which the program is executed, the first process and the dynamic library are dynamically If the control information read out does not indicate that the dynamic library can be used in the same first process as the process in which the program is executed, A dynamic library loading method comprising: generating two processes and dynamically combining the second process and the dynamic library.
前記装置は表示部を更に有し、前記プログラムが前記第1のプロセスで実行されているか前記第2のプロセスで使用されているかに応じて前記表示部の表示方法が変更される、請求項1記載の動的ライブラリロード方法。   The apparatus further includes a display unit, and a display method of the display unit is changed depending on whether the program is executed in the first process or used in the second process. The dynamic library loading method described. 装置であって、
プログラム、
前記プログラムにより使用される1又は複数の動的ライブラリ、及び
前記動的ライブラリと前記制御情報を対応付けるテーブル、を有し、
前記動的ライブラリに対応付けられた前記制御情報を読み出す手段、
読み出された前記制御情報が、前記動的ライブラリは前記プログラムが実行されるプロセスと同一の第1のプロセスで使用され得ると示す場合、前記第1のプロセスと前記動的ライブラリを動的に結合する手段、及び
読み出された前記制御情報が、前記動的ライブラリは前記プログラムが実行されるプロセスと同一の第1のプロセスで使用され得ると示さない場合、前記第1のプロセスと異なる第2のプロセスを生成し前記第2のプロセスと前記動的ライブラリを動的に結合する手段、を有する動的ライブラリをロードする装置。
A device,
program,
One or more dynamic libraries used by the program, and a table associating the dynamic libraries with the control information,
Means for reading the control information associated with the dynamic library;
If the read control information indicates that the dynamic library can be used in the same first process as the process in which the program is executed, the first process and the dynamic library are dynamically Means for combining, and the read control information does not indicate that the dynamic library can be used in the same first process as the process in which the program is executed. An apparatus for loading a dynamic library comprising means for creating two processes and dynamically combining the second process and the dynamic library.
表示部を更に有し、
前記プログラムが前記第1のプロセスで実行されているか前記第2のプロセスで使用されているかに応じて前記表示部の表示方法が変更される、請求項3記載の動的ライブラリをロードする装置。
A display unit;
4. The apparatus for loading a dynamic library according to claim 3, wherein a display method of the display unit is changed according to whether the program is executed in the first process or used in the second process.
JP2008165118A 2008-06-24 2008-06-24 Dynamic library loading method and device Pending JP2010009149A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008165118A JP2010009149A (en) 2008-06-24 2008-06-24 Dynamic library loading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008165118A JP2010009149A (en) 2008-06-24 2008-06-24 Dynamic library loading method and device

Publications (1)

Publication Number Publication Date
JP2010009149A true JP2010009149A (en) 2010-01-14

Family

ID=41589599

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008165118A Pending JP2010009149A (en) 2008-06-24 2008-06-24 Dynamic library loading method and device

Country Status (1)

Country Link
JP (1) JP2010009149A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015011518A (en) * 2013-06-28 2015-01-19 京セラドキュメントソリューションズ株式会社 Method of reducing application execution time

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006113935A (en) * 2004-10-18 2006-04-27 Hitachi Ltd Dynamic link library calling code generation method, program, and apparatus
JP2007316780A (en) * 2006-05-24 2007-12-06 Nec Corp Computer system, computer and file operation limiting method to be used therefor, and its program
JP2008502066A (en) * 2004-06-09 2008-01-24 シンビアン ソフトウェア リミテッド Computer device having multiple process architecture for executing plug-in code modules
JP2008234248A (en) * 2007-03-20 2008-10-02 Mitsubishi Electric Corp Program execution device and program execution method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008502066A (en) * 2004-06-09 2008-01-24 シンビアン ソフトウェア リミテッド Computer device having multiple process architecture for executing plug-in code modules
JP2006113935A (en) * 2004-10-18 2006-04-27 Hitachi Ltd Dynamic link library calling code generation method, program, and apparatus
JP2007316780A (en) * 2006-05-24 2007-12-06 Nec Corp Computer system, computer and file operation limiting method to be used therefor, and its program
JP2008234248A (en) * 2007-03-20 2008-10-02 Mitsubishi Electric Corp Program execution device and program execution method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015011518A (en) * 2013-06-28 2015-01-19 京セラドキュメントソリューションズ株式会社 Method of reducing application execution time

Similar Documents

Publication Publication Date Title
US11868785B2 (en) Application program page processing method and device
US8850396B2 (en) Performing software testing based on grouping of tests using test list entity
US10540506B2 (en) Field-programmable gate array virtualization
CN111666096B (en) Hot updating method and device for target application, storage medium and electronic equipment
US9678767B2 (en) Unified extensible firmware interface (UEFI) driver and protocol
WO2016177341A1 (en) Interface calling method and device, and terminal
TW201541353A (en) Method for loading driver and embedded device
CN101000566A (en) Operating system switching device and operating system switching method
US20120096527A1 (en) Powershell cmdlets code generating tool for communicating to the web services
JP2014170515A (en) Device, information storage program, and information storage method
CN104699503A (en) Method and device for replacing function execution logic in Android system
CN103425234B (en) The method of dynamic adjustments image procossing performance and display terminal
JP2011060225A (en) Operating system booting method
US10185572B2 (en) Operating system load device resource selection
KR20130068630A (en) Method for initializing embedded device and apparatus thereof
CN109740342A (en) Obtain method, system, computer installation and storage medium that shell executes permission
JP6179200B2 (en) Information processing apparatus, device, information processing system, information processing method, and information processing program
KR100818919B1 (en) Method for invoking method and java virtual machine using the same
JP2010009149A (en) Dynamic library loading method and device
KR100857824B1 (en) Method for managing execution of mobile platform based ram residence application
KR101254756B1 (en) Method of creating virtual machine compatible with multiple operating system, and program recording media for virtual machine
CN113051088B (en) Program loading method, device, equipment and computer readable medium
CN113641577A (en) Debugging method and device for terminal product application program
CN108829407B (en) System booting method of electronic device, and storage medium
JP2009509214A (en) Adding functionality to computer devices using thread call tables

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110315

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120718

A131 Notification of reasons for refusal

Effective date: 20120724

Free format text: JAPANESE INTERMEDIATE CODE: A131

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20121113