JPH08272492A - Data processor - Google Patents

Data processor

Info

Publication number
JPH08272492A
JPH08272492A JP7076827A JP7682795A JPH08272492A JP H08272492 A JPH08272492 A JP H08272492A JP 7076827 A JP7076827 A JP 7076827A JP 7682795 A JP7682795 A JP 7682795A JP H08272492 A JPH08272492 A JP H08272492A
Authority
JP
Japan
Prior art keywords
file
file descriptor
data processing
power failure
device control
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.)
Granted
Application number
JP7076827A
Other languages
Japanese (ja)
Other versions
JP3051043B2 (en
Inventor
Masahide Ogawa
昌秀 小川
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.)
TEC CORP
Original Assignee
TEC CORP
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TEC CORP filed Critical TEC CORP
Priority to JP7076827A priority Critical patent/JP3051043B2/en
Publication of JPH08272492A publication Critical patent/JPH08272492A/en
Application granted granted Critical
Publication of JP3051043B2 publication Critical patent/JP3051043B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE: To shorten the time needed for the reoperation of a data processor by reconstructing a device control program with no intervention of an application program after a service interruption is recovered. CONSTITUTION: A file descriptor conversion table of a data processing body part 1 stores a file of device control programs loaded at a device control part 2 with correspondence secured between a file descriptor managed by an application program and a file descriptor managed by a device driver. If the system of the device driver is called by the application program after a service interruption is recovered, the file descriptor managed by the application program is converted into the file descriptor managed by the device driver based on the file descriptor conversion table. Then the system of the device driver is called with the converted file descriptor used as a parameter. In an error return mode, the file of device control programs is automatically opened with no intervention of the application program. Then the system of the device driver is called again.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、パーソナルコンピュー
タ,POS(point of sales:販売時点情報管理)端末
等の停電復帰機能を有するデータ処理装置に関わり、特
に、デバイス制御部としてCPU(central processing
unit :中央処理装置)及びメモリを実装したインテリ
ジェント型のプリント基板を使用したデータ処理装置に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing device having a power failure recovery function such as a personal computer and a POS (point of sales) terminal, and more particularly to a CPU (central processing) as a device control unit.
unit: central processing unit) and a data processing unit using an intelligent printed circuit board mounted with a memory.

【0002】[0002]

【従来の技術】例えば商店等で使用されるPOS端末の
制御部は、CPU,ROM(read only memory)及びR
AM(random access memory)等で構成されるデータ処
理本体部と、回線接続された上位局との間で行われるデ
ータの送受信を制御する通信コントローラ,キーボード
からのキー信号を取込むキーボードコントローラ,表示
部の表示動作を制御する表示コントローラ及びプリンタ
の印字動作を制御するプリンタコントローラ等のデバイ
ス制御部とをバスラインにより接続して構成されてい
る。
2. Description of the Related Art For example, a control unit of a POS terminal used in a store or the like includes a CPU, a ROM (read only memory) and an R.
Communication controller for controlling data transmission / reception between the data processing main unit composed of AM (random access memory) etc. and the upper station connected to the line, keyboard controller for fetching key signals from the keyboard, display A display controller that controls the display operation of the printer and a device controller such as a printer controller that controls the printing operation of the printer are connected by a bus line.

【0003】また、このPOS端末は、一般的に、停電
の検知により電源を自動的に商用電源から補助電源に切
替える無停電電源装置を備え、停電中は補助電源からの
給電により停電前のメモリやレジスタの状態を維持し
て、停電復帰時には停電前の状態から処理を継続できる
ようになっている。このような機能を停電復帰機能と称
する。
Further, this POS terminal is generally equipped with an uninterruptible power supply device that automatically switches the power supply from a commercial power supply to an auxiliary power supply upon detection of a power failure, and during the power failure, the memory before the power failure is supplied by the power supply from the auxiliary power supply. The state of registers and registers can be maintained and processing can be continued from the state before the power failure when the power is restored. Such a function is called a power failure recovery function.

【0004】ところで、上記POS端末のように、デー
タ処理本体部とデバイス制御部とをバスラインにより接
続してなる停電復帰機能を備えたデータ処理装置におい
ては、デバイス制御部としてCPU及びメモリを実装し
たインテリジェント型のプリント基板を用いることがあ
る。このようなデータ処理装置の場合、データ処理本体
部のCPU、いわゆるメインCPUは、電源投入時にオ
ペレーティングシステムの実行により所定のデバイス制
御用プログラムをデバイス制御部のメモリにロードす
る。そして、アプリケーションプログラムの実行により
データの入出力が必要になると、アプリケーションプロ
グラムがオペレーティングシステムに組み込まれている
デバイスドライバをシステムコールして該当するデバイ
ス制御部を制御し、データを入出力処理するように構成
されていた。
By the way, in a data processing device having a power failure recovery function in which a data processing main unit and a device control unit are connected by a bus line like the POS terminal, a CPU and a memory are mounted as a device control unit. The intelligent printed circuit board may be used. In the case of such a data processing device, the CPU of the data processing main unit, so-called main CPU, loads a predetermined device control program into the memory of the device control unit by executing the operating system when the power is turned on. Then, when the input / output of data is required by the execution of the application program, the application program performs a system call to the device driver incorporated in the operating system to control the corresponding device control unit to process the input / output of data. Was configured.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、このイ
ンテリジェント型のプリント基板により構成されるデバ
イス制御部は、データ処理本体部とバス接続されている
だけであるため、専用のハードウェアを備えない限り無
停電電源装置からの補助電源の供給を受けることができ
なかった。このため、データ処理本体部は、停電復帰直
後においても、電源投入時と同様にデバイス制御部を初
期化してそのメモリにデバイス制御用プログラムを再ロ
ードしている。従って、停電復帰直後は、デバイス制御
用プログラムのファイルがクローズ状態となり、停電復
帰後、継続されたアプリケーションプログラムの処理に
よりデバイスドライバをシステムコールしてもエラーリ
ターンとなる。このとき、大抵のアプリケーションプロ
グラムはエラーリトライを数回繰り返した後、デバイス
制御用プログラムのファイルのオープンを指令していた
ので、停電復帰後の再稼働に時間を要する等の問題を生
じていた。
However, since the device control unit composed of this intelligent type printed circuit board is only connected to the data processing main unit by a bus, it does not exist unless dedicated hardware is provided. The auxiliary power supply from the power failure power supply could not be received. Therefore, the data processing main unit initializes the device control unit and reloads the device control program into its memory just after the power is turned on, even immediately after the power failure is restored. Therefore, immediately after the power failure is restored, the file of the device control program is closed, and after the power failure is restored, an error is returned even if a system call is made to the device driver by the processing of the application program. At this time, most of the application programs instructed to open the file of the device control program after repeating the error retry several times, which caused a problem that it takes a long time to restart after the recovery from the power failure.

