JPH1139173A - Data processor and recording medium - Google Patents

Data processor and recording medium

Info

Publication number
JPH1139173A
JPH1139173A JP19422597A JP19422597A JPH1139173A JP H1139173 A JPH1139173 A JP H1139173A JP 19422597 A JP19422597 A JP 19422597A JP 19422597 A JP19422597 A JP 19422597A JP H1139173 A JPH1139173 A JP H1139173A
Authority
JP
Japan
Prior art keywords
deadline
thread
handler
time
data processing
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
JP19422597A
Other languages
Japanese (ja)
Inventor
Toshihiro Sonoda
俊浩 園田
Kiyomi Shibata
清己 柴田
Naoki Nishiguchi
直樹 西口
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP19422597A priority Critical patent/JPH1139173A/en
Publication of JPH1139173A publication Critical patent/JPH1139173A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To execute effective deadline processing corresponding to the kind of a deadline in real time OS. SOLUTION: A deadline in each operating state of a thread and the input of its deadline handier are received and these are given to a deadline managing module 3, which sets the given deadline to a time-out module 4. The module 4 stores the given deadline, examines the presence/absence of a thread exceeding the deadline at each prescribed interval (δ t) of a hard timer 53, generates an event at the time of detecting a thread exceeding the deadline and gives it to the module 3. The module receives the event, discriminates which operating state of the thread exceeding the deadline the deadline is in, and sets a deadline handler to a real time scheduler 1 based on the result. At the time of receiving the setting of the deadline handier, the scheduler 1 preferentially executes the subroutine.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、スレッドにデッド
ライン及びデッドラインハンドラを設定しておき、スレ
ッドの実行時にその実行時間が前記デッドラインを超過
したとき、前記デッドラインハンドラにより特定される
サブルーチンを実行するデータ処理装置及び記録媒体に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a subroutine specified by the deadline handler when a deadline and a deadline handler are set in a thread and the execution time of the thread exceeds the deadline during execution of the thread. And a recording medium for executing the processing.

【0002】[0002]

【従来の技術】OS(オペレーティングシステム)はコ
ンピュータの各種資源、即ちCPU,メモリ及び入出力
デバイス並びに外部記憶装置,モデム等の周辺機器を管
理し、これらをアプリケーションから使用することを可
能にする基本ソフトウェアである。OSにおいて、プロ
グラムの実行単位はプロセスと呼ばれる。また、このプ
ロセスを実行可能なタスクに分割したものをスレッドと
いう。
2. Description of the Related Art An OS (operating system) manages various resources of a computer, that is, a CPU, a memory and an input / output device, an external storage device, a peripheral device such as a modem, and the like, which enables these to be used by an application. Software. In the OS, an execution unit of a program is called a process. A thread that divides this process into executable tasks is called a thread.

【0003】リアルタイムOSは、CPUにおいて実行
すべきスレッドのスケジューリング、即ち実行順序の設
定をユーザが行うことにより、高速にイベント処理を行
うOSである。具体的には、I/O 待ち等によりCPUが
休止している期間が多いと予測されるスレッドについて
はその優先順位を低く設定し、またCPUの処理能力を
より多く必要とするスレッドの優先順位を高く設定して
おくことにより、CPUの処理能力を適切に分配して高
速に処理することができる。このようなリアルタイムO
Sは計測機器,制御装置,ロボット制御等、イベントが
発生するとすぐにイベントハンドラを起動して処理を行
う必要がある用途に適している。
A real-time OS is an OS that performs high-speed event processing by allowing a user to schedule threads to be executed in a CPU, that is, to set an execution order. Specifically, the priority of a thread that is expected to be idle for a long period of time due to waiting for I / O or the like is set low, and the priority of a thread that requires more CPU processing power is set. Is set high, the processing capacity of the CPU can be appropriately distributed and high-speed processing can be performed. Such real-time O
S is suitable for applications such as a measuring device, a control device, and a robot control that require an event handler to be activated immediately after an event occurs to perform processing.

【0004】リアルタイムOSのユーザは、各スレッド
に対してその優先順位とは別に、開始時刻,時間制約
(以下、デッドラインという),繰り返し回数及びデッ
ドラインハンドラを指定する。デッドラインハンドラ
は、開始時刻からデッドラインまでの間に処理が完了し
なかったときに実行すべきサブルーチンの先頭アドレス
である。このデッドラインハンドラは例えば、あるグラ
フィックデータを所定時間内に表示することを目的とす
るスレッドにおいて、表示処理が所定時間内に完了しな
かったとき、その時点で処理を中止するのか、または表
示が完了するまで処理を継続するのかを制御するために
使用される。
The user of the real-time OS specifies a start time, a time constraint (hereinafter, referred to as a deadline), the number of repetitions, and a deadline handler for each thread separately from its priority. The deadline handler is a head address of a subroutine to be executed when the processing is not completed between the start time and the deadline. This deadline handler is, for example, in a thread for displaying certain graphic data within a predetermined time, if the display processing is not completed within a predetermined time, the processing is stopped at that point, or the display is stopped. Used to control whether to continue processing until completion.

【0005】[0005]

【発明が解決しようとする課題】ところで、スレッドに
は走行状態,待ち状態,休止状態の3つの動作状態があ
る。走行状態とは、CPUにおいて実行中の状態であ
る。待ち状態とは、実行順序には設定されているもの
の、I/O 待ち等の外部要因で待機中の状態である。また
休止状態とは、そのスレッドの優先順位が低い等の要因
により実行順序に設定されていない状態である。前述の
リアルタイムOSにおけるデッドラインは、3つの動作
状態の時間を合計した時間制約であることから、スレッ
ドの動作状態の実状によっては効果的なデッドライン処
理が行われない可能性を有している。例えば、デッドラ
インの超過が生じた原因が、待ち状態が長く継続したこ
とによる場合と、走行時間が長く継続したことによる場
合とで、実行されるサブルーチンが同じである。以下
に、具体例を挙げて説明する。
The thread has three operating states: a running state, a waiting state, and a sleep state. The running state is a state in which the CPU is executing. The wait state is a state in which the execution order is set, but the apparatus is waiting due to an external factor such as an I / O wait. The suspended state is a state in which the threads are not set in the execution order due to factors such as low priority. Since the deadline in the above-described real-time OS is a time constraint obtained by adding the times of the three operation states, there is a possibility that effective deadline processing may not be performed depending on the actual state of the operation state of the thread. . For example, the same subroutine is executed when the deadline is exceeded when the waiting state continues for a long time and when the running time continues for a long time. Hereinafter, a specific example will be described.

