JPH01258040A - Saving restoring processing system for stack information - Google Patents

Saving restoring processing system for stack information

Info

Publication number
JPH01258040A
JPH01258040A JP8590988A JP8590988A JPH01258040A JP H01258040 A JPH01258040 A JP H01258040A JP 8590988 A JP8590988 A JP 8590988A JP 8590988 A JP8590988 A JP 8590988A JP H01258040 A JPH01258040 A JP H01258040A
Authority
JP
Japan
Prior art keywords
stack
processing
interrupt
information
size
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
JP8590988A
Other languages
Japanese (ja)
Inventor
Hatayo Ooishi
大石 旗代
Naoko Ueda
直子 上田
Masaaki Kaburaki
冠城 正明
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP8590988A priority Critical patent/JPH01258040A/en
Publication of JPH01258040A publication Critical patent/JPH01258040A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To reduce the overhead of an operating system by saving/restoring the detailed information of stack information based on stack size set up in a stack by dispatching processing. CONSTITUTION:In case of stacking vector numbers or register information on a stack by interruption inlet processing, the size of the detailed information is also stacked on a stack frame 2. When it is necessary to save/restore the stack information in dispatching processing after the end of interruption and interruption outlet processing, the detailed information is saved/restored in accordance with the stack size 1 stacked on the frame 2. Since the saving/ restoring processing of stack information can be executed by processing for transferring the stack information in accordance with the stack size 1, processing based upon common processing can be reduced, the processing speed of interruption processing can be improved and the overhead of the operating system can be reduced.

Description

