JP3304524B2 - System call function processing unit - Google Patents

System call function processing unit

Info

Publication number
JP3304524B2
JP3304524B2 JP19867793A JP19867793A JP3304524B2 JP 3304524 B2 JP3304524 B2 JP 3304524B2 JP 19867793 A JP19867793 A JP 19867793A JP 19867793 A JP19867793 A JP 19867793A JP 3304524 B2 JP3304524 B2 JP 3304524B2
Authority
JP
Japan
Prior art keywords
operating system
function
simulation
program
processing
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 - Fee Related
Application number
JP19867793A
Other languages
Japanese (ja)
Other versions
JPH0756746A (en
Inventor
勝 酒井
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 JP19867793A priority Critical patent/JP3304524B2/en
Publication of JPH0756746A publication Critical patent/JPH0756746A/en
Application granted granted Critical
Publication of JP3304524B2 publication Critical patent/JP3304524B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、計算機の第1のオペレ
ーティングシステムに規定されているシステムコール関
数の実行を、第2のオペレーティングシステムのもとで
シミュレートするためのシステムコール関数処理装置に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a system call function processing device for simulating the execution of a system call function specified in a first operating system of a computer under a second operating system. .

【0002】[0002]

【従来の技術と発明が解決しようとする課題】公知のプ
ログラミング言語であるC言語で記述されたプログラム
は、各種の異なるオペレーティングシステムのもとで実
行することが、比較的容易である。
2. Description of the Related Art It is relatively easy to execute a program written in C, which is a known programming language, under various different operating systems.

【0003】その場合に、C言語で記述されたプログラ
ムは、本来は公知のUNIXオペレーティングシステム
のもとで実行することが想定されているので、UNIX
以外の第2のオペレーティングシステムのもとで実行す
る場合に、UNIXシステムのサービス機能であるシス
テムコール関数の実行を第2のオペレーティングシステ
ムでシミュレートすることが必要である。
In such a case, a program written in the C language is originally assumed to be executed under a known UNIX operating system.
When executing under a second operating system other than the above, it is necessary to simulate execution of a system call function which is a service function of the UNIX system by the second operating system.

【0004】そのようなシミュレーションでは、第1の
オペレーティングシステムであるUNIXシステムのシ
ステムコール関数が呼び出された場合に、それを実行す
る第2のオペレーティングシステムのシミュレーション
部は、UNIXシステムが実行したと同様の処理結果
を、システムコール関数呼出元プログラムに返さなけれ
ばならない。
In such a simulation, when a system call function of a UNIX system, which is a first operating system, is called, a simulation unit of a second operating system that executes the function is similar to that executed by the UNIX system. Must be returned to the system call function calling program.

【0005】ここで、UNIX等のシステムコール関数
に共通のインタフェースとして、システムコール関数が
実行されると、実行結果としてシステムコール関数の値
が呼出元に返されると共に、その実行結果の状態を示す
復帰コードの設定がある。
Here, when a system call function is executed as an interface common to system call functions such as UNIX, the value of the system call function is returned to the caller as an execution result, and the state of the execution result is indicated. There is a return code setting.

【0006】復帰コードは、システムコール関数の実行
が正常に終了したか、或いはどのような種類の要因で中
断したか等の終了状態を表すコードであって、実行され
る計算機に関わらずUNIXとして標準化されているの
で、シミュレーション部はシミュレーション実行の状態
に応じて適当な復帰コードを呼出元に返すように構成さ
れる。
[0006] The return code is a code indicating an end state such as whether the execution of the system call function has been completed normally or interrupted by what kind of factors, etc., regardless of the computer to be executed. Since it is standardized, the simulation unit is configured to return an appropriate return code to the caller according to the state of the simulation execution.

【0007】C言語で記述されたプログラムでは、例え
ばシステムコール関数の実行から復帰した直後に復帰コ
ードの値によって必要な処理へ分岐するようにプログラ
ムを記述して、復帰コードを使用する。
In a program written in the C language, for example, immediately after returning from execution of a system call function, a program is described so as to branch to necessary processing depending on the value of a return code, and the return code is used.

【0008】このようにすることにより、C言語で記述
されたプログラムに対して、計算機の相異から独立な、
UNIX標準のインタフェースを保存することができ
る。しかし一方で、実行する計算機システムに固有のエ
ラー状態の詳細等を知る要求がある場合でも、それを取
得する手段が無いという問題がある。
By doing so, a program written in the C language can be executed independently of computers.
UNIX standard interfaces can be stored. However, on the other hand, there is a problem that even when there is a request to know the details of the error state specific to the computer system to be executed, there is no means for acquiring it.

【0009】特に、前記のように計算機の機種独立に標
準化されている復帰コードとは一対一の対応をとり難い
状態情報も多いので、そのような計算機システムでシス
テム固有のエラー情報を取得する必要がしばしば生じ
る。
In particular, since there is a lot of state information that cannot be easily dealt with one-to-one with return codes standardized independently for each computer model as described above, it is necessary to acquire error information unique to the system in such a computer system. Often occurs.

【0010】本発明は、システムコール関数をシミュレ
ートする場合に、元のインタフェースを維持しながら、
必要な場合にシミュレーションシステムに固有のエラー
情報を取得することができるようにしたシミュレーショ
ン処理装置を目的とする。
[0010] The present invention maintains the original interface when simulating a system call function.
It is an object of the present invention to provide a simulation processing apparatus capable of acquiring error information unique to a simulation system when necessary.

【0011】[0011]

【課題を解決するための手段】図1は、本発明の構成を
示すブロック図である。図はシミュレーション処理装置
の構成であり、第1のオペレーティングシステムに規定
されているシステムコール関数の実行を、第2のオペレ
ーティングシステム1の制御下のシミュレーション部2
が、呼出元プログラムの指定する該システムコール関数
についてシミュレートする装置であって、エラー情報処
理部3を設ける。
FIG. 1 is a block diagram showing the configuration of the present invention. FIG. 1 shows a configuration of a simulation processing apparatus, which executes a system call function defined in a first operating system by a simulation unit 2 under the control of a second operating system 1.
Is an apparatus for simulating the system call function specified by the calling program, and includes an error information processing unit 3.

【0012】シミュレーション部2は、該シミュレーシ
ョンを実行した場合に、該システムコール関数の実行結
果の状態を呼出元へ返すために第1のオペレーティング
システムに規定されている復帰コードを該呼出元プログ
ラムへ渡すと共に、当該シミュレーションの実行で第2
のオペレーティングシステム1が検出した状態を示す情
報を取得し、エラー情報4としてエラー情報処理部3へ
渡す。
When the simulation is executed, the simulation unit 2 sends a return code defined in the first operating system to the caller program in order to return the state of the execution result of the system call function to the caller. Handover and the second
The information indicating the state detected by the operating system 1 is acquired and passed to the error information processing unit 3 as error information 4.

【0013】エラー情報処理部3は、該呼出元プログラ
ムから所定のエラー参照関数の呼出があった場合に、当
該呼出元に関するエラー情報4に基づいて生成する情報
を、該エラー参照関数の値として該呼出元プログラムに
渡す。
The error information processing section 3 uses information generated based on the error information 4 about the caller when a predetermined error reference function is called from the caller program as a value of the error reference function. Pass to the calling program.

【0014】[0014]

【作用】本発明のシミュレーション処理装置により、シ
ステムコール関数の呼出元に対して復帰コードをシミュ
レートして、元の第1のオペレーティングシステムにお
けるインタフェースを完全に保存したシミュレーション
が行われると共に、シミュレーションを実行する第2の
オペレーティングシステムに固有のエラー情報を、第1
のオペレーティングシステムで定まる復帰コードと一対
一の対応が無くても、復帰コードに拘束されることな
く、第2のオペレーティングシステムのエラー情報を取
得することが可能になる。
According to the simulation processing apparatus of the present invention, a return code is simulated for the caller of the system call function, and a simulation in which the original interface in the first operating system is completely preserved is performed. Error information specific to the second operating system to be executed is stored in the first
Even if there is no one-to-one correspondence with the return code determined by the operating system, the error information of the second operating system can be obtained without being restricted by the return code.

【0015】[0015]

【実施例】本発明を例えば前記UNIXのシステムコー
ル関数のシミュレーションに適用する場合には、C言語
で記述できるエラー参照関数として、例えば「_geter
r」というような関数名の関数を設けておく。
When the present invention is applied to the simulation of the UNIX system call function, for example, "_geter" is used as an error reference function that can be described in C language.
A function with a function name such as "r" is provided.

【0016】そのようにしたC言語で記述されたプログ
ラムを、UNIX以外の第2のオペレーティングシステ
ムのもとで実行し、そのプログラムからシステムコール
関数の呼出があった場合に、図1のシミュレーション処
理装置のシミュレーション部2がそのシステムコール関
数の実行をシミュレートする。
The program described in the C language is executed under a second operating system other than UNIX, and when a system call function is called from the program, the simulation processing shown in FIG. The simulation unit 2 of the device simulates the execution of the system call function.

【0017】即ちシミュレーション部2は、所要の各種
システムコール関数について、シミュレーションプログ
ラムを有し、呼出元プログラムから指定されたシステム
コール関数を受け取ると、その関数に対応するシミュレ
ーションプログラムを実行して関数の値を求め、正常に
シミュレーションが完了すれば、求めた関数値を呼出元
プログラムに返す。
That is, the simulation unit 2 has a simulation program for various required system call functions, and upon receiving a designated system call function from a calling program, executes the simulation program corresponding to the function and executes the simulation program. The value is obtained, and when the simulation is completed normally, the obtained function value is returned to the calling program.

【0018】又シミュレーション部2は、各シミュレー
ションプログラムが実行中に自身で識別する所要の処理
状態や、シミュレーション部2の実行を管理する第2の
オペレーティングシステム1で検出される状態を、オペ
レーティングシステムから取得する処理状態の情報に基
づいて、UNIXで標準化された前記の復帰コードの値
を決定して、その復帰コードを呼出元プログラムに返
し、シミュレーションは終了する。
Further, the simulation unit 2 transmits, from the operating system, a required processing state identified by itself during execution of each simulation program and a state detected by the second operating system 1 which manages the execution of the simulation unit 2. The value of the return code standardized by UNIX is determined based on the processing state information to be obtained, and the return code is returned to the calling program, and the simulation ends.

【0019】その後、シミュレーション部2は、第2の
オペレーティングシステムから取得した状態情報を、例
えば第2のオペレーティングシステムが呼出元プログラ
ムの実行を管理するためのプロセス番号と関連付けたエ
ラー情報として、エラー情報処理部3に渡して処理を終
わる。
Thereafter, the simulation section 2 converts the state information acquired from the second operating system into error information associated with, for example, a process number for managing the execution of the calling program by the second operating system. The processing is passed to the processing unit 3 and the processing ends.

【0020】エラー情報処理部3は、C言語で記述され
たプログラムの実行で「_geterr」関数の呼出があると
処理を開始し、その関数の呼出元プログラムのプロセス
番号に対応するエラー情報を取り出し、そのエラー情報
又はそれを加工したデータを「_geterr」関数の求める
値として呼出元プログラムに返す。
The error information processing section 3 starts processing when the "_geterr" function is called during execution of a program described in C language, and extracts error information corresponding to the process number of the calling program of the function. The error information or data obtained by processing the error information is returned to the calling program as a value determined by the "_geterr" function.

【0021】図2は本発明のシミュレーション処理装置
の、処理の流れの一例を示す図であり、システムコール
関数の呼出があるとシミュレーション部2の処理を開始
し、処理ステップ10で指定の関数を識別し、識別した関
数の実行のシミュレーションを処理ステップ11で実行し
て、関数の値を求める。
FIG. 2 is a diagram showing an example of the processing flow of the simulation processing apparatus of the present invention. When a system call function is called, the processing of the simulation section 2 is started, and a specified function is executed in processing step 10. The identified and simulated execution of the identified function is performed in processing step 11 to determine the value of the function.

【0022】処理ステップ12で関数実行のシミュレーシ
ョンが正常状態(関数値を求めることに成功した状態)
で終了したか識別し、正常終了なら処理ステップ13で、
求めた関数値を呼出元プログラムに返す。又正常終了で
無い場合には、処理ステップ14で、第2のオペレーティ
ングシステム1から状態情報を取得して保持する。
In the processing step 12, the function execution simulation is in a normal state (a state in which the function value has been successfully obtained).
And if it ends normally, in processing step 13,
Return the calculated function value to the calling program. If the processing has not been completed normally, the status information is acquired from the second operating system 1 and held in the processing step 14.

【0023】処理ステップ15で、自身で検出した状態を
記憶した情報、及びオペレーティングシステムの状態情
報に基づいて復帰コードを生成し、処理ステップ16で復
帰コードを呼出元プログラムに返す。
In a processing step 15, a return code is generated based on the information storing the state detected by itself and the state information of the operating system. In a processing step 16, the return code is returned to the calling program.

【0024】次に処理ステップ17で、状態情報を前記の
ようにプロセス番号と対応付けたエラー情報としてエラ
ー情報処理部3に渡して処理を終わる。エラー参照関数
の呼出があった場合にエラー情報処理部3は処理を開始
し、処理ステップ20で関数呼出元に該当するエラー情報
を取り出し、取り出したエラー情報から処理ステップ21
でエラー参照関数の関数値を生成し、求めた関数値を処
理ステップ22で呼出元プログラムに返す。
Next, in processing step 17, the status information is passed to the error information processing section 3 as error information associated with the process number as described above, and the processing is terminated. When the error reference function is called, the error information processing unit 3 starts processing, extracts error information corresponding to the function call source in processing step 20, and performs processing step 21 from the extracted error information.
Generates a function value of the error reference function, and returns the obtained function value to the calling program in a processing step 22.

【0025】[0025]

【発明の効果】以上の説明から明らかなように本発明に
よれば、計算機の第1のオペレーティングシステムに規
定されたシステムコール関数の実行を、第2のオペレー
ティングシステムのもとでシミュレートする装置におい
て、システムコール関数の呼出元に対して、元の第1の
オペレーティングシステムにおけるインタフェースを完
全に保存したシミュレーションが行われると共に、第1
のオペレーティングシステムで定まる復帰コードと一対
一の対応が無くても、復帰コードに拘束されることな
く、第2のオペレーティングシステムに固有のエラー情
報を取得することが可能になるという著しい工業的効果
がある。
As is apparent from the above description, according to the present invention, an apparatus for simulating the execution of a system call function defined in a first operating system of a computer under a second operating system. In the simulation for the caller of the system call function, the simulation in which the interface in the original first operating system is completely preserved is performed.
Even if there is no one-to-one correspondence with the return code determined by the operating system, there is a remarkable industrial effect that error information unique to the second operating system can be obtained without being restricted by the return code. is there.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 本発明の構成を示すブロック図FIG. 1 is a block diagram showing the configuration of the present invention.

【図2】 本発明の処理の流れ図FIG. 2 is a flowchart of the process of the present invention.

【符号の説明】[Explanation of symbols]

1 第2のオペレーティングシステム 2 シミュレーション部 3 エラー情報処理部 4 エラー情報 10〜17、20〜21 処理ステップ DESCRIPTION OF SYMBOLS 1 2nd operating system 2 Simulation part 3 Error information processing part 4 Error information 10-17, 20-21 Processing steps

フロントページの続き (56)参考文献 特開 平1−67648(JP,A) 特開 昭62−121549(JP,A) 特開 平4−123144(JP,A) 特開 昭63−76027(JP,A) 乾和志,「分散OS Mach3. 0」,bit,日本,共立出版株式会 社・発行,1992年 6月 1日,Vo l.24,No.6,pp.17−25,特許 庁CSDB文献番号:CSNW 199800653002 (58)調査した分野(Int.Cl.7,DB名) G06F 9/455 G06F 9/46 G06F 11/00 G06F 11/28 - 11/34 CSDB(日本国特許庁) JSTファイル(JOIS)Continuation of front page (56) References JP-A-1-67648 (JP, A) JP-A-62-121549 (JP, A) JP-A-4-123144 (JP, A) JP-A-63-76027 (JP, A) , A) Kazushi Inui, "Distributed OS Mach 3.0", bit, Japan, published by Kyoritsu Shuppan Co., Ltd., June 1, 1992, Vol. 24, No. 6, pp. 17-25, Patent Office CSDB Document No .: CSNW 199800653002 (58) Fields investigated (Int. Cl. 7 , DB name) G06F 9/455 G06F 9/46 G06F 11/00 G06F 11/28-11/34 CSDB ( Japan Patent Office) JST file (JOIS)

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 第1のオペレーティングシステムに規定
されているシステムコール関数の実行を、第2のオペレ
ーティングシステムの制御下呼出元プログラムの指定
する該システムコール関数についてシミュレートする装
置であって、シミュレーション部と、エラー情報処理部
を設け、前記 シミュレーション部は、呼出元プログラムから指定
されたシステムコール関数を受け取ると、その関数の値
をシミュレーションプログラムによって求めると共に、
そのシミュレーションプログラムの実行に当たって前記
第2のオペレーティングシステムから検出された処理状
態の情報を、前記エラー情報処理部へ渡すとともに、該
情報に基づいて第1のオペレーティングシステムに規定
されている復帰コードを該呼出元プログラムへ渡前記 エラー情報処理部は、該呼出元プログラムから所定
のエラー参照関数の呼出があった場合に、前記シミュレ
ーション部より渡された前記第2のオペレーティングシ
ステムから検出された処理状態の情報を、該エラー参照
関数の値として該呼出元プログラムに渡すように構成さ
れていることを特徴とするシステムコール関数処理装
置。
The method according to claim 1] of system call functions that are defined in the first operating system, for the system call function to specify the calling program under the control of a second operating system to a device for simulating, Simulation unit and error information processing unit
The door is provided, wherein the simulation unit, designated by the calling program
When the received system call function is received, the value of that function
With a simulation program,
In executing the simulation program,
Processing status detected from the second operating system
State information to the error information processing unit,
The return code as defined in the first operating system based on the information and passes to the call Demoto program, said error information processing section when there is a call of a predetermined error reference functions from the call Demoto program, Saimule
The second operating system passed by the
A system call function processing device configured to pass information on a processing state detected from a stem to the calling program as a value of the error reference function.
JP19867793A 1993-08-11 1993-08-11 System call function processing unit Expired - Fee Related JP3304524B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP19867793A JP3304524B2 (en) 1993-08-11 1993-08-11 System call function processing unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP19867793A JP3304524B2 (en) 1993-08-11 1993-08-11 System call function processing unit

Publications (2)

Publication Number Publication Date
JPH0756746A JPH0756746A (en) 1995-03-03
JP3304524B2 true JP3304524B2 (en) 2002-07-22

Family

ID=16395215

Family Applications (1)

Application Number Title Priority Date Filing Date
JP19867793A Expired - Fee Related JP3304524B2 (en) 1993-08-11 1993-08-11 System call function processing unit

Country Status (1)

Country Link
JP (1) JP3304524B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9189291B2 (en) 2005-12-12 2015-11-17 International Business Machines Corporation Sharing a kernel of an operating system among logical partitions
US9201703B2 (en) 2006-06-07 2015-12-01 International Business Machines Corporation Sharing kernel services among kernels

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62121549A (en) * 1985-11-22 1987-06-02 Hitachi Ltd High speed system for os simulator
JPS6376027A (en) * 1986-09-19 1988-04-06 Fujitsu Ltd Fault analyzing system in computer
JPS6467648A (en) * 1987-09-08 1989-03-14 Nec Corp Message output system
JPH04123144A (en) * 1990-09-13 1992-04-23 Toshiba Corp Debuging device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
乾和志,「分散OS Mach3.0」,bit,日本,共立出版株式会社・発行,1992年 6月 1日,Vol.24,No.6,pp.17−25,特許庁CSDB文献番号:CSNW199800653002

Also Published As

Publication number Publication date
JPH0756746A (en) 1995-03-03

Similar Documents

Publication Publication Date Title
US5630049A (en) Method and apparatus for testing software on a computer network
EP0532744B1 (en) Improved software debugging system and method especially adapted for code debugging within a multi-architecture environment
US6658650B1 (en) Service entry point for use in debugging multi-job computer programs
US5528753A (en) System and method for enabling stripped object software monitoring in a computer system
US6539501B1 (en) Method, system, and program for logging statements to monitor execution of a program
US4941829A (en) Method for providing a dynamic tutorial display
EP0632377B1 (en) Method for testing a message-driven operating system
US7865883B1 (en) Parallel and asynchronous debugger and debugging method for multi-threaded programs
US7062753B1 (en) Method and apparatus for automated software unit testing
JP3304524B2 (en) System call function processing unit
EP0430708B1 (en) Architecture for server extension
JP2001318805A (en) Test method for built-in system and test system
KR920010412B1 (en) Hardware installing testing program
CN112597717B (en) IP verification method and device and electronic equipment
JP3130798B2 (en) Bus transfer device
JP2616542B2 (en) Pseudo failure generation system
JP3183228B2 (en) Program debugging device and debugging method
JP2788353B2 (en) Task trace method
JPH04308940A (en) Automatic assignment management system for resource in virtual computer system
JP3102443B2 (en) Data input device
JP3039450B2 (en) Stack area switching method and method, and storage medium storing stack area switching program
JPH0361211B2 (en)
JPH0895817A (en) Method for testing information processor
JPH05210508A (en) Program maintaining function
JPH08235029A (en) Storage method for system fault information

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20020409

LAPS Cancellation because of no payment of annual fees