【0006】従来のリアルタイムOSによるデッドライ
ン処理における問題点を、「ネットワークを介して接続
されている他のコンピュータからローカルなコンピュー
タへ、プログレッシブJPEGによる圧縮画像データを転送
し、これを前記コンピュータ上で伸張して表示させる処
理を、デッドラインTで実行する」場合について述べ
る。プログレッシブJPEGとは、画像の完全な復元には相
応の演算回数を要するが、伸張画像の画質を落とすこと
と引き換えにその伸張のための演算回数を少なくするこ
とができる画像圧縮方式である。
A problem in the deadline processing by the conventional real-time OS is described as follows: “Transferred progressive JPEG compressed image data is transferred from another computer connected via a network to a local computer, and is transferred to the computer. The case where the process of decompressing and displaying is executed at the deadline T "will be described. Progressive JPEG is an image compression method that requires a certain number of calculations to completely restore an image, but can reduce the number of calculations for decompression in exchange for reducing the image quality of the decompressed image.

【0007】この場合において、デッドラインT内に処
理が完了しなかったとき、その主な原因としてデータ転
送の遅滞又はデータ伸張の過負荷の2つが考えられる。
前者は待ち状態の継続時間の増加として現れ、後者は走
行状態の継続時間の増加として現れる。データ転送の遅
滞による場合は、転送するデータ量を減少させることに
よりデッドラインT内に処理を完了することができるよ
うになる。またデータ伸張の過負荷による場合は、演算
回数を低減させることによりデッドラインT内に処理を
完了することができるようになる。
In this case, when the processing is not completed within the deadline T, two main causes are considered: data transfer delay or data decompression overload.
The former appears as an increase in the duration of the waiting state, and the latter appears as an increase in the duration of the driving state. In the case of delay in data transfer, processing can be completed within the deadline T by reducing the amount of data to be transferred. In the case of overload of data expansion, the processing can be completed within the deadline T by reducing the number of operations.

【0008】しかし従来のリアルタイムOSは、スレッ
ドの各動作状態の継続時間を集計する仕組みを有してお
らず、前述の如き動作状態の実状に応じたデッドライン
処理を行うことはできなかった。本発明は斯かる事情に
鑑みてなされたものであって、スレッドの各動作状態の
継続時間を集計し、スレッドの動作状態の実状に応じて
デッドライン処理を選択し実行することができるデータ
処理装置及び記録媒体の提供を目的とする。
However, the conventional real-time OS does not have a mechanism for counting the duration of each operation state of a thread, and cannot perform the deadline processing according to the actual state of the operation state as described above. The present invention has been made in view of the above circumstances, and has been made in consideration of the above circumstances, and has a data processing method capable of totalizing the duration of each operation state of a thread and selecting and executing deadline processing according to the actual state of the operation state of the thread. It is intended to provide a device and a recording medium.

【0009】[0009]

【課題を解決するための手段】第1発明に係るデータ処
理装置は、スレッドにデッドライン及びデッドラインハ
ンドラを設定しておき、スレッドの実行時に前記スレッ
ドが走行状態,待ち状態又は休止状態にある時間を集計
し、集計した時間が前記デッドラインを超過したとき
に、前記デッドラインハンドラにより特定されるサブル
ーチンを実行するデータ処理装置において、スレッドが
走行状態にある時間のデッドライン及びデッドラインハ
ンドラを記憶するテーブルと、スレッドが走行状態にあ
る時間を集計して、集計した時間が前記デッドラインを
超過したか否かを判別する手段と、前記デッドラインを
超過したと判別したとき、前記デッドラインハンドラに
より特定されるサブルーチンを実行する手段とを備える
ことを特徴とする。
According to a first aspect of the present invention, there is provided a data processing apparatus in which a deadline and a deadline handler are set in a thread, and the thread is in a running state, a waiting state, or a sleep state when the thread is executed. In a data processing device that aggregates time and executes a subroutine specified by the deadline handler when the aggregated time exceeds the deadline, a deadline and a deadline handler for a time when a thread is in a running state are provided. A table to be stored, means for summing up the time during which the thread is in the running state, and means for judging whether or not the summed time has exceeded the deadline; and Means for executing a subroutine specified by the handler.

【0010】第2発明に係るデータ処理装置は、スレッ
ドにデッドライン及びデッドラインハンドラを設定して
おき、スレッドの実行時に前記スレッドが走行状態,待
ち状態又は休止状態にある時間を集計し、集計した時間
が前記デッドラインを超過したときに、前記デッドライ
ンハンドラにより特定されるサブルーチンを実行するデ
ータ処理装置において、スレッドが待ち状態にある時間
のデッドライン及びデッドラインハンドラを記憶するテ
ーブルと、スレッドが待ち状態にある時間を集計して、
集計した時間が前記デッドラインを超過したか否かを判
別する手段と、前記デッドラインを超過したと判別した
とき、前記デッドラインハンドラにより特定されるサブ
ルーチンを実行する手段とを備えることを特徴とする。
In the data processing apparatus according to the second aspect of the present invention, a deadline and a deadline handler are set for a thread, and the time during which the thread is in a running state, a waiting state, or a dormant state during execution of the thread is counted. A data processing device for executing a subroutine specified by the deadline handler when the time spent exceeds the deadline, a table storing deadlines and deadline handlers for a time when a thread is in a waiting state; Calculate the time that is in the waiting state,
Means for determining whether or not the counted time has exceeded the deadline, and means for executing a subroutine specified by the deadline handler when determining that the deadline has been exceeded. I do.