【発明の詳細な説明】 〔1既要〕 データ処理システムにおけるマルチタスキング処理機構
を備えたオペレーティングシステム(O8)における割
込み処理でのスタック情報の退避、復元処理方式に関し
、 割込み処理終了後のディスパッチング処理でのオーバヘ
ッドを少なくすることを目的とし、割込み種別毎に設け
られている割込み入り口処理を介して割込み処理に入り
、該割込み処理力J%了すると、共通の割込み出[1処
理を介してディスパッチング処理に制御を渡す形式の割
込み処理で、高位のタスクがディスパッチングされたこ
とにより上記ディスパッチング処理において、上記の割
込み処理で中断されたタスクのスタック’+’n ¥’
iiの退避1復元を行う際、に配割込み入り口処理で、
該割込まれた中断タスクのスタック情報の詳f、lB情
報のスタソクザイズをスタック領域の特定領域に設定す
る丁段を設けて、上記割込み出口処理後のディスパッチ
ング処理で、該スタックに設定されているスタックサイ
ズ情報を元に、スタック情報の詳11;1情報の退避、
復元を行うように構成する。
[Detailed Description of the Invention] [1 Already Required] Regarding a stack information saving and restoring processing method during interrupt processing in an operating system (O8) equipped with a multitasking processing mechanism in a data processing system, Dispatch after completion of interrupt processing In order to reduce the overhead in processing, interrupt processing is entered through the interrupt entry processing provided for each interrupt type, and when the interrupt processing power J% is completed, the common interrupt output [1 In the interrupt processing in which control is passed to the dispatching process, a higher-level task is dispatched, so in the above dispatching process, the stack of tasks interrupted by the above interrupt process '+'n \'
When performing the save 1 restore of ii, in the interrupt entrance processing,
A step is provided to set the stack information details f and lB information of the interrupted task in a specific area of the stack area, and in the dispatching process after the interrupt exit process, the details are set in the stack. Based on the stack size information, save stack information details 11; 1 information,
Configure to perform a restore.

〔産業上の利用分野] 本発明は、データ処理システ1、におけるマルチラス−
1−ング処理機構を備えたオペレーティングシステム(
OS)における割込め処理でのスタック情報の退避、復
元処理方式に関する。
[Industrial Application Field] The present invention is directed to a multi-laser system in a data processing system 1.
An operating system with a processing mechanism (
This invention relates to a method for saving and restoring stack information during interrupt processing in an operating system (OS).

最近の計算機システムによるデータ処理の多様化と、複
雑化に伴って、該データ処理を複数個のタスクに分割し
て処理するマルチタスキング処理においては、割込み処
理、一般処理等で共用されているディスパッチング処理
でのオーバヘッドが増大する動向にある。
With the diversification and complexity of data processing in recent computer systems, multitasking processing, in which data processing is divided into multiple tasks, is commonly used for interrupt processing, general processing, etc. There is a trend of increasing overhead in dispatching processing.

一方、上記割込み処理においては、該割込み処理で高位
のタスクがディスパッチングされると、該割込み処理で
中断された低位のタスクに関連するスタック情報はシス
テムスタック領域からユーザスタック領域に退避させ、
該高位のタスクの処理が終了、又は該タスクの処理が放
棄された時点で、該退避されているスタック情(Uをシ
ステムスタック領域に復元した後再開処理が実行される
ことになるが、該スタック情報の退避、復元を行う為に
は該スタック情報のサイズを認識する必要がある。
On the other hand, in the above interrupt processing, when a high-level task is dispatched in the interrupt processing, stack information related to the low-level task interrupted in the interrupt processing is saved from the system stack area to the user stack area,
When the processing of the higher-level task is completed or the processing of the task is abandoned, the resume processing will be executed after restoring the saved stack information (U) to the system stack area. In order to save and restore stack information, it is necessary to recognize the size of the stack information.

然して、該スタックフレームのサイズが特殊形を持つ割
込み処理は、例えば、ハス・アドレスエラー等の異常系
の割込み処理に限定されており、割込み処理の中ではほ
んの少数であるにもかかわらず、上記割込み処理終了後
のディスパッング処理において、全ての割込み処理に対
してスタックフレームのサイズの判定を行っていて、該
ディスパッチング処理でのオーバヘットを増大させる要
因となっていた。
However, interrupt processing in which the size of the stack frame has a special type is limited to, for example, abnormal interrupt processing such as a hash address error, and although it is only a small number of interrupt processing, the above-mentioned In the dispatching process after interrupt processing is completed, the size of the stack frame is determined for every interrupt process, which is a factor that increases the overhead in the dispatching process.

このような事情から、該ディスパッチング処理でのオー
バヘットを少なくする割込み処理方式、特に、スタック
情報の退避、復元処理方式が必要とされろ。
Under these circumstances, there is a need for an interrupt processing method that reduces the overhead in the dispatching process, particularly for a stack information saving and restoring processing method.

〔従来の技術と発明が解決しようとする課題〕第2図は
従来のスタック情報の退避、復元処理方式を説明する図
であって、(a)は割込み処理の概念を模式的に示して
おり、(bl) 、 (b2)はスタック情報の構成例
を示し、(cl) 、 (O2)はスタック情報の退避
、復元処理を示し、(d)はスタックフレームのフォー
マットと詳細情報の関係を示し、((りは詳細情報の回
避、復元の処理フローを示している。
[Prior art and problems to be solved by the invention] FIG. 2 is a diagram explaining a conventional stack information saving and restoring processing method, and (a) schematically shows the concept of interrupt processing. , (bl) and (b2) show examples of stack information configurations, (cl) and (O2) show stack information saving and restoring processing, and (d) shows the relationship between stack frame format and detailed information. , (((ri) shows the processing flow for avoiding and restoring detailed information.

先ず、マルチタスキング処理において、割込みが発生す
ると、本図(a)に示した割込み処理機構の割込み入り
口処理11に制御が渡る。このとき、ハードウェア処理
によって、中断したタスクへの中断点情報として、例え
ば、ステータスレジスタ(SR)、 プ[1グラムカウ
ンタ(PC) 、ヘクタテーブルの該割込み要因に対応
するベクタオフセット値、該割込みが異常系の場合には
、更に、該中断点の詳細なハードウェア情報がシステム
スタック ((【)l)図参照)2に設定される。
First, in multitasking processing, when an interrupt occurs, control is passed to the interrupt entry processing 11 of the interrupt processing mechanism shown in FIG. At this time, hardware processing provides interrupt point information to the interrupted task, such as the status register (SR), program counter (PC), vector offset value corresponding to the interrupt factor in the hector table, and the interrupt point information for the interrupted task. If the system is abnormal, detailed hardware information of the interruption point is further set in the system stack (see figure ([)l)) 2.

該割込み入り口処理11では、該割込み要因に対応する
ベクク番号と、そのときのレジスタ情報((b2)図参
照)を該システムスタック2に積み、割込み処理12を
実行する。
In the interrupt entry processing 11, the vector number corresponding to the interrupt factor and the register information at that time (see figure (b2)) are loaded onto the system stack 2, and the interrupt processing 12 is executed.

該割込み処理12が終了すると、割込み出口処理13に
制御が渡る。該割込み出口処理13では、上記中断され
たタスクAのディスパッチング処理14を行うが、該割
込み処理12において、該中断されたタスクの優先度よ
りも高い優先度のタスクBに起動をかけている場合には
、該ディスパッチング処理14において、実行タスクの
切り替えが行われる。
When the interrupt processing 12 ends, control passes to the interrupt exit processing 13. In the interrupt exit process 13, the dispatching process 14 of the interrupted task A is performed, but in the interrupt process 12, task B, which has a higher priority than the interrupted task, is activated. In this case, execution tasks are switched in the dispatching process 14.

該タスクを切り替えるとは、上記システムスタック2に
積まれている中断タスクへのスタック情報を本図の(c
l)に示すように、ユーザスタック3に退避し、システ
ムスタック2のスタソクボインタ(SSP)を該退避し
た分だけ戻す。次に、該実行権を得た上記高い優先度の
タスクBのスタック情÷じをシステムズク、り2に復元
して実行させることを言う。
Switching the task means switching the stack information for the suspended task loaded in the system stack 2 (c) in the figure.
As shown in 1), the data is saved to the user stack 3, and the status pointer (SSP) of the system stack 2 is returned by the saved amount. Next, the stack information of the high-priority task B that has obtained the execution right is restored to the system server 2 and executed.

該タスクF3の実行が終了するか、又は実行権を放棄す
ると、再び割込み出口処理■3に制御が移行し、タスク
八がディスバッチされ実行権を得るように動作する。
When the execution of the task F3 is completed or the execution right is relinquished, control is again transferred to the interrupt exit process 3, and task 8 is dispatched and operates to obtain the execution right.

すると、ディスパッチング処理14においてユーザスタ
ック3に退避していた該中断点のスタック情報が、再び
システムスタック2に復元される。
Then, the stack information at the interruption point that was saved in the user stack 3 in the dispatching process 14 is restored to the system stack 2 again.

(本図(O2)参照) 以上、詳細に述べたように、割込み処理が行われ、中断
されたタスクAより優先度の高いタスクBに起動がかけ
られていると、割込み出口処理13後のディスパッチン
グ処理14において、スタック情報の退避、復元を行う
(Refer to this figure (O2)) As described in detail above, if interrupt processing is performed and task B, which has a higher priority than interrupted task A, is started, after interrupt exit processing 13, In the dispatching process 14, stack information is saved and restored.

このとき、該割込み要因が異常処理であって、詳細情報
を持っている場合には、該詳細情報のサイズを求めなけ
ればならない。該詳細情報のサイズは、前述のスタック
フレーム(本図(bl)システムスタック参照)2のベ
ククオフセントの上位4ビツトに設定されている「フォ
ーマットIDJ21により判断する。
At this time, if the interrupt factor is abnormal processing and detailed information is available, the size of the detailed information must be determined. The size of the detailed information is determined by the "format IDJ21" set in the upper 4 bits of the vector offset of the stack frame 2 (see the system stack in (bl) of this figure).

このスタックフレーム2のフォーマットと詳細情報との
関係を本図(d)の(イ)〜(ホ)に図示する。
The relationship between the format of this stack frame 2 and the detailed information is illustrated in (a) to (e) of this figure (d).

(d)図の(イ)は、通常の割込みにおけるスタックフ
レームで、詳細情報は持っていないが、その他の4つ(
(ロ)〜(ホ))のスタックフレームは異常割込み発生
時のもので詳細情報を持っており、これら異常割込み時
のスタック情報の退避。
(d) Figure (a) is the stack frame for a normal interrupt, and although it does not have detailed information, the other four (
The stack frames (b) to (e)) are from when an abnormal interrupt occurs and have detailed information, and the stack information at the time of these abnormal interrupts is saved.

復元を行う場合には、上記「フレームフォーマットID
J21を判定して詳細情報のサイズを決定し、システム
スタック2とユーザスタック3との間で退避、復元を行
う必要があった。(本図(e)の動作フローのステップ
50〜58参照) 従って、従来の割込み処理方式では、発生頻度の多い通
常の割込み処理においては、その詳細情報が“0”であ
って、発生頻度の少ないバス・アドレスエラー等の異常
系の割込み処理の場合にしか詳細情tしの退避は行われ
ないにもかかわらず、全ての割込みが割込み処理の終了
後進る割込み出口処理13後のディスパッチング処理1
4で、上記[フォーマットID」 21を常に判定して
、退避。
When restoring, use the above “Frame Format ID”
It was necessary to determine the size of the detailed information by determining J21, and to save and restore the information between the system stack 2 and the user stack 3. (Refer to steps 50 to 58 of the operation flow in Figure (e)) Therefore, in the conventional interrupt processing method, in normal interrupt processing that occurs frequently, the detailed information is "0" and the Dispatching processing after interrupt exit processing 13 in which all interrupts proceed after interrupt processing is completed, although detailed information is only saved in the case of abnormal interrupt processing such as a small number of bus address errors. 1
4, always check and save the above [Format ID] 21.

復元の為の該詳細情報のサイズを認識していた為、当該
データ処理システムのオペレーティングシステム(OS
)の処理速度を低下させる要因となっていた。
Knowing the size of the detailed information for restoration, the operating system (OS) of the data processing system
) was a factor that slowed down the processing speed.

本発明は上記従来の欠点に鑑み、データ処理システムに
おけるマルチタスキング処理機構を備えたオペレーティ
ングシステム(OS)における割込み処理でのスタック
情報の退避、復元処理方式において、割込み処理には、
割込み要因毎に割込み入り口処理が設けられていて、該
割込み要因と1対1に対応しており、スタックフレーム
の[フォーマノ)IDJを認識しなくても詳細情報のサ
イズが認識できることに着目し、割込み処理によるオペ
レーティングシステム(OS)でのオーバヘッドを少な
くするスタック情報の退避、復元処理方式を提供するこ
とを目的とするものである。
In view of the above conventional drawbacks, the present invention provides a stack information saving and restoring processing method for interrupt processing in an operating system (OS) equipped with a multitasking processing mechanism in a data processing system.
Focusing on the fact that an interrupt entrance process is provided for each interrupt factor, and there is a one-to-one correspondence with the interrupt factor, the size of detailed information can be recognized without recognizing the [Formano] IDJ of the stack frame, It is an object of the present invention to provide a stack information saving and restoring processing method that reduces overhead in an operating system (OS) due to interrupt processing.

〔課題を解決するための手段〕[Means to solve the problem]

上記の問題点は下記の如くに構成されたスタック情報の
退避、復元処理方式によって解決される。
The above problem is solved by a stack information saving and restoring processing method configured as follows.

データ処理システムにおけるマルチタスキング処理機構
を備えたオペレーティングシステム(OS)において、 割込み種別毎に設けられている割込み入り口処理を介し
て割込み処理に入り、該割込み処理が終了すると、共通
の割込み出口処理を介してディスパッチング処理に制御
を渡す形式の割込み処理で、高位のタスクがディスパッ
チングされたことにより、上記ディスパッチング処理で
上記の割込み処理で中断されたタスクのスタック情報の
退避、復元を行う際、 上記割込み入り口処理で、該割込まれた中断タスクのス
タック情報の詳細情報のスタックサイズをスタック領域
の特定領域に設定する手段を設けて、 上記割込み出口処理後のディスパッチング処理で、該ス
タックに設定されているスタックサイズ情報を元に、ス
タック情報の詳細情報の退避、復元を行うように構成す
る。
In an operating system (OS) equipped with a multitasking processing mechanism in a data processing system, interrupt processing is entered via an interrupt entry processing provided for each interrupt type, and when the interrupt processing is completed, a common interrupt exit processing is performed. In interrupt processing in which control is passed to dispatching processing via In this case, in the interrupt entry process, a means is provided to set the stack size of the detailed stack information of the interrupted task in a specific area of the stack area, and in the dispatching process after the interrupt exit process, The configuration is configured to save and restore detailed stack information based on the stack size information set in the stack.

〔作用〕[Effect]

即ち、本発明によれば、通常、割込み処理では、割込み
要因毎に割込み入り自処理が設けられていて、該割込み
要因と1対Iに対応しており、スタックフレーム内の[
フォーマットIDJを判定しなくても、スタック情報の
詳細情報のサイズを認識できることに着目して、割込み
入り自処理で、ベクタ番号やレジスタ情報をスタックに
積むとき、その詳細情報のサイズもスタックフレームに
積んでおき、該割込みが終了して、割込み出口処理後の
ディスパッング処理において、該スタック情報の退避、
復元を行う必要が生じた時には、該スタックフレームに
積まれているスタックサイズに従って詳細情報の退避を
行うようにしたものであるので、「フォーマ・7ト■D
」の判定処理が不要となり、該スタックサイズを見てス
タック情報を転送する処理で済む為、該共通処理での処
理が削減され、割込み処理の処理速度が向トし、オペレ
ーティングシステム(OS)のオーバヘットを低減させ
る効果がある。
That is, according to the present invention, normally, in interrupt processing, an interrupt self-processing is provided for each interrupt cause, and there is a one-to-I correspondence with the interrupt cause, and [[
Focusing on the fact that the size of detailed stack information can be recognized without determining the format IDJ, when the vector number and register information are loaded onto the stack during interrupt processing, the size of the detailed information is also stored in the stack frame. The stack information is saved, and when the interrupt ends and the dispatching process is performed after the interrupt exit process, the stack information is saved.
When it is necessary to restore, detailed information is saved according to the stack size loaded in the stack frame, so "Former 7 D
” judgment processing is no longer necessary, and only the processing of checking the stack size and transferring the stack information reduces the processing in the common processing, increases the processing speed of interrupt processing, and improves the operating system (OS). This has the effect of reducing overhead.

〔実施例〕〔Example〕

以下本発明の実施例を図面によって詳述する。 Embodiments of the present invention will be described in detail below with reference to the drawings.

第1図が本発明の一実施例を示した図であって、(a)
はスタックフレームの構成例を示し、(b)は本発明を
実施した場合の詳細情報の退避、復元の処理フローを示
しており、(a)図に示したスタックフレーム2内に設
けられたスタックサイズ■が本発明を実施するのに必要
な手段である。尚、全図を通して同じ符号は同じ対象物
を示している。
FIG. 1 is a diagram showing an embodiment of the present invention, (a)
2 shows an example of the configuration of a stack frame, (b) shows the processing flow for saving and restoring detailed information when the present invention is implemented, and (a) shows the stack provided in the stack frame 2 shown in the figure. Size 1 is the means necessary to carry out the invention. Note that the same reference numerals indicate the same objects throughout the figures.

以下、第2図(a)に示した割込み処理の41!念図を
参照しながら第1図によって、本発明によるスタック情
報の退避、復元処理方式を説明する。
Hereinafter, 41! of the interrupt processing shown in FIG. 2(a) will be explained. The stack information saving and restoring processing method according to the present invention will be explained with reference to FIG. 1 while referring to a conceptual diagram.

本発明を実施しても、割込み処理の基本的な動作は従来
方式と特に変わることはないので省略し、ここでは、ス
タックフレーム2の退避、復元処理を中IC弓こして説
明する。
Even if the present invention is implemented, the basic operation of interrupt processing is not particularly different from the conventional method, so the description thereof will be omitted, and here, the saving and restoring processing of the stack frame 2 will be explained with reference to the middle IC.

前述のように、割込み処理においては、各割込み要因毎
に、1対1対応の割込み入り自処理11が設けられてい
る。
As described above, in interrupt processing, an interrupt processing 11 is provided for each interrupt factor in one-to-one correspondence.

従って、該割込み入り自処理11においては、スタック
フレームの「フォーマット■D」を判定しなくても、該
割込み処理でスタックすべきハードウェアの詳細情報の
サイズを認識することができる。
Therefore, in the interrupt processing 11, it is possible to recognize the size of the detailed information of the hardware to be stacked in the interrupt processing without determining the "format (D)" of the stack frame.

そこで、本発明においては、第1図(a)に示したよう
に、該割込み入り自処理11で、図示していないベクタ
テーブルのベクタ番号やレジスタ情報をスタック情報と
してスタックフレーム2に積むとき、その詳細情報のサ
イズを[スタックサイズ−jのとじて格納しておき、割
込み処理が終了して割込み出口処理13後のディスパッ
チング処理14において、中断されたタスク八より優先
度の高いタスクBを処理する為に、前述のうよに、該シ
ステムスタック領域に設定されているスタックフレーム
2をユーザスタック領域に退避するとき、該スタックフ
レーム2の特定領域に積まれている「スタックサイズ」
■に従って、該詳細情報の退避を行うように動作する。
Therefore, in the present invention, as shown in FIG. 1(a), when the interrupt processing 11 loads vector numbers and register information of a vector table (not shown) onto the stack frame 2 as stack information, The size of the detailed information is stored as [stack size - j], and in the dispatching process 14 after the interrupt processing is completed and the interrupt exit process 13, task B, which has a higher priority than the interrupted task 8, is For processing, when saving the stack frame 2 set in the system stack area to the user stack area as described above, the "stack size" stacked in the specific area of the stack frame 2 is
According to (2), the detailed information is saved.

第1図(b)は本発明によるスタックの退避、復元を行
う時の処理フローを示したもので、ステップ59゛にお
いて、本発明の「スタックサイズ」■を参照して、サイ
ズ・0か否かを見て、サイズ・0の場合には、詳細情報
がないスタックフレーム2であると認識して、即、その
他のスタック情報の退避処理に入るが、該サイズ≠0の
ときには、ステップ60において、該「スタックサイズ
」■に指示されているサイズの詳細情報を退避し、ステ
ップ61において、システムスタックポインタ(SSP
)の値を該サイズの値だけ減算して、ステップ59°に
戻り、詳細情報がなくなったことを認識した時点でその
他のスタック情報の退避処理に入るようにする。ユーザ
スタック領域3からシステムスタック領域2に復元する
場合についても同じである。
FIG. 1(b) shows the processing flow when saving and restoring the stack according to the present invention. If the size is 0, it is recognized as stack frame 2 with no detailed information, and the process immediately starts saving other stack information. However, if the size is 0, step 60 is performed. , saves the detailed information of the size specified in the "stack size" ■, and in step 61 stores the system stack pointer (SSP
) is subtracted by the value of the size, the process returns to step 59°, and when it is recognized that the detailed information is no longer available, the process for saving other stack information is started. The same applies to the case of restoring from the user stack area 3 to the system stack area 2.

このように、本発明は、割込み種別毎に設けられている
υ1込み入り自処理を介して割込み処理に入り、該割込
み処理が終了すると、共通の割込み出し]処理を介して
ディスパッチング処理に制御を渡す形式の割込み処理で
、高位のタスクがディスパッチングされたことにより、
上記ディスパッチング処理において、上記の割込み処理
で中断されたタスクのスタック情報の退避、復元を行う
際、各割込み入り自処理が各割込み要因にl対lに対応
して設けられていることに着目し、スタックフレームに
詳細情報のサイズを1スタツクサイズ」として設定する
領域を設け、該割込み入り自処理でスタックフレームに
スタック情報を積み込む処理の延長上で、各割込み要因
に対応する詳細情報のサイズを上記「スタックサイズ」
に設定しておき、割込み出口処理後のディスパッチング
処理において、該設定された「スタックサイズ」の値か
ら該詳細情報のサイズを認識して退避、復元を行い、ど
ういう割込み処理であったかを認識することなく一律の
処理でディスパッチング処理が行えるようにした所に特
徴がある。
In this way, the present invention enters the interrupt processing via the υ1 inclusive self-processing provided for each interrupt type, and when the interrupt processing is completed, the dispatching process is controlled via the common interrupt issuing process. As a result of the high-level task being dispatched by interrupt processing in the form of passing
In the above dispatching process, when saving and restoring the stack information of the task interrupted by the above interrupt process, we focused on the fact that each interrupt own process is provided in a 1-to-1 correspondence to each interrupt cause. Then, an area is provided in the stack frame in which the size of detailed information is set as 1 stack size, and as an extension of the process of loading stack information into the stack frame in the interrupt processing itself, detailed information corresponding to each interrupt factor is stored. Change the size to "Stack size" above
is set, and in the dispatching process after the interrupt exit process, the size of the detailed information is recognized from the set "stack size" value, saved and restored, and the type of interrupt process is recognized. The feature is that dispatching processing can be performed in a uniform manner without any hassle.

〔発明の効果〕〔Effect of the invention〕

以上、詳細に説明したように、本発明のスタック情報の
退避、復元処理方式は、通常、割込み処理では、割込み
要因毎に割込み入り自処理が設けられていて、該割込み
要因と1対1に対応しており、スタックフレーム内の[
フォーマットIDJを判定しなくても、スタック情報の
詳細情報のサイズを認識できることに着目して、割込み
入り自処理で、ベクタ番号やレジスタ情報をスタックに
積むとき、その詳細情報のサイズもスタックフレームに
積んでおき、該割込みが終了して、割込み出口処理後の
ディスパチング処理において、該スタック情報の退避、
復元を行う必要が生じた時には、該スタックフレームに
積まれているスタックサイズに従って詳細情報の退避、
復元を行うようにしたものであるので、「フォーマント
IDJの判定処理が不要となり、該スタックサイズを見
てスタック情報を転送する処理で済む為、該共通処理で
の処理が削減され、割込み処理の処理速度が向上し、オ
ペレーティングシステム(O8)のオーバヘッドを低減
させる効果がある。
As described above in detail, in the stack information saving and restoring processing method of the present invention, normally, in interrupt processing, an interrupt self-processing is provided for each interrupt cause, and one-to-one correspondence with the interrupt cause is provided. is supported, and [
Focusing on the fact that the size of detailed stack information can be recognized without determining the format IDJ, when the vector number and register information are loaded onto the stack during interrupt processing, the size of the detailed information is also stored in the stack frame. The stack information is saved, and when the interrupt ends and the dispatching process is performed after the interrupt exit process, the stack information is saved.
When it becomes necessary to perform restoration, detailed information is saved according to the stack size loaded in the stack frame,
Since it is designed to perform restoration, there is no need to perform formant IDJ judgment processing, and it is only necessary to check the stack size and transfer the stack information, reducing the processing in the common processing and interrupt processing. This has the effect of improving the processing speed and reducing the overhead of the operating system (O8).

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

第1図は本発明の一実施例を示した図。 第2図は従来のスタック情報の退避、復元処理方式を説
明する図。 である。 図面において、 11は割込み入り自処理、12は刷込み処理。 13は割込み出口処理。 14はディスパッチング処理。 2はシステムスタック、又はスタックフレー1、。 21は[フォーマットIDJ。 3はユーザスタンク。 50−58.59.59’60.61は処理ステップ。 (α) ′!S警朗の一彰屯例1示じ一霞 早 1 ■ (\ (″)フλ−マ・ソト$(lI7)スタソワフし一ムこ
り) イ乏未のスタッフイ肴報の週迂帆、イ変オL迷理方汽−
Σ零充朗イ番の拘;2$   (軸4)
FIG. 1 is a diagram showing an embodiment of the present invention. FIG. 2 is a diagram illustrating a conventional stack information saving and restoring processing method. It is. In the drawing, 11 is interrupt processing, and 12 is imprint processing. 13 is interrupt exit processing. 14 is dispatching processing. 2 is the system stack, or stack frame 1. 21 is [Format IDJ. 3 is a user tank. 50-58.59.59'60.61 is a processing step. (α)′! S Keirō Ichishotun Example 1 Ichika Hayaday 1 ■ (\ (″) Flama Soto $ (lI7) Stasowaf Shiichimukori) The weekly sailing of the staff's food in the shortest time, I Weird L way of thinking -
ΣZero Mitsuro I number's restraint; 2$ (Axis 4)

Claims (1)

【特許請求の範囲】 データ処理システムにおけるマルチタスキング処理機構
を備えたオペレーティングシステム(OS)において、 割込み種別毎に設けられている割込み入り口処理(11
)を介して割込み処理(12)に入り、該割込み処理(
12)が終了すると、共通の割込み出口処理(13)を
介してディスパッチング処理(14)に制御を渡す形式
の割込み処理で、高位のタスクがディスパッチングされ
たことにより、上記ディスパッチング処理(14)で上
記の割込み処理で中断されたタスクのスタック情報の退
避、復元を行う際、 上記割込み入り口処理(11)で、該割込まれた中断タ
スクのスタック情報の詳細情報のスタックサイズ([1
])をスタック領域(2)の特定領域に設定する手段を
設けて、 上記割込み出口処理(13)後のディスパッチング処理
(14)で、該スタック領域(2)に設定されているス
タックサイズ情報([1])を元に、スタック情報の詳
細情報の退避、復元(60)を行うことを特徴とするス
タック情報の退避、復元処理方式。
[Claims] In an operating system (OS) equipped with a multitasking processing mechanism in a data processing system, interrupt entry processing (11
) and enters the interrupt processing (12) via the interrupt processing (
12) is completed, the above-mentioned dispatching process (14) is dispatched by an interrupt process that passes control to the dispatching process (14) via the common interrupt exit process (13). ), when saving and restoring the stack information of the task interrupted by the above interrupt processing, in the above interrupt entrance processing (11), the stack size ([1
]) in a specific area of the stack area (2), and in the dispatching process (14) after the interrupt exit process (13), the stack size information set in the stack area (2) is A stack information saving and restoring processing method characterized by saving and restoring detailed information of stack information (60) based on ([1]).
JP8590988A 1988-04-07 1988-04-07 Saving restoring processing system for stack information Pending JPH01258040A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8590988A JPH01258040A (en) 1988-04-07 1988-04-07 Saving restoring processing system for stack information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8590988A JPH01258040A (en) 1988-04-07 1988-04-07 Saving restoring processing system for stack information

Publications (1)

Publication Number Publication Date
JPH01258040A true JPH01258040A (en) 1989-10-16

Family

ID=13871948

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8590988A Pending JPH01258040A (en) 1988-04-07 1988-04-07 Saving restoring processing system for stack information

Country Status (1)

Country Link
JP (1) JPH01258040A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004514987A (en) * 2000-11-27 2004-05-20 エイアールエム リミテッド Data processing apparatus and method for saving return state
JP2009129000A (en) * 2007-11-20 2009-06-11 Seiko Epson Corp Task dispatcher program and task dispatcher system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004514987A (en) * 2000-11-27 2004-05-20 エイアールエム リミテッド Data processing apparatus and method for saving return state
JP2011216118A (en) * 2000-11-27 2011-10-27 Arm Ltd Data processing apparatus and method for executing data processing instruction
JP2009129000A (en) * 2007-11-20 2009-06-11 Seiko Epson Corp Task dispatcher program and task dispatcher system

Similar Documents

Publication Publication Date Title
JPH01241631A (en) Interruption and restarting of task processing for virtual computer data processing system
CN101730881A (en) System comprising a plurality of processors and methods of operating the same
KR930009633B1 (en) Interrupt handling method for a data processor
JPH01258040A (en) Saving restoring processing system for stack information
US20030028684A1 (en) Efficient thread programming using a single callback function
US5446892A (en) Method of and apparatus for re-allocating programs in a distributed programming system
JP7092590B2 (en) Security device
US3611312A (en) Method and apparatus for establishing states in a data-processing system
JPH0375836A (en) Succeeding processing memthod for resource information
JPS6148741B2 (en)
JPS6343771B2 (en)
JPS5819094B2 (en) Priority vector interrupt device
WO1990005951A1 (en) Method of handling unintended software interrupt exceptions
JPS5965306A (en) Sequence controller
GB1584419A (en) Data processing apparatus
JPH03273438A (en) Data processor
JPS6218054B2 (en)
JPH04364545A (en) Memory dumping system
JPS63310027A (en) Semiconductor integrated circuit
JPS60204034A (en) Rewriting controlling system of control storage device
JPS63155330A (en) Microprogram controller
JPS6325736A (en) Interruption control system for virtual computer system
JPH02138632A (en) Information saving/restoring system
JPH11161506A (en) Dispatch method for information processor, information processor and storage medium thereof
JP2002082703A (en) Equipment with medium conveyance system, and method and device for its control