【0006】そこで本発明は、無停電電源装置を有する
データ処理本体部に搭載されたアプリケーションプログ
ラムの実行により、CPU及びメモリを実装したインテ
リジェント型プリント基板で構成されるデバイス制御部
を停電復帰後最初にアクセスしたとき、アプリケーショ
ンプログラムを介入させることなくデバイス制御部のメ
モリにロードされたデバイス制御用プログラムのファイ
ル再構築を行うことができ、停電復帰後の再稼働に要す
る時間の短縮を図り得るデータ処理装置を提供しようと
するものである。
Therefore, according to the present invention, by executing an application program installed in a data processing main body section having an uninterruptible power supply, a device control section composed of an intelligent printed circuit board having a CPU and a memory is first operated after a power failure is restored. Access to the device, the file of the device control program loaded in the memory of the device control unit can be reconstructed without intervention of the application program, and data that can reduce the time required for restarting after a power failure is restored. It is intended to provide a processing device.

【0007】[0007]

【課題を解決するための手段】本発明は、オペレーティ
ングシステムを搭載するとともに、停電発生により電源
を予備電源に切替えて停電前の状態を維持する無停電電
源装置を有するデータ処理本体部に、CPU及びメモリ
を実装してなるデバイス制御部をバス接続し、データ処
理本体部は、電源立上げ毎にデバイス制御部を初期化し
て所定のデバイス制御用プログラムをデバイス制御部の
メモリにロードした後、アプリケーションプログラムを
実行してデータ処理を行うデータ処理装置において、デ
ータ処理本体部は、デバイス制御用プログラムのファイ
ルをアプリケーションプログラムで管理するファイル記
述子とオペレーティングシステムに組込まれた該当デバ
イス制御部に対するデバイスドライバで管理するファイ
ル記述子とを対応させて記憶するファイル記述子変換テ
ーブルと、アプリケーションプログラムの実行によりデ
バイスドライバのシステムコールがあると、このシステ
ムコールのパラメータであるアプリケーションプログラ
ム管理下のファイル記述子をファイル記述子変換テーブ
ルに基づいてデバイスドライバ管理下のファイル記述子
に変換するファイル記述子変換手段と、この変換手段に
より得られたデバイスドライバ管理下のファイル記述子
をパラメータとしてデバイス制御用プログラムをシステ
ムコールする第1のシステムコール手段と、この手段に
よるシステムコールに対いてエラーリターンがあるとデ
バイス制御用プログラムのファイルをオープンさせる自
動ファイルオープン手段と、この手段によりデバイス制
御用プログラムのファイルをオープンさせた後、デバイ
ス制御用プログラムを再度システムコールする第2のシ
ステムコール手段とを備えたものである。
SUMMARY OF THE INVENTION According to the present invention, a CPU is provided in a data processing main unit having an operating system and an uninterruptible power supply for switching a power supply to a standby power supply when a power failure occurs and maintaining a state before a power failure. And a device control unit having a memory connected to the bus, and the data processing main unit initializes the device control unit each time the power is turned on and loads a predetermined device control program into the memory of the device control unit. In a data processing device that executes an application program to perform data processing, a data processing main unit includes a file descriptor for managing a file of a device control program by an application program and a device driver for the corresponding device control unit incorporated in an operating system. Corresponds with file descriptors managed by If there is a file descriptor conversion table that is stored in memory and a device driver system call is executed by the execution of the application program, the file descriptor managed by the application program, which is a parameter of this system call, is stored in the device based on the file descriptor conversion table. File descriptor conversion means for converting into a file descriptor under the control of the driver, and first system call means for making a system call to the device control program using the file descriptor under the control of the device driver obtained by the conversion means as a parameter. , Automatic file open means to open the device control program file when there is an error return to the system call by this means, and this means to open the device control program file. After, in which a second system call unit for system calls the device control program again.

【0008】[0008]

【作用】本発明のデータ処理装置においては、電源投入
後、データ処理本体部に設けられたファイル記述子変換
テーブルには、該データ処理本体部にバス接続されたデ
バイス制御部にローディングされたデバイス制御用プロ
グラムのファイルを、アプリケーションプログラムで管
理するファイル記述子と該当デバイス制御部に対するデ
バイスドライバで管理するファイル記述子とが対応して
記憶される。
In the data processing apparatus of the present invention, after the power is turned on, the file descriptor conversion table provided in the data processing main body has the device loaded in the device control unit bus-connected to the data processing main body. The file of the control program is stored in correspondence with the file descriptor managed by the application program and the file descriptor managed by the device driver for the corresponding device control unit.

