JPH03212742A - Parallel processing control system - Google Patents
Parallel processing control systemInfo
- Publication number
- JPH03212742A JPH03212742A JP933090A JP933090A JPH03212742A JP H03212742 A JPH03212742 A JP H03212742A JP 933090 A JP933090 A JP 933090A JP 933090 A JP933090 A JP 933090A JP H03212742 A JPH03212742 A JP H03212742A
- Authority
- JP
- Japan
- Prior art keywords
- task
- unit
- processing
- execution
- tasks
- 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
Links
Abstract
(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.
Description
【発明の詳細な説明】
[概要]
並行処理を行うオペレーティングシステムにより装置を
制御する並行処理制御方式に関し並行処理プログラムを
容易に効率良く作成でき保守性が容易でかつ装置の動作
を最適化する並行処理制御方式を提供することを目的と
し並行処理される複数のタスクの実行条件が相互に関連
を持つ各タスクを、それぞれ所定長の処理ユニットに分
割してそれぞれに番号を割当て、タスク管理部は、並行
処理される各タスク毎に相互の起動条件を設定してタス
ク実行が可能か否かを判定するタスク実行条件判定手段
をタスクに対応して備え、タスク実行条件判定手段から
の指示により起動する各タスク実行手段を備え、タスク
実丘部は起動すると分割された処理を処理実行手段で実
行すると共に対応するユニットカウンタを歩進し、タス
ク実行条件判定手段は各タスク実行部のユニットカウン
タの値により判定を行うよう構成する。[Detailed Description of the Invention] [Summary] Concerning a parallel processing control method in which devices are controlled by an operating system that performs parallel processing, parallel processing programs can be created easily and efficiently, maintainability is easy, and the operation of the device is optimized. For the purpose of providing a processing control method, each task, in which the execution conditions of multiple tasks that are processed in parallel are related to each other, is divided into processing units of a predetermined length and assigned a number to each, and the task management section , a task execution condition determination means is provided corresponding to each task to set mutual activation conditions for each task to be processed in parallel and determine whether or not the task can be executed, and the task execution condition determination means is activated by an instruction from the task execution condition determination means. When activated, the task execution unit executes the divided processing with the processing execution unit and increments the corresponding unit counter, and the task execution condition determination unit increments the unit counter of each task execution unit. It is configured to perform judgment based on the value.
[産業上の利用分野]
本発明は並行処理を行うオペレーティングシステムによ
り機構部を有する装置を制御するための並行処理制御方
式に関する。[Industrial Application Field] The present invention relates to a parallel processing control method for controlling a device having a mechanism section by an operating system that performs parallel processing.
近年、複数の処理が並行して実行される機構部をプログ
ラム制御する技術が各種の分野で利用されている。その
ような制御には複数の機構部の動作状態により相互に関
連がある場合が多く1そのための従来のプログラミング
によってはフラグを用いて動作の関連を付ける等の方法
を用いていたが、プログラムが複雑になってしまい9そ
の改善が望まれている。2. Description of the Related Art In recent years, technology for program-controlling mechanical units that execute multiple processes in parallel has been used in various fields. In such control, there are many cases in which there is a mutual relationship between the operating states of multiple mechanical parts1. Conventional programming for this purpose uses methods such as using flags to associate operations, but the program It has become complicated9 and improvements are desired.
[従来の技術]
従来、並行可能な機構部の制御を行うことは各種の分野
で行われている。例えば1部品(または部分装置、素子
)をある場所から取り出して加工位置まで運ぶ機構、運
ばれた装置に対し位置合わせ等の制御を行って第1の加
工を行う機構、加工された部品を他の位置に運ぶ機構、
他の位置で別の加工を行うという制御等がある。[Prior Art] Conventionally, controlling mechanisms that can be performed in parallel has been performed in various fields. For example, a mechanism that takes out one part (or partial device or element) from a certain location and transports it to a processing position, a mechanism that performs the first processing by controlling the transported device such as positioning, and a mechanism that carries out the first processing by controlling the transported device such as positioning, and a mechanism for transporting the
There is control such as performing another process at another position.
そのような制御動作は、相互に関連をもっているが各機
構が並行して動作することが可能でありプログラムによ
り並行処理制御が行われる。Such control operations are mutually related, but each mechanism can operate in parallel, and parallel processing control is performed by a program.
そのような並行処理制御を行う従来例の説明図を第6図
に示す。An explanatory diagram of a conventional example that performs such parallel processing control is shown in FIG.
第6図のタスクA9 タスクB、タスクCはそれぞれ並
行動作を行う各機構部の処理を行うプログラムであり、
メインタスクは各タスクA−Cの上位に設けられ、制御
を行うプログラムであり、これらの各プログラムは並行
処理可能なオペレーティングシステムにより制御される
(例えば、32ビツト用のi RMX等)。Task A9, task B, and task C in FIG. 6 are programs that process each mechanical section that performs parallel operations, respectively.
The main task is a control program provided above each task A to C, and each of these programs is controlled by an operating system capable of parallel processing (for example, iRMX for 32 bits).
従来はタスクAのプログラムの位!alまでは他のタス
クと関係なく動作できるが、a+の後は他のタスクCが
プログラムの位置C2まで終了しないと動作できない場
合、タスクへの位置a1にフラグFal(フラグの名称
)を設けて、処理がこの位置に達するとこのフラグを見
て、オフ(最初はオフ状態になっている)の場合メイン
タスクの制御により動作を停止させる。この状態になる
とメインタスクはその処理を停止して他のタスクについ
て制御を行い5他のタスクCがプログラムの位ic2に
達すると、メインタスクの制御によりタスクAのフラグ
Falをオンにする。これによりタスクAの処理が再開
される。同様にタスクCはそのプログラムの途中の位置
にフラグFclが設けられ、この位置になるとフラグF
clがオフ状態の場合メインタスクの制御により停止し
池のタスクBのプログラムが位iblに達するとフラグ
Fclをオンにする。Previously, it was a task A program! Up to al, it can operate independently of other tasks, but after a+, if it cannot operate until another task C finishes at position C2 in the program, set a flag Fal (flag name) at position a1 to the task. When the process reaches this position, it looks at this flag, and if it is off (initially off), it stops the operation under the control of the main task. When this state is reached, the main task stops its processing and controls other tasks.5 When the other task C reaches the program position ic2, the flag Fal of task A is turned on under the control of the main task. As a result, processing of task A is restarted. Similarly, task C has a flag Fcl set in the middle of its program, and when it reaches this position, flag Fcl is set.
When cl is off, the program of task B is stopped under the control of the main task, and when the program of task B reaches position ibl, the flag Fcl is turned on.
このようにフラグにより他のタスクとの相互関係をつけ
る方式の他に、ある処理が他の処理が終了しないと実行
できない時にその処理を[スリープ」 (休み)状態と
して、関連する他の処理の終了により「アクト」状態に
する等の方式もある。In addition to this method of using flags to establish mutual relationships with other tasks, when a process cannot be executed until another process completes, that process is put into a "sleep" state, and other related processes are There is also a method such as putting the program into an "act" state upon termination.
[発明が解決しようとする課題]
上記した従来例のフラグを用いる方式では5全体を制御
するメインタスクは子タスク(タスク実行部等)の数が
増えれば増えるほどフラグの数も多くなるので、フラグ
の制御(各フラグのオン・オフ制御)が複雑になる。さ
らにフラグの管理(フラグに名称を付しその意味を定義
する)が繁雑になり、プログラミングやその後のデバッ
グに多くの時間が必要になると共にプログラムの保守性
が悪いという問題が生じていた。同様なことはスリーブ
を用いる場合にも生していた。[Problems to be Solved by the Invention] In the above-mentioned conventional method using flags, the main task that controls the entire task 5 has more flags as the number of child tasks (task execution units, etc.) increases. Flag control (on/off control of each flag) becomes complicated. Furthermore, the management of flags (naming flags and defining their meanings) has become complicated, requiring a lot of time for programming and subsequent debugging, and problems have arisen in that the maintainability of the program is poor. A similar situation occurred when using a sleeve.
そして、このような処理により並行処理制御される機構
部のサイクルタイム(全タスクが1回動作するのに要す
る時間)を短縮する方式が従来から見出されなかった。Conventionally, no method has been found for shortening the cycle time (the time required for all tasks to operate once) of mechanical units that are controlled in parallel through such processing.
本発明は並行処理プログラムを容易に効率良く作成でき
、保守性が容易でかつ装置の動作を最適化する並行処理
制御方式を提供することを目的とする。SUMMARY OF THE INVENTION An object of the present invention is to provide a parallel processing control method that allows parallel processing programs to be easily and efficiently created, maintainability is easy, and optimizes device operation.
[課題を解決するための手段] 第1図は本発明の原理構成図である。[Means to solve the problem] FIG. 1 is a diagram showing the principle configuration of the present invention.
第1図において、10はタスク管理部、11は各タスク
1 タスク2・・・タスクnのそれぞれに対応して設け
られ、それぞれに予め設定された条件を満たすか否かを
判定して満たす場合実行指令を発生するタスク実行条件
判定手段、12はタスクI −nに対応して分割された
ユニットを実行するタスク実行部、13は各タスク実行
部の処理実行手段、14は各処理実行手段による処理ユ
ニット数を計数するユニットカウンタ、15は所定長の
単位で複数の処理1.処理2 ・に分割された各タスク
ト・タスクnを表す。In FIG. 1, 10 is a task management unit, 11 is provided corresponding to each task 1, task 2...task n, and is used to determine whether or not preset conditions are satisfied. 12 is a task execution unit that executes the divided unit corresponding to task I-n; 13 is a process execution unit for each task execution unit; 14 is a process execution unit for each process execution unit; A unit counter 15 counts the number of processing units, and a unit counter 15 counts the number of processing units 1. Processing 2 represents each task divided into tasks n.
本発明は各タスクをそれぞれ所定長の動作単位(ユニッ
ト)により複数個に分割し、各タスク毎にユニットカウ
ンタを設けて動作単位が終了する毎に対応するユニット
カウンタをカウントアツプし、タスク管理部では各タス
ク毎に自タスクの実行条件を判定する。その判定は自タ
スクのユニットカウンタと他タスクのユニットカウンタ
の状態を見て、予め設定された条件が成立するか否かを
識別し1条件が成立するとタスク実行の指示を発生する
ものである。In the present invention, each task is divided into a plurality of operation units (units) each having a predetermined length, a unit counter is provided for each task, and the corresponding unit counter is counted up each time a unit of operation is completed. Then, for each task, the execution conditions of its own task are determined. The determination is made by looking at the states of the unit counter of its own task and the unit counters of other tasks, identifying whether or not a preset condition is met, and issuing an instruction to execute the task if one condition is met.
[作用1
第1図において、予め各タスク1−nをそれぞれ所定処
理量で分割する。その場合、他のタスクの処理が終了し
ないと実行できないプログラム位置で分割する必要があ
る。このようにしてタスクト・タスクnの各タスク15
は、それぞれ第1図に示すように所定個数の処理1.処
理2・・のユニットに分割される。[Operation 1 In FIG. 1, each task 1-n is divided in advance by a predetermined processing amount. In that case, it is necessary to divide the program at a position where it cannot be executed until processing of other tasks is completed. In this way, each task 15 of task task n
As shown in FIG. 1, a predetermined number of processes 1. Processing 2... is divided into units.
タスク管理部10では、並列に処理される複数のタスク
1〜nの実行条件を判定するためにそれぞれタスク実行
条件判定手段11が設けられ、各実行条件判定手段はそ
れぞれのタスクの各ユニットが1他のタスクと関連があ
る場合、その何番目のユニットが終了した時起動するか
という実行条件が予め設定しである。In the task management unit 10, task execution condition determination means 11 is provided to determine the execution conditions of a plurality of tasks 1 to n that are processed in parallel, and each execution condition determination means determines whether each unit of each task is one If there is a relationship with other tasks, the execution condition of when the unit is completed is set in advance.
タスク管理部IOが起動して、各タスク実行条件判定手
段11を駆動する。各タスク実行条件判定手段11は各
タスクのユニットカウンタ14の内容を入力して予め設
定された実行条件を満足するか否か判定し1条件が満た
されるとタスク実行部12に実行指示を出力する。各タ
スク実行部はそれぞれ処理実行手段13が起動すると、
その時のユニットカウンタ14により指示されたユニッ
トを処理する。処理が終了すると、ユニットカウンタ1
4をカウントアツプし、そのカウント値はタスク管理部
に入力される。タスク管理部10の各実行条件判定手段
は、それぞれ自己のタスクの実行状態だけでなく、他の
タスクの実行状態を各処理カウンタ値により知ることが
できるので、予め設定された条件を満たす場合は1次の
ユニットの実行指示を出力し7条件が満たされない場合
(他のタスクのある番号のユニット処理が終了しない時
等)は実行指示を発生しない。The task management unit IO is activated and drives each task execution condition determining means 11. Each task execution condition determining means 11 inputs the contents of the unit counter 14 of each task and determines whether or not a preset execution condition is satisfied, and when one condition is satisfied, outputs an execution instruction to the task execution unit 12. . When the processing execution means 13 starts each task execution unit,
The unit specified by the unit counter 14 at that time is processed. When processing is completed, unit counter 1
4 is counted up, and the count value is input to the task management section. Each execution condition determination means of the task management unit 10 can know not only the execution status of its own task but also the execution status of other tasks from each processing counter value. If the execution instruction for the primary unit is output and the 7 conditions are not satisfied (such as when the unit processing of a certain number in another task is not completed), the execution instruction is not generated.
このように、各タスクが相互に関連するユニット処理の
関係が分割したタスクの実行状態を各タスク実行部で管
理し、その状態をタスク管理部で識別して条件を判定す
ることにより並行処理プログラムを効率良く作成し、保
守が容易になる。In this way, each task execution unit manages the execution status of the divided tasks, and the task management unit identifies the execution status and determines the conditions for parallel processing programs. can be created efficiently and maintenance becomes easy.
[実施例]
第2図(a)はタスク構成を示す図、第2図(b)は分
割された各タスクの処理間の関係口、第2図(C)はタ
スク遷移図、第3図は実施例のメインタスクの処理フロ
ー図、第4図はタスクCの処理フロー図第5図はユニッ
トカウンタの値の定義テーブルである。[Example] Figure 2 (a) is a diagram showing the task configuration, Figure 2 (b) is the relationship between the processes of each divided task, Figure 2 (C) is a task transition diagram, and Figure 3 4 is a processing flow diagram of the main task of the embodiment, FIG. 4 is a processing flow diagram of task C, and FIG. 5 is a definition table of unit counter values.
第2図(a)のタスク構成は1図示しないマイクロプロ
セッサ及びメモリ上に設けられ、複数のタスクA−Cを
制御するメインタスクM及び図示しない制御装置を構成
する複数の機構部に対応したタスクA〜タスクC(メイ
ンタスクに対して子タスクという)とから成る。なお、
上記制御装置の複数の機構部は、各子タスクA−Cの実
行に対応して入出力の動作を実行する。The task configuration in FIG. 2(a) includes one main task M provided on a microprocessor and memory (not shown), which controls multiple tasks A to C, and tasks corresponding to multiple mechanical units constituting a control device (not shown). It consists of tasks A to C (referred to as child tasks to the main task). In addition,
The plurality of mechanical units of the control device perform input/output operations in response to the execution of each child task A to C.
各タスクを所定長毎に複数のユニットに分割しこの例で
は、タスクAは処理1.処理2の2つにタスクBは処理
1〜処理4の4つに、タスクCは処理1〜処理3の3つ
にそれぞれ分割する。 このように分割する原理を、第
2図(blおよび第2図(C1を用いて説明する。Each task is divided into a plurality of units each having a predetermined length. In this example, task A is processed 1. Process 2 is divided into two, task B is divided into four processes 1 to 4, and task C is divided into three processes 1 to 3. The principle of dividing in this way will be explained using FIG. 2 (bl) and FIG. 2 (C1).
制御装置の1サイクル内の各タスク動作の相互関係を分
析すると、第2図(b)に示すような関係を持つ場合、
即ち、最初にタスクA5タスクBおよびタスクCが並行
に処理を開始して、タスクAは処理1の単位を実行する
とそれ以上処理を進められない状態になり、タスクCも
処理1の単位を実行すると処理を進められない状態にな
る。このような第2図(b)の関係を勘案すると、各タ
スクABCは第2図(C)のタスク遷移図に示す時間で
それぞれ処理lとして分割される。Analyzing the interrelationship of each task operation within one cycle of the control device, if the relationship is as shown in Figure 2 (b),
That is, first, task A, task B, and task C start processing in parallel, and once task A executes a unit of process 1, it becomes unable to proceed any further, and task C also executes a unit of process 1. Then, the process becomes unable to proceed. Considering the relationship shown in FIG. 2(b), each task ABC is divided into processes 1 at the times shown in the task transition diagram of FIG. 2(c).
さらに、第2図ら)によれば、その後、タスクCはタス
クBの処理2として分割した動作が終了すると、処理2
を実行できるよう条件付けられているので、タスクBを
次に処理2の位置で分割する。Furthermore, according to FIG.
Since the condition is such that task B can be executed, task B is then divided at the position of process 2.
そして、タスクA及びBはタスクCの処l′I2が終了
しないと起動しない位置があり、それぞれの位置をタス
クAでは処理2.タスクBでは処理4として分離する。Tasks A and B have positions where they will not start until task C's process 1'I2 is completed, and task A's process 2. Task B is separated as process 4.
なお、タスクBの処理3は自タスクの処理2の終了後無
条件で実行することができる。Note that Process 3 of Task B can be executed unconditionally after Process 2 of its own task is completed.
このように各タスクを分割すると1各分割された処理の
時間長、処理開始から終了までの時間は第2図(C)に
示されるようになる。この場合、第2図(C)の各分割
された処理単位の長さは、相互の関係により適宜法める
ことができるが、各タスク間で同しような長さにすると
無駄な待ち時間がなくなり、最適な分割にすることがで
きる。When each task is divided in this way, the time length of each divided process and the time from the start to the end of the process are shown in FIG. 2(C). In this case, the length of each divided processing unit in Figure 2 (C) can be adjusted as appropriate depending on the mutual relationship, but if the lengths are the same for each task, unnecessary waiting time will result. This allows for optimal division.
本実施例では、タスクA、B、Cを第2図(b)第2図
(C)に示すように分割した時、各タスクの分割単位(
ユニット)をカウントするユニットカウンタとして、U
A、UB、UCを設ける。そしてこれらの各ユニットカ
ウンタのカウント値の意味を第5図に示す定義テーブル
に示すように定義す上記のユニットカウンタを用いた実
施例のメインタスクの処理フローを第3図に示し、各子
タスクにおける処理フローを代表してタスクCの処理フ
ローを第4図に示す。In this example, when tasks A, B, and C are divided as shown in FIG. 2(b) and FIG. 2(C), the division unit of each task (
As a unit counter that counts U
A, UB, and UC are provided. The meaning of the count value of each unit counter is defined as shown in the definition table shown in FIG. 5. The processing flow of the main task of the embodiment using the above unit counter is shown in FIG. The processing flow of task C is shown in FIG. 4 as a representative processing flow.
第3図に示すメインタスクの処理フローを説明する。The processing flow of the main task shown in FIG. 3 will be explained.
最初に各ユニ7 t・カウンタUA、UB、UC(以下
、単にUA、UB、UCという)を0にリセットして(
ステップ30)待機する。処理開始の指令があると(ス
テップ31)、各ユニットカウンタに1をセントする(
ステップ32)。この状態になると、各タスクは起動状
態になり、各タスクA−Cの条件判定を行うステップ3
3,3947が並列に処理される。この処理は並列処理
可能なオペレーティングシステムの制御により行われる
。First, reset the counters UA, UB, and UC (hereinafter simply referred to as UA, UB, and UC) to 0 (
Step 30) Wait. When there is a command to start processing (step 31), 1 is placed in each unit counter (
Step 32). In this state, each task enters the activated state, and in step 3, the conditions of each task A to C are determined.
3,3947 are processed in parallel. This processing is performed under the control of an operating system capable of parallel processing.
ステップ47〜52におけるUC(タスクC用)に関す
る処理フローについて説明すると、最初にuc=e o
o oかが判別される。これは、第5図の定義テーブ
ルによれば正常終了か否かを判断するものである。この
時、UC=1であるからノーであるから次のステップ4
8に移る。ここでUC= 1か判定され、イエスである
からステップ52に移る。このステップは、rTAsK
c (UC);」であり、タスクCを実行することであ
る。To explain the processing flow regarding UC (for task C) in steps 47 to 52, first uc=e o
o or o is determined. This is to determine whether or not the process has ended normally according to the definition table shown in FIG. At this time, since UC=1, the answer is no, so proceed to the next step 4.
Move on to 8. Here, it is determined whether UC=1, and since it is YES, the process moves to step 52. This step
c (UC);'' and is to execute task C.
これにより、第4図に示すタスクCの処理が開始される
。As a result, the processing of task C shown in FIG. 4 is started.
第4図では、最初にステップ60でuc= iか判定す
る。この時UC=1であるからステップ61に移りタス
クCの処理lが実行される。これが終了すると、ステッ
プ62でUC+ 1が実行され(UC=2になる)、リ
ターンする(メインタスクへ)。この間、ステップ33
〜38及び39〜46においてUA(タスクA)および
UB(タスクB)に関する処理が同様に行われる。In FIG. 4, first in step 60 it is determined whether uc=i. At this time, since UC=1, the process moves to step 61 and process 1 of task C is executed. When this is completed, UC+1 is executed in step 62 (UC=2), and the process returns (to the main task). During this time, step 33
-38 and 39-46, the processing regarding UA (task A) and UB (task B) is performed in the same way.
タスクCの処理lが終了してUC=2になった後、ステ
ップ54においてUA、tJB、UCが共にOであるか
判定され、この場合ノーであるから次に■の経路により
再びステップ47の判定が行ねれる。この後、ステップ
48でUC= 1の判定がノーとなるので1次のステッ
プ49に1多りtJc−2か判定される。この場合イエ
スとなるので次のステップ50に進み、ここでUB=3
かを判定する。この判定は、他のタスクBの処理2(第
2図(b)、第2図(C)参照)を終了しているかどう
かをチエツクするものである。After the process 1 of task C is completed and UC=2, it is determined in step 54 whether UA, tJB, and UC are all O. In this case, the answer is NO, so next, step 47 is performed again according to the route (■). Judgment can be made. After this, in step 48, the determination of UC=1 becomes NO, so in the primary step 49, it is determined whether tJc-2 is more than 1. In this case, the answer is yes, so proceed to the next step 50, where UB=3
Determine whether This determination is to check whether Process 2 of another task B (see FIG. 2(b) and FIG. 2(C)) has been completed.
この時、タスクBの処理2が終了したが否かはUBO値
を判別することにより行われ、もしUB−3なら、ステ
ップ52に進み、第4図のタスクCの処理が実行される
。この場合、第4図のステップ63を介して処理2が実
行される(ステップ64)。その後、UCはカウントア
ツプされてUC=3になり(ステップ65)、リターン
する。At this time, whether processing 2 of task B has been completed or not is determined by determining the UBO value. If it is UB-3, the process advances to step 52 and the processing of task C in FIG. 4 is executed. In this case, process 2 is executed via step 63 in FIG. 4 (step 64). Thereafter, UC is counted up and becomes UC=3 (step 65), and the process returns.
続いてステップ54.ステップ47を経てステップ51
に達すると、ここでUC=3であるがらイエスと1ニリ
定されステップ52においてタスクCが実行される。こ
の場合、第4図の処理においてステップ66を介してタ
スクCの処理3(ステップ67)が実行され、UC=8
000 (16進表示)にセットされる(ステップ68
)。Then step 54. Step 51 after step 47
When this is reached, UC=3 is determined to be YES for 1 time, and task C is executed in step 52. In this case, in the process of FIG. 4, process 3 (step 67) of task C is executed via step 66, and UC=8
000 (hexadecimal display) (step 68
).
この後、リターンして、ステップ47においてUC=8
000の判定においてイエスの結果がでると、ステップ
53においてLIC=0となる。After this, return and in step 47 UC=8
If a yes result is obtained in the determination of 000, LIC=0 in step 53.
上記のような処理が各タスクΔ、Bについても同様に行
われ、メインタスクのステップに示すように第2図(a
)、第2図(b)に示す条件が成立する時に各タスクの
処理が実行される。The above-mentioned processing is similarly performed for each task Δ and B, and as shown in the steps of the main task in Figure 2 (a
), the processing of each task is executed when the conditions shown in FIG. 2(b) are satisfied.
各タスクA−Cの全てのタスクが終了すると各カウンタ
UA、UB、UCは共に0となり、この場合、ステップ
54においてイエスと判定され次の終了か否かを判定す
る。この判定は、上記の各タスクA−Cが処理を開始し
て全部が終了するまでを1サイクルとする制御動作が何
回で終了させるか予め設定しておいて、その設定数に達
したか否かを判定するものである。この設定数は1例え
ば1部品の加工制御を行う場合1部品の個数が設定され
る。When all the tasks A to C are completed, the counters UA, UB, and UC become 0. In this case, the determination in step 54 is YES, and it is determined whether or not the next completion is to be performed. This determination is made by setting in advance how many times the control operation will be completed, with one cycle being the time from the start of processing to the completion of each of the above tasks A to C, and when the set number has been reached. This is to determine whether or not it is true. This set number is 1. For example, when controlling the machining of one part, the number of parts is set.
もし、終了でない場合は、■の経路でステップ3Iに戻
り、処理開始の指令により再び同様の動作を繰り返す。If the process is not completed, the process returns to step 3I via route (3), and the same operation is repeated again based on the instruction to start the process.
上記の第3図及び第4図の動作において、タスクの処理
動作に異常が発生した場合、タスクに対応するユニット
カウンタの値を8001以上の値に設定する。この場合
3 どのタスクの処理が異常終了であるかを後で検出す
ることができる。In the operations shown in FIGS. 3 and 4 above, if an abnormality occurs in the processing operation of a task, the value of the unit counter corresponding to the task is set to a value of 8001 or more. In this case 3, it is possible to later detect which task's processing ended abnormally.
このように、タスクの起動はユニ、トカウンタの制御の
みで行うことができ、その制御もタスクl!2移図(第
2図(C))で管理することができる。In this way, a task can be activated only by controlling the unit counter, and that control is also controlled by the task l! It can be managed by two transfers (Fig. 2(C)).
[発明の効果1
本発明によれば各タスクの動作順序および並行動作がユ
ニットカウンタで一元管理され、タスク数が多くなって
も容易に制御が可能となり、タスク遷移図を利用して動
作の最適化も容易にできる。[Advantageous Effects of the Invention 1] According to the present invention, the operation order and parallel operations of each task are centrally managed by a unit counter, and even if the number of tasks increases, it can be easily controlled, and the task transition diagram can be used to optimize the operation. It can also be easily converted into
この結果、プログラミングおよびデバッグ期間も大幅に
短縮することが可能となり、プログラムの保守性を良好
にすることができる。As a result, programming and debugging periods can be significantly shortened, and program maintainability can be improved.
第1図は本発明の原理構成図、第2図(a)はタスク構
成を示す図、第2図(b)は分割された各タスクの処理
間の関係図、第2図(C)はタスク遷移図、第3図は実
施例のメインタスクの処理フロー図、第4図はタスクC
の処理フロー図、第5図はユニットカウンタの値の定義
テーブル、第6図は従来例の説明図である。
第1図中
10:タスク管理部
11:タスク実行条件判定手段
12:タスク実行部
13・処理実行手段
14:ユニットカウンタ
15:タスクFigure 1 is a diagram showing the principle configuration of the present invention, Figure 2 (a) is a diagram showing the task configuration, Figure 2 (b) is a diagram showing the relationship between the processes of each divided task, and Figure 2 (C) is a diagram showing the task configuration. Task transition diagram, Figure 3 is a processing flow diagram of the main task of the embodiment, Figure 4 is task C
5 is a definition table of unit counter values, and FIG. 6 is an explanatory diagram of a conventional example. 10 in FIG. 1: Task management section 11: Task execution condition determination means 12: Task execution section 13/processing execution means 14: Unit counter 15: Task
Claims (1)
制御するための並行処理制御方式において、 並行処理される複数のタスクの実行条件が相互に関連を
持つ各タスクを、それぞれ所定長の処理ユニットに分割
してそれぞれに番号を割当て、タスク管理部(10)は
、並行処理される各タスク毎に相互の起動条件を設定し
てタスク実行が可能か否かを判定するタスク実行条件判
定手段(11)をタスクに対応して備え、 前記タスク実行条件判定手段(11)からの指示により
起動する各タスク実行部(12)を備え、各タスク実行
部は起動すると分割された処理を処理実行手段(13)
で実行すると共に対応するユニットカウンタ(14)を
歩進し、 上記タスク実行条件判定手段(11)は各タスク実行部
のユニットカウンタの値により判定を行うことを特徴と
する並行処理制御方式。[Claims] In a parallel processing control method for controlling a device by an operating system that performs parallel processing, each task is processed for a predetermined length, and the execution conditions of the tasks to be processed in parallel are mutually related. The task management unit (10) divides into units and assigns numbers to each unit, and the task management unit (10) sets mutual activation conditions for each task to be processed in parallel, and determines whether the task can be executed. (11) corresponding to the tasks, and each task execution unit (12) is activated in response to an instruction from the task execution condition determining means (11), and each task execution unit executes divided processing when activated. Means (13)
A parallel processing control method characterized in that the task execution condition determining means (11) performs the determination based on the value of the unit counter of each task execution section.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP933090A JPH03212742A (en) | 1990-01-18 | 1990-01-18 | Parallel processing control system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP933090A JPH03212742A (en) | 1990-01-18 | 1990-01-18 | Parallel processing control system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH03212742A true JPH03212742A (en) | 1991-09-18 |
Family
ID=11717462
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP933090A Pending JPH03212742A (en) | 1990-01-18 | 1990-01-18 | Parallel processing control system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH03212742A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2011054161A (en) * | 2009-08-31 | 2011-03-17 | Internatl Business Mach Corp <Ibm> | Multi-core/thread work-group computation scheduler |
-
1990
- 1990-01-18 JP JP933090A patent/JPH03212742A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2011054161A (en) * | 2009-08-31 | 2011-03-17 | Internatl Business Mach Corp <Ibm> | Multi-core/thread work-group computation scheduler |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH03134709A (en) | Method of deciding expression as relay ladder type diagram of command list program | |
| JPH09128255A (en) | Programable logic controller | |
| JP2820189B2 (en) | Control software execution system for numerical controller | |
| CN111861381A (en) | Multi-fund channel access method and system | |
| JPH03212742A (en) | Parallel processing control system | |
| JPH03223901A (en) | Semiconductor manufacturing equipment | |
| JPS58222357A (en) | Drive control program debugging method | |
| CN106055322A (en) | Flow scheduling method and device | |
| JPS63636A (en) | Task control system | |
| JP2005135137A (en) | Virtual computer system | |
| JP2872728B2 (en) | Cell controller and cell control system | |
| JP2590872B2 (en) | Task scheduling method | |
| JPH0666063B2 (en) | Sequence controller | |
| JPH06222932A (en) | Computer | |
| JPH0198047A (en) | Interruption processing system | |
| JPH02113363A (en) | Time slice controlling system for multiprocessor system | |
| JPS62196739A (en) | Control system for microprogram execution locus stack in communication control equipment | |
| JPS63317834A (en) | Ladder program processing system | |
| JPH03237577A (en) | Automatic sorting processing system for data flow program | |
| JPH04160408A (en) | Numerical controller | |
| KR20220138137A (en) | Method and apparatus for processing programmable logic controller commands | |
| JPH04273536A (en) | Virtual computer inputting and outputting device control system | |
| JPH01211036A (en) | System for processing transfer of inter-module information | |
| JPS61112207A (en) | Device start-stop control system | |
| JPS6385938A (en) | Controller for multiplex parallel operation of program |