JPH02202635A - Task control method - Google Patents

Task control method

Info

Publication number
JPH02202635A
JPH02202635A JP2287089A JP2287089A JPH02202635A JP H02202635 A JPH02202635 A JP H02202635A JP 2287089 A JP2287089 A JP 2287089A JP 2287089 A JP2287089 A JP 2287089A JP H02202635 A JPH02202635 A JP H02202635A
Authority
JP
Japan
Prior art keywords
task
interruption
interrupt
processing program
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
JP2287089A
Other languages
Japanese (ja)
Inventor
Atsushi Sugano
淳 菅野
Keiichiro Kuwatsuru
桑鶴 敬一郎
Kenichi Ueda
謙一 上田
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 JP2287089A priority Critical patent/JPH02202635A/en
Publication of JPH02202635A publication Critical patent/JPH02202635A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To simplify the kernel function of an operating system and to facilitate the development of an interruption processing program by controlling the interruption control program through the use of a task control block which is similar to a general task. CONSTITUTION:The interruption processing program is registered in the operating system (OS) as a processing task 7 at the time of initial registration, and an interruption cause code and a task identifier are registered in an interruption task control table 5. The interruption driver routine of an OS kernel 3 is started by an external interruption signal generated from an external input output device 2, and the task in the middle of operation at present is set in a task waiting state. Then, the table 5 is referred and the task 7 corresponding to an interruption cause is fetched from an interruption waiting queue and is set in an execution state. Thus, the kernel function is simplified and the development of the interruption processing program is facilitated.

Description

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

従来の技術 タスクや割り込みを制御するために、リアルタイムO8
を使用するが、従来技術においてはタスクと割り込み処
理プログラムを明確に分離して制御している。第4図に
従来技術によるタスク制御方式を示す。外部入出力装置
12により割シ込みが発生すると、計算機システム11
において割り込み要因毎に用意された割り込みドライバ
20に制御が渡り、個別の割り込み処理がなされ、その
後OSカーネル13を経て割り込み処理から戻る。
Real-time O8 to control conventional technology tasks and interrupts
However, in the conventional technology, tasks and interrupt processing programs are clearly separated and controlled. FIG. 4 shows a task control method according to the prior art. When an interrupt is generated by the external input/output device 12, the computer system 11
In step 1, control is transferred to an interrupt driver 20 prepared for each interrupt cause, individual interrupt processing is performed, and then the process returns from the interrupt processing via the OS kernel 13.

すなわち割り込みドライバ20は非タスクプログラムと
して取シ扱われ、一般のタスクとは独立に管理されてい
る。
That is, the interrupt driver 20 is treated as a non-task program and is managed independently from general tasks.

一方、タスク18・・・19はタスク制御14で制御さ
れ、OSカーネル13を経て作業用主記憶16に送られ
所定の処理演算が行われる。
On the other hand, tasks 18, . . . , 19 are controlled by the task control 14, and are sent to the working main memory 16 via the OS kernel 13, where predetermined processing operations are performed.

発明が解決しようとする課題 しかし、この従来の技術においては、割り込み処理プロ
グラムをタスクとは独立に管理するためにO8のカーネ
ル機能が複雑となっている。さらに割り込み処理プログ
ラムはリアルタイムO8で用意されているすべてのシス
テムコールを使用できるものではなく、′待ち状態に遷
移するシステムコールは使用を禁止しており、割シ込み
処理プロダラムの開発が困難なものとなっている。
Problems to be Solved by the Invention However, in this conventional technology, the O8 kernel function is complicated because the interrupt processing program is managed independently of the tasks. Furthermore, the interrupt processing program cannot use all the system calls provided by real-time O8, and the use of system calls that transition to the wait state is prohibited, making it difficult to develop an interrupt processing program. It becomes.

本発明は上記課題を解決するもので、割り込み処理プロ
グラムを一般のタスクと同様に取扱うことによシO8の
カーネル機能を簡略化し、かつ割シ込み処理プログラム
の開発を容易にすることを目的とするものである。
The present invention solves the above problems, and aims to simplify the kernel functions of the O8 by handling interrupt processing programs in the same way as general tasks, and to facilitate the development of interrupt processing programs. It is something to do.

課題を解決するための手段 上記課題を解決するために、本発明は割り込み制御プロ
グラムを一般のタスクと同一のタスク制御ブロックを用
いて管理するようにしたものである。
Means for Solving the Problems In order to solve the above problems, the present invention manages an interrupt control program using the same task control block as a general task.

作    用 上記構成において、割り込み制御プログラムの登録時に
割シ込み待ち状態になシ、割シ込みが発生すると最上位
の優先レベルのタスクとして起動され、割り込み制御プ
ログラムが終了すると自動的に割シ込み待ち状態となる
。この結果、割り込み処理プログラムが一般のタスクと
同様に取扱われ、割り込み処理プログラムの開発が著し
く容易になる。
Effect In the above configuration, when the interrupt control program is registered, the task is not waiting for an interrupt, and when an interrupt occurs, it is started as a task with the highest priority level, and when the interrupt control program is finished, the task is automatically interrupted. It will be in a waiting state. As a result, the interrupt processing program is handled in the same way as a general task, and development of the interrupt processing program is significantly facilitated.

実施例 以下本発明を実施例をもとに詳細に説明する。Example The present invention will be described in detail below based on examples.

第1図は本発明によるタスク制御方法を実施する構成の
概要を示すブロック図である。第1図において、1は計
算機システムで外部入出力装置2が接続されている。計
算機システム1内には複数のアプリケーションタスク、
AP1タスク8、・・・APnタスク9が用意され、こ
れらのアプリケーションタスク8・・・9はタスク制御
4によりタスクの実行順序のスケジューリング、メモリ
資源の割り当て、時間管理等の制御が行われる。3はO
Sカーネル、6は作業用主記憶である。
FIG. 1 is a block diagram showing an outline of a configuration for implementing a task control method according to the present invention. In FIG. 1, 1 is a computer system to which an external input/output device 2 is connected. There are multiple application tasks in the computer system 1,
AP1 tasks 8, . . . APn tasks 9 are prepared, and these application tasks 8 . 3 is O
S kernel, 6 is a working main memory.

割り込み処理プログラムは初期登録時に割り込み処理タ
スク7としてO8に登録され、第3図に示すように割り
込みタスク管理テーブル5に割り込み要因コード(ベク
タアドレス)22 とタスク識別子23が登録される。
The interrupt processing program is registered in the O8 as the interrupt processing task 7 at the time of initial registration, and the interrupt cause code (vector address) 22 and task identifier 23 are registered in the interrupt task management table 5 as shown in FIG.

外部入出力装置2から発生した外部割り込み信号により
割り込み処理プログラムに制御が渡されるが、このとき
直接割り込み処理プログラムに制御が渡されずに、−旦
OSカーネル3に制御が渡され(第2図ステップa)、
OSカーネル30割り込みドライバルーチンが起動され
る。割り込みドライバルーチンでは現在勤作中のタスク
を待ち状態にし、(第2図ステップb)割り込みタスク
管理テーブル5を参照し、割り込み要因に応じた割り込
み処理タスク7を割り込み待ちキューから取り出し、実
行状態にする(第2図ステップC)。
Control is passed to the interrupt processing program by an external interrupt signal generated from the external input/output device 2, but at this time, control is not passed directly to the interrupt processing program, but instead is passed to the OS kernel 3 (see Figure 2). step a),
The OS kernel 30 interrupt driver routine is activated. In the interrupt driver routine, the currently working task is put into a waiting state (step b in Figure 2), and the interrupt processing task 7 corresponding to the interrupt factor is taken out from the interrupt waiting queue by referring to the interrupt task management table 5, and put into the running state. (Step C in Figure 2).

割シ込み処理タスク7に制御が渡り、該当する割り込み
処理プログラムをタスクとして実行する(第2図ステッ
プd)。割り込み処理タスクの実行終了時にこの割り込
み処理タスク7を次の割り込み待ち状態にしく第2図ス
テップe)、割り込みより戻り(第2図ステップr)、
osカーネル3のスケジユーラの制御のもとに次に実行
されるタスクが選択され、実行される。
Control is passed to the interrupt processing task 7, which executes the corresponding interrupt processing program as a task (step d in FIG. 2). When the execution of the interrupt processing task is finished, the interrupt processing task 7 is placed in a waiting state for the next interrupt (step e in FIG. 2), returns from the interrupt (step r in FIG. 2),
The next task to be executed is selected and executed under the control of the scheduler of the OS kernel 3.

発明の効果 以上のように、本発明は割り込み制御プログラムを一般
のタスクと同一のタスク制御ブロックを用いて管理する
ようにしたもので、割り込み処理プログラムが一般のタ
スクと同様に取扱われるため、OSカーネルの機能が簡
略化され割り込み処理プログラムの開発が容易になる。
Effects of the Invention As described above, the present invention manages an interrupt control program using the same task control block as a general task, and since the interrupt processing program is handled in the same way as a general task, the OS Kernel functions are simplified, making it easier to develop interrupt handling programs.

各種機器制御の基本に割り込みがあるので、本発明のタ
スク制御方法を用いることにより、割シ込み゛処理プロ
グラムの開発が容易となり、本発明の効果は大である。
Since interrupts are the basis of controlling various devices, by using the task control method of the present invention, it becomes easy to develop interrupt processing programs, and the effects of the present invention are significant.

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

第1図は本発明によるタスク制御方法の実施例の概略構
成を示すブロック図、第2図は本発明の処理手順を示す
フローチャート、第3図は割り込み要因とタスクを対比
して管理するテーブルを示す図、第4図は従来の割り込
み処理方法を説明するためのブロック図である。 1・・・計算機システム、2・・・外部入出力装置、3
・・OSカーネル、4・・・タスク制御、5・・・割り
込みタスク管理テーブル、6・・作業用主記憶、7・・
・割り込みタスク、8〜9・・・アプリケーションタス
ク。 代理人の氏名 弁理士 粟 野 重 孝 ほか1名第 図 第 図 第 図 第 図
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 flowchart showing the processing procedure of the present invention, and FIG. 3 is a table for comparing and managing interrupt factors and tasks. FIG. 4 is a block diagram for explaining a conventional interrupt processing 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 task, 8-9...Application task. Name of agent: Patent attorney Shigetaka Awano and one other person

Claims (1)

【特許請求の範囲】[Claims]  外部の割り込み要因に応じた割り込み制御プログラム
を計算機システム内に用意された複数のタスクと同一の
タスク制御ブロックを用いて管理し、割り込み制御プロ
グラムの登録時に割り込み待ち状態になり、割り込み発
生時に、最上位の優先レベルのタスクとして起動され、
割り込み制御プログラムの終了時に割り込み待状態とな
ることを特徴としたタスク制御方法。
An interrupt control program corresponding to an external interrupt factor is managed using the same task control block as multiple tasks prepared in the computer system, and when the interrupt control program is registered, it enters an interrupt wait state, and when an interrupt occurs, the Launched as a task with a higher priority level,
A task control method characterized by entering an interrupt wait state when an interrupt control program ends.
JP2287089A 1989-02-01 1989-02-01 Task control method Pending JPH02202635A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2287089A JPH02202635A (en) 1989-02-01 1989-02-01 Task control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2287089A JPH02202635A (en) 1989-02-01 1989-02-01 Task control method

Publications (1)

Publication Number Publication Date
JPH02202635A true JPH02202635A (en) 1990-08-10

Family

ID=12094730

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2287089A Pending JPH02202635A (en) 1989-02-01 1989-02-01 Task control method

Country Status (1)

Country Link
JP (1) JPH02202635A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003027846A1 (en) * 2001-09-20 2003-04-03 Ricoh Company, Ltd. Task switching system, task switching method and dsp modem

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003027846A1 (en) * 2001-09-20 2003-04-03 Ricoh Company, Ltd. Task switching system, task switching method and dsp modem

Similar Documents

Publication Publication Date Title
JP2692609B2 (en) Multitask program debugging method and apparatus
US8145820B2 (en) Multiprocessor system and computer program product
JP2001256062A (en) Interruption processing method and operation processor using the same
JPH02202635A (en) Task control method
JPH0328933A (en) Task control method
JP2581327B2 (en) Virtual machine I / O interrupt handling method
JP2553526B2 (en) Multitasking processor
US20030225817A1 (en) Concurrent execution of kernel work and non-kernel work in operating systems with single-threaded kernel
JPH064306A (en) Method for dividing interruption processing
JPH02113363A (en) Time slice controlling system for multiprocessor system
JPS63253441A (en) User program and task managing system for debugger
JPS63311442A (en) Multiple operating system
JPH0357040A (en) System for selecting input file connection at the time of execution
JP2822728B2 (en) Computer system
JPS60147845A (en) System for controlling load of circulating pipeline type data flow computer
JPH03164940A (en) Computer having plural interruption periods
JPS62121549A (en) High speed system for os simulator
JPH0447854B2 (en)
JPS6159540A (en) Dispatching processing system
JPH03248231A (en) Multitask exclusive control method
JPS63128442A (en) Control device for cyclic start task
JPH01270143A (en) Break interruption control system
JPH01321525A (en) Hardware semaphore
JPH03113640A (en) Data processing system
JPS62182845A (en) Interruption control system for information processor