JPH02206841A - Virtual machine system - Google Patents

Virtual machine system

Info

Publication number
JPH02206841A
JPH02206841A JP2589189A JP2589189A JPH02206841A JP H02206841 A JPH02206841 A JP H02206841A JP 2589189 A JP2589189 A JP 2589189A JP 2589189 A JP2589189 A JP 2589189A JP H02206841 A JPH02206841 A JP H02206841A
Authority
JP
Japan
Prior art keywords
interrupt
time
timer
processing
guest
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
JP2589189A
Other languages
Japanese (ja)
Inventor
Yoshiyuki Uehara
植原 良幸
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 JP2589189A priority Critical patent/JPH02206841A/en
Publication of JPH02206841A publication Critical patent/JPH02206841A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To speed up a response time with respect to interruption by permitting a VM quest to logic-operate the value of a mask bit which is set/reset in accordance with a processing content in the middle of execution and the value of an interruption request from a VM timer device. CONSTITUTION:A register 1 holds a VM quest number in the middle of execution at present. A register 2 holds the number of the VM quest in a high priority degree, which processes a VM real time interruption processing, namely, the VM quest in which VM timer interruption is held. The register 1 is rewritten whenever the VM quest to be processed is switched, and the register 2 is rewritten whenever the VM quest in the high priority degree is changed. A comparator 3 always compares the contents of the registers 1 and 2. The coincident output '1' shows that the VM quest in the middle of execution at present is that in the high priority degree, which executes the real time processing which has to hold the VM timer interruption.

Description

【発明の詳細な説明】 〔概 要〕 一つの計算機システムで複数のオペレーティングシステ
ムおよびその配下プログラムであるVMゲストを切替え
稼働させるために、VMゲストを時分割で切り替えるた
めのタイマ割込み機構と、該タイマ以外からの割込み要
求によりリアルタイムにVMゲストを切り替えるための
VMリアルタイム割込み機構を備える仮想計算機システ
ムに関し、 割込み要求がなされてからこの割込み要求に対する処理
が実行されるまでに前回中断した処理の残りを実行する
ために要する時間をなくすことを目的とし、 VMゲストの実行中の処理への割込み許可あるいは不許
可状態を示すマスクビットが割込みを許可しないことを
示す状態にあるときにはVMタイマ割込みを禁止するよ
うに構成した。
[Detailed Description of the Invention] [Summary] In order to switch and operate multiple operating systems and VM guests, which are subordinate programs thereof, in one computer system, a timer interrupt mechanism for switching VM guests in a time-sharing manner, and a timer interrupt mechanism for switching VM guests in a time-sharing manner, Regarding virtual computer systems equipped with a VM real-time interrupt mechanism for switching VM guests in real time in response to interrupt requests from sources other than timers, the remaining processing that was previously interrupted from the time an interrupt request is made until the processing for this interrupt request is executed is The purpose is to eliminate the time required for execution, and disables VM timer interrupts when the mask bit that indicates whether interrupts are enabled or disabled for the process being executed by the VM guest is in a state that indicates that interrupts are not allowed. It was configured as follows.

〔産業上の利用分野〕[Industrial application field]

本発明は、一つの計算機システムで複数のオベレーティ
ングシステム(O8)およびその配下プログラムである
VMゲストを切替え稼働させるために、VMゲストを時
分割で切り替えるためのタイマ割込み機構と、該タイマ
以外からの割込み要求によりリアルタイムにVMゲスト
を切り替えるためのVMリアルタイム割込み機構を備え
る仮想計算機システムに関する。
In order to switch and operate multiple operating systems (O8) and VM guests that are subordinate programs in one computer system, the present invention provides a timer interrupt mechanism for switching VM guests in a time-sharing manner, and a The present invention relates to a virtual computer system including a VM real-time interrupt mechanism for switching VM guests in real time in response to an interrupt request.

〔従来の技術〕[Conventional technology]

近年の計算機の性能向上により仮想計算機(7M)が実
用水準に達するようになった。これに伴いVMの有用性
が認識され、様々な分野へのVMの有効利用が図られる
ようになった。
Due to recent improvements in computer performance, virtual computers (7M) have reached a practical level. Along with this, the usefulness of VM has been recognized, and efforts have been made to effectively utilize VM in various fields.

また、仮想計算機が一般利用されるようになったことか
ら、より効率よく仮想計算機を実現し、しかもオーバヘ
ッドを削減することが要求されている。
Furthermore, as virtual computers have come into general use, there is a demand for realizing virtual computers more efficiently and reducing overhead.

このため、VM@御プログラムであるVMモニタを効率
よく動作させるためのVM機構が提供されているが、オ
ンライン処理やリアルタイム処理を行うシステムにVM
を適用する場合には外部事象に対する高速な割込み応答
をも実現する必要がある。
For this reason, a VM mechanism is provided to efficiently operate the VM monitor, which is a VM @ control program, but the VM mechanism is not suitable for systems that perform online processing or real-time processing.
When applying this, it is also necessary to realize high-speed interrupt responses to external events.

