JP2003256219A - Program execution method in incorporated equipment - Google Patents

Program execution method in incorporated equipment

Info

Publication number
JP2003256219A
JP2003256219A JP2002055185A JP2002055185A JP2003256219A JP 2003256219 A JP2003256219 A JP 2003256219A JP 2002055185 A JP2002055185 A JP 2002055185A JP 2002055185 A JP2002055185 A JP 2002055185A JP 2003256219 A JP2003256219 A JP 2003256219A
Authority
JP
Japan
Prior art keywords
program
memory
java
task
application
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
JP2002055185A
Other languages
Japanese (ja)
Inventor
Nobuo Takamasa
信生 高正
Takahide Todoroki
高秀 等々力
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.)
Aplix Corp
Original Assignee
Aplix Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aplix Corp filed Critical Aplix Corp
Priority to JP2002055185A priority Critical patent/JP2003256219A/en
Publication of JP2003256219A publication Critical patent/JP2003256219A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a program execution method capable of simultaneously starting a plurality of programs fixedly using a specific memory area in incorporated equipment. <P>SOLUTION: This program execution method in incorporated equipment comprises a step for interrupting a first program which is being executed by the incorporated equipment having a processor 10 and a memory 20, a step for copying the contents of the specific area of the memory 20 used by the first program to another area of the memory 20, and a step for starting a second program using the specific area of the memory 20. <P>COPYRIGHT: (C)2003,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、組込み機器(Embe
dded device)におけるプログラム実行方法に関する。
TECHNICAL FIELD The present invention relates to an embedded device (embe
dded device) on the program execution method.

【0002】[0002]

【従来の技術】従来より、パーソナルコンピュータやワ
ークステーションに代表されるコンピュータやコンピュ
ータシステム以外の機器に、ソフトウェアを実行するプ
ロセッサを搭載して情報の処理を行うことが一般的に行
われており、そのような機器は組込み機器(Embedded d
evice)と総称されている。また、そのような機器に搭
載されるシステムは、組込みシステム(Embedded syste
m)と呼称されている。
2. Description of the Related Art Conventionally, it has been generally practiced to mount a processor for executing software on equipment other than a computer or a computer system represented by a personal computer or a workstation to process information. Such devices are embedded d
evice) is collectively called. In addition, the systems installed in such devices are embedded systems (Embedded syste
m) is called.

【0003】上記組込み機器としては、例えば、CDプ
レーヤ・MDプレーヤ・DVDプレーヤ・デジタルカメ
ラ・デジタルテレビ・デジタルビデオ・次世代オーディ
オ機器等のAV機器、電子レンジ・冷蔵庫・炊飯器・洗
濯機等の白物家電、セットトップボックス・ゲーム機・
ホームサーバ等の家庭用ゲートウェイ機器、携帯電話・
PDA(携帯情報端末)・カーナビゲーションシステム
等のモバイル端末を挙げることができる。
Examples of the built-in equipment include AV equipment such as CD player, MD player, DVD player, digital camera, digital television, digital video, next-generation audio equipment, microwave oven, refrigerator, rice cooker, washing machine, etc. White goods, set-top boxes, game consoles,
Home gateway devices such as home servers, mobile phones,
Mobile terminals such as PDAs (personal digital assistants) and car navigation systems can be mentioned.

【0004】近年、このような組込み機器はネットワー
クを利用すること等を前提として、より高度な処理を行
う情報家電として進化しつつあり、これにより超分散シ
ステムやユビキタスコンピューティング等の概念が実現
されようとしている。しかしながら、組込み機器に搭載
されるプロセッサの処理能力は、コストや安定性の観点
から通常のコンピューターと比べて厳しく限定されてい
るため、組込み機器で高度な処理を実現することは容易
ではない。
In recent years, such an embedded device has been evolving as an information home appliance that performs more advanced processing on the premise that a network is used, and the concept of a super distributed system and ubiquitous computing is realized by this. I am trying to do. However, since the processing capability of the processor mounted in the embedded device is severely limited as compared with an ordinary computer from the viewpoint of cost and stability, it is not easy to realize advanced processing in the embedded device.

【0005】例えば、通常のコンピューターに搭載され
るプロセッサは、メモリ管理を行うMMU(Memory Man
agement Unit)を具備しており、これとUNIX(R)
やWindows(R)といったOS(Operating Syst
em)との組み合わせにより、特定のメモリ領域を固定的
に使用するプログラムであっても、複数同時に起動する
ことが可能になっている。これは、MMUを備えたプロ
セッサやページング機能を有するOSでは、物理的なメ
モリをページまたはセグメントと呼ばれるブロックごと
に分割して管理し、これを論理アドレス空間に割り当て
ることができるためである。
For example, a processor installed in a normal computer is an MMU (Memory Man) that performs memory management.
age unit) and this and UNIX (R)
OS (Operating Syst) such as Windows and Windows (R)
By combining with em), even a program that uses a specific memory area fixedly, it is possible to start multiple programs at the same time. This is because an MMU-equipped processor and an OS having a paging function can divide a physical memory into blocks called pages or segments for management, and allocate this to a logical address space.

【0006】ところが、組込み機器ではそのようなメモ
リ管理機能を備えていないプロセッサやOSを使用する
場合も多く、そのような組込み機器では特定のメモリ領
域を固定的に使用するプログラムを同時に複数起動する
ことはできず、実行中のプログラムを終了してから次の
プログラムを起動しなければならない。このため、最近
の組込み機器に求められている処理の高度化に対応する
ことができないという不都合が生じている。
However, embedded devices often use a processor or OS that does not have such a memory management function, and such embedded devices simultaneously activate a plurality of programs that fixedly use a specific memory area. You can't do that, and you must end the running program before starting the next program. For this reason, there is an inconvenience that it is not possible to cope with the sophistication of processing required for the recent embedded devices.

