JP2004199247A - Method for updating program - Google Patents
Method for updating program Download PDFInfo
- Publication number
- JP2004199247A JP2004199247A JP2002365055A JP2002365055A JP2004199247A JP 2004199247 A JP2004199247 A JP 2004199247A JP 2002365055 A JP2002365055 A JP 2002365055A JP 2002365055 A JP2002365055 A JP 2002365055A JP 2004199247 A JP2004199247 A JP 2004199247A
- Authority
- JP
- Japan
- Prior art keywords
- device control
- control program
- event
- update
- function
- 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
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、プログラム更新方法に係り、特に、制御プログラムを内蔵する装置において装置が運用状態にある時、装置制御処理を極力停止する事無く装置制御プログラムの更新を行うプログラム更新方法に関する。
【0002】
【従来の技術】
従来、運用中の装置制御プログラムの更新を行う方法として、プログラマブルコントローラの分野では、シングルタスクで動く装置制御プログラムを、旧装置制御プログラムの停止状態を見計らって、新装置制御プログラムに更新する方法が開示されている(例えば、特許文献1参照)。また、シングルタスクで動く装置制御プログラムに運用停止のフラグを持ち、このフラグが立っている場合に、一時的に装置制御プログラムの動作を強制的に停止させ、新装置制御プログラムに更新する方法が提案されている(例えば、特許文献2参照)。さらに、装置制御プログラムの開始アドレスと終了アドレスを管理し、新装置制御プログラム実行時に、新プログラムの開始アドレスから新プログラムを動かす方法が開示されている(例えば、特許文献3参照)。
【0003】
また、交換機の分野では、追加書き込みした新装置制御プログラムに、処理毎に設けたタグにより処理を振り分ける方法が開示されている(例えば、特許文献4参照)。さらに、機能ブロック毎にIPL(Initial ProgramLoad)部を持ち、装置再開時においてスイッチにより指定されたIPL部を実行する方法(例えば、特許文献5参照)や、装置制御プログラム更新時に、データのアドレス変換を行う方法(例えば、特許文献6参照)が提案されている。
【特許文献1】
特開2000−250610号公報
【特許文献2】
特開2001−125609号公報
【特許文献3】
特開平8−314712号公報
【特許文献4】
特開2001−86241号公報
【特許文献5】
特開平7−319707号公報
【特許文献6】
特開平7−46636号公報
【0004】
【発明が解決しようとする課題】
特許文献1、特許文献2、特許文献3では、対象となる装置がプログラマブルコントローラであり、対象となる装置制御プログラムがシングルタスクで動作する為、実行中の装置制御プログラムを一時的に停止させる事により、装置制御プログラムの状態を含み、装置の状態を固定する事が出来る。装置の状態を固定した状態であれば、装置制御プログラムの差し替えを行う事が出来るが、マルチタスクで動作する装置制御プログラムでは複数の処理が同時に実行され、あるタスクが停止している時には他のタスクが実行中である事が特徴である。通常、マルチタスクで動作する装置制御プログラムでは、実行中の装置制御プログラムが存在する為、装置制御プログラムの状態を含み、装置の状態を固定する事が出来ない。また、装置制御プログラム及び装置の状態を固定せずに装置制御プログラムの更新を行うと、装置制御プログラムの使用しているワークメモリの状態と、装置固有ハードウェアの状態に不一致、又は、ワークメモリ内の状態に矛盾が生じる場合がある。そのため、新装置制御プログラムに更新しても、新装置制御プログラムは動作する事が出来ない場合がある。装置制御プログラムの状態が固定されていない実行中の装置制御プログラムを更新する事は出来ず、マルチタスクで動作する装置制御プログラムを一括で更新する事が困難である。
【0005】
特許文献4では、古い装置制御プログラムを残し、その残した装置制御プログラムの持つ機能を使用して、装置制御プログラムの一部を差し替える方式であり、全ての装置制御プログラムの更新を行うものではない。また、特許文献5では装置再開からIPLを実行する必要があり、IPL中は装置の制御を行う事が出来ず、運用中の装置において適用出来るものではない。
【0006】
特許文献6では、アドレス変換を、旧装置制御プログラムを停止後データ内容を固定した状態で行う必要がある。装置制御プログラムは、アドレス変換中には新旧両装置制御プログラム共に動作停止状態となり、装置の制御を行う事が出来ず、運用中の装置において適用出来るものではない。
【0007】
本発明は、以上の点に鑑み、運用中の装置において、マルチタスクで動作する装置制御プログラムの装置制御処理を極力停止する事無く、装置制御プログラムの更新を可能とするプログラム更新方法を提供することを目的とする。
【0008】
【課題を解決するための手段】
上記課題は、2つの装置制御プログラムを保存する事を可能とする装置制御プログラム保存装置部と、
2つの装置制御プログラムを同時に実行する事を可能とする装置制御プログラム実行用メモリiと装置制御プログラム実行用メモリj、及び、2つの装置制御プログラム間でのデータ引継の処理を行う事なく、装置に固有なデータの受け渡しを可能とする装置制御プログラム共有データ実行用ワークメモリを有する装置制御プログラム実行用メモリと、ファイル更新管理機能を実行するファイル更新管理機能実行用メモリを有する装置制御プログラム実行用メモリ装置部と、ファイル更新の制御を行うファイル更新管理機能により実現する。なお、ファイル更新管理機能は、専用のハードウェアを用いて実現しても良い。
【0009】
より具体的には、例えば、装置(ハードウェア又はソフトウェア)を制御する為の装置制御プログラムについて、旧装置制御プログラムと新装置制御プログラムの2つの装置制御プログラムを、それぞれを保存した前後関係を判別する為の識別子と共に保存する装置制御プログラム保存エリアi及び装置制御プログラム保存エリアjを有する装置制御プログラム保存装置部と、
装置制御プログラム及び装置制御プログラム更新機能を保持し、実行するための装置制御プログラム実行用メモリ装置部と、
装置固有ハードウェアからの割込によるイベントのキューイングを制御するイベント制御機能、及び、
イベント制御機能と連携し、運用中の装置において、実行中の旧装置制御プログラムを、新装置制御プログラムに更新する装置制御プログラム更新機能を有するファイル更新管理機能部を使用する事により、マルチタスクで動作する装置制御プログラムの更新を可能とするプログラム更新方法である。
【0010】
また、前記装置制御プログラム実行用メモリ装置部は、
運用中の装置において、装置制御プログラムの更新時に、同時に更新の前後2つの装置制御プログラムを実行する為に使用する装置制御プログラム実行用メモリi並びに装置制御プログラム実行用メモリjと、
装置制御プログラムの更新前後において、引き継ぐ必要のあるデータを保持する装置制御プログラム共有データ実行用ワークメモリとを有する装置制御プログラム実行用メモリ、及び、
ファイル更新の制御を行うファイル更新管理機能を保持するファイル更新管理機能保持メモリと、
ファイル更新管理機能を実行する為のファイル更新管理機能実行用ワークと、装置固有ハードウェアからのイベントをキューイングする通常イベントキューと、
ファイル更新時に、タスクの実行イベントを保留する為の保留イベントキューと、
新旧それぞれの装置制御プログラムの状態を保持する装置制御プログラムi状態フラグ並びに装置制御プログラムj状態フラグと、
ファイル更新の状態を保持するファイル更新状態フラグとを有するファイル更新管理機能実行用ワークメモリを備えることができる。
【0011】
本発明の解決手段によると、
装置のハードウェア又はソフトウェアを制御する新旧2つの装置制御プログラムを保持し、運用中の装置における装置制御プログラムの更新時に各装置制御プログラムを実行するための装置制御プログラム実行用メモリと、
装置からのイベントがキューイングされる通常イベントキューと、
所定の種別のイベントを保留するための保留イベントキューと、
装置からの割込によるイベントのキューイングを制御するイベント制御機能と、
実行中の旧装置制御プログラムを、新装置制御プログラムに更新する装置制御プログラム更新機能と
を用いたプログラム更新方法であって、
前記装置制御プログラム更新機能は、実行中の旧装置制御プログラムから新装置制御プログラムへ更新する際、新装置制御プログラムに実行開始指示及び/又は初期設定開始指示を出力するステップと、
前記装置制御プログラム更新機能は、新装置制御プログラムの初期設定の完了を監視し、及び、旧装置制御プログラムに停止処理を実行させるステップと、
前記イベント制御管理機能は、前記装置制御プログラム更新機能によるプログラム更新の状態を判別するステップと、
前記イベント制御管理機能は、前記更新の状態が旧装置制御プログラムの停止処理実行中を示す場合、実行イベントは前記保留イベントキューにキューイングし、実行イベント以外のイベントは前記通常イベントキューにキューイングするステップと、
前記装置制御プログラム更新機能は、旧装置制御プログラムの停止を監視し、及び、新装置制御プログラムに装置制御開始を指示して制御中とするステップと、
前記装置制御プログラム更新機能は、前記保留イベントキューにキューイングされたイベントをデキューし、前記通常イベントキューにキューイングするステップと、
を含むプログラム更新方法が提供される。
【0012】
【発明の実施の形態】
以下に、本発明の実施の形態について説明する。
図1に、本実施の形態における装置の構成要素の概略図を示す。
本実施の形態における装置は、装置の制御を行うプロセッサ1と、装置制御プログラムを保存する装置制御プログラム保存装置部2と、装置制御プログラムを実行するための装置制御プログラム実行用メモリ装置部3と、装置制御プログラムの運用状態での装置制御プログラムの更新を制御するファイル更新管理機能部4と、制御対象となる装置固有ハードウェア5を備える。また、これらは、装置内制御バス6を介して接続されている。装置固有ハードウェア5は、装置制御プログラムによって制御されるハードウェアであり、例えば、ルータ、交換機等の通信機器、コンピュータ等であってもよい。さらに、装置固有ハードウェア5は、ハードウェアとソフトウェアの組み合わせ、又は、ソフトウェアであってもよい。装置の制御を極力停止することなくプログラムの更新を行うことにより、例えば、通信状態を維持したままプログラムのバージョンアップ等を行うことが可能となる。
【0013】
図2は、装置制御プログラム保存装置部2の構成図である。装置制御プログラム保存装置部2は、更新前と更新後の2つの装置制御プログラムを保存する為、装置制御プログラム保存エリアi21と、装置制御プログラム保存エリアj22の2面を備える。装置制御プログラム保存エリアi21と装置制御プログラム保存エリアj22は、それぞれ、保存前後関係識別子i211及びj221と装置制御プログラムi212及びj222を保存するエリアを有する。
【0014】
保存前後関係識別子i211及びj221は、装置制御プログラムi212又はj222の内容を書き換える場合に、装置制御プログラム保存エリアi21と装置制御プログラム保存エリアj22の書き込み順を判定する為に使用するものである。例えば、それぞれの装置制御プログラムの書き込み時刻や、装置制御プログラムのバージョン番号を書き込んでおけば良い。なお、これ以外にも書き込み順を判定可能な適宜の情報を書き込むこともできる。
【0015】
図3は、装置制御プログラムの構成例を示す図である。装置制御プログラムは、装置制御プログラム保存装置部2に保存される。装置制御プログラムは、例えば、装置制御プログラム親タスク30と、装置制御プログラム親タスク30により実行及び管理される装置制御プログラム子タスク31〜3nを含む。なお、本装置制御プログラムの構成は一例であり、子タスクの数、タスクの構成等について、その具体的な作り込み方法を制限するものではない。また、更新前に実行中の装置制御プログラム(旧装置制御プログラム)と更新後に実行される装置制御プログラム(新装置制御プログラム)は、異なる数の子タスクを有してもよいし、異なる構成であってもよい。親タスク及び子タスクがない単なるタスク、孫タスク等のさらなる階層があってもよい。
【0016】
図4は、装置制御プログラム実行用メモリ装置部3の構成例を示す図である。制御プログラム実行用メモリ装置部3は、ファイル更新管理機能の保持と実行を行う為のファイル更新管理機能実行用メモリ41と、装置制御プログラムの保持と実行を行う為の装置制御プログラム実行用メモリ42を備える。
【0017】
ファイル更新管理機能実行用メモリ41は、ファイル更新の制御を行うファイル更新管理機能を保持するファイル更新管理機能保持メモリ411と、ファイル更新管理機能の処理を実行する為のファイル更新管理機能実行用ワークメモリ412を有する。また、ファイル更新管理機能実行用ワークメモリ412は、ファイル更新管理機能の処理を実行する際に使用されるファイル更新管理機能実行用ワーク4121と、装置固有ハードウェア5からのイベントがキューイングされる通常イベントキュー4122と、ファイル更新時に旧装置制御プログラムにイベントを実行させず、新装置制御プログラムの制御開始までイベントを保留する為の保留イベントキュー4123と、新旧それぞれの装置制御プログラムの状態を保持する装置制御プログラムi状態フラグ4124及び装置制御プログラムj状態フラグ4125と、ファイル更新の状態を保持するファイル更新状態フラグ4126とを有する。装置制御プログラムi状態フラグ4124及び装置制御プログラムj状態フラグ4125は、例えば、装置制御プログラムi及びjの状態が、それぞれプログラム停止中、実行中、初期設定完了等であること保持する。また、ファイル更新状態フラグ4126は、例えば、旧装置制御プログラムに停止指示が出力され、旧装置制御プログラムの停止待ちの状態である装置停止処理実行中の状態、又は、ファイル更新を行っていない通常状態等を保持する。
【0018】
装置制御プログラム実行用メモリ42は、2面構成となり、装置制御プログラムiを実行する為の装置制御プログラム実行用メモリi421と、装置制御プログラムjを実行する為の装置制御プログラム実行用メモリj422と、装置固有ハードウェア5の状態に依存する情報を保存する装置制御プログラム共有データ実行用ワークメモリ423を有する。また、装置制御プログラム共有データ実行用ワークメモリ423は、装置固有ハードウェア5の状態に依存する情報以外に引き継ぐ必要のある適宜のデータを保存するようにしてもよい。旧装置制御プログラム及び新装置制御プログラムは、引き継ぐ必要のあるデータ及び/又は装置固有ハードウェア5の状態について、装置制御プログラム共有データ実行用メモリを使用して制御を行うことでデータの引継ぎをすることができる。
【0019】
装置制御プログラム実行用メモリi421は、装置制御プログラムiを保持する装置制御プログラムi保持メモリ4211と、装置制御プログラムiを実行する為のワークデータを保持する装置制御プログラムi実行用ワークメモリ4212を有する。また、装置制御プログラムi実行用ワークメモリ4212は、装置制御プログラムiを実行する時に、タスク間のデータの受け渡しに使用する装置制御プログラムiテンポラリ42121と、装置制御プログラムiの各タスク内で使用する装置制御プログラムiスタック42122を有する。
【0020】
さらに、装置制御プログラムiスタック42122は、ファイル更新管理機能部4からの実行開始指示で実行される装置制御プログラムiの装置制御プログラム親タスク30の使用する装置制御プログラムi親タスクスタック421220と、装置制御プログラムiの装置制御プログラム親タスク30から実行される装置制御プログラム子タスク31〜3nの使用する装置制御プログラムi子タスクスタック421221〜42122nを有する。
【0021】
装置制御プログラム実行用メモリj422は、上述の装置制御プログラム実行用メモリi421と同様の構成とすることができる。装置制御プログラム実行用メモリj422は、装置制御プログラムjを保持する装置制御プログラムj保持メモリ4221と、装置制御プログラムjを実行する為のワークデータを保持する装置制御プログラムj実行用ワークメモリ4222を有する。また装置制御プログラムj実行用ワークメモリ4222は、装置制御プログラムjを実行する時に、タスク間のデータの受け渡しに使用する装置制御プログラムjテンポラリ42221と、装置制御プログラムjの各タスク内で使用する装置制御プログラムjスタック42222を有する。
【0022】
さらに、装置制御プログラムjスタック42222は、ファイル更新管理機能部4からの実行開始指示で実行される装置制御プログラムjの装置制御プログラム親タスク30の使用する装置制御プログラムj親タスクスタック422220、装置制御プログラムjの装置制御プログラム親タスク30から実行される装置制御プログラム子タスク31〜3nの使用する装置制御プログラムj子タスクスタック422221〜42222nを有する。
【0023】
ただし、図4に示す例は、一実施例であり、メモリ内の配置の自由度を妨げるものではなく、また、タスク構成についても一実施例でしかない。これ以外にも、メモリ構成及びタスク構成は、適宜の構成をとることができる。
【0024】
図5は、ファイル更新管理機能部4の構成図である。ファイル更新管理機能部4は、装置制御プログラム更新機能51とイベント制御機能52を備える。装置制御プログラム更新機能51は、装置制御プログラムの実行中に、装置制御プログラム保存装置部2に保存した新装置制御プログラムのファイルを、装置制御プログラム実行用メモリ装置部3の装置制御プログラムi保持メモリ4211、又は、装置制御プログラムj保持メモリ4221に書き込み、新装置制御プログラムの実行開始及び初期設定開始の各指示、旧装置制御プログラムの停止指示、新装置制御プログラムへの装置制御開始指示等を行う。なお、装置制御プログラム更新機能51は、装置制御プログラム保存装置部2に保存されている保有前後関係識別子i211及びj222を参照し、新装置制御プログラムを判別することができる。
【0025】
イベント制御機能52は、装置固有ハードウェア5からイベントを、通常イベントキュー4122にキューイングし、装置制御プログラムのファイル更新時には、旧装置制御プログラムの子タスクを実行するイベントを、保留イベントキュー4123にキューイングする処理を行う。以下に一例として、実行中の装置制御プログラムiを新しい装置制御プログラムjに更新する処理について説明する。以下の各処理は、各機能及びプログラムに従いプロセッサ1が実行する。
【0026】
図6は、装置制御プログラムiが実行中であり、ファイルの更新処理が行われていない通常動作状態での装置制御シーケンス図である。通常動作状態では、装置制御プログラムi保持メモリ4211上に配置された装置制御プログラムiの装置制御処理が実行中である(S651)。なお、装置制御プログラムiは、ファイル更新管理機能実行用ワークメモリ412内に設けられた通常イベントキュー4122に存在するイベントをルックインし(S653)、各イベントに対する処理を実行している。また、装置制御プログラムiは、装置制御プログラムiの状態に依存するデータについては、装置制御プログラムi実行用ワークメモリ4212との間でデータの書き込み及び読み出しを行い(S655)、装置固有ハードウェア5の状態に依存するデータについては、装置制御プログラム共有データ実行用ワークメモリ423との間でデータの書き込み及び/又は読み出しを行っている(S657)。なお、装置制御プログラム共有データ実行用ワークメモリ423には、装置固有ハードウェア5の状態に依存するデータ以外にも新装置制御プログラムに引き継ぐ必要のある適宜のデータを記憶しても良い。
【0027】
まず、装置固有ハードウェア5によりイベントAが発生すると、ファイル更新管理機能部4のイベント制御機能52は、装置固有ハードウェア5からイベントAを入力する(S601)。次に、イベント制御機能52は、入力したイベントAを、通常イベントキュー4122にキューイングする(S609)。イベント制御機能52は、他のイベントB、C、Dについてもイベント発生時に、装置固有ハードウェア5からイベントを入力し(S602〜S604)、入力したイベントを、通常イベントキュー4122にキューイングする(S610〜S612)。通常イベントキュー4122にキューイングされたイベントは、装置制御プログラムiによって実行される。
【0028】
図7〜図9は、ファイル更新のシーケンス図(1)〜(3)である。図7に、ファイル更新のシーケンス図(1)を示す。図7に示すシーケンス図は、上位装置又は保守者からのファイル更新指示による新装置制御プログラム(例えば、装置制御プログラムj)のBOOT(bootstrap、起動)から、制御開始待ちになるまでのシーケンス図である。
【0029】
図6に示す装置制御プログラムiが実行中である通常動作状態において、上位装置又は保守者により、ファイル更新管理機能部4に対して装置制御プログラムの更新が指示される(S700)。ファイル更新管理機能4の装置制御プログラム更新機能51は、装置制御プログラム更新指示を受信することにより処理を開始する。また、装置制御プログラム更新機能51は、上位装置又は外部機器から新装置制御プログラムが装置制御プログラム保存装置部2に書き込まれることで処理を開始してもよい。なお、処理の開始は、これ以外にも適宜のタイミングで開始することができる。
【0030】
まず、装置制御プログラム更新機能51は、予め装置制御プログラム保存エリアj22に保存されている装置制御プログラムjを読み出し、装置制御プログラムj保持メモリ4221に書き込む(S701)。次に、装置制御プログラム更新機能51は、装置制御プログラムj保持メモリ4221上の装置制御プログラムjに、実行開始を指示する(S703)。装置制御プログラムjは、実行開始指示を受信し、IDOL(アイドリング)立ち上げを行う(S705)。さらに、装置制御プログラム更新機能51は、装置制御プログラムjに初期設定開始を指示する(S707)。なお、初期設定開始の指示は、実行開始の指示に含めても良い。
【0031】
IDOL立ち上げによりIDOL状態となった装置制御プログラムjは、初期設定開始指示を受信し、初期設定処理を行う(S709)。なお、装置制御プログラムjは、装置固有ハードウェア5の制御を開始していないため、装置制御プログラム共有データ実行用ワークメモリ423は使用せず、必要に応じて装置制御プログラムj実行用ワークメモリ4222との間でデータの書き込み及び読み出しを行う(S706)。なお、装置固有ハードウェア5の制御(S653)を継続する装置制御プログラムiは、装置制御プログラムi実行用ワークメモリ4212と装置制御プログラム共有データ実行用ワークメモリ423を使用している(S655、S657)。
【0032】
装置制御プログラムjは、初期設定が終了すると、初期設定完了を示すフラグを装置制御プログラムj状態フラグ4125に設定する(S711)。装置制御プログラムjは、フラグの設定後、装置制御プログラム更新機能51からの制御開始指示待ち状態となる(S713)。
【0033】
一方、初期設定開始を指示した装置制御プログラム更新機能51は、装置制御プログラムj状態フラグを監視する(S715)。装置制御プログラム更新機能51は、装置制御プログラムjにより装置制御プログラムj状態フラグ4125に初期設定完了を示すフラグが設定されることで、初期設定が完了したことを検知できる。なお、初期設定が完了したことを検知する手段は、フラグを用いる以外にも適宜の手段を用いることができる。
【0034】
図8に、ファイル更新のシーケンス図(2)を示す。図8は、旧装置制御プログラム(例えば、装置制御プログラムi)の停止までのシーケンス図である。図7のステップS715において、装置制御プログラムjの初期設定の完了を確認後、装置制御プログラム更新機能51は、実行中の旧装置制御プログラム(例えば、装置制御プログラムi)に対して装置制御停止指示を出力する(S717)。装置制御プログラムiは、装置制御停止指示を入力し、装置制御プログラムi停止処理の実行状態となる(S719)。なお、装置制御プログラムi停止処理とは、子タスクの状態遷移を行うか、停止するイベントのみを実行する事により、全ての子タスクが停止状態に至る事を言い、装置制御プログラムiに子タスクを停止させる特別な機能を持つものではない。装置制御プログラムiは、通常状態の時と同様に、通常イベントキュー4122をルックインし、各イベントに対応する処理を実行する(S721)。
【0035】
また、装置制御プログラム更新機能51は、ファイル更新状態フラグ4126に装置停止処理実行中であることを設定する(S723)。イベント制御機能52は、例えば、ファイル更新状態フラグ4126に装置停止処理実行中であることが設定されると、イベント種別に応じてイベントのキューイング先を制御する。なお、イベント制御機能52は、ファイル更新状態フラグ4126を用いる以外にも適宜の手段又は方法により、プログラム更新の状態が装置低所処理の実行中であることを判別してもよい。
【0036】
まず、装置固有ハードウェア5によるイベントが発生すると、イベント制御機能52は、装置固有ハードウェア5からイベントを入力する(S801〜S804)。次に、イベント制御機能52は、入力したイベントの種別を判別し、タスク実行イベントの場合は、イベントを保留イベントキュー4123にキューイングし(S811、S813)、一方、タスク停止イベント又は状態遷移イベントの場合は、イベントを通常イベントにキューイングする(S812、S814)。なお、これらの処理は、各イベント発生時に実行される。イベント制御機能52により、タスク実行を行うイベントを保留イベントキュー4123にキューイングする事により、装置制御プログラムiには、子タスクの状態遷移を行うか、停止をするイベントのみ渡され、装置制御プログラムiの実行中の子タスクがなくなる。
【0037】
装置制御プログラムiは、全ての子タスクが停止すると装置制御プログラムi状態フラグ4124に、装置制御停止のフラグを設定する(S725)。装置制御プログラム更新機能51は、ステップS717の装置制御停止指示を出力後、装置制御プログラムi状態フラグ4124を監視する(S727)。装置制御プログラム更新機能51は、装置制御プログラムi状態フラグ4124に装置制御停止のフラグが設定されることで、装置制御プログラムiが停止したことを検知できる。なお、装置制御プログラムiの状態のチェックは、フラグを用いる以外にも適宜の方法を用いることができる。
【0038】
なお、この間、装置制御プログラムiは、装置制御プログラムi実行用ワークメモリ4212と、装置制御プログラム共有データ実行用ワークメモリ423とを使用しながら(S655、S657)、装置制御プログラムi停止処理を行う。また、装置制御プログラムjは、必要に応じて装置制御プログラムj実行用ワークメモリ4222を使用し(S706)、制御開始指示待ちの状態を継続して、装置制御プログラムiが装置制御プログラム共有データ実行用ワークメモリ423を使用しない状態になるのを待つ。
【0039】
図9に、ファイル更新のシーケンス図(3)を示す。図9は、新装置制御プログラム(例えば、装置制御プログラムj)の装置制御開始までのシーケンス図である。図8のステップS727において、装置制御プログラム更新機能51は、装置制御プログラムi状態フラグ4124に、装置制御停止のフラグが設定されたことを確認後、装置制御プログラムjに対して、装置制御開始指示を出力する(S729)。装置制御プログラムjは、装置制御プログラム更新機能51から装置制御開始指示を入力し、装置制御を実行する(S731)。装置制御プログラムjは、通常イベントキュー4122のイベントをルックインし(S733)、各イベントに対応した処理を実行する。さらに、装置制御プログラム更新機能51は、装置制御プログラムj状態フラグ4125にプログラムの実行中を示すフラグを適宜のタイミングで設定しても良い。
【0040】
なお、装置制御プログラムjは、装置制御プログラムj実行用ワークメモリ4222の使用(S706)に加え、装置制御プログラムiが使用していた装置制御プログラム共有データ実行用ワークメモリ423を使用し(S730)、装置制御を行う。装置制御プログラム共有データ実行用ワークメモリ423を使用することにより、更新前の装置固有ハードウェア5の状態及び/又は引き継ぐ必要のあるデータ引き継ぐことができる。
【0041】
さらに、装置制御プログラム更新機能51は、ファイル更新状態フラグ4126に通常状態を示すフラグを設定する(S735)。次に、装置制御プログラム更新機能51は、保留イベントキュー4123にキューイングされているタスク実行イベントを、通常イベントキュー4122にキューイングする(S737)。通常イベントキュー4122にキューイングし直す事により、保留されていたタスク実行イベントは、装置制御プログラムjにより実行される。なお、これ以降イベント制御機能52は、ファイル更新状態フラグ4126に通常状態が設定されているため、装置固有ハードウェア5で発生したイベントを全て通常イベントキュー4122にキューイングする。
【0042】
図10は、イベント制御機能52のフローチャートである。イベント制御機能52は、図6及び図8に示すように、装置固有ハードウェア5からの割込により実行される。まず、イベント制御機能52は、装置固有ハードウェア5からイベントを入力する(S1000)。次に、イベント制御機能52は、実行中の装置制御プログラムの有無を判別する。イベント制御機能52は、装置制御プログラムi状態フラグ4124をチェックする(S1001)。イベント制御機能52は、装置制御プログラムi状態フラグ4124が停止以外を示す場合、ステップS1003の処理移り、一方、装置制御プログラムi状態フラグ4124が停止を示す場合(S1001)、装置制御プログラムj状態フラグ4125をチェックする(S1002)。イベント制御機能52は、装置制御プログラムj状態フラグ4125が停止以外を示す場合、ステップS1003の処理移る。一方、イベント制御機能52は、装置制御プログラムj状態フラグ4125が停止を示す場合(S1002)、装置固有ハードウェア5から入力したイベントを廃棄し、処理を終了する。
【0043】
ステップS1003では、イベント制御機能52は、ファイル更新状態フラグ4126をチェックし、装置停止処理実行中か否かを判別する(S1003)。イベント制御機能52は、ファイル更新状態フラグ4126が通常状態を示す場合、ステップS1005の処理へ移る。一方、イベント制御機能52は、ファイル更新状態フラグ4126が装置停止処理実行中を示す場合(S1003)、装置固有ハードウェア5から入力したイベントの種別を判断する(S1004)。イベント制御機能52は、イベントの種別がタスク実行イベントの場合(S1004)、イベントを保留イベントキュー4123にキューイングし(S1006)、処理を終了する。一方、イベント制御機能52は、イベントの種別がタスク実行イベント以外(例えば、タスク停止イベント、状態遷移イベント)の場合(S1004)、ステップS1005の処理へ移る。
【0044】
ステップS1005では、イベント制御機能52は、イベントを通常イベント4122にキューイングし(S1005)、処理を終了する。
【0045】
図11及び図12及び図13は、装置制御プログラム更新機能51のフローチャートである。なお、図12及び図13は、図11のステップS1102及びステップS1103に示すサブプログラムのフローチャートである。図11に、装置制御プログラム更新機能51のメインプログラムのフローチャートを示す。装置制御プログラム更新機能51は、上位装置又は保守者から装置制御プログラム更新指示を受信することで、以下の処理を開始する。なお、処理の開始は、適宜のタイミングで行っても良い。
【0046】
まず、装置制御プログラム更新機能51は、装置制御プログラム保存装置部2に保存された2つの装置制御プログラムの内、現在停止中の装置制御プログラムを、装置制御プログラムi状態フラグ4124により判定する(S1101)。装置制御プログラム更新機能51は、装置制御プログラムi状態フラグ4124をリードし、リードしたフラグが停止中を示す場合(S1101)、装置制御プログラムiに更新し(S1102)、一方リードしたフラグが停止中以外を示す場合(S1101)、装置制御プログラムjに更新する(S1103)。装置制御プログラムi及び装置制御プログラムjに更新する処理については図12及び図13に示し、詳細は後述する。なお、装置制御プログラム更新機能51は、例えば、装置制御プログラムj状態フラグ4125により、現在停止中の装置制御プログラムを判定することができる。また、上位装置又は保守者からの指示に停止中のプログラムの情報が含まれ、この情報により停止中のプログラムを判定してもよい。
【0047】
装置制御プログラムi又は装置制御プログラムjに更新後、装置制御プログラム更新機能51はファイル更新状態フラグ4126に通常状態を設定する(S1104)。また、装置制御プログラム更新機能51は、保留イベントキュー4123にキューイングされているイベントをデキューする(S1105)。なお、装置制御プログラム更新機能51は、デキューするイベントが保留イベントキュー4123に存在しなかった場合(S1106)、処理を終了する。一方、装置制御プログラム更新機能51はデキューするイベントが存在した場合(S1106)、デキューしたイベントを通常イベントキュー4122にキューイングし(S1107)、ステップS1105に戻る。
【0048】
図12は、装置制御プログラムjを新装置制御プログラムとして実行するフローチャートである。まず、装置制御プログラム更新機能51は、装置制御プログラム保存エリアj22の装置制御プログラムjを読み出し、装置制御プログラム実行用メモリ42の装置制御プログラムj保持メモリ4221に書き込む(S1301)。次に、装置制御プログラム更新機能51は、装置制御プログラムjに対し、実行開始を指示する(S1302)。さらに、装置制御プログラム更新機能51は、装置制御プログラムjに対し初期設定開始を指示する(S1303)。なお、初期設定開始の指示は、実行開始の指示に含めても良い。
【0049】
装置制御プログラム更新機能51は、装置制御プログラムj状態フラグ4125をリードする(S1304)。装置制御プログラム更新機能51は、リードした装置制御プログラムj状態フラグ4125の示す状態を判定し、装置制御プログラムj状態フラグ4125が初期設定実行中を示す場合、ステップS1304の処理へ戻り、一方、装置制御プログラムj状態フラグ4125が初期設定終了を示す場合、ステップS1306の処理へ移る(S1305)。次に、装置制御プログラム更新機能51は、旧装置制御プログラム(例えば、装置制御プログラムi)に対し装置制御停止を指示する(S1306)。
【0050】
さらに、装置制御プログラム更新機能51は、ファイル更新状態フラグ4126を装置停止処理実行中とする(S1307)。ファイル更新状態フラグ4126を装置停止処理実行中とする事により、イベント制御機能52が、装置固有ハードウェア5からのイベントの内、タスク実行イベントを保留イベントキュー4123にキューイングし、新規タスクの実行を抑止し、旧装置制御プログラムを停止状態にする。次に、装置制御プログラム更新機能51は、装置制御プログラムi状態フラグ4124をリードする(S1308)。装置制御プログラム更新機能51は、リードした装置制御プログラムi状態フラグ4124の示す状態を判定し、停止処理実行中を示す場合はステップS1308の処理へ戻り、停止処理終了を示す場合はステップS1310の処理へ移る(S1309)。装置制御プログラム更新機能51は、装置制御プログラムjに対し装置制御開始を指示し(S1310)、図11のステップS1104の処理へ移る。
【0051】
装置制御プログラムjによる装置制御は、装置制御プログラムjの状態に依存するデータについては、装置制御プログラムj実行用ワークメモリ4222を使用し、装置の状態に依存するデータについては、装置制御プログラム共有データ実行用ワークメモリ423を使用して処理を行う。装置制御プログラムjは、装置固有ハードウェア5の状態に依存するデータについては、装置制御プログラムiの使用していた装置制御プログラム共有データ実行用ワークメモリ423にあるデータを使用する為、装置制御プログラムiの制御していた時の装置固有ハードウェア5の状態に依存するデータを、装置制御プログラムjに受け渡す処理を行う必要がない。その結果、装置制御プログラムjが、継続して装置固有ハードウェア5の制御を行う事が出来る。
【0052】
図13は、装置制御プログラムiを新装置制御プログラムとして実行するフローチャートである。例えば、旧装置制御プログラムが、装置制御プログラムj保持メモリ4221上で実行中の場合に実行される処理である。実行する装置制御プログラム、プログラムに対応するメモリ及びフラグが異なるのみで制御の概要は図12と同様である
【0053】
まず、装置制御プログラム更新機能51は、装置制御プログラム保存エリアi21の装置制御プログラムiを読み出し、装置制御プログラム実行用メモリ42の装置制御プログラムi保持メモリ4211に書き込む(S1201)。次に、装置制御プログラム更新機能51は、装置制御プログラムiに対し、実行開始を指示する(S1202)。さらに、装置制御プログラム更新機能51は、装置制御プログラムiに対し初期設定開始を指示する(S1203)。なお、初期設定開始の指示は、実行開始の指示に含めても良い。
【0054】
装置制御プログラム更新機能51は、装置制御プログラムi状態フラグ4124をリードする(S1204)。装置制御プログラム更新機能51は、リードした装置制御プログラムi状態フラグ4124の示す状態を判定し、装置制御プログラムi状態フラグ4124が初期設定実行中を示す場合、ステップS1204の処理へ戻り、一方、装置制御プログラムi状態フラグ4124が初期設定終了を示す場合、ステップS1206の処理へ移る(S1205)。次に、装置制御プログラム更新機能51は、旧装置制御プログラム(例えば、装置制御プログラムj)に対し、装置制御停止を指示する(S1206)。
【0055】
さらに、装置制御プログラム更新機能51は、ファイル更新状態フラグ4126を装置停止処理実行中とする(S1207)。ファイル更新状態フラグ4126を装置停止処理実行中とする事により、イベント制御機能52が、装置固有ハードウェア5からのイベントの内、タスク実行イベントを保留イベントキュー4123にキューイングし、新規タスクの実行を抑止し、旧装置制御プログラムを停止状態にする。次に、装置制御プログラム更新機能51は、装置制御プログラムj状態フラグ4125をリードする(S1208)。装置制御プログラム更新機能51は、リードした装置制御プログラムj状態フラグ4125の示す状態を判定し、停止処理実行中を示す場合はステップS1208の処理へ戻り、停止処理終了を示す場合はステップS1210の処理へ移る(S1209)。装置制御プログラム更新機能51は、装置制御プログラムiに対し装置制御開始を指示し(S1210)、図11のステップS1104の処理へ移る。
【0056】
装置制御プログラムiによる装置制御は、装置制御プログラムiの状態に依存するデータについては、装置制御プログラムi実行用ワークメモリ4212を使用し、装置の状態に依存するデータについては、装置制御プログラム共有データ実行用ワークメモリ423を使用して処理を行う。装置制御プログラムiは、装置固有ハードウェア5の状態に依存するデータについては、装置制御プログラムjの使用していた装置制御プログラム共有データ実行用ワークメモリ423にあるデータを使用する為、装置制御プログラムjの制御していた時の装置固有ハードウェア5の状態に依存するデータを、装置制御プログラムiに受け渡す処理を行う必要がない。その結果、装置制御プログラムiが、継続して装置固有ハードウェア5の制御を行う事が出来る。
【0057】
本発明のプログラム更新方法は、その各手順をコンピュータに実行させるためのファイル更新管理機能プログラム、ファイル更新管理機能プログラムを記録したコンピュータ読み取り可能な記録媒体、ファイル更新管理機能プログラムを含みコンピュータの内部メモリーにロード可能なプログラム製品、そのプログラムを含むサーバ等のコンピュータ、等により提供されることができる。
【0058】
【発明の効果】
本発明によると、以上のように運用中の装置に対して、装置制御プログラムの装置制御処理を極力停止する事無く、マルチタスクで動作する装置制御プログラムの更新が可能となる。
【図面の簡単な説明】
【図1】本発明の構成要素の概略を示すブロック図である。
【図2】本発明の装置制御プログラム保存装置部の構成図である。
【図3】本発明の装置制御プログラムの構成例である。
【図4】本発明の装置制御プログラムメモリ実行用メモリ装置部の構成例である。
【図5】本発明のファイル更新管理機能部の構成図である。
【図6】本発明の通常動作状態での動作シーケンス図である。
【図7】本発明の新装置制御プログラム立ち上げ動作シーケンス図である。
【図8】本発明の旧装置制御プログラム停止動作シーケンス図である。
【図9】本発明の新装置制御プログラム装置制御開始動作シーケンス図である。
【図10】本発明のイベント制御機能のフローチャートである。
【図11】本発明の装置制御プログラム更新機能メインプログラムのフローチャートである。
【図12】本発明の装置制御プログラム更新処理サブプログラム(装置制御プログラムjに更新)のフローチャートである。
【図13】本発明の装置制御プログラム更新機能サブプログラム(装置制御プログラムiに更新)のフローチャートである。
【符号の説明】
1 プロセッサ
2 装置制御プログラム保存装置部
3 装置制御プログラム実行用メモリ装置部
4 ファイル更新管理機能部
5 装置固有ハードウェア
6 装置内制御バス
21 装置制御プログラム保存エリアi
211 保存前後関係識別子i
212 装置制御プログラムi
22 装置制御プログラム保存エリアj
221 保存前後関係識別子j
222 装置制御プログラムj
30 装置制御プログラム親タスク
31〜3n 装置制御プログラム子タスク1〜n
41 ファイル更新管理機能実行用メモリ
411 ファイル更新管理機能保持メモリ
412 ファイル更新管理機能実行用ワークメモリ
4121 ファイル更新管理機能実行用ワーク
4122 通常イベントキュー
4123 保留イベントキュー
4124 装置制御プログラムi状態フラグ
4125 装置制御プログラムj状態フラグ
4126 ファイル更新状態フラグ
42 装置制御プログラム実行用メモリ
421 装置制御プログラム実行用メモリi
4211 装置制御プログラムi保持メモリ
4212 装置制御プログラムi実行用ワークメモリ
42121 装置制御プログラムiテンポラリ
42122 装置制御プログラムiスタック
421220 制御プログラムi親タスクスタック
421221〜42122n 制御プログラムi子タスク1〜nスタック
422 装置制御プログラム実行用メモリj
4221 装置制御プログラムj保持メモリ
4222 装置制御プログラムj実行用ワークメモリ
42221 装置制御プログラムiテンポラリ
42222 装置制御プログラムiスタック
422220 制御プログラムj親タスクスタック
422221〜42222n 制御プログラムj子タスク1〜nスタック
423 装置制御プログラム共有データ実行用ワークメモリ
51 装置制御プログラム更新機能
52 イベント制御機能[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a program updating method, and more particularly to a program updating method for updating a device control program without stopping a device control process as much as possible when the device is in an operating state in a device incorporating a control program.
[0002]
[Prior art]
Conventionally, as a method of updating an operating device control program, in the field of programmable controllers, there is a method of updating a device control program that operates by a single task to a new device control program in consideration of the stop state of the old device control program. It is disclosed (for example, see Patent Document 1). In addition, there is a method in which a device control program that runs in a single task has an operation stop flag, and when this flag is set, the operation of the device control program is temporarily forcibly stopped and updated to a new device control program. It has been proposed (for example, see Patent Document 2). Further, there is disclosed a method of managing a start address and an end address of a device control program and moving the new program from the start address of the new program when executing the new device control program (for example, see Patent Document 3).
[0003]
Further, in the field of exchanges, a method of distributing processing to a newly written new apparatus control program using a tag provided for each processing has been disclosed (for example, see Patent Document 4). Further, each function block has an IPL (Initial Program Load) unit, and a method of executing an IPL unit specified by a switch when the apparatus is restarted (for example, refer to Patent Document 5), or a data address conversion at the time of updating an apparatus control program. (For example, see Patent Document 6).
[Patent Document 1]
JP-A-2000-250610
[Patent Document 2]
JP 2001-125609 A
[Patent Document 3]
JP-A-8-314712
[Patent Document 4]
JP 2001-86241 A
[Patent Document 5]
JP-A-7-319707
[Patent Document 6]
JP-A-7-46636
[0004]
[Problems to be solved by the invention]
In
[0005]
Patent Document 4 discloses a method in which an old device control program is left and a part of the device control program is replaced by using a function of the remaining device control program, and not all device control programs are updated. . Further, in
[0006]
In
[0007]
In view of the above, the present invention provides a program updating method that enables updating of a device control program in an operating device without stopping device control processing of a device control program that operates in multitasking as much as possible. The purpose is to:
[0008]
[Means for Solving the Problems]
An object of the present invention is to provide a device control program storage device capable of storing two device control programs,
An apparatus control program execution memory i and an apparatus control program execution memory j that enable simultaneous execution of two apparatus control programs, and an apparatus without performing data transfer processing between the two apparatus control programs. For executing a device control program that has a work memory for executing a device control program shared data that enables the transfer of data unique to a device, and for executing a device control program that has a memory for executing a file update management function that executes a file update management function This is realized by a memory device unit and a file update management function for controlling file update. Note that the file update management function may be realized by using dedicated hardware.
[0009]
More specifically, for example, with respect to a device control program for controlling a device (hardware or software), the two device control programs, an old device control program and a new device control program, are determined in a context in which each is stored. A device control program storage device unit having a device control program storage area i and a device control program storage area j for storing together with an identifier for performing
A device control program execution memory device for holding and executing the device control program and the device control program update function,
An event control function for controlling event queuing by interruption from device-specific hardware, and
In coordination with the event control function, by using the file update management function unit with the device control program update function to update the running old device control program to the new device control program in the operating device, multitasking This is a program updating method that enables updating of an operating device control program.
[0010]
Further, the memory device for executing the device control program includes:
A memory i for executing a device control program and a memory j for executing a device control program, which are used for simultaneously executing two device control programs before and after the update at the time of updating the device control program in the operating device;
A device control program execution memory having a device control program shared data execution work memory that holds data that needs to be taken over before and after the device control program is updated, and
A file update management function holding memory for holding a file update management function for controlling file update,
A work for executing the file update management function for executing the file update management function, a normal event queue for queuing an event from the device-specific hardware,
A pending event queue for suspending task execution events when updating files,
A device control program i status flag and a device control program j status flag for holding the status of the new and old device control programs,
A file update management function execution work memory having a file update status flag for holding a file update status can be provided.
[0011]
According to the solution of the present invention,
A device control program execution memory for holding two new and old device control programs for controlling hardware or software of the device, and executing each device control program when updating the device control program in the operating device;
A normal event queue in which events from the device are queued,
A hold event queue for holding a predetermined type of event;
An event control function for controlling event queuing due to an interrupt from the device;
A device control program update function for updating a running old device control program to a new device control program;
A program update method using
Outputting the execution start instruction and / or the initialization start instruction to the new device control program when updating the running device control program from the old device control program to the new device control program;
The device control program update function monitors completion of the initial setting of the new device control program, and causes the old device control program to execute a stop process;
The event control management function, a step of determining the state of the program update by the device control program update function,
When the update status indicates that the old device control program is being stopped, the event control management function queues an execution event in the pending event queue and queues an event other than the execution event in the normal event queue. Steps to
The device control program update function monitors the stop of the old device control program, and instructs the new device control program to start device control, and sets the device control under control.
The device control program update function, dequeueing the event queued in the pending event queue, queuing in the normal event queue,
A method for updating a program is provided.
[0012]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described.
FIG. 1 shows a schematic diagram of components of the apparatus according to the present embodiment.
The device according to the present embodiment includes a
[0013]
FIG. 2 is a configuration diagram of the device control program
[0014]
The storage context identifiers i211 and j221 are used to determine the writing order of the device control program storage area i21 and the device control program storage area j22 when rewriting the contents of the device control program i212 or j222. For example, the writing time of each device control program and the version number of the device control program may be written. In addition, other appropriate information that can determine the writing order can be written.
[0015]
FIG. 3 is a diagram illustrating a configuration example of the device control program. The device control program is stored in the device control program
[0016]
FIG. 4 is a diagram illustrating a configuration example of the
[0017]
The file update management
[0018]
The device control
[0019]
The device control program execution memory i421 includes a device control program i holding
[0020]
Further, the device control program i stack 42122 includes a device control program i
[0021]
The device control program execution memory j422 can have the same configuration as the device control program execution memory i421 described above. The device control program
[0022]
Further, the device control
[0023]
However, the example shown in FIG. 4 is an example, which does not impede the degree of freedom of arrangement in the memory, and also has only one example regarding the task configuration. In addition, the memory configuration and the task configuration can have any appropriate configurations.
[0024]
FIG. 5 is a configuration diagram of the file update management function unit 4. The file update management function unit 4 includes a device control
[0025]
The
[0026]
FIG. 6 is a device control sequence diagram in a normal operation state in which the device control program i is being executed and the file update process has not been performed. In the normal operation state, the device control processing of the device control program i arranged on the device control program i holding
[0027]
First, when the event A is generated by the device-
[0028]
7 to 9 are sequence diagrams (1) to (3) of a file update. FIG. 7 shows a file update sequence diagram (1). The sequence diagram shown in FIG. 7 is a sequence diagram from a BOOT (bootstrap, activation) of a new device control program (for example, device control program j) in response to a file update instruction from a higher-level device or a maintenance person, until a control start waits. is there.
[0029]
In the normal operation state in which the device control program i shown in FIG. 6 is being executed, the host device or the maintenance person instructs the file update management function unit 4 to update the device control program (S700). The device control
[0030]
First, the device control
[0031]
The device control program j which has been brought into the IDOL state by the start of the IDOL receives the initial setting start instruction and performs the initial setting process (S709). Since the device control program j has not started controlling the device-
[0032]
When the initialization is completed, the device control program j sets a flag indicating the completion of the initialization in the device control program j status flag 4125 (S711). After setting the flag, the device control program j waits for a control start instruction from the device control program update function 51 (S713).
[0033]
On the other hand, the device control
[0034]
FIG. 8 shows a sequence diagram (2) of the file update. FIG. 8 is a sequence diagram until the old device control program (for example, the device control program i) stops. In step S715 in FIG. 7, after confirming the completion of the initialization of the device control program j, the device control
[0035]
Further, the device control
[0036]
First, when an event by the device-
[0037]
When all the child tasks are stopped, the device control program i sets a device control stop flag in the device control program i status flag 4124 (S725). After outputting the device control stop instruction in step S717, the device control
[0038]
During this time, the device control program i performs the device control program i stop processing while using the device control program i
[0039]
FIG. 9 shows a file update sequence diagram (3). FIG. 9 is a sequence diagram up to the start of device control of a new device control program (for example, device control program j). In step S727 of FIG. 8, the device control
[0040]
The device control program j uses the device control program shared data
[0041]
Further, the device control
[0042]
FIG. 10 is a flowchart of the
[0043]
In step S1003, the
[0044]
In step S1005, the
[0045]
11, 12, and 13 are flowcharts of the device control
[0046]
First, the device control
[0047]
After updating to the device control program i or the device control program j, the device control
[0048]
FIG. 12 is a flowchart for executing the device control program j as a new device control program. First, the device control
[0049]
The device control
[0050]
Further, the device control
[0051]
The device control by the device control program j uses the
[0052]
FIG. 13 is a flowchart for executing the device control program i as a new device control program. For example, the process is executed when the old device control program is being executed on the device control program
[0053]
First, the device control
[0054]
The device control
[0055]
Further, the device control
[0056]
The device control by the device control program i uses the
[0057]
A program update method according to the present invention includes a file update management function program for causing a computer to execute the respective procedures, a computer-readable recording medium storing the file update management function program, and a computer internal memory including the file update management function program. The program product can be provided by a computer such as a server including the program product that can be loaded into the program.
[0058]
【The invention's effect】
According to the present invention, as described above, it is possible to update a device control program that operates in multitasking without stopping the device control processing of the device control program as much as possible for a device that is operating.
[Brief description of the drawings]
FIG. 1 is a block diagram schematically showing components of the present invention.
FIG. 2 is a configuration diagram of a device control program storage device section of the present invention.
FIG. 3 is a configuration example of an apparatus control program of the present invention.
FIG. 4 is a configuration example of a memory device unit for executing a device control program memory according to the present invention.
FIG. 5 is a configuration diagram of a file update management function unit of the present invention.
FIG. 6 is an operation sequence diagram in a normal operation state of the present invention.
FIG. 7 is a sequence diagram of a new device control program start-up operation according to the present invention.
FIG. 8 is an operation sequence diagram of an old device control program stop operation of the present invention.
FIG. 9 is a sequence diagram of a new device control program device control start operation according to the present invention.
FIG. 10 is a flowchart of an event control function of the present invention.
FIG. 11 is a flowchart of an apparatus control program update function main program of the present invention.
FIG. 12 is a flowchart of an apparatus control program update processing subprogram (updated to an apparatus control program j) of the present invention.
FIG. 13 is a flowchart of an apparatus control program update function subprogram (updated to an apparatus control program i) of the present invention.
[Explanation of symbols]
1 processor
2 Device control program storage unit
3 Memory device section for device control program execution
4 File update management function section
5 Device-specific hardware
6. Control bus in the device
21 Device control program storage area i
211 Storage context identifier i
212 Device control program i
22 Device control program storage area j
221 preservation context identifier j
222 device control program j
30 Device control program parent task
31 to 3n Device control
41 File update management function execution memory
411 File update management function holding memory
412 Work memory for executing file update management function
4121 Work for executing file update management function
4122 Normal event queue
4123 Pending event queue
4124 Device control program i status flag
4125 Device control program j status flag
4126 File update status flag
42 Device control program execution memory
421 Device control program execution memory i
4211 Device control program i holding memory
4212 Work memory for executing device control program i
42121 Device control program i temporary
42122 Device control program i-stack
421220 Control program i parent task stack
421221 to 42122n Control program
422 device control program execution memory j
4221 Device control program j holding memory
4222 Work memory for executing device control program j
42221 Device control program i temporary
42222 Device control program i-stack
422220 Control program j parent task stack
422221 to 42222n control program
423 Work memory for executing device control program shared data
51 Device control program update function
52 Event control function
Claims (3)
装置からのイベントがキューイングされる通常イベントキューと、
所定の種別のイベントを保留するための保留イベントキューと、
装置からの割込によるイベントのキューイングを制御するイベント制御機能と、
実行中の旧装置制御プログラムを、新装置制御プログラムに更新する装置制御プログラム更新機能と
を用いたプログラム更新方法であって、
前記装置制御プログラム更新機能は、実行中の旧装置制御プログラムから新装置制御プログラムへ更新する際、新装置制御プログラムに実行開始指示及び/又は初期設定開始指示を出力するステップと、
前記装置制御プログラム更新機能は、新装置制御プログラムの初期設定の完了を監視し、及び、旧装置制御プログラムに停止処理を実行させるステップと、
前記イベント制御管理機能は、前記装置制御プログラム更新機能によるプログラム更新の状態を判別するステップと、
前記イベント制御管理機能は、前記更新の状態が旧装置制御プログラムの停止処理実行中を示す場合、実行イベントは前記保留イベントキューにキューイングし、実行イベント以外のイベントは前記通常イベントキューにキューイングするステップと、
前記装置制御プログラム更新機能は、旧装置制御プログラムの停止を監視し、及び、新装置制御プログラムに装置制御開始を指示して制御中とするステップと、
前記装置制御プログラム更新機能は、前記保留イベントキューにキューイングされたイベントをデキューし、前記通常イベントキューにキューイングするステップと、
を含むプログラム更新方法。A device control program execution memory for holding two new and old device control programs for controlling hardware or software of the device, and executing each device control program when updating the device control program in the operating device;
A normal event queue in which events from the device are queued,
A hold event queue for holding a predetermined type of event;
An event control function for controlling event queuing due to an interrupt from the device;
A program update method using an old device control program being executed and a device control program update function of updating the new device control program,
Outputting the execution start instruction and / or the initialization start instruction to the new device control program when updating the running device control program from the old device control program to the new device control program;
The device control program update function monitors completion of the initial setting of the new device control program, and causes the old device control program to execute a stop process;
The event control management function, a step of determining the state of the program update by the device control program update function,
When the update status indicates that the old device control program is being stopped, the event control management function queues an execution event in the pending event queue and queues an event other than the execution event in the normal event queue. Steps to
The device control program update function monitors the stop of the old device control program, and instructs the new device control program to start device control, and sets the device control under control.
The device control program update function, dequeueing the event queued in the pending event queue, queuing in the normal event queue,
A program update method including:
前記イベント制御管理機能は、前記ファイル更新状態フラグを参照してプログラム更新の状態を判別することを特徴とする請求項1に記載のプログラム更新方法。The device control program update function outputs a stop instruction to the old device control program, and / or writes a state indicating that the device stop process of the old device control program is being executed or a normal state to a file update state flag,
2. The program updating method according to claim 1, wherein the event control management function refers to the file update status flag to determine a program update status.
新装置制御プログラムは、旧装置制御プログラムの停止後、前記装置制御プログラム共有データ実行用メモリ中のデータを使用して装置の制御を行うことにより、データの引継ぎを可能とした請求項1又は2に記載のプログラム更新方法。The old device control program controls the device using the data in the device control program shared data execution memory that holds data that needs to be taken over by the new device control program,
3. The new device control program according to claim 1, wherein after the old device control program is stopped, data transfer is enabled by controlling the device using data in the memory for executing the device control program shared data. Program update method described in.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002365055A JP2004199247A (en) | 2002-12-17 | 2002-12-17 | Method for updating program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002365055A JP2004199247A (en) | 2002-12-17 | 2002-12-17 | Method for updating program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2004199247A true JP2004199247A (en) | 2004-07-15 |
Family
ID=32762714
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002365055A Pending JP2004199247A (en) | 2002-12-17 | 2002-12-17 | Method for updating program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2004199247A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE102005034820A1 (en) * | 2005-07-26 | 2007-02-01 | Volkswagen Ag | System and method for executing a parallelized software update |
JP2010198383A (en) * | 2009-02-25 | 2010-09-09 | Fujitsu Ltd | Storage device, software updating method, and software updating program |
WO2012119224A1 (en) * | 2011-03-09 | 2012-09-13 | Asset Science Llc | Systems and methods for modifying content of mobile communication devices |
JP2014501995A (en) * | 2011-01-05 | 2014-01-23 | アリババ・グループ・ホールディング・リミテッド | Elastic computing cloud system upgrade |
-
2002
- 2002-12-17 JP JP2002365055A patent/JP2004199247A/en active Pending
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE102005034820A1 (en) * | 2005-07-26 | 2007-02-01 | Volkswagen Ag | System and method for executing a parallelized software update |
JP2010198383A (en) * | 2009-02-25 | 2010-09-09 | Fujitsu Ltd | Storage device, software updating method, and software updating program |
JP2014501995A (en) * | 2011-01-05 | 2014-01-23 | アリババ・グループ・ホールディング・リミテッド | Elastic computing cloud system upgrade |
WO2012119224A1 (en) * | 2011-03-09 | 2012-09-13 | Asset Science Llc | Systems and methods for modifying content of mobile communication devices |
US8793350B2 (en) | 2011-03-09 | 2014-07-29 | Asset Science Llc | Systems and methods for modifying content of mobile communication devices |
GB2514861A (en) * | 2011-03-09 | 2014-12-10 | Eric Arseneau | Systems and methods for modifying content of mobile communication devices |
GB2514861B (en) * | 2011-03-09 | 2015-05-13 | Eric Arseneau | Systems and methods for modifying content of mobile communication devices |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5655677B2 (en) | Hypervisor replacement method and information processing apparatus | |
JP4871948B2 (en) | Virtual computer system, hypervisor in virtual computer system, and scheduling method in virtual computer system | |
JP5966927B2 (en) | Distributed processing apparatus and distributed processing system | |
US20120084520A1 (en) | Method and Apparatus for Efficient Memory Replication for High Availability (HA) Protection of a Virtual Machine (VM) | |
JP2008293358A (en) | Distributed processing program, distributed processing method, distributed processing apparatus, and distributed processing system | |
WO2012160533A1 (en) | Transparent file system migration to a new physical location | |
JP2007219757A (en) | Program for making virtual computer system function | |
JP2000330807A (en) | Method and device for simultaneously starting execution of thread by plural processors and computer readable recording medium | |
KR101454146B1 (en) | Storage device, controller, and recording medium | |
JP4873423B2 (en) | Virtualization program, simulation apparatus, and virtualization method | |
JP6123626B2 (en) | Process resumption method, process resumption program, and information processing system | |
KR20070050002A (en) | Information processing device, memory area management method, and computer program | |
JP5820525B2 (en) | Virtual computer scheduling system and method thereof | |
JP5683186B2 (en) | Start-up acceleration method, information processing apparatus, and program | |
JP5131269B2 (en) | Multi-processing system | |
JP2004199247A (en) | Method for updating program | |
US20140052947A1 (en) | Data storage device and method of controlling data storage device | |
US10509567B2 (en) | System and method for migrating storage while in use | |
US10540112B2 (en) | System and method for migrating virtual machines with storage while in use | |
JP6146092B2 (en) | Virtualization system, virtual server, virtual machine control method, and virtual machine control program | |
JP2009251681A (en) | Expansion method for stack region and program | |
JPS60114941A (en) | Device for multi-task control | |
JPH04346136A (en) | Virtual instruction processor structure control method | |
JP2003067200A (en) | Processing system, task control method on computer system and storage medium | |
JPH0376497B2 (en) |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Effective date: 20051013 Free format text: JAPANESE INTERMEDIATE CODE: A621 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20080325 |
|
A131 | Notification of reasons for refusal |
Effective date: 20080701 Free format text: JAPANESE INTERMEDIATE CODE: A131 |
|
A521 | Written amendment |
Effective date: 20080821 Free format text: JAPANESE INTERMEDIATE CODE: A523 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080916 |
|
A521 | Written amendment |
Effective date: 20081111 Free format text: JAPANESE INTERMEDIATE CODE: A523 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090106 |
|
A521 | Written amendment |
Effective date: 20090302 Free format text: JAPANESE INTERMEDIATE CODE: A523 |
|
A02 | Decision of refusal |
Effective date: 20090414 Free format text: JAPANESE INTERMEDIATE CODE: A02 |