より詳細に説明すると、プロセッサシステムを動作させ
るためには一般的にオペレーティングシステム(以下、
O81という)が用いられており、特に、限られた計算
機資源をより有効に活用するためにマルチタスク処理が
O8によって実現されている。
To explain in more detail, in order to operate a processor system, an operating system (hereinafter referred to as
O81) is used, and in particular, multitasking is realized by O8 in order to make more effective use of limited computer resources.

このマルチタスク処理は、ユーザが要求する計算機処理
(ジョブ)を一連のCPU時間を与えるべきタスクの組
合せに分割することによって、このタスクを単位として
複数のジョブを切換実行することによって実現される。
This multitasking processing is realized by dividing the computer processing (job) requested by the user into a series of task combinations to which CPU time is given, and then switching and executing a plurality of jobs using this task as a unit.

O8は、このタスクの状態を管理してCPUの適切な割
当てを行なうために、主記憶上の小領域にタスクの状態
などを格納した制御ブロックをタスクごとに設けてこれ
をある順序で論理的に連結した待ち行列を作成する。
In order to manage the status of this task and allocate the CPU appropriately, O8 creates a control block for each task that stores the status of the task in a small area on the main memory, and logically stores the block in a certain order. Create a queue connected to

この待ち行列としては、すぐに実行可能なタスクを連結
した「実行可能待ち行列」、I10処理が終了しないと
次に進めないタスクからなる「■10処理待の待ち行列
」および他のタスクとの同期を要するために停止してい
るタスクからなる「同期待ち行列」などがある。
This queue consists of an "executable queue" which is a chain of tasks that can be executed immediately, a "queue waiting for ■10 processing" which consists of tasks that cannot proceed to the next step until the I10 process is completed, and a queue that is connected to other tasks. There is a "synchronization queue" consisting of tasks that are stopped because they require synchronization.

計算機処理の実行に際して、O8は「実行可能待ち行列
」から先頭の1つのタスクを取出してこのタスクにCP
U時間を割当てて処理を実行させる。この実行中のタス
クがO8に対してI10待ちを要求した場合にはそのタ
スクの実行を中断してこれを「■10待ち行列」につな
ぐとともに、「実行可能待ち行列」から次のタスクを取
出してCPU時間を割当てる。
When executing computer processing, the O8 takes out the first task from the "executable queue" and assigns a CP to this task.
Allocate U time and execute the process. If this running task requests O8 to wait for I10, the execution of that task is interrupted and connected to the "■10 queue", and the next task is taken from the "executable queue". allocate CPU time.

このように、O8は実行可能なタスクにCPU実行時間
を割当てるが、実行可能なタスクがなくなるとプログラ
ム・ステータス・ワード(以下、PSW、という)のウ
ェイト状態ビットを“1”にしてCPUにおける命令処
理を停止してこのCPUを待機状態とする。もし、割込
みなどの処理すべきタスクが発生するとこのPSWのウ
ェイトビットを“0”に設定して動作を再開させる。
In this way, the O8 allocates CPU execution time to executable tasks, but when there are no more executable tasks, the wait state bit of the program status word (hereinafter referred to as PSW) is set to "1" and the instructions in the CPU are The process is stopped and this CPU is placed in a standby state. If a task to be processed such as an interrupt occurs, the wait bit of this PSW is set to "0" and the operation is restarted.

このようなO8にはその処理目的などによって異なる多
くの種類のものがあり、計算機システムの使用目的に応
じた適当なO8が選択使用されるが、近時、複数のO8
およびその配下のプログラムに対して時分割でCPU資
源を割り当てる仮想計算機システム(VM機構)が実用
化されるようになった。
There are many types of O8 that differ depending on the processing purpose, and the appropriate O8 is selected and used depending on the purpose of use of the computer system, but recently, multiple O8
A virtual computer system (VM mechanism) that allocates CPU resources on a time-sharing basis to programs under the VM system has come into practical use.

この時分割での割当てを行なうために、VM機構専用の
タイマ割込み機構であるVMタイマが用意されており、
このVMタイマによって例えば20ミリ秒の一定時間間
隔で計算機に割込みが発生すると、CPUの制御は現在
実行中のO3およびその配下のプログラムであるVMゲ
ストからVMモニタに移される。なお、このVMタイマ
の割込み時間間隔は上記した20ミリ秒に限られるもの
ではなく、当該計算機システムに最適な間隔に調節され
るものであることはいうまでもない。
In order to perform this time-sharing allocation, a VM timer, which is a timer interrupt mechanism dedicated to the VM mechanism, is provided.
When this VM timer generates an interrupt to the computer at a fixed time interval of, for example, 20 milliseconds, control of the CPU is transferred from the currently executing O3 and the VM guest, which is a program under it, to the VM monitor. It goes without saying that the interrupt time interval of this VM timer is not limited to the above-mentioned 20 milliseconds, but may be adjusted to an optimum interval for the computer system.