【0007】このような不都合が生じる例として、組込
みシステムでJava(R)の実行環境を構築した場合
を挙げることができる。サンマイクロシステムズ社から
提供されたコードに準拠し、Java(R)の実行環境
において慣用されているソフトウェアインタープリタ
は、グローバル変数を多用しているためメモリの特定領
域を固定的に使用する。このため、MMUやページング
機能を有していない組込み機器では複数のインタープリ
タを同時に起動することはできず、先に起動していたJ
ava(R)アプリケーションを終了させなければ次の
Java(R)アプリケーションを起動することはでき
なかった。
An example of such an inconvenience may be a case where a Java (R) execution environment is built in an embedded system. The software interpreter, which conforms to the code provided by Sun Microsystems and is commonly used in the Java (R) execution environment, uses a large amount of global variables and thus uses a specific area of memory in a fixed manner. For this reason, a plurality of interpreters cannot be activated at the same time in an embedded device that does not have an MMU or paging function, and J
The next Java (R) application could not be started without terminating the Java (R) application.

【0008】[0008]

【発明が解決しようとする課題】本発明は上記事情に鑑
みてなされたものであって、組込み機器において、特定
のメモリ領域を固定的に使用するプログラムを同時に複
数起動することができるプログラム実行方法を提供する
ことを目的とする。
The present invention has been made in view of the above circumstances, and is a program execution method capable of simultaneously activating a plurality of programs that fixedly use a specific memory area in an embedded device. The purpose is to provide.

【0009】[0009]

【課題を解決するための手段】上記課題を解決するた
め、本発明は、プロセッサおよびメモリを備えた組込み
機器で実行中の第1のプログラムを中断するステップ
と、前記第1のプログラムが使用していた前記メモリの
特定領域の内容を、前記メモリの別の領域にコピーする
ステップと、前記メモリの前記特定領域を使用する第2
のプログラムを起動するステップとを具備することを特
徴とする組込み機器におけるプログラム実行方法を提供
する。
In order to solve the above problems, the present invention provides a step of interrupting a first program which is being executed in an embedded device having a processor and a memory, and which is used by the first program. A step of copying the contents of the specific area of the memory to another area of the memory, and a second step of using the specific area of the memory.
The method for executing a program in an embedded device is provided.

【0010】このような構成によれば、第1のプログラ
ムの実行を中断した後、第1のプログラムが使用してい
たメモリの特定領域の内容を別の領域にコピーしてか
ら、この特定領域を使用する第2のプログラムを起動す
るので、組込み機器において実行中の第1のプログラム
を終了することなく、第1のプログラムと同じメモリ領
域を使用する第2のプログラムを起動することができ
る。
According to this structure, after the execution of the first program is interrupted, the contents of the specific area of the memory used by the first program are copied to another area, and then this specific area is copied. Since the second program that uses the first program is started, the second program that uses the same memory area as the first program can be started without ending the first program that is being executed in the embedded device.

【0011】本発明においては、上記構成に加えて、前
記第2のプログラムを中断するステップと、前記第2の
プログラムが使用していた前記メモリの特定領域の内容
を、前記メモリのまた別の領域にコピーするステップ
と、前記メモリの前記別の領域の内容を、前記メモリの
前記特定領域にコピーするステップと、前記第1のプロ
グラムの実行を再開するステップとをさらに具備するこ
とが好ましい。
In the present invention, in addition to the above configuration, the step of interrupting the second program, and the contents of a specific area of the memory used by the second program are stored in another memory of the memory. Preferably, the method further comprises the steps of copying to an area, copying the contents of the other area of the memory to the specific area of the memory, and resuming execution of the first program.

【0012】このように、第1のプログラムを中断して
第2のプログラムを起動した後に第2のプログラムを中
断し、第2のプログラムが使用していたメモリの特定領
域の内容をまた別の領域にコピーしてから、メモリの特
定領域に第1のプログラムが使用していた内容をコピー
した後に第1のプログラムの実行を再開することによっ
て、第2のプログラムを終了することなく、中断してい
た第1のプログラムの実行を中断した箇所から再開する
ことができる。このようにして実行するプログラムを第
1のプログラムに切り替えた後、さらに第2のプログラ
ムに切り替えることも可能である。
As described above, the first program is interrupted, the second program is activated, the second program is interrupted, and the contents of the specific area of the memory used by the second program are changed. The second program without interrupting the second program by copying the contents used by the first program to a specific area of memory and then restarting the execution of the first program. It is possible to restart the execution of the first program, which has been interrupted. After switching the program to be executed in this manner to the first program, it is possible to further switch to the second program.

【0013】また、上記第1および第2のプログラム
は、同一のプログラムであっても構わない。
The first and second programs may be the same program.

【0014】さらに、上記第1および第2のプログラム
を、Java(R)実行環境に用いるソフトウェア・イ
ンタープリタとした場合には、先に起動していたJav
a(R)アプリケーションを終了することなく次のJa
va(R)アプリケーションを起動することができる。
これにより、慣用されているソフトウェア・インタープ
リタを用いてJava(R)実行環境を搭載した組込み
機器において、複数のJava(R)アプリケーション
を同時に起動することが可能となる。
Further, when the first and second programs are software interpreters used in the Java (R) execution environment, the Java that has been activated first.
Next Ja without terminating the a (R) application
The va (R) application can be launched.
This enables a plurality of Java (R) applications to be started simultaneously in an embedded device equipped with a Java (R) execution environment using a commonly used software interpreter.

【0015】さらにまた、前記プロセッサとしては、ア
ドレス変換機能を具備していないローエンドのもの、例
えばMMUを備えていないものを好適に用いることがで
きる。
Further, as the processor, a low-end processor which does not have an address conversion function, for example, a processor which does not have an MMU can be preferably used.

