JPH0328933A - Task control method - Google Patents

Task control method

Info

Publication number
JPH0328933A
JPH0328933A JP16300389A JP16300389A JPH0328933A JP H0328933 A JPH0328933 A JP H0328933A JP 16300389 A JP16300389 A JP 16300389A JP 16300389 A JP16300389 A JP 16300389A JP H0328933 A JPH0328933 A JP H0328933A
Authority
JP
Japan
Prior art keywords
task
interruption
interrupt
control
kernel
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
JP16300389A
Other languages
Japanese (ja)
Inventor
Atsushi Sugano
淳 菅野
Keiichiro Kuwatsuru
桑鶴 敬一郎
Toshihiko Sone
俊彦 曽根
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP16300389A priority Critical patent/JPH0328933A/en
Publication of JPH0328933A publication Critical patent/JPH0328933A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To facilitate the development of an interruption driver soft by handling the interruption driver soft equivalently to a general application task with the use of a means which handles an external interruption signal via an OS kernel and an interruption task control table. CONSTITUTION:The interruption signal produced from an external input/output device 2 is transmitted to a real time operating system OS kernel 3. Then the task control 4 is started, and the preferential level of an interruption task 7 is taken out and compared with the preferential level of the working task by referencing to an interruption control table 5 and a control block belonging to the corresponding task 7. Then the task corresponding to the preferential level is carried out. thus the control is shifted to the task 7 under the control of the kernel 3 and the control 4, and the corresponding interruption process is carried out. Consequently, an interruption processing program is easily developed.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は計算機システムにおける割り込み制御をするた
めのタスク制御方法に関するものである。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a task control method for controlling interrupts in a computer system.

従来の技術 従来よシ、タスクや割り込みを制御するために、リアル
タイムオペレーティングシステム(OS)t使用してい
るが、ここではタスクと割り込み処理プログラムを明確
に分離して制御している。たとえば、第4図に従来技術
によるタスク制御方法を意された割ジ込みドライバ13
に制御が渡シ、個別の割り込み処理がなされ、その後O
Sカーネルl4を経て割り込み処理から戻る。すなわち
割り込みドライバ13は非タスクプログラムとして取υ
扱われ、一般のタスクとは独立に管理されている。
2. Description of the Related Art Traditionally, a real-time operating system (OS) has been used to control tasks and interrupts, but here the tasks and interrupt processing programs are clearly separated and controlled. For example, FIG. 4 shows an interrupt driver 13 designed for a conventional task control method.
Control is passed to , individual interrupt handling is done, and then O
Return from interrupt processing via S kernel l4. In other words, the interrupt driver 13 is handled as a non-task program.
handled and managed independently from general tasks.

発明が解決しようとする課題 しかし、従来のタスク制御方法は割り込み処理プログラ
ムをタスクとは独立に管理するためにOSのカーネル機
能が複雑となb1さらに割り込み処理プログラムはリア
ルタイムOSで用意されているすべてのシステムコール
を使用できるものではなく、持ち状態に遷移するシステ
ムコールは使用を禁止して釦シ、割り込み処理プログラ
ムの開発が困難となる課題がある。
Problems to be Solved by the Invention However, in the conventional task control method, the OS kernel function is complicated because the interrupt processing program is managed independently from the task.Furthermore, the interrupt processing program is not compatible with all the interrupt processing programs prepared in the real-time OS. However, the use of system calls that cause a transition to a held state is prohibited, making it difficult to develop interrupt processing programs.

課題を解決するための手段 上記目的を達成するため、割り込み処理グログラムは初
期登録時に、指定された優先レベルを持つタスクとして
登録され、第2図に示す割り込み管理テーブルに割り込
み要因とタスク識別子が登録される。外部割り込み信号
によシ割り込み処理プログラムに制御が渡るが、このと
き直接割り込み処理プログラムに制御を渡さずに、一旦
OSカーネルに制御を渡し、該当する割り込み処理プロ
グラムをタスクとして取扱い、優先レベルが実行中のタ
スクよシも高い場合には割込み処理タスクが実行され、
優先レベルが低い場合には持ちキューにつながれて実行
可能となる筐で待たされる。
Means for solving the problem In order to achieve the above purpose, the interrupt processing program is registered as a task with a specified priority level at the time of initial registration, and the interrupt cause and task identifier are registered in the interrupt management table shown in Figure 2. be done. Control is passed to the interrupt processing program by an external interrupt signal, but at this time, control is not passed directly to the interrupt processing program, but control is passed to the OS kernel, and the corresponding interrupt processing program is handled as a task, and the priority level is executed. If the task inside is also higher, the interrupt handling task is executed,
If the priority level is low, it is placed in a queue and made to wait in a cabinet where it can be executed.

