JPS63247837A - Exception processing system - Google Patents
Exception processing systemInfo
- Publication number
- JPS63247837A JPS63247837A JP8226487A JP8226487A JPS63247837A JP S63247837 A JPS63247837 A JP S63247837A JP 8226487 A JP8226487 A JP 8226487A JP 8226487 A JP8226487 A JP 8226487A JP S63247837 A JPS63247837 A JP S63247837A
- Authority
- JP
- Japan
- Prior art keywords
- exception handling
- program
- exception
- program module
- address
- 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
- 238000000034 method Methods 0.000 claims abstract description 21
- 230000002159 abnormal effect Effects 0.000 abstract description 4
- 230000000694 effects Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000010365 information processing Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
゛ 本発明は、情報処理装置の利用者プログラムの例外
処理方式に関する。特に、利用者プログラムの実行時に
例外処理が発生したとき、例外処理が発生したプログラ
ムモジュールの要求する例外処理を行うための方式に関
するものである。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an exception handling method for a user program of an information processing device. In particular, the present invention relates to a method for performing the exception handling requested by the program module in which the exception handling occurred when an exception handling occurs during execution of a user program.
本発明は利用者プログラムの例外処理方式において、
利用者プログラムを構成する各プログラムモジュールの
中の領域にそのプログラムモジュールの要求する同一言
語タイプの例外処理ルーチンのアドレスを格納しておき
、プログラムモジュールの実行時に例外処理が発生した
ときにオペレーティングシステムはそのプログラムモジ
ュールに格納されたアドレスに基づいて例外処理ルーチ
ンに処理を移すことにより、
例外処理ルーチンが言語タイプの違いのために異常終了
することを防止するようにしたものである。In an exception handling method for a user program, the present invention stores the address of an exception handling routine of the same language type required by the program module in an area in each program module constituting the user program. When an exception occurs during execution, the operating system transfers processing to the exception handling routine based on the address stored in the program module, thereby preventing the exception handling routine from terminating abnormally due to language type differences. It was designed to do so.
利用者プログラムの実行時に例外処理が発生したとき、
オペレーティングシステムにその処理を移ス。オペレー
ティングシステムは、利用者プログラムの最初のプログ
ラムモジュールの言語タイプを参照し、オペレーティン
グシステムにある環境設定で、利用者プログラム全体に
対しての例外処理方式を設定する。利用者プログラムが
単一の言語のプログラムモジュールから構成されるとき
は、この例外処理方式で正しく処理される。しかし、利
用者プログラムが異なった言語のプログラムモジュール
から構成されるときは、各々のプログラムモジュールは
、その言語タイプの要求する例外処理方式を必要とする
。しかし、実際は、そのような例外処理方式は設定して
いなかった。このため、利用者プログラムが異なった言
語のプログラムモジュールから構成されるとき、利用者
プログラムの最初のプログラムモジュールの言語と異な
った言語のプログラムモジュールで発生した例外処理は
、オペレーティングシステムから呼び出された例外処理
ルーチンの中でそのプログラムモジュールが要求するも
のとは異なった例外処理を受け、そのために異常終了し
ていた。このような異常終了を防ぐために、
■ 利用者プログラムの実行時に、プログラムモジュー
ルを呼び出すごとにそのプログラムモジュールの呼び出
し側、または、呼び出された側で動的に例外処理ルーチ
ンの定義を行う方法、■ 利用者プログラムのプログラ
ムモジュールの例外処理ルーチンの定義を実行時オプシ
ョンで指定する方法
などの方法が考えられた。When an exception occurs during execution of a user program,
Transfer the processing to the operating system. The operating system refers to the language type of the first program module of the user program and sets the exception handling method for the entire user program using environment settings in the operating system. When a user program is composed of program modules in a single language, this exception handling method handles the exception correctly. However, when a user program is composed of program modules in different languages, each program module requires the exception handling scheme required by its language type. However, in reality, no such exception handling method was set up. Therefore, when a user program is composed of program modules in different languages, exception handling that occurs in a program module in a language different from the language of the first program module in the user program is an exception called by the operating system. The program module received exception handling in its processing routine that was different from what was required, resulting in an abnormal termination. In order to prevent such abnormal termination, there are two methods: - When a user program is executed, each time a program module is called, the caller or called party of the program module dynamically defines an exception handling routine. Methods such as specifying the definition of an exception handling routine in a program module of a user program using runtime options have been considered.
しかし、このような従来例の例外処理方式では、■の方
法は、利用者プログラムのプログラムモジュールを呼び
出すごとにオーバヘッドが発生する。However, in such conventional exception handling methods, method (2) generates overhead each time a program module of a user program is called.
この負担は、たとえば例外処理を行わない場合でも等し
く要求され効率が悪い欠点があった。This burden is equally required even when no exception handling is performed, which has the drawback of poor efficiency.
また、■の方法は、オプションを指定することは、トラ
ブルを発生する可能性が多い欠点があった。In addition, method ■ has the disadvantage that specifying options is likely to cause trouble.
本発明は上記の欠点を解決するもので、例外処理ルーチ
ンが言語タイプの違いのために異常終了することを防止
し、かつ効率が良く自動的に行える例外処理方式を提供
することを目的とする。The present invention solves the above-mentioned drawbacks, and aims to provide an efficient and automatic exception handling method that prevents exception handling routines from terminating abnormally due to differences in language types. .
本発明は、利用者プログラムを構成する複数個のプログ
ラムモジュールと、この複数個のプログラムモジュール
が要求する例外処理ルーチンと、上記複数個のプログラ
ムモジュールの一つの実行時に例外処理が発生したとき
に、そのプログラムモジュールが要求する例外処理ルー
チンに処理を移すオペレーティングシステムとを備えた
例外処理方式において、上記複数個のプログラムモジュ
ールは、それぞれの言語タイプの要求する例外処理ルー
チンのアドレスを格納する領域を含み、上記オペレーテ
ィングシステムは、この格納されたアドレスに基づいて
処理を移す手段を含むことを特徴とする。The present invention provides a plurality of program modules constituting a user program, an exception processing routine required by the plurality of program modules, and when an exception processing occurs during execution of one of the plurality of program modules. In an exception handling method including an operating system that transfers processing to an exception handling routine requested by the program module, each of the plurality of program modules includes an area for storing the address of the exception handling routine requested by each language type. , the operating system is characterized in that it includes means for transferring processing based on the stored address.
各プログラムモジュールの中の領域にその言語タイプの
要求する例外処理ルーチンのアドレスを格納しておく。The address of the exception handling routine required by the language type is stored in an area within each program module.
プログラムモジュールの実行時に例外処理が発生したと
きにオペレーティングシステムでそのプログラムモジュ
ールに格納されたアドレスに基づいて例外処理ルーチン
に処理を移す。When exception handling occurs during execution of a program module, the operating system transfers the processing to an exception handling routine based on the address stored in the program module.
以上の動作により例外処理ルーチンが言語タイプの違い
のために異常終了することを防止し、かつ効率が良く自
動的に行うことができる。The above-described operation prevents the exception handling routine from abnormally terminating due to a difference in language type, and can be performed efficiently and automatically.
本発明の実施例について図面を参照して説明する。第1
図は本発明一実施例例外処理装置のブロック構成図であ
る。第1図において、例外処理装置は、利用者プログラ
ムlOと、利用者プログラムlOの実行時に例外処理が
発生したとき処理が移されるオペレーティングシステム
20と、オペレーティングシステム20により処理が移
される例外処理ルーチン30とを備える。Embodiments of the present invention will be described with reference to the drawings. 1st
The figure is a block diagram of an exception handling device according to an embodiment of the present invention. In FIG. 1, the exception handling device includes a user program IO, an operating system 20 to which processing is transferred when exception processing occurs during execution of the user program IO, and an exception handling routine 30 to which processing is transferred by the operating system 20. Equipped with.
利用者プログラム10は、プログラムモジュール11を
含む。またプログラムモジュール11はそれぞれの言語
タイプの要求する例外処理のアドレスを格納する領域1
2を含む。さらに、オペレーティングシステム20は、
プログラムモジュール11の実行時に例外処理が発生し
たときそのプログラムモジュール11の領域12に格納
されたアドレスを参照して例外処理ルーチン30に処理
を移す手段を含む。User program 10 includes program modules 11 . In addition, the program module 11 has an area 1 that stores addresses for exception handling required by each language type.
Contains 2. Furthermore, the operating system 20
It includes means for referring to the address stored in the area 12 of the program module 11 when exception processing occurs during execution of the program module 11 and transferring the processing to the exception processing routine 30.
このような構成の例外処理方式の動作について説明する
。プログラムモジュール11内の領域には、コンパイラ
がプログラムモジュール11の言語タイプの要求する例
外処理ルーチン30を示すアドレスを格納する。または
、あるプログラムモジュール11に対する例外処理ルー
チンを利用者が自ら指定し、そのアドレスを当該領域に
格納する。The operation of the exception handling method having such a configuration will be explained. In the area within the program module 11, the compiler stores an address indicating the exception handling routine 30 required by the language type of the program module 11. Alternatively, the user himself/herself specifies an exception handling routine for a certain program module 11 and stores its address in the corresponding area.
第2図は本発明の例外処理装置の動作を示すフローチャ
ートである。第1図および第2図において、プログラム
モジュール11の実行時、例外処理が発生したときに、
オペレーティングシステム20に処理を移す(■)。こ
こから、領域12に格納された対応するアドレスを参照
することにより、例外処理が発生したプログラムモジュ
ール11の要求する例外処理ルーチン30に処理を移し
く■)、ここで、例外処理を行う(■)。このとき、例
外処理が処理の継続に対して致命的であるときは(■)
、利用者プログラムを終了させるための処理を行い、終
了する(■)。例外処理が処理の継続に対して致命的で
ないときは(■)、オペレーティングシステムへ戻り(
■)、利用者プログラムを継続させるための処理を行う
(■)。FIG. 2 is a flowchart showing the operation of the exception handling device of the present invention. In FIGS. 1 and 2, when an exception occurs during execution of the program module 11,
Processing is transferred to the operating system 20 (■). From here, by referring to the corresponding address stored in the area 12, the process is transferred to the exception handling routine 30 requested by the program module 11 where the exception handling occurred (■), and here, the exception handling is performed (■ ). At this time, if the exception handling is fatal to the continuation of processing (■)
, performs processing to terminate the user program, and terminates (■). If the exception handling is not fatal to continuing processing (■), return to the operating system (
■), perform processing to continue the user program (■).
以上説明したように、本発明は、利用者プログラムを構
成するプログラムモジュールの言語タイプの要求する例
外処理ルーチンのアドレスを、そのプログラムモジュー
ルの中の領域にコンパイラで格納し、静的に定義された
この領域を例外発生時にオペレーティングシステムが参
照することにより、要求する例外処理ルーチンへ処理を
移すことができ、プログラムモジュールを呼び出すごと
に動的に例外処理ルーチンを定義する方法に比較して、
例外処理のための負担を少なくすることができる優れた
効果がある。また、ある特定のプログラムモジュールに
対して特別の例外処理を施したいときには、そのための
例外処理ルーチンを利用者が自ら指定することもできる
利点がある。As explained above, the present invention stores the address of the exception handling routine required by the language type of the program module constituting the user program in an area within the program module, and stores the address of the exception handling routine that is statically defined. By referring to this area when an exception occurs, the operating system can transfer the processing to the requested exception handling routine, compared to the method of dynamically defining an exception handling routine each time a program module is called.
This has the excellent effect of reducing the burden of exception handling. Furthermore, when a user wants to perform special exception handling for a particular program module, there is an advantage that the user can specify the exception handling routine for that purpose by himself/herself.
第1図は本発明一実施例例外処理装置のブロック構成図
。
第2図は本発明の例外処理装置の動作を示すフローチャ
ート。
10・・・利用者プログラム、11・・・プログラムモ
ジュール、12・・・プログラムモジュールの言語に従
った例外処理ルーチンを示すアドレスを格納する領域、
20・・・オペレーティングシステム、30・・・例外
処理ルーチン。FIG. 1 is a block diagram of an exception handling device according to an embodiment of the present invention. FIG. 2 is a flowchart showing the operation of the exception handling device of the present invention. 10... User program, 11... Program module, 12... Area for storing an address indicating an exception handling routine according to the language of the program module.
20...Operating system, 30...Exception handling routine.
Claims (1)
モジュールと、 この複数個のプログラムモジュールが要求する例外処理
ルーチンと、 上記複数個のプログラムモジュールの一つの実行時に例
外処理が発生したときに、そのプログラムモジュールが
要求する例外処理ルーチンに処理を移すオペレーティン
グシステムと を備えた例外処理方式において、 上記複数個のプログラムモジュールは、それぞれの言語
タイプの要求する例外処理ルーチンのアドレスを格納す
る領域を含み、 上記オペレーティングシステムは、この格納されたアド
レスに基づいて処理を移す手段を含むことを特徴とする
例外処理方式。(1) A plurality of program modules constituting a user program, an exception handling routine required by the plurality of program modules, and an exception handling routine required by the plurality of program modules; an operating system that transfers processing to an exception handling routine requested by a program module, wherein the plurality of program modules include an area for storing an address of an exception handling routine requested by each language type; The exception handling method is characterized in that the operating system includes means for transferring processing based on the stored address.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP8226487A JPS63247837A (en) | 1987-04-03 | 1987-04-03 | Exception processing system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP8226487A JPS63247837A (en) | 1987-04-03 | 1987-04-03 | Exception processing system |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS63247837A true JPS63247837A (en) | 1988-10-14 |
Family
ID=13769612
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP8226487A Pending JPS63247837A (en) | 1987-04-03 | 1987-04-03 | Exception processing system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS63247837A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0449428A (en) * | 1990-06-19 | 1992-02-18 | Fujitsu Ltd | Method for processing abnormal end |
JPH04199231A (en) * | 1990-11-26 | 1992-07-20 | Oki Electric Ind Co Ltd | Exception relieving system for task processing |
JPH05233326A (en) * | 1991-12-19 | 1993-09-10 | Internatl Business Mach Corp <Ibm> | Method and system for handling event in computer system |
-
1987
- 1987-04-03 JP JP8226487A patent/JPS63247837A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0449428A (en) * | 1990-06-19 | 1992-02-18 | Fujitsu Ltd | Method for processing abnormal end |
JPH04199231A (en) * | 1990-11-26 | 1992-07-20 | Oki Electric Ind Co Ltd | Exception relieving system for task processing |
JPH05233326A (en) * | 1991-12-19 | 1993-09-10 | Internatl Business Mach Corp <Ibm> | Method and system for handling event in computer system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5276896A (en) | Apparatus for implementing data communications between terminal devices and user programs | |
JPS63247837A (en) | Exception processing system | |
JPH01169533A (en) | Object steering programming system | |
EP0614148A1 (en) | Data processing apparatus | |
JPS6049464A (en) | Inter-processor communication system of multi-processor computer | |
JPS5878237A (en) | Data transfer processing switching method | |
JPH0644234B2 (en) | Task management device | |
JPS6126162A (en) | Input/output control method | |
JPS59180741A (en) | Communication control device executing relative address form program | |
JP2785855B2 (en) | Information processing device | |
JPS6314260A (en) | System for generating communication control program | |
JP3149939B2 (en) | Division multitask control method | |
JPS62140145A (en) | Virtual computer system | |
JPS61101864A (en) | Program control system | |
JPS6353650A (en) | Computer | |
JPS593570A (en) | Data transfer controlling system | |
JPH03172937A (en) | Asynchronous event processing handling device | |
JPS6378255A (en) | Execution system for program | |
JPH04153741A (en) | Adverse debugging execution system for debugged program | |
JPS61289796A (en) | Interruption control system for electronic exchange system | |
JPH04266126A (en) | Control system for subroutine call | |
JPH0640312B2 (en) | Program interface method | |
JPS6261102A (en) | Executing method for program in programmable controller | |
JPS61125648A (en) | System call control system | |
JPH06161927A (en) | Data communication system |