JP2000047881A - Real-time system - Google Patents

Real-time system

Info

Publication number
JP2000047881A
JP2000047881A JP10212261A JP21226198A JP2000047881A JP 2000047881 A JP2000047881 A JP 2000047881A JP 10212261 A JP10212261 A JP 10212261A JP 21226198 A JP21226198 A JP 21226198A JP 2000047881 A JP2000047881 A JP 2000047881A
Authority
JP
Japan
Prior art keywords
input
output
task
processing
priority
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP10212261A
Other languages
Japanese (ja)
Inventor
Takanori Yokoyama
孝典 横山
Shoji Suzuki
昭二 鈴木
Eiko Naya
英光 納谷
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP10212261A priority Critical patent/JP2000047881A/en
Publication of JP2000047881A publication Critical patent/JP2000047881A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To obtain superior real-time property by enabling a delicate priority control over input/output processing by determining the priority of processing according to handled input/output data and performing the processing of device drivers according to the priority of the processing. SOLUTION: Device drivers 32 are provided by every input/output devices and drivers 321 and 322 for performing input/output processing using I/O controllers 41 and 42 are provided here. A device driver priority control part 34 requests a scheduler 311 to vary the task priority levels of the input task and output task of the drivers 321 and 322. The scheduler 311 schedules the task of an application program and the input task and output task of the device drivers 32 according to the priority levels given to the respective tasks and executes the tasks. Namely, the task of top priority among executable tasks is selected and executed.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明はリアルタイムシステ
ムに係り、特に、同一入出力機器への入出力であっても
入出力データによって入出力処理の優先度を変更できる
リアルタイムシステムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a real-time system, and more particularly, to a real-time system capable of changing the priority of input / output processing by input / output data even when input / output to the same input / output device.

【0002】[0002]

【従来の技術】リアルタイムシステムでは、接続された
入出力装置のイベントに対応してリアルタイムに処理を
行う必要がある。そこで、リアルタイムOSを用い、優
先度にしたがって処理を実行する。
2. Description of the Related Art In a real-time system, it is necessary to perform processing in real time in response to an event of a connected input / output device. Therefore, the processing is executed according to the priority using the real-time OS.

【0003】入出力装置への入出力は、それらのデバイ
スドライバが処理する。デバイスドライバは入出力装置
毎に設けられる。例えば、岩波書店刊、ITRON入門
(1988年)、38頁〜44頁に記載されているよう
に、デバイスドライバは割り込み処理や入出力処理タス
クで実行される。ここでドライバを構成する入出力タス
クは、指定された優先度で実行される。
[0003] Inputs and outputs to input / output devices are processed by those device drivers. A device driver is provided for each input / output device. For example, as described in Iwanami Shoten, Introduction to ITRON (1988), pp. 38-44, a device driver is executed by an interrupt processing or an input / output processing task. Here, the input / output tasks constituting the driver are executed with the specified priority.

【0004】入出力タスクは、アプリケーションプログ
ラムのタスクより高い優先度で実行されるのが普通であ
る。入出力タスクの間では、与えられた入出力タスクの
優先度にしたがって、処理される。
An input / output task is usually executed with a higher priority than a task of an application program. Among the input / output tasks, processing is performed according to the given priority of the input / output task.

【0005】優先的に実行する必要がある入出力装置を
扱うデバイスドライバの入出力タスクの優先度は、他の
入出力装置を扱うデバイスドライバの入出力タスクより
高く設定する。これにより、緊急に実行すべき入出力装
置の入出力処理を、そうでない入出力装置の入出力処理
より、優先して実行することができ、リアルタイム処理
を行いやすくなる。
[0005] The priority of an input / output task of a device driver handling an input / output device that needs to be executed preferentially is set higher than an input / output task of a device driver handling another input / output device. As a result, the input / output processing of the input / output device that should be executed urgently can be performed before the input / output processing of the input / output device that is not urgently executed, and real-time processing can be easily performed.

【0006】[0006]

【発明が解決しようとする課題】しかしながら上記従来
技術では、入出力装置ごとに入出力の処理の優先度を一
意に決定してしまう。ところが、システムによっては、
同一入出力装置であっても、入出力データが何であるか
によって、処理の優先度を変えたいことがある。すなわ
ち、緊急を要するデータは、そうでないデータに優先し
て入出力処理を行いたい。
However, in the above prior art, the priority of input / output processing is uniquely determined for each input / output device. However, depending on the system,
Even with the same input / output device, there are times when it is desired to change the processing priority depending on what the input / output data is. That is, it is desirable to perform input / output processing for data requiring urgency in preference to data not requiring urgency.

【0007】例えば、入出力装置としてネットワークを
考えると、ネットワーク上を流れるデータ、すなわちメ
ッセージが、緊急メッセージの場合は、通常のメッセー
ジに優先して入出力(送受信)を行いたい。
For example, when a network is considered as an input / output device, when data flowing on the network, that is, a message is an urgent message, it is desired to perform input / output (transmission / reception) prior to a normal message.

【0008】また、ネットワーク以外にRS−232C
の入出力装置を有しており、ネットワークの通常のメッ
セージよりはRS−232Cのデータの入出力処理を優
先したいが、ネットワークの緊急メッセージのみはRS
−232Cの入出力処理より優先して行いたいというこ
とがある。
[0008] In addition to the network, RS-232C
I want to give priority to the input / output processing of the RS-232C data over the normal message of the network, but only the emergency message of the network
There is a case where the user wants to give priority to input / output processing of -232C.

【0009】しかし、前記従来技術では、入出力装置毎
にデバイスドライバの処理の優先度が決まるため、上記
のような処理を行うことはできない。
However, in the above-mentioned prior art, the above-described processing cannot be performed because the priority of the processing of the device driver is determined for each input / output device.

【0010】そこで本発明は、入出力データに応じてデ
バイスドライバの処理の優先度を変更可能とすること
で、入出力処理のきめ細かな優先度制御を可能とし、リ
アルタイム性に優れたリアルタイムシステムを提供する
ことを目的としている。
Accordingly, the present invention provides a real-time system which is capable of changing the priority of processing of a device driver in accordance with input / output data, enabling fine-grained priority control of input / output processing, and having excellent real-time performance. It is intended to provide.

【0011】[0011]

【課題を解決するための手段】上記目的を達成するため
本発明では、入出力装置の入出力処理を扱うデバイスド
ライバ手段と、扱う入出力データによってデバイスドラ
イバ手段の処理の優先度を決定するデバイスドライバ優
先度制御手段と、デバイスドライバ手段の処理の優先度
にしたがってデバイスドライバの処理を実行するスケジ
ューリング手段によってリアルタイムシステムを実現す
る。
In order to achieve the above object, the present invention provides a device driver for handling input / output processing of an input / output device and a device for determining the priority of the processing of the device driver based on the input / output data to be handled. A real-time system is realized by the driver priority control means and the scheduling means for executing the processing of the device driver according to the priority of the processing of the device driver means.

【0012】デバイスドライバ優先度制御手段は、入出
力処理を要求された入出力データの種類や値によって、
該入出力データを扱うデバイスドライバの処理の優先度
を決定する。スケジューリング手段はアプリケーション
プログラムやデバイスドライバの処理の中から、それら
の優先度にしたがって、優先度の高いものから優先的に
起動し、実行する。デバイスドライバ手段は、スケジュ
ーリング手段によって起動され、実際に入出力装置に対
して入出力処理を実行する。
[0012] The device driver priority control means, depending on the type and value of input / output data requested for input / output processing,
The priority of the process of the device driver handling the input / output data is determined. The scheduling means activates and executes the processing of the application program and the device driver in descending order of priority according to their priorities. The device driver is activated by the scheduling and actually executes input / output processing on the input / output device.