【0009】この状態で、停電が発生すると、データ処
理本体部は無停電電源装置により電源が予備電源に切替
えられて停電前の状態が維持される。ただし、停電が復
旧した際にはデバイス制御部が初期化されて所定のデバ
イス制御用プログラムがデバイス制御部のメモリにロー
ドされるので、デバイス制御用プログラムのファイルは
クローズ状態となる。
When a power failure occurs in this state, the power source of the data processing main unit is switched to the standby power source by the uninterruptible power supply unit and the state before the power failure is maintained. However, when the power failure is restored, the device control unit is initialized and a predetermined device control program is loaded into the memory of the device control unit, so the file of the device control program is closed.

【0010】このため、停電復帰後、アプリケーション
プログラムの実行によりデバイスドライバのシステムコ
ールがあると、このシステムコールのパラメータである
ファイル記述子がファイル記述子変換テーブルに基づい
て当該デバイスドライバ管理下のファイル記述子に変換
された後、この変換後のファイル記述子をパラメータと
してデバイス制御用プログラムがシステムコールされる
が、このシステムコールに対してはエラーリターンとな
る。
Therefore, when a device driver system call is made by execution of an application program after recovery from a power failure, a file descriptor, which is a parameter of this system call, is a file under the device driver management based on the file descriptor conversion table. After conversion into a descriptor, the device control program is system called with this converted file descriptor as a parameter, but an error return is returned for this system call.

【0011】本発明においては、このエラーリターンに
対し、アプリケーションプログラムが介在することなく
デバイス制御用プログラムのファイルが自動的にオープ
ンされた後、デバイス制御用プログラムが再度システム
コールされる。この結果、デバイス制御用プログラムは
実行される。
In the present invention, in response to this error return, after the file of the device control program is automatically opened without the intervention of the application program, the device control program is system called again. As a result, the device control program is executed.

【0012】[0012]

【実施例】以下、本発明の一実施例を図面を参照して説
明する。なお、この実施例では、LAN(local area n
etwork)制御部としてインテリジェント型プリンタ基板
を使用した無停電電源装置搭載型のPOS端末に本発明
を適用した場合について述べる。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. In this embodiment, a LAN (local area n
A case where the present invention is applied to a POS terminal equipped with an uninterruptible power supply using an intelligent printer board as a control unit will be described.

【0013】図1はこの実施例の要部構成を示すブロッ
ク図であって、1はPOS端末におけるデータ処理本体
部であり、2はインテリジェント型プリンタ基板を使用
したLAN制御部である。
FIG. 1 is a block diagram showing a main configuration of this embodiment. Reference numeral 1 is a data processing main body portion of a POS terminal, and 2 is a LAN control portion using an intelligent printer substrate.

【0014】データ処理本体部1は、制御部本体を構成
するメインCPU10にプロセッサバス11を介して、
プログラム等の固定的データが格納されたROM12、
各種プログラムがロードされるプログラム領域や各種デ
ータを格納するためのデータ領域が形成されるRAM1
3の他、ダイレクト・メモリ・アクセス・コントローラ
14,バスコントローラ15,ハードディスク装置コン
トローラ16等を接続して構成されている。ここで、ハ
ードディスク装置コントローラ16にはハードディスク
に対してデータの書込み及び読出しを行うHDD(hard
disk driver:ハードディスク装置)17が接続されて
おり、ハードディスクにはオペレーティングシステム,
アプリケーションプログラム,プログラムライブラリ等
のプログラムファイル等が登録されている。
The data processing main body 1 is connected to a main CPU 10 constituting the main body of the control unit via a processor bus 11.
ROM 12 in which fixed data such as programs are stored,
RAM 1 in which a program area for loading various programs and a data area for storing various data are formed
3, a direct memory access controller 14, a bus controller 15, a hard disk device controller 16 and the like are connected. Here, the hard disk device controller 16 is an HDD (hard disk) that writes and reads data to and from the hard disk.
disk driver (hard disk device) 17 is connected, and an operating system,
Application files, program files such as program libraries, etc. are registered.

【0015】また、データ処理本体部1は、商用電源の
電源電圧が所定の停電検知レベルまで低下したとき停電
検知信号を前記メインCPU10に出力するとともに電
源を予備電源に切替えて停電前のRAM13やレジスタ
の状態を維持し、その後商用電源の電源電圧が所定の停
電復帰レベルまで上昇すると停電復帰検知信号を前記メ
インCPU10に出力するとともに電源を予備電源から
商用電源に切換えるUPS(uninterruptible power su
pply:無停電電源装置)18を有している。
Further, the data processing main body 1 outputs a power failure detection signal to the main CPU 10 when the power supply voltage of the commercial power supply drops to a predetermined power failure detection level, and switches the power supply to the standby power supply to the RAM 13 before the power failure. When the power supply voltage of the commercial power supply rises to a predetermined power failure recovery level after maintaining the state of the register, a UPS (uninterruptible power su) that outputs a power failure recovery detection signal to the main CPU 10 and switches the power supply from the standby power supply to the commercial power supply.
pply: uninterruptible power supply) 18.