【0016】[0016]

【発明の実施の形態】以下、本発明の実施の形態につい
て、図面を参照しながら説明する。 〔第1の実施形態〕図1は、本発明の第1の実施形態が
適用される組込みシステム100のブロック図である。
図1に示すように、この組込みシステム100は、演算
手段10、記憶手段20、通信手段30および入力手段
40を具備している。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings. [First Embodiment] FIG. 1 is a block diagram of an embedded system 100 to which a first embodiment of the present invention is applied.
As shown in FIG. 1, the embedded system 100 includes a calculation unit 10, a storage unit 20, a communication unit 30, and an input unit 40.

【0017】このような組込みシステム100は、例え
ば、CDプレーヤ・MDプレーヤ・DVDプレーヤ・デ
ジタルカメラ・デジタルテレビ・デジタルビデオ・次世
代オーディオ機器等のAV機器、電子レンジ・冷蔵庫・
炊飯器・洗濯機等の白物家電、セットトップボックス・
ゲーム機・ホームサーバ等の家庭用ゲートウェイ機器、
携帯電話・PDA(携帯情報端末)・カーナビゲーショ
ンシステム等のモバイル端末といった組込み機器に搭載
される。
Such an embedded system 100 can be used, for example, in AV equipment such as CD player, MD player, DVD player, digital camera, digital television, digital video, next-generation audio equipment, microwave oven, refrigerator, etc.
White goods such as rice cookers and washing machines, set-top boxes,
Home gateway devices such as game consoles and home servers,
It is installed in embedded devices such as mobile terminals such as mobile phones, PDAs (personal digital assistants) and car navigation systems.

【0018】上記演算手段10は、不図示のALU(ar
ithmetic logic unit)、CU(control unit)、各種
レジスタ、バス等を有するCPU(Central Processing
Unit)やMPU(micro processor unit)等のプロセ
ッサである。
The calculating means 10 is provided with an ALU (ar (not shown).
CPU (Central Processing) having ithmetic logic unit), CU (control unit), various registers, buses, etc.
A processor such as a Unit) or MPU (micro processor unit).

【0019】上記記憶手段20は、RAM(random acc
ess memory)21とROM(read only memory)22と
を含んでいる。RAM21は揮発性の記憶素子であり、
上記演算手段10が処理を行う際に変数領域やヒープ領
域等として使用される。一方、ROM22は不揮発性の
記憶素子であり、当該組込みシステム100においてJa
va(R)実行環境をなすインタープリター23、Jav
a(R)実行マネージャ24、クラスライブラリ、その
他Java(R)の実行を補助するファイル、マルチタ
スクOS(Opereting System)および各種機能を担うソ
フトウェアが演算手段10のネイティブコードで格納さ
れている(クラスライブラリ以下のコードについては図
示略)。また、ROM22にはEPROMやフラッシュ
メモリといった書き換え可能なものを使用してもよい
し、さらにスロットを介して着脱可能なメモリーカード
等を備えた構成としてもよい。
The storage means 20 is a RAM (random acc
It includes an ess memory 21 and a ROM (read only memory) 22. The RAM 21 is a volatile storage element,
It is used as a variable area, a heap area, or the like when the arithmetic means 10 performs processing. On the other hand, the ROM 22 is a non-volatile storage element, and in the embedded system 100, the Ja 22
va (R) execution environment interpreter 23, Java
The a (R) execution manager 24, a class library, other files for assisting the execution of Java (R), a multi-task OS (Opereting System), and software that performs various functions are stored in the native code of the computing means 10 (class). The code below the library is not shown). Further, the ROM 22 may be a rewritable one such as an EPROM or a flash memory, or may be provided with a memory card or the like which can be attached and detached via a slot.

【0020】上記インタープリタ22は、演算手段10
で実行することにより所定のJava(R)アプリケー
ションのクラスファイルからバイトコード命令を順次取
り出して逐次的に実行する機能を有している。このよう
なインタープリタ22としては、サン・マイクロシステ
ムズ社から提供されているものや、そのコードに準拠し
たものといった、一般的なJava(R)実行環境で採
用されているものを用いることができる。また、上記J
ava(R)実行マネージャ24は、インタープリタ2
2によるJava(R)アプリケーションの実行を制御
および補助する。また、本実施形態におけるマルチタス
クOSとしては、例えばITRONを挙げることができ
る。このようなマルチタスクOSは、複数のタスクを並
列的に実行する機能を備えている。
The interpreter 22 is an arithmetic unit 10.
Has a function of sequentially extracting bytecode instructions from a class file of a predetermined Java (R) application and sequentially executing them. As such an interpreter 22, it is possible to use the one provided by Sun Microsystems, Inc., or the one based on the code, which is adopted in a general Java (R) execution environment. Also, the above J
The ava (R) execution manager 24 is the interpreter 2
2 controls and assists the execution of Java (R) applications. Further, as the multi-task OS in this embodiment, for example, ITRON can be cited. Such a multitasking OS has a function of executing a plurality of tasks in parallel.

【0021】上記通信手段30はインターネットに接続
するための通信インターフェースであり、この通信手段
30を介して組込みシステム100はインターネットに
接続してデータの送受信を行うことができる。また、上
記入力手段40としては、例えば、ボタンキー、カーソ
ルキー等が用いられる。
The communication unit 30 is a communication interface for connecting to the Internet, and the embedded system 100 can connect to the Internet to send and receive data via the communication unit 30. Further, as the input means 40, for example, a button key, a cursor key or the like is used.

