JPH06242968A - Task stopping method in man-machine interface - Google Patents

Task stopping method in man-machine interface

Info

Publication number
JPH06242968A
JPH06242968A JP5501593A JP5501593A JPH06242968A JP H06242968 A JPH06242968 A JP H06242968A JP 5501593 A JP5501593 A JP 5501593A JP 5501593 A JP5501593 A JP 5501593A JP H06242968 A JPH06242968 A JP H06242968A
Authority
JP
Japan
Prior art keywords
task
stopped
chain
request
tcb
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP5501593A
Other languages
Japanese (ja)
Inventor
Akio Nakamura
彰雄 中村
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.)
Yaskawa Electric Corp
Original Assignee
Yaskawa Electric 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 Yaskawa Electric Corp filed Critical Yaskawa Electric Corp
Priority to JP5501593A priority Critical patent/JPH06242968A/en
Publication of JPH06242968A publication Critical patent/JPH06242968A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To prevent the delay of screen extension by forcibly stopping a stoppage object task by a realtime multi-task OS (abbreviated simply as OS hereafter) when a task stopping request is generated. CONSTITUTION:The OS checks the I/O waiting conditions of the stoppage object task and sets an I/O request cancellation flag when it is waiting for I/O. Then, the resource acquisition conditions of the stoppage object task are checked and resources are released when the acquired resources are present. Finally, the chain connection conditions of the task control block (abbreviated as TCB hereafter) of a stopped task are checked, and when a chain is connected, the TCB is cut off from the chain, the TCB is initialized and the new task is switched and thus, a task stopping processing is completed.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は鉄鋼・化学・製紙プラン
ト等の監視システムとして用いられ、リアルタイム・マ
ルチタスクOS(以下単にOSと略)の下で動作するマ
ンマシン・インタフェースに係り、特にそのタスク停止
方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a man-machine interface operating under a real-time multitasking OS (hereinafter simply referred to as OS), which is used as a monitoring system for steel / chemical / papermaking plants and the like. Regarding the method of stopping tasks.

【0002】[0002]

【従来の技術】従来、マンマシン・インタフェースにお
けるタスクの停止方法は、図5に示すように、あるタス
クに停止要求が発生した場合、停止対象タスクが停止要
求を受けて獲得資源の解放等の終了処理をおこなった
後、OSのタスク停止処理をコールすることにより停止
対象タスクが停止するというものであった。
2. Description of the Related Art Conventionally, as shown in FIG. 5, a method of stopping a task in a man-machine interface is such that when a stop request is issued to a certain task, the stop target task receives the stop request and releases the acquired resources. After the termination processing is performed, the task to be stopped is stopped by calling the task stop processing of the OS.

【0003】[0003]

【発明が解決しようとする課題】ところが、従来技術で
は、停止対象タスクがタスクの通常処理(図5の2)の
中で、I/Oウェイト状態や資源獲得待ち状態にある場
合、前記の終了処理は停止処理が実行できないためタス
クを停止することができず、その後の画面展開などが遅
れるという問題があった。そこで、本発明はタスクの停
止要求が発生した場合に、OSが停止対象タスクを強制
停止することにより上記の画面展開の遅れを防止するこ
とを目的とするものである。
However, in the conventional technique, when the task to be stopped is in the I / O wait state or the resource acquisition waiting state in the normal processing of the task (2 in FIG. 5), the above-mentioned termination is performed. There is a problem that the task cannot be stopped because the stop processing cannot be executed and the subsequent screen development is delayed. Therefore, an object of the present invention is to prevent the above delay of screen development by forcibly stopping the task to be stopped by the OS when a task stop request is issued.

【0004】[0004]

【課題を解決するための手段】上記の問題を解決するた
め、本発明は図1に示す処理手順によりタスクを強制停
止する。すなわち、OSは停止対象タスクのI/Oウェ
イト状況をチェックし(図1の15)、I/Oウェイト
中であればI/O要求キャンセルフラグをセットする
(図1の16)。次に、停止対象タスクの資源獲得状況
をチェックし(図1の17)、獲得中の資源があればそ
の資源を解放する(図1の18)。最後に停止タスクの
タスクコントロールブロック(以下TCBと略)のチェ
イン接続状況をチェックし(図1の19)、チェインが
接続中であればTCBをチェインから切断し(図1の2
0)、TCBの初期化を行い(図1の21)、新たなタ
スクに切り替える(図1の22)ことにより、タスク停
止処理を完了する。
In order to solve the above problems, the present invention forcibly stops a task by the processing procedure shown in FIG. That is, the OS checks the I / O wait status of the task to be stopped (15 in FIG. 1), and sets the I / O request cancel flag if the I / O wait is in progress (16 in FIG. 1). Next, the resource acquisition status of the task to be stopped is checked (17 in FIG. 1), and if there is a resource being acquired, that resource is released (18 in FIG. 1). Finally, the chain connection status of the task control block (abbreviated as TCB below) of the stopped task is checked (19 in FIG. 1), and if the chain is connected, the TCB is disconnected from the chain (2 in FIG. 1).
0), the TCB is initialized (21 in FIG. 1), and the task is switched to a new task (22 in FIG. 1) to complete the task stop processing.

