Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0668727B2 - Information processing equipment - Google Patents
[go: Go Back, main page]

JPH0668727B2 - Information processing equipment - Google Patents

Information processing equipment

Info

Publication number
JPH0668727B2
JPH0668727B2 JP22975086A JP22975086A JPH0668727B2 JP H0668727 B2 JPH0668727 B2 JP H0668727B2 JP 22975086 A JP22975086 A JP 22975086A JP 22975086 A JP22975086 A JP 22975086A JP H0668727 B2 JPH0668727 B2 JP H0668727B2
Authority
JP
Japan
Prior art keywords
task
execution
internal
priority
instruction
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.)
Expired - Fee Related
Application number
JP22975086A
Other languages
Japanese (ja)
Other versions
JPS6385829A (en
Inventor
祐二 川森
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.)
Anritsu Corp
Original Assignee
Anritsu 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 Anritsu Corp filed Critical Anritsu Corp
Priority to JP22975086A priority Critical patent/JPH0668727B2/en
Publication of JPS6385829A publication Critical patent/JPS6385829A/en
Publication of JPH0668727B2 publication Critical patent/JPH0668727B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、高級言語によって記述したプログラムの複数
のタスクを指定した優先度に従って実行条件の変化に実
時間で応答して並行して実行する機能を有する情報処理
装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Industrial application] The present invention executes a plurality of tasks of a program written in a high-level language in parallel in response to changes in execution conditions in real time according to designated priorities. The present invention relates to an information processing device having a function.

[従来の技術] 従来、高級言語によって記述した複数の処理部分(タス
ク)を指定した優先度に従って実行条件の変化に実時間
に応答して並行して実行する機能を有する情報処理装置
としては、下記に示す2つの方式が用いられている。
[Prior Art] Conventionally, as an information processing apparatus having a function of executing a plurality of processing parts (tasks) written in a high-level language in parallel in response to changes in execution conditions in real time in accordance with a designated priority, The following two methods are used.

第1の方式は、高級言語の命令ステップとは無関係にタ
スク間の実行権の切換を行うものである。各タスクは起
動されると実行可能状態となり、さらに実行可能状態の
タスクのうちで最も高い優先度を有するタスクが実行状
態になって高級言語で記述されたプログラムが実行され
る。
The first method switches the execution right between tasks regardless of the instruction step of a high-level language. When each task is activated, it becomes READY state, and among the tasks in READY state, the task having the highest priority goes to RUN state, and the program written in the high-level language is executed.

高級言語の命令が特定の事象の発生を待つという内容で
あれば、そのタスクは待ち状態となり、この場合、他に
実行可能状態のタスクが存在すればこのようなタスクの
うちでも最も高い優先度を有するタスクが代わって実行
状態となる。
If a high-level language instruction waits for the occurrence of a specific event, the task is placed in the waiting state. In this case, if there is another task in the ready state, the task has the highest priority. The task having is put in the execution state instead.

待ち状態となったタスクは、待っている事象が発生する
と実行可能状態となり再び各タスクの優先度に応じて実
行権の切換が行われる。
When a waiting event occurs, the task in the waiting state is set to the executable state, and the execution right is switched again according to the priority of each task.

この方式では、上記の規則に従って各タスクに割り当て
られている優先度と事象の発生に実時間で応答してタス
クの実行権の切換が行われる。
In this method, the task execution right is switched in response to the priority assigned to each task and the occurrence of an event in real time according to the above rules.

高級言語の命令はCPUの機械語の複数の命令によって
構成されるものであるため、一般にはあるタスクの実行
中に他のより高い優先度を有するタスクが実行状態にな
った場合には、実行中の高級言語の命令の途中であって
も実行権の切換が行われる。
Since a high-level language instruction is composed of a plurality of machine language instructions of the CPU, it is generally executed when a task having a higher priority enters the execution state during execution of a task. The execution right is switched even during the middle high-level language instruction.

第2の方式は、高級言語の命令ステップを最小の実行単
位としてタスク間の実行権の切換を行うものである。
The second method is to switch the execution right between tasks with the instruction step of the high-level language being the minimum execution unit.

この方式では起動されている各タスクの中から実行状態
とするタスクを決定する条件は第一の方式と同じである
が、あるタスクが実行状態となり得る条件が満たされて
も、その時点で他のタスクにおいて高級言語の命令を実
行中であった場合にはその命令の実行が完了してから実
行権の切換が行われる。
In this method, the conditions for determining the task to be put into the running state from among the started tasks are the same as those in the first method. If a high-level language instruction is being executed in the task, the execution right is switched after the execution of the instruction is completed.

[発明が解決しようとする問題点] このような従来の情報処理装置においては第1の方式、
第2の方式とも次に述べるような欠点があった。
[Problems to be Solved by the Invention] In such a conventional information processing apparatus, the first method,
The second method has the following drawbacks.

第1の方式においては各タスクの処理内容が高級言語の
命令で記述されているにもかかわらず、各タスク間の実
行権の切換は高級言語の命令を構成する機械語を単位と
して行われるため、プログラム全体としての実行順序が
情報処理装置内部の条件に依存することになり、実行経
過を正確に把握することは難しい。
In the first method, although the processing content of each task is described by the high-level language instruction, the switching of the execution right between the tasks is performed in the unit of the machine language that constitutes the high-level language instruction. The execution order of the entire program depends on the conditions inside the information processing apparatus, and it is difficult to accurately grasp the execution progress.

第2の方式においては、タスク間の実行権の切換が高級
言語の命令の実行終了するまで待たされるため、実際に
実行権の切換が行われるまでの遅れ時間が大きくなる。
また、高級言語の各命令の実行時間はすべて異なるので
このような遅れ時間は一定ではない。
In the second method, the switching of the execution right between the tasks is delayed until the execution of the high-level language instruction is completed, so that the delay time until the execution right is actually switched becomes long.
In addition, since the execution time of each instruction in the high-level language is different, such delay time is not constant.

第1の方式は実行条件の変化に対するタスクの応答性が
優れており、第2の方式は高級言語レベルでの動作確認
が容易であり、また高級言語の一命令が不可分な処理と
して実行されるためタスク間に共通な変数を置いて共通
にアクセスすることもできる。その反面、両者とも上に
述べた欠点がありどちらの方式を用いるかは用途に応じ
て選択することが望ましいが、従来1つの情報処理装置
においてこれらを選択したり複合して利用するための方
法がなく、利用者は用途別に効率よく使いわけることが
できなかった。
The first method has excellent task responsiveness to changes in execution conditions, the second method allows easy operation confirmation at a high-level language level, and one command of a high-level language is executed as an indivisible process. Therefore, common variables can be placed between tasks and commonly accessed. On the other hand, both of them have the above-mentioned drawbacks, and it is desirable to select which method to use according to the intended use. However, conventionally, a method for selecting or combining these in one information processing apparatus is used. Therefore, the users could not efficiently use each type of application.

本発明は、上記の問題を解決するために、一つの情報処
理装置において機械語の単位で実行権の切換が行われる
タスクと高級言語の命令を単位として実行権の切換が行
なわれるタスクとを複合して記述し実行できるようにし
て、利用者が上記の2つの方式を用途に応じて使いわけ
ることを可能にするものである。
In order to solve the above problems, the present invention provides a task in which execution rights are switched in machine language units and a task in which execution rights are switched in high-level language instructions in one information processing device. By enabling the description and execution in a composite manner, it is possible for the user to properly use the above two methods depending on the purpose.