【0016】LAN制御部2は、LAN通信を制御する
ボードCPU20にプロセッサバス21を介して、RO
M22、RAM23、タイマ24、S−IO(serial-i
mport outport )25等を接続して構成されている。そ
して、データ処理本体部1のプロセッサバス11と、L
AN制御部2のプロセッサバス21とをデュアルポート
メモリ3を介して接続している。
The LAN control unit 2 connects the board CPU 20 for controlling LAN communication with the RO via the processor bus 21.
M22, RAM23, timer 24, S-IO (serial-i
mport outport) 25 etc. are connected. The processor bus 11 of the data processing main unit 1 and L
The processor bus 21 of the AN control unit 2 is connected via the dual port memory 3.

【0017】前記データ処理本体部1は、RAM13の
プログラム領域に、図2に示すように、LAN制御部2
を制御するLANドライバP1aや後述する停電検知処理
を実行する停電検知ドライバP1b等が組込まれたオペレ
ーティングシステムP1と、後述する停電復帰処理を実
行するライブラリP2aを含むプログラムライブラリP2
と、各種のアプリケーションプログラムP3とを格納す
る。
As shown in FIG. 2, the data processing main body 1 includes a LAN control unit 2 in a program area of the RAM 13.
A program library P2 including an operating system P1 in which a LAN driver P1a for controlling a power failure, a power failure detection driver P1b for executing a power failure detection process described later, and the like are incorporated, and a library P2a for performing a power failure recovery process described later.
And various application programs P3 are stored.

【0018】一方、LAN制御部2は、RAM23のプ
ログラム領域に、図3に示すように、デバイス制御用プ
ログラムとしてLAN通信を実行するためのLAN制御
用プログラムQ1を格納する。このLAN制御用プログ
ラムQ1は、データ処理本体部1の商用電源投入による
立上がり時及びUPS18からの停電復帰検知信号入力
時に、メインCPU10によりデュアルポートメモリ3
を介してプログラム領域にロードされる。
On the other hand, the LAN control unit 2 stores a LAN control program Q1 for executing LAN communication as a device control program in the program area of the RAM 23, as shown in FIG. This LAN control program Q1 is executed by the main CPU 10 when the data processing main unit 1 is started up by turning on the commercial power and when a power failure recovery detection signal is input from the UPS 18.
Is loaded into the program area via.

【0019】また、前記データ処理本体部1は、RAM
13のデータ領域に、特に図4に示すように、前記LA
N制御用プログラムQ1のファイルを前記アプリケーシ
ョンプログラムP3で管理するファイル記述子(以下、
APL.fd:applicationfile dsecriptor と称す
る)と、前記LANドライバP1aで管理するファイル記
述子(以下、DRV.fd:driver file dsecriptorと
称する)とを対応させて記憶するファイル記述子変換テ
ーブルR1と、このファイル記述子変換テーブルR1に
登録されているデータ数Nを記憶するエントリ数メモリ
R2とを形成している。
The data processing main body 1 is a RAM
In the 13 data areas, as shown in FIG.
A file descriptor for managing the file of the N control program Q1 by the application program P3 (hereinafter,
APL. fd: applicationfile dsecriptor) and a file descriptor managed by the LAN driver P1a (hereinafter referred to as DRV.fd: driver file dsecriptor) are stored in association with each other, and a file descriptor conversion table R1. An entry number memory R2 for storing the number N of data registered in the child conversion table R1 is formed.

【0020】ファイル記述子変換テーブルR1には、対
応するファイル記述子によって指定されるファイルを使
用するタスクがアクティブ状態にあるときそのタスクI
Dを記憶する領域r1と、第1の停電カウンタc1の領
域r2と、第2の停電カウンタc2の領域r3も形成さ
れている。
In the file descriptor conversion table R1, when a task using the file specified by the corresponding file descriptor is in the active state, the task I
An area r1 for storing D, an area r2 for the first power outage counter c1, and an area r3 for the second power outage counter c2 are also formed.

【0021】図5は前記停電検知ドライバP1bによって
制御される停電検知処理を示す流れ図であって、この処
理はUPS18からの停電復帰信号入力に応じて開始さ
れる。すなわち、メインCPU10は、UPS18から
の停電復帰信号を入力すると、ファイル記述子変換テー
ブルR1に登録されているデータを順に調べ、タスクI
Dが記憶されているデータを検知すると、そのデータの
ファイル記述子で指定されるタスクがアクティブ状態の
ときに停電が発生したので、そのデータの第1の停電カ
ウンタc1を「+1」だけインクリメントする。
FIG. 5 is a flow chart showing a power failure detection process controlled by the power failure detection driver P1b. This process is started in response to a power failure recovery signal input from the UPS 18. That is, when the main CPU 10 receives the power failure recovery signal from the UPS 18, the main CPU 10 sequentially checks the data registered in the file descriptor conversion table R1, and checks the task I
When D detects the stored data, a power failure has occurred while the task specified by the file descriptor of that data is in the active state, so the first power failure counter c1 for that data is incremented by "+1". .

【0022】こうして、エントリ数メモリR2に記憶さ
れているデータ数Nだけファイル記述子変換テーブルR
1に登録されているデータを調べたならば、LAN制御
部2を初期化した後、LAN制御部2のRAM23に所
定のLAN制御用プログラムQ1をロードして、この処
理を終了する。
Thus, the file descriptor conversion table R for the number of data N stored in the entry number memory R2
When the data registered in No. 1 is checked, the LAN control unit 2 is initialized, then a predetermined LAN control program Q1 is loaded into the RAM 23 of the LAN control unit 2, and this process is terminated.