更に外部事象による割込み要求に高速に応答する必要が
あるシステムでは、予めこの割込み(VMリアルタイム
割込み)を処理すべきO8とその配下のプログラムであ
るVMゲストが定められており、その割込み要求が発生
した時点でこの割込みの対象となるVMゲストにCPU
時間が割り当てられていない場合にはVMタイマの割込
みを待たず即座にVMリアルタイム割込みを発生させて
VMモニタに制御を移す機構が提供されている。
Furthermore, in systems that require a high-speed response to interrupt requests due to external events, the O8 and the VM guest, which is a program under it, that should handle this interrupt (VM real-time interrupt) are determined in advance, and when the interrupt request occurs, At this point, the VM guest targeted by this interrupt has CPU
If no time has been allocated, a mechanism is provided that immediately generates a VM real-time interrupt and transfers control to the VM monitor without waiting for the VM timer interrupt.

ところが、VMタイマによる割込みはVMゲストの動作
とは無関係に上記のように一定時間間隔で行なわれるの
で、例えば上記のような高速応答が必要な外部事象に対
する応答処理を行っている最中にVMタイマ割込みが発
生してCPUが奪われてしまうことがある。
However, since interrupts by the VM timer occur at fixed time intervals as described above, regardless of the operation of the VM guest, for example, when the VM is in the process of responding to an external event that requires a high-speed response, A timer interrupt may occur and the CPU may be taken over.

第4図ないし第6図は上記のような仮想計算機システム
を説明するためのもので、第4図は仮想計算機システム
の本発明に関係する内部構成を示すブロック図である。
4 to 6 are for explaining the above-described virtual computer system, and FIG. 4 is a block diagram showing the internal configuration of the virtual computer system related to the present invention.

この第4図において、命令ユニットIUはマイクロプロ
グラムを格納しているコントロール・ストレージC8あ
るいは論理レジスタデータを格納したリワーク領域に使
用されているローカル・ストレージLSからマイクロ命
令やデータを取出して解釈し、プログラムの実行を制御
するものであり、その内部には前記のpswを格納する
pswレジスタPSWRが設けられているが、このPS
Wの内容については後に詳細に説明する。
In FIG. 4, the instruction unit IU extracts and interprets microinstructions and data from the control storage C8 that stores microprograms or the local storage LS that is used as a rework area that stores logical register data. It controls the execution of the program, and inside it is provided a psw register PSWR that stores the above-mentioned psw.
The contents of W will be explained in detail later.

記憶制御ユニッ)SUはバス/メそり制御装置インター
フェイスIFを介して図示しないシステムバス/メモリ
制御装置に接続されており、命令ユニットIUからの命
令フェッチ要求や実行ユニットEUあるいは命令ユニッ
トIUからのオペランドフェッチストア要求を受けてそ
れを実行し、命令アドレスから命令コードを読出して命
令ユニットIUに転送したり、命令ユニットIUからの
オペランドアドレスを受けてオペランドを実行ユニット
EUに転送し、また実行ユニットEUからのオペランド
などの実行結果を上記インターフェイスIPを経て図示
しない外部記憶装置に格納するなどの処理を行なう。
The storage control unit (SU) is connected to a system bus/memory control device (not shown) via a bus/memory control device interface IF, and receives instruction fetch requests from the instruction unit IU and operands from the execution unit EU or instruction unit IU. It receives a fetch store request and executes it, reads the instruction code from the instruction address and transfers it to the instruction unit IU, receives an operand address from the instruction unit IU and transfers the operand to the execution unit EU, and executes the instruction code from the instruction address. It performs processing such as storing execution results of operands and the like in an external storage device (not shown) via the interface IP.

なお、上記実行ユニッ)EUは演算器、シフタなどを含
んでおり、命令ユニットIUからのマイクロプログラム
の指示を受けて演算を実行するが、その実行のためにワ
ークレジスタWRが設けられている。
The execution unit (EU) includes an arithmetic unit, a shifter, etc., and executes arithmetic operations in response to instructions from a microprogram from the instruction unit IU, and is provided with a work register WR for this purpose.

上記記憶制御ユニットSUにおけるアドレス変換での例
外発生時や実行ユニッ)EUにおける演算例外発生時に
はこの例外発生を命令ユニッ)IUに通知して割込みを
要求し、またバス/メモリ制御装置インターフェイスI
Fからは110割込み要求あるいは外部割込み要求が命
令ユニットrUに通知される。
When an exception occurs in the address conversion in the storage control unit SU or an arithmetic exception occurs in the execution unit EU, the instruction unit IU is notified of the exception and an interrupt is requested, and the bus/memory control unit interface IU is notified of the exception.
F notifies the instruction unit rU of a 110 interrupt request or an external interrupt request.