割り込み処理タスクの実行終了時に、OSカーネルのス
ケジューラの制御の下に次に実行されるタスクが選択さ
れ、実行されるものである。
When the execution of the interrupt processing task is completed, the next task to be executed is selected and executed under the control of the scheduler of the OS kernel.

作用 本発明は外部割込み信号をOSカーネル経由で取り扱う
手段と割込みタスク管理テーブルを用いて割込みドライ
バソフトを一般アプリケーションタスクと同等に扱う作
用によシ、割込みドライバソフトの開発を容易にする効
果を導くものである。
Effects The present invention uses means for handling external interrupt signals via the OS kernel and an interrupt task management table to treat interrupt driver software in the same way as general application tasks, leading to the effect of facilitating the development of interrupt driver software. It is something.

実施例 以下、第1図から第3図を参照しながら本発明の一実施
例について説明する。第1図は本発明のタスク制御方法
の概略構成を示すブロック図である。第1図に釦いて計
算機システム1と外部入出力装置2から構成され、計算
機システム1はOSカーネル3、タスク制御4、割込み
タスク管理テーブル5、作業用主記憶6及び割込みやア
プリケーション用タスク7〜9によう構成されている。
EXAMPLE Hereinafter, an example of the present invention will be described with reference to FIGS. 1 to 3. FIG. 1 is a block diagram showing a schematic configuration of the task control method of the present invention. As shown in FIG. 1, the computer system 1 is composed of a computer system 1 and an external input/output device 2. It is structured as follows.

次に、上記構成における動作につき説明すも外部入出力
装置2から発生した割υ込み信号′OSカーネル3に伝
達され、タスク制御4が起動され、第3図に示す手順で
処理が行なわれる。すなわち割込み管理テーブル5(こ
こで、割込み処理プログラムは初期登録時に、指定され
た優先レベルを持つタスクとして登録され、第2図に示
す割込み管理テーブルに割込み要因とタスク識別子が登
録される。)を参照し、該当する割込みドライバタスク
7に付属する制御ブロックを参照し、その割込みタスク
7の優先レベルを取シ出し、現在動作中のタスクの優先
レベルと比較し、その優先レベルに応じたタスクを実行
させる。割込みに対応したタスクの優先レベルが高い場
合はその割込みタスクがラン(RUN)状態になう割込
みタスクが稼働し、優先レベルが低い場合は割込みタス
クがレディキ一一に接続され実行が待たされる。このよ
うにしてOS力しネル3およびタスク制御4の制御によ
シ、割り込み処理タスク7に制御が渡シ、該当する割υ
込み処理が行われる。
Next, the operation of the above configuration will be described. An interrupt signal generated from the external input/output device 2 is transmitted to the OS kernel 3, the task control 4 is activated, and processing is performed according to the procedure shown in FIG. That is, the interrupt management table 5 (here, the interrupt processing program is registered as a task with a specified priority level at the time of initial registration, and the interrupt cause and task identifier are registered in the interrupt management table shown in FIG. 2). Refer to the control block attached to the corresponding interrupt driver task 7, extract the priority level of the interrupt task 7, compare it with the priority level of the currently running task, and select the task according to the priority level. Let it run. When the priority level of a task corresponding to an interrupt is high, the interrupt task is put into a RUN state and is activated, and when the priority level is low, the interrupt task is connected to the ready key 11 and execution is awaited. In this way, control is passed to the interrupt processing task 7 under the control of the OS input channel 3 and task control 4, and the corresponding interrupt
Input processing is performed.

発明の効果 以上のように、本発明の効果としては、各種機器制御の
基本に割り込みがあシ、本発明のタスク制御方法を用い
ることによう1割り込み処理プログラムの開発が容易と
なる。
Effects of the Invention As described above, the effects of the present invention are that interrupts are fundamental to controlling various devices, and that using the task control method of the present invention facilitates the development of an interrupt processing program.

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

第1図は本発明におけるタスク制御方法の一実施例の概
略構成を示すブロック図、第2図は割り込み要因とタス
クを対比して管理するテーブル、第3図は本発明の処理
手順を示すフローチャート、第4図は従来のタスク制御
方法の概略を示すブロノク図である。 1・・・計算機システム、2・・・外部入出カ装置、3
・・・OSカーネル、4・・・タスク制御、5・・・割
り込みタクス管理テーブル、6・・・作業用主記憶、7
・・・割,b込みタスク、8〜9・・・アプリケーショ
ンタスク、1l・・・外部入出力装置、12・・・計算
機システム、13・・・割込みドライバ、14・・・O
Sカーネル、15・・・タスク制御、16〜17・・・
アプリケーションタスク。
FIG. 1 is a block diagram showing a schematic configuration of an embodiment of the task control method according to the present invention, FIG. 2 is a table for comparing and managing interrupt factors and tasks, and FIG. 3 is a flowchart showing the processing procedure of the present invention. , FIG. 4 is a Bronnok diagram showing an outline of a conventional task control method. 1... Computer system, 2... External input/output device, 3
...OS kernel, 4...Task control, 5...Interrupt task management table, 6...Working main memory, 7
... Interrupt, b interrupt task, 8-9... Application task, 1l... External input/output device, 12... Computer system, 13... Interrupt driver, 14... O
S kernel, 15...Task control, 16-17...
application task.

Claims (1)

【特許請求の範囲】[Claims] 外部の割り込み要因に応じた割り込み制御プログラムを
持ち、この割り込み制御プログラムを一般のタスクと同
一のタスク制御ブロックを用いて管理し、割り込み制御
プログラムの初期起動時に割り込み持ち状態になり、割
り込み発生時に指定された優先レベルのタスクとして起
動され、割り込み制御プログラムが実行されることを特
徴としたタスク制御方法。
It has an interrupt control program that responds to external interrupt sources, this interrupt control program is managed using the same task control block as a general task, and the interrupt control program enters the interrupt holding state when it is initially started, and when an interrupt occurs, it is specified. A task control method characterized in that the task is started as a task with a specified priority level, and an interrupt control program is executed.
JP16300389A 1989-06-26 1989-06-26 Task control method Pending JPH0328933A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16300389A JPH0328933A (en) 1989-06-26 1989-06-26 Task control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16300389A JPH0328933A (en) 1989-06-26 1989-06-26 Task control method

Publications (1)

Publication Number Publication Date
JPH0328933A true JPH0328933A (en) 1991-02-07

Family

ID=15765350

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16300389A Pending JPH0328933A (en) 1989-06-26 1989-06-26 Task control method

Country Status (1)

Country Link
JP (1) JPH0328933A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06149593A (en) * 1992-11-10 1994-05-27 Matsushita Electric Ind Co Ltd Multitask executive device
JP2008123157A (en) * 2006-11-10 2008-05-29 Seiko Epson Corp Processor and interruption control method
JP2009282987A (en) * 2008-05-21 2009-12-03 Korea Advanced Inst Of Sci Technol Method of interrupt scheduling
GB2590478A (en) * 2019-12-19 2021-06-30 Nissan Motor Mfg Uk Ltd Vehicle bench seat cushion

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06149593A (en) * 1992-11-10 1994-05-27 Matsushita Electric Ind Co Ltd Multitask executive device
JP2008123157A (en) * 2006-11-10 2008-05-29 Seiko Epson Corp Processor and interruption control method
JP2009282987A (en) * 2008-05-21 2009-12-03 Korea Advanced Inst Of Sci Technol Method of interrupt scheduling
GB2590478A (en) * 2019-12-19 2021-06-30 Nissan Motor Mfg Uk Ltd Vehicle bench seat cushion
GB2590478B (en) * 2019-12-19 2023-11-22 Nissan Motor Mfg Uk Ltd Vehicle bench seat cushion

Similar Documents

Publication Publication Date Title
US5805892A (en) Method of and apparatus for debugging multitask programs
JPH0328933A (en) Task control method
JPH02202635A (en) Task control method
JPS60168206A (en) Numerical control device
JPS60124746A (en) Data processing unit
JPS61166631A (en) Microprogram control processor
JPH03265956A (en) Input/output method selection system
JPH02113363A (en) Time slice controlling system for multiprocessor system
JPS61180344A (en) Step execution system for high level language
JP2581327B2 (en) Virtual machine I / O interrupt handling method
JPH0553835A (en) Processor for applying right of user
JPH03218532A (en) Control system for arbitrary starting program
JPH02118726A (en) Job performance control system
JPH01185733A (en) Input/output emulation system
JPH0378034A (en) Program parallel execution device
JPH03262049A (en) System for debugging device driver by interruption
JPS63253441A (en) User program and task managing system for debugger
JPH03164940A (en) Computer having plural interruption periods
JPS629950B2 (en)
JPS62217326A (en) Computer capable of storing and switching plural os
JPH0426499B2 (en)
JPS63158632A (en) System program execution system in interpreter system
JPS57153361A (en) Processor for logical input and output
JPH01321525A (en) Hardware semaphore
JPH0283633A (en) Controller for utility program