【0013】したがって、同一入出力装置であっても、
それを扱うデバイスドライバの処理の優先度を、入出力
を要求された入出力データの種類や値によって変更し、
優先度にしたがって、優先度の高いものから処理するこ
とができる。
Therefore, even for the same input / output device,
Change the priority of the processing of the device driver that handles it according to the type and value of the input / output data requested for input / output,
According to the priority, processing can be performed from the one with the highest priority.

【0014】[0014]

【発明の実施の形態】以下、本発明の実施例を図を用い
て詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments of the present invention will be described below in detail with reference to the drawings.

【0015】本発明は入出力装置からデータを入力し、
入力したデータを利用してアプリケーションプログラム
が出力データを算出し、出力データを入出力装置に出力
するリアルタイムシステムである。
According to the present invention, data is input from an input / output device,
This is a real-time system in which an application program calculates output data using input data and outputs the output data to an input / output device.

【0016】以下、本発明を図1〜図10を用いて詳細
に説明する。
Hereinafter, the present invention will be described in detail with reference to FIGS.

【0017】図1は本発明の一実施例であるリアルタイ
ムシステムの構成図である。リアルタイムシステム10
は、CPU20,メモリ30,I/Oコントローラ4
1,42を有し、それらはバス50で接続されている。
FIG. 1 is a configuration diagram of a real-time system according to an embodiment of the present invention. Real-time system 10
Are a CPU 20, a memory 30, an I / O controller 4
1 and 42, which are connected by a bus 50.

【0018】メモリ30には、アプリケーションプログ
ラム33,OSカーネルのプログラム31,デバイスド
ライバ32のプログラム群,デバイスドライバ優先度制
御部34のプログラムが記憶されている。本実施例で
は、デバイスドライバ以外のOSの機能を実現する部分
をOSカーネルと呼ぶ。
The memory 30 stores an application program 33, a program 31 of an OS kernel, a program group of a device driver 32, and a program of a device driver priority control section 34. In this embodiment, a part that realizes the functions of the OS other than the device driver is called an OS kernel.

【0019】CPU20は、メモリ30に記憶されてい
るプログラムを読み出し、それらのプログラムの処理を
実行する。
The CPU 20 reads out the programs stored in the memory 30 and executes the processing of those programs.

【0020】OSカーネル31はスケジューラ311,
タスク間通信処理部312,メモリ管理処理部313等
を含む。OSカーネルは、ここでは、岩波書店刊、ITRO
N 入門(1988年)に記載されているOSを用いる。
The OS kernel 31 has a scheduler 311,
It includes an inter-task communication processing unit 312, a memory management processing unit 313, and the like. The OS kernel is here, published by Iwanami Shoten, ITRO
The OS described in N Introduction (1988) is used.

【0021】アプリケーションプログラム33は、複数
のアプリケーションプログラム331,332,333等、
それぞれ別個のタスクとして実行される。各タスクには
優先度が与えられ、スケジューラ311は、タスクに与
えられた優先度に応じて、優先度の高いタスクを優先し
て実行する。
The application program 33 includes a plurality of application programs 331, 332, 333, etc.
Each is performed as a separate task. Each task is given a priority, and the scheduler 311 preferentially executes a task with a higher priority according to the priority given to the task.

【0022】I/Oコントローラ41,42は、リアル
タイムシステムに接続されている入出力装置を制御し、
実際に入出力処理を行うハードウェアである。入出力装
置には、例えば、イーサネットやCANのようなネット
ワーク、RS−232Cのようなシリアル入出力装置,
パラレル入出力装置,ハードディスク装置,フロッピー
ディスク装置,プリンタ装置,その他、様々な装置があ
る。
I / O controllers 41 and 42 control input / output devices connected to the real-time system,
It is hardware that actually performs input / output processing. Examples of the input / output device include a network such as Ethernet or CAN, a serial input / output device such as RS-232C,
There are various devices such as a parallel input / output device, a hard disk device, a floppy disk device, a printer device, and the like.

【0023】アプリケーションプログラム33が入出力
装置を用いて入出力を行うには、アプリケーションプロ
グラム33を実行するCPU20が、I/Oコントロー
ラ41,42を用いて、実際の入出力処理を行う必要が
ある。そのためのプログラムがデバイスドライバ32で
ある。
In order for the application program 33 to perform input / output using the input / output device, the CPU 20 executing the application program 33 needs to perform actual input / output processing using the I / O controllers 41 and 42. . The program for that is the device driver 32.

【0024】デバイスドライバ32は入出力装置ごとに
設けられ、ここでは、I/Oコントローラ41を用いた
入出力処理を行うためのドライバ321,I/Oコント
ローラ42を用いた入出力処理を行うためのドライバ3
22が存在する。ドライバ321,322にはデバイス
ドライバ番号が与えられているものとする。
A device driver 32 is provided for each input / output device. In this example, a driver 321 for performing input / output processing using the I / O controller 41 and an input / output processing using the I / O controller 42 are used. Driver 3
22 are present. It is assumed that a device driver number is given to the drivers 321 and 322.

【0025】デバイスドライバは、ここでは、岩波書店
刊、ITRON入門(1988年)、38頁〜44頁に
記載されているような方法で構成したものである。
Here, the device driver is constructed by a method described in Iwanami Shoten, Introduction to ITRON (1988), pp. 38-44.

【0026】次に入出力処理について詳細に説明する。Next, the input / output processing will be described in detail.

【0027】図2は本発明のデバイスドライバ32およ
びデバイスドライバ優先度制御部34の詳細構成を示す
図である。
FIG. 2 is a diagram showing a detailed configuration of the device driver 32 and the device driver priority control unit 34 of the present invention.

【0028】ドライバ321は、入力処理ハンドラ32
11,入力タスク3213,入力割込ハンドラ321
5,出力処理ハンドラ3212,出力タスク3214,
出力割込ハンドラ3216という処理から成る。ドライ
バ322も同様の構成である。なお以下では、入力処理
ハンドラ3211と出力処理ハンドラ3212をまとめ
て入出力ハンドラ,入力タスク3213と出力タスク3
214をまとめて入出力タスク,入力割込ハンドラ32
15と出力割込ハンドラ3216をまとめて入出力割込
ハンドラと呼ぶことがある。
The driver 321 operates as the input processing handler 32
11, input task 3213, input interrupt handler 321
5, output processing handler 3212, output task 3214,
It consists of a process called an output interrupt handler 3216. The driver 322 has the same configuration. In the following, the input processing handler 3211 and the output processing handler 3212 are collectively referred to as an input / output handler, the input task 3213 and the output task 312.
I / O task, input interrupt handler 32
15 and the output interrupt handler 3216 may be collectively referred to as an input / output interrupt handler.

