JP2001005766A - Nonstop extensible driver - Google Patents

Nonstop extensible driver

Info

Publication number
JP2001005766A
JP2001005766A JP11174780A JP17478099A JP2001005766A JP 2001005766 A JP2001005766 A JP 2001005766A JP 11174780 A JP11174780 A JP 11174780A JP 17478099 A JP17478099 A JP 17478099A JP 2001005766 A JP2001005766 A JP 2001005766A
Authority
JP
Japan
Prior art keywords
driver
emulator
function
instruction
source
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.)
Withdrawn
Application number
JP11174780A
Other languages
Japanese (ja)
Inventor
Takeshi Kawakami
武 川上
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP11174780A priority Critical patent/JP2001005766A/en
Publication of JP2001005766A publication Critical patent/JP2001005766A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To add a new function without stopping a computer to replace a driver. SOLUTION: This driver 2 which controls the operation of each different function of a hardware device under the control of an OS is provided with a function adding means 108 for user mode-side emulator which sends the source of a new function task described by a user to a driver side as a function addition instruction code for an emulator, a driver-side emulator table 110 which tables a detailed subdivision instruction group performed by the driver in the unit of each subdivision instruction and a driver-side emulating means 109 which refers to the table 110 and executes a received instruction code when the instruction code from the function adding means for an emulator is received via an OS 3.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、コンピュータの
オペレーティングシステムを構成するドライバに対し
て、新たな機能をコンパイル後のバイナリではなく、ソ
ースコードのまま動的に追加する装置に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an apparatus for dynamically adding a new function to a driver constituting an operating system of a computer, not as a compiled binary but as a source code.

【0002】[0002]

【従来の技術】従来のオペレーティングシステムにおけ
るドライバへの機能追加方法では、動的に新しい機能を
追加する場合において、その新しい機能のプログラムを
コンパイルし、ドライバ内へ送り込む際には、実行が可
能である形式のコードデータに変換しておかなければな
らない。図18は例えば、特願平10−49754号に
示された「ドライバ機能の動的管理方式及び動的管理方
法」であり、既に実行中のドライバに対して新たな機能
の追加・削除を可能としている。図において、3はオペ
レーティングシステム、2はオペレーティングシステム
に組み込まれているドライバ、107はドライバが有す
る機能群であり、各々機能A〜機能C(機能107A〜
機能107C)、101はドライバに対して新たに追加
したい新機能ソース、102は新機能ソースをコンパイ
ルする手段、103はコンパイルされた新機能、104
は情報獲得手段、105は新機能追加手段、106は命
令受付手段、301は機能一覧情報、302はマップフ
ァイル、303は情報編集手段である。
2. Description of the Related Art In a conventional method of adding a function to a driver in an operating system, when a new function is dynamically added, a program of the new function is compiled and sent to the driver. It must be converted to some form of code data. FIG. 18 shows, for example, “Dynamic management method and dynamic management method of driver function” disclosed in Japanese Patent Application No. 10-49754, in which a new function can be added to or deleted from a driver that is already running. And In the figure, reference numeral 3 denotes an operating system, 2 denotes a driver incorporated in the operating system, and 107 denotes a group of functions of the driver.
Function 107C), 101 is a new function source to be newly added to the driver, 102 is a means for compiling a new function source, 103 is a compiled new function, 104
Is an information acquiring unit, 105 is a new function adding unit, 106 is a command receiving unit, 301 is function list information, 302 is a map file, and 303 is an information editing unit.

【0003】図19はオペレーティングシステム(O
S)3の一部を構成するドライバ2の内部に組み込まれ
ている機能群107へ新たな機能を追加する場合の作業
を示したフローチャート図であり、以下に、従来におけ
る動的追加方法について、この図18と図19を用いて
説明する。例えば、図19において、ドライバ2に対し
て新たな機能を追加する場合には、まず、情報獲得手段
104より、命令受付手段106に対して情報の要求を
行う(ステップ2001)。これにより現在ドライバ2
内にて備えられている機能群107の情報、すなわち機
能一覧情報301が得られる(ステップ2002)。次
に情報を参考にし、新しい機能のソースコード101を
作成する(ステップ2003)。次にコンパイル手段1
02を用いて新機能ソースをコンパイルし、103のコ
ンパイルされた新機能を作成する(ステップ200
4)。次にコンパイルされた新機能内のアドレスを修正
する(ステップ2005)。次に、新機能追加手段10
5を用いて、ドライバに組み込む(ステップ200
6)。
FIG. 19 shows an operating system (O
S) is a flowchart showing an operation when a new function is added to the function group 107 incorporated in the driver 2 constituting a part of 3). The following describes a conventional dynamic addition method. A description will be given with reference to FIGS. For example, in FIG. 19, when adding a new function to the driver 2, first, the information acquisition unit 104 requests information from the instruction reception unit 106 (step 2001). This allows the current driver 2
The information of the function group 107 provided in the inside, that is, the function list information 301 is obtained (step 2002). Next, the source code 101 of the new function is created with reference to the information (step 2003). Next, compile means 1
02 to compile the new function source to create 103 compiled new functions (step 200).
4). Next, the address in the compiled new function is corrected (step 2005). Next, the new function adding means 10
5 and incorporated into the driver (step 200).
6).

【0004】当然のことながら、この新しいドライバは
新機能を中に組み込んでいるので、組み込み以降にOS
3から新機能の呼び出しがあると、その機能を実行する
ことができる。しかし、ドライバの入れ換えのために計
算機を止めて入れ換え作業が必要となる。最後に、機能
一覧情報301の更新を行う。このように、タスクの追
加が容易となっている。以上のように、従来例において
は、新たに追加を行いたい新機能のソースに対して、ス
テップ2004に示されるように、コンパイラによる処
理、例えば、C言語でソースを作成したならば、作成さ
れたソースを例えばVISUAL C++のようなCコ
ンパイラによって実行可能形式のバイナリ形式のファイ
ルへの変換を施す必然性があり、開発環境が整備できて
いない状況下、つまり、コンパイラが無い場合には、新
たな機能を追加・修正を行うことがた易くできない。
[0004] Naturally, since this new driver incorporates new functions therein, the operating system must be installed after the incorporation.
When a new function is called from 3, the function can be executed. However, it is necessary to stop the computer for the replacement of the driver and perform the replacement work. Finally, the function list information 301 is updated. Thus, it is easy to add a task. As described above, in the conventional example, as shown in step 2004, if the source of a new function to be newly added is processed by a compiler, for example, if the source is created in C language, the source is created. It is necessary to convert the source into a binary file in an executable format by a C compiler such as, for example, Visual C ++. In a situation where the development environment has not been prepared, that is, when there is no compiler, a new It is not easy to add or modify functions.

【0005】[0005]

【発明が解決しようとする課題】従来の動的タスク追加
方法は、新しく追加する機能のプログラムをユーザが作
成したソースから実行が可能である実行コード形式にす
るためのコンパイル手段を必要としているため、開発環
境が整っている場合ではよいのだが製品が納められてい
る客先では、こうしたコンパイル手段が無いのが一般的
であるため、現場での機能の追加変更がやり難い。従来
の方式でも、予め幾つかの新規に追加するプログラムを
コンパイルした状態で作成しておき、持って行くことは
可能だが、現場で臨機応変にプログラムの変更等を行っ
て対応することはできないという課題があった。そもそ
もコンパイルされた新しいドライバを旧バージョンと入
れ換えるために計算機を止めて作業をする必要があると
いう課題があった。
The conventional method for adding a dynamic task requires a compiling means for converting a program of a function to be newly added into an executable code form executable from a source created by a user. Although it is good when the development environment is in place, it is difficult for the customer where the product is delivered to have such a compilation means in general, and it is difficult to add or change the functions on site. Even with the conventional method, it is possible to create some newly added programs in a compiled state in advance and bring them, but it is not possible to respond flexibly by changing the program on the spot There were challenges. In the first place, there was a problem that it was necessary to stop the computer and work in order to replace the new driver compiled with the old version.

【0006】この発明は上記のような課題を解決するた
めになされたもので、コンパイラを使用すること無く、
ドライバに対して動的に機能を追加・修正を可能にする
ことを目的とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and without using a compiler,
It is an object of the present invention to enable a function to be dynamically added or modified to a driver.

【0007】[0007]

【課題を解決するための手段】この発明に係るノンスト
ップ拡張ドライバ装置は、オペレーティングシステム
(OS)の管理下で、ハードウェア・デバイスの各機能
別の動作を制御するドライバにおいて、ユーザが記述し
た新機能タスクのソースを、エミュレータ用機能追加命
令コードとしてドライバ側に送る、ユーザモード側エミ
ュレータ用機能追加手段と、ドライバが行う詳細細分化
命令群を各細分化命令単位でテーブルにした、ドライバ
側エミュレータテーブルと、エミュレータ用機能追加手
段からの命令コードをOS経由で受け取ると、エミュレ
ータテーブルを参照して受け取った命令コードを実行す
る、ドライバ側エミュレート手段とを備えた。
A non-stop extended driver device according to the present invention is a driver for controlling the operation of each function of a hardware device under the control of an operating system (OS). The user mode side emulator function addition means, which sends the source of the new function task to the driver as an emulator function addition instruction code, and the driver side, which lists the detailed subdivision instructions performed by the driver for each subdivision instruction unit An emulator table and driver-side emulation means for receiving the instruction code from the emulator function adding means via the OS and executing the received instruction code with reference to the emulator table are provided.