[問題点を解決するための手段] 上記問題点を解決するため本発明による情報処理装置
は、単一のCPU(10a)と; 該CPUの機械語で構成される複数個のタスクを起動し
て実行可能状態とし、該タスクの状態および優先度に対
応して実行可能状態のタスクの中で最も高い優先度が割
り当てられているタスクを選択し機械語の実行ステップ
を単位としてタスクに実行権を与えるタスク管理手段
(11a)と、;ハードウェア信号を検出して該ハード
ウェア信号の発生を待っている待ち状態のタスクの状態
を実行可能状態に変更する事象管理手段(11b)とを
有するオペレーティングシステム(11)と; 高級言語の命令で構成されるプログラム(13)を格納
するメモリ(10b)と; 前記タスク管理手段により起動されて、前記メモリに格
納されるプログラムから高級言語の命令を順次取り出し
て命令の処理を実行する高級言語処理部(12)と; を有する情報処理装置において、 前記メモリ(10b)に格納されるプログラム(13)
は、複数個(1,2,…,N)の上位タスクから構成さ
れ、さらに各上位タスクは複数個(1,2…,M)のそ
れぞれ異なる優先度を持つ 内部タスク(1−1,1−2,…,1−M), (2−1,2−2,…,2−M), … (N−1,N−2,…,N−M)で構成さ
れ、 前記高級言語処理部(12)は、所定の優先度が割り当
てられている該内部タスクを実行開始するごとに内部タ
スクに割り当てられた優先度でタスク管理手段(11
a)により起動されてプログラム(13)から内部タス
クを構成する高級言語の命令を順次取り出して命令の処
理を実行するとともに、前記内部タスクを構成する高級
言語の一命令を実行しようとする直前に前記上位タスク
に含まれるすべての内部タスクに割り当てられた優先度
よりも高い優先度をその内部タスクの優先度として高級
言語処理部(12)自体に設定し、前記一命令の実行直
後には、再び前記所定の優先度を高級言語処理部(1
2)自体に設定する構成とし、 各上位タスク内においては、高級言語の一命令実行中は
内部タスク間で実行権が切り換えられることを防止し、
異なる上位タスクに属する内部タスク間では機械語の実
行ステップを単位として実行権が切り換えられることを
特徴としている。
[Means for Solving Problems] In order to solve the above problems, an information processing apparatus according to the present invention activates a single CPU (10a) and a plurality of tasks configured by the machine language of the CPU. To the executable state, select the task with the highest priority among the tasks in the executable state corresponding to the task status and priority, and select the execution right for the task in units of machine language execution steps. And event management means (11b) for detecting a hardware signal and changing the state of a task in a waiting state waiting for the generation of the hardware signal to an executable state. An operating system (11); a memory (10b) for storing a program (13) composed of high-level language instructions; A high-level language processing unit (12) for sequentially fetching high-level language instructions from a program stored in a memory and executing the processing of the instructions; and a program (13) stored in the memory (10b) in the information processing device.
Is composed of a plurality of (1, 2, ..., N) upper tasks, and each upper task is a plurality (1, 1, ..., M) of internal tasks (1-1, 1) having different priorities. -2, ..., 1-M), (2-1, 2-2, ..., 2-M), ... (N-1, N-2, ..., NM) The unit (12) uses the priority assigned to the internal task every time the internal task to which the predetermined priority is assigned is started to execute.
(a) is activated by the program (13) to sequentially fetch the instructions of the high-level language constituting the internal task to execute the instruction processing, and immediately before attempting to execute one instruction of the high-level language constituting the internal task. A higher priority than the priority assigned to all internal tasks included in the upper task is set in the high-level language processing unit (12) itself as the priority of the internal task, and immediately after the execution of the one instruction, Again, the high priority language processing unit (1
2) It is configured to be set to itself to prevent the execution right from being switched between internal tasks during execution of one instruction in a high-level language in each higher-level task,
The feature is that the execution right can be switched between internal tasks belonging to different higher-level tasks in units of machine language execution steps.

発明の詳細な説明 [実施例] 以下、本発明による情報処理装置の一実施例を図面に基
づき説明する。
DETAILED DESCRIPTION OF THE INVENTION [Embodiment] An embodiment of an information processing apparatus according to the present invention will be described below with reference to the drawings.

第2図(a)は、本発明による情報処理装置によって実
行されるタスクの構成である。
FIG. 2A shows the configuration of tasks executed by the information processing apparatus according to the present invention.

本発明による情報処理装置は、第2図(a)に示す複数
個(N)の上位タスクを並行して実行する。これらの上
位タスクはさらに複数個(M)の内部タスクの集まりと
して構成されている。各内部タスクは高級言語の命令に
よって記述された独立した処理手順を持つプログラムで
ある。
The information processing apparatus according to the present invention executes a plurality (N) of upper tasks shown in FIG. 2 (a) in parallel. These upper tasks are further configured as a group of a plurality (M) of internal tasks. Each internal task is a program having an independent processing procedure described by a high-level language instruction.

そして、各上位タスクには重複のない優先度を割り当
て、さらに上位タスク内の各内部タスクに対しても属し
ている上位タスク内で重複のない優先度を割り当てる。
Then, a non-overlapping priority is assigned to each upper task, and a non-overlapping priority is assigned to each internal task in the upper task within the upper task.

内部タスクの優先度は上位タスク優先度(N)と内部タ
スク優先度(M)を合成した値(N−M)により示さ
れ、オペレーティングシステム(11)はこの合成値
(N−M)のより小さなタスクを優先度が高いものとし
て管理する。
The priority of the internal task is indicated by a value (NM) that is a combination of the higher task priority (N) and the internal task priority (M), and the operating system (11) uses this combined value (NM). Manage small tasks as high priority.

各上位タスク(N)は、内部タスク(M)に割り当てら
れる内部タスク優先度とは別に「実行レベル」と呼ばれ
る優先度を持つ。「実行レベル」は内部タスク優先度に
相当する部分の値がゼロであるので、上位タスク(N)
内のどの内部タスク(N−M)よりも高い優先度とな
る。「実行レベル」は特定の内部タスク(M)に割り当
てるものではなく、高級言語の命令実行時に一時的に実
行中の内部タスク(M)の優先度を高くするために用い
る。
Each upper task (N) has a priority called an “execution level” in addition to the internal task priority assigned to the internal task (M). In the "execution level", the value of the part corresponding to the internal task priority is zero, so the higher task (N)
Has a higher priority than any of the internal tasks (NM). The "execution level" is not assigned to a specific internal task (M), but is used to increase the priority of the internal task (M) that is being executed temporarily when a high-level language instruction is executed.