【0029】デバイスドライバ優先度制御部34は、入
出力データの種別に応じて、デバイスドライバ32の入
出力タスクの優先度を変更するプログラムである。本実
施例では、デバイスドライバ優先度制御部34は、入力
割込ハンドラあるいは出力処理ハンドラによって呼び出
される関数(サブルーチン)である。デバイスドライバ
優先度制御部34は、入出力データの種別に応じて、ド
ライバ321の入力タスク3213,出力タスク321
4,ドライバ322,入力タスク3223,出力タスク
3224の、タスクの優先度を、スケジューラ311に
要求して変更する。
The device driver priority control section 34 is a program for changing the priority of the input / output task of the device driver 32 according to the type of input / output data. In the present embodiment, the device driver priority control unit 34 is a function (subroutine) called by the input interrupt handler or the output processing handler. The device driver priority control unit 34 controls the input task 3213 and the output task 321 of the driver 321 according to the type of input / output data.
4, the task priority of the driver 322, the input task 3223, and the output task 3224 is requested to the scheduler 311 and changed.

【0030】スケジューラ311は、アプリケーション
プログラムのタスク,デバイスドライバの入力タスクお
よび出力タスクを、それらのタスクに与えられた優先度
に従ってスケジューリングし、実行する。すなわちスケ
ジューラは、実行可能なタスクのうち、優先度が最も高
いタスクを選択して実行する。実行しているタスクが終
了あるいは休止した場合には、他の実行可能な優先度の
うち最も高い優先度のタスクに切り替えて実行する。ま
た、低い優先度のタスクの実行中に、高い優先度のタス
クが実行可能になると、低い優先度のタスクの実行を中
断し、高い優先度のタスクを実行する。本実施例では、
優先度は整数で表現し、値が小さいほど優先度が高いも
のとする。同一優先度のタスクが存在する場合には、先
に実行可能になったものから順に実行する。
The scheduler 311 schedules and executes the task of the application program, the input task and the output task of the device driver according to the priority given to those tasks. That is, the scheduler selects and executes the task having the highest priority among the executable tasks. When the task being executed ends or is suspended, the task is switched to the task with the highest priority among other executable priorities and executed. Also, if a high-priority task becomes executable during execution of a low-priority task, the execution of the low-priority task is interrupted and the high-priority task is executed. In this embodiment,
The priority is represented by an integer, and the smaller the value, the higher the priority. If there are tasks having the same priority, the tasks are executed in order from the one that became executable first.

【0031】なお、各タスクにはタスク番号が与えら
れ、タスク番号を指定することで、一意にタスクを指定
することができる。
A task number is assigned to each task, and a task number can be uniquely specified by specifying the task number.

【0032】図2では、アプリケーションプログラム3
31がドライバ321を呼び出して、I/Oコントロー
ラ41を用いた入出力処理を実行する。入力処理を実行
する場合には入力処理ハンドラ3211を、出力処理を
実行する場合には出力処理ハンドラ3212を呼び出す。入
力処理ハンドラ3211,出力処理ハンドラ3212
は、関数呼び出しの形式で呼び出され、アプリケーショ
ンプログラム331と同一のタスク3310で実行され
る。
In FIG. 2, the application program 3
31 calls the driver 321 to execute input / output processing using the I / O controller 41. The input processing handler 3211 is called to execute the input processing, and the output processing handler 3212 is called to execute the output processing. Input handler 3211, Output handler 3212
Is called in the form of a function call, and is executed by the same task 3310 as the application program 331.

【0033】入力タスク3213,出力タスク3214
は、それぞれ独立したタスクとして実行される。入力タ
スク,出力タスクは、アプリケーションのタスクと同様
に、スケジューラ311により、優先度に応じて処理さ
れる。本実施例では、入力タスクおよび出力タスクには
アプリケーションのタスクより高い優先度を与える。入
力割込ハンドラおよび出力割込ハンドラは、I/Oコン
トローラからの割り込みによって起動される。これらの
割り込みが発生すると、CPUはアプリケーションのタ
スクや、入出力タスクの処理を中断し、割り込み処理を
実行する。各割り込みには割り込みレベルが設定され、
高い優先度の割り込みレベルが与えられた割り込み処理
ほど優先的に実行される。
Input task 3213, output task 3214
Are executed as independent tasks. The input task and the output task are processed by the scheduler 311 according to the priorities, similarly to the task of the application. In this embodiment, the input task and the output task are given higher priority than the task of the application. The input interrupt handler and the output interrupt handler are activated by an interrupt from the I / O controller. When these interrupts occur, the CPU suspends the processing of the application task and the input / output task, and executes the interrupt processing. Each interrupt has an interrupt level,
The interrupt processing to which the higher priority interrupt level is given is executed with higher priority.

【0034】入力割込ハンドラ3215は、入出力装置
に入力があった時に、I/Oコントローラ41からの割
り込みによって起動される。出力割込ハンドラ3216
は、入出力装置が出力処理を終了した時に、I/Oコン
トローラ41からの割り込みによって起動される。
The input interrupt handler 3215 is started by an interrupt from the I / O controller 41 when an input is made to the input / output device. Output interrupt handler 3216
Is activated by an interrupt from the I / O controller 41 when the input / output device has completed the output processing.

【0035】本実施例で入出力されるデータには、デー
タ種別があり、データ種別番号により、入出力データの
データ種別を識別することができる。本実施例では、デ
ータ種別番号は入出力データ中に含まれている。
The data input / output in this embodiment has a data type, and the data type of the input / output data can be identified by the data type number. In this embodiment, the data type number is included in the input / output data.

【0036】以上はデバイスドライバ321についてで
あるが、デバイスドライバ322も同様である。
The above is about the device driver 321, but the same applies to the device driver 322.

【0037】次に、デバイスドライバ優先度制御部34
の動作の詳細を説明する。
Next, the device driver priority control unit 34
The operation of will be described in detail.

【0038】デバイスドライバ優先度制御部34は、入
出力を行う入出力データのデータ種別に応じて、それを
扱う入出力タスクの優先度を決定する機能を有する。そ
のため、デバイスドライバ優先度制御部34は、入出力
データの種別とその入出力データを扱う場合の入出力タ
スクの優先度の対応を記憶する、デバイスドライバ優先
度テーブル341を含んでいる。
The device driver priority control unit 34 has a function of determining the priority of an input / output task that handles input / output data according to the data type of the input / output data. Therefore, the device driver priority control unit 34 includes a device driver priority table 341 that stores the correspondence between the type of input / output data and the priority of the input / output task when handling the input / output data.

【0039】デバイスドライバ優先度テーブル341に
記憶する情報の詳細を図3を用いて説明する。デバイス
ドライバ優先度テーブル341には、各デバイスドライ
バのドライバ番号を記憶する領域3411,各デバイス
ドライバの入力タスクおよび出力タスクのタスク番号3
412を記憶する領域,各デバイスドライバの入力デー
タおよび出力データ毎に、それらのデータのデータ種別
番号を記憶する領域3413,データ種別番号に対応す
る入出力タスクの優先度を記憶する領域3414がある。
Details of information stored in the device driver priority table 341 will be described with reference to FIG. The device driver priority table 341 includes an area 3411 for storing a driver number of each device driver, and a task number 3 of an input task and an output task of each device driver.
For each input data and output data of each device driver, there is an area 3413 for storing the data type number of the data, and an area 3414 for storing the priority of the input / output task corresponding to the data type number. .

【0040】ここでは、ドライバ321のドライバ番号
は1、入力タスク3213のタスク番号は11、出力タ
スク3214のタスク番号は12、ドライバ322のド
ライバ番号は2、入力タスクのタスク番号は21、出力
タスクのタスク番号は22とする。また、ドライバ32
1が扱う入出力データのデータ種別番号は、101〜1
05、ドライバ322が扱う入出力データのデータ識別
番号は201から205とする。
Here, the driver number of the driver 321 is 1, the task number of the input task 3213 is 11, the task number of the output task 3214 is 12, the driver number of the driver 322 is 2, the task number of the input task is 21, and the output task is Has a task number of 22. The driver 32
The data type numbers of input / output data handled by 1 are 101 to 1
05, the data identification numbers of the input / output data handled by the driver 322 are 201 to 205.

【0041】図3では、例えば、ドライバ321がデー
タ種別番号101のデータを入力するときの入力タスク
3213の優先度は2、データ種別102のデータを出
力するときの出力タスク3214の優先度は7、ドライ
バ322がデータ種別203のデータを入力するときの
入力タスク3223の優先度は12である。
In FIG. 3, for example, when the driver 321 inputs data of the data type number 101, the priority of the input task 3213 is 2, and when the driver 321 outputs data of the data type 102, the priority of the output task 3214 is 7 The priority of the input task 3223 when the driver 322 inputs data of the data type 203 is 12.

【0042】デバイスドライバ優先度制御部34は関数
(サブルーチン)であり、図2に示したように、入力割
込ハンドラ(3215,3225)により呼び出される
場合(32151,32251)と、出力処理ハンドラ
(3212,3222)によって呼び出される場合があ
る(32121,32221)。引数として、データ種
別および入出力タスクのタスク番号が渡される。また、
スケジューラ311に入出力タスクの優先度の変更を要
求する(3401)。
The device driver priority control unit 34 is a function (subroutine), as shown in FIG. 2, when called by the input interrupt handlers (3215, 3225) (32151, 32251), 3212, 3222) (32121, 32221). The data type and the task number of the input / output task are passed as arguments. Also,
The scheduler 311 is requested to change the priority of the input / output task (3401).

【0043】デバイスドライバ優先度制御部34の処理
の流れを、図4を用いて説明する。デバイスドライバ優
先度制御処理200は、まず、デバイスドライバ優先度
テーブル341を読み出し、引数で与えられたデータ種
別と入出力タスク番号に対応する優先度を決定する(処
理201)。次に、その入出力タスク番号のタスクの優
先度を、決定した優先度に変更するよう、スケジューラ
311に要求し(処理202)、リターンする。
The flow of processing of the device driver priority control section 34 will be described with reference to FIG. The device driver priority control process 200 first reads the device driver priority table 341 and determines the priority corresponding to the data type and the input / output task number given by the argument (process 201). Next, the scheduler 311 is requested to change the priority of the task of the input / output task number to the determined priority (process 202), and the process returns.

【0044】以上のように、デバイスドライバ優先度制
御部34は、入出力データのデータ種別によって、入出
力タスクの優先度を変更する。
As described above, the device driver priority control unit 34 changes the priority of the input / output task according to the data type of the input / output data.

【0045】次に、入力処理ハンドラ3211の動作に
ついて説明する。入力処理ハンドラはアプリケーション
によって呼び出される関数である。
Next, the operation of the input processing handler 3211 will be described. The input processing handler is a function called by the application.

【0046】例えば図2に示したように、入力処理ハン
ドラ3211は、アプリケーションプログラム331に
より呼び出され(32131)、入力要求バッファ321
01に入力タスク3213への入力要求を書き込み(3
2111)、入力タスク3213からの入力応答を出力要求
バッファ32102より読み込み(32112)、リタ
ーンする(32132)。図はアプリケーションプログ
ラム331から呼び出されているが、アプリケーション
プログラム332、あるいは他のアプリケーションから
も呼び出されることがある。
For example, as shown in FIG. 2, the input processing handler 3211 is called by the application program 331 (32131), and the input request buffer 321
01 to the input task 3213 (3
2111), the input response from the input task 3213 is read from the output request buffer 32102 (32112), and the process returns (32132). Although the figure is called from the application program 331, it may be called from the application program 332 or another application.

【0047】入力処理ハンドラの処理の流れを図5を用
いて説明する。入力ハンドラの処理1000は、まず、
入力要求バッファに入力要求を書き込む(1001)。
次に、該入力要求に対応する入力応答を入力応答バッフ
ァから読み込むわけだが、入力応答が入力応答バッファ
に与えられるまで待つ(処理1002)。入力応答が与
えられると、入力応答バッファから入力応答を読み込む
(処理1003)。入力応答には入力データが含まれて
いるので、その入力データをリターンする(処理100
4)。
The flow of processing of the input processing handler will be described with reference to FIG. The processing 1000 of the input handler is, first,
The input request is written into the input request buffer (1001).
Next, the input response corresponding to the input request is read from the input response buffer, and the process waits until the input response is given to the input response buffer (process 1002). When an input response is given, the input response is read from the input response buffer (process 1003). Since the input response includes the input data, the input data is returned (step 100
4).

【0048】入力処理ハンドラ3221の動作も同様で
ある。
The operation of the input processing handler 3221 is the same.

【0049】次に入力タスク3213の動作について説
明する。入力タスクは独立したタスクであり、システム
立ち上げ時に起動される。
Next, the operation of the input task 3213 will be described. The input task is an independent task and is started when the system is started.

【0050】図2に示したように、入力タスク3213
は、入力要求バッファ32101からの入力要求を読み
出し(32116)、一旦データの入力を待つ、待機状
態に入る。そして、入力割込ハンドラ3215からの待
機解除を受けて(32112)、入力データバッファ32
105から入力データを読み出し(32120)、入力
データを含む入力応答を出力要求バッファ32102に
書き込む(32112)。
As shown in FIG.
Reads the input request from the input request buffer 32101 (32116), and waits for data input to enter a standby state. Then, in response to the release of standby from the input interrupt handler 3215 (32112), the input data buffer 32
The input data is read from 105 (32120), and an input response including the input data is written to the output request buffer 32102 (32112).

【0051】入力タスク3213の処理の流れを図6に
より説明する。入力タスク3000の処理は、まず、入
力要求バッファに入力要求が与えられるまで待つ(処理3
001)。入力要求が与えられると、入力要求バッファから
入力要求を読み込み(処理3002)、待機状態に入る
OSのシステムコールを呼び出して、待機状態に入る
(処理3003)。待機状態が解除されると、入力デー
タバッファから入力データを読み込み(処理300
4)、入力応答を入力応答バッファに書き込んで(処理
3005)、入力要求待ち(処理3001)に戻る。
The processing flow of the input task 3213 will be described with reference to FIG. The process of the input task 3000 first waits until an input request is given to the input request buffer (process 3
001). When an input request is given, the input request is read from the input request buffer (step 3002), and a system call of the OS to enter the standby state is called to enter the standby state (step 3003). When the standby state is released, the input data is read from the input data buffer (step 300).
4) The input response is written into the input response buffer (process 3005), and the process returns to the input request wait (process 3001).

【0052】入力タスク3223の動作も同様である。The operation of the input task 3223 is the same.

【0053】次に入力割込ハンドラ3215の動作につ
いて説明する。入力割込ハンドラは、割り込み処理であ
る。
Next, the operation of the input interrupt handler 3215 will be described. The input interrupt handler is an interrupt process.

【0054】図2に示したように、入力割込ハンドラ3
215はI/Oコントローラ41からの割り込み321
41によって起動される。起動されると、I/Oコント
ローラから入力データを取り込み(32142)、入力
データのデータ種別を判定して、デバイスドライバ優先
度制御部34を呼び出す(32151)。そして、入力
データを入力データバッファ32105に格納し(32
121)、入力タスク3213の待機解除を行う(32
122)。
As shown in FIG. 2, the input interrupt handler 3
215 is an interrupt 321 from the I / O controller 41
It is activated by 41. When activated, it takes in input data from the I / O controller (32142), determines the data type of the input data, and calls the device driver priority control unit 34 (32151). Then, the input data is stored in the input data buffer 32105 (32
121), the input task 3213 is released from standby (32)
122).

【0055】入力割込ハンドラの処理の流れを図7によ
り説明する。入力割込ハンドラの処理5000は、起動
されるとまず、I/Oコントローラ41よりデータを入
力する(処理5001)。次に、入力データのデータ種
別を判定して(処理5001)、そのデータ種別と入力タ
スク3213のタスク番号を引数にして、デバイスドラ
イバ優先度制御部34を呼び出す(処理5003)。そ
して、入力データを入力データバッファに格納し(処理
5004)、タスクの待機状態を解除するOSのシステ
ムコールを呼び出して、入力タスク3213の待機状態
を解除して(処理5005)、終了する。
The flow of processing of the input interrupt handler will be described with reference to FIG. When the process 5000 of the input interrupt handler is activated, first, data is input from the I / O controller 41 (process 5001). Next, the data type of the input data is determined (process 5001), and the device driver priority control unit 34 is called using the data type and the task number of the input task 3213 as arguments (process 5003). Then, the input data is stored in the input data buffer (process 5004), a system call of the OS for releasing the task standby state is called, the input task 3213 is released from the standby state (process 5005), and the process ends.

【0056】入力割込ハンドラ3225の動作も同様で
ある。
The operation of the input interrupt handler 3225 is the same.

【0057】次に、出力処理ハンドラ3212の動作に
ついて説明する。出力処理ハンドラはアプリケーション
によって呼び出される関数である。
Next, the operation of the output processing handler 3212 will be described. The output processing handler is a function called by the application.

【0058】例えば図2に示したように、出力処理ハン
ドラ3212は、アプリケーションプログラム331に
より呼び出され(32133)、出力データのデータ種
別を判定して、デバイスドライバ優先度制御部34を呼
び出す(32121)、出力要求バッファ32103に
出力タスク3214への出力要求を書き込み(32113)、
出力タスク3214からの出力応答を出力バッファ32
104より読み込み(32115)、リターンする(3
2134)。図はアプリケーションプログラム331か
ら呼び出されているが、アプリケーションプログラム3
32、あるいは他のアプリケーションからも呼び出され
ることがある。
For example, as shown in FIG. 2, the output processing handler 3212 is called by the application program 331 (32133), determines the data type of the output data, and calls the device driver priority control unit 34 (32121). , Writes an output request to the output task 3214 in the output request buffer 32103 (32113),
The output response from the output task 3214 is output to the output buffer 32.
Read from the memory 104 (32115) and return (3
2134). Although the figure is called from the application program 331, the application program 3
32 or may be called from another application.

【0059】出力処理ハンドラの処理の流れを図8を用
いて説明する。出力ハンドラの処理2000は、まず、
出力データのデータ種別を判定して(処理2001)、
そのデータ種別と出力タスク3214のタスク番号を引
数にして、デバイスドライバ優先度制御部34を呼び出
す(処理2002)。次に、出力要求バッファに出力要
求を書き込む(2003)。そして、該出力要求に対応
する出力応答を出力応答バッファから読み込むわけだ
が、出力応答が出力応答バッファに与えられるまで待つ
(処理2004)。出力応答が与えられると、出力応答
バッファから出力応答を読み込んで(処理2005)、
リターンする(処理2006)。
The processing flow of the output processing handler will be described with reference to FIG. The process 2000 of the output handler firstly
The data type of the output data is determined (process 2001),
The device driver priority control unit 34 is called using the data type and the task number of the output task 3214 as arguments (process 2002). Next, an output request is written to the output request buffer (2003). Then, an output response corresponding to the output request is read from the output response buffer, and the process waits until the output response is given to the output response buffer (process 2004). When the output response is given, the output response is read from the output response buffer (process 2005).
It returns (processing 2006).

【0060】出力処理ハンドラ3222の動作も同様で
ある。
The operation of the output processing handler 3222 is the same.

【0061】次に出力タスク3214の動作について説
明する。出力タスクは独立したタスクであり、システム
立ち上げ時に起動される。
Next, the operation of the output task 3214 will be described. The output task is an independent task and is started when the system is started.

【0062】図2に示したように、出力タスク3214
は、出力要求バッファ32103から出力データを含む
出力要求を読み出し(32118)、I/Oコントロー
ラにデータを出力し(32143)、一旦出力処理の終
了を待つ待機状態に入る。そして、出力処理割込ハンド
ラ3216からの待機解除を受けて(32116)、出
力完了を意味する出力応答を出力応答バッファ3210
4に書き込む(32119)。
As shown in FIG.
Reads out the output request including the output data from the output request buffer 32103 (32118), outputs the data to the I / O controller (32143), and temporarily enters a standby state waiting for the end of the output processing. Then, in response to the release of the standby state from the output processing interrupt handler 3216 (32116), the output response indicating the completion of the output is output to the output response buffer 3210.
4 (32119).

【0063】出力タスク3214の処理の流れを図9に
より説明する。出力タスク4000の処理は、まず、出
力要求バッファに出力要求が与えられるまで待つ(処理4
001)。出力要求が与えられると、出力要求バッファから
出力要求を読み込み(処理4002)、出力要求に含ま
れる出力データをI/Oコントローラに出力する(処理
4003)。次に、待機状態に入るOSのシステムコー
ルを呼び出して、待機状態に入る(処理4004)。待
機状態が解除されると、出力応答を出力応答バッファに
書き込んで(処理4005)、出力要求待ち(処理40
01)に戻る。
The processing flow of the output task 3214 will be described with reference to FIG. The process of the output task 4000 first waits until an output request is given to the output request buffer (process 4).
001). When an output request is given, the output request is read from the output request buffer (process 4002), and the output data included in the output request is output to the I / O controller (process 4003). Next, a system call of the OS to enter the standby state is invoked to enter the standby state (process 4004). When the waiting state is released, the output response is written into the output response buffer (step 4005), and the output request is waited (step 40).
01).

【0064】出力ハンドラ3222の動作も同様であ
る。
The operation of the output handler 3222 is the same.

【0065】次に出力割込ハンドラ3216の動作につ
いて説明する。入力割込ハンドラは、割り込み処理であ
る。
Next, the operation of the output interrupt handler 3216 will be described. The input interrupt handler is an interrupt process.

【0066】図2に示したように、出力割込ハンドラ3
216はI/Oコントローラ41からの出力終了割り込
み32144によって起動される。起動されると、出力
タスク3214の待機解除を行う(32126)。
As shown in FIG. 2, the output interrupt handler 3
216 is activated by an output end interrupt 32144 from the I / O controller 41. When activated, the output task 3214 is released from standby (32126).

【0067】出力割込ハンドラの処理の流れを図10に
より説明する。出力割込ハンドラの処理6000は、起
動されると、タスクの待機状態を解除するOSのシステ
ムコールを呼び出して、出力タスク3214の待機状態
を解除して(処理6001)、終了する。
The processing flow of the output interrupt handler will be described with reference to FIG. When activated, the process 6000 of the output interrupt handler calls a system call of the OS for canceling the standby state of the task, cancels the standby state of the output task 3214 (process 6001), and ends.

【0068】出力割込ハンドラ3226の動作も同様で
ある。
The operation of output interrupt handler 3226 is similar.