【0008】また更に、ドライバ側エミュレート手段
は、命令コード列としてのソースを一括して記憶するメ
モリを持ち、ユーザモード側エミュレータ用機能追加手
段からのソースを読み込むと、命令実行位置を示す順序
に従って順次、命令を実行するようにした。
Further, the driver-side emulation means has a memory for collectively storing a source as an instruction code string, and reads a source from the user-mode-side emulator function addition means to read an instruction execution position. The instructions are executed sequentially according to

【0009】また更に、ドライバ側エミュレータテーブ
ルは、複数の言語による命令コードをテーブルに収容
し、ドライバ側エミュレート手段は、ユーザが用いた言
語に対応した命令コード列を実行するようにした。
Further, the driver-side emulator table contains instruction codes in a plurality of languages in the table, and the driver-side emulation means executes an instruction code sequence corresponding to the language used by the user.

【0010】また更に、ドライバ側エミュレート手段
は、CPU占有実績を記録し、所定の占有率の範囲を超
えると、命令実行を止めてOSに動作を戻すようにし
た。
Further, the driver-side emulation means records the CPU occupancy record, and when the occupancy exceeds a predetermined occupancy range, the command execution is stopped and the operation is returned to the OS.

【0011】また更に、ドライバ側エミュレート手段
は、複数の命令コード列としてのソースを、対応したメ
モリ領域に記憶するようにし、ユーザモード側エミュレ
ータ用機能追加手段からのソースを対応した領域に読み
込むと、これら各領域の命令実行位置を示す順序に従っ
て順次、命令を実行するようにした。
Further, the driver emulation means stores the source as a plurality of instruction code strings in the corresponding memory area, and reads the source from the user mode emulator function addition means into the corresponding area. The instructions are sequentially executed in the order indicating the instruction execution positions of these areas.

【0012】また更に、ドライバ側エミュレート手段
は、新機能タスクの実行回数実績を記録し、所定の実行
回数の範囲を超えると、命令実行を止めてOSに動作を
戻すようにしたことを特徴とする請求項1記載のノンス
トップ拡張ドライバ装置。
Still further, the driver-side emulation means records the number of executions of the new function task, and when the number of executions exceeds a predetermined number of executions, stops the instruction execution and returns to the OS. The non-stop extended driver device according to claim 1, wherein

【0013】[0013]

【発明の実施の形態】実施の形態1.コンパイラを使用
しないでドライバに新機能を付加する装置の構成と動作
を説明する。図1は本実施の形態におけるノンストップ
・ドライバ拡張装置の構成図である。図において、3は
オペレーティングシステム(OS)、2はOSに組み込
まれているドライバで、107はドライバが持っている
機能群であり、例えば機能A107A、機能B 107
B、機能C 107Cを持っている。これらは他の装置
でも持っている一般的な要素である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiment 1 The configuration and operation of a device that adds a new function to a driver without using a compiler will be described. FIG. 1 is a configuration diagram of a non-stop driver extension device according to the present embodiment. In the figure, 3 is an operating system (OS), 2 is a driver incorporated in the OS, and 107 is a group of functions of the driver, for example, function A 107A, function B 107
B, function C 107C. These are common elements that other devices have.

【0014】ユーザモード側には、以下の要素がある。
101はユーザがドライバに新しい機能を追加したい場
合に、その機能を記述したプログラムソースであり、O
S上にファイルとして設けられている。104は情報獲
得手段であり、現在のドライバ内の機能AないしCの情
報を得るためのアプリケーションプログラムである。例
えばドライバに対してI/Oコントロール命令を出し、
ドライバ側(カーネルモード側)にある命令受付手段1
06をアクセスして情報を得る。302はマップファイ
ルであり、情報獲得手段104で得た、機能関数名とア
ドレスで示された、ドライバ内の機能の情報が展開され
たファイルである。即ち、ユーザが直接には知り得ない
ドライバ内の機能情報をビジブルに表示するものであ
る。つまりドライバ側の機能一覧情報301の内容をユ
ーザに見えるよう展開する。303は情報編集手段であ
り、ドライバ側(カーネルモード側)にある機能一覧情
報301をアクセスしてフラグを操作し、細かな制御を
させるものである。105は新機能追加手段であり、現
在のドライバへ新たな機能を追加するためのアプリケー
ションプログラムである。例えばI/Oコントロール命
令を出し、命令受付手段106に新機能を渡す。
The user mode has the following elements.
Reference numeral 101 denotes a program source describing a function when a user wants to add a new function to the driver.
It is provided as a file on S. Reference numeral 104 denotes an information obtaining means, which is an application program for obtaining information on the functions A to C in the current driver. For example, issue an I / O control command to the driver,
Instruction receiving means 1 on the driver side (kernel mode side)
06 to obtain information. Reference numeral 302 denotes a map file, which is a file in which information on functions in the driver indicated by the function name and the address obtained by the information acquisition unit 104 is expanded. That is, the function information in the driver, which the user cannot know directly, is displayed in a visible manner. In other words, the contents of the function list information 301 on the driver side are developed so as to be seen by the user. Reference numeral 303 denotes an information editing unit that accesses the function list information 301 on the driver side (kernel mode side) and operates a flag to perform fine control. Reference numeral 105 denotes a new function adding unit, which is an application program for adding a new function to the current driver. For example, an I / O control command is issued and a new function is passed to the command receiving means 106.

【0015】一方ドライバ側(カーネルモード側)には
以下の要素がある。106は命令受付手段であり、ユー
ザモード側からの新機能命令コード列を受け付けるもの
である。具体的には、I/Oコントロール命令が引数付
で変数領域へのポインタがある場合は、機能一覧情報3
01の内容を指定の変数領域にコピーしてユーザモード
側に機能情報を渡したり、同様な命令で別定義の引数の
場合は、ドライバ内でメモリ領域を確保して、その命令
で表される新機能をコピーし、併せて機能一覧情報30
1を更新する、等の動作をする。301は機能一覧情報
で、現在のドライバ内の機能群情報を要約して、各機能
(関数)名とドライバ内アドレスを示すファイルであ
る。ドライバの機能が追加、削除される度にその内容が
変更される。
On the other hand, the driver side (kernel mode side) has the following elements. Reference numeral 106 denotes a command receiving means for receiving a new function command code string from the user mode side. Specifically, when the I / O control instruction has an argument and a pointer to a variable area, the function list information 3
01 is copied to a specified variable area and the function information is passed to the user mode side, or in the case of a different instruction with a similar instruction, a memory area is secured in the driver and represented by the instruction. Copy the new function and add function list information 30
1 is updated. Reference numeral 301 denotes a function list, which is a file that summarizes the function group information in the current driver and indicates each function (function) name and an address in the driver. Every time a driver function is added or deleted, its contents change.

【0016】本実施の形態における新しい要素は、以下
の通りである。即ち、ユーザモード側では、108はエ
ミュレータ用機能追加手段で、ユーザが新機能ソース1
01に記述した新機能命令コード列を、コンパイルする
ことなく直接、新機能追加手段105経由でドライバ側
の命令受付手段106に送るものである。ドライバ側で
は、109はエミュレート手段で、I/Oコントロール
ルーチンの一部となっており、エミュレータ用機能追加
手段から送られてくる命令コードを実行する。110は
エミュレータテーブルであり、図2に示すように、ミク
ロな詳細命令の名前とアドレスから構成されている。即
ち、図2(a)はユーザが作成するプログラムのソース
の一部を示しており、図2(b)(c)がエミュレータ
テーブル110の例を示し、(b)のヘッダ部200に
は命令名201とその命令列が格納されるアドレス20
2が書かれており、図2(c)のボディ部210は、そ
のアドレスにおける詳細命令のコード211が実行可能
形式で記述されている状態を示している。
The new elements in the present embodiment are as follows. That is, on the user mode side, reference numeral 108 denotes an emulator function adding unit, and the user inputs a new function source 1
01 is sent directly to the instruction receiving means 106 on the driver side via the new function adding means 105 without compiling. On the driver side, reference numeral 109 denotes emulation means, which is a part of the I / O control routine, and executes an instruction code sent from the emulator function addition means. Reference numeral 110 denotes an emulator table, as shown in FIG. 2, which is composed of the names and addresses of micro detailed instructions. That is, FIG. 2A shows a part of the source of a program created by the user, FIGS. 2B and 2C show examples of the emulator table 110, and the header section 200 in FIG. Name 20 and address 20 where its instruction string is stored
2 is written, and the body part 210 in FIG. 2C shows a state where the detailed instruction code 211 at the address is described in an executable format.