そして第2図(a)に示す優先度の割り当てによって、
例えば上位タスク(2)に属する内部タスク(2−2)
は、より高い優先度を持つ上位タスク(1)内の内部タ
スク(1−M)よりは優先度が低く、またより低い優先
度を持つ上位タスク(N)内の内部タスク(N−1)よ
りは優先度が高くなる。さらに、ある上位タスク内の内
部タスク(N−M)には高級言語の一命令の実行を開始
するごとに「実行レベル」の優先度を一時的に設定して
その内部タスクの優先度をゼロに設定して、命令の実行
が終了した時にもとの優先度に再び設定する。
Then, by assigning the priorities shown in FIG. 2 (a),
For example, the internal task (2-2) belonging to the higher-level task (2)
Is lower in priority than the internal task (1-M) in the higher-level task (1) having a higher priority, and is an internal task (N-1) in the higher-level task (N) having a lower priority. Has higher priority than. Furthermore, the priority of the "execution level" is temporarily set to the internal task (NM) in a certain higher-level task each time execution of one instruction of a high-level language is started, and the priority of the internal task is set to zero. To the original priority when the execution of the instruction is completed.

上に述べた優先度の割り当てを行うことにより、上位タ
スク内の内部タスク相互間では高級言語の一命令を単位
としてタスクの実行権を切り換え、一方、上位タスク相
互間では高級言語の命令ステップとは無関係にCPUの
機械語を単位としてタスクの実行権の切り換えを行うこ
とができる。
By assigning the above-mentioned priority, the execution right of the task is switched between the internal tasks in the higher-level task in units of one instruction in the high-level language. The execution right of the task can be switched in the unit of the machine language of the CPU regardless of.

第2図(b)は本発明に係る情報処理装置の論理的な構
成を示す図である。
FIG. 2B is a diagram showing a logical configuration of the information processing apparatus according to the present invention.

この図においてCPU10aの使用権、メモリ10b、
ハードウエア10cはオペレーティングシステム11に
より管理される資源10として位置付けられている。高
級言語処理部12(以下、高級言語処理システム12と
いう。尚、高級言語処理システム12はプログラムによ
り構成されている。)はオペレーティングシステム11
の管理によってCPU10aの使用権、メモリ10bを
与えられ、またオペレーティングシステム11を介して
ハードウエア10cをアクセスする。オペレーティング
システム11はタスク管理機能11a、事象管理機能1
1b、メモリ管理機能11c、入出力管理機能11dを
有する。
In this figure, the usage right of the CPU 10a, the memory 10b,
The hardware 10c is positioned as the resource 10 managed by the operating system 11. The high-level language processing unit 12 (hereinafter referred to as the high-level language processing system 12. The high-level language processing system 12 is composed of a program.) Is an operating system 11.
Is given the right of use of the CPU 10a and the memory 10b, and the hardware 10c is accessed through the operating system 11. The operating system 11 has a task management function 11a and an event management function 1
1b, a memory management function 11c, and an input / output management function 11d.

タスク管理機能11aはメモリ10bに格納されている
高級言語で記述されたプログラム13を指定の番地から
起動し(タスクの起動)、さらに他に起動されているタ
スクがある場合には、各タスクの優先度に従って実行権
の切換を行う。この場合、実行権の切換はCPU10a
の機械語を単位として行われる。
The task management function 11a activates the program 13 written in a high-level language stored in the memory 10b from a specified address (task activation), and if there is another task activated, The execution right is switched according to the priority. In this case, the execution right is switched by the CPU 10a.
The machine language is used as a unit.

事象管理機能11bはハードウエア10cから発生する
条件の変化を検出しその変化に対応して起動されている
タスクの状態を変更する。タスクがある条件の変化を待
つことをオペレーティングシステム11に要求するとタ
スクの状態は「実行状態」から「待ち状態」に変更され
る。また「待ち状態」にあるタスクは待っている条件が
満たされた時「実行可能状態」に変更される。
The event management function 11b detects a change in the condition generated from the hardware 10c and changes the state of the task activated in response to the change. When a task requests the operating system 11 to wait for a change in a certain condition, the task state is changed from the "execution state" to the "waiting state". A task in "waiting state" is changed to "executable state" when the waiting condition is satisfied.

前記のタスク管理機能11aはこのようなタスクの状態
の変化に対応して実行権の切換を行う。
The task management function 11a switches the execution right in response to such a change in the task status.

高級言語処理システム12は命令実行管理部12aと命
令実行部12bとから成りオペレーティングシステム1
1の管理の下にタスクの一つとして実行される。高級言
語処理システム12は高級言語で記述されたプログラム
(アプリケーションプログラム)13を一命令ずつ読み
出して実行すべき内容を解釈して実行するが実際に実行
されるのは高級言語処理システム12に含まれている命
令実行管理部12aならびに命令実行部12bである。
高級言語処理システム12は高級言語で記述されたプロ
グラム13の内容に従ってオペレーティングシステム1
1に対してタスクを登録し起動を要求する。
The high-level language processing system 12 includes an instruction execution management unit 12a and an instruction execution unit 12b, and an operating system 1
It is executed as one of the tasks under the control of 1. The high-level language processing system 12 reads a program (application program) 13 written in a high-level language one instruction at a time and interprets and executes the content to be executed. However, the actual execution is included in the high-level language processing system 12. The instruction execution management unit 12a and the instruction execution unit 12b.
The high-level language processing system 12 uses the operating system 1 according to the contents of the program 13 written in the high-level language.
The task is registered to 1 and the activation is requested.

第1図(b)は、ハードウエアの構成を示す図である。
図においてCPU10aは16ビットのマイクロコンピ
ュータ、OSC10abは水晶振動子である。高級言語
処理装置構成するソフトウエアの一部はメモリ10bの
ROM10baに記録されており電源投入時に起動され
て補助記憶装置10cdから入出力制御回路10caを
介してRAM10bbへ必要なソフトウエアをロードし
て前記オペレーティングシステム11の操作を可能にす
る。オペレーティングシステム11に対する指示はキー
ボード10cbから入力し、システムからのメッセージ
はCRT10ccに表示される。補助記憶装置10cd
はプログラムやデータを記録するために用いられる。
FIG. 1B is a diagram showing a hardware configuration.
In the figure, the CPU 10a is a 16-bit microcomputer, and the OSC 10ab is a crystal oscillator. A part of the software constituting the high-level language processing device is recorded in the ROM 10ba of the memory 10b and is activated when the power is turned on to load the required software from the auxiliary storage device 10cd to the RAM 10bb via the input / output control circuit 10ca. It enables operation of the operating system 11. Instructions for the operating system 11 are input from the keyboard 10cb, and messages from the system are displayed on the CRT 10cc. Auxiliary storage device 10 cd
Is used to record programs and data.

そして、第3図は、本発明に係る高級言語処理システム
12の命令実行管理部12aの実行手順を示すフローチ
ャートである。第2図(a)に示すタスク構成を持つ高
級言語で記述されたプログラム13の各内部タスクは、
起動されるとプログラムを実行するために必要なメモリ
を個別に与えられて第1図(a)に示す高級言語処理シ
ステム12を構成するプログラムの開始番地から実行を
開始する。命令実行管理部12aは個別にメモリを与え
られている各タスクによって(論理的に)同時に実行で
きる、再入可能な形式で作られている。第4図は、第3
図のP8において実行される命令が一定時間の経過を待
ったり外部条件の変化を待つなど内部タスクを待ち状態
にする命令である場合について詳細な実行手順を示した
ものである。
Then, FIG. 3 is a flowchart showing an execution procedure of the instruction execution management unit 12a of the high-level language processing system 12 according to the present invention. Each internal task of the program 13 written in a high level language having the task structure shown in FIG.
When activated, the memory required to execute the program is individually given, and execution is started from the start address of the program forming the high-level language processing system 12 shown in FIG. 1 (a). The instruction execution management unit 12a is made in a re-entrant form that can be (logically) simultaneously executed by each task provided with a memory. FIG. 4 shows the third
It shows a detailed execution procedure in the case where the instruction executed in P8 of the figure is an instruction to put an internal task in a waiting state such as waiting for a certain period of time or waiting for a change in an external condition.