【0069】以上本発明の一実施例の動作について説明
した。
The operation of the embodiment of the present invention has been described above.

【0070】本発明の一実施例で、例えば、図2におい
て、アプリケーションプログラム331が入力処理ハン
ドラ3211を呼び出し、アプリケーションプログラム
332が入力ハンドラ3221を呼び出して、入力処理
を要求し、入力タスク3213と入力タスク3223
が、それぞれ、それらの入力処理要求に対応する処理を
開始し、待機状態になったとする。アプリケーションプ
ログラム333のタスクは実行中とする。アプリケーシ
ョンプログラム331の優先度とアプリケーションプロ
グラム332の優先度の値は同一、アプリケーションプ
ログラム333の優先度の値はアプリケーションプログ
ラム331および332の優先度の値より大きい(すな
わち優先度は低い)ものとする。
In one embodiment of the present invention, for example, in FIG. 2, the application program 331 calls the input processing handler 3211 and the application program 332 calls the input handler 3221 to request the input processing, and the input task 3213 is input. Task 3223
, Respectively, start processes corresponding to the input processing requests and enter a standby state. It is assumed that the task of the application program 333 is being executed. The priority value of the application program 331 and the priority value of the application program 332 are the same, and the priority value of the application program 333 is larger than the priority value of the application programs 331 and 332 (that is, the priority value is lower).

【0071】この状態で、I/Oコントローラ41とI
/Oコントローラ42に同時にデータが入力された場合
について考える。まず、入力割込ハンドラ3215と入
力割込ハンドラ3225が起動され、処理される。これ
らの割り込み処理は、与えられた割り込みレベルにした
がって優先度が高い方が先に終了するが、いずれにして
も、アプリケーションプログラム333のタスクは中断
され、それらの割り込み処理が実行される。
In this state, the I / O controller 41 and the I / O controller 41
Consider a case where data is input to the / O controller 42 at the same time. First, the input interrupt handler 3215 and the input interrupt handler 3225 are activated and processed. In these interrupt processes, the one with the higher priority according to the given interrupt level ends first, but in any case, the task of the application program 333 is interrupted and the interrupt process is executed.

【0072】それらの割り込み処理が終了すると、入力
タスク3213と入力タスク3223が実行可能になるが、
それらのタスクは優先度が高いものから先に実行され
る。ところがその優先度は、入力データの種別によって
変化する。
When the interrupt processing is completed, the input task 3213 and the input task 3223 can be executed.
Those tasks are executed with higher priority first. However, the priority changes depending on the type of input data.

【0073】図3に示したように、入力タスク3213
の優先度は、データ種別101のデータを入力するとき
は2、データ種別102のデータを入力するときは6、
その他のデータ種別のデータを入力するときは8であ
る。入力タスク3223の優先度は、データ種別201
のデータを入力するときは4、データ種別202のデー
タを入力するときは10、その他のデータ種別のデータ
を入力するときは12に設定される。
As shown in FIG. 3, the input task 3213
Are 2 when inputting data of data type 101, 6 when inputting data of data type 102,
It is 8 when data of other data types is input. The priority of the input task 3223 is the data type 201
Is set to 4 when data of the data type 202 is input, and is set to 12 when data of the other data type is input.

【0074】したがって、例えば、I/Oコントローラ
41にデータ種別101のデータが入力され、I/Oコ
ントローラ42にデータ種別201のデータが入力され
た場合には、入力タスク3213の処理が入力タスク3
223の処理に優先して実行される。また、これにとも
ない、アプリケーションプログラム331のタスクがア
プリケーションプログラム332のタスクより先に実行
可能になるため、アプリケーションプログラム331の
タスクがアプリケーションプログラム332のタスクよ
り先に実行される。
Therefore, for example, when data of the data type 101 is input to the I / O controller 41 and data of the data type 201 is input to the I / O controller 42, the processing of the input task 3213 is performed by the input task 313.
223 is executed prior to the process. Accordingly, since the task of the application program 331 can be executed before the task of the application program 332, the task of the application program 331 is executed before the task of the application program 332.

【0075】一方、I/Oコントローラ41にデータ種
別102のデータが入力され、I/Oコントローラ42
にデータ種別201のデータが入力された場合には、入
力タスク3223の処理が入力タスク3213の処理に
優先して実行される。また、これにともない、アプリケ
ーションプログラム332のタスクがアプリケーション
プログラム331のタスクより先に実行可能になるた
め、アプリケーションプログラム332のタスクがアプ
リケーションプログラム331のタスクより先に実行さ
れる。
On the other hand, the data of the data type 102 is input to the I / O controller 41 and the I / O controller 42
When data of the data type 201 is input to the input task 3223, the processing of the input task 3223 is executed in preference to the processing of the input task 3213. Accordingly, since the task of the application program 332 can be executed before the task of the application program 331, the task of the application program 332 is executed before the task of the application program 331.

【0076】以上、本発明の一実施例について詳細に説
明した。本発明によれば、以上のように、同一I/Oコ
ントローラへの入力であっても、入出力データのデータ
種別によって、処理の優先度を変えることが可能にな
る。すなわち、緊急を要するデータは、そうでないデー
タに優先して入出力処理を行うことができ、リアルタイ
ム性に優れたリアルタイムシステムを実現できるという
効果がある。
The embodiment of the present invention has been described above in detail. According to the present invention, as described above, even if the input is to the same I / O controller, the priority of processing can be changed depending on the data type of the input / output data. In other words, data requiring urgency can be subjected to input / output processing prior to data that does not require urgency, and this has the effect of realizing a real-time system with excellent real-time properties.

【0077】これまでは入出力データのデータ種別番号
は入出力データ中に含まれるものとした。しかし、入出
力データの値の範囲により、データ種別を判定してもよ
い。また、入出力データそのものではなく、入出力を行
うための制御情報によりデータ種別を判定してもよい。
例えばネットワークの場合、送受信先のアドレスにより
データ種別を判定してもよい。これにより、入出力デー
タにデータ種別番号を含む必要がなくなり、効率がよく
なるという効果がある。
Up to now, the data type number of the input / output data has been included in the input / output data. However, the data type may be determined based on the value range of the input / output data. Further, the data type may be determined based on control information for performing input / output, instead of the input / output data itself.
For example, in the case of a network, the data type may be determined based on the destination address. This eliminates the need to include the data type number in the input / output data, and has the effect of improving efficiency.

【0078】また本発明では、入力ハンドラは入力応答
が得られるまで処理を待ったが、待たずにリターンして
もよい。この場合、入力できなかったという応答をアプ
リケーションに返す。これによりアプリケーションの処
理が中断されず、処理を速やかに実行できるという効果
がある。
In the present invention, the input handler waits for processing until an input response is obtained, but may return without waiting. In this case, a response indicating that the input could not be performed is returned to the application. This has the effect that the processing of the application is not interrupted and the processing can be executed quickly.

【0079】また本発明では、出力ハンドラは出力応答
が得られるまで処理を待ったが、待たずにリターンして
もよい。これによりアプリケーションの処理が中断され
ず、処理を速やかに実行できるという効果がある。
In the present invention, the output handler waits until the output response is obtained, but may return without waiting. This has the effect that the processing of the application is not interrupted and the processing can be executed quickly.