【0017】これらの新規要素である、エミュレータ用
機能追加手段108、エミュレート手段109、エミュ
レータテーブル110を含む装置の動作を説明する。新
機能のインストールのためにはエミュレータテーブル1
10の情報を知る必要がある。このエミュレータテーブ
ルは次のようにして得られる。図3はエミュレータテー
ブルに命令コードとそのアドレスをインストールする手
順を示す動作フローである。これは本実施の形態で説明
するエミュレート手段による動作の範囲外であるが、先
ずエミュレータテーブルの初期設定動作を説明する。エ
ミュレータテーブルは、新機能ソースに対応して詳細命
令毎に作成され、ステップ9801でボディ部210用
に命令コード列からなる(関数)を作成する。ステップ
9802でヘッダ部200用に命令名とアドレスを作成
する。本実施の形態では、本発明の範囲ではコンパイル
手段がなく、新機能追加手段105とエミュレータ用機
能追加手段108が、新機能ソース101に記述された
図2(A)で示される命令コード列を、ステップ980
3でドライバ内のデータ領域に格納する。
The operation of the apparatus including these new elements, ie, the emulator function adding means 108, the emulating means 109, and the emulator table 110 will be described. Emulator table 1 to install new features
You need to know 10 pieces of information. This emulator table is obtained as follows. FIG. 3 is an operation flow showing a procedure for installing an instruction code and its address in the emulator table. This is out of the range of the operation by the emulation means described in the present embodiment. First, the initial setting operation of the emulator table will be described. The emulator table is created for each detailed instruction corresponding to the new function source. In step 9801, a function (function) including an instruction code sequence is created for the body section 210. In step 9802, an instruction name and an address are created for the header section 200. In the present embodiment, there is no compiling means within the scope of the present invention, and the new function adding means 105 and the emulator function adding means 108 convert the instruction code sequence shown in FIG. , Step 980
In step 3, the data is stored in the data area in the driver.

【0018】図4は、例えば新機能を組み込もうとする
ドライバの、ユーザモード側の要素も含めての動作フロ
ーを示す図である。ここでは図2(a)の楕円で囲まれ
た、ADD詳細命令の追加を説明する。これは、ABC
という変数に1を足すという処理であり、ADDという
名の関数を使用する。ユーザが現在実行中のドライバに
対して新たな機能を追加する場合には、どのような変数
が使用されているのか等、現在実行中のドライバの状況
を把握することが必要である。そこで、ドライバが現在
サポートしているこれらの機能情報を把握するため、情
報獲得手段104を介してドライバに対して、システム
コール命令を発行する(ステップ9701)。この場合
のシステムコール命令としては、例えば、ドライバの機
能一覧情報リストをアドレッシングする引数ARG1を
有するI/Oコントロール命令を用いればよい。上記の
I/Oコントロール命令を受け取った命令受付手段10
6は、ドライバ内に組み込まれている機能一覧情報30
1を検索し、組み込まれている関数・変数の情報を獲得
して情報獲得手段104に返す(ステップ9702)。
FIG. 4 is a diagram showing an operation flow of a driver incorporating a new function, for example, including elements on the user mode side. Here, the addition of the ADD detailed instruction enclosed by the ellipse in FIG. 2A will be described. This is ABC
Is a process of adding 1 to the variable, and a function named ADD is used. When a user adds a new function to a currently running driver, it is necessary to grasp the status of the currently running driver, such as what variables are being used. Then, in order to grasp the function information currently supported by the driver, a system call instruction is issued to the driver via the information acquisition means 104 (step 9701). As the system call instruction in this case, for example, an I / O control instruction having an argument ARG1 for addressing the function list information list of the driver may be used. Command receiving means 10 receiving the above I / O control command
6 is a function list information 30 incorporated in the driver.
1 is retrieved, and the information of the incorporated function / variable is obtained and returned to the information obtaining means 104 (step 9702).

【0019】ユーザはこの情報を参考にして、新しい機
能を含んだソースコードの作成を行う(ステップ970
3)。ただし、使用できる命令は、エミュレータテーブ
ルに含まれている命令だけであるが、例えば、既にドラ
イバ内に組み込まれている機能を呼び出したり、既に組
み込まれている変数をアクセスできる命令コード列(実
質的には関数)を用意することができる。ユーザが作成
したプログラム内で既に組み込まれている関数・変数を
扱いたいときには機能一覧情報301より得られた値を
そのまま使用すればよい。ここまでは[従来の技術]で
説明した「ドライバ機能の動的管理方式及び動的管理方
法」と同じ動作をする。次にエミュレータ用機能追加手
段108を用いて、ドライバ側にプログラムを一行送る
(ステップ9704)。この時、エミュレータ用機能追
加手段108は、命令受付手段106に対してI/Oコ
ントロール命令により転送の作業を行う。プログラムは
例えば、I/Oコントロール命令発行時の引数の一つと
して渡す方法が考えられる。図2(a)の「ADD」の
例であれば、「ADD ABC1」を送る。つまりAB
Cという変数に1を足す処理である。命令受付手段10
6は、ドライバ領域内にこの一行のプログラムのサイズ
に応じた領域を確保し、プログラムの実行を行う。一方
のエミュレータ用機能追加手段108は、ドライバ側か
らのリターンを待つ。
The user creates a source code including a new function by referring to this information (step 970).
3). However, only the instructions included in the emulator table can be used. For example, an instruction code string that can call a function already incorporated in the driver or access a variable already incorporated (substantially, for example) Function) can be prepared. When it is desired to handle a function / variable already incorporated in a program created by the user, the value obtained from the function list information 301 may be used as it is. The operation so far is the same as the "dynamic management method and dynamic management method of driver function" described in [Prior Art]. Next, one line of the program is sent to the driver using the emulator function adding means 108 (step 9704). At this time, the emulator function adding unit 108 performs a transfer operation to the instruction receiving unit 106 by an I / O control instruction. For example, a method of passing the program as one of the arguments at the time of issuing the I / O control instruction is considered. In the case of the example of “ADD” in FIG. 2A, “ADD ABC1” is sent. That is, AB
This is a process of adding 1 to a variable C. Command receiving means 10
Reference numeral 6 secures an area corresponding to the size of the one-line program in the driver area, and executes the program. One emulator function adding unit 108 waits for a return from the driver.

【0020】次にエミュレート手段109は、この一行
のプログラムを受け取り、エミュレータテーブルのヘッ
ダ部200と照らし合わせ、一行の中に入っている命令
と一致するものがあれば該当する命令のアドレス、すな
わちエミュレータテーブルのボディ部を呼び出す(ステ
ップ9705)。この例であれば、201のADDが命
令と一致し、202の「0X80001100」のアド
レスのコードを呼び出す。このアドレスにあるコードは
足し算を行う関数であり、引数1を足す処理が行われ
る。一行の中から命令の文字列を取り出す方法として、
例えば、このプログラムの言語のフォーマットとして、
命令、引数1、引数2、と続くような文法で表記したと
すると、命令、引数のそれぞれの間に空白を入れること
によって、命令を指し示している文字列を特定すること
が可能である。また、引数もそのまま対応するエミュレ
ータテーブルのボディ部を呼び出す際に渡すことが可能
である。また、エミュレータテーブル内に該当する命令
が無かった場合には、何もせずに終わるようにする。命
令の実行後は、リターン値があれば、それを呼び出した
側であるエミュレータ用機能追加手段108に返す。ま
た、処理が異常であった場合にはそれらを示すリターン
値をあわせて返す。
Next, the emulation means 109 receives this one-line program, compares it with the header section 200 of the emulator table, and if there is an instruction that matches the instruction contained in one line, the address of the corresponding instruction, that is, The body of the emulator table is called (step 9705). In this example, the ADD of 201 matches the instruction, and the code of the address of “0X80001100” of 202 is called. The code at this address is a function for performing addition, and processing for adding argument 1 is performed. As a method of extracting the character string of the instruction from one line,
For example, as the language format of this program,
Assuming that the command, argument 1, argument 2, and the following grammar are used, it is possible to specify a character string indicating the command by inserting a space between each of the command and argument. Further, the argument can be passed as it is when calling the body part of the corresponding emulator table. If there is no corresponding instruction in the emulator table, the processing ends without doing anything. After the execution of the instruction, if there is a return value, the return value is returned to the emulator function adding means 108 which has called the return value. If the processing is abnormal, a return value indicating them is also returned.

【0021】次にエミュレータ用機能追加手段108
は、まず、リターン値があればそれを確認し、以降の新
規プログラムで使用すべきものであればそれに使用す
る。また前回の処理が異常であることを伝えるリターン
値が返されていたならば、以降の処理を停止するもしく
はユーザにどのようにするか判断を仰ぐ処置を取るなど
が考えられる。新規プログラムがまだあるかを確認し、
あるならば、ステップ9704に戻る(ステップ970
6)。新規プログラムが無くなれば、エミュレータ用機
能追加手段の処理は終了する。以上のように、ドライバ
側に命令受付手段106とI/Oコントロールルーチン
の一部としてのエミュレート手段109を組み込んでお
き、更に詳細命令をエミュレータテーブルで管理表示
し、それらをユーザモード側の新機能追加手段105と
エミュレータ用機能追加手段108により新機能ソース
101に追加された新機能コードを送り込んで実行す
る。以降、ユーザが新機能の再使用を指定するには、上
記のインストールによって機能一覧情報301に残って
いるので、既実行の情報が残されており、従ってエミュ
レータ用機能追加手段108を呼ぶ際の引数にこれを指
定すればよい。従って本実施の形態によれば、オペレー
ティングシステム上で実行中のドライバを停止すること
無く、かつ、新たな開発環境を使わずに新たな機能を追
加することができる。
Next, emulator function adding means 108
First checks the return value, if any, and uses it if it should be used in a new program. If a return value indicating that the previous process is abnormal is returned, it is conceivable to stop the subsequent processes or take a measure for asking the user what to do. Check if there are any new programs,
If there is, return to step 9704 (step 970)
6). When there is no new program, the processing of the emulator function adding means ends. As described above, the command receiving means 106 and the emulation means 109 as a part of the I / O control routine are incorporated in the driver side, and further detailed instructions are managed and displayed in the emulator table, and are displayed on the user mode side. The new function code added to the new function source 101 by the function adding means 105 and the emulator function adding means 108 is sent and executed. Thereafter, in order for the user to specify reuse of the new function, the previously executed information remains because the information remains in the function list information 301 due to the above-described installation. You can specify this as an argument. Therefore, according to the present embodiment, new functions can be added without stopping the driver running on the operating system and without using a new development environment.

