JPH0531774B2 - - Google Patents

Info

Publication number
JPH0531774B2
JPH0531774B2 JP59131394A JP13139484A JPH0531774B2 JP H0531774 B2 JPH0531774 B2 JP H0531774B2 JP 59131394 A JP59131394 A JP 59131394A JP 13139484 A JP13139484 A JP 13139484A JP H0531774 B2 JPH0531774 B2 JP H0531774B2
Authority
JP
Japan
Prior art keywords
interrupt
instruction
execution
error information
value
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.)
Expired - Lifetime
Application number
JP59131394A
Other languages
Japanese (ja)
Other versions
JPS619731A (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 JP59131394A 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

Description

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

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

割り込みは、コンピユータシステム上で実行さ
れる全プロセス共用の機能であるため、オペレー
テイングシステムより統一的に取り扱われる。割
り込みが発生すると、オペレーテイングシステム
内の割り込み処理プログラムが起動され、その時
中断したプロセスが使用してたレジスタや命令カ
ウンタ等のプロセスコンテクスを割り込みスタツ
ク等の退避領域に退避して、次にプロセスを再開
するための準備をした後、割り込みを発生した原
因に対応する処理を実行する。割り込み処理が終
了すると、以前に退避したレジスタ等を回復し、
割り込みからの復帰命令を実行することにより中
断したプロセスの実行を再開する。
Since interrupts are a function shared by all processes executed on a computer system, they are handled more uniformly by the operating system. When an interrupt occurs, the interrupt handling program in the operating system is started, saves the process context such as registers and instruction counters used by the interrupted process to a save area such as the interrupt stack, and then starts the next process. After making preparations for restart, execute processing corresponding to the cause of the interrupt. When the interrupt processing is finished, the previously saved registers are restored,
Resume execution of the interrupted process by executing the return-from-interrupt instruction.

オペレーテイングシステムが実行する割り込み
処理は、全プロセスに共通のものであるため、画
一的であり、各プロセスの差異に応じた細かな処
理を行なうことは困難である。そこで、コンピユ
ータシステムにとつて、致命的な障害が発生した
ことによる割り込みは、一般的な処置法が存在し
ない場合、一律に割り込み発生の原因となつたプ
ロセスを強制終了させるのが通常である。たとえ
ば、存在しない主記憶を参照しようとした場合に
発生する割り込みなどがこれに相当する。上記の
様に、割り込みに対する処置が一律である場合、
不都合を生ずることが多々ある。
Since the interrupt processing executed by the operating system is common to all processes, it is uniform, and 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 treatment method, the process that caused the interrupt is normally forcibly terminated. For example, an interrupt that occurs when an attempt is made to reference a non-existent main memory corresponds to this. As mentioned above, if the treatment for interrupts is uniform,
This often causes inconvenience.

近年、コンピユータには高度な機能を持つ命令
が実現される場合が多い。これらは、従来複数個
の命令を一連の手順で実行することにより実現し
ていた機能を、一命令で実行可能にする様実現さ
れた命令であり、たとえば、複数個のデータを一
括して、ある番地から他の番地へ転送する機能を
持つ命令などがある。この種の命令は、実行する
内容が複雑であり、又繰り返し機能を含む場合も
あるなど、実行が長時間に及ぶ場合がある。たと
えば、上記の転送命令により、10万個のデータを
転送する様な場合、100ミリ秒程度の時間を要す
る。これは、通常ナノ秒からマイクロ秒で一命令
を実行するコンピユータにとつて、極めて長い時
間である。
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 single instruction. There are instructions that have the function of transferring data from one address to another. This type of instruction has complicated contents to be executed, and may include repeated functions, so the execution may take a long time. For example, if 100,000 pieces of data are to be transferred using the above transfer command, it will take about 100 milliseconds. This is an extremely long time for computers, which typically execute an instruction in nanoseconds to microseconds.

割り込みは、通常一個の命令の実行を終了し、
次の命令の実行を開始するまでの間に受け付けら
れる。したがつて、上記の様に長時間コンピユー
タを占有して実行される高機能命令は、その実行
中割り込み不能となるので、割り込み機能にとつ
ては不都合である。そこで、高機能命令の中には
命令の実行途中であつても割り込み可能な様に実
現されるものも多い。当然割り込みが発生して命
令の実行が中断されても、その時点でのコンテク
ストを退避しておけば、命令の実行を再開するこ
とは容易であるし、この時退避される命令カウン
タの値を現在実行中の命令の置かれている番地を
示す様にしておけば矛盾を生ずることもない。
An interrupt usually ends the execution of a single instruction,
It is accepted before starting execution of the next instruction. Therefore, the high-performance instructions that are executed while occupying the computer for a long time as described above are not interruptible during their execution, which is inconvenient for the interrupt function. Therefore, many high-performance instructions are implemented so that they can be interrupted even during instruction execution. Of course, even if an interrupt occurs and instruction execution is interrupted, it is easy to resume instruction execution by saving the context at that point. If the address where the currently executed instruction is located is indicated, there will be no inconsistency.

ところで、オペレーテイングシステムは、上記
の様な高機能命令の実行中に発生する割り込みに
対しても、他の場合の割り込みと同様、一律に対
処しようとする。したがつて致命的な障害が発生
した場合には、プロセスを強制終了させるため、
それまでの実行結果も失われてしまい、損失をま
ねくことになる。もし、割り込み処理でプロセス
を強制終了させない様にしたとしても、今度は一
律にそうなるため、又不都合を生ずることにな
る。結局、各プロセスごとに適切な処置がとれる
様、割り込み処理プログラムを実現する必要があ
るが、プロセスごとに異なる処理を、各プロセス
に対応して割り込み処理プログラムに付加するこ
とは、オペレーテイングシステムの汎用性を欠く
ことになるし、又、既存のオペレーテイングシス
テムの割り込み処理プログラムを大幅に改変する
作業は、通常非常に困難であつて、現実的な方法
ではない。
Incidentally, the operating system attempts to uniformly handle interrupts that occur during the execution of high-performance instructions as described above, as well as other interrupts. Therefore, if a fatal failure occurs, the process will be forcibly terminated.
The execution results up to that point will also be lost, resulting in a loss. Even if a process is prevented from being forcibly terminated by interrupt processing, this will occur uniformly, resulting in another inconvenience. In the end, it is necessary to implement an interrupt handling program so that appropriate measures can be taken for each process, but it is difficult for the operating system to add different processing for each process to the interrupt handling program. This results in a lack of versatility, and it is usually very difficult to significantly modify the interrupt processing program of an existing operating system, which is not a practical method.

そこで、オペレーテイングシステム内の割り込
み処理は一律な手順で対応可能とし、プロセスに
固有な割り込みに対する処理は、プロセスにまか
せることが最良の方法である。
Therefore, the best method is to handle interrupt processing within the operating system using a uniform procedure, and leave processing for process-specific interrupts to the processes.

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

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

実施例の説明 プロセスは、一命令実行途中の割り込み発生時
に、それに対応する処理を自ら行ないたい場合、
上記フラグ領域に、一例として値“1”を、そう
でない場合は値“0”をあらかじめ格納し、又、
上記エラー情報領域には、エラー情報無しを意味
する値“0”をあらかじめ格納してから、実行途
中での割り込みを検出したい命令の実行を開始す
る。もし何らの割り込みも発生しなかつた場合、
命令実行終了とともに、次の番地の命令の実行が
開始される。一方、命令実行途中で、従来ならば
プロセス強制終了の原因となる様な割り込みが発
生した場合、割り込み処理プログラムは、フラグ
領域を参照して値が“0”であるならば従来通り
そのプロセスを強制終了させ、値が“1”である
ならば、エラー情報領域に割り込み発生を意味す
る、あらかじめ定められた“0”以外の値を格納
する。この時格納する値は、割り込みの種別に対
応して、異なる複数個の値を定めておくことも可
能である。次に割り込み処理プログラムは、退避
されたプロセスコンテクトの中の命令カウンタの
値に、そのコンピユータによつて定まる一定の値
を加算し、命令カウンタの値が割り込まれた命令
の配置番地の次の番地を示す様に変更する。この
後、従来通り割り込みからの復帰手順を実行する
と、割り込まれた命令の次の命令からプロセスの
実行が再開される。
Description of Example If a process wants to perform the corresponding processing itself when an interrupt occurs during the execution of one instruction,
For example, the value “1” is stored in advance in the flag area, and if not, the value “0” is stored in advance, and
A value "0" 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 handling program refers to the flag area and if the value is "0", the process is terminated as usual. If the process is forcibly terminated and 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 is added to the value of the instruction counter in the saved process context. Change it to show the street address. 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 continue executing the next instruction without being forced to terminate. It becomes possible to do so. Therefore, after the process finishes executing the instruction for which it wants 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 it continues the rest of the process. It is possible to
If it is a value other than "0", it means that an interrupt has occurred, so it is possible to determine that some kind of abnormality has occurred and take measures accordingly. 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. Furthermore, the present invention does not limit the values stored in the flag area and error information area to only the values used in the above description.

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

Claims (1)

【特許請求の範囲】[Claims] 1 プロセスに関係付けられたフラグ領域と、エ
ラー情報領域とを主記憶中に設け、上記プロセス
が、上記フラグ領域に所定の値を格納しておいた
場合、割り込みの発生によつて起動される割り込
み処理プログラムが、上記エラー情報領域に所定
のエラー情報を格納し、割り込み時に退避された
コンテクスト中の命令カウンタの値を、次の命令
の配置番地を示す様変更して割り込みから復帰す
ることによつて、割り込まれた命令の次の番地の
命令から上記プロセスの実行を再開し、上記プロ
セス側で、エラー情報領域の内容を調査すること
によつて、直前の一個の命令の実行中の割り込み
の有無を判定しもし割り込みがあつた場合には上
記プロセスに固有の割り込み処理を実行可能にす
ることを特徴とする割り込み処理方法。
1. A flag area and an error information area associated with a process are provided in main memory, and if the process stores a predetermined value in the flag area, the process is activated by the occurrence of an interrupt. The interrupt processing program stores predetermined error information in the 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. Therefore, by restarting execution of the above process from the instruction at the next address of the interrupted instruction, and checking the contents of the error information area on the above process side, the interrupt during execution of the previous instruction can be detected. 1. An interrupt processing method characterized by determining the presence or absence of a process and, if an interrupt occurs, executing interrupt processing specific to the process.
JP59131394A 1984-06-26 1984-06-26 Interruption processing method Granted JPS619731A (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Publications (2)

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

Family

ID=15056941

Family Applications (1)

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

Country Status (1)

Country Link
JP (1) JPS619731A (en)

Family Cites Families (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
JPS619731A (en) 1986-01-17

Similar Documents

Publication Publication Date Title
JPH03175537A (en) Error controller for debugging microprocessor
JPH04373026A (en) Program interrupting method
JPH0531774B2 (en)
JPH0443301B2 (en)
JPS6136665B2 (en)
JPS594743B2 (en) Multiprocessor system information
JPS586971B2 (en) arithmetic processing unit
JPH0219494B2 (en)
JPH0433130A (en) Multi-chip configuration method
JPS6212538B2 (en)
JPS6252900B2 (en)
JPH02201654A (en) Break interruption control system for time sharing system
JPS6337439B2 (en)
JP2591211B2 (en) High-speed interrupt processing device
JPH0319574B2 (en)
JPS6154542A (en) Task control system
JPS6120139A (en) Interruption control system
JPH03164966A (en) Information processing system
JPS6266357A (en) File controller
JPH01185733A (en) Input/output emulation system
JPH0259933A (en) Microprocessor
JPH0764909A (en) Management device for execution order of on-line job processing
JPH0216652A (en) Missing page processing system
JPH02304624A (en) information processing equipment
JPS6277645A (en) Local job start control system

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term