【0080】本発明では、データの種別によって入出力
タスクの優先度を変更したが、データの種別によって入
出力割込ハンドラの割り込みレベルを変更してもよい。
この場合、割り込みレベルに応じた入出力割込ハンドラ
の処理はハードウェアにより優先度を決定し、実行され
る。これにより、割込ハンドラの処理もデータ種別によ
って優先度を変更し、実行することができ、入出力処理
のより細かい優先度制御が可能になるという効果があ
る。また、処理も効率化されるという効果がある。
In the present invention, the priority of the input / output task is changed according to the type of data. However, the interrupt level of the input / output interrupt handler may be changed according to the type of data.
In this case, the processing of the input / output interrupt handler according to the interrupt level is determined by hardware and executed. As a result, the priority of the interrupt handler process can also be changed according to the data type, and the interrupt handler process can be executed, so that there is an effect that finer priority control of the input / output process can be performed. Also, there is an effect that the processing is made more efficient.

【0081】本発明では、デバイスドライバを入出力割
込ハンドラと入出力タスクと入出力処理ハンドラで構成
したが、入力タスクの処理と同一機能の処理を入力割込
ハンドラによって実行することとして、入力タスクを削
除してもよい。これによりデバイスドライバの構成を簡
単にし、実装を容易にするという効果がある。
In the present invention, the device driver is composed of the input / output interrupt handler, the input / output task, and the input / output processing handler. However, it is assumed that the input interrupt handler executes the processing of the same function as that of the input task. You may delete the task. This has the effect of simplifying the configuration of the device driver and facilitating mounting.

【0082】本発明では、デバイスドライバを入出力割
込ハンドラと入出力タスクと入出力処理ハンドラで構成
したが、出力タスクの処理と同一機能の処理を出力処理
ハンドラによって実行することとして、出力タスクを削
除してもよい。これによりデバイスドライバの構成を簡
単にし、実装を容易にするという効果がある。
In the present invention, the device driver is composed of an input / output interrupt handler, an input / output task, and an input / output processing handler. However, the output processing handler executes processing having the same function as that of the output task. May be deleted. This has the effect of simplifying the configuration of the device driver and facilitating mounting.

【0083】[0083]

【発明の効果】本発明によれば、デバイスドライバ優先
度制御手段により、デバイスドライバ処理の優先度を、
入出力データの種類や値によって変更し、入出力データ
に応じた入出力処理のきめ細かな優先度制御を可能と
し、リアルタイム性に優れたリアルタイムシステムを容
易に実現できるという効果がある。
According to the present invention, the priority of the device driver process is determined by the device driver priority control means.
It changes according to the type and value of the input / output data, enables fine-grained priority control of input / output processing according to the input / output data, and has an effect that a real-time system excellent in real-time property can be easily realized.

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

【図1】本発明の一実施例のリアルタイムシステムの全
体構成を示す図である。
FIG. 1 is a diagram showing an overall configuration of a real-time system according to an embodiment of the present invention.

【図2】本発明の一実施例の入出力処理に関する部分の
構成を示す図である。
FIG. 2 is a diagram illustrating a configuration of a portion related to input / output processing according to an embodiment of the present invention.

【図3】本発明の一実施例のデバイスドライバ優先度テ
ーブルの構成を示す図である。
FIG. 3 is a diagram illustrating a configuration of a device driver priority table according to an embodiment of the present invention.

【図4】本発明の一実施例のデバイスドライバ優先度制
御の処理の流れを示すフローチャートを示す図である。
FIG. 4 is a flowchart illustrating a process flow of device driver priority control according to an embodiment of the present invention.

【図5】本発明の一実施例の入力処理ハンドラの処理の
流れを示すフローチャートを示す図である。
FIG. 5 is a flowchart illustrating a flow of processing of an input processing handler according to an embodiment of the present invention.

【図6】本発明の一実施例の入力タスクの処理の流れを
示すフローチャートを示す図である。
FIG. 6 is a flowchart illustrating a flow of processing of an input task according to an embodiment of the present invention.

【図7】本発明の一実施例の入力割込ハンドラの流れを
示すフローチャートを示す図である。
FIG. 7 is a flowchart showing a flow of an input interrupt handler according to one embodiment of the present invention.

【図8】本発明の一実施例の出力処理ハンドラの処理の
流れを示すフローチャートを示す図である。
FIG. 8 is a flowchart illustrating a flow of processing of an output processing handler according to an embodiment of the present invention.

【図9】本発明の一実施例の出力タスクの処理の流れを
示すフローチャートを示す図である。
FIG. 9 is a flowchart illustrating a flow of processing of an output task according to an embodiment of the present invention.

【図10】本発明の一実施例の出力割込ハンドラの流れ
を示すフローチャートを示す図である。
FIG. 10 is a flowchart showing a flow of an output interrupt handler according to one embodiment of the present invention.

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

10…リアルタイムシステム、20…CPU、30…メ
モリ、41,42…I/Oコントローラ、31…OSカ
ーネル、32…デバイスドライバ、33…アプリケーシ
ョンプログラム、34…ドライバ優先度制御部、311
…スケジューラ、312…タスク間通信処理部、313
…メモリ管理処理部、321,322…ドライバ、33
1,332,333…アプリケーションプログラム、3
41…デバイスドライバ優先度テーブル、3211,3
221…入力処理ハンドラ、3212,3222…出力処理
ハンドラ、3213,3223…入力タスク、321
4,3224…出力タスク、3215,3225…入力
割込ハンドラ、3216,3226…出力割込ハンド
ラ、32101,32201…入力要求バッファ、32
102,32103…出力要求バッファ、32103,
32203…出力要求バッファ、32104,3220
4…出力応答バッファ、32105,32205…入力デー
タバッファ。
DESCRIPTION OF SYMBOLS 10 ... Real-time system, 20 ... CPU, 30 ... Memory, 41, 42 ... I / O controller, 31 ... OS kernel, 32 ... Device driver, 33 ... Application program, 34 ... Driver priority control part, 311
... Scheduler, 312 ... Inter-task communication processing unit, 313
... Memory management processing unit, 321, 322.
1,332,333 ... application program, 3
41: Device driver priority table, 3211, 3
221, input processing handlers, 3212, 3222, output processing handlers, 3213, 3223, input tasks, 321
4, 3224: output task, 3215, 3225: input interrupt handler, 3216, 3226: output interrupt handler, 32101, 32201: input request buffer, 32
102, 32103 ... output request buffer, 32103,
32203: output request buffer, 32104, 3220
4: Output response buffer, 32105, 32205: Input data buffer.