【0023】図6は前記停電復帰ライブラリP2aによっ
て実行される停電復帰処理を示す流れ図であって、この
処理はアプリケーションプログラムP3の実行によりL
ANドライバP1aのシステムコールがあると開始する。
すなわち、メインCPU11は、アプリケーションプロ
グラムP3からのLANドライバP1aのシステムコール
を入力すると、ファイル記述子変換テーブルR1に登録
されているデータを順に調べ、APL,fdがシステム
コールのパラメータであるファイル記述子と一致するデ
ータを検索する。
FIG. 6 is a flow chart showing a power failure recovery process executed by the power failure recovery library P2a, which is executed by executing the application program P3.
It starts when there is a system call for the AN driver P1a.
That is, when the system call of the LAN driver P1a from the application program P3 is input, the main CPU 11 sequentially checks the data registered in the file descriptor conversion table R1 and APL, fd is the file descriptor of the system call. Search for data that matches.

【0024】そして、APL,fdがシステムコールの
パラメータであるファイル記述子と一致するデータ(以
下、記述子一致データと称する)を検出できたならば、
ファイル記述子を記述子一致データのDRV.fdに変
換し(ファイル記述子変換手段)、このDRV.fdを
パラメータとしてLANドライバP1aをシステムコール
する(第1のシステムコール手段)。
Then, if APL, fd can detect data matching the file descriptor which is a parameter of the system call (hereinafter referred to as descriptor matching data),
The file descriptor is the DRV. fd (file descriptor conversion means), and the DRV. A system call is made to the LAN driver P1a using fd as a parameter (first system call means).

【0025】その結果、LANドライバP1aから正常実
行完了を示すシステムリターンが戻された場合には、フ
ァイル記述子を記述子一致データのAPL.fdに逆変
換した後、このAPL.fdをパラメータとしてアプリ
ケーションプログラムP3に正常実行完了を示すシステ
ムリターンを行って、この処理を終了する。
As a result, when the LAN driver P1a returns a system return indicating the normal execution completion, the file descriptor is set to the APL. After inverse conversion to fd, this APL. Using fd as a parameter, the application program P3 is returned to the system indicating normal completion, and the process is terminated.

【0026】一方、LANドライバP1aをシステムコー
ルした結果、LANドライバP1aからエラーリターンが
戻された場合には、記述子一致データの第1の停電カウ
ンタC1と第2の停電カウンタC2とを比較する。そし
て、両カウンタC1,C2が一致しない場合には、停電
発生に起因するエラーなので、記述子一致データの第2
の停電カウンタC2を第1の停電カウンタC1に一致さ
せて、ファイル記述子変換テーブルR1に登録する。
On the other hand, when an error return is returned from the LAN driver P1a as a result of the system call to the LAN driver P1a, the first power failure counter C1 and the second power failure counter C2 of the descriptor matching data are compared. . If the two counters C1 and C2 do not match, it is an error caused by the occurrence of a power failure, and therefore the second descriptor matching data
The power failure counter C2 of 1 is matched with the first power failure counter C1 and registered in the file descriptor conversion table R1.

【0027】また、LANドライバP1aに対し、LAN
制御用プログラムのファイルのオープンを指令したなら
ば(自動ファイルオープン手段)、記述子一致データの
DRV.fdをパラメータとしてLANドライバP1aを
再度システムコールする(第2のシステムコール手
段)。
Further, the LAN driver P1a is connected to the LAN
If the command to open the control program file is issued (automatic file opening means), the descriptor matching data DRV. A system call is again made to the LAN driver P1a using fd as a parameter (second system call means).

【0028】これにより、LANドライバP1aからは正
常実行完了を示すシステムリターンが戻されるので、フ
ァイル記述子を記述子一致データのAPL.fdに逆変
換した後、このAPL.fdをパラメータとしてアプリ
ケーションプログラムP3に正常実行完了を示すシステ
ムリターンを行って、この処理を終了する。
As a result, the LAN driver P1a returns a system return indicating normal completion of execution, so that the file descriptor is the APL. After inverse conversion to fd, this APL. Using fd as a parameter, the application program P3 is returned to the system indicating normal completion, and the process is terminated.

【0029】なお、LANドライバP1aをシステムコー
ルした結果、LANドライバP1aからエラーリターンが
戻されたが、記述子一致データの第1の停電カウンタC
1と第2の停電カウンタC2が一致している場合には、
停電以外の原因でエラーになったので、ファイル記述子
を記述子一致データのAPL.fdに逆変換した後、こ
のAPL.fdをパラメータとしてアプリケーションプ
ログラムP3にエラーリターンを行って、この処理を終
了する。
As a result of the system call to the LAN driver P1a, an error return is returned from the LAN driver P1a, but the first power failure counter C of the descriptor matching data is returned.
When 1 and the second power failure counter C2 match,
Since an error occurred due to a cause other than power failure, set the file descriptor to APL. After inverse conversion to fd, this APL. An error is returned to the application program P3 using fd as a parameter, and this processing ends.

【0030】また、アプリケーションプログラムP3か
らのシステムコールによりファイル記述子変換テーブル
R1の全登録データを検索した結果、そのパラメータで
あるファイル記述子とAPL,fdが一致するデータを
検出できなかった場合には、そのシステムコールのパラ
メータであるファイル記述子をパラメータとしてアプリ
ケーションプログラムP3にエラーリターンを行って、
この処理を終了する。
Further, as a result of searching all registered data in the file descriptor conversion table R1 by a system call from the application program P3, when the data whose parameter file descriptor and APL, fd match can not be detected. Returns an error to the application program P3 using the file descriptor which is a parameter of the system call as a parameter,
This process ends.