【0022】実施の形態2.次に、本発明の他の実施の
形態を図5ないし図6に基づいて説明する。本実施の形
態は、動的に一行分用意していたバッファをエミュレー
タテーブルまたはエミュレート手段内に有することで、
新しいプログラムを一行ずつドライバ側に送って実行す
るのではなく、一括して送るようにしたものである。図
5は、本実施の形態におけるエミュレータテーブルの構
成を示すものであり、実施の形態1と比較して、構成要
素220で示されるバッファ、構成要素230で示され
る実行ポインタが新たに加えられている。実行ポインタ
230は、今現在どの位置で実行しているのかを示す。
Embodiment 2 FIG. Next, another embodiment of the present invention will be described with reference to FIGS. In this embodiment, the buffer prepared for one line is dynamically provided in the emulator table or the emulation means.
Instead of sending the new program line by line to the driver and executing it, it is sent in batches. FIG. 5 shows the configuration of the emulator table in the present embodiment. Compared to the first embodiment, a buffer indicated by component 220 and an execution pointer indicated by component 230 are newly added. I have. The execution pointer 230 indicates at which position the program is currently being executed.

【0023】次に、図6のフローチャートを用い、新機
能ソースの追加方法について、実施の形態1との差異に
着目して説明する。まず、新機能を作成するまでのステ
ップ9601〜ステップ9603は、実施の形態1の場
合を示す図4のステップ9701〜ステップ9703と
同様の処理を行う。その後、実施の形態1ではエミュレ
ータ用機能追加手段108が一行ずつプログラムを送っ
ていたのに対し、本実施の形態では、一括して送ってし
まう。(ステップ9604)。本実施の形態と、実施の
形態1の双方を同一システムで使い分けることが可能で
ある。使い分けを行うには、例えば、I/Oコントロー
ル命令を用いてドライバに対してデータを送る際に、新
たに引数を設け、この引数の値によってどちらなのかを
エミュレート手段に伝える方法が考えられる。エミュレ
ート手段側としては、この引数を参照し、どちらに対処
した処理を行えばよいのか分岐すればよい。
Next, a method of adding a new function source will be described with reference to the flowchart of FIG. 6, focusing on differences from the first embodiment. First, in steps 9601 to 9603 until a new function is created, the same processing as steps 9701 to 9703 in FIG. 4 showing the case of the first embodiment is performed. After that, in the first embodiment, the emulator function adding unit 108 sends the program line by line, whereas in the present embodiment, the program is sent collectively. (Step 9604). It is possible to use both the present embodiment and the first embodiment in the same system. In order to perform proper use, for example, when data is sent to the driver using an I / O control instruction, a new argument is provided, and the value of the argument is used to inform the emulation means of which one is used. . On the emulation means side, it is only necessary to refer to this argument and branch to which processing should be performed.

【0024】新規プログラムを受け取った命令受付手段
106は、引数よりエミュレータ処理を必要とするもの
と判断し、エミュレータ手段109に処理を移す。エミ
ュレータ手段109では、その内容を、エミュレータテ
ーブル110内のバッファ領域220に代入する(ステ
ップ9604)。この時、どの位置で実行しているのか
を示す、実行ポインタ230にはバッファの先頭位置を
示す値を代入しておく。バッファへのデータ入力方法と
しては、例えば、文字列をそのまま入れる方法とかでも
よく、その場合には、実行ポインタはバッファの先頭か
ら何行目にあるかを示す値が適切となる。もちろん実行
ポインタに物理アドレス値を代入してもよい。次に、エ
ミュレート手段109は、バッファ220にまだ処理を
行わなければならないプログラムが残っているのかを確
認する(ステップ9607)。この時、プログラムが残
っているかどうかを確認する方法として、例えば、実行
カウンタを使う方法があげられる。先の例を用いて説明
すると、実行カウンタに行番号を使用する場合には、予
め、バッファに全部で何行読み込んだかをデータ領域に
記録しておき、これと比較する方法が考えられる。ま
た、実行カウンタに物理アドレスを使用する場合におい
ても、バッファに読み込んだ総量を同様に記録してお
き、比較する方法が考えられる。まだバッファにプログ
ラムがある場合には、ステップ9605からの処理を繰
り返し、無い場合には処理を終了する。プログラムの終
了をする場合には、バッファ220と実行カウンタ23
0の開放を行う(ステップ9608)。
The instruction receiving means 106 that has received the new program determines that emulator processing is required based on the argument, and shifts the processing to the emulator means 109. The emulator 109 substitutes the contents into the buffer area 220 in the emulator table 110 (step 9604). At this time, a value indicating the head position of the buffer is assigned to the execution pointer 230 indicating the position where the execution is being performed. As a method of inputting data to the buffer, for example, a method of directly inputting a character string may be used. In such a case, a value indicating the number of the line from the head of the buffer of the execution pointer is appropriate. Of course, the physical address value may be substituted for the execution pointer. Next, the emulation means 109 checks whether or not there is a program that still needs to be processed in the buffer 220 (step 9607). At this time, as a method of checking whether or not the program remains, for example, a method of using an execution counter can be cited. To explain using the above example, when a line number is used for the execution counter, a method is conceivable in which the total number of lines read into the buffer is recorded in the data area in advance and compared with this. Further, even when a physical address is used for the execution counter, a method of recording the total amount read into the buffer in the same manner and comparing the total amount can be considered. If there is still a program in the buffer, the processing from step 9605 is repeated, and if not, the processing is terminated. When ending the program, the buffer 220 and the execution counter 23
0 is released (step 9608).

【0025】以上の実施の形態2では、新規に作成した
プログラムを一度に読み込むようにしたものであるが、
次にこの一度作成し実行したプログラムを再度・繰り返
し使用したいような場合を説明する。新機能ソース10
1に追記されたドライバの新機能は、命令受付手段に送
られてエミュレート手段がエミュレータテーブルを見な
がら実行するが、このプログラムを新機能としてドライ
バ側で新機能一覧情報に登録する。こうするとユーザは
マップファイルにより容易にこの新機能が判り、直接利
用ができる。図7は図1に対応する構成図で図8は図4
に対応する動作フロー図である。即ちエミュレート手段
109によって実行された新規に作成された新機能ソー
スが実行した内容を機能群107の中に新たに作成する
ようにしたものである。図7中の既出の番号の構成要素
は図1、図5の対応するものと同一であり、構成要素の
エミュレート結果変換手段111だけが唯一、新たに加
えられたものである。
In the second embodiment, a newly created program is read at a time.
Next, a case where it is desired to use the once created and executed program again and repeatedly will be described. New Function Source 10
The new function of the driver added to 1 is sent to the instruction receiving means and executed by the emulation means while looking at the emulator table. The driver registers this program in the new function list information as a new function. In this way, the user can easily understand the new function from the map file and can use it directly. FIG. 7 is a block diagram corresponding to FIG.
FIG. 7 is an operation flowchart corresponding to FIG. That is, the contents executed by the newly created new function source executed by the emulation means 109 are newly created in the function group 107. 7 are the same as those in FIG. 1 and FIG. 5, and only the emulation result conversion means 111 of the component is newly added.

【0026】次に図8のフローチャートを用いて、実行
し終えた新機能ソースを機能群に追加する手順について
説明を行う。ここでは、図7において、107Cで示さ
れている機能Cが最初は機能群に無い状態であり、新た
に作成した新機能をこの機能Cとして追加する場合につ
いて説明を行う。まず、新機能を作成、実行を繰り返し
行うところまでのステップ9501〜ステップ9507
は、図6のステップ9601〜ステップ9607と同様
の処理を行う。全ての処理が終了した後、エミュレート
結果変換手段111は、実行し終えた、バッファ内のプ
ログラムを実行可能なコードに変換し、機能C(107
C)として機能群に代入する(ステップ9508)。次
に、機能一覧情報301の更新を行い(ステップ950
9)、最後にバッファ・実行カウンタの解放を行う(ス
テップ9510)。
Next, the procedure for adding the executed new function source to the function group will be described with reference to the flowchart of FIG. Here, a case will be described in which the function C indicated by 107C in FIG. 7 is initially not in the function group, and a newly created new function is added as this function C. First, steps 9501 to 9507 until a new function is created and executed repeatedly.
Performs the same processing as Steps 9601 to 9607 in FIG. After all the processes are completed, the emulation result conversion unit 111 converts the executed program in the buffer into executable code, and executes the function C (107).
C) is assigned to the function group (step 9508). Next, the function list information 301 is updated (step 950).
9) Finally, the buffer / execution counter is released (step 9510).

【0027】実行した新機能プログラムを機能群に挿入
するために行うコード化であるが、以下のように対処す
ることが考えられる。エミュレート手段109は、ステ
ップ9506において新機能プログラムを一行ずつ実行
しているのであるが、これは既に実施の形態1において
述べたように、実際には、一行中の命令文を解析し、命
令に対応する関数へ場合によっては引数を添えて「サブ
ルーチン呼び出し」を繰り返し行っているのである。こ
の時、実際に実行したこのサブルーチンコールをメモリ
に記録しておけば、全プログラムを実行し終えたときに
は、新機能プログラムのコードが完成する。後はこの内
容を、機能群に入れるだけでよい。以上、説明したよう
にエミュレート結果変更手段111を設けて機能一覧情
報にまとめることで、新規に作成し、実行したプログラ
ムを新たな機能として、機能群に加えることが可能とな
る。また実施の形態1と同様、実行中のドライバを止め
なくても新機能を追加することができる。
Although the coding is performed to insert the executed new function program into the function group, the following measures can be considered. The emulation means 109 executes the new function program one line at a time in step 9506. This is, as already described in the first embodiment, actually analyzing the statement in one line and executing the command. Is called repeatedly with an argument in some cases. At this time, if the actually executed subroutine call is recorded in the memory, the code of the new function program is completed when all the programs have been executed. All that is required is to put this content into the function group. As described above, by providing the emulation result changing unit 111 and collecting it in the function list information, it is possible to add a newly created and executed program as a new function to the function group. Also, as in the first embodiment, new functions can be added without stopping the driver being executed.

【0028】実施の形態3.先の実施の形態では、ドラ
イバの詳細命令として既にエミュレータテーブルにある
ものを使用して機能追加をする場合を説明したが、本実
施の形態では未だエミュレータテーブルにはない新しい
詳細命令をエミュレータテーブルにも追加し、これらを
使用した新機能を追加する場合を説明する。以下、本実
施の形態について、図9ないし図10に基づいて説明す
る。図9は本実施の形態における装置の構成図であり、
図7の構成にエミュレートテーブル変更手段112を新
たに備えたものである。図10は本実施の形態における
110bエミュレータテーブルを示すものであり、ここ
では、新たな命令Zを追加する際の動作について説明す
るために、ヘッダ部200およびボディ部210に対し
て命令Zに関連する新たな構成要素201Z、202
Z、211Zを追加してある。
Embodiment 3 In the above-described embodiment, a case has been described in which a function is added by using a driver already existing in the emulator table as a detailed instruction. In the present embodiment, a new detailed instruction not yet in the emulator table is added to the emulator table. The case where a new function using these functions is added will be described. Hereinafter, the present embodiment will be described with reference to FIGS. FIG. 9 is a configuration diagram of an apparatus according to the present embodiment.
The emulation table changing means 112 is newly provided in the configuration of FIG. FIG. 10 shows the 110b emulator table in the present embodiment. Here, in order to explain the operation when adding a new instruction Z, the header 200 and the body 210 are related to the instruction Z. New components 201Z and 202
Z and 211Z are added.

【0029】次に図11のフローチャートを用いて、エ
ミュレータテーブルに対して新しい命令を追加する手順
について説明を行う。例えば、先の実施の形態にて説明
してきたように、ヘッダ部には命令の文字列とそのアド
レスが入っているようなエミュレータテーブルを使用し
ていたとすると、最初に新しい命令の関数を作成し、コ
ンパイルする(ステップ9401)。次に、コンパイル
し終えたオブジェクトコードと、新しい命令の名前、を
ドライバ側に渡す。ドライバ側に送るに当たっては、
[従来の技術]で述べた「ドライバ機能の動的管理方式
及び動的管理方法」においてと同様に、図9中の新機能
追加手段105と命令受付手段106を用いてドライバ
側に送り、エミュレータテーブル変更手段に内容を渡
す。この作業を行うには、例えば、新機能追加手段10
5を使う際に、システムコール命令で命令受付手段10
6にデータを渡すのであるが、この際、第1の引数に
は、このコールがエミュレータテーブルへの追加を示す
値を、第2の引数には、新規追加するデータを入れるこ
とにより、新しい命令の名前とオブジェクトコードを、
エミュレータテーブル変換手段112に渡すことが可能
となる(ステップ9402)。
Next, a procedure for adding a new instruction to the emulator table will be described with reference to the flowchart of FIG. For example, as described in the above embodiment, if an emulator table is used in which a header section contains a character string of an instruction and its address, first, a function for a new instruction is created. Compile (step 9401). Next, the compiled object code and the name of the new instruction are passed to the driver. When sending to the driver side,
Similarly to the "dynamic management method and dynamic management method of driver function" described in [Prior Art], the driver is sent to the driver using the new function adding means 105 and the instruction receiving means 106 in FIG. Pass the contents to the table change means. To perform this operation, for example, the new function adding unit 10
5 when using the system call command, the command receiving means 10
In this case, a value indicating that this call is to be added to the emulator table is provided in the first argument, and data to be newly added is provided in the second argument. The name and object code of
It can be passed to the emulator table conversion means 112 (step 9402).

【0030】次にこのエミュレータテーブル変換手段1
12内では、エミュレータテーブルに対して新しい情報
の追加を行う。例えば、命令Zを追加するには、まず、
ボディ部に命令Zのコード211Zを代入する。この命
令内にて参照している他の変数、関数がある場合には、
機能一覧情報301を参考にし、アドレスの確定を行
う。次に、ヘッダ部には、命令Zの名前を201Zに、
そして先ほど代入したボディ部の位置、つまりアドレス
値を命令Zのコードのあるアドレス202Zに代入す
る。(ステップ9403)。このように、エミュレータ
テーブル変更手段を追加することによって、使用中であ
るエミュレータテーブルに対して新しい命令を追加する
ことが可能となる。
Next, this emulator table conversion means 1
In 12, new information is added to the emulator table. For example, to add instruction Z, first
The code 211Z of the instruction Z is assigned to the body part. If there are other variables and functions referenced in this instruction,
The address is determined with reference to the function list information 301. Next, in the header part, the name of the instruction Z is set to 201Z,
Then, the position of the body part, that is, the address value substituted earlier, that is, the address value is substituted into the address 202Z where the code of the instruction Z is present. (Step 9403). In this way, by adding the emulator table changing means, it becomes possible to add a new instruction to the emulator table being used.

【0031】実施の形態4.次に、本実施形態の装置に
ついて、図12に基づいて説明する。本実施の形態で
は、エミュレータテーブルを一つだけではなく、複数備
え、ある一種類のプログラム言語だけではなく、複数の
プログラム言語に対応できる場合を説明する。図12は
本実施の形態におけるエミュレータテーブルの違いを示
す構成図であり、ここでは、三種類の言語、D、E、
F、に対応したエミュレータテーブル110D、110
E、110Fが備えられている。
Embodiment 4 FIG. Next, the device of the present embodiment will be described with reference to FIG. In the present embodiment, a case will be described in which not only one emulator table but also a plurality of emulator tables are provided, and the emulator table can support not only one type of programming language but also a plurality of programming languages. FIG. 12 is a configuration diagram showing a difference between emulator tables in the present embodiment. In this example, three types of languages, D, E,
F, emulator tables 110D and 110 corresponding to
E, 110F are provided.

【0032】新機能ソースの追加方法は、基本的にエミ
ュレータテーブルが単一の場合と同様である。ただ、そ
の新機能ソース101からの命令コードがどの言語に対
応しているのかを対応づけて認識させなければならな
い。どの言語に対応しているのかを認識させるには、エ
ミュレータ用新機能追加手段108を使う際に、システ
ムコール命令で命令受付手段106にデータを渡すので
あるが、例えば、エミュレータ用新機能追加手段108
がI/Oコントロール命令を発する際に、引数として、
このコールがどの言語に対応しているものなのか、つま
り、どのエミュレータテーブルへのアクセスを要求する
ものなのかを指定するようにすればよい。各テーブルの
アドレス認知方法としては、それぞれのテーブルへのポ
インタを、一個所にまとめたテーブルにし、まずはその
テーブルを検索するようにすればよい。このように、エ
ミュレータテーブルを使用した言語の数だけ複数個用意
することによって、複数の言語に対応したプログラムを
新規に作成、実行することが可能となる。
The method of adding a new function source is basically the same as in the case of a single emulator table. However, it is necessary to associate and recognize which language the instruction code from the new function source 101 corresponds to. In order to recognize which language is supported, data is passed to the instruction accepting means 106 by a system call instruction when using the new emulator adding means 108. 108
Issues an I / O control instruction,
You can specify which language this call corresponds to, that is, which emulator table you need to access. As a method of recognizing the address of each table, pointers to the respective tables may be combined into a single table, and the table may be searched first. In this way, by preparing a plurality of languages corresponding to the number of languages using the emulator table, it is possible to newly create and execute a program corresponding to a plurality of languages.

【0033】実施の形態5.ここでは、複数の処理を実
行させるとき、CPUを占有してしまわないようにCP
Uの使用の度合いを示す数値を含むフラグを新たに用意
し、それを用いて分配を行う方法を説明する。こうすれ
ば、ドライバレベルという高優先度で実行されるプログ
ラムがWindowsの処理を滞らせることを防ぐこと
ができる。本実施の形態の装置について、図13ないし
図14に基づいて説明する。本実施の形態では、各言語
に対応したエミュレータテーブルごとに、バッファ22
0内のプログラムが実行する際、CPUをどれだけ占有
しても良いかを示す変数と、現在どれほどCPUを使用
(占有)したかを示す変数を有し、新規に作成したプロ
グラムがOSの他の操作を阻害しないように監視してい
る。図13は、本実施の形態における各言語ごとのエミ
ュレータテーブル220内の構成を示すものであり、先
の実施の形態で説明した図5と比較して、構成要素24
0で示されるCPU占有率と、構成要素250で示され
るCPU使用度が追加されている。
Embodiment 5 FIG. Here, when a plurality of processes are executed, the CPU is controlled so as not to occupy the CPU.
A method will be described in which a flag including a numerical value indicating the degree of use of U is newly prepared, and distribution is performed using the flag. In this way, it is possible to prevent a program executed at a high priority of the driver level from delaying Windows processing. An apparatus according to the present embodiment will be described with reference to FIGS. In the present embodiment, a buffer 22 is provided for each emulator table corresponding to each language.
0 has a variable indicating how much the CPU may be occupied when executing the program, and a variable indicating how much the CPU is currently used (occupied). Is monitored so as not to disturb the operation. FIG. 13 shows the configuration of the emulator table 220 for each language in the present embodiment. The configuration of the emulator table 220 differs from that of FIG. 5 described in the previous embodiment.
The CPU occupancy indicated by 0 and the CPU usage indicated by the component 250 are added.

【0034】次にCPU占有率とCPU使用度を利用し
た、CPU分配方法について説明する。 (1)まず、CPU占有率240とCPU使用度250
の初期化動作について説明する。初期化に必要な処理
は、それぞれに所望の数値を代入するだけなのである
が、条件として、プログラム自体を実行する前に行わな
ければならない。例えば、新機能ソース101を作成す
る時、プログラムの先頭行に必ず、CPU占有率の数値
を書くようにして情報をエミュレータテーブル側に渡す
方法が考えられる。また、変更をしやすくすることに重
点を置いて、新機能ソースの中にはCPU占有率を書き
込まず、エミュレータ用機能追加手段108がI/Oコ
ントロール命令を発行する際の引数として、このCPU
占有率を追加し、命令受付手段106に渡すようにする
ことも考えられる。
Next, a CPU distribution method utilizing the CPU occupancy and the CPU usage will be described. (1) First, CPU occupancy 240 and CPU usage 250
Will be described. The processing required for the initialization is simply to assign a desired numerical value to each, but it must be performed before executing the program itself as a condition. For example, when creating the new function source 101, a method is conceivable in which the numerical value of the CPU occupancy is always written in the first line of the program and the information is passed to the emulator table. Also, emphasis is placed on making it easy to change, and the CPU occupancy is not written in the new function source, and the emulator function adding unit 108 uses this CPU as an argument when issuing an I / O control instruction.
It is also conceivable to add the occupancy and pass it to the command receiving means 106.

【0035】(2)次に、この両方の変数を使用して、
実際にCPUの分配する手順について、図14を使って
説明する。まず、現在実行中のドライバに新たな機能を
ソースで実行するのに必要な作業を図14のフローチャ
ートに示す。基本的に、実施の形態2で述べた時に使用
した、図6のフローチャートと同じであるが、唯一違う
点は、繰り返しプログラムを実行する前に、CPUの使
用率を書き込み、占有率を上回っていないのかの確認を
行うことである。
(2) Next, using both variables,
The procedure of actually distributing the CPU will be described with reference to FIG. First, the work required to execute a new function in the source for the currently executing driver is shown in the flowchart of FIG. Basically, it is the same as the flowchart of FIG. 6 used in the description of the second embodiment, except that the CPU usage rate is written and exceeds the occupancy rate before repeatedly executing the program. Is to make sure they are not there.

【0036】次に図14のフローチャートを用い、CP
U占有率を考慮し、新たな機能をソースで実行するのに
必要な作業について、実施の形態2との差異に着目して
説明する。まず、新機能を作成し、一行目の実行を行う
までのステップ9301〜ステップ9306は、図6の
ステップ9601〜9606と同じである。一行実行し
た後には、この一行の実行によってどれだけCPUを占
有したかの数値をCPU使用率に代入する(ステップ9
320)。これは、例えば、実行前の時刻と、実行後の
時刻を計測し、その差分を使ってもよい、またタイマを
設定し、実行前と後での差分を代入してもよい。次にま
だステップ9307にてプログラムがあるかどうか確認
し、ある場合には、CPU占有率との比較をおこなう
(ステップ9321)。これは、例えば、基底時間を1
0ミリ秒とし、この10%とかいう設定としておけば、
先ほどのステップ9320にて代入したCPU使用率の
数値から、どれだけの割合を使用したかを判定する方法
が考えられる。
Next, using the flowchart of FIG.
The work required to execute a new function on the source in consideration of the U occupancy will be described focusing on differences from the second embodiment. First, steps 9301 to 9306 from creation of a new function to execution of the first line are the same as steps 9601 to 9606 in FIG. After the execution of one line, a numerical value indicating how much the CPU is occupied by the execution of this line is substituted into the CPU utilization (step 9).
320). For example, the time before execution and the time after execution may be measured and the difference may be used, or a timer may be set and the difference between before and after execution may be substituted. Next, it is checked in step 9307 whether or not there is a program. If there is, a comparison is made with the CPU occupancy (step 9321). This means, for example, that the base time is 1
If you set 0 milliseconds and set this to 10%,
From the numerical value of the CPU usage rate substituted in the previous step 9320, a method of determining what percentage has been used can be considered.

【0037】もし、CPU占有率を超えていなければ、
ステップ9305からを繰り返す。逆に超えていたなら
ば、CPU使用率をリセットし(ステップ9322)、
SLEEPして、CPUを他の処理に明け渡す(ステッ
プ9323)。これは例えば、自分の処理を行っていた
タスクをある一定時間SLEEPする方法が考えられ
る。プログラムを全部完了し、ステップ9307でNO
となった後は、先の実施の形態2同様、バッファ・実行
カウンタの解放を行い処理をすべて完了する(ステップ
9308)。以上のように、エミュレータテーブル内
に、CPU使用の割合を示すCPU使用率と、そのプロ
グラムがCPUをどれだけ使用してよいかを示すCPU
占有率を用いることにより、新たな機能をドライバに追
加実行する際、CPUを占有してしまって他のアプリケ
ーションおよびOSが実行できなくなることが防げる。
また、使用率を指定できるため、実行したい処理に応じ
たCPU配分を行うことが可能となる。
If the CPU occupancy is not exceeded,
Repeat from step 9305. On the contrary, if it exceeds, the CPU usage rate is reset (step 9322),
After SLEEP, the CPU surrenders to another process (step 9323). For example, a method of SLEEPing a task performing its own process for a certain period of time can be considered. Complete the entire program, NO at step 9307
After that, the buffer / execution counter is released and all the processing is completed as in the second embodiment (step 9308). As described above, in the emulator table, the CPU usage rate indicating the percentage of CPU usage and the CPU usage amount indicating how much the program can use the CPU.
By using the occupancy, it is possible to prevent a situation where the CPU is occupied and other applications and the OS cannot be executed when a new function is additionally executed in the driver.
In addition, since the usage rate can be specified, it is possible to allocate the CPU according to the processing to be executed.

【0038】実施の形態6.先の実施の形態において
は、ドライバ内での機能の処理全体に対してCPUの占
有の度合いを制限していたのに対して、ここでは、ドラ
イバ内部の処理が複数あり、それぞれを個別にCPU占
有率を設定することを目的とする。次に、本実施の形態
の装置について、図15に基づいて説明する。本実施の
形態では、各言語に対応したエミュレータテーブル一つ
一つに対して、バッファ、CPU占有率、CPU使用率
を持たせることで、各エミュレータテーブルにつき、新
規に作成したプログラムを複数同時に実行させる。図1
5は、本実施の形態におけるエミュレータテーブルの構
成を示す図であり、ここでは、3種類のタスクを同時に
実行できるような設定状況であると想定する。このた
め、新たに番号を振り直した構成要素が加えられてい
る。想定している複数のタスク名は、タスクG、タスク
H、タスクIであり、それぞれにバッファ(220G〜
220I)、実行ポインタ(230G〜230I)、C
PU占有率(240G〜240I)、CPU使用度(2
50G〜250I)が備わっている。
Embodiment 6 FIG. In the above embodiment, the degree of occupation of the CPU is limited for the entire processing of the functions in the driver. On the other hand, here, there are a plurality of processings inside the driver, and each processing is individually performed by the CPU. The purpose is to set the occupancy. Next, an apparatus according to the present embodiment will be described with reference to FIG. In this embodiment, a plurality of newly created programs are simultaneously executed for each emulator table by providing a buffer, a CPU occupancy rate, and a CPU usage rate for each emulator table corresponding to each language. Let it. FIG.
FIG. 5 is a diagram showing a configuration of an emulator table according to the present embodiment. Here, it is assumed that the setting situation is such that three types of tasks can be executed simultaneously. For this reason, newly renumbered components have been added. The assumed plurality of task names are task G, task H, and task I, each of which has a buffer (220G to 220G).
220I), execution pointers (230G to 230I), C
PU occupancy (240G-240I), CPU usage (2
50G to 250I).

【0039】複数のバッファ類を有する本実施の形態の
動作であるが、一つしかない先の実施の形態と変わりは
ない。ただ、どのタスクとして実行するのかを区別する
必要があり、例えば、エミュレータ機能追加手段108
から、命令受付手段106を呼び出すときの、I/Oコ
ントロール命令発行時に、引数を追加し、この引数に、
どのタスク(本例で言えば、GかHかIかを例えば数値
の0、1、2で)かを指定すればよい。以上のように、
本実施の形態のように、エミュレータテーブル内に、新
規に作成されたプログラムを一度に読み込むためのバッ
ファ、どこまで実行したかを示す実行ポインタ、CPU
の占有率を定める変数、これまでにどれほどCPUを使
ったかを示す変数、を同時に実行したタスクの数だけ揃
えることにより、複数タスクの実行が可能となる。
The operation of this embodiment having a plurality of buffers is the same as that of the previous embodiment having only one buffer. However, it is necessary to distinguish which task is to be executed.
When an I / O control instruction is issued when the instruction receiving means 106 is called, an argument is added.
What task (in this example, G, H or I, for example, numerical values 0, 1, and 2) may be specified. As mentioned above,
As in the present embodiment, a buffer for reading a newly created program at a time in the emulator table, an execution pointer indicating how far the program has been executed, a CPU
A plurality of tasks can be executed by aligning the variables that determine the occupation ratio of the task, and the variables indicating how much CPU has been used so far, by the number of tasks that have been executed at the same time.

【0040】実施の形態7.一度新しい機能を追加すれ
ば、同じ処理を複数回実行できるドライバ拡張装置を説
明する。通常は、一度新しい機能をソースで送り、実行
してもらい、また再度実行するには、再びソースを送る
か、機能群に貯えられた新機能を実行してくれという命
令を送らなければならないのが、当機能により、一度ソ
ースを送った時点でそのプログラムを何回繰り返せばよ
いのかを指定することができる。次に、本実施の形態の
装置について、説明する。本実施の形態では、エミュレ
ータテーブル内にて実行されるタスクに対して、実行回
数のカウンタを有することによって、そのタスクを一回
だけではなく、複数回実行させることができる。図16
は、本実施の形態におけるエミュレータテーブルの構成
を示す図であり、ここでは、3種類のタスクを同時に実
行できるような設定状況であると想定する。想定してい
るのはタスクG、タスクH、タスクIであり、それぞれ
に新たな構成要素として、くり返し回数(260G〜2
60I)が備わっている。
Embodiment 7 A driver extension device that can execute the same processing a plurality of times once a new function is added will be described. Usually, once you send a new function to the source and have it executed, you have to send the source again or send a command to execute the new function stored in the function group to execute it again. However, this function allows you to specify how many times the program should be repeated once the source has been sent. Next, the device of the present embodiment will be described. In the present embodiment, a task executed in the emulator table is provided with a counter for the number of executions, so that the task can be executed not only once but also a plurality of times. FIG.
FIG. 3 is a diagram showing a configuration of an emulator table according to the present embodiment. Here, it is assumed that the setting situation is such that three types of tasks can be executed simultaneously. It is assumed that task G, task H, and task I are assumed, and the number of repetitions (260 G to 2
60I).

【0041】本実施の形態の動作を図17のフローチャ
ートを使って説明する。図中のステップ9201〜92
08は図6のステップ9601〜9608と同じであ
り、本フローチャートで新たに加えられたのはステップ
9220、9221と9222である。ここではタスク
Gを例にとって説明する。まず、新規に作成したプログ
ラムをドライバ側に送るステップ9201〜9204ま
では先と同じである。次に、繰り返し回数260Gに値
を代入する。この値の受け渡し方法だが、これもエミュ
レータ用機能追加手段108から命令受付手段106を
呼び出すときのI/Oコントロール命令発行時に、新た
な引数として渡すようにすればよい。プログラムの実行
を行うステップ9205から9207は先と同じであ
る。プログラムの実行が終了すると、くり返しカウンタ
の値を確認し、0でない場合には、諸変数の初期化を行
い(ステップ9222)、処理を繰り返す。諸変数の初
期化には、実行ポインタの初期化や、くり返しカウンタ
のデクリメント作業が含まれる。くり返しカウンタが0
になると、バッファおよび実行カウンタを解放し、処理
を完了する(ステップ9208)。以上のように、本実
施形態のように、エミュレータテーブル内に、新規に作
成されたプログラムを何回繰り返し実行するかを示す変
数を揃えることにより、複数回実行しなければならない
タスクを容易に設定・実行することが可能となる。
The operation of this embodiment will be described with reference to the flowchart of FIG. Steps 9201 to 92 in the figure
08 is the same as steps 9601 to 9608 in FIG. 6, and steps 9220, 9221, and 9222 are newly added in this flowchart. Here, the task G will be described as an example. First, steps 9201 to 9204 for sending a newly created program to the driver are the same as above. Next, a value is substituted for the number of repetitions 260G. As for the method of passing this value, the value may be passed as a new argument when an I / O control command is issued when the command receiving means 106 is called from the emulator function adding means 108. Steps 9205 to 9207 for executing the program are the same as above. When the execution of the program is completed, the value of the repeat counter is checked. If the value is not 0, various variables are initialized (step 9222), and the process is repeated. Initialization of various variables includes initialization of an execution pointer and decrementing of a repeat counter. Repeat counter is 0
, The buffer and the execution counter are released, and the process is completed (step 9208). As described above, by setting variables indicating how many times to execute a newly created program in the emulator table as in the present embodiment, it is possible to easily set a task that must be executed multiple times.・ It can be executed.

【0042】[0042]

【発明の効果】以上のようにこの発明によれば、エミュ
レータ用機能追加手段と、エミュレータテーブルと、エ
ミュレート手段を備えたので、ドライバ用に新機能追加
用命令コードを受け取ると、サブルーチン形式でドライ
バが動作し、従ってコンパイル手段(コンパイラ)が不
要になり、規模が小さくて、かつ計算機を止めないで新
機能を追加できる効果がある。
As described above, according to the present invention, an emulator function adding means, an emulator table, and an emulating means are provided. When an instruction code for adding a new function is received for a driver, a subroutine format is provided. The driver operates, so that a compiling means (compiler) is not required, and there is an effect that the scale is small and a new function can be added without stopping the computer.

【0043】複数言語に対応する命令コードを参照でき
るエミュレータテーブルを設けたので、ユーザが用いる
言語に制約が少なくなるという効果が付加される。
Since the emulator table which can refer to the instruction codes corresponding to a plurality of languages is provided, the effect of reducing the restrictions on the language used by the user is added.

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

【図1】 本発明の実施の形態1におけるノンストップ
拡張ドライバ装置の構成図である。
FIG. 1 is a configuration diagram of a non-stop extended driver device according to Embodiment 1 of the present invention.

【図2】 エミュレータテーブルの例と、新機能ソース
の例を示す図である。
FIG. 2 is a diagram illustrating an example of an emulator table and an example of a new function source.

【図3】 実施の形態1におけるインストール手順を示
す動作フロー図である。
FIG. 3 is an operation flowchart showing an installation procedure according to the first embodiment.

【図4】 実施の形態1のおけるドライバの動作フロー
図である。
FIG. 4 is an operation flowchart of a driver according to the first embodiment;

【図5】 本発明の実施の形態2におけるエミュレータ
テーブルの例を示す図である。
FIG. 5 is a diagram showing an example of an emulator table according to the second embodiment of the present invention.

【図6】 実施の形態2におけるドライバの動作フロー
図である。
FIG. 6 is an operation flowchart of a driver according to the second embodiment.

【図7】 実施の形態2における他のノンストップ拡張
ドライバ装置の構成図である。
FIG. 7 is a configuration diagram of another non-stop extended driver device according to the second embodiment.

【図8】 実施の形態2における他のドライバの動作フ
ロー図である。
FIG. 8 is an operation flowchart of another driver according to the second embodiment.

【図9】 本発明の実施の形態3におけるノンストップ
拡張ドライバ装置の構成図である。
FIG. 9 is a configuration diagram of a nonstop extended driver device according to a third embodiment of the present invention.

【図10】 実施の形態3におけるエミュレータテーブ
ルの例を示す図である。
FIG. 10 is a diagram showing an example of an emulator table according to the third embodiment.

【図11】 実施の形態3におけるドライバの動作フロ
ー図である。
FIG. 11 is an operation flowchart of a driver according to the third embodiment.

【図12】 本発明の実施の形態4におけるエミュレー
タテーブルの例を示す図である。
FIG. 12 is a diagram showing an example of an emulator table according to Embodiment 4 of the present invention.