次に第3図ならびに第4図に基いて高級言語処理システ
ム12の命令実行管理部12aの動作を詳細に説明す
る。
Next, the operation of the instruction execution management unit 12a of the high-level language processing system 12 will be described in detail with reference to FIGS.

命令実行管理部12aは高級言語で記述されたアプリケ
ーションプログラム13から命令を一個ずつ読み出して
実行するという動作をくり返し実行する。高級言語処理
システム12に対して高級言語で記述されたプログラム
13の実行開始を指示すると、高級言語処理システム1
2は命令読み出しのためのポインタを高級言語で記述さ
れたプログラム13の先頭に設定し、CPU10aの命
令の実行開始番地を示すポインタを第3図のP1に設定
してオペレーティングシステム11にタスクの起動を要
求する。このようにして起動されたタスクは実行権を与
えられると第3図のP1から実行を開始し、P1→P2
→P3→P4→P5→P6→P7→P8→P9と実行
し、これ以後、通常はP3→P7→P8→P9の順に実
行する。P8で実行する高級言語の命令が高級言語で記
述されたプログラム13によって定義したタスクを起動
するという内容であった場合には、上記の高級言語で記
述されたプログラム13を実行開始するための処理と同
様の処理によってオペレーティングシステム11にタス
クの起動を要求する。したがって、命令実行管理部12
aは起動されている高級言語で記述されたプログラム1
3のタスクの個数と同じ数だけ同時に使用されることに
なる。高級言語の命令の実行をくり返している間は、P
2の処理によって内部タスクの優先度は「実行レベル」
になっているので、同一上位タスク内のどのような優先
度を持つ内部タスクが実行可能状態になったとしてもP
3に達するまでは実行中の内部タスクが実行権を保持す
る。P3で判断に用いるフラグは、新たに実行可能状態
になった内部タスクが実行中の内部タスクに対して実行
権の切換を要求するための情報であり、高級言語の一命
令の実行が終了した時、必要な場合に限って実行権を切
り換える処理を行うために役立つ。P3で割込フラグが
ONであることを検出するとP5によって、実行中であ
った内部タスクの優先度はあらかじめ割り当てられてい
る本来の優先度(内部タスクレベル)に設定される。
The instruction execution management unit 12a repeatedly executes the operation of reading and executing instructions one by one from the application program 13 written in a high-level language. When the high-level language processing system 12 is instructed to start the execution of the program 13 written in the high-level language, the high-level language processing system 1
2 sets a pointer for reading an instruction at the head of the program 13 written in a high-level language, sets a pointer indicating the execution start address of the instruction of the CPU 10a at P1 in FIG. 3, and activates a task in the operating system 11. To request. When the task activated in this way is given the execution right, the task starts to execute from P1 in FIG. 3, and P1 → P2
→ P3 → P4 → P5 → P6 → P7 → P8 → P9, and then normally P3 → P7 → P8 → P9. If the high-level language instruction to be executed in P8 has a content of activating a task defined by the program 13 written in the high-level language, a process for starting execution of the program 13 written in the high-level language The operating system 11 is requested to start a task by the same processing as. Therefore, the instruction execution management unit 12
a is a program 1 written in a high-level language that has been started
The same number as the number of tasks of 3 will be used simultaneously. While repeating execution of high-level language instructions, P
The priority of the internal task is "execution level" by the processing of 2
Therefore, even if an internal task with any priority in the same higher-level task becomes ready for execution, P
Until the number reaches 3, the executing internal task holds the execution right. The flag used for the determination in P3 is information for requesting the internal task that is newly executed to switch the execution right to the internal task that is newly executed, and the execution of one instruction of the high-level language is completed. Sometimes, it is useful for performing the process of switching the execution right only when necessary. When it is detected in P3 that the interrupt flag is ON, P5 sets the priority of the internal task that was being executed to the original priority (internal task level) that is assigned in advance.

ここで他により高い優先度を持ち、かつ実行可能状態に
なっている内部タスクが存在すればその内部タスクに実
行権が移る。その後、実行権を移された内部タスクが待
ち状態になるか実行を停止すると元の内部タスクは再び
実行権を与えられてP6から実行を再開する。
If there is an internal task that has a higher priority and is in an executable state, the execution right is transferred to that internal task. After that, when the internal task to which the execution right is transferred enters a waiting state or stops execution, the original internal task is given the execution right again and restarts execution from P6.

第3図のP8において実行される命令が一定時間の経過
を待ったり外部条件の変化を待つなど内部タスクを待ち
状態にする命令であった場合には第4図に示す手順で命
令が実行される。P11は待ち状態になったあと条件が
満たされた時に実行すべきP13およびP14の処理を
最優先で実行できるようにするための準備である。ここ
で、「割込レベル」は、高級言語処理システム12によ
って起動された内部タスクに設定されるどの優先度より
も高い優先度である。P11で優先度を変更した後、直
ちにP12によって内部タスクの状態は待ち状態に変わ
る。この時、他に実行可能状態になっている内部タスク
が存在すればそれらの中で最も高い優先度を有する内部
タスクに実行権が与えられる。待ち状態となった内部タ
スクは指定した条件が発生すると直ちに実行状態になっ
てP13およびP14を実行する。ここでは高級言語の
命令を実行中の内部タスクに対してP13によって実行
権の切換を要求するだけで、P14を実行すると命令を
実行中の内部タスクに一たん実行権が戻される。そして
命令を実行中の内部タスクが第3図のP3に達して割込
フラグを検出しP5で優先度をあらかじめ割り当てられ
ている(内部タスクレベル)に設定した時点で実行権の
切換が行われ、第4図の手順を実行していた内部タスク
はP15から実行を再開する。
If the instruction executed in P8 of FIG. 3 is an instruction that puts an internal task in a waiting state such as waiting for a certain period of time or a change in external condition, the instruction is executed in the procedure shown in FIG. It P11 is a preparation for enabling the processing of P13 and P14 to be executed with the highest priority when the condition is satisfied after entering the waiting state. Here, the “interrupt level” is a priority higher than any priority set for the internal task activated by the high-level language processing system 12. After changing the priority in P11, the state of the internal task is immediately changed to the waiting state in P12. At this time, if there is another internal task in the executable state, the execution right is given to the internal task having the highest priority among them. The internal task in the waiting state immediately enters the execution state and executes P13 and P14 when the specified condition occurs. Here, the execution right is simply requested to be switched by P13 to the internal task that is executing the high-level language instruction, and when P14 is executed, the execution right is returned to the internal task that is executing the instruction. Then, when the internal task which is executing the instruction reaches P3 in FIG. 3, the interrupt flag is detected, and the priority is set to the preallocated (internal task level) in P5, the execution right is switched. , The internal task that was executing the procedure of FIG. 4 restarts from P15.

次に本発明に係る情報処理装置を自動制御システムに応
用した例について説明する。第5図はそのプログラム
例、第6図は自動制御システムの構成である。第5図の
プログラムで使用した高級言語は、JIS規格により定め
られているBASIC言語に、さらに複数の独立した実行手
順をタスクとして記述する機能を付加したものである。
第6図において情報処理装置14は第2図に示したとお
りのハードウエア構成を持ちこの自動制御システムにお
けるコントローラである。このシステムは、製造ライン
上を運ばれる試料が所定の位置に達した時、アダプタ1
8が持つセンサによって試料の位置を検出し制御回路1
7を経て情報処理装置14に割り込み信号として伝え、
これを契機として情報処理装置14が実行する第7図の
プログラムによって試料の調整をアダプタ18を介して
行うとともに調整結果を測定器16によって測定し、そ
のデータを外部補助記憶15にファイルとして記録す
る。
Next, an example in which the information processing apparatus according to the present invention is applied to an automatic control system will be described. FIG. 5 shows an example of the program, and FIG. 6 shows the configuration of the automatic control system. The high-level language used in the program of FIG. 5 is the BASIC language defined by the JIS standard with the addition of a function to describe multiple independent execution procedures as tasks.
In FIG. 6, the information processing device 14 is a controller in this automatic control system having the hardware configuration as shown in FIG. This system uses the adapter 1 when the sample carried on the manufacturing line reaches a predetermined position.
The control circuit 1 detects the position of the sample by the sensor of 8
7 as an interrupt signal to the information processing device 14,
In response to this, the program of FIG. 7 executed by the information processing apparatus 14 adjusts the sample through the adapter 18, measures the adjustment result by the measuring device 16, and records the data in the external auxiliary storage 15 as a file. .

第5図のプログラムは2つの上位タスクDATAおよびCONT
により構成されており、それぞれ独立に行番号を持つプ
ログラムとなっている。各々のプログラムにおいて先頭
の行の命令PROGRAMは上位タスクの名前を宣言する。上
位タスクDATAはさらに2つの内部タスクで構成されてい
る。行番号30の命令PARACTは内部タスクの名前SAVEDA
TAと優先度を宣言し行番号250の命令END PARACTは内
部タスクの終わりを表す。同様に行番号270から行番
号380までが2番めの内部タスクMEASUREである。上
位タスクCONTは内部タスクMAIN1コだけ持つ。上位タス
クDATAの行番号20の命令PROCESS EVENTは外部事象の
名前MEASENDを宣言するとともにハードウエア条件との
対応を定義する。この宣言は上位タスク内の各内部タス
クに対して共通の宣言であり、行番号20においては事
象名MEASENDを第6図の測定器16から測定完了信号が
発生するという条件に対応づけている。また、上位タス
クCONTの行番号20においては、事象名ADJUSUTを第6
図のアダプタ18から試料検出信号が発生するという条
件に対応づけている。その他、これらの上位タスクに含
まれる命令の中で主要なものについてその機能を簡単に
示す。
The program in Fig. 5 has two high-level tasks DATA and CONT.
It is a program that has line numbers independently of each other. The instruction PROGRAM in the first line of each program declares the name of the upper task. The upper task DATA is further composed of two internal tasks. The instruction PARACT at line number 30 is the internal task name SAVEDA
The TA and the priority are declared, and the instruction END PARACT at line number 250 indicates the end of the internal task. Similarly, the line numbers 270 to 380 are the second internal task MEASURE. The upper task CONT has only one internal task MAIN. The instruction PROCESS EVENT at line number 20 of the upper task DATA declares the name MEASEND of the external event and defines the correspondence with the hardware condition. This declaration is common to each internal task in the higher-level task, and in line number 20, the event name MEASEND is associated with the condition that a measurement completion signal is generated from the measuring device 16 in FIG. In line number 20 of higher-level task CONT, the event name ADJUSUT is
It corresponds to the condition that the sample detection signal is generated from the adapter 18 in the figure. In addition, the main functions of the instructions included in these higher-level tasks will be briefly described.

COM 上位タスク内のCOMMON変数を宣言する。COM Declares the COMMON variable in the upper task.

LOAD TASK 上位タスクを指定した名前のファイルから
メモリにロードする。
LOAD TASK Loads the upper task from the file with the specified name into memory.

START TASK タスクを起動する。START TASK Start the task.

START 内部タスクを起動する。START Starts an internal task.

CONNECT EVENT 事象の発生を有効にする。CONNECT EVENT Enables event occurrence.

WAIT EVENT 指定した事象が発生するまで内部タスクを
待ち状態にする。
WAIT EVENT Puts the internal task in the wait state until the specified event occurs.

第5図のプログラム動作について概要を説明する。An outline of the program operation of FIG. 5 will be described.

まず上位タスクDATAをメモリに格納して起動すると最初
の内部タスクSAVEDATAが実行を開始する。この内部タス
クは、内部タスクMEASUREによってCOMMON変数を用いた
バッファに書きこまれたデータを順番に読み出してファ
イルに格納する。バッファは100コのデータを格納で
きる容量を有し最終データの次は先頭のデータをアクセ
スすることによってリング状にくり返し使用される。バ
ッファのアクセス位置はCOMMON変数のSAVEPTにより書込
み位置が示され、COMMON変数のREADPTにより読み出し位
置が示される。内部タスクSAVEDATAは行100、行11
0で上位タスクCONTを起動し、行120で内部タスクME
ASUREを起動し、行130で事象MEASENDの発生を有効に
した後、行140から行200までのループによってバ
ッファから読み出しデータを順番にファイルに書き込
む。
First, when the upper task DATA is stored in the memory and activated, the first internal task SAVEDATA starts execution. This internal task sequentially reads the data written in the buffer using the COMMON variable by the internal task MEASURE and stores it in the file. The buffer has a capacity capable of storing 100 pieces of data, and after the final data is accessed, the leading data is repeatedly used in a ring shape. The access position of the buffer is indicated by the COMMON variable SAVEPT at the write position, and by the COMMON variable READPT at the read position. Internal task SAVEDATA is line 100, line 11
0 starts the high-level task CONT, and at line 120 the internal task ME
After invoking ASURE and enabling the occurrence of event MEASEND at line 130, the loop from line 140 to line 200 sequentially writes the read data from the buffer to the file.

内部タスクMEASUREは行310のWAIT EVENT命令によつ
て第6図プログラム測定器16から測定完了信号が発生
するまで待った後、行320で測定器からデータを読み
出してバッファに書き込む。
The internal task MEASURE waits until the measurement completion signal is generated from the program measuring instrument 16 in FIG. 6 by the WAIT EVENT instruction in line 310, and then reads the data from the measuring instrument in line 320 and writes it in the buffer.

上位タスクCONTは第6図のアダプタ18から試料検出信
号が発生するまで待った後アダプタへ試料を調整するた
めデータと測定開始を指定するデータとを送出する。第
7図のプログラムでは上位タスクCONTの優先度が最も高
く、上位タスクDATA内では内部タスクMEASUREの方が内
部タスクSAVEDATAよりも優先度が高くなっている。その
ため内部タスクSAVEDATAプログラム行140から行20
0までのループを実行中に測定完了信号が発生すると、
実行中の一命令が終了してから内部タスクMEASUREに実
行権が与えれれて行320〜行350が実行される。一
方、2つの上位タスクの間では上位タスクCONTの方が優
先度が高いため、事象ADJUSTが発生すると上位タスクDA
TA内で高級言語の命令を実行中であるかどうかに係らず
直ちに上位タスクCONT内の内部タスクMAINに実行権が与
えられて行70〜行80が実行される。
The upper task CONT waits for the sample detection signal to be generated from the adapter 18 in FIG. 6 and then sends the data for adjusting the sample and the data designating the start of measurement to the adapter. In the program of FIG. 7, the upper task CONT has the highest priority, and the internal task MEASURE has a higher priority than the internal task SAVEDATA in the upper task DATA. Therefore, internal task SAVEDATA program line 140 to line 20
When the measurement complete signal is generated while executing the loop up to 0,
After one instruction being executed is completed, the execution right is given to the internal task MEASURE and the lines 320 to 350 are executed. On the other hand, the upper task CONT has a higher priority between the two upper tasks, so when the event ADJUST occurs, the upper task DA
Regardless of whether a high-level language instruction is being executed in the TA, the execution right is immediately given to the internal task MAIN in the higher-level task CONT, and the lines 70 to 80 are executed.

第7図は、第5図のプログラムに関する3つの内部タス
クについて、情報処理システム12の実行管理部12a
の手順を個別に表わしたものである。
FIG. 7 shows the execution management unit 12a of the information processing system 12 regarding the three internal tasks related to the program of FIG.
This is an individual representation of the procedure of.

また、第8図(a)〜(i)は、この実行管理部12a
により適時、変更された状態における各内部タスクに割
り当てられる優先度を示す模式図である。
In addition, FIGS. 8A to 8I show the execution management unit 12a.
FIG. 10 is a schematic diagram showing priorities assigned to each internal task in a changed state at appropriate times.

この割り当ては、高級言語で記述されたプログラム13
に記述された内容により予め決定されるものであるが、
以下、詳述するように実行の過程で、優先度は、一時的
に「実行レベル」や「割込みレベル」に変更されること
がある。
This allocation is performed by a program 13 written in a high-level language.
Although it is predetermined according to the contents described in,
As will be described in detail below, the priority may be temporarily changed to the “execution level” or the “interrupt level” in the process of execution.

また、優先度の値は、その値が小さいほど優先度が高い
ものとする。
Further, regarding the priority value, the smaller the value, the higher the priority.

そして未実行状態において、各内部タスクの優先度の初
期値は、第8図(a)に示すものであるとする。したが
ってこの状態において、上位タスクNの優先度は、上位
タスクCONTが上位タスクDATAより高く、上位タスクDATA
内の内部タスクMの優先度は、内部タスクMEASUREが、
内部タスクSAVEDATAより高くなっている。
Then, in the unexecuted state, the initial value of the priority of each internal task is assumed to be as shown in FIG. 8 (a). Therefore, in this state, the priority of the upper task N is that the upper task CONT is higher than the upper task DATA,
Internal task MEASURE has the priority of internal task M
It is higher than the internal task SAVEDATA.

内部タスクSAVEDATAは通常はP103,P107,P1
08,p109の経路をくり返したどってプログラムの
行140〜行200を実行している。内部タスクMEASUR
Eはプログラムの行310を実行すると事象MEASENDが発
生するまで待ち状態となるが、この行の実行は第7図に
おいてはP211,p212に対応する。
The internal task SAVEDATA is normally P103, P107, P1
Lines 140 to 200 of the program are executed by repeating the route 08, p109. Internal task MEASUR
When E executes line 310 of the program, it waits until the event MEASEND occurs. The execution of this line corresponds to P211 and p212 in FIG.

このように、第5図の高級言語で記述されたプログラム
の通常の実行状態は、内部タスクSAVEDATAは「実行レベ
ル」であり、内部タスクMEASUREと内部タスクMAIN(上
位タスクCONTに属する)は、「待ち状態」となってお
り、第8図(b)にこの状態を示す。
As described above, in the normal execution state of the program written in the high-level language of FIG. 5, the internal task SAVEDATA is at the "execution level", and the internal task MEASURE and the internal task MAIN (belonging to the higher-level task CONT) are "Waiting state", and this state is shown in FIG. 8 (b).

そして、内部タスクM=0は、内部タスクが「実行レベ
ル」であることを示す。さらに、優先度を( )で示し
たものは、「待ち状態」の内部タスクの優先度である。
さらに上位タスクNと内部タスクMの合成値N−M=0
は「割り込みレベル」であることを示すものである。そ
して事象MEASENDが発生するとP213,P214が実
行される。つまり、この時内部タスクMEASUREは、「待
ち状態」から「実行可能状態」を経て、「実行状態」と
なる。「待ち状態」から「実行状態」への移行は、第8
図(C)に示す如く、内部タスクMEASUREが最も優先度
が高いことによる。
The internal task M = 0 indicates that the internal task is at the “execution level”. Further, the priority indicated by () is the priority of the internal task in the "waiting state".
Furthermore, the combined value of the upper task N and the internal task M NM = 0
Indicates the "interrupt level". When the event MEASEND occurs, P213 and P214 are executed. That is, at this time, the internal task MEASURE goes from the “waiting state” to the “executable state” and then to the “execution state”. The transition from the “waiting state” to the “execution state” is the eighth
This is because the internal task MEASURE has the highest priority as shown in FIG.

そして第7図のP214を実行した後、この内部タスク
MEASUREの優先度は、第8図(d)に示す如く、初期値
に変更される。こりにより優先度は、内部タスクSAVEDA
TAが最も高く、以前、実行中であった高級言語で記述さ
れたプログラムの内部タスクSAVEDATAの命令の実行を続
けることになる。その後内部タスクSAVEDATAによって実
行中であった命令の実行が終了するとP103,P10
4,P105が順に実行される。第7図のP105が実
行されると、第8図(e)に示すように、内部タスクME
ASUREの優先度が最も高くなるため、ここでタスクの実
行権の切換が起きて内部タスクMEASUREに実行権が与え
られてP215の実行が行われる。
Then, after executing P214 of FIG. 7, this internal task
The priority of MEASURE is changed to the initial value as shown in FIG. Due to this, the internal task SAVEDA
The TA is the highest, and the execution of the instruction of the internal task SAVEDATA of the program written in the high-level language that was being executed previously is continued. After that, when the execution of the instruction being executed by the internal task SAVEDATA ends, P103 and P10
4, P105 are sequentially executed. When P105 of FIG. 7 is executed, as shown in FIG. 8 (e), the internal task ME
Since ASURE has the highest priority, the execution right of the task is switched here, and the execution right is given to the internal task MEASURE to execute P215.

そして、内部タスクMEASUREの命令実行時の優先度は、
第8図(f)に示す如く「実行レベル」とされている。
また、内部タスクMEASUREの初期の優先度は、内部タス
クSAVEDATAよりも高い。しかし、事象MEASENDが発生し
ても直ちに内部タスクMEASUREの命令が実行されるわけ
ではなく、以上説明したように内部タスクSAVEDATAで実
行中であった命令の実行が終了してから内部タスクMEAS
UREの命令に切り換ることとなる。以後プログラムの行
320〜行360、行300と実行されて再び行310
が実行されると内部タスクSAVEDATAに実行権が切換えら
れてP106から実行を再開する。このようにして上位
タスクDATA内の2つの並列処理部相互間では、BASIC言
語の一命令の実行が終了するのを待ってから実行権の切
換が行われる。また、上位タスクCONTに属する唯一の内
部タスクMAINはプログラムの行60を実行すると事象AD
JUSTが発生するまで第8図(b)で示したように、内部
タスクMAINは、待ち状態となるが、この行の実行は第7
図においてはP311,P312に対応する。また、事
象ADJUSTが発生した場合について説明する。この時、第
8図(g)に示すように内部タスクMAINは、「待ち状
態」から「実行可能状態」を経て「実行状態」となる。
同図に示すように内部タスクMAINは、最も優先度が高い
から「待ち状態」から「実行状態」へと移行できる。P
313,P314が実行され、そして、このP314を
実行すると第8図(h)のように内部タスクMAINの優先
度は初期値に変更される。さらにこの状態においては、
内部タスクMAINの優先度が最も高くなり、直ちにP31
5が実行されプログラムの行70〜90、行50が実行
される。そして、第7図のP315実行後の優先度は、
第8図(i)のように、内部タスクMAINの優先度は、上
位タスクCONT内における「実行レベル」となる。尚、こ
の状態においても内部タスクMAINの優先度は最も高いも
のである。この場合は事象が発生すると、上位タスクDA
TA内で高級言語プログラムの命令が実行途中であっても
事象ADJUSTの発生により直ちに上位タスクCONTに実行権
が与えられる。
And the priority when executing the instruction of the internal task MEASURE is
As shown in FIG. 8 (f), the "execution level" is set.
The initial priority of the internal task MEASURE is higher than that of the internal task SAVEDATA. However, even if the event MEASEND occurs, the instruction of the internal task MEASURE is not executed immediately, and as described above, the internal task MEASURE is executed after the execution of the instruction being executed by the internal task SAVEDATA is completed.
It will be switched to the URE command. Thereafter, lines 320 to 360 and line 300 of the program are executed, and line 310 is again executed.
Is executed, the execution right is switched to the internal task SAVEDATA and the execution is restarted from P106. In this way, between the two parallel processing units in the upper task DATA, the execution right is switched after waiting for the execution of one instruction of the BASIC language to be completed. Also, the only internal task MAIN belonging to the higher-level task CONT executes event 60 when executing line 60 of the program.
As shown in Fig. 8 (b), the internal task MAIN is in the waiting state until JUST occurs, but the execution of this line is the seventh.
In the figure, it corresponds to P311 and P312. Also, the case where event ADJUST occurs is explained. At this time, as shown in FIG. 8 (g), the internal task MAIN goes from the “waiting state” to the “executable state” and then to the “execution state”.
As shown in the figure, since the internal task MAIN has the highest priority, it can shift from the "waiting state" to the "execution state". P
313 and P314 are executed, and when this P314 is executed, the priority of the internal task MAIN is changed to the initial value as shown in FIG. 8 (h). Furthermore, in this state,
Internal task MAIN has the highest priority, and immediately P31
5 is executed, and lines 70 to 90 and line 50 of the program are executed. Then, the priority after the execution of P315 in FIG.
As shown in FIG. 8 (i), the priority of the internal task MAIN is the "execution level" in the upper task CONT. Even in this state, the internal task MAIN has the highest priority. In this case, when an event occurs, the upper task DA
Even if an instruction of a high-level language program is being executed in TA, the execution right is immediately given to the upper task CONT when the event ADJUST occurs.

以上説明したように、第5図のプログラムではBASIC言
語の命令を単位として実行権の切換が行われる2つの内
部タスクを持つ上位タスクと、これらの内部タスク内の
BASIC言語の命令の実行とは独立して実行権を得ること
のできる別の上位タスクとが複合して実行される。
As described above, in the program shown in FIG. 5, a higher-level task having two internal tasks whose execution rights are switched in units of BASIC language instructions and the internal tasks
Execution of the BASIC language instruction is executed in combination with another higher-level task that can obtain the execution right independently.

[発明の効果] 以上説明したごとく、本発明の情報処理装置によれば、
高級言語の命令を構成する機械語を単位として実行権の
切換がなされるタスクと、高級言語の命令を単位として
実行権の切換がなされるタスクの両方を実行することが
できる。前者は最小限の遅れ時間で条件の変化に応答す
べき処理に適している。また後者はタスク間で共通の変
数(COMMON変数)を用いて容易にデータの変換ができ、
また、全体としての実行経過を高級言語の命令を単位と
して把握することができるのでプログラムの開発・動作
確認の効率が良い効率的な割り込み制御ができる効果が
ある。さらに、この両者を複合して実行できることによ
り、処理対象の性格に応じて両者を使い分けてプログラ
ムの応答性とプログラムの作りやすさを両立させること
が可能となった。
As described above, according to the information processing device of the present invention,
It is possible to execute both a task whose execution right is switched in units of machine language that constitutes a high-level language instruction and a task whose execution right is switched in units of high-level language instructions. The former is suitable for processing that should respond to changing conditions with minimal delay. In the latter case, data can be easily converted using common variables (COMMON variables) between tasks,
In addition, since the execution progress as a whole can be grasped in units of high-level language instructions, there is an effect that efficient interrupt control with good efficiency in program development and operation check can be performed. Furthermore, by being able to execute both of these in combination, it becomes possible to make both the responsiveness of the program and the easiness of creating the program compatible by properly using both depending on the nature of the processing target.

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

第1図(a)は本発明を示すブロック図、第1図(b)
は、同装置のハードウエア構成を示す図、第2図(a)
は、本発明の情報処理装置のタスク構成を示す模式図、
同図(b)は、同装置の論理的な構成を示す図、第3図
は、同装置の高級言語処理システムの命令実行管理部の
実行手段を示すフローチャート、第4図は、同高級言語
処理システムの命令実行部における内部タスクの「待ち
状態」管理を示すフローチャート、第5図は、本発明の
情報処理装置を自動制御システムに応用した一実施例を
示すプログラム、第6図は、同自動制御システムの構成
図、第7図は、同自動制御システムにおける第5図のプ
ログラムの各内部タスク別の実行手順を示すフローチャ
ート、第8図(a)〜(i)は、同自動制御システムに
おけるプログラムの各内部タスクの優先度を示す模式図
である。 N……上位タスク群、M……内部タスク群、10……資
源、10a……CPU、10b……メモリ、10c……
ハードウエア、11……オペレーティングシステム、1
2……高級言語処理システム、12a……命令実行管理
部、12b……命令実行部、13……高級言語で記述さ
れたプログラム(アプリケーションプログラム)。
FIG. 1 (a) is a block diagram showing the present invention, and FIG. 1 (b).
Is a diagram showing a hardware configuration of the device, FIG. 2 (a).
Is a schematic diagram showing a task configuration of the information processing apparatus of the present invention,
FIG. 3B is a diagram showing a logical configuration of the device, FIG. 3 is a flowchart showing an execution means of an instruction execution management unit of the high-level language processing system of the device, and FIG. 4 is a high-level language. FIG. 5 is a flow chart showing “waiting state” management of internal tasks in the instruction execution unit of the processing system, FIG. 5 is a program showing an embodiment in which the information processing apparatus of the present invention is applied to an automatic control system, and FIG. FIG. 7 is a configuration diagram of the automatic control system, FIG. 7 is a flowchart showing an execution procedure for each internal task of the program of FIG. 5 in the automatic control system, and FIGS. 8 (a) to (i) are the automatic control system. 3 is a schematic diagram showing the priority of each internal task of the program in FIG. N ... High-level task group, M ... Internal task group, 10 ... Resource, 10a ... CPU, 10b ... Memory, 10c ...
Hardware, 11 ... Operating system, 1
2 ... High-level language processing system, 12a ... Instruction execution management section, 12b ... Instruction execution section, 13 ... Program written in high-level language (application program).

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】単一のCPU(10a)と; 該CPUの機械語で構成される複数個のタスクを起動し
て実行可能状態とし、該タスクの状態および優先度に対
応して実行可能状態のタスクの中で最も高い優先度が割
り当てられているタスクを選択し機械語の実行ステップ
を単位としてタスクに実行権を与えるタスク管理手段
(11a)と、;ハードウェア信号を検出して該ハード
ウェア信号の発生を待っている待ち状態のタスクの状態
を実行可能状態に変更する事象管理手段(11b)とを
有するオペレーティングシステム(11)と; 高級言語の命令で構成されるプログラム(13)を格納
するメモリ(10b)と; 前記タスク管理手段により起動されて、前記メモリに格
納されるプログラムから高級言語の命令を順次取り出し
て命令の処理を実行する高級言語処理部(12)と; を有する情報処理装置において、 前記メモリ(10b)に格納されるプログラム(13)
は、複数個(1,2,…,N)の上位タスクから構成さ
れ、さらに各上位タスクは複数個(1,2…,M)のそ
れぞれ異なる優先度を持つ 内部タスク(1−1,1−2,…,1−M), (2−1,2−2,…,2−M), … (N−1,N−2,…,N−M)で構成さ
れ、 前記高級言語処理部(12)は、所定の優先度が割り当
てられている該内部タスクを実行開始するごとに内部タ
スクに割り当てられた優先度でタスク管理手段(11
a)により起動されてプログラム(13)から内部タス
クを構成する高級言語の命令を順次取り出して命令の処
理を実行するとともに、前記内部タスクを構成する高級
言語の一命令を実行しようとする直前に前記上位タスク
に含まれるすべての内部タスクに割り当てられた優先度
よりも高い優先度をその内部タスクの優先度として高級
言語処理部(12)自体に設定し、前記一命令の実行直
後には、再び前記所定の優先度を高級言語処理部(1
2)自体に設定する構成とし、 各上位タスク内においては、高級言語の一命令実行中は
内部タスク間で実行権が切り換えられることを防止し、
異なる上位タスクに属する内部タスク間では機械語の実
行ステップを単位として実行権が切り換えられることを
特徴とする情報処理装置。
1. A single CPU (10a); a plurality of tasks composed of a machine language of the CPU are activated to be in an executable state, and the executable state is associated with the state and priority of the task. Task management means (11a) that selects the task to which the highest priority is assigned from among the tasks, and gives the execution right to the task in units of machine language execution steps; An operating system (11) having an event management means (11b) for changing the state of a task in a waiting state waiting for the generation of a wear signal to an executable state; and a program (13) composed of high-level language instructions. A memory (10b) for storing; a high-level language instruction that is activated by the task management means and is sequentially extracted from the program stored in the memory, and the instruction processing is performed. Level language processing unit for executing (12); an information processing apparatus having the program stored the in the memory (10b) (13)
Is composed of a plurality of (1, 2, ..., N) upper tasks, and each upper task is a plurality (1, 1, ..., M) of internal tasks (1-1, 1) having different priorities. -2, ..., 1-M), (2-1, 2-2, ..., 2-M), ... (N-1, N-2, ..., NM) The unit (12) uses the priority assigned to the internal task every time the internal task to which the predetermined priority is assigned is started to execute.
(a) is activated by the program (13) to sequentially fetch the instructions of the high-level language constituting the internal task to execute the instruction processing, and immediately before attempting to execute one instruction of the high-level language constituting the internal task. A higher priority than the priority assigned to all internal tasks included in the upper task is set in the high-level language processing unit (12) itself as the priority of the internal task, and immediately after the execution of the one instruction, Again, the high priority language processing unit (1
2) It is configured to be set to itself to prevent the execution right from being switched between internal tasks during execution of one instruction in a high-level language in each higher-level task,
An information processing apparatus, wherein execution rights are switched in units of machine language execution steps between internal tasks belonging to different higher-level tasks.
JP22975086A 1986-09-30 1986-09-30 Information processing equipment Expired - Fee Related JPH0668727B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22975086A JPH0668727B2 (en) 1986-09-30 1986-09-30 Information processing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22975086A JPH0668727B2 (en) 1986-09-30 1986-09-30 Information processing equipment

Publications (2)

Publication Number Publication Date
JPS6385829A JPS6385829A (en) 1988-04-16
JPH0668727B2 true JPH0668727B2 (en) 1994-08-31

Family

ID=16897097

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22975086A Expired - Fee Related JPH0668727B2 (en) 1986-09-30 1986-09-30 Information processing equipment

Country Status (1)

Country Link
JP (1) JPH0668727B2 (en)

Also Published As

Publication number Publication date
JPS6385829A (en) 1988-04-16

Similar Documents

Publication Publication Date Title
US5603015A (en) Logic simulation apparatus for executing simulation of a circuit
JP2001265609A (en) Arithmetic processing unit
JP2681929B2 (en) Program start method
JPH0756753A (en) Method and apparatus for sharing of utility function between operating systems
JPH0668727B2 (en) Information processing equipment
JPH0820962B2 (en) High-level language processing method
JP2595082B2 (en) Operation state monitoring device for programmable controller
JPH0659908A (en) Device for executing program
JP2506591B2 (en) Auxiliary processor
JPH05297911A (en) Sequence control circuit for sequence controller
JP2795676B2 (en) Program trace device
JPH10240581A (en) CPU time measuring device
JPS60238948A (en) Device for measuring processing time of computer system
JPH0821027B2 (en) Microcomputer with built-in A / D converter
JPH06202887A (en) Microcomputer
JPH08249024A (en) Programmable controller
JPH07295818A (en) Rule processing device
JPH0764782A (en) File updating system
JPH01185729A (en) Overlay structure program execution system
JPH1011320A (en) ROM program monitor device in a processing device such as a computer
JPS58225469A (en) Multi-processor controlling system
JPS6146531A (en) Microprocessor
JPS63198129A (en) Input data processing system in procedure
JPS59189452A (en) Queue structure for data processor
JPH04372017A (en) Computer testing system

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees