JP3978848B2 - Data table access controller - Google Patents

Data table access controller Download PDF

Info

Publication number
JP3978848B2
JP3978848B2 JP04842198A JP4842198A JP3978848B2 JP 3978848 B2 JP3978848 B2 JP 3978848B2 JP 04842198 A JP04842198 A JP 04842198A JP 4842198 A JP4842198 A JP 4842198A JP 3978848 B2 JP3978848 B2 JP 3978848B2
Authority
JP
Japan
Prior art keywords
data table
semaphores
firmware
control means
computer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP04842198A
Other languages
Japanese (ja)
Other versions
JPH11249953A (en
Inventor
智寿子 尾上
直久 森本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP04842198A priority Critical patent/JP3978848B2/en
Publication of JPH11249953A publication Critical patent/JPH11249953A/en
Application granted granted Critical
Publication of JP3978848B2 publication Critical patent/JP3978848B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、排他制御用にセマフォを利用してデータテーブルのアクセス制御を行うデータテーブルアクセス制御装置に関するものである。
【0002】
【従来の技術】
従来、排他制御を行う方法として、テストアンドセット(TAS)命令やセマフォ(Semaphore )等が利用されている。
例えば、フラッシュROMに使用されるセマフォでは、各デバイス毎に1つのセマフォが割り当てられ、この場合、フラッシュROMに対する同時期の読み書きは行われない。
【0003】
また、メモリに記憶された複数のデータテーブル(テーブル形式のデータ)に使用されるセマフォでは、一般に、データテーブルの全てのセマフォを取得したときに当該データテーブルに対する書込みを可能にする一方、データテーブルのいずれかのセマフォを取得したときに当該データテーブルに対する読出しを可能にしている。
【0004】
なお、この種のデータテーブルアクセス制御方法では、あるタスクがセマフォを取得した状態のまま停止すると、このセマフォを他のタスクが取得することができなかった。
また、複数のデータテーブルの各セマフォを同時期に取得する場合、例えば最後の1つが取得できないために、この1つを取得するまで他のセマフォを取得した状態のまま無限ループに入ってしまう場合があった。
【0005】
なお、上記セマフォによるデータテーブルアクセス制御に関するものではないが、特開平8−194621号公報には、ファームウエア更新中におけるシステムの停止時間を短くしたダウンロード装置が開示されている。
【0006】
【発明が解決しようとする課題】
データテーブルを記憶する不揮発性メモリと、主記憶装置(読み書き可能の揮発性メモリ)及び中央処理装置(CPU)により構成されるコンピュータとが組み込まれた設備が導入された場合、この導入後、コンピュータがアクセスする不揮発性メモリにおけるデータテーブルの更新が必要になる場合が多い。
【0007】
このような場合、上記不揮発性メモリは通常書換え不可であることから、データテーブルを更新するには、不揮発性メモリを更新されたデータテーブルを記憶するものと交換する必要があった。
これに対して、データテーブルが書換え可能の不揮発性メモリに記憶されている場合には、データテーブルの更新は、所定の処理を実行させるために記述されたいわゆるアプリケーションプログラムが動作中であれば、この動作を停止させた上で実行されていた。
【0008】
本発明は、上記事情に鑑みてなされたものであり、データテーブル更新のためのメモリ交換を不要にすることが可能で、アプリケーションプログラムが動作中でもデータテーブルの更新が可能なデータテーブルアクセス制御装置を提供することを目的とする。
【0009】
【課題を解決するための手段】
上記課題を解決するための本発明は、ネットワークを介したデータ送受信用の通信手段と、中央処理装置及び主記憶装置により構成されるコンピュータと、電気的に書換え可能な不揮発性メモリを有し、この不揮発性メモリで複数のデータテーブルを記憶している他、ファームウエアを記憶している記憶手段とを備え、前記ファームウエアは、前記コンピュータをファームウエア制御手段として機能させ、このファームウエア制御手段は、前記複数のデータテーブルの各々に複数のセマフォを割り当てる一方、前記複数のデータテーブルのいずれかに割り当てられた複数のセマフォの全てが当該データテーブル更新用に前記ネットワークを介して取得されると、これらセマフォの全てを取得した取得相手に対して、取得されたセマフォに対応する更新すべきデータテーブルを占有させる構成(以下「基本構成」という)を持つ。この基本構成によれば、データテーブル更新のためのメモリ交換が不要になるとともに、アプリケーションプログラムが動作中でもデータテーブルの更新が可能になる
【0010】
請求項1記載の発明は、上記基本構成を持つデータテーブルアクセス制御装置において、前記記憶手段は、前記コンピュータをアプリケーション制御手段として機能させるアプリケーションプログラムと、前記コンピュータをオペレーション制御手段として機能させるオペレーションシステムプログラムとを記憶し、前記オペレーション制御手段は、前記アプリケーション制御手段が前記複数のデータテーブルに対して読出アクセスを行うと、この読出アクセスのあったデータテーブルに対する可能な限り多くのセマフォの取得要求を前記ファームウエア制御手段に行うとともに、このファームウエア制御手段からの取得結果に応じて前記読出アクセスのあったデータテーブルに対する使用可能時間を求め、この使用可能時間及び前記取得結果の双方を前記アプリケーション制御手段に返すことを特徴とする。この構成によれば、セマフォを取得できないためにループに入ってしまったり、あるタスクがセマフォを取得した状態のまま停止して、このセマフォを他のタスクが取得することができいといった不具合が防止されるようになる。
【0011】
請求項2記載の発明は、上記基本構成を持つデータテーブルアクセス制御装置において、前記記憶手段は、前記コンピュータをアプリケーション制御手段として機能させるアプリケーションプログラムと、前記コンピュータをオペレーション制御手段として機能させるオペレーションシステムプログラムとを記憶し、前記オペレーション制御手段は、前記複数のデータテーブルのうち、一のデータテーブル及び少なくとも1つの他のデータテーブルの各々からセマフォを選択し、この選択された複数のセマフォを示す排他制御用のエイリアスを作成する一方、前記アプリケーション制御手段が前記エイリアスに対応する複数のデータテーブルに対して同時期に読出アクセスを行うと、当該エイリアスにより示される複数のセマフォの全ての取得要求を前記ファームウエア制御手段に行うとともに、このファームウエア制御手段からの取得結果を当該エイリアス単位で前記アプリケーション制御手段に返すことを特徴とする。この構成によれば、複数のデータテーブルの各セマフォを同時期に取得する場合に、複数のセマフォの全てを取得できないために取得するまで取得した他のセマフォを保持したままとなって生じる不具合が防止されるようになる。
【0012】
請求項3記載の発明は、上記基本構成を持つデータテーブルアクセス制御装置において、前記記憶手段は、前記コンピュータをアプリケーション制御手段として機能させるアプリケーションプログラムと、前記コンピュータをオペレーション制御手段として機能させるオペレーションシステムプログラムと、前記コンピュータを前記アプリケーション制御手段に対するインターフェース手段として機能させるアプリケーションインターフェースプログラムとを記憶し、前記インターフェース手段は、前記複数のデータテーブルのうち、一のデータテーブル及び少なくとも1つの他のデータテーブルに対する読出アクセスが同時期に行われた場合の当該読出アクセス回数の履歴を取るとともに、この履歴の読出アクセス回数が所定回数以上になった各データテーブルのセマフォを選択し、この選択された複数のセマフォを示す排他制御用のエイリアスを作成する一方、前記アプリケーション制御手段が前記エイリアスに対応する複数のデータテーブルに対して同時期に読出アクセスを行うと、当該エイリアスにより示される複数のセマフォの全ての取得要求を前記オペレーション制御手段に行うとともに、このオペレーション制御手段からの取得結果を当該エイリアス単位でアプリケーション制御手段に返すことを特徴とする。この構成によれば、エイリアスが自動的に生成され登録されるようになって、複数のデータテーブルの各セマフォを同時期に取得する場合に、複数のセマフォの全てを取得できないために取得するまで取得した他のセマフォを保持したままとなって生じる不具合が防止されるようになる。
【0013】
【発明の実施の形態】
図1(a)は、本発明の第1実施形態に係るデータテーブルアクセス制御装置を適用した設備の概略構成図、図1(b)は各装置内のコンピュータを示す図、図2は、データテーブル更新装置から更新対象となる装置のハードウエアのメモリ領域への更新すべきデータテーブルのダウンロードの様子を示す図で、以下これらの図を用いて第1実施形態について説明する。
【0014】
本設備は、図1(a)に示すように、複数の装置TがネットワークNWを介して互いに接続されて構成され、各装置Tは、後述するデータテーブルに対するアクセス制御を行うとともに所定の制御を行うデータテーブルアクセス制御装置10が組み込まれている。なお、上記所定の制御は、設備に対して設定されるもので、ここでの説明は省略する。
【0015】
データテーブルアクセス制御装置10は、ネットワークNWを介したデータ送受信用の通信インターフェース(通信手段)11と、CPU12及びRAM(主記憶装置)13により構成されるコンピュータ14と、ファームウエア、オペレーションシステム(OS)プログラム及び複数のデータテーブルを記憶しているフラッシュROM(記憶手段、不揮発性メモリ)15とを備え、図1(b)に示すように、上記ファームウエアは、コンピュータ14をファームウエア制御部141として機能させる一方、上記OSプログラムは、コンピュータ14をオペレーション制御部142として機能させる。なお、フラッシュROM15は、チップ的には複数個でもよいことはいうまでもない。
【0016】
ファームウエア制御部141は、フラッシュROM15における複数のデータテーブルの各々に3つのセマフォを割り当てる一方、複数のデータテーブルのいずれかに割り当てられた3つのセマフォの全てが当該データテーブル更新用にネットワークNWを介して取得されると、これら3つのセマフォの全てを取得したデータテーブル更新装置(取得相手)1に対して(図2参照)、取得されたセマフォに対応する更新すべきデータテーブルを占有させるものである。
【0017】
また、ファームウエア制御部141は、オペレーション制御部142から読出アクセスに応じたデータテーブルのセマフォ取得の要求があると、この要求に応じてセマフォを取得し、少なくとも1つのセマフォを取得することができれば、取得できたセマフォのデータテーブルに対する読出許可を示す取得結果を返し、そうでなければ読出禁止を示す取得結果を返す。
【0018】
オペレーション制御部142は、本装置Tの全般を制御するもので、例えばネットワークNWを介してデータテーブル更新装置1から、フラッシュROM15における複数のデータテーブルのいずれかに対する更新要求を受けると、この更新要求のあったデータテーブルに割り当てられた3つのセマフォの全ての取得要求をファームウエア制御部141に行い、このファームウエア制御部141から取得結果を受け取り、3つのセマフォの全てを取得できれば、更新用のデータテーブルをダウンロードして、取得したセマフォに対応する更新すべきデータテーブルを更新する処理を進め、更新後は取得中のセマフォを開放する一方、3つのセマフォの全てを取得できなければ更新要求に対して更新不可を返す。なお、更新不可の場合、データテーブル更新装置1は、同一の更新要求を再度行うことになる。
【0019】
図3は、コンピュータ14の動作説明図で、以下この図を用いてコンピュータ14の動作について説明する。
データテーブル更新装置1から、フラッシュROM15における複数のデータテーブルのうちのデータテーブルDT2に対する更新要求を受けると、このデータテーブルDT2に割り当てられた3つのセマフォS4〜S6の全ての取得が試みられる。
【0020】
セマフォS4〜S6の全てが取得されると、これら3つのセマフォに対応するデータテーブルDT2は、データテーブル更新装置1に占有され、他のタスクによる読み出しが禁止される。このように、更新すべきデータテーブルの使用が禁止されるので、例えばアプリケーションプログラムが動作中でも更新が可能になる。
【0021】
次いで、更新用のデータテーブルDT2’がダウンロードされ(図2)、このダウンロードされたデータテーブルDT2’で更新すべきデータテーブルDT2が更新される。この後、セマフォS4〜S6は開放される。
一方、セマフォS4〜S6の全てが取得されなければ、この旨がデータテーブル更新装置1に返され、更新すべきデータテーブルDT2の更新は行われない。このとき、取得中のセマフォがあれば直ちに開放される。
【0022】
以上、第1実施形態によれば、データテーブルの更新のためのメモリ交換を不要にすることが可能で、アプリケーションプログラムが動作中でもデータテーブルを更新することが可能になる。
図4は、本発明の第2実施形態に係るデータテーブルアクセス制御装置内のコンピュータ及びフラッシュROMを示す図で、以下この図を用いて第2実施形態について説明する。
【0023】
第2実施形態のデータテーブルアクセス制御装置は、第1実施形態と同様に通信インターフェース11を備えている他、第1実施形態とは異なる動作のCPU12及びRAM13により構成されるコンピュータ24と、第1実施形態とは異なる情報、すなわちファームウエア、OSプログラム、アプリケーション(APL)プログラム及び複数のデータテーブルを記憶しているフラッシュROM25とを備え、図4に示すように、上記ファームウエアは、コンピュータ24をファームウエア制御部141として機能させ、上記OSプログラムは、コンピュータ24をオペレーション制御部242として機能させ、上記APLプログラムは、コンピュータ24をアプリケーション制御部243として機能させる。
【0024】
なお、ファームウエア制御部141は、第1実施形態と同様に動作する。
オペレーション制御部242は、アプリケーション制御部243がフラッシュROM25における複数のデータテーブルに対して読出アクセスを行うと、この読出アクセスのあったデータテーブルに対する可能な限り多くのセマフォ取得要求をファームウエア制御部141に行うとともに、このファームウエア制御部141からの取得結果に応じて読出アクセスのあったデータテーブルに対する使用可能時間を求め、この使用可能時間及び取得結果の双方をアプリケーション制御部243に返すものである。
【0025】
なお、使用可能時間は、最大使用可能時間であって、取得されたセマフォの数に応じて長くなるように設定される。なお、セマフォが取得できない場合は、使用可能時間はゼロに設定される。
アプリケーション制御部243は、設備に対する種々の制御を行うもので、例えば制御過程でフラッシュROM25における複数のデータテーブルに対して読出アクセスを行い、この読出アクセスに応じてオペレーション制御部242から返される使用可能時間及び取得結果を受け取り、受け取った使用可能時間がゼロでなければ、その使用可能時間内で取得結果に対応するデータテーブルの読出処理を進め、読出処理終了後は取得中のセマフォを開放する。
【0026】
このとき、アプリケーション制御部243は、使用可能時間を過ぎてもセマフォが取得状態であれば、タスクが停止したと考えられることから、取得中のセマフォを強制的に開放する。
これにより、セマフォを取得できないためにループに入ってしまうという問題や、あるタスクがセマフォを取得した状態のまま停止し、このセマフォを他のタスクが取得することができないといった問題が発生しなくなる。
【0027】
図5は、コンピュータ24の動作説明図で、以下この図を用いてコンピュータ24の動作について説明する。
アプリケーション制御部243が、動作中にフラッシュROM25における複数のデータテーブルのうちのデータテーブルDT2に読出アクセスを行うと、このデータテーブルDT2に割り当てられた3つのセマフォS4〜S6の全ての取得が試みられる。
【0028】
3つのセマフォS4〜S6のうち、少なくとも1つ以上のセマフォが取得されると、取得したセマフォの数に応じた使用可能時間が求められ、この使用可能時間とともに取得結果が返される。
次いで、使用可能時間内で取得結果に対応するデータテーブルが読み出され、読出終了後に取得中のセマフォが開放される。このとき、使用可能時間を過ぎてもセマフォが取得状態であれば、取得中のセマフォは強制的に開放される。
【0029】
一方、3つのセマフォS4〜S6のうち、いずれのセマフォも取得されなければ、データテーブルDT2の読出しが禁止される。この後、データテーブルDT2に対する読出アクセスが再度行われる。
以上、第2実施形態によれば、セマフォを取得できないためにループに入ってしまったり、あるタスクがセマフォを取得した状態のまま停止して、このセマフォを他のタスクが取得することができいといった不具合を防止することが可能になる。
【0030】
図6は、本発明の第3実施形態に係るデータテーブルアクセス制御装置内のコンピュータ及びフラッシュROMを示す図で、以下この図を用いて第3実施形態について説明する。
第3実施形態のデータテーブルアクセス制御装置は、第1実施形態と同様に通信インターフェース11を備えている他、第1実施形態とは異なる動作のCPU12及びRAM13により構成されるコンピュータ34と、第1実施形態とは異なる情報、すなわちファームウエア、OSプログラム、APLプログラム及び複数のデータテーブルを記憶しているフラッシュROM35とを備え、図6に示すように、上記ファームウエアは、コンピュータ34をファームウエア制御部141として機能させ、上記OSプログラムは、コンピュータ34をオペレーション制御部342として機能させ、上記APLプログラムは、コンピュータ34をアプリケーション制御部343として機能させる。
【0031】
なお、ファームウエア制御部141は、第1実施形態と同様に動作する。
オペレーション制御部342は、フラッシュROM35における複数のデータテーブルのうち、一のデータテーブル及び少なくとも1つの他のデータテーブルの各々からセマフォを選択し、この選択された複数のセマフォを示す排他制御用のエイリアスを作成する一方、アプリケーション制御部343がそのエイリアスに対応する複数のデータテーブルに対して同時期に読出アクセスを行うと、当該エイリアスにより示される複数のセマフォの全ての取得要求をファームウエア制御部141に行うとともに、このファームウエア制御部141からの取得結果をエイリアス単位でアプリケーション制御部343に返すものである。
【0032】
ここで、上記エイリアスについて図7を用いて説明すると、アプリケーション制御部343による一のタスクがデータテーブルDT1(S,DT2(S,DT5(S14に読出アクセスを行う一方、別のタスクがデータテーブルDT2(S,DT4(S11,DT5(S13に読出アクセスを行うと、オペレーション制御部342は、各データテーブルには3つのセマフォが用意されているので、ファームウエア制御部141からデータテーブルDT1(S,DT2(S,DT5(S14の各セマフォを同時に取得することができるとともに、データテーブルDT2(S,DT4(S11,DT5(S13の各セマフォを同時に取得することができる。このように、各データテーブルに3つのセマフォを割り当てることでマルチタスクが実現される。
【0033】
一方、例えばデータテーブルDT5のセマフォが異なるタスクにより2つ取得されていれば、上記データテーブルDT1(S,DT2(S,DT5(S14及びデータテーブルDT2(S,DT4(S11,DT5(S13のどちらか一方の組しか各セマフォの同時期取得ができない。このように、複数のセマフォを同時期に取得する場合、これらセマフォの全てを取得できないために、取得するまで取得済の他のセマフォを保持したままとなり、これが無限ループに入ってしまう不具合の原因となる。
【0034】
そこで、上記不具合を防止すべく、上記のような状況で読出アクセスが行われる複数のデータテーブルよりなる組を、予め選定して排他制御用のエイリアスA1,A2,…を作成し、エイリアス単位でセマフォの取得が行われるようにしている。すなわち、エイリアスの各セマフォの全てが取得できた場合には読出許可の取得結果が返され、そうでなければ読出禁止の取得結果が返される。
【0035】
なお、上記エイリアスは、アプリケーション制御部343の起動時に複数作成される。
アプリケーション制御部343は、設備に対する種々の制御を行うもので、例えば制御過程でフラッシュROM35における複数のデータテーブルに対して読出アクセスを行い、この読出アクセスに応じてオペレーション制御部342から返される取得結果が、セマフォを取得できた旨の結果(読出許可)であれば読出アクセスに対応するデータテーブルの読出処理を進める一方、そうでなければ待ちに入ってその読出アクセスを再度行うか、或いはこの読出アクセスを後回しにする。
【0036】
次に、コンピュータ34の動作について説明する。
アプリケーション制御部343が、動作中にフラッシュROM35におけるデータテーブルDT1(S,DT2(S,DT5(S14及びデータテーブルDT2(S,DT4(S11,DT5(S13に読出アクセスを行うと、これらの組がそれぞれエイリアスA1,A2に対応するものであるので、これらエイリアスA1,A2の各々についてセマフォの取得が試みられる。
【0037】
エイリアスA1,A2の各々の全てのセマフォが取得できた場合には、データテーブルDT1(S,DT2(S,DT5(S14の各セマフォの取得ができた旨の取得結果が返されるとともに、データテーブルDT2(S,DT4(S11,DT5(S13の各セマフォの取得ができた旨の取得結果が返される。次いで、読出処理が行われた後、全てのセマフォが開放される。
【0038】
エイリアスA1,A2のうち、一方は全てのセマフォが取得でき、他方は全てのセマフォが取得できなかった場合には、一方に対しては全てのセマフォの取得ができた旨の取得結果が返され、また、他方に対しては、いずれのセマフォも取得ができなかった旨の取得結果が返されるとともに、取得中のセマフォがあれば開放される。次いで、一方は読出処理を進めた後に取得した全てのセマフォを開放し、他方はセマフォを取得しないまま、待ちに入ってその読出アクセスを再度行うか、或いはこの読出アクセスを後回しにする。
【0039】
エイリアスA1,A2の各々の全てのセマフォが取得できなかった場合には、双方に対して、いずれのセマフォも取得できなかった旨の取得結果が返されるとともに、取得中のセマフォがあれば開放される。次いで、双方は、セマフォを取得しないまま、待ちに入ってその読出アクセスを再度行うか、或いはこの読出アクセスを後回しにする。
【0040】
以上、第3実施形態によれば、複数のデータテーブルの各セマフォを同時期に取得する場合に、複数のセマフォの全てを取得できないために取得するまで取得した他のセマフォを保持したままとなって生じる不具合を防止することが可能になる。
図8は、本発明の第4実施形態に係るデータテーブルアクセス制御装置内のコンピュータ及びフラッシュROMを示す図で、以下この図を用いて第4実施形態について説明する。
【0041】
第4実施形態のデータテーブルアクセス制御装置は、第1実施形態と同様に通信インターフェース11を備えている他、第1実施形態とは異なる動作のCPU12及びRAM13により構成されるコンピュータ44と、第1実施形態とは異なる情報、すなわちファームウエア、OSプログラム、APLプログラム、アプリケーションインターフェース(API)プログラム及び複数のデータテーブルを記憶しているフラッシュROM45とを備え、図8に示すように、上記ファームウエアは、コンピュータ44をファームウエア制御部141として機能させ、上記OSプログラムは、コンピュータ44をオペレーション制御部442として機能させ、上記APLプログラムは、コンピュータ44をアプリケーション制御部443として機能させ、上記APIプログラムは、コンピュータ44をインターフェース部444として機能させる。
【0042】
なお、ファームウエア制御部141は、第1実施形態と同様に動作する。
オペレーション制御部442は、インターフェース部444から読出アクセスに応じたフラッシュROM45における複数のデータテーブルに対するセマフォの取得要求があると、この取得要求に応じてセマフォの取得要求をファームウエア制御部141に行い、このファームウエア制御部141から取得結果を得てインターフェース部444に返すものである。
【0043】
アプリケーション制御部443は、設備に対する種々の制御を行うもので、例えば制御過程でフラッシュROM45における複数のデータテーブルに対して読出アクセスを行い、この読出アクセスに応じてインターフェース部444から返される取得結果が、セマフォを取得できた旨の結果(読出許可)であれば読出アクセスに対応するデータテーブルの読出処理を進める一方、そうでなければ(読出禁止であれば)待ちに入ってその読出アクセスを再度行うか、或いはこの読出アクセスを後回しにする。
【0044】
インターフェース部444は、フラッシュROM45における複数のデータテーブルのうち、一のデータテーブル及び少なくとも1つの他のデータテーブルに対する読出アクセスが同時期に行われた場合の当該読出アクセス回数の履歴を取るとともに、この履歴の読出アクセス回数が所定回数以上になった各データテーブルのセマフォを選択し、この選択された複数のセマフォを示す排他制御用のエイリアスを作成する一方、アプリケーション制御部443が上記エイリアスに対応する複数のデータテーブルに対して読出アクセスを行うと、当該エイリアスにより示される複数のセマフォの取得要求をオペレーション制御部442に行うとともに、このオペレーション制御部442からの取得結果を当該エイリアス単位でアプリケーション制御部443に返すものである。
【0045】
このように、第4実施形態では、第3実施形態で説明したエイリアスが自動的に生成登録されるようにしている。
図9は、コンピュータ44の概念図で、CPU12及びRAM13がハードウエア(図ではH/W(メモリ))として最下位に位置し、この上にファームウエア制御部141としてのドライバ及びオペレーション制御部442としてのOSが位置し、さらにその上にインターフェース部444としてのAPI及びアプリケーション制御部443としてのAPLが位置している。
【0046】
図10は、コンピュータ44の主要動作を示すフローチャートで、以下この図を用いてコンピュータ44の動作について説明する。
アプリケーション制御部443が、動作中にフラッシュROM45における複数のデータテーブルに対して読出アクセスを行うと、この読出アクセスに対応するタスクが実行される(ST5)。
【0047】
このタスクが実行されると読出アクセスに対応するデータテーブルのセマフォ取得が要求される(ST10)。
このセマフォ取得の要求があると、このセマフォがエイリアスに対応するものであるか否かの確認が行われる(ST15)。
セマフォがエイリアスに対応するものでなければ、ステップST20に進み、そうでなければステップST35に進む(ST15)。
【0048】
ステップST20に進むと(ST15でNO)、読出アクセスが、一のデータテーブル及び少なくとも1つの他のデータテーブルに対する同時期読出アクセス(エイリアス候補)であるか否かの確認が行われ、エイリアス候補でなければ或いはエイリアス候補であっても読出アクセスの回数が所定回数以上でなければステップST25に進む一方、エイリアス候補であって読出アクセスの回数が所定回数以上であればステップST50に進む。
【0049】
ステップST25に進むと、各データテーブルに対するセマフォが個別に取得され、取得されなければ(ST25でNO)、再度取得される。
ステップST25でセマフォが取得されると、このセマフォに対応するデータテーブルの読出処理が実行される(ST30)。
一方、ステップST15でセマフォがエイリアスに対応するものであれば(YES)、当該エイリアス単位でセマフォの取得が試みられる(ST35)。
【0050】
エイリアスの各セマフォの全てが取得されると(ST35でYES)、各セマフォに対応するデータテーブルの読出処理が実行される(ST40)。
エイリアスの各セマフォの全てが取得されなければ(ST35でNO)、取得中のセマフォがあればその開放処理を行った後、ステップST45に進み、待ちに入って同一の読出アクセスを再度行う場合にはステップST10に戻り、読出処理が実行されなかった読出アクセスを後回しにする場合にはステップST5に戻る。
【0051】
一方、ステップST20でエイリアス候補であって読出アクセスの回数が所定回数以上であれば(NO)、当該読出アクセスに対応するデータテーブルの各セマフォがエイリアスとして登録される(ST50)。この後、ステップST35に進む。
以上、第4実施形態によれば、エイリアスを自動的に生成登録することが可能になって、第3実施形態と同様の効果を奏することが可能になる。
【0052】
なお、第4実施形態では、OSプログラム、APLプログラム及びAPIプログラムは、フラッシュROM45に記憶されているが、これに限らず、ハードディスクや光磁気ディスク等の記録媒体或いはICメモリに情報を記憶させる記憶装置を備え、この記憶装置にOSプログラム、APLプログラム及びAPIプログラムを記憶させる構成でもよい。要するに、本発明の記憶手段は、上記記憶装置を具備し、この具備した記憶装置にOSプログラム、APLプログラム及びAPIプログラムを記憶させるものでもよい。なお、第1〜第3実施形態も同様である。
【0053】
また、フャームウエアは、電気的に書換え可能な不揮発性メモリに記憶されてもよく、或いはROMに記憶されてもよい。
【0054】
【発明の効果】
以上のことから明らかなように、上記基本構成によれば、データテーブル更新のためのメモリ交換を不要にすることが可能になるとともに、アプリケーションプログラムが動作中でもデータテーブルを更新することが可能になる。
請求項記載の発明によれば、セマフォを取得できないためにループに入ってしまったり、あるタスクがセマフォを取得した状態のまま停止して、このセマフォを他のタスクが取得することができいといった不具合を防止することが可能になる。
【0055】
請求項記載の発明によれば、複数のデータテーブルの各セマフォを同時期に取得する場合に、複数のセマフォの全てを取得できないために取得するまで取得した他のセマフォを保持したままとなって生じる不具合を防止することが可能になる。
請求項記載の発明によれば、エイリアスを自動的に生成して登録することが可能になり、これにより、複数のデータテーブルの各セマフォを同時期に取得する場合に、複数のセマフォの全てを取得できないために取得するまで取得した他のセマフォを保持したままとなって生じる不具合を防止することが可能になる。
【図面の簡単な説明】
【図1】(a)は、本発明の第1実施形態に係るデータテーブルアクセス制御装置を適用した設備の概略構成図、(b)は各装置内のコンピュータを示す図である。
【図2】データテーブル更新装置から更新対象となる装置のハードウエアのメモリ領域への更新すべきデータテーブルのダウンロードの様子を示す図である。
【図3】コンピュータの動作説明図である。
【図4】本発明の第2実施形態に係るデータテーブルアクセス制御装置内のコンピュータ及びフラッシュROMを示す図である。
【図5】コンピュータの動作説明図である。
【図6】本発明の第3実施形態に係るデータテーブルアクセス制御装置内のコンピュータ及びフラッシュROMを示す図である。
【図7】エイリアスの説明図である。
【図8】本発明の第4実施形態に係るデータテーブルアクセス制御装置内のコンピュータ及びフラッシュROMを示す図である。
【図9】コンピュータの概念図である。
【図10】コンピュータの主要動作を示すフローチャートである。
【符号の説明】
10 データテーブルアクセス制御装置
11 通信インターフェース
12 CPU
13 RAM
14 コンピュータ
15,25,35,45 フラッシュROM
141 ファームウエア制御部
142,242,342,442 オペレーション制御部
243,343,443 アプリケーション制御部
445 インターフェース部
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a data table access control apparatus that controls access to a data table using a semaphore for exclusive control.
[0002]
[Prior art]
Conventionally, as a method for performing exclusive control, a test-and-set (TAS) instruction, a semaphore, or the like is used.
For example, in the semaphore used for the flash ROM, one semaphore is assigned to each device, and in this case, simultaneous reading and writing to the flash ROM is not performed.
[0003]
In addition, a semaphore used for a plurality of data tables (table format data) stored in a memory generally enables writing to the data table when all the semaphores of the data table are acquired, while the data table When one of the semaphores is acquired, the data table can be read.
[0004]
In this type of data table access control method, if a certain task is stopped while acquiring a semaphore, the other task cannot acquire this semaphore.
In addition, when acquiring each semaphore of multiple data tables at the same time, for example, when the last one cannot be acquired, it enters an infinite loop with other semaphores being acquired until this one is acquired. was there.
[0005]
Although not related to the data table access control by the semaphore, Japanese Patent Application Laid-Open No. 8-194621 discloses a download device that shortens the system stop time during firmware update.
[0006]
[Problems to be solved by the invention]
In the case where a facility in which a non-volatile memory for storing a data table and a computer including a main storage device (a readable / writable volatile memory) and a central processing unit (CPU) are installed is installed, In many cases, it is necessary to update the data table in the non-volatile memory to be accessed.
[0007]
In such a case, the nonvolatile memory is normally not rewritable. Therefore, in order to update the data table, it is necessary to replace the nonvolatile memory with one that stores the updated data table.
On the other hand, when the data table is stored in a rewritable nonvolatile memory, the update of the data table can be performed if a so-called application program written to execute a predetermined process is in operation. This operation was executed after being stopped.
[0008]
The present invention has been made in view of the above circumstances, and provides a data table access control apparatus that can eliminate the need for memory replacement for updating a data table and can update the data table even while the application program is operating. The purpose is to provide.
[0009]
[Means for Solving the Problems]
The present invention for solving the above problems includes a communication means for data transmission / reception via a network, a computer constituted by a central processing unit and a main storage device, and an electrically rewritable nonvolatile memory, In addition to storing a plurality of data tables in this non-volatile memory, storage means storing firmware, the firmware causes the computer to function as firmware control means, and the firmware control means When allocating a plurality of semaphores to each of the plurality of data tables, all of the plurality of semaphores allocated to any of the plurality of data tables are acquired via the network for updating the data table. Corresponding to the acquired semaphore against the acquisition partner who acquired all of these semaphores To occupy the data table to be updated that It has a configuration (hereinafter referred to as “basic configuration”). According to this basic configuration, it is not necessary to replace the memory for updating the data table, and the data table can be updated even when the application program is operating. .
[0010]
The invention according to claim 1 is the data table access control device having the above basic configuration. The storage unit stores an application program that causes the computer to function as an application control unit, and an operation system program that causes the computer to function as an operation control unit. The operation control unit includes the application control unit that includes the plurality of data. When a read access is made to the table, as many semaphore acquisition requests as possible with respect to the data table that has undergone the read access are made to the firmware control means, and according to the acquisition results from the firmware control means An available time for the data table that has been accessed for reading is obtained, and both the available time and the acquisition result are returned to the application control means. It is characterized by . According to this configuration, problems such as entering a loop because the semaphore cannot be acquired or stopping while one task has acquired the semaphore and other tasks cannot acquire the semaphore are prevented. Will come to be.
[0011]
The invention according to claim 2 is a data table access control device having the above basic configuration. The storage means stores an application program that causes the computer to function as an application control means, and an operation system program that causes the computer to function as an operation control means. The operation control means includes one of the plurality of data tables. The semaphore is selected from each of the data table and at least one other data table, and an alias for exclusive control indicating the plurality of selected semaphores is created, while the application control means includes a plurality of corresponding semaphores. When read access is made to the data table at the same time, all acquisition requests for the plurality of semaphores indicated by the alias are sent to the firmware control means, and the firmware control means Returning to said application control means obtains the results in the alias unit It is characterized by . According to this configuration, when acquiring each semaphore of a plurality of data tables at the same time, since all of the plurality of semaphores cannot be acquired, there is a problem that the other semaphores acquired until it is acquired are retained. Will be prevented.
[0012]
The invention according to claim 3 is the data table access control device having the above basic configuration. The storage means includes an application program that causes the computer to function as application control means, an operation system program that causes the computer to function as operation control means, and an application interface program that causes the computer to function as interface means to the application control means. Storing, and the interface means takes a history of the number of read accesses when read access to one data table and at least one other data table among the plurality of data tables is performed at the same time, Select a semaphore for each data table whose read access count for this history has exceeded the specified number of times, and an exclusive system that indicates the selected semaphores. When the application control means performs read access to the plurality of data tables corresponding to the alias at the same time, all the acquisition requests for the plurality of semaphores indicated by the alias are processed in the operation. In addition to the control means, the result obtained from the operation control means is returned to the application control means in the alias unit. It is characterized by . According to this configuration, aliases are automatically generated and registered, and when acquiring each semaphore of a plurality of data tables at the same time, it is impossible to acquire all of the plurality of semaphores until acquisition Problems caused by holding other acquired semaphores are prevented.
[0013]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1A is a schematic configuration diagram of equipment to which the data table access control device according to the first embodiment of the present invention is applied, FIG. 1B is a diagram showing a computer in each device, and FIG. FIG. 3 is a diagram showing a state of downloading a data table to be updated from a table update device to a hardware memory area of a device to be updated. The first embodiment will be described below with reference to these drawings.
[0014]
As shown in FIG. 1A, this equipment is configured by connecting a plurality of devices T to each other via a network NW, and each device T performs access control to a data table described later and performs predetermined control. The data table access control apparatus 10 to be performed is incorporated. The predetermined control is set for the equipment, and the description thereof is omitted here.
[0015]
The data table access control device 10 includes a communication interface (communication means) 11 for data transmission / reception via a network NW, a computer 14 including a CPU 12 and a RAM (main storage device) 13, a firmware, an operation system (OS ) And a flash ROM (storage means, nonvolatile memory) 15 storing a program and a plurality of data tables. As shown in FIG. 1B, the firmware includes a computer 14 and a firmware control unit 141. On the other hand, the OS program causes the computer 14 to function as the operation control unit 142. Needless to say, a plurality of flash ROMs 15 may be provided on a chip basis.
[0016]
The firmware control unit 141 assigns three semaphores to each of the plurality of data tables in the flash ROM 15, while all three semaphores assigned to any of the plurality of data tables use the network NW for updating the data table. The data table update device (acquisition partner) 1 that has acquired all of these three semaphores (see FIG. 2) occupies the data table to be updated corresponding to the acquired semaphore. It is.
[0017]
Further, when the firmware control unit 141 receives a semaphore acquisition of the data table corresponding to the read access from the operation control unit 142, the firmware control unit 141 acquires the semaphore in response to the request and can acquire at least one semaphore. Return an acquisition result indicating permission to read the data table of the acquired semaphore, otherwise return an acquisition result indicating read prohibition.
[0018]
The operation control unit 142 controls the entire apparatus T. When receiving an update request for one of a plurality of data tables in the flash ROM 15 from the data table update apparatus 1 via the network NW, for example, The firmware control unit 141 sends an acquisition request for all the three semaphores assigned to the data table, and receives the acquisition result from the firmware control unit 141, and if all three semaphores can be acquired, the update Download the data table and proceed with the process to update the data table to be updated corresponding to the acquired semaphore. After the update, release the semaphore being acquired. If all three semaphores cannot be acquired, the update request is made. On the other hand, it cannot be updated. If the update is impossible, the data table update device 1 makes the same update request again.
[0019]
FIG. 3 is an explanatory diagram of the operation of the computer 14, and the operation of the computer 14 will be described below with reference to this figure.
When an update request for the data table DT2 among the plurality of data tables in the flash ROM 15 is received from the data table update device 1, acquisition of all three semaphores S4 to S6 assigned to the data table DT2 is attempted.
[0020]
When all of the semaphores S4 to S6 are acquired, the data table DT2 corresponding to these three semaphores is occupied by the data table update device 1, and reading by other tasks is prohibited. Thus, since the use of the data table to be updated is prohibited, for example, the update can be performed even when the application program is operating.
[0021]
Next, the update data table DT2 ′ is downloaded (FIG. 2), and the data table DT2 to be updated is updated with the downloaded data table DT2 ′. Thereafter, semaphores S4 to S6 are opened.
On the other hand, if all of the semaphores S4 to S6 are not acquired, this is returned to the data table update device 1, and the data table DT2 to be updated is not updated. At this time, if there is a semaphore being acquired, it is immediately released.
[0022]
As described above, according to the first embodiment, it is possible to eliminate memory exchange for updating the data table, and it is possible to update the data table even when the application program is operating.
FIG. 4 is a diagram showing a computer and a flash ROM in the data table access control apparatus according to the second embodiment of the present invention. Hereinafter, the second embodiment will be described with reference to this figure.
[0023]
The data table access control apparatus according to the second embodiment includes the communication interface 11 as in the first embodiment, a computer 24 including a CPU 12 and a RAM 13 that operate differently from the first embodiment, And a flash ROM 25 that stores information different from the embodiment, that is, firmware, OS program, application (APL) program, and a plurality of data tables. As shown in FIG. The OS program causes the computer 24 to function as the operation control unit 242, and the APL program causes the computer 24 to function as the application control unit 243.
[0024]
The firmware control unit 141 operates in the same manner as in the first embodiment.
When the application control unit 243 performs read access to a plurality of data tables in the flash ROM 25, the operation control unit 242 sends as many semaphore acquisition requests as possible to the data table having the read access. In accordance with the acquisition result from the firmware control unit 141, an available time for the data table that has been read-accessed is obtained, and both the available time and the acquisition result are returned to the application control unit 243. .
[0025]
The usable time is the maximum usable time, and is set to be longer according to the number of acquired semaphores. If the semaphore cannot be acquired, the usable time is set to zero.
The application control unit 243 performs various controls on the facility. For example, the application control unit 243 performs read access to a plurality of data tables in the flash ROM 25 in the control process, and can be returned from the operation control unit 242 according to the read access. When the time and the acquisition result are received and the received usable time is not zero, the data table corresponding to the acquisition result is read within the usable time, and the semaphore being acquired is released after the reading process is completed.
[0026]
At this time, the application control unit 243 forcibly releases the semaphore being acquired because the task is considered to have stopped if the semaphore is in the acquisition state even after the usable time has elapsed.
As a result, there is no problem that a semaphore cannot be acquired and the program enters a loop, or that a task is stopped in a state where the semaphore has been acquired, and that this semaphore cannot be acquired by another task.
[0027]
FIG. 5 is a diagram for explaining the operation of the computer 24. Hereinafter, the operation of the computer 24 will be described with reference to FIG.
When the application control unit 243 performs read access to the data table DT2 among the plurality of data tables in the flash ROM 25 during operation, all of the three semaphores S4 to S6 assigned to the data table DT2 are attempted to be acquired. .
[0028]
When at least one semaphore is acquired from the three semaphores S4 to S6, the available time corresponding to the acquired number of semaphores is obtained, and the acquisition result is returned together with the available time.
Next, the data table corresponding to the acquisition result is read within the usable time, and the semaphore being acquired is released after the reading is completed. At this time, if the semaphore is in the acquisition state even after the usable time has elapsed, the semaphore being acquired is forcibly released.
[0029]
On the other hand, if none of the three semaphores S4 to S6 is acquired, reading of the data table DT2 is prohibited. Thereafter, read access to the data table DT2 is performed again.
As described above, according to the second embodiment, since a semaphore cannot be acquired, a loop is entered, or a task stops while the semaphore is acquired, and another task cannot acquire this semaphore. Such a problem can be prevented.
[0030]
FIG. 6 is a diagram showing a computer and a flash ROM in a data table access control apparatus according to the third embodiment of the present invention. Hereinafter, the third embodiment will be described with reference to FIG.
The data table access control apparatus according to the third embodiment includes a communication interface 11 as in the first embodiment, a computer 34 including a CPU 12 and a RAM 13 that operate differently from the first embodiment, A flash ROM 35 storing information different from the embodiment, that is, firmware, OS program, APL program, and a plurality of data tables, as shown in FIG. 6, the firmware controls the computer 34 by firmware control. The OS program causes the computer 34 to function as the operation control unit 342, and the APL program causes the computer 34 to function as the application control unit 343.
[0031]
The firmware control unit 141 operates in the same manner as in the first embodiment.
The operation control unit 342 selects a semaphore from each of one data table and at least one other data table among a plurality of data tables in the flash ROM 35, and an exclusive control alias indicating the selected plurality of semaphores. When the application control unit 343 performs read access to a plurality of data tables corresponding to the alias at the same time, the firmware control unit 141 sends all acquisition requests for the plurality of semaphores indicated by the alias. In addition, the acquisition result from the firmware control unit 141 is returned to the application control unit 343 in alias units.
[0032]
Here, the alias will be described with reference to FIG. 7. One task by the application control unit 343 is the data table DT. 1 (S 2 ) , DT 2 (S 4 ) , DT 5 (S 14 ) Read access to the data table DT 2 (S 6 ) , DT 4 (S 11 ) , DT 5 (S 13 ) When the read access is performed, the operation control unit 342 has three semaphores prepared for each data table, so that the data table DT is received from the firmware control unit 141. 1 (S 2 ) , DT 2 (S 4 ) , DT 5 (S 14 ) Semaphores can be acquired simultaneously and the data table DT 2 (S 6 ) , DT 4 (S 11 ) , DT 5 (S 13 ) Each semaphore can be acquired at the same time. Thus, multitasking is realized by assigning three semaphores to each data table.
[0033]
On the other hand, for example, the semaphore of the data table DT5 is Different If two are acquired by the task, the data table DT 1 (S 2 ) , DT 2 (S 4 ) , DT 5 (S 14 ) And data table DT 2 (S 6 ) , DT 4 (S 11 ) , DT 5 (S 13 ) Only one of these groups can acquire each semaphore at the same time. In this way, when acquiring multiple semaphores at the same time, since all of these semaphores cannot be acquired, other acquired semaphores are held until acquisition and this causes an infinite loop. It becomes.
[0034]
Therefore, in order to prevent the above problem, a group consisting of a plurality of data tables to be read-accessed in the above situation is selected in advance to create exclusive control aliases A1, A2,. The semaphore is acquired. That is, when all of the alias semaphores can be acquired, a read permission acquisition result is returned, otherwise a read prohibition acquisition result is returned.
[0035]
Note that a plurality of aliases are created when the application control unit 343 is activated.
The application control unit 343 performs various controls on the facility. For example, the application control unit 343 performs read access to a plurality of data tables in the flash ROM 35 in the control process, and an acquisition result returned from the operation control unit 342 in response to the read access. If the result indicates that the semaphore has been acquired (read permission), the data table corresponding to the read access is read. Otherwise, the process waits and the read access is performed again, or this read access is performed. Defer access.
[0036]
Next, the operation of the computer 34 will be described.
The application control unit 343 operates the data table DT in the flash ROM 35 during operation. 1 (S 2 ) , DT 2 (S 4 ) , DT 5 (S 14 ) And data table DT 2 (S 6 ) , DT 4 (S 11 ) , DT 5 (S 13 ) When the read access is made to these, these sets correspond to the aliases A1 and A2, respectively, and therefore an attempt is made to acquire a semaphore for each of these aliases A1 and A2.
[0037]
If all the semaphores of the aliases A1 and A2 can be acquired, the data table DT 1 (S 2 ) , DT 2 (S 4 ) , DT 5 (S 14 ) An acquisition result indicating that each of the semaphores of the data has been acquired is returned, and the data table DT 2 (S 6 ) , DT 4 (S 11 ) , DT 5 (S 13 ) An acquisition result indicating that each semaphore of can be acquired is returned. Next, after the reading process is performed, all semaphores are released.
[0038]
If one of aliases A1 and A2 can acquire all semaphores and the other cannot acquire all semaphores, an acquisition result indicating that all semaphores have been acquired is returned to one. In addition, an acquisition result indicating that no semaphore could be acquired is returned to the other, and if there is a semaphore being acquired, it is released. Then, one releases all the semaphores acquired after the read processing is advanced, and the other waits for the read access again without acquiring the semaphore, or delays the read access.
[0039]
If all semaphores of aliases A1 and A2 cannot be acquired, an acquisition result indicating that neither semaphore could be acquired is returned to both, and if there is a semaphore being acquired, it is released. The Both parties then wait and do the read access again without acquiring the semaphore, or postpone the read access.
[0040]
As described above, according to the third embodiment, when acquiring each semaphore of a plurality of data tables at the same time, since all of the plurality of semaphores cannot be acquired, other acquired semaphores are held. Can be prevented.
FIG. 8 is a diagram showing a computer and a flash ROM in the data table access control apparatus according to the fourth embodiment of the present invention. Hereinafter, the fourth embodiment will be described with reference to FIG.
[0041]
The data table access control apparatus according to the fourth embodiment includes the communication interface 11 as in the first embodiment, a computer 44 including the CPU 12 and the RAM 13 that operate differently from the first embodiment, and the first A flash ROM 45 storing information different from the embodiment, that is, firmware, OS program, APL program, application interface (API) program, and a plurality of data tables, as shown in FIG. The computer 44 functions as the firmware control unit 141, the OS program causes the computer 44 to function as the operation control unit 442, and the APL program functions as the application control unit 443. The API program causes a computer to function 44 as an interface unit 444.
[0042]
The firmware control unit 141 operates in the same manner as in the first embodiment.
When there is a semaphore acquisition request for a plurality of data tables in the flash ROM 45 according to read access from the interface unit 444, the operation control unit 442 sends a semaphore acquisition request to the firmware control unit 141 in response to the acquisition request. An acquisition result is obtained from the firmware control unit 141 and returned to the interface unit 444.
[0043]
The application control unit 443 performs various controls on the facility. For example, the application control unit 443 performs a read access to a plurality of data tables in the flash ROM 45 in the control process, and an acquisition result returned from the interface unit 444 in response to the read access. If the result indicates that the semaphore has been acquired (read permission), the data table corresponding to the read access is read. If not (if read is prohibited), the process waits and the read access is re-executed. Or do this read access later.
[0044]
The interface unit 444 takes a history of the number of read accesses when a read access to one data table and at least one other data table among the plurality of data tables in the flash ROM 45 is performed at the same time. While selecting the semaphore of each data table in which the number of read access times of the history is equal to or greater than the predetermined number, and creating an exclusive control alias indicating the selected semaphores, the application control unit 443 corresponds to the alias. When read access is made to a plurality of data tables, an acquisition request for a plurality of semaphores indicated by the alias is sent to the operation control unit 442, and the acquisition result from the operation control unit 442 is applied to the application control unit for the alias. It is intended to be returned to the department 443.
[0045]
Thus, in the fourth embodiment, the alias described in the third embodiment is automatically generated and registered.
FIG. 9 is a conceptual diagram of the computer 44. The CPU 12 and the RAM 13 are positioned at the lowest level as hardware (H / W (memory) in the figure), and a driver and operation control unit 442 serving as the firmware control unit 141 thereon. And an API serving as the interface unit 444 and an APL serving as the application control unit 443 are further disposed thereon.
[0046]
FIG. 10 is a flowchart showing the main operation of the computer 44. The operation of the computer 44 will be described below with reference to this figure.
When application control unit 443 performs read access to a plurality of data tables in flash ROM 45 during operation, a task corresponding to the read access is executed (ST5).
[0047]
When this task is executed, semaphore acquisition of the data table corresponding to the read access is requested (ST10).
When this semaphore acquisition request is made, it is confirmed whether or not this semaphore corresponds to an alias (ST15).
If the semaphore does not correspond to an alias, the process proceeds to step ST20, and if not, the process proceeds to step ST35 (ST15).
[0048]
When the process proceeds to step ST20 (NO in ST15), it is confirmed whether or not the read access is a simultaneous read access (alias candidate) for one data table and at least one other data table. Otherwise, even if it is an alias candidate, if the number of read accesses is not equal to or greater than the predetermined number, the process proceeds to step ST25.
[0049]
In step ST25, semaphores for each data table are individually acquired. If not acquired (NO in ST25), they are acquired again.
When a semaphore is acquired in step ST25, a data table reading process corresponding to this semaphore is executed (ST30).
On the other hand, if the semaphore corresponds to an alias in step ST15 (YES), acquisition of the semaphore is tried in units of the alias (ST35).
[0050]
When all the alias semaphores are acquired (YES in ST35), the data table reading process corresponding to each semaphore is executed (ST40).
If all of the alias semaphores are not acquired (NO in ST35), if there is a semaphore being acquired, release processing is performed, and then the process proceeds to step ST45, where the same read access is performed again after waiting. Returns to step ST10, and returns to step ST5 when the read access for which the read process has not been executed is postponed.
[0051]
On the other hand, if it is an alias candidate in step ST20 and the number of read accesses is equal to or greater than the predetermined number (NO), each semaphore of the data table corresponding to the read access is registered as an alias (ST50). After this, the process proceeds to step ST35.
As described above, according to the fourth embodiment, aliases can be automatically generated and registered, and the same effects as in the third embodiment can be achieved.
[0052]
In the fourth embodiment, the OS program, the APL program, and the API program are stored in the flash ROM 45. However, the present invention is not limited to this, and a storage medium that stores information in a recording medium such as a hard disk or a magneto-optical disk, or an IC memory. An apparatus may be provided, and an OS program, an APL program, and an API program may be stored in the storage device. In short, the storage means of the present invention may include the above-described storage device and store the OS program, APL program, and API program in the storage device provided. The same applies to the first to third embodiments.
[0053]
Further, the firmware may be stored in an electrically rewritable nonvolatile memory, or may be stored in a ROM.
[0054]
【The invention's effect】
As is clear from the above, Basic configuration Accordingly, it is possible to eliminate the need for memory exchange for updating the data table, and it is possible to update the data table even while the application program is operating.
Claim 1 According to the described invention, there is a problem that a semaphore cannot be acquired and enters a loop, or a task is stopped while acquiring a semaphore, and another task cannot acquire this semaphore. It becomes possible to prevent.
[0055]
Claim 2 According to the described invention, when acquiring each semaphore of a plurality of data tables at the same time, it is impossible to acquire all of the plurality of semaphores, so that the other semaphores acquired until acquisition are retained Can be prevented.
Claim 3 According to the described invention, it is possible to automatically generate and register an alias, and when acquiring each semaphore of a plurality of data tables at the same time, it is not possible to acquire all of the plurality of semaphores. For this reason, it is possible to prevent a problem caused by holding another semaphore acquired until it is acquired.
[Brief description of the drawings]
FIG. 1A is a schematic configuration diagram of equipment to which a data table access control device according to a first embodiment of the present invention is applied, and FIG. 1B is a diagram showing a computer in each device.
FIG. 2 is a diagram illustrating a state in which a data table to be updated is downloaded from a data table update device to a hardware memory area of a device to be updated.
FIG. 3 is a diagram illustrating the operation of a computer.
FIG. 4 is a diagram showing a computer and a flash ROM in a data table access control apparatus according to a second embodiment of the present invention.
FIG. 5 is a diagram illustrating the operation of a computer.
FIG. 6 is a diagram showing a computer and a flash ROM in a data table access control apparatus according to a third embodiment of the present invention.
FIG. 7 is an explanatory diagram of aliases.
FIG. 8 is a diagram showing a computer and a flash ROM in a data table access control apparatus according to a fourth embodiment of the present invention.
FIG. 9 is a conceptual diagram of a computer.
FIG. 10 is a flowchart showing main operations of the computer.
[Explanation of symbols]
10 Data table access control device
11 Communication interface
12 CPU
13 RAM
14 Computer
15, 25, 35, 45 Flash ROM
141 Firmware control unit
142, 242, 342, 442 Operation control unit
243, 343, 443 Application control unit
445 interface part

Claims (3)

ネットワークを介したデータ送受信用の通信手段と、
中央処理装置及び主記憶装置により構成されるコンピュータと、
電気的に書換え可能な不揮発性メモリを有し、この不揮発性メモリで複数のデータテーブルを記憶している他、ファームウエアを記憶している記憶手段と
を備え、
前記ファームウエアは、前記コンピュータをファームウエア制御手段として機能させ、このファームウエア制御手段は、前記複数のデータテーブルの各々に複数のセマフォを割り当てる一方、前記複数のデータテーブルのいずれかに割り当てられた複数のセマフォの全てが当該データテーブル更新用に前記ネットワークを介して取得されると、これらセマフォの全てを取得した取得相手に対して、取得されたセマフォに対応する更新すべきデータテーブルを占有させる
データテーブルアクセス制御装置において、
前記記憶手段は、前記コンピュータをアプリケーション制御手段として機能させるアプリケーションプログラムと、前記コンピュータをオペレーション制御手段として機能させるオペレーションシステムプログラムとを記憶し、
前記オペレーション制御手段は、前記アプリケーション制御手段が前記複数のデータテーブルに対して読出アクセスを行うと、この読出アクセスのあったデータテーブルに対する可能な限り多くのセマフォの取得要求を前記ファームウエア制御手段に行うとともに、このファームウエア制御手段からの取得結果に応じて前記読出アクセスのあったデータテーブルに対する使用可能時間を求め、この使用可能時間及び前記取得結果の双方を前記アプリケーション制御手段に返す
ことを特徴とするデータテーブルアクセス制御装置。
A communication means for data transmission / reception via a network;
A computer comprising a central processing unit and a main storage device;
In addition to storing an electrically rewritable nonvolatile memory and storing a plurality of data tables in the nonvolatile memory, the storage device stores firmware.
The firmware causes the computer to function as firmware control means, and the firmware control means assigns a plurality of semaphores to each of the plurality of data tables, while being assigned to one of the plurality of data tables. When all of the plurality of semaphores are acquired via the network for updating the data table, the acquisition partner that acquired all of the semaphores occupies the data table to be updated corresponding to the acquired semaphore.
In the data table access control device,
The storage means stores an application program that causes the computer to function as application control means, and an operation system program that causes the computer to function as operation control means.
When the application control unit performs a read access to the plurality of data tables, the operation control unit sends as many semaphore acquisition requests as possible to the data table having the read access to the firmware control unit. And a usable time for the data table that has been read-accessed is obtained according to an acquisition result from the firmware control means, and both the usable time and the acquisition result are returned to the application control means. A data table access control device.
ネットワークを介したデータ送受信用の通信手段と、
中央処理装置及び主記憶装置により構成されるコンピュータと、
電気的に書換え可能な不揮発性メモリを有し、この不揮発性メモリで複数のデータテーブルを記憶している他、ファームウエアを記憶している記憶手段と
を備え、
前記ファームウエアは、前記コンピュータをファームウエア制御手段として機能させ、このファームウエア制御手段は、前記複数のデータテーブルの各々に複数のセマフォを割り当てる一方、前記複数のデータテーブルのいずれかに割り当てられた複数のセマフォの全てが当該データテーブル更新用に前記ネットワークを介して取得されると、これらセマフォの全てを取得した取得相手に対して、取得されたセマフォに対応する更新すべきデータテーブルを占有させる
データテーブルアクセス制御装置において、
前記記憶手段は、前記コンピュータをアプリケーション制御手段として機能させるアプリケーションプログラムと、前記コンピュータをオペレーション制御手段として機能させるオペレーションシステムプログラムとを記憶し、
前記オペレーション制御手段は、前記複数のデータテーブルのうち、一のデータテーブル及び少なくとも1つの他のデータテーブルの各々からセマフォを選択し、この選択された複数のセマフォを示す排他制御用のエイリアスを作成する一方、前記アプリケーション制御手段が前記エイリアスに対応する複数のデータテーブルに対して同時期に読出アクセスを行うと、当該エイリアスにより示される複数のセマフォの全ての取得要求を前記ファームウエア制御手段に行うとともに、このファームウエア制御手段からの取得結果を当該エイリアス単位で前記アプリケーション制御手段に返す
ことを特徴とするデータテーブルアクセス制御装置。
A communication means for data transmission / reception via a network;
A computer comprising a central processing unit and a main storage device;
A non-volatile memory that is electrically rewritable, a plurality of data tables stored in the non-volatile memory, and storage means for storing firmware
With
The firmware causes the computer to function as firmware control means, and the firmware control means assigns a plurality of semaphores to each of the plurality of data tables, while being assigned to one of the plurality of data tables. When all of the plurality of semaphores are acquired via the network for updating the data table, the acquisition partner that acquired all of the semaphores occupies the data table to be updated corresponding to the acquired semaphore.
In the data table access control device,
The storage means stores an application program that causes the computer to function as application control means, and an operation system program that causes the computer to function as operation control means.
The operation control means selects a semaphore from each of the one data table and at least one other data table out of the plurality of data tables, and creates an exclusive control alias indicating the selected plurality of semaphores. On the other hand, when the application control unit makes a read access to the plurality of data tables corresponding to the alias at the same time, the firmware control unit issues all acquisition requests for the plurality of semaphores indicated by the alias. together, the firmware control means obtains a result the characteristics and to Lud over data table access controller to return to the application control unit in the alias unit from.
ネットワークを介したデータ送受信用の通信手段と、
中央処理装置及び主記憶装置により構成されるコンピュータと、
電気的に書換え可能な不揮発性メモリを有し、この不揮発性メモリで複数のデータテーブルを記憶している他、ファームウエアを記憶している記憶手段と
を備え、
前記ファームウエアは、前記コンピュータをファームウエア制御手段として機能させ、このファームウエア制御手段は、前記複数のデータテーブルの各々に複数のセマフォを割り当てる一方、前記複数のデータテーブルのいずれかに割り当てられた複数のセマフォの全てが当該データテーブル更新用に前記ネットワークを介して取得されると、これらセマフォの全てを取得した取得相手に対して、取得されたセマフォに対応する更新すべきデータテーブルを占有させる
データテーブルアクセス制御装置において、
前記記憶手段は、前記コンピュータをアプリケーション制御手段として機能させるアプリケーションプログラムと、前記コンピュータをオペレーション制御手段として機能させるオペレーションシステムプログラムと、前記コンピュータを前記アプリケーション制御手段に対するインターフェース手段として機能させるアプリケーションインターフェースプログラムとを記憶し、
前記インターフェース手段は、前記複数のデータテーブルのうち、一のデータテーブル及び少なくとも1つの他のデータテーブルに対する読出アクセスが同時期に行われた場合の当該読出アクセス回数の履歴を取るとともに、この履歴の読出アクセス回数が所定回数以上になった各データテーブルのセマフォを選択し、この選択された複数のセマフォを示す排他制御用のエイリアスを作成する一方、前記アプリケーション制御手段が前記エイリアスに対応する複数のデータテーブルに対して同時期に読出アクセスを行うと、当該エイリアスにより示される複数のセマフォの全ての取得要求を前記オペレーション制御手段に行うとともに、このオペレーション制御手段からの取得結果を当該エイリアス単位でアプリケーション制御手段に返す
ことを特徴とするデータテーブルアクセス制御装置
A communication means for data transmission / reception via a network;
A computer comprising a central processing unit and a main storage device;
A non-volatile memory that is electrically rewritable, a plurality of data tables stored in the non-volatile memory, and storage means for storing firmware
With
The firmware causes the computer to function as firmware control means, and the firmware control means assigns a plurality of semaphores to each of the plurality of data tables, while being assigned to one of the plurality of data tables. When all of the plurality of semaphores are acquired via the network for updating the data table, the acquisition partner that acquired all of the semaphores occupies the data table to be updated corresponding to the acquired semaphore.
In the data table access control device,
The storage means includes an application program that causes the computer to function as application control means, an operation system program that causes the computer to function as operation control means, and an application interface program that causes the computer to function as interface means to the application control means. Remember,
The interface means takes a history of the number of read accesses when a read access to one data table and at least one other data table among the plurality of data tables is performed at the same time. While selecting the semaphore of each data table in which the number of read accesses is equal to or greater than the predetermined number of times, and creating an exclusive control alias indicating the plurality of selected semaphores, the application control means has a plurality of corresponding semaphores. When read access is made to the data table at the same time, all the acquisition requests for the plurality of semaphores indicated by the alias are sent to the operation control means, and the acquisition results from the operation control means are applied to the application in the alias unit. Return to control DOO features and to Lud over data table access control device.
JP04842198A 1998-02-27 1998-02-27 Data table access controller Expired - Lifetime JP3978848B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP04842198A JP3978848B2 (en) 1998-02-27 1998-02-27 Data table access controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP04842198A JP3978848B2 (en) 1998-02-27 1998-02-27 Data table access controller

Publications (2)

Publication Number Publication Date
JPH11249953A JPH11249953A (en) 1999-09-17
JP3978848B2 true JP3978848B2 (en) 2007-09-19

Family

ID=12802868

Family Applications (1)

Application Number Title Priority Date Filing Date
JP04842198A Expired - Lifetime JP3978848B2 (en) 1998-02-27 1998-02-27 Data table access controller

Country Status (1)

Country Link
JP (1) JP3978848B2 (en)

Also Published As

Publication number Publication date
JPH11249953A (en) 1999-09-17

Similar Documents

Publication Publication Date Title
US5502840A (en) Method and apparatus for advising a requesting process of a contention scheme to employ to access a shared resource
US5987550A (en) Lock mechanism for shared resources in a data processing system
US5978839A (en) Data sharing method in a plurality of computer systems
US5649157A (en) Memory controller with priority queues
EP0533805A4 (en) Method for efficient non-virtual main memory management
JPH0962558A (en) Method and system for database management
US6473842B1 (en) Virtual memory managing system for managing swap-outs by page units and a batch swap-out by task units
US20040098542A1 (en) Storage system
JP2007122664A (en) Information processing method and information processor
JP4407956B2 (en) Information processing method and information processing apparatus
US7574562B2 (en) Latency-aware thread scheduling in non-uniform cache architecture systems
US6594733B1 (en) Cache based vector coherency methods and mechanisms for tracking and managing data use in a multiprocessor system
US20050216461A1 (en) Bypassing native storage operations by communicating protected data within locking messages using a lock manager independent of the storage mechanism
US6032240A (en) Bypassing a nonpaged pool controller when accessing a remainder portion of a random access memory
US7627734B2 (en) Virtual on-chip memory
JP3978848B2 (en) Data table access controller
JP3965784B2 (en) Shared memory exclusive access control method
US6574718B2 (en) Excessive spin detection and avoidance for systems using a least recently used page replacement algorithm
JPH08129492A (en) Resource exclusion checking system and resource exclusion checking method
CN109308167A (en) Track the write request for media controller
US20060168413A1 (en) Method for regulating access to data in at least one data storage device in a system consisting of several individual systems
JPH09223032A (en) Resources lock control mechanism
US5761738A (en) Computer system which stores management or control information in different address space but same offset as corresponding data
JPH09305418A (en) Shared memory managing system
JPH07152651A (en) Method and device for information processing

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041213

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061215

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061219

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070219

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070605

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070618

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100706

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100706

Year of fee payment: 3

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100706

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350