JPH02234233A - Event driven type multi-task monitor - Google Patents

Event driven type multi-task monitor

Info

Publication number
JPH02234233A
JPH02234233A JP5535989A JP5535989A JPH02234233A JP H02234233 A JPH02234233 A JP H02234233A JP 5535989 A JP5535989 A JP 5535989A JP 5535989 A JP5535989 A JP 5535989A JP H02234233 A JPH02234233 A JP H02234233A
Authority
JP
Japan
Prior art keywords
monitor
task
sensor
input port
state
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
JP5535989A
Other languages
Japanese (ja)
Inventor
Noriko Yamamoto
典子 山本
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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP5535989A priority Critical patent/JPH02234233A/en
Publication of JPH02234233A publication Critical patent/JPH02234233A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To monitor in real time the state of an input port with a simple constitution by giving a supervisor call to a user to keep the user waiting until the designated bit of the input port is set in a designated state. CONSTITUTION:Each signal line of sensors 1 - 16 is divided into two branches. One of these two branches is inputted to an input port and can check the state of the sensor with an input instruction. The other branch is inputted to an OR 10 and the output of the OR 10 is connected to an interruption 0. Thus the interruption 0 is produced when either one of sensors 1 - 16 is turned on. When the device control is carried out while monitoring the input of the sensor, etc., a supervisor call is included in an event driven type multi-task monitor from an application task produced by a user to make the user waiting until the designated bit of a designated input port is set in a designated state. Thus it is not required to set any special circuit in the hardware nor to contrive any process when an interruption is produced in the software.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はイベントドリブン型マルチタスクモニタ、特に
、センサ等の入力を監視しながら機器制御を行なうとき
に使用するイベントドリブン型マルチタスクモニタに関
する. 〔共通的技術〕 一fiに、マルチタスクモニタのタスク駆動方式には、
タイムスライス(時分割)方式と、イベントドリブン(
事象駆動)方式とがある。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an event-driven multi-task monitor, and more particularly to an event-driven multi-task monitor used when controlling equipment while monitoring inputs from sensors and the like. [Common technology] Firstly, the task-driven method of the multi-task monitor has the following features:
Time slice (time division) method and event driven (
There is also an event-driven) method.

タイムスライス方式は、1つのタスクを一定時間実行さ
せると、次のタスクを一定時間実行させることにより、
マルチタスクを実現する.一方、イベントドリブン方式
は、あるタスクの実行中にある事象が発生したことをC
PUへの割り込みにより認知すると、実行中のタスクを
待機させ、その割り込みを待っていたタスクを実行させ
、そのタスクの処理が終了すると待機させたタスクを再
び実行させることにより、マルチタスクを実現する. 〔従来の技術〕 従来のイベントドリブン型マルチタスクモニタ(以下モ
ニタという)は、CPUへの割り込みが入ることをきっ
かけとして、ユーザが作成するアプリケーションタスク
虐状況をチェックし、その割り込みを待っているタスク
にCPUを割り当てることにより、プログラムがマルチ
タスクを実行するようになっていた。
The time slice method allows one task to be executed for a certain period of time, and then the next task to be executed for a certain period of time.
Achieve multitasking. On the other hand, in the event-driven method, the C
When a task is recognized by an interrupt to the PU, the task that is currently being executed is made to wait, the task that was waiting for the interrupt is executed, and when the processing of that task is completed, the task that was made to wait is executed again, thereby realizing multitasking. .. [Prior Art] Conventional event-driven multitasking monitors (hereinafter referred to as monitors) use an interrupt to the CPU as a trigger to check the status of application tasks created by the user and check the status of application tasks that are waiting for the interrupt. By assigning the CPU to the computer, the program was able to perform multitasking.

従来のイベントドリブン型マルチタスクモニタについて
図面を参照して詳細に説明する。
A conventional event-driven multitask monitor will be described in detail with reference to the drawings.

第4図は従来のイベントドリブン型マルチタスクモニ,
夕の一例を示すフローチャートである。
Figure 4 shows a conventional event-driven multitasking monitor.
It is a flowchart which shows an example of evening.

第4図に示すイベントドリブン型マルチタスクモニタは
、処理1から処理16をタスク1からタスク8に割り当
てて、従来のモニタで実行しようとする一例を示し、処
理1の終了後、次の処理に移るためにはセンサ1がオン
するまで待たなければならないとする。
The event-driven multi-task monitor shown in Figure 4 shows an example in which processes 1 to 16 are assigned to tasks 1 to 8 and executed on a conventional monitor. Suppose that in order to move, it is necessary to wait until sensor 1 is turned on.

このとき、タスク1が入力ポートの状態を常時読み込ん
で、センサ1の状態を確認することにより、センサ1が
オンするまで待一)ソフトウエアを選択すると、タスク
1がCPUを独占することになり、タスクの並列処理が
実現されない。
At this time, task 1 constantly reads the status of the input port and checks the status of sensor 1, waiting until sensor 1 is turned on.If you select the software, task 1 will monopolize the CPU. , parallel processing of tasks is not achieved.

そこで、センサ1がオンずると割り込みOが発生するも
のとして、タスク1はモニタに「割り込み監視依頼」を
送ったのち待機状態に入り、モニタが次のタスクを起動
できるようにする。
Therefore, assuming that an interrupt O occurs when sensor 1 is turned on, task 1 sends an "interrupt monitoring request" to the monitor and then enters a standby state so that the monitor can start the next task.

同様なソフトウエアで、処理2の後はセンサ2.処理3
の後はセンサ3・・・処理16の後はセンサ16がオン
するまで待つものとする。
With similar software, after process 2, sensor 2. Processing 3
After sensor 3... After processing 16, wait until sensor 16 is turned on.

第5図は第4図に示されるタスク1からタスク8を従来
のモニタで実行するための回路図である。
FIG. 5 is a circuit diagram for executing tasks 1 to 8 shown in FIG. 4 on a conventional monitor.

センサ1からセンサ16の信号線は2分岐して一方は入
力ポートに入力され、入力命令によりその状態を見るこ
とができる。他方の信号線は論理和素子の入力に接続さ
れる。
The signal line from the sensor 1 to the sensor 16 is branched into two, one of which is input to the input port, and its status can be checked by input commands. The other signal line is connected to the input of the OR element.

センサ1とセンサ2はOR1に入力され、OR1の出力
を割り込み0に入力することにより、どちらのセンサが
オンしても割り込みOが発生ずる。
Sensor 1 and sensor 2 are input to OR1, and by inputting the output of OR1 to interrupt 0, interrupt O is generated regardless of which sensor is turned on.

同様に、センサ3とセンサ4,・・・センサ15とセン
サ16は、それぞれOR2,  ・・・OR8に入力さ
れる。
Similarly, sensor 3, sensor 4,...sensor 15, and sensor 16 are input to OR2,...OR8, respectively.

OR2の出力受,・・・OR8の出力は、それぞれ割り
込み1,・・・割り込み7に入力される. 第6図は第5図に示す回路を接続しなCPU上で第4図
に示すタスク1からタスク8を従来のモニタで実行した
ときの、見かけ上の動作を示すフローチャートである。
The outputs of OR2, . . ., the output of OR8 are input to interrupt 1, . . ., interrupt 7, respectively. FIG. 6 is a flow chart showing apparent operations when tasks 1 to 8 shown in FIG. 4 are executed on a conventional monitor on a CPU without connecting the circuit shown in FIG. 5.

実行開始時は、タスク1を起動するように設定されてい
るものとする。
It is assumed that task 1 is set to start at the start of execution.

タスク1が処理1を実行中は、CPUはタスク1に独占
されるため、モニタは処理1終了待ち状悲となる。
While task 1 is executing process 1, the CPU is monopolized by task 1, so the monitor waits for process 1 to end.