【0031】このように構成された本実施例において
は、商用電源に停電が発生してUPS18からメインC
PU10に停電検知信号が入力すると、メインCPU1
0によって同CPU内のプログラムアドレス,レジスタ
等の値がRAM13上に退避される。また、UPS18
からRAM13に補助電源が供給されて、RAM13上
のデータは安定に記憶保持される。ただし、LAN制御
部2のRAM23には補助電源が供給されないので、停
電発生によりデータは消失する。
In this embodiment having such a configuration, a power failure occurs in the commercial power source and the UPS 18 causes the main C
When a power failure detection signal is input to PU10, main CPU1
By 0, the program address in the CPU, the value of the register, etc. are saved in the RAM 13. In addition, UPS18
The auxiliary power is supplied from the RAM 13 to the RAM 13, and the data on the RAM 13 is stably stored and held. However, since the auxiliary power is not supplied to the RAM 23 of the LAN control unit 2, the data is lost due to the occurrence of the power failure.

【0032】その後、商用電源の停電が復旧してUPS
18からメインCPU10に停電復帰信号が入力される
と、停電検知ドライバP2bが起動して図5に示した停電
検知処理が実行される。すなわち、停電発生前にアクテ
ィブ状態にあったLAN制御用プログラムQ1のタスク
が探し出される。そして、そのタスクで使用するLAN
制御用プログラムのファイルを指定するファイル記述子
APL.fd及びDRV.fdに対応した第1の停電検
知カウンタC1がインクリメントされる。また、通常の
電源投入時と同様にLAN制御部2が初期化された後、
そのRAM23に所定のLAN制御用プログラムQ1が
ロードされる。
After that, the power failure of the commercial power source is restored and UPS
When a power failure recovery signal is input to the main CPU 10 from 18, the power failure detection driver P2b is activated and the power failure detection process shown in FIG. 5 is executed. That is, the task of the LAN control program Q1 that was in the active state before the power failure occurred is searched for. And the LAN used for that task
A file descriptor APL. Which designates a control program file. fd and DRV. The first power failure detection counter C1 corresponding to fd is incremented. In addition, after the LAN controller 2 is initialized in the same manner as when the power is normally turned on,
A predetermined LAN control program Q1 is loaded into the RAM 23.

【0033】一方、データ処理本体部1においては、R
AM13上に退避されていたデータがメインCPU10
内に戻されて、アプリケーションプログラムP3が停電
発生前の状態から継続される。そして、このアプリケー
ションプログラムP3の実行によりLAN通信の処理タ
イミングとなり、LANドライバP1aのシステムコール
が行われると、停電復帰ライブラリP2aが起動して図6
に示した停電復帰処理が開始される。すなわち、ファイ
ル記述子変換テーブルR1からAPL,fdがシステム
コールのパラメータであるファイル記述子と一致する記
述子一致データが検出される。そして、この記述子一致
データ中のDRV.fdをパラメータとしてLANドラ
イバP1aがシステムコールされる。
On the other hand, in the data processing main unit 1, R
The data saved in the AM 13 is the main CPU 10
Then, the application program P3 is continued from the state before the power failure occurred. When the LAN communication processing timing is reached by the execution of this application program P3 and the system call of the LAN driver P1a is made, the power failure recovery library P2a is activated and the FIG.
The power failure recovery process shown in is started. That is, from the file descriptor conversion table R1, descriptor matching data in which APL and fd match the file descriptor which is a parameter of the system call is detected. Then, the DRV. The LAN driver P1a is system called using fd as a parameter.

【0034】ただし、このときは、停電復帰後最初のシ
ステムコールであり、LAN制御用プログラムQ1のフ
ァイルはオープンされていないので、LANドライバP
1aは停電復帰ライブラリP2aに対してエラーリターンを
戻すことになる。これにより、記述子一致データの第1
の停電カウンタC1と第2の停電カウンタC2とが比較
され、一致していないので停電発生に起因するエラーと
判定されて、両停電カウンタC1,C2の一致が図られ
るとともに、LAN制御用プログラムQ1のファイルオ
ープンが指令される。
However, at this time, since it is the first system call after the recovery from the power failure and the file of the LAN control program Q1 is not opened, the LAN driver P
1a returns an error return to the power failure recovery library P2a. As a result, the first descriptor matching data
The power outage counter C1 and the second power outage counter C2 are compared, and since they do not match, it is determined that the error is caused by the occurrence of a power outage, both power outage counters C1 and C2 are matched, and the LAN control program Q1 File open command is issued.

【0035】これにより、LAN制御用プログラムQ1
のファイルがオープンされたならば、再度記述子一致デ
ータのDRV.fdをパラメータとしてLANドライバ
Pa1がシステムコールされる。この結果、LAN制御部
2が制御されて、アプリケーションプログラムP3の実
行によるLAN通信が処理される。
As a result, the LAN control program Q1
File is opened, the descriptor matching data DRV. The LAN driver Pa1 is system called with fd as a parameter. As a result, the LAN control unit 2 is controlled to process the LAN communication by executing the application program P3.