【0005】[0005]

【作用】上記手段により、OSがタスクの停止要求を受
けて、タスクのI/O要求キャンセル処理や、資源解放
処理を実行した後、停止対象タスクのTCBを初期化し
て強制停止することにより、停止対象タスクの状態に関
係なくタスクは直ちに停止される。
By the above means, the OS receives the task stop request, executes the task I / O request cancel processing and the resource release processing, and then initializes the TCB of the stop target task and forcibly stops it. The task is immediately stopped regardless of the state of the task to be stopped.

【0006】[0006]

【実施例】以下、本発明の実施例を図に基づいて説明す
る。図2はI/O要求のキャンセル処理(図1の16)
の詳細を説明するための図である。図2において、アプ
リケーション・タスク(26)でI/O要求が発生する
と、アプリケーションタスク(26)すなわち要求元タ
スク(26)は、I/O要求情報バッファ(27)にI
/O要求パラメータ(29)、要求元タスク番号(2
8)をセットする。以下図2に基づいて1/O管理タス
クの処理を説明する。図3は1/O管理タスクの処理を
フロー図にしたものである。I/O管理タスク(25)
は、I/O要求情報バッファ(27)をチェックし、要
求がセットされていればI/O要求ペラメータ(29)
を読みだしその内容に従ってI/O処理を実行する。た
だし、この時タスク停止情報(30)にタスク停止がセ
ットされていれば、要求元タスクは既に停止していると
判断してI/O処理は実行しない。実行が終了するとI
/O要求元タスク番号(28)をチェックし、要求元タ
スク(26)に終了を通知する。ただし、この時タスク
停止情報(30)にタスク停止がセットされていれば、
要求元タスクは既に停止していると判断して終了通知は
しない。OS(24)は、タスク停止要求が発生した際
に、I/O要求情報バッファ(27)の要求元タスク番
号(28)をチェックして、停止対象タスクがI/O要
求を発行していれば、タスク停止情報(30)をセット
して、I/O要求の無効を通知する。これらの処理によ
り、停止対象タスクがI/Oウェイト中の場合もOS
は、停止情報をセットするだけで直ちに停止対象タスク
を停止する事が可能である。また、図4は獲得資源の解
放処理(図1の18)の詳細を説明するための図であ
る。あるタスクが強制的に停止された場合、タスクが獲
得していた資源を解放できずに停止してしまう可能性が
ある。このためOSは、タスクを停止させる際に、その
タスクが獲得している資源を検索し、獲得している資源
があれば、解放する処理が必要である。このため図4の
41に示すように、各資源獲得チェインに資源獲得中の
タスク番号の情報を追加する。これにより、停止対象タ
スクが獲得した資源をOSが解放する事が可能である。
これらの処理に引き続き、TCBをチェインから切断
(図1の20)が行われる。停止対象タスクのTCBを
チェインから切断し、TCBの初期化を行い、タスクチ
ェンジを実行する事で、タスクの停止が完了する。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 2 shows I / O request cancellation processing (16 in FIG. 1).
FIG. 6 is a diagram for explaining the details of FIG. In FIG. 2, when an I / O request is generated in the application task (26), the application task (26), that is, the request source task (26) stores an I / O request information buffer (27) in the I / O request information buffer (27).
/ O request parameter (29), request source task number (2
8) Set. The processing of the 1 / O management task will be described below with reference to FIG. FIG. 3 is a flowchart showing the processing of the 1 / O management task. I / O management task (25)
Checks the I / O request information buffer (27), and if the request is set, I / O request parameter (29)
Is read and I / O processing is executed according to the contents. However, at this time, if the task stop information (30) is set to task stop, it is determined that the request source task has already stopped, and the I / O processing is not executed. I when the execution is completed
The / O request source task number (28) is checked, and the request source task (26) is notified of the end. However, if task stop information (30) is set to task stop at this time,
It is judged that the request source task has already stopped, and no completion notification is issued. When a task stop request is issued, the OS (24) checks the request source task number (28) of the I / O request information buffer (27) so that the stop target task has issued the I / O request. For example, the task stop information (30) is set to notify the invalidity of the I / O request. By these processes, even if the task to be stopped is in I / O wait, the OS
Can immediately stop the task to be stopped simply by setting the stop information. Further, FIG. 4 is a diagram for explaining details of the acquisition resource release processing (18 in FIG. 1). When a task is forcibly stopped, the resources that the task had acquired may not be released and may be stopped. Therefore, the OS needs to perform a process of searching a resource acquired by the task and releasing the acquired resource when the task is stopped. Therefore, as indicated by reference numeral 41 in FIG. 4, information on the task number of the resource being acquired is added to each resource acquisition chain. As a result, the OS can release the resources acquired by the task to be stopped.
Following these processes, the TCB is disconnected from the chain (20 in FIG. 1). The task stop is completed by disconnecting the TCB of the task to be stopped from the chain, initializing the TCB, and executing the task change.

【0007】[0007]

【発明の効果】以上述べたように、発明によれば、マン
マシン・インタフェースのタスク停止処理において、O
Sが停止対象タスクのI/Oキャンセル処理や、獲得資
源の解放処理を実行する事から、停止対象タスクの状態
に関わらず直ちに停止処理が実行できるため、タスク停
止処理の遅れにともなう、画面切り替えの遅れがなくな
る。
As described above, according to the invention, in the task stop processing of the man-machine interface, O
Since S executes the I / O cancel processing of the stop target task and the release processing of the acquired resource, the stop processing can be executed immediately regardless of the state of the stop target task. Therefore, the screen is switched due to the delay of the task stop processing. There will be no delay.

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

【図1】本発明によるタスク停止処理のフローFIG. 1 is a flow of task stop processing according to the present invention.

【図2】I/O実行処理FIG. 2 I / O execution processing

【図3】I/O管理タスクの処理フロー[FIG. 3] Processing flow of I / O management task

【図4】資源獲得チェインの構造[Figure 4] Structure of resource acquisition chain

【図5】従来の技術によるタスク停止処理のフローFIG. 5: Flow of task stop processing according to conventional technology

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 リアルタイム・マルチタスクOSの下
で動作するマンマシン・インタフェースにおいて、OS
が以下の手順でアプリケーション・タスクを強制的に停
止させることを特徴とするマンマシン・インタフェース
におけるタスクの停止方法。 1)OSは停止対象タスクのI/Oウェイト状況をチェ
ックし、I/Oウェイト中であれば、I/O要求キャン
セルフラグをセットする。 2)次に、停止対象タスクの資源獲得状況をチェック
し、獲得中の資源があればその資源を解放する。 3)最後に停止対象タスクのタスクコントロールブロッ
クのチェイン接続状況をチェックし、チェインが接続中
であればタスクコントロールブロックをチェインから切
断し、タスクコントロールブロックの初期化を行い、新
たなタスクに切り替えることにより、タスク停止処理を
完了する。
1. A man-machine interface operating under a real-time multitasking OS, comprising:
A method of stopping a task in a man-machine interface, characterized in that the application task is forcibly stopped by the following procedure. 1) The OS checks the I / O wait status of the task to be stopped, and sets the I / O request cancel flag if the I / O wait is in progress. 2) Next, the resource acquisition status of the task to be stopped is checked, and if any resource is being acquired, that resource is released. 3) Finally, check the chain connection status of the task control block of the task to be stopped, disconnect the task control block from the chain if the chain is connected, initialize the task control block, and switch to a new task. This completes the task stop processing.
JP5501593A 1993-02-19 1993-02-19 Task stopping method in man-machine interface Pending JPH06242968A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5501593A JPH06242968A (en) 1993-02-19 1993-02-19 Task stopping method in man-machine interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5501593A JPH06242968A (en) 1993-02-19 1993-02-19 Task stopping method in man-machine interface

Publications (1)

Publication Number Publication Date
JPH06242968A true JPH06242968A (en) 1994-09-02

Family

ID=12986840

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5501593A Pending JPH06242968A (en) 1993-02-19 1993-02-19 Task stopping method in man-machine interface

Country Status (1)

Country Link
JP (1) JPH06242968A (en)

Similar Documents

Publication Publication Date Title
EP0709777B1 (en) Method of and apparatus for debugging multitask programs
US5721922A (en) Embedding a real-time multi-tasking kernel in a non-real-time operating system
US7360221B2 (en) Task swap out in a multithreaded environment
US6006247A (en) Method and system for scheduling threads and handling exceptions within a multiprocessor data processing system
US5903752A (en) Method and apparatus for embedding a real-time multi-tasking kernel in a non-real-time operating system
JP2003518286A (en) System and method for providing a pool of reusable threads for performing queued work items
US20100138685A1 (en) Real-Time Signal Handling In Guest And Host Operating Systems
US7360223B2 (en) Arrangements and methods for invoking an upcall in a computer system
CA2332769C (en) Method and apparatus for introducing and modifying telecommunications services
JPH06242968A (en) Task stopping method in man-machine interface
US7296272B2 (en) System in which a first program written in one programming language can interact and access a second program written in a different programming language
JP2693916B2 (en) Task scheduling method
JPH0793182A (en) Program tracing method
JPH02220138A (en) Interruption protecting system for real time operating system
JPH09160790A (en) Device and method for task schedule
JPH03122753A (en) Processor control system
JPH03248231A (en) Multitask exclusive control method
WO1996018152A1 (en) An improved method and apparatus for embedding a real-time multi-tasking kernel in a non-real-time operating system
JPH06149615A (en) Event recording system
JP2822728B2 (en) Computer system
KR100289039B1 (en) Method for executing control of process in cross debugging server
JPH05108376A (en) Computer system
JP2581327B2 (en) Virtual machine I / O interrupt handling method
JPH0449146B2 (en)
JPH0378072A (en) Spin lock system for multiprocessor system