一方、仮想計算機システムとして動作させるために前記
したようにVMゲストを時分割で選択的に動作させるた
めのVMタイマVTが設けられており、上記割込み要求
およびこのVMタイマVTからの割込み要求の命令ユニ
ッ1−IUに対する割込みは第5図に示すようにPSW
の制御ビットの状態に応じて制御される。
On the other hand, in order to operate as a virtual machine system, a VM timer VT is provided for selectively operating the VM guest in a time-sharing manner as described above, and the interrupt request and interrupt request instructions from this VM timer VT are provided. Interrupts to unit 1-IU are handled by PSW as shown in Figure 5.
is controlled according to the state of the control bit.

すなわち、この第5図には命令ユニットIU内に設けら
れるプログラム・ステータス・ワード・レジスタPSW
Rにおけるビット割当が示されており、このレジスタに
は図の下方から命令アドレス、主記憶アクセスキー、ウ
ェイトビット、例外マスク、外部マスク、I10マスク
および動的アドレス変換機能(Dynami(Addr
ess Translation:DAT)を制御する
ためのビットが設けられており、これらビットはO8の
指示のもとに命令ユニットIUによって書換えられる。
That is, FIG. 5 shows the program status word register PSW provided in the instruction unit IU.
The bit assignment in R is shown, and this register includes the instruction address, main memory access key, wait bit, exception mask, external mask, I10 mask, and dynamic address conversion function (Dynami (Addr
Bits for controlling the ess Translation (DAT) are provided, and these bits are rewritten by the instruction unit IU under instructions from O8.

前記のバス/メモリ制御装置インターフェイスIFから
の110割込み要求や外部割込み要求、記憶制御ユニッ
)SUあるいは実行ユニソ1−EUからの例外割込み要
求は、上記プログラム・ステータス・ワード・レジスタ
PSWRのこれら割込みに対応して設けられてこれら割
込みが許可されている場合に“1″にセントされるビッ
トの値“0″、11″とアンド回路AI 、  Ai 
、A3によってそれぞれ論理積がとられ、その出力の論
理和をとるオア回路0を経て命令ユニット■Uに対して
割込み要求を行なう。
The 110 interrupt request from the bus/memory controller interface IF, the external interrupt request, and the exception interrupt request from the storage control unit (SU) or execution unit 1-EU are sent to these interrupts in the program status word register PSWR. Correspondingly provided bit values "0", 11" which are set to "1" when these interrupts are enabled, and AND circuits AI, Ai
, A3, and an interrupt request is made to the instruction unit (U) via the OR circuit 0 which takes the logical sum of the outputs.

しかしながら、O8およびこのO8配下のブロダラムを
一定時間ごとに切換えるためのVMタイマVTからの割
込み要求については無条件で上記オア回路Oから命令ユ
ニッ)IUに送られて割込み要求が行なわれる。
However, an interrupt request from the VM timer VT for switching the O8 and the programmable controller under the O8 at regular intervals is unconditionally sent from the OR circuit O to the instruction unit IU to issue an interrupt request.

命令ユニッI−IUがこの割込み要求を受けると、マイ
クロプログラムの制御の下で実行中の処理、例えば機械
語命令処理、割込み処理が終了した後に割込み処理プロ
グラムをその先頭から実行させ、この割込み処理プログ
ラムは割込みの原因を解析して各々の割込みの仕様に沿
った処理を行なう。
When the instruction unit I-IU receives this interrupt request, it executes the interrupt processing program from the beginning after completing the processing being executed under the control of the microprogram, such as machine language instruction processing and interrupt processing, and executes the interrupt processing program. The program analyzes the cause of the interrupt and performs processing according to the specifications of each interrupt.

第6図(a)、 (b)はこの命令ユニットにおける実
行中の処理と割込みとの関係を概念的に示すタイムチャ
ートであって、同図(a)はVMタイマ以外の割込みが
ない場合の動作を示しており、7Mゲスト1の実行中に
VMタイマからの割込みがあると、−旦VMモニタに戻
って次の期間に実行されるべきO3への切換えを行い、
この切換えが終了すると他方のO8の配下にあるプログ
ラムであるVMゲスト2の実行を開始し、以下同様にV
Mタイマからの割込みがあるたびにVMゲストの切換え
が行なわれる。
FIGS. 6(a) and 6(b) are time charts conceptually showing the relationship between the processing being executed in this instruction unit and interrupts, and FIG. When there is an interrupt from the VM timer while 7M guest 1 is running, it returns to the VM monitor and switches to O3, which should be executed in the next period.
When this switching is completed, the execution of VM guest 2, which is a program under the other O8, is started, and the
The VM guest is switched every time there is an interrupt from the M timer.

同図(b)は優先度が高い7Mゲスト1が時刻1゜にお
いて太線で示したように、他からの割込みを禁止して処
理を実行しているときに時刻t2で7Mタイマからのタ
イマ割込みが行なわれた場合の動作を示すもので、この
タイマ割込みによって7Mゲスト1は実行中の処理を中
断してVMモニタに一旦戻ってからVMゲスト2の処理
を行う。
In the same figure (b), when the 7M guest 1, which has a high priority, is executing processing with interrupts from others prohibited at time 1°, as shown by the bold line, a timer interrupt from the 7M timer occurs at time t2. 7M guest 1 interrupts the process being executed by this timer interrupt, returns to the VM monitor, and then processes VM guest 2.

このVMゲスト2が処理を実行している期間中の時刻t
、に優先度の高い7Mゲスト1に外部事象が発生してV
¥リアルタイム割込み要求がなされると、VMゲスト2
はその処理を中断してVMモニタにCPUを渡し、この
VMモニタは上記の割込み要求をした7Mゲスト1に時
刻t4でCPUを渡す。
Time t during the period when this VM guest 2 is executing the process
, an external event occurred in 7M guest 1 with high priority and V
¥When a real-time interrupt request is made, VM guest 2
interrupts the process and hands over the CPU to the VM monitor, and this VM monitor hands over the CPU to the 7M guest 1 that made the above interrupt request at time t4.

これによってCPUを得た7Mゲスト1はVMタイマか
らの割込みによって中断していた処理を実行し、この中
断していた処理を終了した時刻t、から時刻t、で割込
み要求されたVMリアルタイム割込みに対する処理を開
始する。
The 7M guest 1, which obtained the CPU, executes the process that was interrupted by the interrupt from the VM timer, and responds to the VM real-time interrupt that was requested as an interrupt from time t when the interrupted process was finished to time t. Start processing.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上記のように、優先度の高いVMゲストが割込み禁止の
状態で処理の実行中にVMタイマからのタイマ割込みで
CPU時間が奪われた場合その処理は中断され、再びそ
のVMゲストにCPUが割り当てられたときに残りの処
理を実行することになる。
As mentioned above, if a timer interrupt from the VM timer takes up CPU time while a high-priority VM guest is executing a process with interrupts disabled, that process will be interrupted and the CPU will be reassigned to that VM guest. The rest of the processing will be executed when the

したがって、外部事象の発生からこの外部事象に基づく
割込みの処理が開始されるまでにはt4〜t、の時間だ
け余計な待ち時間を要する。
Therefore, an extra waiting time from t4 to t is required from the occurrence of an external event until the processing of an interrupt based on this external event is started.

本発明は、このように割込み要求がなされてからこの割
込み要求に対する処理が実行されるまでに前回中断した
処理の残りを実行するために要する時間をな(すことを
目的とする。
An object of the present invention is to reduce the time required to execute the remainder of the previously interrupted process from when an interrupt request is made until the process for this interrupt request is executed.

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

一つの計算機システムで複数のオペレーティングシステ
ムおよびその配下プログラムであるVMゲストを同時に
稼働させるために、VMゲストを時分割で切り替えるた
めのタイマ割込み機構と、該タイマ以外からの割込み要
求によりリアルタイムにVMゲストを切り替えるための
VMリアルタイム割込み機構を備える仮想計算機システ
ムにおいて、VMゲストの実行中の処理への割込み許可
あるいは不許可状態を示すマスクビットが割込みを許可
しないことを示す状態にあるときにはVMタイマ割込み
を禁止するように構成した。
In order to run multiple operating systems and VM guests, which are their subordinate programs, simultaneously on one computer system, we have a timer interrupt mechanism for switching VM guests in a time-sharing manner, and a timer interrupt mechanism that switches VM guests in real time based on interrupt requests from sources other than the timer. In a virtual machine system equipped with a VM real-time interrupt mechanism for switching the VM timer interrupt, when the mask bit indicating whether interrupts are enabled or disabled for the process being executed by the VM guest is in a state indicating that interrupts are not allowed, the VM timer interrupt is disabled. configured to prohibit it.

〔作 用〕[For production]

第1図は本発明の原理を示す図であって、VMゲストが
実行中の処理の内容に応じてセット・リセットされるマ
スクビットMの値とVMタイマ機機構外らの割込み要求
との値とをアンド回路などの論理回路りによって論理演
算することによって、VMタイマからの割込み要求をマ
スクビットMの状態に応じて許可あるいは不許可にする
ようにする。
FIG. 1 is a diagram showing the principle of the present invention, and shows the value of a mask bit M that is set and reset depending on the content of the process being executed by a VM guest, and the value of an interrupt request from outside the VM timer mechanism. By performing a logical operation using a logic circuit such as an AND circuit, the interrupt request from the VM timer is permitted or disallowed depending on the state of the mask bit M.

第2図(a)は従来の動作例として第6図(blに示し
たタイムチャートと同一のVMリアルタイム割込みに対
する本発明による動作例を示すタイムチャ−トであって
、動作の差異を明らかにするために第6図(b)に示し
た従来の動作例を同図(blとして再掲しである。
FIG. 2(a) is a time chart showing an example of the operation according to the present invention for a VM real-time interrupt, which is the same as the time chart shown in FIG. For this purpose, the conventional operation example shown in FIG. 6(b) is reprinted in the same figure (bl).

本発明においては、VMゲスト1が時刻t、で割込みを
禁止する処理を開始すると同時に上記のマスクビットM
を例えば“O”にセットして割込み禁止状態にあること
を示す。
In the present invention, at the same time that the VM guest 1 starts processing to disable interrupts at time t, the above mask bit M
is set to, for example, "O" to indicate that interrupts are disabled.

上記第2図(a)を参照して、このようにマスクビット
Mが“0”であるときに時刻t2でVMタイマTから′
1ルベルの割込み要求が到来してもアンド回路として示
した論理回路りからの出力、すなわちCPUに対するV
Mタイマ割込み要求は出力されず、したがってCPUは
実行中の処理を中断することなく一連の処理をその終了
まで実行し、その処理が終了したときに上記マスクビッ
トMを“1”にセットする。
Referring to FIG. 2(a) above, when the mask bit M is "0" in this way, the VM timer T starts '' at time t2.
Even if an interrupt request of 1 level arrives, the output from the logic circuit shown as an AND circuit, that is, V to the CPU.
The M timer interrupt request is not output, so the CPU executes a series of processes until the end without interrupting the process being executed, and sets the mask bit M to "1" when the process is completed.

このようにマスクビットMが“1”にセットされれば、
処理の実行中にVMタイマTからのVMタイマ割込み要
求があった場合には上記論理回路りの出力は“1”にな
り、この出力はCPUを7Mモニタの処理に移し、さら
にVMゲスト2の処理に向かわせることができる。
If mask bit M is set to “1” in this way,
If there is a VM timer interrupt request from VM timer T during execution of processing, the output of the above logic circuit becomes "1", and this output moves the CPU to the processing of the 7M monitor, and further transfers the processing to the VM guest 2. can be directed to processing.

このようにしてVMゲスト2の処理実行中の時刻t、に
優先度の高いVMゲスト1に対してVMリアルタイム割
込みが発生すると、CPUの処理はVMモニタを経てこ
のVMゲスト1に移ってこのVMリアルタイム割込みの
処理を行なうようになるが、このときにはVMゲスト1
の前回の割込み禁止を要する処理は終了しているので、
直ちにこのVMリアルタイム割込みに対する処理が実行
される。
In this way, when a VM real-time interrupt occurs to VM guest 1 with a high priority at time t while VM guest 2 is executing processing, the CPU processing is transferred to this VM guest 1 via the VM monitor. Real-time interrupt processing begins, but at this time VM guest 1
The previous process that required interrupts to be disabled has finished, so
Processing for this VM real-time interrupt is immediately executed.

〔実施例〕〔Example〕

第3図は本発明の一実施例を示すもので、VMタイマ割
込み機構に付加されるVMタイマ割込みマスク回路を示
している。
FIG. 3 shows one embodiment of the present invention, showing a VM timer interrupt mask circuit added to the VM timer interrupt mechanism.

レジスタ1は現在実行中であるVMゲストの番号を保持
するレジスタであり、レジスタ2はVMリアルタイム割
込みを処理する優先度の高いVMゲスト、すなわちVM
タイマ割込みが保留されるVMゲストの番号を保持する
レジスタであり、このレジスタ1は処理するVMゲスト
を切換えるごとに書き換えられ、レジスタ2は高優先の
VMゲスト番号が変更された場合に書き換えられる。
Register 1 is a register that holds the number of the VM guest currently being executed, and register 2 is a register that holds the number of the VM guest that is currently executing.
This is a register that holds the number of a VM guest for which a timer interrupt is pending.Register 1 is rewritten each time the VM guest to be processed is changed, and register 2 is rewritten when the high priority VM guest number is changed.

そして比較器3においてはこれらレジスタ1゜2の内容
について常時比較が行われるが、その−致出力“1”は
現在実行中のVMゲストがVMタイマ割込みを保留すべ
きリアルタイム割込みを処理する高優先度のものである
ことを示すものとなる。
The comparator 3 constantly compares the contents of these registers 1 and 2, and the output "1" indicates a high priority for the currently executing VM guest to process a real-time interrupt that should hold the VM timer interrupt. This indicates that the product is of high quality.

優先度が高く、VMタイマ割込みが保留されるべきVM
ゲストに対応して設けられているプログラム・ステータ
ス・ワード・レジスタ(PSWR)4には例えば110
割込み、外部割込み、バス割込みなどの割込み要求の種
類にそれぞれ対応するマスクビットが設けられており、
現在実行中のVMゲストがVMタイマ割込みを許可しな
い処理に対応するマスクビットにはO”が、またVMタ
イマ割込みを許容できる種類の処理に対するマスクビッ
トには“1”がセットされる。
VMs with high priority and VM timer interrupts should be held pending
For example, 110 is stored in the program status word register (PSWR) 4 provided corresponding to the guest.
Mask bits are provided for each type of interrupt request, such as interrupts, external interrupts, and bus interrupts.
A mask bit corresponding to a process in which the currently executing VM guest does not permit a VM timer interrupt is set to "O", and a mask bit corresponding to a type of process that allows a VM timer interrupt is set to "1".

リアルタイム割込みマスクレジスタ5には上記PSWR
4のマスクビットにそれぞれ対応するとともにオペレー
タなどによってセットさ札るVMタイマ割込みマスクビ
ットが設けられており、このビットを“1”にセットす
ることによってVMタイマ割込みを保留するように設定
する。
The real-time interrupt mask register 5 contains the above PSWR.
A VM timer interrupt mask bit is provided which corresponds to each of the mask bits 4 and 4 and is set by an operator or the like, and by setting this bit to "1", the VM timer interrupt is set to be suspended.

110割込みを実行中にはVMタイマ割込みを保留する
ようにVMタイマ割込みマスクレジスタ5の図で左端に
示したビット51を“1″にセントした場合を例にとっ
て具体的に説明する。
A specific explanation will be given by taking as an example a case where the bit 51 shown at the left end in the diagram of the VM timer interrupt mask register 5 is set to "1" so that the VM timer interrupt is suspended while the 110 interrupt is being executed.

CPUが110割込みについての処理の実行中にはPS
WR4のマスクビット41はO″にセットされており、
このマスクビット4.の値が反転入力端子に供給される
アンド回路61からは■Mタイマ割込みマスクレジスタ
5のマスクビット5、の“1”との論理積として“l”
が出力され、オア回路7を経てこの出力はアンド回路8
の一方の入力端子に供給される。
While the CPU is processing the 110 interrupt, the PS
Mask bit 41 of WR4 is set to O'',
This mask bit 4. The value of is supplied to the inverting input terminal from the AND circuit 61, which outputs "l" as a logical product with "1" of the mask bit 5 of the M timer interrupt mask register 5.
is output, and after passing through the OR circuit 7, this output is sent to the AND circuit 8.
is supplied to one input terminal of

このときCPUが処理しているVMゲストがこのVMタ
イマ割込みを保留すべきVMゲストであれば、処理中の
VMゲストの番号を保持するレジスタ1とVMタイマ割
込みを保留すべきVMゲストの番号を保持するレジスタ
2がそれぞれ格納している値は同一であるから、比較回
路Cからはこの一致によって“l”が出力され、上記ア
ンド回路8の他方の入力端子に供給される。
At this time, if the VM guest that the CPU is processing is a VM guest that should hold this VM timer interrupt, register 1 that holds the number of the VM guest that is being processed and the number of the VM guest that should hold the VM timer interrupt. Since the values stored in the holding registers 2 are the same, the comparator circuit C outputs "1" due to this coincidence, and is supplied to the other input terminal of the AND circuit 8.

したがって、このアンド回路8の反転出力端子からは“
0”が出力されてアンド回路10を遮断状態にするので
VMタイマ機構9からのタイマ割込み要求はこのアンド
回路10によって阻止されてCPtJには供給されず、
VMタイマ割込みは生じない。
Therefore, from the inverting output terminal of this AND circuit 8, “
0'' is output and the AND circuit 10 is cut off, so the timer interrupt request from the VM timer mechanism 9 is blocked by the AND circuit 10 and is not supplied to CPtJ.
No VM timer interrupt occurs.

CPUがこの実行中のVMゲストの処理を終了して他の
処理を実行し得る状態になると、この110割込みも許
容し得る状態になってPSWR4のI10マスクビフト
41がl”になるので上記アンド回路6.の出力は“O
”となり、この“0”レベルの出力はオア回路7を経て
アンド回路8の一方の入力端子に供給される。
When the CPU finishes processing the VM guest that is currently being executed and becomes able to execute other processing, the 110 interrupt is also allowed and the I10 mask bit 41 of PSWR4 becomes l", so the above AND circuit is executed. The output of 6. is “O
”, and this “0” level output is supplied to one input terminal of the AND circuit 8 via the OR circuit 7.

したがって、このアンド回路8の反転出力端子からは“
1”レベルにある出力がアンド回路10の一方の入力端
子に供給されてこのアンド回路10が導通状態になるの
で、VMタイヌ機構VからのVMタイマ割込み要求はこ
の第2のアンド回路10を経てCPUには供給され、V
Mタイマ割込みが発生する。
Therefore, from the inverting output terminal of this AND circuit 8, “
Since the output at the 1" level is supplied to one input terminal of the AND circuit 10 and this AND circuit 10 becomes conductive, the VM timer interrupt request from the VM timer mechanism V is passed through the second AND circuit 10. The CPU is supplied with V
M timer interrupt occurs.

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

以上説明したように、本発明によれば、VMゲストがV
Mタイマ割込みによって中断していた処理をVMリアル
タイム割込み処理の前に実行するために生じるVMリア
ルタイム割込み応答処理の実行の遅れを防止することが
できるので、VMリアルタイム割込みに対する応答時間
を高速かつ安定に実現できるという格別な効果を達成す
ることができる。
As explained above, according to the present invention, the VM guest
It is possible to prevent delays in the execution of VM real-time interrupt response processing that occur when processing that was interrupted by an M-timer interrupt is executed before VM real-time interrupt processing, making the response time for VM real-time interrupts fast and stable. It is possible to achieve extraordinary effects.

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

第1図は本発明の原理を示す図、 第2図は本発明による割込み処理を従来の割込み処理と
対比して示すタイムチャート、 第3図は本発明の実施例を示す図、 第4図は本発明が適用される仮想計算機システムの例を
示す図、 第5図は従来の割込み要求の制御例、 第6図は従来の割込み処理の例を示すタイムチャートで
ある。 VMゲスト マスクビ・・Iト
FIG. 1 is a diagram showing the principle of the present invention. FIG. 2 is a time chart showing interrupt processing according to the present invention in comparison with conventional interrupt processing. FIG. 3 is a diagram showing an embodiment of the present invention. 5 is a diagram showing an example of a virtual computer system to which the present invention is applied, FIG. 5 is a time chart showing an example of conventional interrupt request control, and FIG. 6 is a time chart showing an example of conventional interrupt processing. VM guest mask bit...

Claims (1)

【特許請求の範囲】 一つの計算機システムで複数のオペレーティングシステ
ムおよびその配下プログラムであるVMゲストを切替え
稼働させるために、VMゲストを時分割で切り替えるた
めのタイマ割込み機構と、該タイマ以外からの割込み要
求によりリアルタイムにVMゲストを切り替えるための
VMリアルタイム割込み機構を備える仮想計算機システ
ムにおいて、 VMゲストの実行中の処理への割込み許可あるいは不許
可状態を示すマスクビットが割込みを許可しないことを
示す状態にあるときにはタイマ割込みを禁止するように
したことを特徴とする仮想計算機システム。
[Claims] In order to switch and operate multiple operating systems and VM guests that are subordinate programs thereof in one computer system, there is provided a timer interrupt mechanism for switching VM guests in a time-sharing manner, and interrupts from other than the timer. In a virtual computer system equipped with a VM real-time interrupt mechanism for switching VM guests in real time upon request, a mask bit indicating whether interrupts are permitted or not permitted to the processing being executed by the VM guest is in a state indicating that interrupts are not permitted. A virtual computer system characterized in that timer interrupts are prohibited at certain times.
JP2589189A 1989-02-06 1989-02-06 Virtual machine system Pending JPH02206841A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2589189A JPH02206841A (en) 1989-02-06 1989-02-06 Virtual machine system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2589189A JPH02206841A (en) 1989-02-06 1989-02-06 Virtual machine system

Publications (1)

Publication Number Publication Date
JPH02206841A true JPH02206841A (en) 1990-08-16

Family

ID=12178416

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2589189A Pending JPH02206841A (en) 1989-02-06 1989-02-06 Virtual machine system

Country Status (1)

Country Link
JP (1) JPH02206841A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008513909A (en) * 2004-09-30 2008-05-01 インテル・コーポレーション Method and apparatus for providing support for a timer associated with a virtual machine monitor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008513909A (en) * 2004-09-30 2008-05-01 インテル・コーポレーション Method and apparatus for providing support for a timer associated with a virtual machine monitor

Similar Documents

Publication Publication Date Title
KR100313261B1 (en) Low Power Multi-task Controller (Name Correction)
US5553291A (en) Virtual machine control method and virtual machine system
US6301634B1 (en) Real time control method for a robot controller
EP0093267B1 (en) Method for switching the control of central processing units in a data processing system, and apparatus for initiating the switching of cpu control
JPS6275739A (en) Assigning method for task
JPH02208740A (en) Virtual computer control system
JPH0664538B2 (en) A method for interrupting batch task processing in a virtual machine data processing system
KR20010070469A (en) Device and method for performing high-speed low overhead context switch
KR20160033517A (en) Hybrid virtualization scheme for interrupt controller
US20090241112A1 (en) Recording medium recording virtual machine control program and virtual machine system
JP2902746B2 (en) Virtual computer control method
JPH02206841A (en) Virtual machine system
JPH02184925A (en) Virtual computer system
JPH05324569A (en) Interruption control system
JP2585905B2 (en) Multitask execution device
JPH09282196A (en) Program run control system for complex logic processor system
JPS603229B2 (en) Information processing method
JP7196439B2 (en) How to access devices in a virtualized environment
JPH0433130A (en) Multi-chip constituting method
JPH02207335A (en) Virtual computer system
JPH0444131A (en) Device and method for execution of inter-processor communication in plural os running systems
JPS59125450A (en) Virtual computer control system
JPS60225944A (en) Virtual machine system
JP2601359B2 (en) Concurrent processing microprocessor
JPH06242975A (en) Virtual computer dispatch system of multiple information processing system