【0011】第3発明に係るデータ処理装置は、スレッ
ドにデッドライン及びデッドラインハンドラを設定して
おき、スレッドの実行時に前記スレッドが走行状態,待
ち状態又は休止状態にある時間を集計し、集計した時間
が前記デッドラインを超過したときに、前記デッドライ
ンハンドラにより特定されるサブルーチンを実行するデ
ータ処理装置において、スレッドが休止状態にある時間
のデッドライン及びデッドラインハンドラを記憶するテ
ーブルと、スレッドが休止状態にある時間を集計して、
集計した時間が前記デッドラインを超過したか否かを判
別する手段と、前記デッドラインを超過したと判別した
とき、前記デッドラインハンドラにより特定されるサブ
ルーチンを実行する手段とを備えることを特徴とする。
In the data processing apparatus according to the third invention, a deadline and a deadline handler are set in a thread, and the time during which the thread is in a running state, a waiting state, or a halt state is calculated when the thread is executed, and the totaling time is calculated. A data processing device for executing a subroutine specified by the deadline handler when the time exceeds the deadline, a table storing deadlines and deadline handlers for a time when the thread is in a sleep state; Aggregate the time that is in the dormant state,
Means for determining whether or not the counted time has exceeded the deadline, and means for executing a subroutine specified by the deadline handler when determining that the deadline has been exceeded. I do.

【0012】第4発明に係る記録媒体は、データ処理装
置にスレッドのデッドライン及びデッドラインハンドラ
を記憶させ、スレッドの実行時に前記スレッドが走行状
態,待ち状態又は休止状態にある時間を集計させ、集計
した時間が前記デッドラインを超過したときに、前記デ
ッドラインハンドラにより特定されるサブルーチンを実
行させるためのプログラムを記録してある機械読み取り
可能な記録媒体において、データ処理装置にスレッドが
走行状態にある時間のデッドライン及びデッドラインハ
ンドラを記憶させるプログラムコード手段と、データ処
理装置にスレッドが走行状態にある時間を集計させるプ
ログラムコード手段と、データ処理装置に集計した時間
が前記デッドラインを超過したか否かを判別させるプロ
グラムコード手段と、データ処理装置に前記デッドライ
ンを超過したと判別したとき、前記デッドラインハンド
ラにより特定されるサブルーチンを実行させるプログラ
ムコード手段とを備えることを特徴とする。
A recording medium according to a fourth aspect of the present invention stores a deadline and a deadline handler of a thread in a data processing device, and counts the time during which the thread is in a running state, a waiting state, or a halt state during execution of the thread. When the counted time exceeds the deadline, a thread is set to a running state in the data processing device on a machine-readable recording medium storing a program for executing a subroutine specified by the deadline handler. Program code means for storing a deadline and a deadline handler for a certain time; program code means for causing the data processing device to count the time during which the thread is in a running state; and the time counted by the data processing device exceeding the deadline. Program code means for determining whether or not When it is determined that exceeds the deadline to a data processing apparatus, characterized by comprising a program code means for executing a subroutine specified by the deadline handler.

【0013】第5発明に係る記録媒体は、データ処理装
置にスレッドのデッドライン及びデッドラインハンドラ
を記憶させ、スレッドの実行時に前記スレッドが走行状
態,待ち状態又は休止状態にある時間を集計させ、集計
した時間が前記デッドラインを超過したときに、前記デ
ッドラインハンドラにより特定されるサブルーチンを実
行させるためのプログラムを記録してある機械読み取り
可能な記録媒体において、データ処理装置にスレッドが
待ち状態にある時間のデッドライン及びデッドラインハ
ンドラを記憶させるプログラムコード手段と、データ処
理装置にスレッドが待ち状態にある時間を集計させるプ
ログラムコード手段と、データ処理装置に集計した時間
が前記デッドラインを超過したか否かを判別させるプロ
グラムコード手段と、データ処理装置に前記デッドライ
ンを超過したと判別したとき、前記デッドラインハンド
ラにより特定されるサブルーチンを実行させるプログラ
ムコード手段とを備えることを特徴とする。
A recording medium according to a fifth aspect of the present invention stores a deadline and a deadline handler of a thread in a data processing device, and counts a time during which the thread is in a running state, a waiting state, or a halt state during execution of the thread. When the counted time exceeds the deadline, a thread is set to a waiting state in the data processing device on a machine-readable recording medium recording a program for executing a subroutine specified by the deadline handler. Program code means for storing a deadline and a deadline handler for a certain time, program code means for causing a data processing device to count the time during which a thread is in a waiting state, and time counted by the data processing device exceeding the deadline Program code means for determining whether or not When it is determined that exceeds the deadline to a data processing apparatus, characterized by comprising a program code means for executing a subroutine specified by the deadline handler.

