JPH064306A - How to divide interrupt processing - Google Patents
How to divide interrupt processingInfo
- Publication number
- JPH064306A JPH064306A JP16077292A JP16077292A JPH064306A JP H064306 A JPH064306 A JP H064306A JP 16077292 A JP16077292 A JP 16077292A JP 16077292 A JP16077292 A JP 16077292A JP H064306 A JPH064306 A JP H064306A
- Authority
- JP
- Japan
- Prior art keywords
- interrupt
- processing
- primary
- processing unit
- priority
- 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)【要約】
【目的】 割り込みのレスポンスを向上させるととも
に、オーバーヘッドの少ない割り込み処理の分割を実行
でき、これによりコンピュータ・システムの性能を向上
させる。
【構成】 割り込み処理を優先度の高い一次処理と優先
度の低い二次処理とに分割し、周辺装置13からの割り
込みにより発生する一次処理部11の一次処理の実行中
に、二次割り込みを依頼し、一次処理の終了後に、二次
割り込み発生装置14からの二次割り込みに対応した二
次処理部12の二次処理を起動させ、二次処理の実行中
に、周辺装置13から一次割り込みが発生すると、二次
処理部12は、実行中の二次処理を中断して、一次割り
込みに対応した一次処理部11の一次処理を起動させ、
当該一次処理の終了後に中断した二次処理を再開させ
る。
(57) [Abstract] [Purpose] The interrupt response is improved, and the interrupt processing can be divided with less overhead, thereby improving the performance of the computer system. [Structure] The interrupt processing is divided into a high-priority primary processing and a low-priority secondary processing, and a secondary interrupt is generated during execution of the primary processing of the primary processing unit 11 generated by an interrupt from the peripheral device 13. After requesting and ending the primary processing, the secondary processing of the secondary processing unit 12 corresponding to the secondary interrupt from the secondary interrupt generation device 14 is activated, and the primary interrupt is issued from the peripheral device 13 during the execution of the secondary processing. When occurs, the secondary processing unit 12 interrupts the secondary processing that is being executed, and activates the primary processing of the primary processing unit 11 corresponding to the primary interrupt,
After the completion of the primary processing, the suspended secondary processing is restarted.
Description
【0001】[0001]
【産業上の利用分野】本発明は、コンピュータ・システ
ムにおける割り込み処理の分割方法に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of dividing interrupt processing in a computer system.
【0002】[0002]
【従来の技術】従来、この種の割り込み処理では、一次
割り込みに応じて一次処理部が実行する一次処理の中
で、処理装置(CPU)が用意する割り込み発生命令を
使用し、割り込み(以下、「ソフトウエア割り込み」と
いう。)を発生させ、このソフトウエア割り込みで二次
処理部を起動させる方法があった。2. Description of the Related Art Conventionally, in this type of interrupt processing, an interrupt generation instruction prepared by a processing unit (CPU) is used in the primary processing executed by a primary processing unit in response to a primary interrupt, "Software interrupt") is generated and the secondary processing unit is activated by this software interrupt.
【0003】また、複数の実行単位(タスク)を実現で
きるオペレーティング・システム(以下、「マルチタス
クOS」という。)を、実装したコンピュータ・システ
ムにおいては、割り込み処理を、一次割り込みにより起
動される一次処理部と、マルチタスクOS上で制御され
るタスクとして動作する二次処理部に分割し、一次処理
の中で二次処置を実行するタスク(以下、「割り込みタ
スク」という。)の起動をマルチタスクOSに依頼し、
割り込みタスクを動作させることにより、割り込み処理
を分割する方法があった。Further, in a computer system in which an operating system (hereinafter referred to as "multitask OS") capable of realizing a plurality of execution units (tasks) is mounted, interrupt processing is performed by a primary interrupt that is activated by a primary interrupt. It is divided into a processing unit and a secondary processing unit that operates as a task controlled on the multi-task OS, and a start of a task (hereinafter, referred to as an “interrupt task”) that executes a secondary treatment in the primary processing is multi-tasked. Ask the task OS,
There was a method of dividing the interrupt processing by operating the interrupt task.
【0004】[0004]
【発明が解決しようとする課題】ところが、二次処理を
ソフトウエア割り込みによって動作させる場合には、一
次処理部より二次処理部の優先度が高くなり、二次処理
部の実行時に一次割り込みの受付ができないという問題
点があった。また、二次処理をタスクとして動作させる
場合には、一次割り込みが発生する以前に動作していた
タスクを停止し、割り込みタスクに制御を渡す処理(以
下、「タスク・スイッチ処理」という。)が、コンピュ
ータ・システムの負荷増加につながるという問題点があ
った。However, when the secondary processing is operated by a software interrupt, the priority of the secondary processing section becomes higher than that of the primary processing section, and the primary interrupt of the secondary processing section is executed at the time of execution of the secondary processing section. There was a problem that we could not accept. Further, when the secondary processing is operated as a task, the processing that stops the task that was operating before the primary interrupt occurs and passes control to the interrupt task (hereinafter referred to as “task switch processing”) is performed. However, there is a problem in that the load on the computer system is increased.
【0005】本発明は、上記問題点に鑑みなされたもの
で、割り込みのレスポンスを向上させるとともに、オー
バーヘッドの少ない割り込み処理の分割を実行でき、コ
ンピュータ・システムの性能を向上できる割り込み処理
の分割方法を提供することを目的とする。The present invention has been made in view of the above problems, and provides an interrupt processing dividing method capable of improving interrupt response and executing interrupt processing with less overhead, thereby improving the performance of a computer system. The purpose is to provide.
【0006】[0006]
【課題を解決するための手段】上記目的を達成するため
に、本発明では、外部からの割り込みにより発生する処
理を優先度の高い一次処理と、優先度の低い二次処理と
に分割し、処理装置は、一次処理の実行中に、二次割り
込みを発行し、前記一次処理の終了後に前記二次割り込
みに対応した二次処理を起動させ、二次処理の実行中
に、前記外部から一次割り込みが発行されると、前記実
行中の二次処理を中断して、前記一次割り込みに対応し
た一次処理を起動させ、当該一次処理の終了後に前記二
次処理を再開させる割り込み処理の分割方法が提供され
る。In order to achieve the above object, the present invention divides a process generated by an external interrupt into a high-priority primary process and a low-priority secondary process, The processing device issues a secondary interrupt during the execution of the primary processing, activates the secondary processing corresponding to the secondary interrupt after the completion of the primary processing, and executes the primary processing from the outside while executing the secondary processing. When an interrupt is issued, there is a method of dividing interrupt processing in which the secondary processing being executed is interrupted, the primary processing corresponding to the primary interrupt is activated, and the secondary processing is restarted after the completion of the primary processing. Provided.
【0007】[0007]
【作用】割り込み処理を一次処理と二次処理とに分割
し、一次処理より二次処理を低い優先度で動作させる。
従って、一次割り込みに対するレスポンスを向上させる
ことができ、かつ、割り込み処理の分割をタスク・スイ
ッチ等のオーバーヘッドなしに実現することができる。The interrupt process is divided into the primary process and the secondary process, and the secondary process is operated with a lower priority than the primary process.
Therefore, the response to the primary interrupt can be improved, and the interrupt processing can be divided without overhead such as task switch.
【0008】[0008]
【実施例】本発明の実施例を図1乃至図2の図面に基づ
き説明する。図1は、本発明に係る割り込み処理の分割
方法を説明するためのコンピュータ・システムの構成を
示す図である。図において、CPU10は、図示しない
が周知のごとく、プログラムの各命令を解釈し、各種の
回路に特定の機能を働かせるように制御する制御部と、
データやプログラムを一連のロケーションに記憶する記
憶部と、論理演算を行う演算部と、これら各部を接続さ
せる内部バスとから構成されており、また、内部バスに
は、図示しない入出力インターフェースを介して周辺装
置13及び二次割り込み発生装置14が接続されてい
る。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described with reference to the drawings of FIGS. FIG. 1 is a diagram showing the configuration of a computer system for explaining a method of dividing interrupt processing according to the present invention. In the figure, as is well known, a CPU 10 interprets each instruction of a program and controls the various circuits so as to operate a specific function, as is well known.
It is composed of a storage unit that stores data and programs in a series of locations, a calculation unit that performs logical operations, and an internal bus that connects these units, and the internal bus is connected via an input / output interface (not shown). The peripheral device 13 and the secondary interrupt generation device 14 are connected to each other.
【0009】CPU10では、制御部の制御によって演
算部が記憶部から読み出されたオペランドに関する論理
演算を行うとともに、上記周辺装置13及び二次割り込
み発生装置14からの割り込みに対応した割り込み処理
を実行する。本実施例における割り込みに対するCPU
10の処理機能は、周辺装置13から発生する優先度の
高い一次割り込みで起動する機能を有する一次処理部1
1と、二次割り込み発生装置14から発生する優先度の
低い二次割り込みで起動する機能を有する二次処理部1
2とから構成されている。In the CPU 10, the arithmetic unit performs a logical operation on the operand read from the storage unit under the control of the control unit, and executes an interrupt process corresponding to the interrupt from the peripheral device 13 and the secondary interrupt generation device 14. To do. CPU for interrupt in this embodiment
The processing function of 10 is a primary processing unit 1 having a function of being activated by a high-priority primary interrupt generated from the peripheral device 13.
1 and a secondary processing unit 1 having a function of being activated by a secondary interrupt of low priority generated from the secondary interrupt generation device 14.
2 and.
【0010】本実施例に係るCPU10では、優先度の
高い一次割り込みで起動される一次処理部11の一次処
理の中で、上記一次割り込みより優先度の低い二次割り
込みを発生させる二次割り込み発生装置14に、上記二
次割り込みの発生依頼を行い、二次処理部12に起動を
かける。この時、二次処理部12が実際に起動される時
期は、優先度の高い一次割り込みに対応した一次処理が
全て終了した時点であり、また、二次割り込みで起動さ
れる二次処理部12の二次処理中に一次割り込みが発生
した場合には、上記二次処理が中断されて、即時に一次
処理が起動され、上記一次処理が終了した時点で、中断
された二次処理が再開される。また、本実施例では、二
次処理部12の二次処理の中で、二次割り込み発生装置
14に二次割り込みの発生依頼を行うことも可能であ
る。In the CPU 10 according to the present embodiment, in the primary processing of the primary processing unit 11 which is activated by the primary interrupt of high priority, the secondary interrupt generation for generating the secondary interrupt of lower priority than the primary interrupt is generated. The device 14 is requested to generate the secondary interrupt, and the secondary processing unit 12 is activated. At this time, the time when the secondary processing unit 12 is actually activated is the time when all the primary processing corresponding to the primary interrupt with high priority is completed, and the secondary processing unit 12 activated by the secondary interrupt. If a primary interrupt occurs during the secondary processing of, the secondary processing is interrupted, the primary processing is immediately started, and the interrupted secondary processing is restarted when the primary processing ends. It Further, in the present embodiment, it is also possible to request the secondary interrupt generation device 14 to generate a secondary interrupt during the secondary processing of the secondary processing unit 12.
【0011】次に割り込み処理の動作について、図2の
流れ図に基づき説明する。まず、周辺装置13から一次
割り込みAが発生すると、CPU10では、一次処理部
11が起動されて、上記一次割り込みAに対応する一次
処理を実行する。一次処理部11は、この一次処理の中
で、二次割り込み発生装置14に二次割り込みの発生依
頼を行い、二次処理部12に起動をかける。Next, the operation of interrupt processing will be described with reference to the flowchart of FIG. First, when the primary interrupt A is generated from the peripheral device 13, the CPU 10 activates the primary processing unit 11 to execute the primary processing corresponding to the primary interrupt A. In the primary processing, the primary processing unit 11 requests the secondary interrupt generation device 14 to generate a secondary interrupt, and activates the secondary processing unit 12.
【0012】二次割り込み発生装置14は、一次処理部
11の一次処理が全て終了した時点で、上記依頼に応じ
て二次割り込みBを発生させることができる。二次割り
込み発生装置14から二次割り込みBが発生すると、C
PU10では、二次処理部12が起動されて、上記二次
割り込みBに対応する二次処理を実行する。この二次処
理の中で、周辺装置13から一次割り込みCが発生する
と、CPU10では、二次処理部12が実行中の二次処
理を中断し、一次処理部11が上記一次割り込みCに対
応する一次処理を実行する。一次処理部11は、この一
次処理の中で、上記同様、二次割り込み発生装置14に
二次割り込みの発生依頼を行う。The secondary interrupt generation device 14 can generate the secondary interrupt B in response to the request when all the primary processing of the primary processing unit 11 is completed. When the secondary interrupt B is generated from the secondary interrupt generator 14, C
In the PU 10, the secondary processing unit 12 is activated to execute the secondary processing corresponding to the secondary interrupt B. When the primary interrupt C is generated from the peripheral device 13 in this secondary processing, in the CPU 10, the secondary processing unit 12 interrupts the secondary processing being executed, and the primary processing unit 11 responds to the primary interrupt C. Executes primary processing. In the primary processing, the primary processing unit 11 requests the secondary interrupt generation device 14 to generate a secondary interrupt in the same manner as described above.
【0013】二次処理部12は、一次処理部11の一次
割り込みCに対応する一次処理が全て終了した時点で、
二次割り込みBに対応する二次処理を再開する。二次割
り込み発生装置14は、二次処理部12の二次割り込み
Bに対応する二次処理が全て終了した時点で、上記一次
処理部11からの依頼に応じて二次割り込みDを発生さ
せることができる。The secondary processing unit 12 determines when all the primary processing corresponding to the primary interrupt C of the primary processing unit 11 is completed,
The secondary processing corresponding to the secondary interrupt B is restarted. The secondary interrupt generation device 14 generates a secondary interrupt D in response to a request from the primary processing unit 11 when all the secondary processing corresponding to the secondary interrupt B of the secondary processing unit 12 is completed. You can
【0014】二次割り込み発生装置14から二次割り込
みDが発生すると、CPU10では、二次処理部12が
起動されて、上記二次割り込みDに対応する二次処理を
実行する。二次処理部12は、この二次処理の中で、二
次割り込み発生装置14に二次割り込みの発生依頼を行
う。二次割り込み発生装置14は、二次処理部12の二
次割り込みDに対応する二次処理が全て終了した時点
で、上記二次処理部12からの依頼に応じて二次割り込
みEを発生させることができる。When the secondary interrupt D is generated from the secondary interrupt generator 14, the CPU 10 activates the secondary processing unit 12 to execute the secondary processing corresponding to the secondary interrupt D. In the secondary processing, the secondary processing unit 12 requests the secondary interrupt generation device 14 to generate a secondary interrupt. The secondary interrupt generation device 14 generates a secondary interrupt E in response to a request from the secondary processing unit 12 when all the secondary processing corresponding to the secondary interrupt D of the secondary processing unit 12 is completed. be able to.
【0015】従って、本実施例では、割り込み処理を分
割し、優先度の高い一次処理の実行中に、優先度の低い
二次割り込みを発行し、上記一次処理の終了後に二次割
り込みに対応した二次処理を起動させることができるの
で、一次割り込みに対するレスポンスを向上させること
ができる。また、本実施例では、割り込み処理の分割を
優先度の高低で行うので、割り込み処理の分割をタスク
・スイッチ等のオーバーヘッドなしに実現することが可
能となる。Therefore, in the present embodiment, the interrupt process is divided, the secondary interrupt of low priority is issued during the execution of the primary process of high priority, and the secondary interrupt is dealt with after the completion of the primary process. Since the secondary processing can be activated, the response to the primary interrupt can be improved. Further, in this embodiment, since the interrupt processing is divided according to the priority level, it is possible to realize the interrupt processing division without overhead such as task switch.
【0016】[0016]
【発明の効果】以上、説明したように、本発明では、外
部からの割り込みにより発生する処理を優先度の高い一
次処理と、優先度の低い二次処理とに分割し、処理装置
は、一次処理の実行中に、二次割り込みを発行し、前記
一次処理の終了後に前記二次割り込みに対応した二次処
理を起動させ、二次処理の実行中に、前記外部から一次
割り込みが発行されると、前記実行中の二次処理を中断
して、前記一次割り込みに対応した一次処理を起動さ
せ、当該一次処理の終了後に前記二次処理を再開させる
ので、割り込みのレスポンスを向上させるとともに、オ
ーバーヘッドの少ない割り込み処理の分割を実行でき、
これによりコンピュータ・システムの性能を向上でき
る。As described above, according to the present invention, the processing generated by the external interrupt is divided into the primary processing with high priority and the secondary processing with low priority, and the processing device A secondary interrupt is issued during execution of a process, a secondary process corresponding to the secondary interrupt is started after the completion of the primary process, and a primary interrupt is issued from the outside during execution of the secondary process. And, the secondary processing being executed is interrupted, the primary processing corresponding to the primary interrupt is activated, and the secondary processing is restarted after the completion of the primary processing, so that the response of the interrupt is improved and the overhead is increased. Can divide interrupt processing with less
This can improve the performance of the computer system.
【図1】本発明に係る割り込み処理の分割方法を説明す
るためのコンピュータ・システムの構成を示す図であ
る。FIG. 1 is a diagram showing a configuration of a computer system for explaining an interrupt processing dividing method according to the present invention.
【図2】図1に示したCPUの割り込み処理の動作を説
明するための流れ図である。FIG. 2 is a flowchart for explaining an operation of interrupt processing of the CPU shown in FIG.
10 CPU 11 一次処理部 12 二次処理部 13 周辺装置 14 二次割り込み発生装置 10 CPU 11 Primary Processing Unit 12 Secondary Processing Unit 13 Peripheral Device 14 Secondary Interrupt Generation Device
Claims (1)
を優先度の高い一次処理と、優先度の低い二次処理とに
分割し、処理装置は、一次処理の実行中に、二次割り込
みを発行し、前記一次処理の終了後に前記二次割り込み
に対応した二次処理を起動させ、二次処理の実行中に、
前記外部から一次割り込みが発行されると、前記実行中
の二次処理を中断して、前記一次割り込みに対応した一
次処理を起動させ、当該一次処理の終了後に前記二次処
理を再開させることを特徴とする割り込み処理の分割方
法。1. A process generated by an external interrupt is divided into a high-priority primary process and a low-priority secondary process, and a processing device issues a secondary interrupt during execution of the primary process. Then, after the completion of the primary processing, the secondary processing corresponding to the secondary interrupt is activated, and during the execution of the secondary processing,
When a primary interrupt is issued from the outside, the secondary processing being executed is interrupted, the primary processing corresponding to the primary interrupt is activated, and the secondary processing is restarted after the completion of the primary processing. Characteristic interrupt processing division method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP16077292A JPH064306A (en) | 1992-06-19 | 1992-06-19 | How to divide interrupt processing |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP16077292A JPH064306A (en) | 1992-06-19 | 1992-06-19 | How to divide interrupt processing |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH064306A true JPH064306A (en) | 1994-01-14 |
Family
ID=15722125
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP16077292A Pending JPH064306A (en) | 1992-06-19 | 1992-06-19 | How to divide interrupt processing |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH064306A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2001229031A (en) * | 2000-01-24 | 2001-08-24 | Motorola Inc | Flexible interrupt controller including interrupt force register |
| US8381595B2 (en) | 2010-03-25 | 2013-02-26 | Seiko Epson Corporation | Pressure detecting device |
-
1992
- 1992-06-19 JP JP16077292A patent/JPH064306A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2001229031A (en) * | 2000-01-24 | 2001-08-24 | Motorola Inc | Flexible interrupt controller including interrupt force register |
| US8381595B2 (en) | 2010-03-25 | 2013-02-26 | Seiko Epson Corporation | Pressure detecting device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPS6258341A (en) | Input and output interruption processing system | |
| JPS5841538B2 (en) | Multiprocessor system instructions | |
| KR102003721B1 (en) | GPU Kernel transactionization method and computing device | |
| JPH064306A (en) | How to divide interrupt processing | |
| JPH0328933A (en) | Task control method | |
| JPS6336023B2 (en) | ||
| JPS6223895B2 (en) | ||
| JP2581327B2 (en) | A method for handling I/O interrupts in a virtual machine | |
| JPH0433130A (en) | Multi-chip configuration method | |
| JP2003005987A (en) | Emulation device | |
| JPH01137359A (en) | Processor control system | |
| JPH02202635A (en) | Task control method | |
| JPH0421892B2 (en) | ||
| JPH03116335A (en) | System for transferring from non-privileged cpu to privileged cpu | |
| JPH05342021A (en) | Multitask computer | |
| JPS61166631A (en) | Microprogram control processor | |
| JPS62219061A (en) | Control system for multiprocessor | |
| JPH02176832A (en) | Microcomputer | |
| JPS60225944A (en) | Virtual machine system | |
| JPH02184925A (en) | Virtual computer system | |
| JPH02146634A (en) | Interruption control system for virtual computer system | |
| JPH03218533A (en) | Urgent job execution system | |
| JPS62237560A (en) | Multiprocessor system | |
| JPH0553835A (en) | Processing device that adds user qualification | |
| JPH02208741A (en) | Peripheral equipment control system |