JPS619731A - Interruption processing method - Google Patents

Interruption processing method

Info

Publication number
JPS619731A
JPS619731A JP13139484A JP13139484A JPS619731A JP S619731 A JPS619731 A JP S619731A JP 13139484 A JP13139484 A JP 13139484A JP 13139484 A JP13139484 A JP 13139484A JP S619731 A JPS619731 A JP S619731A
Authority
JP
Japan
Prior art keywords
instruction
interrupt
execution
interruption
error information
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
JP13139484A
Other languages
Japanese (ja)
Other versions
JPH0531774B2 (en
Inventor
Yutaka Takano
豊 高野
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 JP13139484A priority Critical patent/JPS619731A/en
Publication of JPS619731A publication Critical patent/JPS619731A/en
Publication of JPH0531774B2 publication Critical patent/JPH0531774B2/ja
Granted legal-status Critical Current

Links

Abstract

PURPOSE:To leave the interruption processing peculiar to an interruption produced during the execution of an instruction to a process, by providing a flag area related to the process and an error information area into a main memory. CONSTITUTION:In a process ''1'' is stored to a flag area in case it is desired to perform the processing of an interruption produced during execution of an instruction by the process itself. While ''0'' is stored previously to an error area and an instruction is executed for detection of an interruption produced under execution. When no interruption is produced at all, the execution of the next instruction is started as soon as the execution is through with the first instruction. If an interruption is produced during execution of an instruction, an interruption processing program refers to the flag area and completes forcibly the corresponding process in case ''0'' is detected in the flag area. While the value excluding ''0'' which is prescribed to mean the generation of interruption is stored to the error information area when ''1'' is detected in the flag area.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、コンピュータシステムにおける割り込み処理
に関するものである。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to interrupt processing in computer systems.

従来例の構成とその問題点 割り込みは、コンピュータシステムにおいて非常に多用
される有効な機能であり、何らかの事象の発生により、
その時実行しているプロセスを中断させて、より緊急度
の高い処理プログラムを優先して実行する必要がある場
合に用いられる。
Conventional configuration and its problems Interrupts are very frequently used and effective functions in computer systems.
It is used when it is necessary to interrupt the currently executing process and give priority to execution of a more urgent processing program.

割り込みは、コンピュータシステム上で実行される全プ
ロセス共用の機能であるため、オペレーティングシステ
ムにより統一的に取り扱われる。
Since interrupts are a function shared by all processes executed on a computer system, they are handled uniformly by the operating system.

割シ込みが発生すると、オペレーティングシステム内の
割り込み処理プログラムが起動され、その時中断したプ
ロセスが使用してたレジスタや命令カウンタ等のプロセ
スコンチフスを割り込みスタック等の退避領域に退避し
て、次にプロセスを再開するための準備をした後、割シ
込みを発生した原因に対応する処理を実行する。割り込
み処理が終了すると、以前に退避したレジスタ等を回復
し、割り込みからの復帰命令を実行することにより中断
したプロセスの実行を再開する。
When an interrupt occurs, the interrupt handling program in the operating system is started, saves the process contypus such as registers and instruction counters used by the interrupted process to a save area such as the interrupt stack, and then executes the next process. After making preparations for restarting the process, execute processing corresponding to the cause of the interrupt. When the interrupt processing is completed, the previously saved registers and the like are restored, and execution of the interrupted process is resumed by executing a return instruction from the interrupt.

オペレーティングシステムが実行する割り込み処理は、
全プロセスに共通のものであるため、画一的でアシ、各
プロセスの差異に応じた細かな処理を行なうことは困難
である。そこで、コンピュータシステムにとって、致命
的な障害が発生したことによる割り込みは、一般的な処
置法が存在しない場合、−律に割り込み発生の原因とな
ったプロセスを強制終了させるのが通常である。たとえ
ば、存在しない主記憶を参照しようとした場合に発生す
る割シ込みなどがこれに相当する。上記の様に、割り込
みに対する処置が一律である場合、不都合を生ずること
が多々ある。
Interrupt processing performed by the operating system is
Since it is common to all processes, it is difficult to perform detailed processing according to the differences between each process. Therefore, in the case of an interrupt caused by a fatal failure in a computer system, if there is no general method for dealing with it, the process that caused the interrupt is usually forcibly terminated. For example, an interrupt that occurs when an attempt is made to reference a non-existent main memory corresponds to this. As described above, if the treatment for interrupts is uniform, inconveniences often occur.

近年、コンピュータには高度な機能を持つ命令が実現さ
れる場合が多い。これらは、従来複数個の命令を一連の
手順で実行することにより実現していた機能を、−命令
で実行可能にする様実現された命令であり、たとえば、
複数個のデータを一括して、ある番地から他の番地へ転
送する機能を持つ命令などがある。この種の命令は、実
行する内容が複雑であシ、又繰シ返し機能を含む場合も
あるなど、実行が長時間に及ぶ場合がある。たとえば、
上記の転送命令によシ、10万個のデータを転送する様
な場合、1oOミリ秒程度の時間を要する。これは、通
常ナノ秒からマイクロ秒で一命令を実行するコンピュー
タにとって、極めて長い時間である。
In recent years, instructions with advanced functions have often been implemented in computers. These are instructions that are realized in such a way that functions that were conventionally achieved by executing multiple instructions in a series of steps can be executed with a - instruction.For example,
There are instructions that have the function of transferring multiple pieces of data at once from one address to another. This type of instruction may have complicated content to execute, may include a repetitive function, and may take a long time to execute. for example,
When 100,000 pieces of data are transferred using the above transfer command, it takes about 100 milliseconds. This is an extremely long time for computers, which typically execute an instruction in nanoseconds to microseconds.

割シ込みは、通常−個の命令の実行を終了し、次の命令
の実行を開始するまでの間に受は付けられる。したがっ
て、上記の様に長時間コンピュータを占有して実行され
る高機能命令は、その実行中割シ込み不能となるので、
割り込み機能にとっては不都合である。そこで、高機能
命令の中には命令の実行途中であっても割り込み可能な
様に実現されるものも多い。当然側シ込みが発生して命
令の実行が中断されても、その時点でのフンチクストを
退避しておけば、命令の実行を再開することは容易であ
るし、この時退避される命令カウンタの値を現在実行中
の命令の置かれている番地を示す様にしておけば矛盾を
生ずることもない。
Interrupts are normally accepted between the end of execution of one instruction and the start of execution of the next instruction. Therefore, as mentioned above, high-performance instructions that occupy the computer for a long time and are executed cannot be interrupted during their execution.
This is inconvenient for interrupt functions. Therefore, many high-performance instructions are implemented so that they can be interrupted even during the execution of the instruction. Of course, even if a side interrupt occurs and instruction execution is interrupted, it is easy to resume instruction execution by saving the current value of the instruction counter. If the value is set to indicate the address where the currently executed instruction is located, no conflicts will occur.

ところで、オペレーティングシステムは、上記の様な高
機能命令の実行中に発生する割り込みに対しても、他の
場合の割シ込みと同様、−律に対処しようとする0した
がって致命的な障害が発生した場合には、プロセスを強
制終了させるため、それまでの実行結果も失われてしま
い、損失をまねくことになる。もし、割シ込み処理でプ
ロセスを強制終了させない様にしたとしても、今度は一
律にそうなるため、又不都合を生ずることになるO結局
、各プロセスごとに適切な処置がとれる様、割り込み処
理プログラムを実現する必要があるが、プロセスごとに
異なる処理を、各プロセスに対応して割シ込み処理プロ
グラムに付加することは、オペレーティングシステムの
汎用性を欠くことになるし、又、既存のオペレーティン
グシステムの割り込み処理プログラムを大幅に改変する
作業は、通常非常に困難でおって、現実的な方法ではな
いOそこで、オペレーティングシステム内の割り込み処
理は一律な手順で対応可能とし、プロセスに固有な割り
込みに対する処置は、プロセスにまかせることが最良の
方法である。
By the way, the operating system tries to deal with interrupts that occur during the execution of high-performance instructions as described above, just as it does with other interrupts.Therefore, fatal failures occur. If you do this, the process will be forcibly terminated, and the results of the execution up to that point will be lost, resulting in a loss. Even if you prevent processes from being forcibly terminated by interrupt handling, this will occur uniformly, causing another inconvenience.In the end, the interrupt handling program However, adding different processing for each process to the interrupt handling program for each process will reduce the versatility of the operating system, and It is usually very difficult to significantly modify the interrupt handling program of an operating system, and it is not a practical method.Therefore, interrupt handling within the operating system can be handled by a uniform procedure, and the process-specific interrupts can be handled by It is best to let the process take its course.

発明の目的 本発明は、上記従来の割シ込み処理の欠点を除き、−命
令の実行途中に発生した割り込みに対するプロセス固有
の割り込み処理を、プロセスにまかせることを可能にす
る方法を提供することを目的とする。
OBJECTS OF THE INVENTION It is an object of the present invention to provide a method that eliminates the drawbacks of the conventional interrupt processing described above, and allows processes to handle process-specific interrupts for interrupts that occur during instruction execution. purpose.

発明の構成 本発明は、プロセスに関連付けられたフラグ領域と、エ
ラー情報領域とを主記憶中に設けることによシ、上記領
域を介して、プロセスと、割り込み処理プログラムとが
互いに情報を伝達し合うことにより、プロセスからの要
求に応じて割9込み処理プログラムが、プロセス固有な
割9込み処理をプロセスにまかせられる様構成したもの
である。
Structure of the Invention The present invention provides a flag area associated with a process and an error information area in the main memory, so that the process and the interrupt processing program can communicate information to each other via the area. By matching, the interrupt processing program is configured to be able to entrust process-specific interrupt processing to a process in response to a request from the process.

実施例の説明 プロセスは、−命令実行途中の割り込み発生時に、それ
に対応する処理を自ら行ないたい場合、上記フラグ領域
に、−例として値゛1”を、そうでない場合は値”0”
をあらかじめ格納し、又、上記エラー情報領域には、エ
ラー情報無しを意味する値”o”をあらかじめ格納して
から、実行途中での割り込みを検出したい命令の実行を
開始する。もし何らの割り込みも発生しなかった場合、
命令実行終了とともに、次の番地の命令の実行が開始さ
れる。一方、命令実行途中で、従来ならばプロセス強制
終了の原因となる様な割り込みが発生した場合、割り込
み処理プログラムは、フラグ領域を参照して値が”o”
であるならば従来通りそのプロセスを強制終了させ、値
が”1゛であるならば、エラー情報領域に割り込み発生
を意味する、あらかじめ定められた0“′以外の値を格
納する。この時格納する値は、割シ込みの種別に対応し
て、異なる複数個の値を定めておくことも可能である。
The process for explaining the embodiment is as follows: - When an interrupt occurs during instruction execution, if you want to perform the corresponding process yourself, - For example, set the value "1" to the above flag area; otherwise, set the value "0".
is stored in advance, and a value "o" meaning no error information is stored in advance in the error information area, and then execution of the instruction for which an interrupt in the middle of execution is to be detected is started. If no interrupt occurs,
Upon completion of instruction execution, execution of the instruction at the next address begins. On the other hand, if an interrupt occurs during instruction execution that would conventionally cause the process to be forcibly terminated, the interrupt processing program refers to the flag area and changes the value to "o".
If so, the process is forcibly terminated as before, and if the value is "1", a predetermined value other than 0 "', which means the occurrence of an interrupt, is stored in the error information area. As the value to be stored at this time, it is also possible to predetermine a plurality of different values depending on the type of interrupt.

次に割り込み処理プログラムは、退避されたプロセスコ
ンテクストの中の命令カウンタの値に、そのコンピュー
タによって定まる一定の値を加算し、命令カウンタの値
が割り込まれた命令の配置番地の次の番地を示す様に変
更する。この後、従来通り割り込みからの復帰手順を実
行すると、割り込まれた命令の次の命令からプロセスの
実行が再開される。
Next, the interrupt handling program adds a certain value determined by the computer to the value of the instruction counter in the saved process context, and the value of the instruction counter indicates the address next to the location address of the interrupted instruction. Change it as follows. Thereafter, when the procedure for returning from the interrupt is executed as usual, execution of the process is resumed from the instruction following the interrupted instruction.

以上の説明から分る様に、フラグ領域に値“1”を格納
しておくことによシ、命令実行途中に割り込みが発生し
た場合も、プロセスは強制終了させられることなく次の
命令の実行を継続して行なうことが可能となる。そこで
プロセスは、割り込みの有無を検出したい命令の実行終
了後、エラー情報領域を調べ、値が”0”のままである
ならば、割シ込みがなかったことを意味しているので残
シの処理を続行することが可能であるし、“0”以外の
値であるならば、割り込みがあったことを意味している
ので、何らかめ異常があったものと判断してその処置を
行なうことが可能となる。したがって、もし何らかの異
常が発生していたとしても、それまでの実行結果を保存
する等の処置を、プロセス側の判断で行なうことが可能
となる。なお、本発明は、割り込まれた命令の次の命令
の配置番地が、一定の手順で算出可能な場合に適用可能
である。又、本発明は、フラグ領域や、エラー情報・領
域に格納する値を、上記説明中で用いた値にのみ限定す
るものではない。
As you can see from the above explanation, by storing the value "1" in the flag area, even if an interrupt occurs during instruction execution, the process will not be forcibly terminated and the next instruction will be executed. It becomes possible to continue to do so. Therefore, after the process finishes executing the instruction for which you want to detect the presence or absence of an interrupt, it checks the error information area, and if the value remains "0", it means that there was no interrupt, so there is no remaining information. It is possible to continue processing, and if it is a value other than "0", it means that there was an interrupt, so it is necessary to judge that there is some kind of abnormality and take corrective action. becomes possible. Therefore, even if some abnormality occurs, it is possible for the process to take measures such as saving the execution results up to that point. Note that the present invention is applicable to a case where the location address of the next instruction after the interrupted instruction can be calculated using a fixed procedure. Further, the present invention does not limit the values stored in the flag area and the error information/area to the values used in the above description.

発明の効果 以上述べて来た様に、本発明による方法によれば、オペ
レーティングシステムの割り込み処理にわずかな量の一
定の手続きを追加するのみで、従来は一律にプロセスを
強制終了させざるを得なかった割り込みに対して、プロ
セス側がそのプロセスに固有な方法で対処することを可
能にし、コンピュータ利用面での自由度をいちじるしく
向上させることを可能とし、その効果の大なるものがあ
るO
Effects of the Invention As described above, according to the method of the present invention, only a small amount of certain procedures are added to the interrupt handling of the operating system, which in the past had no choice but to forcefully terminate processes. It enables a process to deal with interrupts that were not present in a way unique to that process, greatly improving the degree of freedom in computer usage, and has a great effect.

Claims (1)

【特許請求の範囲】[Claims] プロセスに関係付けられたフラグ領域と、エラー情報領
域とを主記憶中に設け、プロセスが、上記フラグ領域に
所定の値を格納しておいた場合、割り込みの発生によっ
て起動される割り込み処理プログラムが、上記エラー情
報領域に所定のエラー情報を格納し、割り込み時に退避
されたコンテクスト中の命令カウンタの値を、次の命令
の配置番地を示す様変更して割り込みから復帰すること
によって、割り込まれた命令の次の番地の命令からプロ
セスの実行を再開し、プロセス側で、エラー情報領域の
内容を調査することによって、直前の一個の命令の実行
中の割り込みの有無を判定しもし割り込みがあった場合
にはプロセスに固有の割り込み処理を実行可能にするこ
とを特徴とする割り込み処理方法。
If a flag area and an error information area associated with a process are provided in main memory, and the process stores a predetermined value in the flag area, the interrupt handling program that is started when an interrupt occurs , stores the specified error information in the above error information area, changes the value of the instruction counter in the context saved at the time of the interrupt to indicate the location address of the next instruction, and returns from the interrupt. Process execution is resumed from the instruction at the next address, and the process checks the contents of the error information area to determine whether there is an interrupt during the execution of the previous instruction. An interrupt processing method characterized in that, in some cases, it is possible to execute process-specific interrupt processing.
JP13139484A 1984-06-26 1984-06-26 Interruption processing method Granted JPS619731A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13139484A JPS619731A (en) 1984-06-26 1984-06-26 Interruption processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13139484A JPS619731A (en) 1984-06-26 1984-06-26 Interruption processing method

Publications (2)

Publication Number Publication Date
JPS619731A true JPS619731A (en) 1986-01-17
JPH0531774B2 JPH0531774B2 (en) 1993-05-13

Family

ID=15056941

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13139484A Granted JPS619731A (en) 1984-06-26 1984-06-26 Interruption processing method

Country Status (1)

Country Link
JP (1) JPS619731A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56135249A (en) * 1980-03-25 1981-10-22 Fujitsu Ltd Interruption control system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56135249A (en) * 1980-03-25 1981-10-22 Fujitsu Ltd Interruption control system

Also Published As

Publication number Publication date
JPH0531774B2 (en) 1993-05-13

Similar Documents

Publication Publication Date Title
JPH03175537A (en) Error controller for debugging microprocessor
JPS619731A (en) Interruption processing method
JPH02304635A (en) Program runaway detecting system
JPH01286029A (en) Microprogram patching system
JPS58192152A (en) System for monitoring completion of process
JPH04332055A (en) Method for detecting program runaway
KR960014825B1 (en) Information processing system
JPS6136665B2 (en)
JPS60214044A (en) Microcomputer
JPS594743B2 (en) Multiprocessor system information
JPS6212538B2 (en)
JPS6158054A (en) Run away detection of program
JPH02304624A (en) Information processor
JPH0784786A (en) Program execution control method
JPH04205144A (en) Microprocessor
JPS59144955A (en) Information processor
JP3029355B2 (en) Single-step instruction execution method
JPH02201654A (en) Break interruption control system for time sharing system
JPS6252900B2 (en)
JPS6154542A (en) Task control system
JPH02244345A (en) Information processor
JPS6266357A (en) File controller
JPS62217326A (en) Computer capable of storing and switching plural os
JPH0764909A (en) Management device for execution order of on-line job processing
JPH0259933A (en) Microprocessor

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term