【0014】第6発明に係る記録手段は、データ処理装
置にスレッドのデッドライン及びデッドラインハンドラ
を記憶させ、スレッドの実行時に前記スレッドが走行状
態,待ち状態又は休止状態にある時間を集計させ、集計
した時間が前記デッドラインを超過したときに、前記デ
ッドラインハンドラにより特定されるサブルーチンを実
行させるためのプログラムを記録してある機械読み取り
可能な記録媒体において、データ処理装置にスレッドが
休止状態にある時間のデッドライン及びデッドラインハ
ンドラを記憶させるプログラムコード手段と、データ処
理装置にスレッドが休止状態にある時間を集計させるプ
ログラムコード手段と、データ処理装置に集計した時間
が前記デッドラインを超過したか否かを判別させるプロ
グラムコード手段と、データ処理装置に前記デッドライ
ンを超過したと判別したとき、前記デッドラインハンド
ラにより特定されるサブルーチンを実行させるプログラ
ムコード手段とを備えることを特徴とする。
The recording means according to a sixth aspect of the present invention stores a deadline and a deadline handler of a thread in the data processing device, and counts the time during which the thread is in a running state, a waiting state, or a sleep state during execution of the thread. When the counted time exceeds the deadline, a thread for the data processing device is set to a halt state on a machine-readable recording medium storing a program for executing a subroutine specified by the deadline handler. Program code means for storing a deadline and a deadline handler for a certain time; program code means for causing a data processing device to count the time during which a thread is in a sleep state; and time counted by the data processing device exceeding the deadline. Program code means for determining whether or not When it is determined that exceeds the deadline to a data processing apparatus, characterized by comprising a program code means for executing a subroutine specified by the deadline handler.

【0015】図2は、データ処理装置におけるデッドラ
イン処理の機能構成を示すブロック図である。図におい
て1はリアルタイムスケジューラであって、スレッド毎
に与えられた優先順位に基づき、スレッドの実行順序を
決定する。また、スレッド(P1,P2,P3,P4) のデッドライ
ン及びそのデッドラインハンドラを表すリアルタイムテ
ーブル2に基づいて、それらの実行を管理している。各
スレッドにはデッドラインの属性として従来から存在す
るデッドライン(T) 及びデッドラインハンドラ(H) に加
え、走行状態,待ち状態,休止状態に対する夫々のデッ
ドライン(rT,wT,sT)及び夫々に対応するデッドラインハ
ンドラ(rH,wH,sH)を持たせてある。リアルタイムスケジ
ューラ1は、スレッド(P1,P2,P3,P4) の動作状態が切り
替わる都度、その動作状態の継続時間の集計を行う。ま
た、デッドライン及びデッドラインハンドラをデッドラ
イン管理モジュール3に与える。そして、実行順序に従
ってスレッドを実行する。
FIG. 2 is a block diagram showing a functional configuration of deadline processing in the data processing device. In FIG. 1, reference numeral 1 denotes a real-time scheduler, which determines the execution order of threads based on the priority given to each thread. In addition, the execution of the threads (P1, P2, P3, P4) is managed based on the deadline of the threads (P1, P2, P3, P4) and the real-time table 2 representing the deadline handler. For each thread, in addition to the existing deadline (T) and deadline handler (H) as deadline attributes, the respective deadlines (rT, wT, sT) and running state, waiting state, and sleep state, respectively Has a deadline handler (rH, wH, sH) corresponding to. Each time the operation state of the thread (P1, P2, P3, P4) is switched, the real-time scheduler 1 totals the duration of the operation state. Further, a deadline and a deadline handler are given to the deadline management module 3. Then, the threads are executed according to the execution order.

【0016】デッドライン管理モジュール3はデッドラ
インの超過が生じたときに、それがどのスレッドのどの
動作状態のデッドラインであるかを判別し、その結果に
基づいてデッドラインハンドラを設定する。具体的に
は、デッドライン管理モジュール3は動作状態毎のデッ
ドラインをタイムアウトモジュール4に与える。タイム
アウトモジュール4は与えられたデッドラインを記憶し
ておき、ハードタイマ53の所定の間隔(δt)毎にデッ
ドラインを超過したスレッドがあるか否かを検査する。
そしてデッドラインを超過したスレッドを発見したと
き、イベントを発生させてデッドライン管理モジュール
3へ与える。デッドライン管理モジュール3は与えられ
たイベントから、スレッドを特定してそのデッドライン
ハンドラをリアルタイムスケジューラ1へ与える。リア
ルタイムスケジューラ1は、デッドラインハンドラを受
け付けたとき、そのサブルーチンを優先的に実行する。
When the deadline is exceeded, the deadline management module 3 determines which thread is in which operating state and which deadline, and sets a deadline handler based on the result. Specifically, the deadline management module 3 gives a deadline for each operation state to the timeout module 4. The timeout module 4 stores the given deadline, and checks at every predetermined interval (δt) of the hard timer 53 whether there is a thread that has exceeded the deadline.
When a thread exceeding the deadline is found, an event is generated and given to the deadline management module 3. The deadline management module 3 specifies a thread from the given event and provides the deadline handler to the real-time scheduler 1. When receiving the deadline handler, the real-time scheduler 1 preferentially executes the subroutine.

【0017】図3はリアルタイムスケジューラ1におけ
る時間管理を示すタイムチャートである。図において横
軸は実時間を、縦軸はスレッドの動作状態を表してい
る。以下、実時間tにスレッド(P1)の処理を開始する場
合について述べる。スレッド(P1)は実時間tからt+T
の間に処理を完了するスレッドであって、その走行状
態,待ち状態,休止状態に対する夫々のデッドラインと
して(rT,wT,sT)が設定されている。
FIG. 3 is a time chart showing time management in the real-time scheduler 1. In the figure, the horizontal axis represents real time, and the vertical axis represents the operating state of the thread. Hereinafter, a case where the process of the thread (P1) is started at the real time t will be described. Thread (P1) is from real time t to t + T
, And (rT, wT, sT) is set as a deadline for each of the running state, the waiting state, and the pause state.

【0018】実時間tにおいて、リアルタイムスケジュ
ーラ1は走行時間,待ち時間,休止時間をクリアし、休
止状態の開始時刻として実時間tを記憶する。また、タ
イムアウトモジュール4に休止状態のデッドライン(sT)
を設定する。スレッド(P1)の動作状態が休止状態から走
行状態へ移行した実時間t2において、リアルタイムスケ
ジューラ1は記憶しておいた休止状態の開始時刻からス
レッド(P1)の休止時間を求めてこれをインクリメントす
る。そして、休止状態の開始時刻として実時間t2を記憶
する。また、タイムアウトモジュール4からデッドライ
ン(sT)を削除し、代わりにデッドライン(rT)を設定す
る。
At the real time t, the real-time scheduler 1 clears the running time, the waiting time, and the pause time, and stores the real time t as the start time of the pause state. In addition, the deadline (sT) of the halt state is added to the timeout module 4.
Set. At the real time t2 when the operation state of the thread (P1) shifts from the sleep state to the running state, the real-time scheduler 1 obtains the sleep time of the thread (P1) from the stored start time of the sleep state and increments it. . Then, the real time t2 is stored as the start time of the sleep state. Further, the deadline (sT) is deleted from the timeout module 4, and a deadline (rT) is set instead.

【0019】以下、t3において動作状態が待ち状態へ移
行し、t4において休止状態へ移行し、t5においては走行
状態へ移行する場合において、t5に到ったときその走行
時間は(t3 − t2)になっている。また、待ち時間及び休
止時間は夫々(t4 − t3)及び{(t5 − t4)+(t2 − t)
}になっている。このように、各動作状態の継続時間
を夫々集計しておき、各動作状態においてその継続時間
がデッドラインを超過したことを検知したときに、その
対応するデッドラインハンドラによりサブルーチンを起
動する。従って前述のデータ処理装置は、超過したデッ
ドラインの動作状態に応じてデッドライン処理を選択し
て実行することができる。
In the following, when the operating state shifts to the waiting state at t3, shifts to the rest state at t4, and shifts to the running state at t5, when the running time reaches t5, the running time is (t3-t2). It has become. The waiting time and the pause time are (t4−t3) and {(t5−t4) + (t2−t), respectively.
}It has become. As described above, the duration of each operation state is totaled, and when it is detected that the duration exceeds the deadline in each operation state, a subroutine is activated by the corresponding deadline handler. Therefore, the above-described data processing device can select and execute the deadline processing according to the operating state of the excess deadline.

【0020】[0020]

【発明の実施の形態】図1は本発明システムのハードウ
ェア構成を示すブロック図であって、基本的には一般的
なコンピュータシステムとして構成されている。具体的
には、前記コンピュータシステムを本発明のデータ処理
装置として使用するためのオペレーティングシステムを
実行するCPU 51及びメモリ52並びにハードタイマ53を内
蔵したコンピュータシステム50を中核とし、表示装置と
しての例えばCRT または液晶表示パネル等のディスプレ
イ55,ポインティング装置としてのマウス56,入力装置
としてのキーボード57,出力装置としてのプリンタ58及
び記憶装置としての例えばハードディスクユニット等の
外部メモリ59等で構成されている。
FIG. 1 is a block diagram showing a hardware configuration of a system according to the present invention, which is basically configured as a general computer system. Specifically, a computer system 50 including a CPU 51 and a memory 52 and a hard timer 53 for executing an operating system for using the computer system as the data processing device of the present invention is a core, and for example, a CRT as a display device is used. Or, it comprises a display 55 such as a liquid crystal display panel, a mouse 56 as a pointing device, a keyboard 57 as an input device, a printer 58 as an output device, and an external memory 59 such as a hard disk unit as a storage device.

【0021】図4は前記オペレーティングシステムに係
るデッドライン処理の手順を示すフローチャートであ
る。スレッドの動作状態毎のデッドライン及びそのデッ
ドラインハンドラの入力を受け付けて、これらをリアル
タイムテーブル2に設定する(S1)。リアルタイムスケジ
ューラ1は受け付けたデッドライン及びそのハンドラを
デッドライン管理モジュール3に与える(S2)。デッドラ
イン管理モジュール3は与えられたデッドラインをタイ
ムアウトモジュール4に設定する(S3)。
FIG. 4 is a flowchart showing the procedure of the deadline processing according to the operating system. The input of the deadline and the deadline handler for each operation state of the thread is received, and these are set in the real-time table 2 (S1). The real-time scheduler 1 gives the received deadline and its handler to the deadline management module 3 (S2). The deadline management module 3 sets the given deadline in the timeout module 4 (S3).

【0022】タイムアウトモジュール4は与えられたデ
ッドラインを記憶し、ハードタイマ53の所定の間隔(δ
t)毎にデッドラインを超過したスレッドがあるか否か
を検査する(S4)。そしてデッドラインを超過したスレッ
ドを発見したとき、イベントを発生させて(S5)、デッド
ライン管理モジュール3へ与える。デッドライン管理モ
ジュール3は前記イベントを受けて、デッドラインを超
過したスレッドのどの動作状態のデッドラインであるか
を判別し、その結果に基づいてリアルタイムスケジュー
ラ1にデッドラインハンドラを設定する(S6)。リアルタ
イムスケジューラ1は、デッドラインハンドラの設定を
受け付けたとき、そのサブルーチンを優先的に実行す
る。
The timeout module 4 stores the given deadline, and stores a predetermined interval (δ
It is checked every t) whether there is a thread that has exceeded the deadline (S4). Then, when a thread exceeding the deadline is found, an event is generated (S5) and given to the deadline management module 3. Upon receiving the event, the deadline management module 3 determines which operating state of the thread that has exceeded the deadline is the deadline, and sets a deadline handler in the real-time scheduler 1 based on the result (S6). . When receiving the setting of the deadline handler, the real-time scheduler 1 preferentially executes the subroutine.