【0036】このように、本実施例によれば、UPS1
8を搭載することで停電復帰機能を有するデータ処理本
体部1に、ボードCPU21,RAM23等を実装した
インテリジェント形のプリント基板で構成されるデバイ
ス制御部としてのLAN制御部2を接続してなるPOS
端末において、停電復帰後のアプリケーションプログラ
ムP3の継続処理によりLAN制御部2を最初にアクセ
スしたとき、アプリケーションプログラムP3の処理が
介入することなしに、停電復帰時にLAN制御部2のR
AM23にロードされたデバイス制御用プログラムQ1
のファイルをオープンさせた後、LANドライバP1aを
システムコールできるので、アプリケーションプログラ
ムP3がエラーリトライを数回繰り返した後、LAN制
御用プログラムQ1のファイルオープンを指令していた
従来に比べて、停電復帰後の再稼働に要する時間を短縮
できる効果を奏する。
Thus, according to this embodiment, UPS1
A POS in which a LAN control unit 2 as a device control unit configured by an intelligent printed circuit board on which a board CPU 21, a RAM 23 and the like are mounted is connected to a data processing main unit 1 having a power failure recovery function by mounting 8
In the terminal, when the LAN control unit 2 is first accessed by the continuation processing of the application program P3 after the power failure recovery, the R of the LAN control unit 2 is restored at the time of the power failure recovery without intervention of the processing of the application program P3.
Device control program Q1 loaded in AM23
Since the LAN driver P1a can make a system call after opening the file, the application program P3 repeats error retries several times, and then after the file opening of the LAN control program Q1 is commanded, a power failure recovery This has the effect of reducing the time required for subsequent re-operation.

【0037】また本実施例によれば、アプリケーション
プログラムP3から停電復帰に関する処理を省略するこ
とができる。すなわち、本実施例における停電検知ドラ
イバP1bと停電復帰ライブラリP2aとをデータ処理本体
部10に組込むことによって、停電復帰処理機能を持た
ないアプリケーションプログラムであっても使用可能と
なり、汎用性を高めることができる効果を奏する。
Further, according to this embodiment, it is possible to omit the processing related to the power failure recovery from the application program P3. That is, by incorporating the power failure detection driver P1b and the power failure recovery library P2a in the present embodiment into the data processing main unit 10, even an application program having no power failure recovery processing function can be used, and versatility can be improved. There is an effect that can be done.

【0038】なお、前記実施例ではCPU及びメモリを
実装してなるデバイス制御部としてLAN通信を制御す
るLAN制御部2を示したが、他のデバイスを制御する
デバイス制御部を搭載したデータ処理装置でも本発明を
適用できるのはいうまでもないことである。
Although the LAN control unit 2 for controlling the LAN communication is shown as the device control unit having the CPU and the memory mounted in the above embodiment, the data processing apparatus equipped with the device control unit for controlling the other devices is shown. However, it goes without saying that the present invention can be applied.

【0039】[0039]

【発明の効果】以上詳述したように本発明によれば、無
停電電源装置を有するデータ処理本体部に搭載されたア
プリケーションプログラムの実行により、CPU及びメ
モリを実装したインテリジェント型プリント基板で構成
されるデバイス制御部を停電復帰後最初にアクセスした
とき、アプリケーションプログラムを介入させることな
くデバイス制御部のメモリにロードされたデバイス制御
用プログラムのファイル再構築を行うことができ、停電
復帰後の再稼働に要する時間の短縮を図り得、ひいては
アプリケーションプログラムの簡素化を図り得て、汎用
性を高め得るデータ処理装置を提供できる。
As described in detail above, according to the present invention, an intelligent printed circuit board in which a CPU and a memory are mounted by executing an application program installed in a data processing main unit having an uninterruptible power supply is constructed. When the device control unit is accessed for the first time after a power failure recovery, the file of the device control program loaded in the memory of the device control unit can be reconstructed without intervention of the application program, and it can be restarted after a power failure recovery. It is possible to provide a data processing device that can improve the versatility by shortening the time required for, and by simplifying the application program.

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

【図1】 本発明の一実施例の要部ブロック図。FIG. 1 is a block diagram of an essential part of an embodiment of the present invention.

【図2】 同実施例におけるデータ処理本体部のRAM
にロードされるプログラムの構造図。
FIG. 2 is a RAM of a data processing main unit according to the embodiment.
Diagram of the program loaded into.

【図3】 同実施例におけるLAN制御部のRAMにロ
ードされるプログラムの構造図。
FIG. 3 is a structural diagram of a program loaded in a RAM of a LAN control unit in the embodiment.

【図4】 同実施例におけるデータ処理本体部のRAM
に形成される主要なメモリエリアを示す図。
FIG. 4 is a RAM of a data processing main unit according to the embodiment.
The figure which shows the main memory area formed in.

【図5】 同実施例におけるデータ処理本体部のメイン
CPUが実行する停電検知処理を示す流れ図。
FIG. 5 is a flowchart showing a power failure detection process executed by the main CPU of the data processing main body unit according to the embodiment.

【図6】 同CPUが実行する停電復帰処理を示す流れ
図。
FIG. 6 is a flowchart showing a power failure recovery process executed by the CPU.

