JPS59163647A - Task control method - Google Patents

Task control method

Info

Publication number
JPS59163647A
JPS59163647A JP3725183A JP3725183A JPS59163647A JP S59163647 A JPS59163647 A JP S59163647A JP 3725183 A JP3725183 A JP 3725183A JP 3725183 A JP3725183 A JP 3725183A JP S59163647 A JPS59163647 A JP S59163647A
Authority
JP
Japan
Prior art keywords
job
task
tasks
state
execution
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.)
Granted
Application number
JP3725183A
Other languages
Japanese (ja)
Other versions
JPH0457022B2 (en
Inventor
Masao Sueki
末記 雅夫
Hirokazu Kasashima
広和 笠嶋
Hiroaki Nakanishi
宏明 中西
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP3725183A priority Critical patent/JPS59163647A/en
Publication of JPS59163647A publication Critical patent/JPS59163647A/en
Publication of JPH0457022B2 publication Critical patent/JPH0457022B2/ja
Granted legal-status Critical Current

Links

Abstract

PURPOSE:To perform the time division processing of plural jobs with a small operand and high efficiency and to form a multi-job system of a single CPU with high speed hardware, by validating the interruption and release given from a task within a corresponding job. CONSTITUTION:A task control system contains a job pause state control table 22 and job pause release queues 25-27. A pause instruction issuing task area 23 and a pointer 24 are provided to a task for corresponding job JC of the table 22. Then a job pause instruction is issued from the area 23, and the pointer 24 indicates the queues 25-27. At the same time, the numbers of tasks X, Y... are successively stored to the queues 25-27 by the pointer 24. Thus the time division processing is carried out for plural jobs with a small operand and high efficiency, and a multi-job system using a single CPU is obtained.

Description

【発明の詳細な説明】 〔花明の利用分野〕 本発明は、1台の処理装置内に複数の独立した業務(ジ
ョブ)の割当てを行い、谷業務を同時並行的に実行する
ことをoT能とするマルチジョブシステムに於る、タス
ク管理の方法に関するものでおる。
[Detailed description of the invention] [Field of application of Hanamei] The present invention allocates a plurality of independent tasks (jobs) within one processing device, and executes valley tasks simultaneously in parallel. This paper relates to a method for managing tasks in a multi-job system that enables multiple jobs.

〔征米技術〕〔Mirai technology〕

大きな計算機システムに於ては、システム管理のための
オペレーティングシステム(以下O8と1−tij記す
る)やユーザプログラム等の檎々の処理を、ジョブと呼
ばれる機能単位に分割して実行する。
In a large computer system, the processing of an operating system for system management (hereinafter referred to as O8) and user programs is divided into functional units called jobs and executed.

(にこの6ジヨブVよ、通常その処理単位としてより小
さいタスクに分、!tllされ、実行される。クリえば
、オンラインリアシフ441間御の処理(ジョブ100
)の列r考えると、そnは第1図のようなタスクに分割
され、実行さ扛る。即ち、外部割込み101などのイベ
ントが発生すると、七のイベントを敗色み間断するタス
クT1が起動され、そのタスクの処理によってイベント
に対応した処理を決定し、それを実行するタスクT2が
起動される。タスクT2では、上記は装置内共有メモ!
JGLBを参照或いは変更し、処理結果を外部表示装置
102に表示し、更にタスクT3を起動する。タスクT
3では、共有メモIJ (J L Bのデータを外部補
助記憶装+* 103に退避する。以上のように、ジョ
ブ100内の1夏数のタスクが相互に連絡、同期をと9
ながら一つのイベントに対する処理を行う。
(These 6 jobs are usually divided into smaller tasks as the processing unit and executed. If you click online rear shift 441, the processing (job 100)
), it is divided into tasks as shown in Figure 1 and executed. That is, when an event such as the external interrupt 101 occurs, a task T1 that interrupts the seventh event is activated, and a task T2 that determines a process corresponding to the event through the processing of that task and executes it is activated. . In task T2, the above is a shared memo within the device!
JGLB is referenced or changed, the processing result is displayed on the external display device 102, and task T3 is started. Task T
3, the data of the shared memo IJ (JLB) is saved to the external auxiliary storage device +* 103.As described above, the tasks of 1 summer within the job 100 communicate with each other and synchronize.
Processing for one event at the same time.

このような処理を高速に行うための1つの方法は、虚数
の処理装置(以下CPUと略記する)を設け、CPU毎
に別のジョブを割付けて、各々のCPUが独立に各ジョ
ブの処理?実行するものかめる。こ扛v′i谷CPUが
単一ジョブだけを各時点で実行してV)るので、シング
ルジョブシステムと呼ば扛、その列を第2図に示す。同
図に於て、CPUI〜3には各々ジョブJA、JB、J
Cが割付σら6、七扛らの各ジョブはタスクTAI〜T
03等から構成さgている。シングルジョブシステムの
タスク管理方法は、谷タスク毎に実行優先順位を与え、
実行要求が発生しかつ実行可能状態にあるタスク群の中
から、最も実行優先順位の高いタスク=A択し、実行さ
せるものである。このため、合タスクの処理内容に対応
して、予め実行優先順位紮割当てておき、ジョブ盆体の
処理の流れ全軍1]呻J−る。
One method for performing such processing at high speed is to provide an imaginary number processing device (hereinafter abbreviated as CPU), assign a different job to each CPU, and have each CPU independently process each job. Think about what you want to do. Since this CPU executes only a single job at each time, it is called a single-job system, and its sequence is shown in FIG. In the same figure, CPUI~3 has jobs JA, JB, and J, respectively.
Each job of C is assigned σ et al. 6, Nachi et al. is task TAI~T
It is composed of 03 etc. The task management method of the single job system is to give execution priority to each valley task,
The task with the highest execution priority (A) is selected from among the tasks that have received an execution request and are in an executable state and are executed. For this reason, an execution priority order is assigned in advance according to the processing content of the task, and the processing flow of the job tray is determined.

とこうで、ハードウェア機器の性能向上に伴い、従来複
数台のCPUで分担していた仕事を1台のCPUでまか
なえるようになってきた。この場合、第2図に示したよ
うな複数のシングルジョブシステムをそのまま1台のC
PUに組込むことが考えら扛るが、これではジョブを単
位とした起動、停止ができない。また、同一ジョブ同タ
スク間での谷a質源の競合管理によって、他ジョブ内の
タスクに対してまで影響を及ぼすというような問題が発
生する。これを避けるために、破数のジョブをまとめて
、1つのジョブとして再構成してもよいが、それはプロ
グラムの変更等、多大な作業を必要とする。
As the performance of hardware devices has improved, it has become possible for a single CPU to perform tasks that were previously shared by multiple CPUs. In this case, multiple single job systems as shown in Figure 2 can be integrated into one computer.
I'm thinking of incorporating it into the PU, but with this, I can't start or stop jobs on a per-job basis. In addition, conflict management of the valley a quality source between the same tasks of the same job may cause problems such as affecting tasks in other jobs. In order to avoid this, it is possible to combine the broken number of jobs and reconfigure them as one job, but this requires a great deal of work such as changing the program.

マルチジョブシステムは、1台のCPUで複数のジョブ
を処理できるようにしたもので、単一のO8を設け、こ
のO8のもとにそれぞれのジョブケ処理する。この場合
のジョブはシングルジョブシステムと同一の考えで構成
することができる。
A multi-job system is a system in which a single CPU can process multiple jobs. A single O8 is provided, and each job is processed under this O8. Jobs in this case can be configured using the same concept as the single job system.

第3図はこのマルチジョブシステムを示しておシ、7ン
グルジヨブシステムでは複数のCPUにて個別に実行さ
れていたジョブJA〜JCを、1台のCPUl0で実行
させることを可能とする。このためO8は、単−CPU
内の複数のジョブに対して、ジョブ毎に起動、停止を指
令するジョブ実行11tlJ御機能を有する。また、オ
ンラインリアルタイム制御の場合には、各タスク間にて
CPU内各棟資源(主記憶装置上の共有メモリエリアG
LB。
FIG. 3 shows this multi-job system, which allows jobs JA to JC, which were individually executed by a plurality of CPUs in a seven-job system, to be executed by one CPU10. Therefore, O8 is a single-CPU
It has a job execution 11tlJ control function that instructs to start and stop each job for a plurality of jobs in the job. In addition, in the case of online real-time control, each resource in the CPU (shared memory area G on the main storage device) is
LB.

補助記は装置上の共有メモリエリアBULK、入出力装
置RI10)を時分割で共有して使用する。
The auxiliary memory uses the shared memory area BULK on the device and the input/output device RI10) in a time-sharing manner.

このため、これらの共有資源を占有るるいは解除する貸
源菅埋マクロ命令几5ERV/FREE が用意されて
いる。しかしながら共有メモリGLB上のデータを書換
えるのにこのR8ERV/FREE マクロ命令を使用
すると、そのマクロ繍令処理には対象資源に対する占有
権の確立や他からの要求の排除等に多大な手続きを必要
とし、オーバーヘッドが大きいため、従来からタスクの
優先順位に関係なく、単に他タスクからの割込みを禁止
、解除するマクロ命令ASUSP/AR8UMが使用さ
れる。このうちマクロ命令ASU8Pは、その発行タス
ク以外の全タスクを一時的に休止状態にし、マクロ命令
AR8UMは、その休止状態の解除を行う。このマクロ
命令ASUSP/AR8UM  による割込禁止。
For this reason, a macro command 5ERV/FREE for occupying or releasing these shared resources is provided. However, when this R8ERV/FREE macro instruction is used to rewrite data on the shared memory GLB, the processing of the macro instruction requires a large number of procedures such as establishing exclusive rights to the target resource and eliminating requests from others. Since the overhead is large, the macro instruction ASUSP/AR8UM has been used to simply inhibit or cancel interrupts from other tasks, regardless of the priority of the task. Among these, the macro instruction ASU8P temporarily puts all tasks other than the issuing task into a dormant state, and the macro instruction AR8UM cancels the dormant state. Interrupts by this macro instruction ASUSP/AR8UM are disabled.

解除の及ぶ範囲が、シングルジョブシステへでは単−C
PUの処理範囲、つ″!シ単−ジョブ内に制限されるの
で問題はないが、マルチジョブシステムに於ては、ンヨ
プ毎にぞの実行業務が異なっており、特定のジョブのタ
スクからのマクロ命令ASUSP/AR8UMの発行は
、池のジョブにも及び、そのタスクの実行に影響を与え
ることになり、問題が発生する。このため、マルチジョ
ブシステムでは、共有メモIJ G L Bの書換えと
いうわずかな処理の実行のためにも、実行時間の長いマ
クロ命令R8ERV/FR,EE  を使用しなくては
ならず、処理の大きなオーバーヘッドが避けられないと
いう欠点があった。
The scope of cancellation is limited to single-C for single-job systems.
There is no problem because the processing range of the PU is limited within a single job, but in a multi-job system, the execution work differs for each job, so Issuance of the macro instruction ASUSP/AR8UM extends to the Ike job and affects the execution of that task, causing a problem.For this reason, in a multi-job system, a process called rewriting the shared memo IJGLB is required. In order to execute even a small amount of processing, the macro instruction R8ERV/FR,EE, which takes a long time to execute, must be used, resulting in a drawback that a large processing overhead is unavoidable.

〔−)自明の目的〕[−) Self-evident purpose]

本発明の目的は、上記したd来技術の欠点をなりシ、単
−CPU及び単−O8構成のマルチジョブシステムに於
て、ジョブ単位でタスクからの割込−+禁止及び解除を
行えるようにし、処理のオーバーヘッドを大幅に軽減す
るだめのタスク管理方法を提供するにろる。
An object of the present invention is to overcome the above-mentioned drawbacks of the conventional technology and to enable interrupts from tasks to be inhibited and canceled on a job-by-job basis in a multi-job system with a single-CPU and single-O8 configuration. , provides a unique task management method that significantly reduces processing overhead.

〔発明の概要〕[Summary of the invention]

本発明は、ジョブ状態を管理するテーブルを設け、タス
クが共有メモリエリアへのアクセス時にはジョブ休止命
令を発行してそのタスクの属するジョブのみを上記テー
ブル上で休止状態とし、アクセス中に同一ジョブ内の他
タスクから割込みが発生しても、O8によってそのジョ
ブが休止状態ならその割込みの実行を上記アクセスが終
了するまで待たせるようにしたことを特徴とするもので
ある。
The present invention provides a table for managing job status, and when a task accesses a shared memory area, it issues a job suspension command to place only the job to which the task belongs on the above table in a suspended state, and while the task is accessing the shared memory area, the same job Even if an interrupt occurs from another task, if the job is in a dormant state by O8, the execution of the interrupt is made to wait until the access is completed.

〔発明の実施列〕[Implementation sequence of the invention]

以ド、本発明を実施列によシ説明する。本実施列では、
まず第4図に示したジョブ状態管理テーブル(JCTB
)21を設ける。これは、CPU内の各ジョブの状態(
稼動/休止/停止)を記憶するテーブルであり、その内
容に応じて次のような制御が後述するO8によシ行われ
る。即ち、稼動中の表示であれば該当ジョブ内タスクに
対する起動要求を受付け、かつ実行させる。休止中の表
示であれば該当ジョブ内タスクに対する起動要求は受付
けるが、実行は抑止する。また、停止中の表示であ゛れ
ば該当ジョブ内タスクに対する起動要求を受付けない。
The present invention will now be described by way of example. In this implementation sequence,
First, the job status management table (JCTB
) 21 is provided. This shows the status of each job in the CPU (
This is a table for storing information (operation/pause/stop), and depending on the contents, the following control is performed by O8, which will be described later. That is, if it is displayed as being running, a startup request for the task within the job is accepted and executed. If the task is displayed as being inactive, a start request for the task within the job will be accepted, but execution will be suppressed. Additionally, if the display indicates that the task is stopped, no activation request for the task within the job will be accepted.

こ1Lらのジョブの状態は、第5図に示した状態遣#図
の矢印方向へ移行でき、それはジョブ制御マクロ硝令に
よって制御される。このうち初期状態のジョブは停止中
であシ、このジョブが起動されると稼動状態へ移される
。この稼動状態から停止状態へは、該当ジョブの使用変
更、ジョブ内部の異濱発生時等に行われる。また休止状
態から停止状態への移行も、該当ジョブの使用変更等に
よシ行われ、これらの移行はそれぞれの対応したマクロ
命令の発行により行われる。第5図の稼動状態と休止状
態の間の移行制御は本発明に深く関わるものである。
The status of these 1L jobs can be shifted in the direction of the arrow in the status diagram shown in FIG. 5, and is controlled by the job control macro command. Among these, the job in the initial state is stopped, and when this job is started, it is moved to the operating state. The operation state is changed to the stopped state when the use of the job is changed or when an abnormality occurs within the job. Further, the transition from the dormant state to the stopped state is also performed by changing the use of the relevant job, etc., and these transitions are performed by issuing the respective corresponding macro instructions. The transition control between the operating state and the rest state shown in FIG. 5 is deeply related to the present invention.

体動状態から休止状態への移行は、一時的に該当ジョブ
を休止させたい時に行われ、これはある時間経過すると
、元の稼動状態へ戻さねばならない。この目的のために
、第6図に示すジョブ休止状態制御テーブル(JCBE
X)22と、ジョブ休止解除待ち行列(TCBI )2
5〜27が設けられている。このテーブル22の各ジョ
ブ対応の内容は、第6図ではジョブJCについてのみ示
しているが、当該ジョブのタスクであって、かつジョブ
体止マクロ命令を発行したもの全表示するエリア23と
、ジョブ休止解除待ち行列25〜27を指示するポイン
タ24から成っている。待ち行列25〜27にはタスク
X、Y、・・・・・・の番号が順次ポインタで接続され
て格納され、これは後述するO8によシ、実行が一時期
侍されるタスクである。
The transition from the body motion state to the dormant state is performed when it is desired to temporarily suspend the job, and after a certain period of time, the job must be returned to its original operating state. For this purpose, a job suspension state control table (JCBE) shown in FIG.
X) 22 and job suspension release queue (TCBI) 2
5 to 27 are provided. The contents of this table 22 corresponding to each job are shown only for job JC in FIG. It consists of a pointer 24 pointing to the suspension release queues 25-27. In the queues 25 to 27, the numbers of tasks X, Y, .

また本実施例では、第7図に示したようなタスク実行待
ち行列(TCB2)29〜31とそれを指示するポイン
タ(几QPB)28を用いる。この侍ち行列29〜31
は、タスクの優先順位0.1゜2、・・・・・・毎に、
起動要求があったものを順にポインタで接続して表示す
るもので、そのタスクがどのジョブに属していても、C
PUは1台でめるから、同じ待ち行列に表示される。従
ってポインタ28もジョブには関係なく、タスクの浸先
順位毎のポインタから成っている。例えば、第7図のよ
うに、優先順位lのポインタはジョブJAのタスクX1
続いてジョブJBのタスクYを表示してぃる。
Further, in this embodiment, task execution queues (TCB2) 29 to 31 and a pointer (QPB) 28 for pointing them are used as shown in FIG. This samurai procession 29-31
For each task priority of 0.1゜2,...
It connects and displays tasks that have been requested to start in order using pointers, and regardless of which job the task belongs to, C
Since only one PU can be installed, they will be displayed in the same queue. Therefore, the pointer 28 is also independent of jobs and consists of pointers for each task priority. For example, as shown in FIG. 7, the pointer with priority l is task X1 of job JA.
Next, task Y of job JB is displayed.

以上に示したテーブル21,22、ポインタ28、待ち
行列25〜31を用いて、O8は第8図のフローチャー
トに示しだタスク実行制御を行う。むろんO8は、この
他に入出力制御や他のシステム°a理機能を持つが、こ
れらは従来のものでよい。このタスク実行制御プログラ
ムが起動されるのは、(1)実行中のタスクが終了した
時、(2)実行中のタスクがCPU内各種資源の空待ち
になった時、(3)入出力1tlJ御要求を発行して、
その入出力制御の終了待ちになった時、或いは(4)外
部割込み等によって実行中のタスクよりも優先順位の高
いタスクが起動された時でるる。そして起動されると、
まずステップ40にてポインタ28の指示するタスク実
行待ち行列29〜31をサーチし、優先順位が最も1°
、ゐく、址だ同−優先順位内に於ては先着r# VCS
ぞのタスクが実行可能か否かをしらべ、最初に実行可能
であったものを選択する。但しここでいう美行rjJ能
とは、レリえば第8図のプログラムの起動条件で述べた
各種資源の空き待ちや入出力制御終了待ちのため、再び
タスク実行待ち行列29〜31へ戻されたタスクの場合
、その侍ち条件がステップ40実行時に解消しているこ
とを意味している。そしてこのような判定はO8一般の
機能であって、後述するステップ41での実行可否の判
定とは別のものである。次に、ステップ40で選択され
たタスクに対して、そのタスクの所属するジョブの状態
判定をステップ41で行う。
Using the tables 21, 22, pointer 28, and queues 25 to 31 shown above, O8 performs task execution control as shown in the flowchart of FIG. Of course, the O8 also has input/output control and other system management functions, but these may be conventional ones. This task execution control program is started (1) when the currently executing task ends, (2) when the currently executing task becomes idle for various resources within the CPU, and (3) when the input/output 1tlJ Issue your request,
This occurs when the input/output control is waiting for completion, or (4) when a task with a higher priority than the currently executing task is activated due to an external interrupt or the like. And when started,
First, in step 40, the task execution queues 29 to 31 indicated by the pointer 28 are searched, and the task execution queues 29 to 31 indicated by the pointer 28 are searched and
, I'm here - first come first served in priority order. VCS
Check whether each task is executable or not, and choose the first one that is executable. However, Miyuki RJJ Noh referred to here means that the task is returned to the task execution queue 29 to 31 because it is waiting for various resources to become available or for input/output control to be completed as described in the program startup conditions in Figure 8. In the case of a task, this means that its attendance condition has been resolved when step 40 is executed. Such a determination is a general function of O8, and is different from the determination of whether or not execution is possible in step 41, which will be described later. Next, for the task selected in step 40, the status of the job to which the task belongs is determined in step 41.

このステップ41の詳細は第9図に示されておシ、まず
ステップ411で今タスク実行待ち行列29〜31から
選択したタスクの属するジョブ番号を取り出し、ステッ
プ412では第4図で示したンヨプ状態管理テーブル2
1をサーチして、この当該ジョブの状態をしらべる。そ
の結果そのジョブが稼動中の場合は次のステップ42へ
移る。またそのジョブが休止中の場合は更に次のステッ
プ413で、ステップ40で選択されたタスクが、それ
の属するジョブを休止にさせたタスクか否かを、第6図
に示したジョブ休止状態制御テーブル22のエリア23
をしらべることによシ判定し、休止にさせたタスクの時
はやはり次のステップ42へ移る。ステップ42へ移っ
た場合には、ステップ40でA択されたタスクを実行可
能とし、そのタスクに上記1意装(kのエリアを割当(
、更にステップ43でそのタスク実行に必要なレジスタ
類の初期設定(新起動時)、或いは回復処理(中断後の
再起動時)を行い、以後の制御を当該タスクに引渡す。
The details of this step 41 are shown in FIG. 9. First, in step 411, the job number to which the currently selected task belongs is retrieved from the task execution queues 29 to 31, and in step 412, the job number to which the task currently selected belongs is retrieved. Management table 2
1 and find out the status of this job. As a result, if the job is in operation, the process moves to the next step 42. If the job is suspended, in the next step 413, the job suspension state control shown in FIG. Area 23 of table 22
It is determined by examining the task, and if the task has been suspended, the process moves to the next step 42. When the process moves to step 42, the task selected A in step 40 is made executable, and the above-mentioned area 1 (k) is assigned to the task (
Further, in step 43, initial settings of registers necessary for the execution of the task (at the time of new startup) or recovery processing (at the time of restart after interruption) are performed, and subsequent control is handed over to the task.

一万、第9図のステップ412.413の判定の結果、
ステップ40で選択されたタスクが属するジョブが休止
中で、かつそのタスクが当該ジョブにジョブ休止マクロ
命令を発行したタスクではない場叶には、ポインタ24
に従ってそのタスクをジョブ休止解除待ち行列25〜2
7に接続し、ジョブ休止解除待ち状態にする。そして次
の実行司能なタスクを探すため、ステップ40へ戻る。
10,000, as a result of the determination in steps 412 and 413 in Figure 9,
If the job to which the task selected in step 40 belongs is suspended, and the task is not the task that issued the job suspension macro instruction to the job, the pointer 24
The task is placed in the job suspension release queue 25-2.
7 and put the job into a standby state. Then, the process returns to step 40 to search for the next executable task.

次に、以上の第8図、第9図で説明したタスク実行制御
プログラムのサポートによって、共有メモリエリアの書
換え等が、従来のマクロ命令AsUSP/AR8UMと
同、峠なマクロ命令によシ容易に行えることを示す。こ
の共有メモリエリアの読み書き(アクセス)が問題にな
るのは、そのエリアの内容は同一ジョブ内の複数タスク
からアクセスされるから、列えばタスクTAのあるステ
ップで書換えた後にタスクTBのあるステップでそれを
読み出す、というようなアクセスの順序が守られた時に
は正しく動作するが、この順序が狂うと誤った結果を生
じる場合がある。しかるに、タスクの優先順位の関係か
ら、タスクTBの割込みによシこの順序が狂うことがあ
り、これを防止する必要があるからである。そこで共有
メモリエリアをメス21人がアクセスfる時には、第1
0図に示すように、七のアクセスに先立ってタスクTA
がジョブ休止マクロ命令を発行し、アクセス終了後にジ
ョブ休止M除マクロ命令を発行する。このうち、ジョブ
休止マクロ命令は第11図に示される処理を行う。νi
5、まずステップ61で、このマクロ命令を発行したタ
スクTAの属するジョブの状態をジョブ状態管理テーブ
ル21を参照してしらべ、稼動中でない時は何もせずに
終る。稼動、中でめった時はステップ62へ移シ、ジョ
ブ状態財理テーブル210当該ジョブを休止中の表示に
変更する。続いてステップ63では、タスクTAの番号
を、ジョブ休止状態制御テーブル22の、当該ジョブに
対応するエリア23に登録し、第10図の次のステップ
、即ち共有メモリエリアへのアクセスに+−iる。そこ
で、もしこのアクセス動1乍の途中で、同一ジョブ内の
よりm先順位の高い他タスクT Bが起動されて割込み
が発生したとする。そうすると前述したように第8図の
タスク実行I問御プログラムが起動されるが、ここでは
そのタスクTBの属するジョブはタスクTAのそれと同
じだから、先に発行されたジョブ休止マクロ命令によシ
体止中の表示がジョブ状態g理テーブル21に設定δれ
ている。従って第8図のステップ41内のステップ41
2,413(第9図)の判定により、この刷込み要求を
発生したタスクTBはステップ414でジョブ休止解除
待ち行列25〜27へ=qれ、その実行は当該ジョブの
休止状態が解除されるまで行われない。そして共有メモ
リエリアへのアクセスをタスクTAが続行できる。
Next, with the support of the task execution control program explained in FIGS. 8 and 9 above, rewriting of the shared memory area, etc. can be easily performed using a simple macro instruction like the conventional macro instruction AsUSP/AR8UM. Show what you can do. Reading and writing (accessing) this shared memory area becomes a problem because the contents of that area are accessed by multiple tasks within the same job, so if task TA is rewritten in a certain step, then task TB is rewritten in a certain step. If the order of access, such as reading data, is maintained, it will operate correctly, but if this order is out of order, incorrect results may occur. However, due to the priority order of tasks, this order may be disrupted by an interrupt from task TB, and it is necessary to prevent this. Therefore, when 21 females access the shared memory area, the first
As shown in Figure 0, prior to accessing task TA
issues a job suspension macro instruction, and after the access is completed, issues a job suspension M removal macro instruction. Among these, the job suspension macro instruction performs the processing shown in FIG. νi
5. First, in step 61, the status of the job to which the task TA that issued this macro instruction belongs is checked with reference to the job status management table 21, and if it is not running, the process ends without doing anything. If the job is rarely in operation, the process moves to step 62, and the job status financial table 210 changes the display to indicate that the job is inactive. Subsequently, in step 63, the number of the task TA is registered in the area 23 corresponding to the job in the job suspension state control table 22, and the next step in FIG. Ru. Suppose, therefore, that another task TB in the same job that is m ahead in rank is activated and an interrupt occurs during this one access operation. Then, as mentioned above, the task execution I inquiry program shown in FIG. The indication that the job is stopped is set in the job status management table 21. Therefore, step 41 in step 41 of FIG.
Based on the determination in step 2,413 (FIG. 9), the task TB that has issued this imprint request is placed in the job pause release queues 25 to 27 in step 414, and its execution is continued until the job is released from the pause state. Not done. Task TA can then continue accessing the shared memory area.

従って、同一ジョブ内他タスクTBにより、共有メモリ
エリアの内容が誤って書換えられることは防止される。
Therefore, the contents of the shared memory area are prevented from being erroneously rewritten by other tasks TB within the same job.

タスクTAの共有メモリエリアへのアクセスが終了する
と、第10図のジョブ休止解除マクロ命令をタスクTA
が発行する。これは第12図に示すように、ステップ6
4で当該ジョブが現在休止中であることを確認し、続い
てステップ65では、ジョブ休止命令発行時に登録した
ジョブ休止状態制御テーブル220当該エリア23のタ
スクTAの番号をクリアーし、またジョブ休止解除待ち
行列25〜27に登録したタスクTBが実行待ち行列2
9〜31へ移され、実行待ちとなる。
When task TA finishes accessing the shared memory area, task TA issues the job suspension release macro command shown in Figure 10.
Published by. This is done in step 6 as shown in Figure 12.
In step 4, it is confirmed that the job is currently suspended, and then in step 65, the number of the task TA in the area 23 of the job suspension state control table 220 that was registered when the job suspension command was issued is cleared, and the job suspension is released. Task TBs registered in queues 25 to 27 are in execution queue 2.
9 to 31 and waits for execution.

なお、マルチジョブシステムのマクロ命令ASUSP及
びAR8UMの処理を、第11図及び第12図で示した
ジョブ休止マクロ命令及びジョブ休止解除マクロ命令と
それぞれ機能的に同一とすれば、従来のプログラムを変
更することなく、シングルジョブシステムからマルチジ
ョブシステムへの移行を行うことができる。
Note that if the processing of the macro commands ASUSP and AR8UM of the multi-job system are functionally the same as the job suspension macro command and the job suspension release macro command shown in FIGS. 11 and 12, the conventional program can be changed. You can migrate from a single-job system to a multi-job system without having to

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

以上の実施列から明らかなように、本発明によれば、あ
るタスクからの割込み抑止1wI除を当該ジョブ内だけ
に対して有効なものとすることができるので、僅数ジョ
ブの時分割処理を小さいオーバーヘッドで効率よく行え
るという効果が’> D %また従来のシングルジョブ
システムの命令をそのまま用いて、高速ハードウェアに
よる単一〇PUのマルチジョブシステムを構成できると
いう効果がある。
As is clear from the above implementation sequence, according to the present invention, interrupt suppression from a certain task can be made effective only within that job, so time-sharing processing of only a few jobs can be performed. There is an effect that the process can be performed efficiently with small overhead.Also, there is an effect that a multi-job system of a single PU using high-speed hardware can be configured by using the instructions of a conventional single-job system as is.

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

第1図はオンラインリアルタイム制御での処理列を示す
図、第2図はシングルジョブシステムの説明図、第3図
はマルチジョブシステムの説明図、第4図及び第6図は
本発明に用いるジョブ状態管理テーブル及びジョブ休止
解除待ち行列の例を示す図、第5図はマルチジョブシス
テムに於るジョブの状態遷移を示す図、第7図は起動要
求の発行きれているタスクのCPU空き待ち行列を示す
図、第8図はタスク実行制御osプログラムの実施列を
示すフローチャート、第9図は第8図中のジョブ状態判
定処理部の詳細を示すフローチャート、第10図はジョ
ブ休止及び休止解除マクロ命令の使用法を示す図、第1
1図及び第12図はジョブ休止及び休止解除マクロ命令
の処理内容を示すフローチャートである。 21・・・ジョブ状態管理テーブル、22・・・ジョブ
休止状態制御テーブル、23・・・休止命令発行タスク
エリア、24・・・ポインタ、25〜27・・・ジョブ
休止解除待ち行列、28・・・実行待ち行列ポインタ、
29〜31・・・タスク実行待ち行列。 代理人 升埋士 秋本正実 業 1 (2) 第20 ¥3[21 O ¥4霞 1 第5喝 竿乙図 2 γ7図 Q 某lO図 CテΣコ 葉 11  口 $ 12(2)
Fig. 1 is a diagram showing a processing sequence in online real-time control, Fig. 2 is an explanatory diagram of a single job system, Fig. 3 is an explanatory diagram of a multi-job system, and Figs. 4 and 6 are diagrams showing jobs used in the present invention. A diagram showing an example of a state management table and a job suspension release queue, FIG. 5 is a diagram showing job state transition in a multi-job system, and FIG. 7 is a CPU free queue of tasks for which activation requests have been issued. FIG. 8 is a flowchart showing the execution sequence of the task execution control OS program, FIG. 9 is a flowchart showing details of the job status determination processing section in FIG. 8, and FIG. 10 is a macro for job suspension and suspension cancellation. Diagram illustrating the usage of instructions, 1st
1 and 12 are flowcharts showing the processing contents of job suspension and suspension release macro commands. 21... Job state management table, 22... Job suspension state control table, 23... Pause command issuing task area, 24... Pointer, 25-27... Job suspension release queue, 28...・Execution queue pointer,
29-31...Task execution queue. Agent: Mr. Tadashi Akimoto Jitsugyo 1 (2) No. 20 ¥3 [21 O ¥4 Kasumi 1 5th Cheer Rod Otsu Figure 2 γ7 Figure Q Certain lO Figure C Tee Σ Koha 11 Mouth $ 12 (2)

Claims (1)

【特許請求の範囲】[Claims] ■1合々がfi畝のタスクからなる破以1尚のジョブ金
タスク単位で時分割処理する単一処理装置、単一オペレ
ーデイ/グ/ステム溝成のシステムでのタスクぎ埋方法
にU5て、ジョブの各々が停止状態か体動、tK態かあ
るいは一時的な休止状態かを表示する記憶デープルと、
上記稼動状態のジョブを休止状態に変更するための休止
命令と、上記休止状:際のンヨブを稼jjl+状態に変
更するための解除而令と、タスクの1つが起動された時
に、その起動タスクが実行町11ヒてうってもその起動
タスクの属するンヨプが上記記憶テーブル上で休止状態
に表示されていてかつその起動タスクが上記休止命令を
元イ丁したものでない、;場合、かつその場合のみその
起動タスクの実行勿禁止する機能をMした、オペレーテ
ィングシステムに設けられたタスク実行制Hillプロ
グラムとklliifえるとともに、任意のタスクは、
そのタスクの属する所属ジョブ内の他タスクと共有する
メモリエリアへアクセスする時には、該アクセスに先立
って上記休止面金を発行して上記所属ジョブを休止状態
とすることによって、上記アクセス中に上記所属ジョブ
中の他タスクからの割込みを上記タスク実行制呻プログ
ラムのサポートによυ基土し、上記アクセス終了後に上
記解除−#嘘全発行して上記所属ジョブケ稼動状態へ戻
し、かくして同一ジョブ内のタスクの上記共有メモリエ
リアへのアクセス制御を行うようにしたことを+f漱と
するタスク管理方法。
■U5 describes how to fill up tasks in a system with a single processing device and a single operating system that performs time-sharing processing in units of tasks. , a memory table displaying whether each job is in a stopped state, body movement, tK state, or temporary rest state;
A suspension command to change the above-mentioned running job to the dormant state, a cancellation command to change the above-mentioned suspended job to the working state, and when one of the tasks is started, the activation task. Even if the execution task 11 is called, the task to which the activated task belongs is displayed in the dormant state on the memory table, and the activated task is not the one based on the suspended command; and in that case. In addition to the task execution system Hill program provided in the operating system, which has the function of prohibiting the execution of the activated task, any task can be
When accessing a memory area that is shared with other tasks in the job to which the task belongs, the job to which the task belongs will be placed in a dormant state by issuing the above-mentioned suspension money prior to the access. Interrupts from other tasks in the job are handled by the support of the task execution control program mentioned above, and after the above access is completed, the above-mentioned release-# lie is issued to return the above-described job to the operating state. A task management method having an additional advantage of controlling access of tasks to the shared memory area.
JP3725183A 1983-03-09 1983-03-09 Task control method Granted JPS59163647A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3725183A JPS59163647A (en) 1983-03-09 1983-03-09 Task control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3725183A JPS59163647A (en) 1983-03-09 1983-03-09 Task control method

Publications (2)

Publication Number Publication Date
JPS59163647A true JPS59163647A (en) 1984-09-14
JPH0457022B2 JPH0457022B2 (en) 1992-09-10

Family

ID=12492415

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3725183A Granted JPS59163647A (en) 1983-03-09 1983-03-09 Task control method

Country Status (1)

Country Link
JP (1) JPS59163647A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61289433A (en) * 1985-06-18 1986-12-19 Nec Corp Information processor
JPH06284458A (en) * 1992-04-30 1994-10-07 Rockwell Internatl Corp Telephone switching system having system and method for accessing user-controlled data memory

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61289433A (en) * 1985-06-18 1986-12-19 Nec Corp Information processor
JPH0556539B2 (en) * 1985-06-18 1993-08-19 Nippon Electric Co
JPH06284458A (en) * 1992-04-30 1994-10-07 Rockwell Internatl Corp Telephone switching system having system and method for accessing user-controlled data memory

Also Published As

Publication number Publication date
JPH0457022B2 (en) 1992-09-10

Similar Documents

Publication Publication Date Title
EP3039540B1 (en) Virtual machine monitor configured to support latency sensitive virtual machines
JP3546678B2 (en) Multi-OS configuration method
CN105579961B (en) Data processing system, operating method and hardware unit for data processing system
US6711605B2 (en) Multi OS configuration method and computer system
US6233599B1 (en) Apparatus and method for retrofitting multi-threaded operations on a computer by partitioning and overlapping registers
US6834385B2 (en) System and method for utilizing dispatch queues in a multiprocessor data processing system
US8572624B2 (en) Providing multiple quiesce state machines in a computing environment
US7661115B2 (en) Method, apparatus and program storage device for preserving locked pages in memory when in user mode
JP2005284749A (en) Parallel computer
JP2003531434A (en) Computer method and system for executing a Java computer program
US5893159A (en) Methods and apparatus for managing scratchpad memory in a multiprocessor data processing system
US20050066149A1 (en) Method and system for multithreaded processing using errands
JP4026667B2 (en) Multi-OS configuration method
US7225443B2 (en) Stack usage in computer-related operating systems
US8010963B2 (en) Method, apparatus and program storage device for providing light weight system calls to improve user mode performance
KR20230121884A (en) Address Mapping Aware Tasking Mechanism
KR102003721B1 (en) GPU Kernel transactionization method and computing device
JP2001216172A (en) Multi-os constituting method
JPS59163647A (en) Task control method
JPH065515B2 (en) Method and computer system for reducing cache reload overhead
US5918243A (en) Computer mechanism for reducing DASD arm contention during parallel processing
JPH07129518A (en) Computer system
CN114035847A (en) Method and apparatus for parallel execution of core programs
JPS603229B2 (en) Information processing method
JPS63296162A (en) Task schedule system for multi-processor system