【0023】前述のオペレーティングシステムにおいて
は、何れの動作状態のデッドラインを超過したかを判別
できるので、デッドラインT内に処理が完了しなかった
原因を明らかにすることができる。従って、「ネットワ
ークを介して接続されている他のコンピュータからロー
カルなコンピュータへ、プログレッシブJPEGによる圧縮
画像データを転送し、これを前記コンピュータ上で伸張
して表示させる処理を、デッドラインTで実行する」場
合において、デッドラインT内に処理が完了しなかった
とき、超過したデッドラインに応じて以下に示すように
デッドライン処理を選択することが可能になる。
In the above-mentioned operating system, since it is possible to determine which of the operating states has exceeded the deadline, it is possible to clarify the cause of the processing not being completed within the deadline T. Therefore, the processing of transferring the progressive JPEG compressed image data from another computer connected via the network to the local computer, and expanding and displaying the compressed JPEG data on the computer is executed at the deadline T. In this case, when the processing is not completed within the deadline T, the deadline processing can be selected as described below according to the excess deadline.

【0024】1.走行状態のデッドラインを超過したこ
とによる場合、前記デッドラインを増加させてCPUの
割り当てを増加させるか又はデッドラインハンドラに演
算回数を低減させるサブルーチンの先頭アドレスを割り
当てる。 2.待ち状態のデッドラインを超過したことによる場
合、前記デッドラインを増加させて外的な遅延要因の許
容範囲を広げるか又は転送するデータ量を低減させる。 3.休止状態のデッドラインを超過したことによる場
合、CPUを割り当てられなかったことによるので、他
のスレッドとの相対的な重要性からそのスレッドの優先
順位を再設定する。
1. When the deadline in the running state is exceeded, the deadline is increased to increase the assignment of the CPU, or the start address of a subroutine for reducing the number of operations is assigned to the deadline handler. 2. If the deadline in the waiting state is exceeded, the deadline is increased to increase the allowable range of external delay factors or to reduce the amount of data to be transferred. 3. If the deadline of the sleep state is exceeded, since the CPU cannot be allocated, the priority of the thread is reset based on the relative importance with respect to another thread.

【0025】以上の如く、超過したデッドラインに応じ
てデッドラインハンドラを選択して実行することによ
り、デッドラインT内に処理を完了することができるよ
うになる。
As described above, by selecting and executing the deadline handler according to the excess deadline, the processing can be completed within the deadline T.

【0026】図5は本発明システムの使用形態を示す説
明図である。図において、60はコンピュータシステム50
を本発明システムとして使用するためのプログラム61を
格納してあるデータベースであって、コンピュータシス
テム50と接続してある。コンピュータシステム50はオン
ライン状態のデータベース60からプログラム61を読み出
して実行することにより、データ処理装置として使用で
きるようになる。また、62はコンピュータシステム50を
本発明システムとして使用するためのプログラム63を格
納してある、RAM,ROM,ハードディスクドライブ等の記憶
装置であって、コンピュータシステム50と接続してあ
る。コンピュータシステム50は記憶装置62からプログラ
ム63を読み出して実行することにより、データ処理装置
として使用可能になる。
FIG. 5 is an explanatory diagram showing a mode of use of the system of the present invention. In the figure, 60 is a computer system 50
Is a database storing a program 61 for use as a system of the present invention, and is connected to the computer system 50. The computer system 50 can be used as a data processing device by reading and executing the program 61 from the online database 60. Reference numeral 62 denotes a storage device such as a RAM, a ROM, and a hard disk drive, which stores a program 63 for using the computer system 50 as the system of the present invention, and is connected to the computer system 50. The computer system 50 can be used as a data processing device by reading and executing the program 63 from the storage device 62.

【0027】また、65はコンピュータシステム50を本発
明システムとして使用するためのプログラム66を格納し
てある、フレキシブルディスク,CD-ROM,DVD-ROM 等の記
録媒体である。コンピュータシステム50には記録媒体の
読み出し装置64が接続されており、これに記録媒体65を
装填してプログラム66を読み出して実行することによ
り、データ処理装置として使用可能になる。
Reference numeral 65 denotes a recording medium such as a flexible disk, a CD-ROM, or a DVD-ROM which stores a program 66 for using the computer system 50 as the system of the present invention. A reading device 64 for a recording medium is connected to the computer system 50. A recording medium 65 is loaded into the computer system 50, and a program 66 is read and executed, whereby the program can be used as a data processing device.

【0028】[0028]

【発明の効果】以上の如き本発明のデータ処理装置によ
っては、動作状態毎にデッドライン及びデッドラインハ
ンドラを設けるために、デッドラインを超過した動作状
態に応じてデッドラインハンドラを選択することが可能
になるから、スレッドの動作状態の実状に応じてデッド
ライン処理を選択し、実行することができる。
According to the data processing apparatus of the present invention as described above, in order to provide a deadline and a deadline handler for each operation state, it is possible to select a deadline handler according to the operation state exceeding the deadline. Since it becomes possible, deadline processing can be selected and executed according to the actual state of the operation state of the thread.

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

【図1】本発明システムのハードウェア構成を示すブロ
ック図である。
FIG. 1 is a block diagram illustrating a hardware configuration of a system of the present invention.

【図2】デッドライン処理の機能構成を示すブロック図
である。
FIG. 2 is a block diagram illustrating a functional configuration of a deadline process.

【図3】リアルタイムスケジューラにおける時間管理を
示すタイムチャートである。
FIG. 3 is a time chart showing time management in a real-time scheduler.

【図4】オペレーティングシステムに係るデッドライン
処理の手順を示すフローチャートである。
FIG. 4 is a flowchart illustrating a procedure of deadline processing according to the operating system.

【図5】本発明システムの使用形態を示す説明図であ
る。
FIG. 5 is an explanatory diagram showing a use form of the system of the present invention.

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

1 リアルタイムスケジューラ 2 リアルタイムテーブル 3 デッドライン管理モジュール 4 タイムアウトモジュール 53 ハードタイマ 1 Real-time scheduler 2 Real-time table 3 Deadline management module 4 Timeout module 53 Hard timer

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 スレッドにデッドライン及びデッドライ
ンハンドラを設定しておき、スレッドの実行時に前記ス
レッドが走行状態,待ち状態又は休止状態にある時間を
集計し、集計した時間が前記デッドラインを超過したと
きに、前記デッドラインハンドラにより特定されるサブ
ルーチンを実行するデータ処理装置において、 スレッドが走行状態にある時間のデッドライン及びデッ
ドラインハンドラを記憶するテーブルと、 スレッドが走行状態にある時間を集計して、集計した時
間が前記デッドラインを超過したか否かを判別する手段
と、 前記デッドラインを超過したと判別したとき、前記デッ
ドラインハンドラにより特定されるサブルーチンを実行
する手段とを備えることを特徴とするデータ処理装置。
1. A deadline and a deadline handler are set in a thread, and a time during which the thread is in a running state, a waiting state, or a sleep state during execution of the thread is totaled, and the totaled time exceeds the deadline. A data processing device that executes a subroutine specified by the deadline handler when the thread is in a running state; Means for determining whether or not the totaled time has exceeded the deadline; and means for executing a subroutine specified by the deadline handler when determining that the deadline has been exceeded. A data processing device characterized by the above-mentioned.
【請求項2】 スレッドにデッドライン及びデッドライ
ンハンドラを設定しておき、スレッドの実行時に前記ス
レッドが走行状態,待ち状態又は休止状態にある時間を
集計し、集計した時間が前記デッドラインを超過したと
きに、前記デッドラインハンドラにより特定されるサブ
ルーチンを実行するデータ処理装置において、 スレッドが待ち状態にある時間のデッドライン及びデッ
ドラインハンドラを記憶するテーブルと、 スレッドが待ち状態にある時間を集計して、集計した時
間が前記デッドラインを超過したか否かを判別する手段
と、 前記デッドラインを超過したと判別したとき、前記デッ
ドラインハンドラにより特定されるサブルーチンを実行
する手段とを備えることを特徴とするデータ処理装置。
2. A deadline and a deadline handler are set in a thread, and a time during which the thread is in a running state, a waiting state, or a sleep state during execution of the thread is totaled, and the totaled time exceeds the deadline. In the data processing device that executes the subroutine specified by the deadline handler, a table storing the deadline and the deadline handler of the time during which the thread is in the waiting state, and the time during which the thread is in the waiting state are totaled. And means for determining whether or not the totaled time has exceeded the deadline, and means for executing a subroutine specified by the deadline handler when determining that the deadline has been exceeded. A data processing device characterized by the above-mentioned.
【請求項3】 スレッドにデッドライン及びデッドライ
ンハンドラを設定しておき、スレッドの実行時に前記ス
レッドが走行状態,待ち状態又は休止状態にある時間を
集計し、集計した時間が前記デッドラインを超過したと
きに、前記デッドラインハンドラにより特定されるサブ
ルーチンを実行するデータ処理装置において、 スレッドが休止状態にある時間のデッドライン及びデッ
ドラインハンドラを記憶するテーブルと、 スレッドが休止状態にある時間を集計して、集計した時
間が前記デッドラインを超過したか否かを判別する手段
と、 前記デッドラインを超過したと判別したとき、前記デッ
ドラインハンドラにより特定されるサブルーチンを実行
する手段とを備えることを特徴とするデータ処理装置。
3. A deadline and a deadline handler are set in a thread, and a time during which the thread is in a running state, a waiting state, or a sleep state is counted when the thread is executed, and the counted time exceeds the deadline. In the data processing device that executes the subroutine specified by the deadline handler, a table storing the deadline of the time when the thread is in the sleep state and the deadline handler is totaled. Means for determining whether or not the totaled time has exceeded the deadline; and means for executing a subroutine specified by the deadline handler when determining that the deadline has been exceeded. A data processing device characterized by the above-mentioned.
【請求項4】 データ処理装置にスレッドのデッドライ
ン及びデッドラインハンドラを記憶させ、スレッドの実
行時に前記スレッドが走行状態,待ち状態又は休止状態
にある時間を集計させ、集計した時間が前記デッドライ
ンを超過したときに、前記デッドラインハンドラにより
特定されるサブルーチンを実行させるためのプログラム
を記録してある機械読み取り可能な記録媒体において、 データ処理装置にスレッドが走行状態にある時間のデッ
ドライン及びデッドラインハンドラを記憶させるプログ
ラムコード手段と、 データ処理装置にスレッドが走行状態にある時間を集計
させるプログラムコード手段と、 データ処理装置に集計した時間が前記デッドラインを超
過したか否かを判別させるプログラムコード手段と、 データ処理装置に前記デッドラインを超過したと判別し
たとき、前記デッドラインハンドラにより特定されるサ
ブルーチンを実行させるプログラムコード手段とを備え
ることを特徴とするプログラムを記録してある機械読み
取り可能な記録媒体。
4. The data processing device stores a deadline and a deadline handler of a thread, and counts the time during which the thread is in a running state, a waiting state, or a sleep state during execution of the thread. When a thread is in a running state in a data processing device, on a machine-readable recording medium on which a program for executing a subroutine specified by the deadline handler is recorded when the deadline is exceeded. Program code means for storing a line handler, program code means for causing the data processing device to total the time during which the thread is in a running state, and program for causing the data processing device to determine whether the total time exceeds the deadline. Code means and before the data processing device When it is determined that exceeds the deadline, a machine-readable recording medium that is recorded with a program characterized in that it comprises program code means for executing a subroutine specified by the deadline handler.
【請求項5】 データ処理装置にスレッドのデッドライ
ン及びデッドラインハンドラを記憶させ、スレッドの実
行時に前記スレッドが走行状態,待ち状態又は休止状態
にある時間を集計させ、集計した時間が前記デッドライ
ンを超過したときに、前記デッドラインハンドラにより
特定されるサブルーチンを実行させるためのプログラム
を記録してある機械読み取り可能な記録媒体において、 データ処理装置にスレッドが待ち状態にある時間のデッ
ドライン及びデッドラインハンドラを記憶させるプログ
ラムコード手段と、 データ処理装置にスレッドが待ち状態にある時間を集計
させるプログラムコード手段と、 データ処理装置に集計した時間が前記デッドラインを超
過したか否かを判別させるプログラムコード手段と、 データ処理装置に前記デッドラインを超過したと判別し
たとき、前記デッドラインハンドラにより特定されるサ
ブルーチンを実行させるプログラムコード手段とを備え
ることを特徴とするプログラムを記録してある機械読み
取り可能な記録媒体。
5. A data processing device which stores a deadline of a thread and a deadline handler, counts a time during which the thread is in a running state, a waiting state, or a sleep state during execution of the thread, and counts the calculated deadline. When a thread is in a waiting state in a data processing device on a machine-readable recording medium on which a program for executing a subroutine specified by the deadline handler is recorded. Program code means for storing a line handler; program code means for causing the data processing device to count the time during which the thread is in a waiting state; and a program for causing the data processing device to determine whether the counted time has exceeded the deadline. Code means and before the data processing device When it is determined that exceeds the deadline, a machine-readable recording medium that is recorded with a program characterized in that it comprises program code means for executing a subroutine specified by the deadline handler.
【請求項6】 データ処理装置にスレッドのデッドライ
ン及びデッドラインハンドラを記憶させ、スレッドの実
行時に前記スレッドが走行状態,待ち状態又は休止状態
にある時間を集計させ、集計した時間が前記デッドライ
ンを超過したときに、前記デッドラインハンドラにより
特定されるサブルーチンを実行させるためのプログラム
を記録してある機械読み取り可能な記録媒体において、 データ処理装置にスレッドが休止状態にある時間のデッ
ドライン及びデッドラインハンドラを記憶させるプログ
ラムコード手段と、 データ処理装置にスレッドが休止状態にある時間を集計
させるプログラムコード手段と、 データ処理装置に集計した時間が前記デッドラインを超
過したか否かを判別させるプログラムコード手段と、 データ処理装置に前記デッドラインを超過したと判別し
たとき、前記デッドラインハンドラにより特定されるサ
ブルーチンを実行させるプログラムコード手段とを備え
ることを特徴とするプログラムを記録してある機械読み
取り可能な記録媒体。
6. A data processing device which stores a deadline and a deadline handler of a thread, sums up a time during which the thread is in a running state, a waiting state, or a sleep state during execution of the thread, and sums up the deadline. When a thread is in a halt state in a data processing device, on a machine-readable recording medium storing a program for executing a subroutine specified by the deadline handler when Program code means for storing the line handler, program code means for causing the data processing device to count the time during which the thread is in a sleep state, and program for causing the data processing device to determine whether or not the counted time exceeds the deadline. Code means and before the data processing device When it is determined that exceeds the deadline, a machine-readable recording medium that is recorded with a program characterized in that it comprises program code means for executing a subroutine specified by the deadline handler.
JP19422597A 1997-07-18 1997-07-18 Data processor and recording medium Withdrawn JPH1139173A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19422597A JPH1139173A (en) 1997-07-18 1997-07-18 Data processor and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19422597A JPH1139173A (en) 1997-07-18 1997-07-18 Data processor and recording medium