タスク1は処理1が終了すると[割り込みO監視依頼」
を発生し、モニタをCPUに返す。
When task 1 finishes processing 1, [Interrupt O monitoring request]
is generated and the monitor is returned to the CPU.

モニタは依頼を受けてタスク1を待機状態にし、タスク
2を起動させる. 同様の処理を繰り返し、タスクiが処理j中にセンサ2
がオンして割り込みが発生すると、モニタは処理jが終
了してタスクiを待機させた後、タスク1を続行させる
Upon receiving the request, the monitor places task 1 in a standby state and activates task 2. Similar processing is repeated, and task i uses sensor 2 during processing j.
When turned on and an interrupt occurs, the monitor causes task 1 to continue after processing j is completed and task i is placed on standby.

タスク1は入力ポートの状態を見て、センサ1がオンし
ていないので、再び「割り込みO監視依頼」を発生し、
モニタをCPUに返す。
Task 1 checks the status of the input port, and since sensor 1 is not on, it issues an "interrupt O monitoring request" again.
Return the monitor to the CPU.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述した従来のイベントドリブン型マルチタスクモニタ
は、CPUへの割り込み発生をタスク切り替えのきっか
けとしているので、入力点数の多い機器制御等では、複
数の入力を1つの割り込みに接続するため、ハードウエ
アで特別な回路を組み、さらにソフトウエアで割り込み
発生時の処理を工夫する必要があるという欠点があった
The conventional event-driven multitasking monitor described above uses the occurrence of an interrupt to the CPU as a trigger for switching tasks. Therefore, when controlling devices with a large number of input points, it is necessary to use hardware to connect multiple inputs to a single interrupt. The drawback was that it required a special circuit to be built and software to handle interrupts when they occurred.

また、1つの割り込みを同時に複数のタスクで受け取れ
ないことからタスク数だけ割り込みが必要であるという
欠点があった。
Furthermore, since one interrupt cannot be received by multiple tasks at the same time, there is a drawback that as many interrupts as the number of tasks are required.

〔課題を解決するための手段〕[Means to solve the problem]

本発明のイベントドリブン型マルチタスクモニタは、イ
ンターバルタイマと、ユーザの作成するアプリケーショ
ンタスクからイベントドリブン型マルチタスクモニタに
指定入力ポートの指定ビットが指定した状態になるまで
待つように依頼するスーパーバイザコールを含んで構成
される。
The event-driven multitasking monitor of the present invention includes an interval timer and a supervisor call that requests the event-driven multitasking monitor from an application task created by the user to wait until a specified bit of a specified input port reaches a specified state. It consists of:

〔実施例〕〔Example〕

次に、本発明の実施例について図面を参照して説明する
Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明の一実施例を示すフローチャートである
FIG. 1 is a flowchart showing one embodiment of the present invention.

第1図に示すイベントドリブン型マルチタスクモニタは
、処理1から処理16をタスク1からタスク8に割り当
てて実行せんとする場合を示し、タスク1は処理1終了
後、次の処理に移る前に、センサ1の入力ポートと入力
ポートでのビット位置とON状態になるまで待つスーパ
ーバイザコールを用いてモニタに依頼することにより、
センサ1がオンするまで待つ。
The event-driven multi-task monitor shown in FIG. 1 shows a case where processes 1 to 16 are assigned to tasks 1 to 8 for execution, and task 1 is executed after process 1 is completed but before moving on to the next process. , by requesting the monitor using the input port of sensor 1 and the bit position at the input port and a supervisor call to wait until the input port becomes ON.
Wait until sensor 1 turns on.

同様にして、処理2.処理3,・・・処理16の後に、
センサ2,センサ3,・・・センサ16がオンするまで
待つ。
Similarly, process 2. After processing 3, ... processing 16,
Wait until sensor 2, sensor 3, . . . sensor 16 is turned on.

第2図は第1図に示すタスク1からタスク8を本発明の
モニタで実行しようとする回路図である。
FIG. 2 is a circuit diagram in which tasks 1 to 8 shown in FIG. 1 are to be executed by the monitor of the present invention.

センサ]〜16の信号線は2分岐して、一方は入力ポー
トに入力され、入力命令によってセンサの状態を見るこ
とができる。
The signal lines from [sensor] to 16 are branched into two, one of which is input to the input port, and the state of the sensor can be seen by input commands.

他方はORIOに入力される。ORIOの出力は、割り
込み0に接続され、センサ1からセンサ16のうちとの
センサがオンしても割り込み0が発生する。
The other is input to ORIO. The output of ORIO is connected to interrupt 0, and even if any of the sensors 1 to 16 is turned on, interrupt 0 is generated.

第3図は第2図に示す回路を接続したCPU上で、第1
図に示すタスク1からタスク8を実行した時のモニタの
見かけ上の動作を示すフローチャートである。
Figure 3 shows the first CPU connected to the circuit shown in Figure 2.
2 is a flowchart showing the apparent operation of the monitor when tasks 1 to 8 shown in the figure are executed.

モニタはまずタスク1を起動する。The monitor starts task 1 first.

タスク1が処理1を実行中は、CPUがモニタが返され
るのを待機している。
While task 1 is executing process 1, the CPU is waiting for the monitor to return.

タスク1は処理1が終了すると、モニタに「センサ1オ
ン待ち依頼」を発生し、CPUをモニタに返す. モニタはタスク1を待機状態にし、タスク2を起動する
When task 1 completes processing 1, it issues a "sensor 1 on wait request" to the monitor and returns the CPU to the monitor. The monitor puts task 1 into a standby state and activates task 2.

同様の処理を繰り返し、タスクiが処理を実行中にセン
サ2がオンし、割り込みOが発生すると処理j終了後タ
スクiがモニタにCPUを返し、モニタがタスクiを待
機させた後、モニタは人力ポートの状態を見て、モニタ
が依頼されているポートの指定ビットが指定状態になっ
ているかを判断し、どのビットも指定状態になっていな
ければ次のタスクを起動する。
When the same process is repeated and sensor 2 is turned on while task i is executing the process and interrupt O occurs, task i returns the CPU to the monitor after process j is completed, the monitor makes task i wait, and then the monitor It looks at the state of the human port and determines whether the designated bits of the port for which monitoring is requested are in the designated state, and if none of the bits are in the designated state, it starts the next task.

次に、センサ1がオンして割り込み0が発生すると、モ
ニタはCPUの使用権が譲られた時に入力ポートの状悪
を見て、タスク1の依頼条件と一致するため、タスク1
を起動する。
Next, when sensor 1 is turned on and interrupt 0 occurs, the monitor looks at the bad condition of the input port when the right to use the CPU is handed over, and since it matches the request condition of task 1, task 1
Start.

〔発明の効果〕〔Effect of the invention〕

本発明のイベントドリブン型マルチタスクモニタは、ユ
ーザに指定入力ポートの指定ビットが指定した状態にな
るまで待つスーパーバイザコールを提供するため、ユー
ザが入力に関する特別なハードウエア回路を設けたり、
それに対応する処理ソフトウエアを作成することなく、
入力ポートの状態をリアルタイムに監視できるという効
果がある。
The event-driven multitasking monitor of the present invention provides the user with a supervisor call that waits until a specified bit of a specified input port becomes a specified state.
without creating corresponding processing software.
This has the effect of allowing the status of the input port to be monitored in real time.

ト、第2図は第1図に示すタスク1からタスク8を本発
明のモニタで実行しようとする回路図、第3図は第2図
に示す回路を接続したCPU上で、第1図に示すタスク
1からタスク8を実行した時のモニタの見かけ上の動作
を示すフローチャート、第4図は従来の一例を示すフロ
ーチャート、第5図は第4図に示されるタスク1からタ
スク8を従来のモニタで実行するための回路図、第6図
は第5図に示す回路を接続したCPU上で第4図に示す
タスク1からタスク8を従来のモニタで実行したときの
、見かけ上の動作を示すフローチャートである。
Fig. 2 is a circuit diagram for executing tasks 1 to 8 shown in Fig. 1 on the monitor of the present invention, and Fig. 3 is a circuit diagram for executing tasks 1 to 8 shown in Fig. 1 on a CPU connected to the circuit shown in Fig. 2. FIG. 4 is a flowchart showing an example of a conventional example, and FIG. 5 shows how tasks 1 to 8 shown in FIG. The circuit diagram for execution on a monitor, Figure 6, shows the apparent operation when tasks 1 to 8 shown in Figure 4 are executed on a conventional monitor on a CPU connected to the circuit shown in Figure 5. FIG.

1〜16・・・・・・センサ、 OR1〜OR8,ORIO・・・・・・論理和回路。1 to 16...Sensor, OR1 to OR8, ORIO......Order circuit.

代理人 弁理士  内 原  買Agent Patent Attorney Uchihara Buy

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の一実施例を示すフローチャー竿 夕 圀 y乙圀 FIG. 1 is a flowchart showing an embodiment of the present invention. evening country y Otokuni

Claims (1)

【特許請求の範囲】[Claims] インターバルタイマと、ユーザの作成するアプリケーシ
ョンタスクからイベントドリブン型マルチタスクモニタ
に指定入力ポートの指定ビットが指定した状態になるま
で待つように依頼するスーパーバイザコールを含むこと
を特徴とするイベントドリブン型マルチタスクモニタ。
Event-driven multitasking characterized by including an interval timer and a supervisor call that requests an event-driven multitasking monitor from an application task created by a user to wait until a specified bit of a specified input port reaches a specified state. monitor.
JP5535989A 1989-03-07 1989-03-07 Event driven type multi-task monitor Pending JPH02234233A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5535989A JPH02234233A (en) 1989-03-07 1989-03-07 Event driven type multi-task monitor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5535989A JPH02234233A (en) 1989-03-07 1989-03-07 Event driven type multi-task monitor

Publications (1)

Publication Number Publication Date
JPH02234233A true JPH02234233A (en) 1990-09-17

Family

ID=12996298

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5535989A Pending JPH02234233A (en) 1989-03-07 1989-03-07 Event driven type multi-task monitor

Country Status (1)

Country Link
JP (1) JPH02234233A (en)

Similar Documents

Publication Publication Date Title
JPH02156334A (en) Information processor
JPH02234233A (en) Event driven type multi-task monitor
JPH04362745A (en) Instruction tracing device
JPS6316317A (en) Resetting device for computer system
KR950015191B1 (en) Multi-processor debugging apparatus and method
JP2673048B2 (en) Timeout monitoring processor
KR100194800B1 (en) How to Cross-Debug Multiple Chill Programs Using Connection Manager
JPH02202635A (en) Task control method
JPH01154236A (en) Executing device for time-division task
JPH01318115A (en) Distributed window controller
JPH02249051A (en) Remote data monitor system
JPH0378034A (en) Program parallel execution device
JPH0484337A (en) Job processing system switching mechanism for mutual standby system
JPH0651998A (en) Communication monitoring device in accordance with multitask os
JPH01279347A (en) Re-execution system for input/output action of information processor
JPH064306A (en) Method for dividing interruption processing
JPH03282903A (en) Task control method in communication system for programmable controller
JPS61288232A (en) Output instruction control system
JPH02135531A (en) Multi-task switching system
JPH01300364A (en) Multi-processor system
JPH0426499B2 (en)
JPH04247529A (en) Program execution management system
JPH0287893A (en) Remote supervisory controller
JPH0690671B2 (en) I / O device access method
JPH01246636A (en) Central processing unit management system for virtual computer system