【図13】 本発明の実施の形態5におけるエミュレー
タテーブルの例を示す図である。
FIG. 13 is a diagram illustrating an example of an emulator table according to the fifth embodiment of the present invention.

【図14】 実施の形態5におけるドライバの動作フロ
ー図である。
FIG. 14 is an operation flowchart of a driver according to the fifth embodiment.

【図15】 本発明の実施の形態6におけるエミュレー
タテーブルの例を示す図である。
FIG. 15 is a diagram illustrating an example of an emulator table according to the sixth embodiment of the present invention.

【図16】 本発明の実施の形態7におけるエミュレー
タテーブルの例を示す図である。
FIG. 16 is a diagram illustrating an example of an emulator table according to the seventh embodiment of the present invention.

【図17】 実施の形態7におけるドライバの動作フロ
ー図である。
FIG. 17 is an operation flowchart of a driver according to the seventh embodiment.

【図18】 参考装置としてのドライバへの機能追加管
理方式の構成図である。
FIG. 18 is a configuration diagram of a function addition management method for a driver as a reference device.

【図19】 参考装置としてのドライバへの機能追加管
理方式の動作フロー図である。
FIG. 19 is an operation flowchart of a function addition management method for a driver as a reference device.

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

101 新機能ソースコードリスト、104 情報獲得
手段、105 新機能追加手段、106 命令受付手
段、107 ドライバ、107A,107B,107C
ドライバ機能A,機能B,機能C、108 エミュレ
ータ用機能追加手段、109 エミュレート手段、11
0,110B,110D,110E,110F エミュ
レータテーブル、111 エミュレート結果変換手段、
112 エミュレータテーブル変更手段、200 エミ
ュレータテーブルのヘッダ部、201,201Z 命令
名、202,202Z 命令アドレス、210 ボディ
部、211,211Z 詳細命令コード、220 ドラ
イバのバッファ領域、230実行ポインタ、240 C
PU占有率、250 CPU使用度、301 機能一覧
情報テーブル、302 マップファイル、303 情報
編集手段。
101 new function source code list, 104 information obtaining means, 105 new function adding means, 106 instruction receiving means, 107 driver, 107A, 107B, 107C
Driver function A, function B, function C, 108 emulator function addition means, 109 emulation means, 11
0, 110B, 110D, 110E, 110F emulator table, 111 emulation result conversion means,
112 emulator table changing means, 200 emulator table header, 201, 201Z instruction name, 202, 202Z instruction address, 210 body, 211, 211Z detailed instruction code, 220 driver buffer area, 230 execution pointer, 240C
PU occupancy, 250 CPU usage, 301 function list information table, 302 map file, 303 information editing means.

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 オペレーティングシステム(OS)の管
理下で、ハードウェア・デバイスの各機能別の動作を制
御するドライバにおいて、 ユーザが記述した新機能タスクのソースを、エミュレー
タ用機能追加命令コードとして上記ドライバ側に送る、
ユーザモード側エミュレータ用機能追加手段と、 ドライバが行う詳細細分化命令群を各細分化命令単位で
テーブルにした、ドライバ側エミュレータテーブルと、 上記エミュレータ用機能追加手段からの命令コードをO
S経由で受け取ると、上記エミュレータテーブルを参照
して受け取った命令コードを実行する、ドライバ側エミ
ュレート手段とを備えたことを特徴とするノンストップ
拡張ドライバ装置。
1. A driver for controlling the operation of each function of a hardware device under the control of an operating system (OS), wherein a source of a new function task described by a user is described as an emulator function addition instruction code. Send to the driver side,
User mode side emulator function addition means, driver side emulator table in which a detailed subdivision instruction group to be performed by the driver is tabulated for each subdivision instruction, and an instruction code from the emulator function addition section is stored in O
A non-stop extended driver device comprising: driver-side emulation means for executing an instruction code received by referring to the emulator table when received via S.
【請求項2】 ドライバ側エミュレート手段は、命令コ
ード列としてのソースを一括して記憶するメモリを持
ち、 ユーザモード側エミュレータ用機能追加手段からのソー
スを読み込むと、命令実行位置を示す順序に従って順
次、命令を実行するようにしたことを特徴とする請求項
1記載のノンストップ拡張ドライバ装置。
2. The driver-side emulation means has a memory for collectively storing a source as an instruction code string, and reads a source from the user-mode-side emulator function addition means, and reads the source in accordance with an order indicating an instruction execution position. 2. The non-stop extended driver device according to claim 1, wherein instructions are sequentially executed.
【請求項3】 ドライバ側エミュレータテーブルは、複
数の言語による命令コードをテーブルに収容し、 ドライバ側エミュレート手段は、ユーザが用いた言語に
対応した命令コード列を実行するようにしたことを特徴
とする請求項1記載のノンストップ拡張ドライバ装置。
3. The driver-side emulator table stores instruction codes in a plurality of languages in a table, and the driver-side emulation means executes an instruction code sequence corresponding to a language used by a user. The non-stop extended driver device according to claim 1, wherein
【請求項4】 ドライバ側エミュレート手段は、CPU
占有実績を記録し、所定の占有率の範囲を超えると、命
令実行を止めてOSに動作を戻すようにしたことを特徴
とする請求項1記載のノンストップ拡張ドライバ装置。
4. The driver-side emulation means includes a CPU
2. The non-stop extended driver device according to claim 1, wherein the occupancy record is recorded, and when the occupancy exceeds a predetermined occupancy range, the instruction execution is stopped and the operation is returned to the OS.
【請求項5】 ドライバ側エミュレート手段は、複数の
命令コード列としてのソースを、対応したメモリ領域に
記憶するようにし、 ユーザモード側エミュレータ用機能追加手段からのソー
スを対応した領域に読み込むと、該各領域の命令実行位
置を示す順序に従って順次、命令を実行するようにした
ことを特徴とする請求項2記載のノンストップ拡張ドラ
イバ装置。
5. The driver-side emulation means stores a plurality of source codes as a sequence of instruction codes in a corresponding memory area, and reads the source from the user mode-side emulator function addition means into the corresponding area. 3. The non-stop extended driver device according to claim 2, wherein instructions are sequentially executed according to an order indicating an instruction execution position of each area.
【請求項6】 ドライバ側エミュレート手段は、新機能
タスクの実行回数実績を記録し、所定の実行回数の範囲
を超えると、命令実行を止めてOSに動作を戻すように
したことを特徴とする請求項1記載のノンストップ拡張
ドライバ装置。
6. The driver-side emulation means records the number of executions of a new function task, and when the number of executions exceeds a predetermined number of executions, stops the instruction execution and returns the operation to the OS. The non-stop extended driver device according to claim 1.
JP11174780A 1999-06-22 1999-06-22 Nonstop extensible driver Withdrawn JP2001005766A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11174780A JP2001005766A (en) 1999-06-22 1999-06-22 Nonstop extensible driver

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11174780A JP2001005766A (en) 1999-06-22 1999-06-22 Nonstop extensible driver

Publications (1)

Publication Number Publication Date
JP2001005766A true JP2001005766A (en) 2001-01-12

Family

ID=15984547

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11174780A Withdrawn JP2001005766A (en) 1999-06-22 1999-06-22 Nonstop extensible driver

Country Status (1)

Country Link
JP (1) JP2001005766A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006070939A1 (en) * 2004-12-28 2006-07-06 Tokyo Electron Device Limited Program executed under control of operating system providing kernel mode and user mode

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006070939A1 (en) * 2004-12-28 2006-07-06 Tokyo Electron Device Limited Program executed under control of operating system providing kernel mode and user mode

Similar Documents

Publication Publication Date Title
US5778226A (en) Kernels, description tables and device drivers
US6327704B1 (en) System, method, and product for multi-branch backpatching in a dynamic translator
US5715463A (en) Installation utility for device drivers and utility programs
US6895460B2 (en) Synchronization of asynchronous emulated interrupts
US6138271A (en) Operating system for embedded computers
US5269021A (en) Multiprocessor software interface for a graphics processor subsystem employing partially linked dynamic load modules which are downloaded and fully linked at run time
JPS6017539A (en) Emulation system
US5553286A (en) System and method for preparing a computer program for execution
EP0814403B1 (en) Computer system with context switch and program development therefor
JPH11110194A (en) Connection method to external library function and recording medium in which the connection method is recorded and programmed
US5487158A (en) Method and procedure call mechanism for calling 16-bit functions from 32-bit functions
US7318174B2 (en) Systems, methods, and computer readable medium for analyzing memory
US20060136885A1 (en) Method for embedding object codes in source codes
JP2007304840A (en) Compilation method, debugging method, compilation program, and debugging program
JPH0934713A (en) Method and device for processing programming language
JPH07230386A (en) Data processor and method for calling control routine
JP2991242B2 (en) How to use a multiprocessor computer system
JP2001005766A (en) Nonstop extensible driver
JP3051438B2 (en) How to give enhanced graphics capabilities
KR100935683B1 (en) Apparatus for generating device driver specification based source code
JPH08272815A (en) Object-oriented data base system and processing method therefor
Radovici et al. The Tock System Architecture
CN115037735A (en) Short name based linking method and system
CN116737236A (en) Mobile cross-platform software development method and device
JPH0133855B2 (en)

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20051011

A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060905