Publications (1)

Publication Number Publication Date
JPH1139173A true JPH1139173A (en) 1999-02-12

Family

ID=16321049

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19422597A Withdrawn JPH1139173A (en) 1997-07-18 1997-07-18 Data processor and recording medium

Country Status (1)

Country Link
JP (1) JPH1139173A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013030860A1 (en) * 2011-08-26 2013-03-07 株式会社日立製作所 Predictive sequential calculation device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013030860A1 (en) * 2011-08-26 2013-03-07 株式会社日立製作所 Predictive sequential calculation device
JPWO2013030860A1 (en) * 2011-08-26 2015-03-23 株式会社日立製作所 Predictive sequential computer
US9483306B2 (en) 2011-08-26 2016-11-01 Hitachi, Ltd. Predictive sequential calculation device

Similar Documents

Publication Publication Date Title
US7840965B2 (en) Selective generation of an asynchronous notification for a partition management operation in a logically-partitioned computer
US6986068B2 (en) Arithmetic processing system and arithmetic processing control method, task management system and task management method
US7849463B2 (en) Dynamically variable idle time thread scheduling
CN110806933B (en) Batch task processing method, device, equipment and storage medium
WO2003100613A1 (en) Processor system, task control method on computer system, computer program
US7472214B2 (en) Real-time embedded simple monitor method and computer product
US9088537B2 (en) Apparatus and method for executing agent
US20060031695A1 (en) Information processing apparatus, information processing method, and program
US20010034751A1 (en) Real-time OS simulator
JPH0820963B2 (en) Method for operating computer system and computer system
US8555290B2 (en) Apparatus and method for dynamic control of the number of simultaneously executing tasks based on throughput
US20040098722A1 (en) System, method, and computer program product for operating-system task management
US20050172287A1 (en) Bus management techniques
CN113535341B (en) Method and device for realizing interrupt communication between CPU cores under Linux
JP3335488B2 (en) Performance prediction apparatus and method
JPH1139173A (en) Data processor and recording medium
JPH08202566A (en) Inter-processor communication system
JP7052396B2 (en) Data collection server, data collection system, data collection method and data collection program
JP2002259143A (en) Device and method for automatically controlling number of task, on-like transaction processing system and program
CN111767120A (en) Message and event-based scheduling method and device for multitask processing unit
JP2006039669A (en) Information processing device and method therefor
KR20070015859A (en) System and method for executing job step, and computer product
JPS59136854A (en) Monitor device for task transition
JP2000242522A (en) Device and method for debugging multitask
JPH01318117A (en) Program initializing/terminating processing system

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20041005