【符号の説明】 1…データ処理本体部 2…LAN制御部(デバイス制御部) 3…デュアルポートメモリ 10…メインCPU 18…UPS(無停電電源装置) P1…オペレーティングシステム P1a…LANドライバ(デバイスドライバ) P1b…停電検知ドライバ P2a…停電復帰ライブラリ P2…プログラムライブラリ P3…アプリケーションプログラム Q1…LAN制御用プログラム(デバイス制御用プログ
ラム) R1…ファイル記述子変換テーブル
[Explanation of Codes] 1 ... Data processing main unit 2 ... LAN control unit (device control unit) 3 ... Dual port memory 10 ... Main CPU 18 ... UPS (Uninterruptible power supply) P1 ... Operating system P1a ... LAN driver (device driver) ) P1b ... Power failure detection driver P2a ... Power failure recovery library P2 ... Program library P3 ... Application program Q1 ... LAN control program (device control program) R1 ... File descriptor conversion table

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 オペレーティングシステムを搭載すると
ともに、停電発生により電源を予備電源に切替えて停電
前の状態を維持する無停電電源装置を有するデータ処理
本体部に、CPU及びメモリを実装してなるデバイス制
御部をバス接続し、前記データ処理本体部は、電源立上
げ毎に前記デバイス制御部を初期化して所定のデバイス
制御用プログラムを前記デバイス制御部のメモリにロー
ドした後、アプリケーションプログラムを実行してデー
タ処理を行うデータ処理装置において、 前記データ処理本体部は、前記デバイス制御用プログラ
ムのファイルを前記アプリケーションプログラムで管理
するファイル記述子と前記オペレーティングシステムに
組込まれた該当デバイス制御部に対するデバイスドライ
バで管理するファイル記述子とを対応させて記憶するフ
ァイル記述子変換テーブルと、前記アプリケーションプ
ログラムの実行により前記デバイスドライバのシステム
コールがあると、このシステムコールのパラメータであ
る前記アプリケーションプログラム管理下のファイル記
述子を前記ファイル記述子変換テーブルに基づいて前記
デバイスドライバ管理下のファイル記述子に変換するフ
ァイル記述子変換手段と、この変換手段により得られた
前記デバイスドライバ管理下のファイル記述子をパラメ
ータとして前記デバイス制御用プログラムをシステムコ
ールする第1のシステムコール手段と、この手段による
システムコールに対いてエラーリターンがあると前記デ
バイス制御用プログラムのファイルをオープンさせる自
動ファイルオープン手段と、この手段により前記デバイ
ス制御用プログラムのファイルをオープンさせた後、前
記デバイス制御用プログラムを再度システムコールする
第2のシステムコール手段とを具備したことを特徴とす
るデータ処理装置。
1. A device in which a CPU and a memory are mounted in a data processing main unit having an operating system and an uninterruptible power supply unit that switches a power supply to a standby power supply when a power failure occurs and maintains a state before a power failure. The control unit is connected to the bus, and the data processing main unit initializes the device control unit each time the power is turned on, loads a predetermined device control program into the memory of the device control unit, and then executes the application program. In the data processing device for performing data processing by means of the data processing device, the data processing main unit is a file descriptor for managing a file of the device control program by the application program and a device driver for the corresponding device control unit incorporated in the operating system. Manage file descriptors and If there is a system call of the device driver due to the execution of the application program and a file descriptor conversion table stored correspondingly, a file descriptor under the control of the application program, which is a parameter of this system call, is converted into the file descriptor conversion table. File descriptor conversion means for converting into a file descriptor under the control of the device driver based on a table, and a system call for the device control program using the file descriptor under the control of the device driver obtained by the conversion means as a parameter First system call means, an automatic file opening means for opening the file of the device control program when an error is returned in response to the system call by this means, and the device by the means. A data processing device comprising: a second system call means for re-system-calling the device control program after opening a chair control program file.
JP7076827A 1995-03-31 1995-03-31 Data processing device Expired - Fee Related JP3051043B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7076827A JP3051043B2 (en) 1995-03-31 1995-03-31 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7076827A JP3051043B2 (en) 1995-03-31 1995-03-31 Data processing device

Publications (2)

Publication Number Publication Date
JPH08272492A true JPH08272492A (en) 1996-10-18
JP3051043B2 JP3051043B2 (en) 2000-06-12

Family

ID=13616519

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7076827A Expired - Fee Related JP3051043B2 (en) 1995-03-31 1995-03-31 Data processing device

Country Status (1)

Country Link
JP (1) JP3051043B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8468392B2 (en) 2009-05-28 2013-06-18 Seiko Epson Corporation Controller and control method for a controller

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8468392B2 (en) 2009-05-28 2013-06-18 Seiko Epson Corporation Controller and control method for a controller
US8726096B2 (en) 2009-05-28 2014-05-13 Seiko Epson Corporation Controller and control method for a controller

Also Published As

Publication number Publication date
JP3051043B2 (en) 2000-06-12

Similar Documents

Publication Publication Date Title
US5155729A (en) Fault recovery in systems utilizing redundant processor arrangements
US6226740B1 (en) Information processing apparatus and method that uses first and second power supplies for reducing booting time
US7412621B2 (en) Processor duplexing apparatus based on RTOS in mobile communication system and method thereof
US20030149970A1 (en) Portable software for rolling upgrades
US6832336B2 (en) Method and apparatus for maintaining consistent data
JP3051043B2 (en) Data processing device
JPH02196355A (en) Memory processing system
KR100338626B1 (en) The Duplication Method for Communication system
US6594778B1 (en) Duplexing structure of switching system processor and method for maintaining memory coherency
JP3117666B2 (en) Cold standby type dual system
CN100410881C (en) Electronic device, control method, and program product
JP3052595B2 (en) Computer redundancy control method
JPH05127891A (en) Stable working method for software revision in computer system
TWI757923B (en) Pre-boot execution environment determination system and method thereof
JP3161319B2 (en) Multiprocessor system
JP3239935B2 (en) Tightly-coupled multiprocessor system control method, tightly-coupled multiprocessor system, and recording medium therefor
JPH06231098A (en) Control system for multiprocessor system
JP3314868B2 (en) Program switching control method
KR100258756B1 (en) Method for booting of duplicated exchange system
JP2002099444A (en) Computer system
US20030145068A1 (en) Appliance server configuration recovery for a highly optimized server configuration profile image
JPH06261593A (en) Motor control device
JP3509705B2 (en) Automatic restart processing system and restart processing method in switching system
JPH0887431A (en) Abnormality detecting device for central processing unit
JPH10269124A (en) Method and system for managing checkpoint information

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080331

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090331

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees