JPH0447854B2 - - Google Patents

Info

Publication number
JPH0447854B2
JPH0447854B2 JP268783A JP268783A JPH0447854B2 JP H0447854 B2 JPH0447854 B2 JP H0447854B2 JP 268783 A JP268783 A JP 268783A JP 268783 A JP268783 A JP 268783A JP H0447854 B2 JPH0447854 B2 JP H0447854B2
Authority
JP
Japan
Prior art keywords
instruction
handshake
parent
special
child
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
Application number
JP268783A
Other languages
Japanese (ja)
Other versions
JPS59127156A (en
Inventor
Naoya Oono
Hideo Kubo
Shinji Nanba
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.)
NEC Corp
Original Assignee
Nippon Electric 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP268783A priority Critical patent/JPS59127156A/en
Publication of JPS59127156A publication Critical patent/JPS59127156A/en
Publication of JPH0447854B2 publication Critical patent/JPH0447854B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)

Description

【発明の詳細な説明】 本発明は、仮想計算機システムに関連するもの
であり、更に詳しくいえば、親OSのもとで動作
する子OSから親OSで提供している機能を実行で
きるようにする、いわゆるOSのハンドシエイク
機能の実現方式に関するものである。
[Detailed Description of the Invention] The present invention relates to a virtual computer system, and more specifically, to enable a child OS running under a parent OS to execute functions provided by the parent OS. This is related to the implementation method of the so-called handshake function of the OS.

仮想計算機は、計算機システムを使つている複
数のユーザがあたかも自分が計算機システムを専
有しているような環境を1台のハードウエア上で
実現するものでこれを使うことにより、仮想計算
機の制御プログラム(以下これを親OSと呼ぶ)
のもとに、複数個のオペレーテイングシステム
(以下これを子OSと呼ぶ)を走らせることができ
る。
A virtual computer is a device that allows multiple users using a computer system to create an environment on a single piece of hardware as if they own the computer system. (Hereafter, this will be referred to as the parent OS)
It is possible to run multiple operating systems (hereinafter referred to as child OS) under the .

元来、仮想計算機システムは、既存のOSに何
らの変更も加えることなく、親OSのもとで子OS
として動作させ得るようにしたものであり、これ
を実現するために、たとえび次のような方法がと
られている。即ち、子OSで実行される命令のう
ち、実マシン上の資源に対する直接の動作を指令
するものが、特権命令のうちのあるものに限られ
ることを利用して、子OSで特権命令が発行され
ると親OSに対して割込みが発生するようにして
おき、これにより親OSが発行された特権命令を
解析し、その動作を親OS上で擬似的に実行(シ
ミユレート)している。
Originally, a virtual computer system was able to run a child OS under a parent OS without making any changes to the existing OS.
In order to realize this, the following methods are used. In other words, taking advantage of the fact that among the instructions executed by the child OS, only certain privileged instructions command direct operations on resources on the real machine, privileged instructions are issued by the child OS. When this happens, an interrupt is generated to the parent OS, which allows the parent OS to analyze the issued privileged instruction and simulate the operation on the parent OS.

一方、子OSは本来実マシン上で実行されるこ
とを想定して作成されたものであるので一般には
実資源を有効に、かつ使い易い形で利用できるよ
うな種々のOS機能が組込まれている。しかしな
がら子OSとして実行される場合には子OSは実資
源を直接制御できないためこれらの機能は実質的
には意味をもたない。
On the other hand, a child OS was originally created with the assumption that it would be executed on a real machine, so it generally has various OS functions built into it that allow real resources to be used effectively and in an easy-to-use manner. There is. However, when executed as a child OS, these functions have no practical meaning because the child OS cannot directly control real resources.

一方、親OSも特にこれが統合型の仮想計算機
システム用に実現されている場合には、親OSも
通常のジョブを効率よく実行する必要があるので
実マシンを効率よく取扱うために同様な機能が組
込まれており、このため子OSにおいて、実資源
に関する操作要求があつた場合には、まず子OS
における管理をうけ、次に親OSにより同様な管
理をうけ二重の管理が行われることになり実資源
の有効利用、処理時間の観点からも無駄が大き
い。
On the other hand, the parent OS also needs to be able to efficiently execute normal jobs, especially if it is implemented for an integrated virtual computer system, so it must have similar functionality to handle real machines efficiently. Therefore, when a child OS requests an operation related to a real resource, the child OS first
, and then similar management by the parent OS, resulting in double management, which is a big waste in terms of effective use of real resources and processing time.

親OSと子OSが類似のOSの場合には、子OSで
の機能をバイパスし直接親OSの機能を利用する
ことにより、管理のオーバヘツト時間を少くでき
るとともに親OSによる全システム資源の有効な
管理が実現できることが多い。
If the parent OS and child OS are similar, by bypassing the functions of the child OS and directly using the functions of the parent OS, management overhead time can be reduced and the parent OS can effectively use all system resources. Management is often possible.

以下、子OSの機能をバイパスし直接親OSの機
能を利用することを、OSハンドシエイクと呼ぶ。
Hereinafter, bypassing the functions of the child OS and directly using the functions of the parent OS will be referred to as OS handshake.

しかしながら、従来の仮想計算機は、元のOS
に何らの変更も加えずに、仮想計算機を実現しよ
うとした場合には特定の機械語命令の発行を検出
し、機械語命令レベルでシミユレートするという
形しか取り得ないために子OSの中で行われる特
定のOS機能(通常マクロ命令として定義される)
を機能レベルで検出することができないため、前
述のようなマクロレベルでの親OSの機能の利用
が困難であつた。
However, traditional virtual machines are
If you try to create a virtual machine without making any changes to the OS, the only way to do it is to detect the issuance of a specific machine language instruction and simulate it at the machine language instruction level. specific OS functionality (usually defined as a macro instruction)
cannot be detected at the functional level, making it difficult to use the parent OS's functions at the macro level as described above.

従つて、本発明の目的は、OSハンドシエイク
を容易に行うことのできる仮想計算機システムを
提供することにより、子OSとして実行する場合
においても、そうでない場合においても同一のプ
ログラムを用いて子OSとして使用する場合には、
OSハンドシエイク機能を実現できる仮想計算機
システムを提供することにある。
Therefore, an object of the present invention is to provide a virtual machine system that can easily perform OS handshake, so that the same program can be used as a child OS regardless of whether it is executed as a child OS or not. When using,
The objective is to provide a virtual computer system that can realize an OS handshake function.

本発明は、子OS上で実行された場合には、命
令のオペランド部で指定された処理の親OSでの
ハンドシエイクによる処理を要求し、親OS上で
実行された場合には、通常のサブルーチンへのブ
ランチ命令(以下エンタ命令と呼ぶ)と等価の機
能をもつ第1の特別の機械語命令、 親OSでのハンドシエイク処理の完了時に発行
された場合には、ハンドシエイクの後処理を起動
し、ハンドシエイク処理でない場合には通常のサ
ブルーチンからのリターン命令(以下単にリター
命令とよぶ)と等価の機能をもつ第2の特別の機
械語命令、 および、子OSで発行された前記第1の特別の
機械語命令により起動され、前記第1の機械語命
令のオペランド部で指定された機能を親OSで実
行するため必要な処理を行つたうえで親OSの対
応する処理ルーチンを呼び、前記第2の特別の機
械語命令で再起動され、必要な後処理を行つた
後、子OSを指定された処理が終了した状態に設
定し子OSの再開を要求するためのハンドシエイ
ク機構を設けたものであり、子OSとして実行さ
れる場合には、それを親OSの機能によつて代行
できるような機能に対してはあらかじめ、OS上
のこの機能を実行するサブルーチンへのブランチ
命令即ち特殊エンタ命令を埋め込んでおくことに
より、このOSが子OSとして動く場合には、特定
の機能は子OSでの処理を行わず親OSで実行し、
子OSとして動いていない場合には、従来通り、
そのOSの機能を実行できるようにしたものであ
る。即ち、子OSとして実行されるか否かにかか
わらず同一のプログラムを使用することが可能で
ある。次に第1図により本発明の一実施例を説明
する。
When executed on a child OS, the present invention requests handshake processing in the parent OS for the process specified in the operand part of the instruction, and when executed on the parent OS, a normal subroutine is executed. The first special machine language instruction that has a function equivalent to a branch instruction (hereinafter referred to as the enter instruction) to If it is not a handshake process, a second special machine language instruction with a function equivalent to a return instruction from a normal subroutine (hereinafter simply referred to as a return instruction), and the first special instruction issued by the child OS. It is started by a machine language instruction, performs the necessary processing for the parent OS to execute the function specified by the operand part of the first machine language instruction, calls the corresponding processing routine of the parent OS, and then executes the second machine language instruction. A handshake mechanism is provided to set the child OS to a state where the specified processing has been completed and request the child OS to restart after it is restarted with a special machine language instruction and performs the necessary post-processing. Yes, and when executed as a child OS, for a function that can be substituted by the function of the parent OS, a branch instruction, that is, a special enter instruction, to the subroutine that executes this function on the OS is sent in advance. By embedding, when this OS operates as a child OS, certain functions will be executed in the parent OS without processing in the child OS.
If it is not running as a child OS, as usual,
It is designed to be able to execute the functions of that OS. In other words, the same program can be used regardless of whether it is executed as a child OS. Next, one embodiment of the present invention will be explained with reference to FIG.

本実施例においては、プロセツサが親OSを実
行しているか、子OSを実行しているかを示すた
めにモードフリツプフロツプ5(以下MFFと略
す)が設けられる。プロセツサ上のOSを切換え
るためのVM切換え機構4は、子OSの実行に際
しては、MFFを子OSモードにセツトする
(MFF=1)親OSへの切換えに際しては、親OS
モードにセツトする(MFF=0)。なお、この
MFFは、プロセツサが仮想計算機環境で動作し
ていない場合も、親OSモード(MFF=0)にセ
ツトされる。
In this embodiment, a mode flip-flop 5 (hereinafter abbreviated as MFF) is provided to indicate whether the processor is executing a parent OS or a child OS. The VM switching mechanism 4 for switching the OS on the processor sets the MFF to the child OS mode when executing the child OS (MFF=1), and sets the MFF to the child OS mode when switching to the parent OS.
mode (MFF=0). Furthermore, this
The MFF is set to the parent OS mode (MFF=0) even when the processor is not operating in a virtual machine environment.

本実施例では、OSハンドシエイクをサポート
するために、OSハンドシエイクを要求する第1
の特別の機械語として、特殊エンタ命令、ハンド
シエイクによる親OSでの処理の終了を通知する
ための、第2の特別の機械語命令として、特殊リ
ターン命令が用意される。
In this embodiment, in order to support OS handshake, the first
A special enter instruction is prepared as a special machine language, and a special return instruction is prepared as a second special machine language instruction for notifying the end of processing in the parent OS by handshake.

本実施例においては、特殊エンタ命令でのパラ
メータの引渡しは、すべてスタツクを介して行わ
れるものとする。即ち、特殊エンタ命令の実行に
際しては、呼ばれたルーチンで必要とされる入力
データはすべてスタツク上に準備されており、ま
た呼ばれたルーチンでの実行結果で、呼出し側の
必要とする出力データはすべてスタツク上に置か
れたうえでリターンが行われる構造となつている
ものとする。
In this embodiment, it is assumed that all parameters for special enter commands are passed through the stack. That is, when a special enter instruction is executed, all the input data required by the called routine is prepared on the stack, and the output data required by the caller is prepared as a result of the called routine. It is assumed that the structure is such that all of the functions are placed on the stack and then the return is performed.

また、特殊エンタ命令で呼ばれたルーチンから
の戻りアドレス情報は、スタツク上の特定位置に
置かれるものとする。
It is also assumed that return address information from a routine called by a special enter instruction is placed at a specific position on the stack.

この戻りアドレス情報としては特殊エンタ命令
により呼ばれたルーチンの処理が終了した時点で
リターン命令の次に実行すべきアドレスととも
に、このルーチンがハンドシエイク処理を実行中
である、即ち、子OSからの要求によりこのルー
チンを実行中であり、処理の終了した後では子
OSに制御を戻すべきであることを示すために、
特別なビツトが用意される。(以下これをハンド
シエイクビツトと呼ぶ) ハンドシエイク処理を実行中にはハンドシエイ
クビツトが1にセツトされる。
This return address information includes the address to be executed next after the return instruction when the processing of the routine called by the special enter instruction is completed, as well as the address that this routine is executing handshake processing, i.e., the request from the child OS. This routine is being executed by
To indicate that control should be returned to the OS,
Special bits will be prepared. (Hereinafter, this will be referred to as the handshake bit.) The handshake bit is set to 1 while the handshake process is being executed.

特殊リターン命令は命令コード部として、この
命令が特殊リターン命令であることを示すための
値をもつフイールドを備えており、命令解読実行
機構1は特殊リターン命令の実行に際し、特殊リ
ターン命令を発行したプロセスのスタツクの特定
位置にある戻り先番地が、子OS上のアドレスを
指定していた場合にはシミユレーシヨン機構を起
動し戻り番地が親OSのアドレスを示している場
合には、通常のリターン命令として動作する。
The special return instruction has a field as an instruction code section with a value indicating that this instruction is a special return instruction, and the instruction decoding/execution mechanism 1 issues a special return instruction when executing the special return instruction. If the return address at a specific position in the process stack specifies an address on the child OS, the simulation mechanism will be activated; if the return address indicates the address of the parent OS, a normal return instruction will be executed. operates as

そして、OSにおいては、このOSが子OSとし
てで実行される場合に、親OSでのハンドシエイ
クによる処理を行う可能性がある特定の処理(以
下候補処理と呼ぶ)についてはこの候補処理を行
うサブルーチンへのエンタ命令のかわりに特殊エ
ンタ命令があらかじめ埋め込まれており、このオ
ペランドにはサブルーチンのアドレスが設定され
ていることを想定している。
In the OS, when this OS is executed as a child OS, there is a subroutine that performs a specific process (hereinafter referred to as a candidate process) that may be processed by handshake in the parent OS. It is assumed that a special enter instruction is embedded in advance in place of the enter instruction to , and that the address of the subroutine is set in this operand.

また、親OSとして実行される場合に子OSから
のハンドシエイクの要求により、子OSのハンド
シエイク処理として実行される可能性のある特定
の処理についてはこの候補処理を行うサブルーチ
ンからのリターン命令のかわりに、特殊リターン
命令があらかじめ組込まれていることを想定して
いる。
In addition, for specific processes that may be executed as handshake processing of the child OS due to a handshake request from the child OS when executed as the parent OS, instead of a return instruction from a subroutine that performs this candidate process, , it is assumed that a special return instruction is pre-installed.

また、本実施例においては、親OSによるハン
ドシエイクをサポートするために、主記憶上にハ
ンドシエイク制御テーブル3が設けられる。この
テーブルの各エントリjは子OSの識別番号
(VMIDj)および子OS上でのサブルーチンのア
ドレス(ASPj)をキイとしてもち、親OS上での
対応するサブルーチンのアドレス(AMj)をデ
ータ部としてもつ。
Further, in this embodiment, a handshake control table 3 is provided on the main memory in order to support handshake by the parent OS. Each entry j in this table has the identification number of the child OS (VMIDj) and the address of the subroutine on the child OS (ASPj) as keys, and the address of the corresponding subroutine on the parent OS (AMj) as the data part. .

ハンドシエイク制御テーブル3のキイ部である
VMIDフイールドには、現在実行中のVM番号を
保持するVM識別レジスタの出力が印加されてお
り、同じくキイ部を構成するサブルーチンアドレ
ス部には、特殊エンタ命令のオペランドよりサブ
ルーチンアドレスがハンドシエイク機構2を介し
て印加されるように構成され、データ部の親OS
上のサブルーチンアドレス部の値は、ハンドシエ
イク制御機構2に印加されている。
This is the key part of the handshake control table 3.
The output of the VM identification register that holds the VM number currently being executed is applied to the VMID field, and the subroutine address field, which also constitutes the key part, indicates that the subroutine address is input to the handshake mechanism 2 from the operand of the special enter instruction. The data part is configured to be applied through the parent OS
The value of the above subroutine address field is applied to the handshake control mechanism 2.

このテーブルにはあらかじめ、そのシステムに
おいてサポートすべきハンドシエイク機能が登録
されているものとする。
It is assumed that handshake functions to be supported in the system are registered in advance in this table.

即ち、VMIDで指定される特定のVM上のASP
で指定される特定のサブルーチンの機能がハンド
シエイクにより親OS上のAMで指定されるサブ
ルーチンでサポートされている場合にはこれが、
ハンドシエイク制御テーブルのいずれかのエント
リjに登録されているものとする。
i.e. ASP on a particular VM specified by VMID
If the functionality of a particular subroutine specified by is supported by the subroutine specified by AM on the parent OS by handshake, then this
Assume that it is registered in any entry j in the handshake control table.

本実施例においては、ハンドシエイク機構2
は、フアームウエアで実現され、子OSで発生し
たハンドシエイク要求を受取り、ハンドシエイク
制御テーブル3をサーチし親OS、子OSの状態を
設定し対応する前処理部に制御を引渡すための前
処理部、 ハンドシエイクの結果により、親OS、子OSの
状態を設定する後処理部からなる。
In this embodiment, the handshake mechanism 2
is realized by firmware, and receives a handshake request generated in the child OS, searches the handshake control table 3, sets the status of the parent OS and child OS, and transfers control to the corresponding preprocessor. It consists of a post-processing section that sets the status of the parent OS and child OS based on the handshake results.

VM切換え機構4はハンドシエイク機構2によ
り起動され、各VMの状態を識別し次に実行すべ
きOSを決定し、この決定に基づきOSの切換えが
必要な場合には、現在実行中のVMの状態をセイ
ブし(ロールアウト)次に実行すべきVMの状態
を復元(ロールイン)することにより、親OSと
子OS間、あるいは子OS間の制御の切換えを行
う。
The VM switching mechanism 4 is activated by the handshake mechanism 2, identifies the state of each VM, determines the OS to be executed next, and if it is necessary to switch the OS based on this determination, it changes the state of the currently running VM. By saving (rolling out) and restoring (rolling in) the state of the VM to be executed next, control is switched between the parent OS and child OS, or between child OSes.

このとき、次に実行すべきVMが子OSである
場合には、子OSモードをセツトし(MFF=1)、
親OSである場合には親OSモードをセツトする
(MFF=0)、とともに、 次に実行すべきVMの識別番号(VMID)を
VM識別レジスタ6にセツトする。
At this time, if the next VM to be executed is a child OS, set the child OS mode (MFF = 1),
If it is the parent OS, it sets the parent OS mode (MFF=0) and also specifies the identification number (VMID) of the VM to be executed next.
Set in VM identification register 6.

また、本実施例においては、親OS上に、各子
OS対応に1個のプロセスが用意される。
In addition, in this example, each child
One process is prepared for each OS.

子OSからのハンドシエイクを要求された処理
は親OSからは、対応するサポートプロセスから
の要求に対する処理として取扱われることにな
る。このために、子OSからのハンドシエイク要
求に際しては子OSからの要求を代行プロセスか
らの要求として親OSから識別できる形に変換し、
親OSでの処理の完了時点で、サポートプロセス
に対して行われた処理結果を子OSから認識でき
る形に変換する処理が行われる。
A process for which a handshake is requested from a child OS is handled by the parent OS as a process in response to a request from the corresponding support process. For this reason, when a handshake request is made from a child OS, the request from the child OS is converted into a form that can be identified by the parent OS as a request from a proxy process.
Upon completion of processing in the parent OS, processing is performed to convert the processing results performed on the support process into a format that can be recognized by the child OS.

次に、本実施例における動作を説明する。プロ
グラムの実行中に、特殊エンタ命令があらわれる
と、即ち、命令解読実行機構1が、実行しようと
した命令が、特殊エンタ命令であることを検出し
た場合には次の処理が行われる。
Next, the operation in this embodiment will be explained. When a special enter instruction appears during program execution, that is, when the instruction decoding/execution mechanism 1 detects that the instruction to be executed is a special enter instruction, the following processing is performed.

プロセツサが親OSモードにある場合(MFF=
0のとき)には、命令解読、実行機構1は、通常
のエンタ命令と同様の動作を行う。即ち、命令の
オペランド部で指定されるプロセジヤへのブラン
チが行われる。
If the processor is in parent OS mode (MFF=
0), the instruction decoding/execution mechanism 1 performs the same operation as a normal enter instruction. That is, a branch to the processor specified by the operand part of the instruction is performed.

プロセツサが子OSモードにある場合(MFF=
1のとき)には、特殊エンタ命令であることが検
出されると、命令解読実行機構1は、ハンドシエ
イク機構2を起動する。起動されたハンドシエイ
ク機構2は次の処理を行う。
When the processor is in child OS mode (MFF=
1), when a special enter command is detected, the command decoding and execution mechanism 1 activates the handshake mechanism 2. The activated handshake mechanism 2 performs the following processing.

特殊エンタ命令により起動されたハンドシエイ
ク機構2の前処理部は、子OSを実行不可能な状
態に設定し、VM識別レジスタ6上にセツトされ
ている特殊エンタ命令を発行した子OSのID
(VMID)および特殊エンタ命令のオペランド部
の値(ASP)をキイとしてハンドシエイク制御
テーブル3をサーチし、キイ部に、同一の値をも
つエントリを見出す。同一値をもつエントリjが
見出された場合、即ち、子OS(VMIDj)上の特
殊エンタ命令のオペランド部(ASPj)で指定さ
れた処理がハンドシエイク処理により親OSのル
ーチンAMjでサポートされている場合には、次
の処理を行う。
The preprocessing section of the handshake mechanism 2 activated by the special enter command sets the child OS to an unexecutable state and uses the ID of the child OS that issued the special enter command set in the VM identification register 6.
The handshake control table 3 is searched using (VMID) and the value (ASP) of the operand part of the special enter command as keys, and an entry having the same value is found in the key part. If an entry j with the same value is found, that is, the process specified in the operand part (ASPj) of the special enter instruction on the child OS (VMIDj) is supported by the parent OS routine AMj by handshake processing. In this case, perform the following processing.

ここでは、まず、特殊エンタ命令を発行した子
OS対応の代行プロセスのスタツクに、特殊エン
タ命令を発行したプロセスのスタツク上のパラメ
ータを移送、代行プロセスのスタツクを更新す
る。
Here, first, the child that issued the special enter command
The parameters on the stack of the process that issued the special enter command are transferred to the stack of the OS-compatible proxy process, and the stack of the proxy process is updated.

次に代行プロセスのスタツクのトツプに、リタ
ーンアドレス情報として戻り先が子OSであるこ
とを示すための識別のため、ハンドシエイクビツ
トを1にセツトし戻りアドレスARjとして、特殊
エンタ命令の次の命令アドレスにセツトし、ハン
ドシエイク制御テーブル3上の一致番地jのデー
タ部に登録されている親OS処理ルーチンアドレ
スAM0を読出し、これを親OSの命令カウンタ領
域にセツトしたうえで、代行プロセスを実行可能
な状態にセツトし、VM切換え機構4を起動す
る。
Next, the handshake bit is set to 1 at the top of the stack of the proxy process as return address information to indicate that the return destination is the child OS, and the return address ARj is used as the return address after the special enter instruction. Set the instruction address, read the parent OS processing routine address AM 0 registered in the data section of matching address j on the handshake control table 3, set it in the instruction counter area of the parent OS, and then start the substitute process. Set it to an executable state and start the VM switching mechanism 4.

VM切換え機構4は、現在実行中の(子OS)
が実行不可能な状態になつたことを検知し、この
子OSの状態を主記憶上に退避し(ロールアウ
ト)、次に実行すべきOSを決定し、決定された
OSの状態をプロセツサ上にロードする(ロール
イン)。
The VM switching mechanism 4 is the currently running (child OS)
detects that the child OS has become unexecutable, saves the state of this child OS to main memory (rollout), determines the OS to be executed next, and
Load the OS state onto the processor (roll-in).

この結果として、親OSが実行されたとき、代
行プロセスは、実行可能な状態にあるので、この
プロセスが実行対象として選ばれたとき、代行プ
ロセス上で、拡張エンタ命令で指定された親OS
機能が実行されることになる。
As a result, when the parent OS is executed, the delegated process is in an executable state, so when this process is selected for execution, the parent OS specified in the extended enter instruction is displayed on the delegated process.
The function will be executed.

親OS上の代行プロセスによる処理の完了時に
特殊リターン命令が発行され、スタツク上の戻り
アドレス情報に、子OSへのリターンであること
を示す特別の識別子がセツトされている場合に
は、ハンドシエイク機構2が起動される。
When a special return instruction is issued upon completion of processing by a proxy process on the parent OS, and a special identifier is set in the return address information on the stack to indicate a return to the child OS, the handshake mechanism 2 is activated.

起動されたハンドシエイク機構2は、この特殊
リターン命令を発行した代行プロセスに対応する
子OSの退避情報により、ハンドシエイクを要求
したプロセスを得、このプロセスのスタツクに、
代行プロセスのスタツクのパラメータエリアの内
容を移送するとともに、スタツク上に先に退避さ
れていた戻り番地の値ARjを対応するプロセスの
命令カウンタ領域に、セツトする。このあと、親
OS上の対応する代行プロセスを、待ち状態にセ
ツトし、対応する子OSを実行可能な状態とした
うえでVM切換え機構4を起動する。
The activated handshake mechanism 2 obtains the process that requested the handshake based on the saved information of the child OS corresponding to the proxy process that issued this special return command, and adds the following to the stack of this process.
The contents of the parameter area of the stack of the substitute process are transferred, and the value ARj of the return address previously saved on the stack is set in the instruction counter area of the corresponding process. After this, parents
The corresponding proxy process on the OS is set to a waiting state, the corresponding child OS is made executable, and the VM switching mechanism 4 is activated.

VM切換え機構により、対応する子OSに制御
がわたると、特殊エンタ命令の次の命令から処理
が再開され、かつ、スタツク上には、特殊エンタ
命令で指定した処理の親OSにより実行結果がセ
ツトされており、あたかも子OSで実行されたか
のように処理がなされていることになる。
When control is transferred to the corresponding child OS by the VM switching mechanism, processing is resumed from the instruction following the special enter instruction, and the execution result of the process specified by the special enter instruction is set on the stack by the parent OS. This means that the process is performed as if it were executed on a child OS.

なお、特殊エンタ命令により起動されたハンド
シエイク機構2における、ハンドシエイク制御テ
ーブル3のサーチにおいて、キイ部に、特殊エン
タ命令のオペランド部と同一の値をもつエントリ
が見出されない場合には通常のエンタ命令と同じ
処理を行う。即ち、特殊エンタ命令にの次のアド
レスを戻り番地としてスタツクにセツトした後、
命令カウンタに、特殊エンタ命令のオペランド部
で示されるサブルーチンアドレスをセツトする。
これにより、特殊エンタ命令で指定された処理の
親OSでのハンドシエイクがサポートされていな
い場合には通常のエンタ命令として子OS内での
処理が行われることになる。
Note that when the handshake mechanism 2 activated by the special enter command searches the handshake control table 3, if an entry with the same value as the operand part of the special enter command is not found in the key part, the normal enter command is executed. Perform the same processing as . That is, after setting the address next to the special enter instruction on the stack as the return address,
Sets the subroutine address indicated by the operand part of the special enter instruction in the instruction counter.
As a result, if the parent OS does not support handshaking of the process specified by the special enter command, the process will be performed in the child OS as a normal enter command.

以上本発明の一実施例を説明したが、本説明で
明らかなように本発明の主旨は子OS上で実行さ
れた場合には、命令のオペランド部で指定された
処理の親OSでのハンドシエイクによる処理を要
求し、親OS上で実行された場合には、通常のサ
ブルーチンへのブランチ命令(エンタ命令)と等
価の機能をもつ第1の特別の機械語命令、 親OSでのハンドシエイク処理の完了時に発行
された場合には、ハンドシエイクの後処理を起動
し、ハンドシエイク処理でない場合には通常のサ
ブルーチンからのリターン命令(リターン命令)
と等価の機能をもつ第2の特別の機械語命令、 および、子OSで発行された前記第1の特別の
機械語命令により起動され、前記第1の機械語命
令のオペランド部で指定された機能を親OSで実
行するための必要な処理を行つてうえで親OSの
対応する処理ルーチンを呼び、前記第2の特別の
機械語命令で再起動され、必要な後処理を行つた
後子OSを指定された処理が終了した状態に設定
し子OSの再開を要求するためのハンドシエイク
機構を設け、子OSとして実行される場合には、
それを親OSの状態によつて代行できるような機
能に対してはあらかじめ、OS上のこの機能を実
行するサブルーチンへのブランチのための特別な
機械語命令を埋め込んでおくことにより、この
OSが子OSとして動く場合には、特定の機能は子
OSでの処理を行わず親OSで実行し、子OSとし
て動いていない場合には、従来通り、そのOSの
機能を実行できるようにしたものである 即ち、
子OSとして実行されるか否かにかかわらず同一
のプログラムを使用することを可能にしたもので
ある。
One embodiment of the present invention has been described above, but as is clear from this explanation, the gist of the present invention is that when executed on a child OS, the handshake in the parent OS of the process specified in the operand part of the instruction is When executed on the parent OS, the first special machine language instruction has the same function as a branch instruction (enter instruction) to a normal subroutine. If issued upon completion, activates handshake post-processing, otherwise returns from normal subroutine (return instruction)
and a second special machine language instruction having a function equivalent to that of the second special machine language instruction issued by the child OS and specified in the operand part of the first machine language instruction. After performing the necessary processing to execute the function on the parent OS, it calls the corresponding processing routine of the parent OS, is restarted with the second special machine language instruction, and after performing the necessary post-processing, the child A handshake mechanism is provided to set the OS to a state where the specified process has finished and request the restart of the child OS, and when executed as a child OS,
For functions that can be substituted depending on the state of the parent OS, special machine language instructions for branching to the subroutine that executes this function on the OS are embedded in advance.
When an OS runs as a child OS, certain functions are
It executes on the parent OS without performing any processing on the OS, and when it is not running as a child OS, it is able to execute the functions of that OS as before.
This makes it possible to use the same program regardless of whether it is executed as a child OS.

この主旨に反しないかぎりいくつかの実現方法
があることは明らかであろう。
It is clear that there are several ways to implement this as long as they do not contradict this idea.

本実施例においては、ハンドシエイクすべき処
理を行うサブルーチンと、このサブルーチンのコ
ーラとのパラメータの受渡しは、すべてスタツク
を介して行うものとしておりまたパラメータとし
ては、単なるデータだけが引渡されるものとして
いる。即ち、ポインタ等がパラメータに含まれて
いないものとする。子OSでのスタツクと親OSの
代行タスクのスタツクとの移送により、親OSと
子OS間でのパラメータの受渡しを可能にしてい
るが、パラメータがポインタを含む場合、あるい
は、スタツク以外にパラメータがある場合には、
これらを親OSの対応サブルーチンから正しい親
OS上のアドレスで参照できるようにするために
ハンドシエイク機構2において、各機能対応にあ
るいは、子OS上のアドレス空間から親OS上のア
ドレス空間への移送、子OSアドレスの親OSアド
レスへの変換等の処理を行うことが必要となろ
う。
In this embodiment, all parameters are transferred between a subroutine that performs handshake processing and the caller of this subroutine via the stack, and only simple data is transferred as parameters. . That is, it is assumed that pointers and the like are not included in the parameters. Parameters can be passed between the parent OS and the child OS by transferring the stack in the child OS and the stack of the delegated task in the parent OS, but if the parameters include pointers or if there are parameters other than the In some cases,
These can be extracted from the corresponding subroutines of the parent OS to the correct parent.
In order to be able to refer to the address on the OS, the handshake mechanism 2 handles each function, transfers the address space on the child OS to the address space on the parent OS, and converts the child OS address to the parent OS address. It may be necessary to carry out such processing.

また、本実施例においては、特殊エンタ命令の
実行に際して、代行タスクのスタツク上に、子
OS上での戻り番地とともに、子OSからのコール
であることを示すフラグがセツトされるものとし
ているが必ずしもこのようにする必要はなく、親
OSでの処理の終了に際して、親OSからコールさ
れた場合には、親OSでの戻り先が識別でき子OS
からコールされた場合には、子OSからコールさ
れたものであるかどうかが識別できる情報、親
OSからコールされた場合には、親OS上での戻り
番地が識別できるようになつていればどのように
構成されてもよい。
In addition, in this embodiment, when executing a special enter instruction, a child is added to the stack of the substitute task.
Along with the return address on the OS, a flag indicating that the call is from a child OS is set, but it is not necessary to do so;
When the process in the OS ends, if it is called from the parent OS, the return destination in the parent OS can be identified and the child OS
If the call is made from a child OS, the parent
When called from the OS, any configuration may be used as long as the return address on the parent OS can be identified.

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

図は、本発明の一実施例を示すもので、 1は命令解読実行機構、2はハンドシエイク機
構、3はハンドシエイク制御テーブル、4はVM
切換え機構、5はモードフリツプフロツプ、6は
VM識別レジスタを示す。
The figure shows an embodiment of the present invention, in which 1 is an instruction decoding and execution mechanism, 2 is a handshake mechanism, 3 is a handshake control table, and 4 is a VM.
switching mechanism; 5 is a mode flip-flop; 6 is a mode flip-flop;
Indicates the VM identification register.

Claims (1)

【特許請求の範囲】 1 複数存在する仮想計算機(以下VM)および
該仮想計算機を制御するVM制御プログラム(以
下親OS)のうちのいずれにプロセツサの制御を
与えるべきかを決定し、当該親OSあるいはVM
にプロセツサを与えるVM切り換え手段と、 前記VM切り換え手段により、プロセツサが
VMに切り換えられる場合にはVMモードに設定
され、親OSに切り換えられる場合には親OSモー
ドに設定されるプロセツサ状態保持手段と、 主記憶上に格納された機械語命令を解読し実行
するに当たつて、該命令が特殊エンタ命令であつ
た場合には、前記プロセツサの状態が親OSモー
ドにあるならば通常のサブルーチンへのブランチ
命令として実行し、VMモードにあるならば親
OSでのハンドシエイクによる処理要求をハンド
シエイク手段に通知し、 該命令が特殊リターン命令であつた場合には、
プロセツサがハンドシエイク処理実行中でないと
きには通常のサブルーチンからのリターン命令と
して実行し、ハンドシエイク処理実行中であつた
ならハンドシエイク処理の終了をハンドシエイク
手段に通知する命令解読実行手段と、 前記特殊エンタ命令および特殊リターン命令を
処理した前記命令解読実行手段からの通知により
起動され、特殊エンタ命令のオペランド部で指定
される処理の親OSでのハンドシエイクによる実
行を制御し、特殊リターン命令によつて起動され
た場合はハンドシエイクの後処理を行つてハンド
シエイクを起動したVMを実行可能状態にするハ
ンドシエイク手段とを備えることを特徴とする仮
想計算機システム。 2 前記ハンドシエイク手段は、 前記特殊エンタ命令および特殊リターン命令を
処理した前記命令解読実行手段からの通知により
起動され、特殊エンタ命令により起動された場合
には、該命令を発行したVMに対応して親OS上
に用意されているサポートプロセスを該命令で指
定された処理を要求している状態に設定し、該命
令を発行したVMの状態をサスペンド状態にした
上で前記VM切り換え手段を起動し、 特殊リターン命令により起動された場合には、
前記親OS上の対応するサポートプロセス上で実
行完了した処理の結果を、対応するVM上で完了
した場合の形式に変換し、これを対応するVM上
に反映させ、該VMを実行可能な状態にし、親
OS上のサポートプロセスをサスペンド状態にし
たうえで前記VM切り換え手段を起動することに
より、 前記特殊エンタ命令のオペランド部で指定され
る処理の親OSでのハンドシエイクによる実行を
制御する特許請求の範囲第1項記載の仮想計算機
システム。
[Claims] 1. Determine which of a plurality of virtual machines (hereinafter referred to as VM) and a VM control program (hereinafter referred to as parent OS) that controls the virtual machines should be given control of the processor, and Or VM
VM switching means for providing a processor to a processor;
A processor state holding means that is set to VM mode when switching to VM, and set to parent OS mode when switching to parent OS, and a means for decoding and executing machine language instructions stored in main memory. In this case, if the instruction is a special enter instruction, if the processor state is in parent OS mode, it will be executed as a branch instruction to a normal subroutine, and if it is in VM mode, it will be executed as a branch instruction to a normal subroutine.
Notifies the handshake means of a processing request by handshake in the OS, and if the command is a special return command,
an instruction decoding/execution means that executes the instruction as a return instruction from a normal subroutine when the processor is not executing handshake processing, and notifies the handshake means of the end of handshake processing when handshake processing is in progress; and the special enter instruction and the special return. It is activated by a notification from the instruction decoding and execution means that processed the instruction, controls the execution by handshake in the parent OS of the process specified by the operand part of the special enter instruction, and when activated by the special return instruction, A virtual computer system comprising: a handshake means that performs handshake post-processing and puts a VM that started the handshake into an executable state. 2. The handshake means is activated by a notification from the instruction decoding and execution means that processed the special enter instruction and the special return instruction, and when activated by the special enter instruction, the handshake means is activated in response to a notification from the instruction decoding and execution means that processed the special enter instruction and the special return instruction, and when activated by the special enter instruction, the handshake means The support process prepared on the parent OS is set to a state requesting the process specified by the instruction, the VM that issued the instruction is placed in a suspended state, and the VM switching means is activated. , if started by a special return instruction,
Convert the result of the process completed on the corresponding support process on the parent OS into the format when completed on the corresponding VM, reflect this on the corresponding VM, and make the VM executable. Parents
Claim 1, wherein execution of the process specified by the operand part of the special enter instruction by handshake in the parent OS is controlled by activating the VM switching means after suspending the support process on the OS. The virtual computer system according to item 1.
JP268783A 1983-01-11 1983-01-11 Virtual computer system Granted JPS59127156A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP268783A JPS59127156A (en) 1983-01-11 1983-01-11 Virtual computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP268783A JPS59127156A (en) 1983-01-11 1983-01-11 Virtual computer system

Publications (2)

Publication Number Publication Date
JPS59127156A JPS59127156A (en) 1984-07-21
JPH0447854B2 true JPH0447854B2 (en) 1992-08-05

Family

ID=11536193

Family Applications (1)

Application Number Title Priority Date Filing Date
JP268783A Granted JPS59127156A (en) 1983-01-11 1983-01-11 Virtual computer system

Country Status (1)

Country Link
JP (1) JPS59127156A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6336304A (en) * 1986-07-30 1988-02-17 Omron Tateisi Electronics Co Programmable controller system
JP2008108075A (en) * 2006-10-25 2008-05-08 Matsushita Electric Ind Co Ltd Task switch control method, and computer system

Also Published As

Publication number Publication date
JPS59127156A (en) 1984-07-21

Similar Documents

Publication Publication Date Title
US6772419B1 (en) Multi OS configuration system having an interrupt process program executes independently of operation of the multi OS
JP2692609B2 (en) Multitask program debugging method and apparatus
US9092255B2 (en) Multi-core processor system, computer product, and control method for interrupt execution
JPH0792761B2 (en) Input / output control method for virtual computer system
US20100299472A1 (en) Multiprocessor system and computer program product
JPH0814795B2 (en) Multiprocessor virtual computer system
JP4247228B2 (en) Hetero multiprocessor system and its OS configuration method
JP2539352B2 (en) Hierarchical multi-computer system
JPH05216689A (en) Computer apparatus and computer-apparatus operating method
JPH0594317A (en) Input output interrupt processing system of virtual machine
JP4026667B2 (en) Multi-OS configuration method
CN112596921A (en) System call processing method and processing device
JPH0447854B2 (en)
JP2001216172A (en) Multi-os constituting method
JP2553526B2 (en) Multitasking processor
JPS603229B2 (en) Information processing method
JP3022398B2 (en) Virtual computer system
JPS5958553A (en) Dispatch control system of integrated type virtual computer
JPH08272757A (en) Multiprocessor system and program starting method
JPS62221041A (en) Dispatch controller in virtual computer system
JPH08320809A (en) Disturbance process exclusion system
JPH0518140B2 (en)
JPH05224894A (en) Switching system for os
JPH02187830A (en) Interruption control system
JPS5938993A (en) Virtual cmputer system