フロントページの続き (72)発明者 納谷 英光 茨城県日立市大みか町七丁目1番1号 株 式会社日立製作所日立研究所内 Fターム(参考) 5B014 FB03 5B098 AA05 BB05 CC05 GA04 GC03Continued on the front page (72) Inventor Hidemitsu Naya 7-1-1, Omikacho, Hitachi City, Ibaraki Prefecture F-term in Hitachi Research Laboratory, Hitachi, Ltd. F-term (reference) 5B014 FB03 5B098 AA05 BB05 CC05 GA04 GC03 GC03

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】プログラムを記憶するメモリと、メモリに
記憶されたプログラムを実行するCPUと、入出力装置
を制御してデータの入出力を行うI/Oコントローラを
有し、前記入出力装置を用いてデータの入出力を行いな
がら、前記メモリに記憶されたアプリケーションプログ
ラムの処理を実行するリアルタイムシステムにおいて、
前記I/Oコントローラを用いて入出力処理を行うデバ
イスドライバ手段と、扱う入出力データの種別に応じて
前記デバイスドライバ手段の処理の優先度を決定するデ
バイスドライバ優先度制御手段と、前記デバイスドライ
バ手段の処理の優先度にしたがってデバイスドライバの
処理を実行するスケジューリング手段を有するリアルタ
イムシステム。
A memory for storing a program; a CPU for executing the program stored in the memory; and an I / O controller for controlling an input / output device to input and output data. A real-time system that executes processing of an application program stored in the memory while performing input and output of data using the
Device driver means for performing input / output processing using the I / O controller; device driver priority control means for determining the priority of processing of the device driver means in accordance with the type of input / output data to be handled; A real-time system having scheduling means for executing device driver processing according to the processing priority of the means.
【請求項2】請求項1のリアルタイムシステムにおい
て、前記デバイスドライバは入力処理を行う入力タスク
を含み、前記デバイスドライバ優先度制御手段は入力デ
ータの種別に応じて前記入力タスクの優先度を決定し、
前記スケジューリング手段は前記入力タスクの優先度に
応じて前記入力タスクの処理を実行するリアルタイムシ
ステム。
2. The real-time system according to claim 1, wherein said device driver includes an input task for performing input processing, and said device driver priority control means determines a priority of said input task according to a type of input data. ,
A real-time system wherein the scheduling means executes the processing of the input task according to the priority of the input task.
【請求項3】請求項1のリアルタイムシステムにおい
て、前記デバイスドライバは出力処理を行う出力タスク
を含み、前記デバイスドライバ優先度制御手段は出力デ
ータの種別に応じて出力タスクの優先度を決定し、前記
スケジューリング手段は前記出力タスクの優先度に応じ
て前記出力タスクの処理を実行するリアルタイムシステ
ム。
3. The real-time system according to claim 1, wherein said device driver includes an output task for performing output processing, and said device driver priority control means determines a priority of said output task according to a type of output data. A real-time system in which the scheduling means executes the processing of the output task according to the priority of the output task.
【請求項4】請求項1のリアルタイムシステムにおい
て、前記デバイスドライバは、前記I/Oコントローラ
の割り込みにより起動される入力割り込みハンドラを含
み、前記デバイスドライバ優先度制御手段は入力データ
の種別に応じて前記入力割り込みハンドラの割り込みレ
ベルを決定し、前記スケジューリング手段は前記入力割
り込みハンドラの割り込みレベルに応じて前記入力割り
込みハンドラの処理を実行するハードウェアで実現する
リアルタイムシステム。
4. The real-time system according to claim 1, wherein said device driver includes an input interrupt handler started by an interrupt of said I / O controller, and said device driver priority control means operates in accordance with a type of input data. A real-time system in which an interrupt level of the input interrupt handler is determined, and the scheduling means is implemented by hardware that executes processing of the input interrupt handler according to the interrupt level of the input interrupt handler.
【請求項5】請求項1のリアルタイムシステムにおい
て、前記デバイスドライバは、前記I/Oコントローラ
の割り込みにより起動される出力割り込みハンドラを含
み、前記デバイスドライバ優先度制御手段は出力データ
の種別に応じて前記出力割り込みハンドラの割り込みレ
ベルを決定し、前記スケジューリング手段は前記出力割
り込みハンドラの割り込みレベルに応じて前記出力割り
込みハンドラの処理を実行するハードウェアで実現する
リアルタイムシステム。
5. The real-time system according to claim 1, wherein said device driver includes an output interrupt handler activated by an interrupt of said I / O controller, and said device driver priority control means operates according to a type of output data. A real-time system wherein the interrupt level of the output interrupt handler is determined, and the scheduling means is realized by hardware for executing the processing of the output interrupt handler according to the interrupt level of the output interrupt handler.
【請求項6】請求項1から5のいずれかのリアルタイム
システムにおいて、前記入出力データのデータ種別は、
入出力データの値の範囲で決定するリアルタイムシステ
ム。
6. The real-time system according to claim 1, wherein the data type of the input / output data is:
A real-time system that determines the range of input / output data values.
【請求項7】請求項1から5のいずれかのリアルタイム
システムにおいて、前記入出力装置の少なくともひとつ
はネットワークであり、前記入出力データのデータ種別
は、入出力データの送受信先のアドレスで決定するリア
ルタイムシステム。
7. The real-time system according to claim 1, wherein at least one of said input / output devices is a network, and a data type of said input / output data is determined by an address of a transmission / reception destination of said input / output data. Real-time system.
JP10212261A 1998-07-28 1998-07-28 Real-time system Pending JP2000047881A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10212261A JP2000047881A (en) 1998-07-28 1998-07-28 Real-time system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10212261A JP2000047881A (en) 1998-07-28 1998-07-28 Real-time system

Publications (1)

Publication Number Publication Date
JP2000047881A true JP2000047881A (en) 2000-02-18

Family

ID=16619660

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10212261A Pending JP2000047881A (en) 1998-07-28 1998-07-28 Real-time system

Country Status (1)

Country Link
JP (1) JP2000047881A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007528032A (en) * 2003-02-21 2007-10-04 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Real-time file system control queue for requests from the OS
JP2008547106A (en) * 2005-06-27 2008-12-25 マイクロソフト コーポレーション Search backoff mechanism
CN102799472A (en) * 2012-06-18 2012-11-28 西北工业大学 Real-time information processing and data transmission method for underwater active detection systems
JP2015515702A (en) * 2012-04-23 2015-05-28 マーベル ワールド トレード リミテッド Adjusting thread priority to improve throughput between peer-to-peer (P2P) devices

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007528032A (en) * 2003-02-21 2007-10-04 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Real-time file system control queue for requests from the OS
JP2008547106A (en) * 2005-06-27 2008-12-25 マイクロソフト コーポレーション Search backoff mechanism
JP2015515702A (en) * 2012-04-23 2015-05-28 マーベル ワールド トレード リミテッド Adjusting thread priority to improve throughput between peer-to-peer (P2P) devices
CN102799472A (en) * 2012-06-18 2012-11-28 西北工业大学 Real-time information processing and data transmission method for underwater active detection systems

Similar Documents

Publication Publication Date Title
US7900207B2 (en) Interrupt and exception handling for multi-streaming digital processors
US6715016B1 (en) Multiple operating system control method
KR970016979A (en) Queuing system and method of tasks in a multiprocessing system
US20050015768A1 (en) System and method for providing hardware-assisted task scheduling
JP2008506187A (en) Method and system for parallel execution of multiple kernels
JP4241462B2 (en) Control unit and microcomputer
JP2022509170A (en) Ligamentous laxity-aware type dynamic priority change in the processor
JP3644042B2 (en) Multitask processing device
JP2000047881A (en) Real-time system
JP2005092780A (en) Real time processor system and control method
JP4048638B2 (en) Scheduling apparatus and method, and recording medium
JP3893136B2 (en) Embedded computer control program, recording medium recording the program, and embedded system
JP2636722B2 (en) Multitask execution management method
JPH07230387A (en) Exclusive control method
JPH05108380A (en) Data processing system
JP3576437B2 (en) Multiprocessor task control method and task control device
JP2001022601A (en) Job execution control method and parallel computer system
JPH1165623A (en) Programmable controller
Burgess et al. BED: a multithreaded kernel for embedded systems
JPH11249917A (en) Parallel computers, their batch processing method, and storage medium
WO1992003783A1 (en) Method of implementing kernel functions
JPH0612394A (en) Process schedule system
JP2000330799A (en) Job processor and storage medium
JP2822728B2 (en) Computer system
JPH0778091A (en) Multitask managing method