【0022】次に、以上のように構成された組込みシス
テム100において、2つのJava(R)アプリケー
ションを切り替えて実行する動作について図2および図
3を参照しつつ説明する。図2は本実施形態におけるJ
ava(R)アプリケーションの切替動作を示すフロー
チャートであり、図3はこの切替動作にともない組込み
システム100がRAM21上で行うメモリの運用を示
す説明図であって、図3の右側にはRAM21のメモリ
領域を部分的に示し、図3の左側には組込みシステムが
実行する処理を示している。
Next, the operation of switching and executing two Java (R) applications in the embedded system 100 configured as described above will be described with reference to FIGS. 2 and 3. FIG. 2 shows J in this embodiment.
FIG. 3 is a flowchart showing the switching operation of the ava (R) application, and FIG. 3 is an explanatory diagram showing the operation of the memory that the embedded system 100 performs on the RAM 21 in accordance with this switching operation, and the memory of the RAM 21 is on the right side of FIG. The area is partially shown, and the processing executed by the embedded system is shown on the left side of FIG.

【0023】本実施形態におけるJava(R)アプリ
ケーション切替動作の特徴は、先に実行していたJav
a(R)アプリケーションを終了することなく、次のJ
ava(R)アプリケーションを起動することができる
点にある。
The feature of the Java (R) application switching operation in this embodiment is that the Java that was previously executed is executed.
a (R) application without terminating the next J
The point is that an ava (R) application can be activated.

【0024】Java(R)言語でソースコードが作成
されたJava(R)アプリケーションは、ベンダー側
で1つ以上のクラスファイルにコンパイルされた上で、
プリインストールの場合には予め記憶手段20のROM
22に格納され、また、プリンストールでない場合には
出荷後にユーザーによりダウンロードされる等して記憶
手段20のRAM21に格納される。これらのクラスフ
ァイルに含まれるバイトコード命令をインタープリタ2
3で順次取り出して逐次的に実行することにより、Ja
va(R)アプリケーションは実行される。ここでは、
まず図2(a)を参照して、WWWブラウザのJava
(R)アプリケーションの実行を中止して、ゲームのJ
ava(R)アプリケーションを起動する場合を示す。
A Java (R) application whose source code is created in the Java (R) language is compiled into one or more class files on the vendor side, and
In case of pre-installation, ROM of storage means 20 in advance
22 is stored in the RAM 21 of the storage means 20 by being downloaded by the user after shipment if it is not a printout. Interpreter the bytecode instructions contained in these class files.
By taking out sequentially in 3 and executing sequentially, Ja
The va (R) application is executed. here,
First, referring to FIG. 2A, Java of a WWW browser
(R) Stop the execution of the application and
The case where an ava (R) application is started is shown.

【0025】本切替動作は、予めインタープリタ23を
起動してWWWブラウザのJava(R)アプリケーシ
ョンを実行している状態(以下、WWWブラウザのJa
va(R)アプリケーションを実行することをタスクA
という)より、入力手段40からの入力信号等に応じて
開始される(S101)。ここで、本実施形態において
はインタープリタ23としてサン・マイクロシステムズ
社から提供されたコードに準拠したものを用いており、
このインタープリタ23において多用されているグロー
バル変数はRAM21の特定領域R1に固定的に格納さ
れている。また、インタープリタ23のローカル変数
(内部変数)の値や、メインルーチンもしくはサブルー
チンからの戻りアドレス、演算手段10のレジスタの内
容等は、組込みシステム100に実装されたマルチタス
クOSにより管理され、このタスクAに対応して設けら
れたスタックAに適宜格納されている。このスタックA
の位置は、RAM21のタスク制御情報管理領域R3に
格納されたTCB(Task Control Block)によりポイン
トされており、OSはこのTCBを介してスタックAに
アクセスし、値を出し入れするようになっている。
In this switching operation, the interpreter 23 is activated in advance and the Java (R) application of the WWW browser is being executed (hereinafter, the Java of the WWW browser is
Task A to run the va (R) application
Therefore, it is started in response to an input signal from the input means 40 (S101). Here, in the present embodiment, as the interpreter 23, one that complies with the code provided by Sun Microsystems is used.
Global variables frequently used in the interpreter 23 are fixedly stored in the specific area R1 of the RAM 21. Further, the values of local variables (internal variables) of the interpreter 23, the return addresses from the main routine or the subroutine, the contents of the registers of the arithmetic means 10, etc. are managed by the multitasking OS installed in the embedded system 100, and this task It is appropriately stored in the stack A provided corresponding to A. This stack A
The position of is pointed by a TCB (Task Control Block) stored in the task control information management area R3 of the RAM 21, and the OS accesses the stack A through this TCB to input / output a value. .

【0026】S101において切替動作を開始した後、
Java(R)アプリケーション実行マネージャ24が
WWWブラウザのクラスファイルからバイトコード命令
を取り出して実行していたインタープリタ23の処理を
中断させるとともに(S102)、RAM21の特定領
域R1に格納されている内容(インタープリタ23が使
用していたグローバル変数等の値)をRAM21の退避
領域R2にコピーする(S103)。コピー先は予め設
定されたアドレスとしてもよいし、動的にコピー先を決
定するようにしてもよい。
After starting the switching operation in S101,
The Java (R) application execution manager 24 fetches the bytecode instruction from the class file of the WWW browser and suspends the processing of the interpreter 23 that was being executed (S102), and the contents stored in the specific area R1 of the RAM 21 (interpreter). The value of the global variable used by 23) is copied to the save area R2 of the RAM 21 (S103). The copy destination may be a preset address, or the copy destination may be dynamically determined.

【0027】次いで、OSのタスク制御部において、使
用するTCBを新たなスタック(スタックB)をポイン
トするものに切り替え(S104)、新たにインタープ
リタ23を起動してゲームのJava(R)アプリケー
ションの実行(以下、タスクBという)を開始する(S
105)。このタスクBにおいても、インタープリタ2
3はRAM21の特定領域R1を固定的に使用するの
で、特定領域R1の内容はタスクBで使用されるグロー
バル変数等の値により上書きされる。また、タスクBの
実行に際して使用されるインタープリタ23のローカル
変数等の値は、S104において切り替えられたTCB
によりポイントされたスタックBに格納される。以上の
ようにして切替動作は終了する(S106)。
Next, in the task control unit of the OS, the TCB to be used is switched to one that points to a new stack (stack B) (S104), and the interpreter 23 is newly started to execute the Java (R) application of the game. (Hereinafter referred to as task B) is started (S
105). Even in this task B, the interpreter 2
Since 3 fixedly uses the specific area R1 of the RAM 21, the content of the specific area R1 is overwritten by the value of the global variable or the like used in the task B. Further, the values of the local variables and the like of the interpreter 23 used when executing the task B are the TCBs switched in S104.
It is stored in the stack B pointed by. The switching operation ends as described above (S106).

【0028】以上のような切替動作によれば、特定領域
R1を固定的に使用するインタープリタ23を用いて組
込みシステム100上に構成されたJava(R)実行
環境において、先に実行していたJava(R)アプリ
ケーション(WWWブラウザ)の実行を終了することな
く、次のJava(R)アプリケーション(ゲーム)を
起動することができる。
According to the switching operation as described above, in the Java (R) execution environment configured on the embedded system 100 by using the interpreter 23 that fixedly uses the specific area R1, the Java which was previously executed is executed. The next Java (R) application (game) can be started without ending the execution of the (R) application (WWW browser).

【0029】その後、さらにWWWブラウザを再開する
場合には、図2(b)に示すように、入力手段40から
の入力信号等により切替動作を再度開始し(S10
7)、Java(R)アプリケーション実行マネージャ
24によりゲームのJava(R)アプリケーションを
実行していたインタープリタ23の処理(タスクB)を
中断させる(S108)とともに、特定領域R1にタス
クAで使用していたグローバル変数などの値を退避領域
R2から書き戻し(S109)、OSのタスク制御部が
使用するTCBをスタックAをポイントするものに戻し
てから(S110)、WWWブラウザのJava(R)
アプリケーションを実行していたインタープリタ23の
処理(タスクA)を再開することにより(S111)、
切替動作は終了する(S112)。
After that, when the WWW browser is restarted, the switching operation is restarted by an input signal from the input means 40 or the like as shown in FIG. 2B (S10).
7), the Java (R) application execution manager 24 suspends the processing (task B) of the interpreter 23 that was executing the Java (R) application of the game (S108), and the task A is used in the specific area R1. The global variables and other values are written back from the save area R2 (S109), the TCB used by the task control unit of the OS is returned to the one that points to the stack A (S110), and then the Java (R) of the WWW browser is used.
By restarting the process (task A) of the interpreter 23 that was executing the application (S111),
The switching operation ends (S112).

【0030】このような動作によれば、先に実行してい
たWWWブラウザ(タスクA)の中断時における情報
が、後から起動したゲーム(タスクB)の実行時に用い
られた情報と混同したり書き換えられることなく再現さ
れるので、WWWブラウザ(タスクA)を中断したとこ
ろから正しく再開することができる。したがって、先の
Java(R)アプリケーションを終了してから次のJ
ava(R)アプリケーションを起動する場合のよう
に、先のJava(R)アプリケーションに戻るために
は最初から起動し直すしかなく、中断したところまで同
じ操作を繰り返す等の手順を経なければならないという
不都合を回避することができる。
According to such an operation, the information at the time of interrupting the WWW browser (task A) that was previously executed may be confused with the information used at the time of executing the game (task B) started later. Since it is reproduced without being rewritten, it is possible to correctly restart the WWW browser (task A) from where it was interrupted. Therefore, after the Java (R) application is terminated, the next J
As in the case of activating an ava (R) application, in order to return to the previous Java (R) application, there is no choice but to restart it from the beginning, and the procedure such as repeating the same operation up to the point of interruption is required. Inconvenience can be avoided.

【0031】なお、上記の動作では、タスクAを中断し
てからタスクBを起動し、さらにその後にタスクBを中
断してタスクAを再開する場合について示したが、さら
にまた同様の手順を重ねて行うことによりタスクAおよ
びタスクBの切替を継続して行うことも可能である。こ
のように切替を継続して行うには、一方のタスクを中断
して他方のタスクを再開する際に、中断したタスクで使
用していた特定領域R1の内容を退避領域R2に退避さ
せるとともに、再開するタスクで使用するグローバル変
数等の値を退避領域R2から特定領域R1に復帰させる
ようにすればよい。
In the above operation, the case where the task A is interrupted, the task B is activated, and then the task B is interrupted and the task A is restarted is shown. However, the same procedure is repeated. It is also possible to continue switching between the task A and the task B by performing the above. In order to continue switching in this way, when suspending one task and restarting the other task, the contents of the specific area R1 used by the suspended task are saved in the save area R2, and The values of global variables used in the task to be restarted may be restored from the save area R2 to the specific area R1.

【0032】〔第2の実施形態〕次に、本発明の第2の
実施形態を説明する。本実施形態が適用される組込みシ
ステム100は、上記第1の実施形態と略同様の基本構
成を有しているため、詳細な説明は省略する。ただし、
上記第1の実施形態と異なり、本実施形態における組込
みシステム100が実装するOSはシングルタスクOS
である。シングルタスクOSにおいてもローカル変数等
の値はTCBにポイントされるスタックに格納されて管
理されるが、シングルタスクOSはマルチタスクOSの
ように複数のスタックを使い分けてタスクを切り替える
機能を備えていない。よって、本実施形態におけるJa
va(R)アプリケーション実行マネージャ24は、特
定領域R1に保持された情報を退避および復帰させるの
みならず、TCBおよびスタックの内容を退避および復
帰させることにより実質的にタスクの管理を行う。この
点が上記第1の実施形態と異なる点である。
[Second Embodiment] Next, a second embodiment of the present invention will be described. The embedded system 100 to which this embodiment is applied has a basic configuration that is substantially the same as that of the first embodiment described above, and thus detailed description thereof is omitted. However,
Unlike the first embodiment, the OS installed by the embedded system 100 in the present embodiment is a single task OS.
Is. Even in the single-task OS, the values of local variables and the like are stored in the stack pointed to by the TCB and managed, but the single-task OS does not have a function to switch tasks by properly using a plurality of stacks unlike the multi-task OS. . Therefore, Ja in the present embodiment
The va (R) application execution manager 24 not only saves and restores the information held in the specific area R1, but also saves and restores the contents of the TCB and the stack to effectively manage the task. This point is different from the first embodiment.

【0033】次に、図4および図5を参照しつつ、本実
施形態においてJava(R)アプリケーションを切り
替えて実行する動作について説明する。図4は本実施形
態におけるJava(R)アプリケーションの切替動作
を示すフローチャートであり、図5はこの切替動作にと
もない組込みシステム100がRAM21上で行うメモ
リの運用を示す説明図であって、図5の右側にはRAM
21のメモリ領域を部分的に示し、図5の左側には組込
みシステムが実行する処理を示している。ここでは、W
WWブラウザのJava(R)アプリケーションの実行
を中止して、ゲームのJava(R)アプリケーション
を起動する場合を示す。
Next, with reference to FIGS. 4 and 5, the operation of switching and executing the Java (R) application in this embodiment will be described. FIG. 4 is a flowchart showing the switching operation of the Java (R) application in the present embodiment, and FIG. 5 is an explanatory diagram showing the operation of the memory on the RAM 21 performed by the embedded system 100 in accordance with this switching operation. RAM on the right side of
The memory area 21 is partially shown, and the processing executed by the embedded system is shown on the left side of FIG. Here, W
The case where the execution of the Java (R) application of the WW browser is stopped and the Java (R) application of the game is started is shown.

【0034】図5(a)に示すように、この切替動作
は、入力手段40からの入力信号等に応じて開始され
(S201)、Java(R)アプリケーション実行マ
ネージャ24がWWWブラウザを実行していたインター
プリタ23の処理(タスクA)を中断させる(S20
2)。次いで、Java(R)アプリケーション実行マ
ネージャ24は、RAM21の特定領域R1に格納され
ている内容(インタープリタ23が使用していたグロー
バル変数等の値)をRAM21の退避領域R2にコピー
するとともに(S203)、タスクAの実行時に使用し
ていたスタックおよび当該スタックの情報を含んだTC
Bの内容を退避領域R4に退避させる(S204)。こ
の際、演算手段10の構成にもよるが、演算手段10に
設けられたレジスタ等の内容も必要に応じて退避させる
ようにしてもよい。
As shown in FIG. 5 (a), this switching operation is started in response to an input signal from the input means 40 (S201), and the Java (R) application execution manager 24 is executing the WWW browser. The processing of the interpreter 23 (task A) is suspended (S20).
2). Next, the Java (R) application execution manager 24 copies the contents (the values of the global variables used by the interpreter 23) stored in the specific area R1 of the RAM 21 to the save area R2 of the RAM 21 (S203). , TC including the stack used at the time of execution of task A and the information of the stack
The contents of B are saved in the save area R4 (S204). At this time, although depending on the configuration of the arithmetic means 10, the contents of the registers and the like provided in the arithmetic means 10 may be saved as necessary.

【0035】次に、新たにインタープリタ23を起動し
てゲームのJava(R)アプリケーションの実行(以
下、タスクBという)を開始する(S205)ことによ
り、Java(R)アプリケーションの切替動作は終了
する。このタスクBにおいて、特定領域R1にはタスク
Bで使用されるグローバル変数等の値が保持され、新た
なTCBでポイントされるスタックにタスクBで使用さ
れるローカル変数等が格納される。
Next, the interpreter 23 is newly activated to start the execution of the Java (R) application of the game (hereinafter referred to as task B) (S205), thereby ending the switching operation of the Java (R) application. . In the task B, the values of the global variables and the like used in the task B are held in the specific area R1, and the local variables and the like used in the task B are stored in the stack pointed to by the new TCB.

【0036】以上のような切替動作によれば、特定領域
R1を固定的に使用するインタープリタ23を用い、シ
ングルタスクOSを実装した組込みシステム100上に
構成されたJava(R)実行環境において、第1の実
施形態と同様に、先に実行していたJava(R)アプ
リケーション(WWWブラウザ)の実行を終了すること
なく、次のJava(R)アプリケーション(ゲーム)
を起動することができる。
According to the switching operation as described above, in the Java (R) execution environment configured on the embedded system 100 in which the single task OS is mounted using the interpreter 23 that fixedly uses the specific area R1, In the same manner as the first embodiment, the Java (R) application (game) that has been executed previously is not terminated without ending the execution of the Java (R) application (WWW browser).
Can be started.

【0037】その後、さらにWWWブラウザを再開する
場合には、図5(b)に示すように、入力手段40から
の入力信号等により切替動作を再度開始し(S20
7)、Java(R)アプリケーション実行マネージャ
24によりゲームのJava(R)アプリケーションを
実行していたインタープリタ23の処理(タスクB)を
中断させる(S208)とともに、特定領域R1にタス
クAで使用していたグローバル変数などの値を退避領域
R2から書き戻し(S209)、退避領域R4に保持さ
れたタスクA中断時のTCBおよびスタックの内容をそ
れぞれタスクA中断時の位置に書き戻す(S210)。
また、演算手段10に設けられたレジスタ等の内容を退
避させている場合には、このS210においてその内容
を復帰させる。次いで、WWWブラウザのJava
(R)アプリケーションを実行していたインタープリタ
23の処理(タスクA)を再開することにより(S21
1)、切替動作は終了する(S212)。
After that, when the WWW browser is further restarted, as shown in FIG. 5B, the switching operation is restarted by an input signal from the input means 40 (S20).
7), the Java (R) application execution manager 24 suspends the processing (task B) of the interpreter 23 which was executing the Java (R) application of the game (S208), and the task A is used in the specific area R1. The values of global variables and the like are written back from the save area R2 (S209), and the contents of the TCB and the stack held in the save area R4 at the time of task A interruption are written back to the positions at the time of task A interruption (S210).
Further, when the contents of the registers and the like provided in the arithmetic means 10 are saved, the contents are restored in S210. Next, Java of WWW browser
(R) By restarting the process (task A) of the interpreter 23 that was executing the application (S21
1), the switching operation ends (S212).

【0038】このような動作によれば、マルチタスクに
対応していないOSを実装した組込みシステム100に
おいても、マルチタスクOSを実装した第1の実施形態
と同様に、一度中断したWWWブラウザ(タスクA)を
正しく再開することができる。
According to such an operation, even in the embedded system 100 in which an OS that does not support multitask is installed, as in the first embodiment in which the multitask OS is installed, the WWW browser (task A) can be restarted correctly.

【0039】なお、本発明は、上記実施の形態に限られ
ず種々変更が可能である。例えば、上記実施の形態では
いずれもJava(R)アプリケーションマネージャ2
4により特定領域R1の内容を退避および復帰させてい
るが、別のプログラムモジュールにより退避および復帰
を行うようにしてもよい。また、第2の実施形態では、
Java(R)アプリケーションマネージャ24によ
り、さらにTCBおよび当該TCBがポイントするスタ
ックの退避および復帰を行っているが、これも別のプロ
グラムモジュールにより行うことが可能である。さら
に、本発明においてOSの実装は必須ではない。さらに
また、インタープリタ23の機能は、その一部を演算装
置10上にハードウェア的に構成してもよい。さらにま
た、上記実施の形態では、いずれもJava(R)アプ
リケーションを実行するためのソフトウェア・インター
プリターを複数起動しているが、その他のプログラムを
複数起動する形態としてもよく、例えばJava(R)
以外の言語を実行するためのソフトウェア・インタープ
リタであっても構わない。その他、本発明の本質を損な
わない範囲で、当業者が通常用いる技術的手段による置
換および変形が可能である。
The present invention is not limited to the above-described embodiment, but various modifications can be made. For example, in each of the above-described embodiments, the Java (R) application manager 2 is used.
Although the contents of the specific region R1 are saved and restored by means of 4, it is also possible to save and restore them by another program module. In addition, in the second embodiment,
The Java (R) application manager 24 further saves and restores the TCB and the stack pointed to by the TCB, but this can also be performed by another program module. Furthermore, implementation of the OS is not essential in the present invention. Furthermore, a part of the function of the interpreter 23 may be hardware-configured on the arithmetic unit 10. Furthermore, in each of the above embodiments, a plurality of software interpreters for executing Java (R) applications are activated, but a plurality of other programs may be activated, for example, Java (R).
It may be a software interpreter for executing a language other than. In addition, substitution and modification by technical means usually used by those skilled in the art are possible without departing from the essence of the present invention.

【0040】[0040]

【発明の効果】以上説明したように、本発明によれば、
第1のプログラムの実行を中断した後、第1のプログラ
ムが使用していたメモリの特定領域の内容を別の領域に
コピーしてから、この特定領域を使用する第2のプログ
ラムを起動するので、組込み機器において実行中の第1
のプログラムを終了することなく、同じメモリ領域を使
用する第2のプログラムを起動することができ、これに
より組込み機器で同じメモリ領域を使用する第1および
第2のプログラムを同時に起動することができる。
As described above, according to the present invention,
After interrupting the execution of the first program, copy the contents of the specific area of the memory used by the first program to another area, and then start the second program that uses this specific area. , 1st running on embedded device
The second program that uses the same memory area can be started without terminating the above program, and thus the first and second programs that use the same memory area in the embedded device can be started at the same time. .

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の実施形態における組込みシステム10
0の全体構成を示すブロック図である。
FIG. 1 is an embedded system 10 according to an embodiment of the present invention.
It is a block diagram which shows the whole 0 structure.

【図2】第1の実施形態におけるJava(R)アプリ
ケーションの切替動作を示すフローチャートである。
FIG. 2 is a flowchart showing a switching operation of Java (R) application according to the first embodiment.

【図3】図2に示した切替動作における組込みシステム
100の実行する処理と、メモリの運用とを対応させて
示す図面である。
FIG. 3 is a diagram showing a process executed by the embedded system 100 and a memory operation in the switching operation shown in FIG. 2 in association with each other.

【図4】第2の実施形態におけるJava(R)アプリ
ケーションの切替動作を示すフローチャートである。
FIG. 4 is a flowchart showing a switching operation of a Java (R) application according to the second embodiment.

【図5】図4に示した切替動作における組込みシステム
100の実行する処理と、メモリの運用とを対応させて
示す図面である。
5 is a diagram showing a process executed by the embedded system 100 in the switching operation shown in FIG. 4 and a memory operation in association with each other.

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

10 演算手段 20 記憶手段 21 RAM 22 ROM 23 インタープリタ 24 Java(R)アプリケーション実行マネージャ 30 通信手段 40 入力手段 10 computing means 20 storage means 21 RAM 22 ROM 23 Interpreter 24 Java (R) Application Execution Manager 30 Communication means 40 Input means

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 プロセッサおよびメモリを備えた組込み
機器で実行中の第1のプログラムを中断するステップ
と、 前記第1のプログラムが使用していた前記メモリの特定
領域の内容を、前記メモリの別の領域にコピーするステ
ップと、 前記メモリの前記特定領域を使用する第2のプログラム
を起動するステップとを具備することを特徴とする組込
み機器におけるプログラム実行方法。
1. A step of interrupting a first program being executed by an embedded device having a processor and a memory, and contents of a specific area of the memory used by the first program, And a step of activating a second program that uses the specific area of the memory, the program executing method in an embedded device.
【請求項2】 前記第2のプログラムを中断するステッ
プと、 前記第2のプログラムが使用していた前記メモリの特定
領域の内容を、前記メモリのまた別の領域にコピーする
ステップと、 前記メモリの前記別の領域の内容を、前記メモリの前記
特定領域にコピーするステップと、 前記第1のプログラムの実行を再開するステップとをさ
らに具備することを特徴とする請求項1に記載の組込み
機器におけるプログラム実行方法。
2. A step of interrupting the second program; a step of copying the contents of a specific area of the memory used by the second program to another area of the memory; The embedded device according to claim 1, further comprising: a step of copying the content of the another area of the memory into the specific area of the memory; and a step of restarting the execution of the first program. Program execution method in.
【請求項3】 前記第1および第2のプログラムは、同
一のプログラムであることを特徴とする請求項1または
2に記載の組込み機器におけるプログラム実行方法。
3. The program execution method in an embedded device according to claim 1, wherein the first and second programs are the same program.
【請求項4】 前記第1および第2のプログラムは、中
間コードを逐次的に解釈して実行するインタープリタで
あることを特徴とする請求項1から請求項3のいずれか
1項に記載の組込み機器におけるプログラム実行方法。
4. The embedded device according to claim 1, wherein the first and second programs are interpreters that sequentially interpret and execute intermediate code. Program execution method in device.
【請求項5】 前記プロセッサは、アドレス変換機能を
具備しないことを特徴とする組込み機器におけるプログ
ラム実行方法。
5. The program execution method in an embedded device, wherein the processor does not have an address conversion function.
JP2002055185A 2002-03-01 2002-03-01 Program execution method in incorporated equipment Pending JP2003256219A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002055185A JP2003256219A (en) 2002-03-01 2002-03-01 Program execution method in incorporated equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002055185A JP2003256219A (en) 2002-03-01 2002-03-01 Program execution method in incorporated equipment

Publications (1)

Publication Number Publication Date
JP2003256219A true JP2003256219A (en) 2003-09-10

Family

ID=28666082

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002055185A Pending JP2003256219A (en) 2002-03-01 2002-03-01 Program execution method in incorporated equipment

Country Status (1)

Country Link
JP (1) JP2003256219A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006236102A (en) * 2005-02-25 2006-09-07 Kyocera Corp Portable terminal device, program terminating method, and its computer program
JP2007531946A (en) * 2004-04-07 2007-11-08 ローベルト ボッシュ ゲゼルシャフト ミット ベシュレンクテル ハフツング Data integrity in data processing equipment
US7761853B2 (en) 2005-02-25 2010-07-20 Kyocera Corporation Portable terminal device, method for restoring program, method for terminating program, and computer program therefor

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007531946A (en) * 2004-04-07 2007-11-08 ローベルト ボッシュ ゲゼルシャフト ミット ベシュレンクテル ハフツング Data integrity in data processing equipment
JP2006236102A (en) * 2005-02-25 2006-09-07 Kyocera Corp Portable terminal device, program terminating method, and its computer program
JP4503466B2 (en) * 2005-02-25 2010-07-14 京セラ株式会社 Portable terminal device, program termination method, and computer program therefor
US7761853B2 (en) 2005-02-25 2010-07-20 Kyocera Corporation Portable terminal device, method for restoring program, method for terminating program, and computer program therefor

Similar Documents

Publication Publication Date Title
RU2435200C2 (en) Fast booting operating system from off state
JP5606633B2 (en) Method for provisioning firmware in an operating system (OS) absent service environment
RU2439678C2 (en) Initial download of operating system in separate stages
US7134007B2 (en) Method for sharing firmware across heterogeneous processor architectures
JP2010129080A (en) Software executing system and software executing method
US20040205755A1 (en) Operating systems
MXPA06013666A (en) Method, software and apparatus for using application state history information when re-launching applications.
JP2007509387A (en) operating system
JP2003157170A (en) Method for decoding and executing program binary instruction
KR101673299B1 (en) Operating system recovery method and apparatus, and terminal device
US20140047222A1 (en) Method and device for recombining runtime instruction
CN113360257B (en) Information operation method and device based on BIOS, storage medium and equipment
JPH10228380A (en) Method and computer system for executing network moving code having reduced run-time memory space request
US7552434B2 (en) Method of performing kernel task upon initial execution of process at user level
US7546600B2 (en) Method of assigning virtual process identifier to process within process domain
US20040117568A1 (en) Bridging memory access across pre-boot and runtime phases
KR100493893B1 (en) System and method of shortening class loading process in java program
KR100803290B1 (en) Extensible Virtual Machine for Reprogramming in Wireless Sensor Networks and Reprogramming Method using it
KR100775431B1 (en) Apparatus and Method for System Imbedded System and Firmware Updating Method Therein
CN107911816B (en) Starting method for multi-mode IoT device, multi-mode IoT device and storage medium
JP2003256219A (en) Program execution method in incorporated equipment
JP2017126293A (en) Information processing apparatus and resource management method
JP2003256218A (en) Program execution method in incorporated equipment
CN111381892B (en) Data processing method, device, equipment and machine-readable medium
CN113721959A (en) Information processing method and device and electronic equipment