JPH0532771B2 - - Google Patents

Info

Publication number
JPH0532771B2
JPH0532771B2 JP66883A JP66883A JPH0532771B2 JP H0532771 B2 JPH0532771 B2 JP H0532771B2 JP 66883 A JP66883 A JP 66883A JP 66883 A JP66883 A JP 66883A JP H0532771 B2 JPH0532771 B2 JP H0532771B2
Authority
JP
Japan
Prior art keywords
virtual machine
virtual
switching
processor
time slice
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 - Lifetime
Application number
JP66883A
Other languages
Japanese (ja)
Other versions
JPS59125450A (en
Inventor
Naoya Oono
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 JP66883A priority Critical patent/JPS59125450A/en
Publication of JPS59125450A publication Critical patent/JPS59125450A/en
Publication of JPH0532771B2 publication Critical patent/JPH0532771B2/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/44Arrangements for executing specific programs

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

【発明の詳細な説明】 本発明は、仮想計算機制御方式、特に、仮想計
算機システムにおける実プロセツサと仮想計算機
の割当ての制御を行なう仮想計算機制御方式に関
する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a virtual computer control method, and more particularly to a virtual computer control method for controlling allocation of real processors and virtual computers in a virtual computer system.

一般に、仮想計算機システムとは、一台の計算
機システム上で、仮想的に複数個の計算機システ
ムを作り出す技術であり、この仮想計算機システ
ムにおいては、システム上の各仮想計算機におけ
る仮想プロセツサに対して順次実プロセツサが割
り当てられる。
In general, a virtual computer system is a technology that virtually creates multiple computer systems on one computer system, and in this virtual computer system, the virtual processors of each virtual computer on the system are sequentially A real processor is allocated.

それゆえ、実プロセツサが割り当てられている
ときだけ、その仮想計算機が実際に処理を実行す
ることができる。
Therefore, the virtual machine can actually execute processing only when a real processor is assigned.

仮想計算機の切換え、すなわち、仮想計算機上
の仮想プロセツサに対する実プロセツサへの割当
ての切換えを行なうには次のような処理が必要と
なる。
The following processing is required to switch virtual machines, that is, to switch assignments of virtual processors on virtual machines to real processors.

すなわち、現在実プロセツサを割り当てられて
いる、すなわち、現在実行中の仮想計算機のプロ
セツサ状態は実プロセツサ上にあるので、これを
仮想プロセツサの状態として仮想計算機に対応し
た退避エリアに退避し、この後、新たに実プロセ
ツサを割り当てる仮想計算機のプロセツサの退避
情報、すなわち、仮想プロセツサの状態を実プロ
セツサ上にロードし、始めて仮想計算機が実行可
能となる。
In other words, since the processor state of the virtual machine to which a real processor is currently assigned, that is, which is currently being executed, is on the real processor, this is saved as the state of the virtual processor to the save area corresponding to the virtual machine, and then , the saved processor information of the virtual machine to which a new real processor is to be allocated, that is, the state of the virtual processor, is loaded onto the real processor, and the virtual machine becomes executable for the first time.

このように、仮想計算機システムにおいては、
仮想プロセツサの実プロセツサへの割当ての切換
えに際して比較的大きなオーバヘツドを要するの
で、この仮想計算機の切換えの回数を不必要に大
きくすることは望ましくない。
In this way, in a virtual computer system,
Since a relatively large overhead is required when switching the assignment of a virtual processor to a real processor, it is undesirable to unnecessarily increase the number of times this virtual machine is switched.

一方、仮想計算機で長時間実行すべき処理が存
在しない場合においても、その仮想計算機に実プ
ロセツサを割り当てておくことは、実プロセツサ
の有効利用という観点から望ましくない。
On the other hand, even if there is no process to be executed for a long time on a virtual machine, it is not desirable to allocate a real processor to the virtual machine from the viewpoint of effective use of the real processor.

従来の仮想計算機制御方式は、仮想計算機ごと
にタイムスライス値を格納する仮想計算機制御テ
ーブルと、実プロセツサで実行中の前記仮想計算
機におけるアイドル状態を検出してアイドル検出
信号を出力するプロセス切換制御機構と、前記仮
想計算機が前記実プロセツサを割り当てられてか
ら対応する前記タイムスライス値で指示される指
定時間の経過後にタイムスライス切れ信号を出力
するタイムスライスタイマと、前記アイドル検出
信号が供給されたときおよび前記タイムスライス
切れ信号が供給されたときに前記実プロセツサに
割り当てるべき仮想計算機を決定し切り換えるた
めの仮想計算機切換制御機構とを含んで構成され
る。
Conventional virtual machine control methods include a virtual machine control table that stores time slice values for each virtual machine, and a process switching control mechanism that detects the idle state of the virtual machine running on a real processor and outputs an idle detection signal. and a time slice timer that outputs a time slice expiry signal after a specified time indicated by the corresponding time slice value has elapsed since the real processor was assigned to the virtual machine, and when the idle detection signal is supplied. and a virtual machine switching control mechanism for determining and switching a virtual machine to be assigned to the real processor when the time slice expiry signal is supplied.

すなわち、従来の仮想計算機制御方式におい
て、仮想計算機を切り換える方式としては、仮想
計算機で実行すべき処理がなくなつた時点、すな
わち、アイドル状態が検出された時点で他の仮想
計算機に切り換える方式と、仮想計算機で実行す
べき処理の有無にはかかわらず一定時間毎に実プ
ロセツサを仮想計算機に割り当てる方式が知られ
ている。
In other words, in conventional virtual machine control methods, there are two methods for switching a virtual machine: a method for switching to another virtual machine when there is no more processing to be executed on the virtual machine, that is, when an idle state is detected; A method is known in which a real processor is assigned to a virtual machine at regular intervals, regardless of whether there is a process to be executed by the virtual machine.

しかしながら、アイドル状態を検出した時点で
他の実行可能な仮想計算機に切り換える方式は次
のような欠点をもつ。
However, the method of switching to another executable virtual machine upon detecting an idle state has the following drawbacks.

すなわち、一個の仮想計算機内で複数のプログ
ラムが実行されている場合には、わずかの時間を
待てば他のプログラムが実行可能になる場合が多
く、一時的にアイドル状態になつた時点で仮想計
算機の切換えを行なうことは得策でないことが多
い。
In other words, when multiple programs are running within a single virtual machine, other programs often become executable after a short period of time, and when the virtual machine becomes temporarily idle, It is often not a good idea to switch between the two.

一方、機械的に実プロセツサを各仮想計算機に
一定時間割り当てる方式では、仮想計算機上で単
一のプログラムしか動作していないような場合に
は、一度その仮想計算機上のプログラムから入出
力動作要求がでて、このプログラムが待ちに入る
と、この入出力動作の完了まで仮想計算機はアイ
ドル状態となる。
On the other hand, in a method that mechanically allocates a real processor to each virtual machine for a fixed period of time, if only a single program is running on the virtual machine, once an input/output request is received from the program on that virtual machine, When this program enters the wait state, the virtual machine remains idle until this input/output operation is completed.

すなわち、一般に、入出力動作は、プロセツサ
の動作時間に比べて極端に低速であるので、その
ままこの仮想計算機に実プロセツサを割り当てて
おくことは実プロセツサを無駄に専有することに
なる。
That is, since input/output operations are generally extremely slow compared to the operating time of a processor, assigning a real processor to this virtual machine as is would result in needlessly monopolizing the real processor.

すなわち、従来の仮想計算機制御方式は、オー
バヘツドが大きく、実プロセツサの使用効率が低
いという欠点があつた。
That is, the conventional virtual machine control method has the drawbacks of large overhead and low utilization efficiency of the real processor.

本発明の目的は、オーバヘツドを低減でき実プ
ロセツサの使用効率を向上できる仮想計算機制御
方式を提供することにある。
An object of the present invention is to provide a virtual machine control method that can reduce overhead and improve the efficiency of using real processors.

すなわち、本発明の目的は、上記の点を鑑みて
なされたものであり、仮想計算機の切換えが少
く、かつ、実プロセツサの使用効率も高めた仮想
計算機制御方式を提供することにある。
That is, an object of the present invention has been made in view of the above points, and it is an object of the present invention to provide a virtual machine control method that reduces switching of virtual machines and increases the efficiency of using real processors.

すなわち、本発明の目的は、たとえば、単一プ
ログラムで走行する仮想計算機に対しては、指示
情報として、仮想計算機の切換えをセツトし、マ
ルチプログラムで走行する仮想計算機に対して
は、仮想計算機の割当ての続行を指示することに
より仮想計算機の切換回数を少く、かつ、実プロ
セツサの無駄時間も少くでき仮想計算機の切換え
のオーバヘツドが少く、かつ、実プロセツサの有
効利用を可能にする仮想計算機システムを実現で
きる仮想計算機制御方式を提供することにある。
That is, an object of the present invention is, for example, to set virtual machine switching as instruction information for a virtual machine running with a single program, and to set virtual machine switching as instruction information for a virtual machine running with multiple programs. By instructing continuation of allocation, the number of times virtual machines are switched is reduced, and the wasted time of real processors is also reduced.The virtual machine system reduces the overhead of switching virtual machines and makes effective use of real processors. The objective is to provide a virtual computer control method that can be implemented.

本発明の仮想計算機制御方式は、仮想計算機ご
とにタイムスライス値および切換か続行かを指示
する指示情報を格納する仮想計算機制御テーブル
と、実プロセツサで実行中の前記仮想計算機にお
けるアイドル状態を検出してアイドル検出信号を
出力するプロセス切換制御機構と、前記仮想計算
機が前記実プロセツサを割り当てられてから対応
する前記タイムスライス値で指示される指定時間
の経過後にタイムスライス切れ信号を出力するタ
イムスライスタイマと、前記アイドル検出信号が
供給されたときに対応する前記指示情報が続行を
指示しているときおよび前記タイムスライス切れ
信号が供給されたときに前記実プロセツサに割り
当てるべき仮想計算機を決定し切り換えるための
仮想計算機切換制御機構とを含んで構成される。
The virtual machine control method of the present invention includes a virtual machine control table that stores a time slice value and instruction information indicating whether to switch or continue for each virtual machine, and detects the idle state of the virtual machine running on a real processor. and a time slice timer that outputs a time slice expiration signal after a specified time specified by the corresponding time slice value has elapsed since the virtual machine was assigned the real processor. and determining and switching a virtual machine to be assigned to the real processor when the idle detection signal is supplied, the corresponding instruction information instructs to continue, and when the time slice expiration signal is supplied. and a virtual machine switching control mechanism.

すなわち、本発明の仮想計算機制御方式は複数
個の仮想計算機を実現する仮想計算機システムに
おいて、実プロセツサに割り当てるべき仮想計算
機を決定し、この決定にもとづき仮想計算機を切
り換える仮想計算機切換制御手段と、前記仮想計
算機が実プロセツサを割り当てられてから指定時
間が経過すると前記仮想計算機切換制御手段に対
してタイムスライス切れ信号を発生するタイムス
ライスタイマと、 実プロセツサで実行中の仮想計算機におけるア
イドル状態を検出するプロセス切換制御手段と、 各仮想計算機の状態情報およびプロセツサ状態
としての退避情報を格納するほかにアイドル状態
の検出時における動作を指定するための指示情報
を格納する仮想計算機制御テーブルとをもち、 実プロセツサを割り当てられて実行中の仮想計
算機においてアイドル状態が検出された場合に実
プロセツサを割り当てられている仮想計算機に対
応する前記仮想計算機制御テーブル上の前記指示
情報を参照し、その内容に従つて指示情報が切換
えを指定している場合には、前記仮想計算機切換
制御機構を起動することにより、他の仮想計算機
への実プロセツサの切換えを行ない、前記指示情
報が続行を指定している場合には、他の仮想計算
機への実プロセツサの割当ての切換えは行わず、
前記タイムスライスタイマの発生するタイムスラ
イス切れ信号を契機として仮想計算機の切換えを
行なうように構成される。
That is, in a virtual computer system implementing a plurality of virtual computers, the virtual computer control method of the present invention includes: a virtual computer switching control means that determines a virtual computer to be assigned to a real processor and switches the virtual computer based on this determination; a time slice timer that generates a time slice expiry signal to the virtual machine switching control means when a specified time has elapsed since the virtual machine was assigned a real processor; and a time slice timer that detects an idle state in the virtual machine running on the real processor. It has a process switching control means, a virtual machine control table that stores state information of each virtual machine and save information as a processor state, and also stores instruction information for specifying an operation when an idle state is detected. When an idle state is detected in a running virtual machine that is assigned a processor, the instruction information on the virtual machine control table corresponding to the virtual machine that has been assigned a real processor is referred to, and the instruction information is executed according to its contents. If the instruction information specifies switching, the real processor is switched to another virtual machine by activating the virtual machine switching control mechanism, and if the instruction information specifies continuation, the real processor is switched to another virtual computer. does not switch the allocation of real processors to other virtual machines,
The virtual machine is configured to be switched in response to a time slice expiration signal generated by the time slice timer.

すなわち、本発明仮想計算機制御方式は、実行
中の仮想計算機のアイドル状態の検出時に仮想計
算機の切換えを行なうべきか、あるいは切換えを
行なわず一定時間が経過するまで、仮想計算機を
割り当てたまま続行するべきかを示す指示情報を
各仮想計算機ごとに保持し、仮想計算機でのアイ
ドル状態の検出時に、この指示情報に応じて、他
の仮想計算機への切換えあるいは仮想計算機の続
行を制御するように構成される。
In other words, the virtual machine control method of the present invention determines whether to switch virtual machines when an idle state of a running virtual machine is detected, or to continue assigning virtual machines until a certain period of time elapses without switching. The configuration is configured such that instruction information indicating whether the virtual machine should be used is maintained for each virtual machine, and when an idle state is detected in a virtual machine, switching to another virtual machine or continuation of the virtual machine is controlled according to this instruction information. be done.

次に、本発明の実施例について、図面を参照し
て構成および動作を説明する。
Next, the configuration and operation of an embodiment of the present invention will be described with reference to the drawings.

第1図は本発明の一実施例を示すブロツク図で
ある。
FIG. 1 is a block diagram showing one embodiment of the present invention.

第1図に示す仮想計算機制御方式においては、
仮想計算機制御テーブル1は、各仮想計算機に対
応したエントリをもち、各エントリは、対応する
仮想計算機が動作可能かどうかを示す状態情報1
2と、対応する仮想計算機のタイムスライス値1
3と、前回その仮想計算機の仮想プロセツサが実
プロセツサを取り上げられた時点、すなわち、そ
の仮想計算機の仮想プロセツサへの実プロセツサ
の割当てが解除された時点でのプロセツサ状態で
ある退避情報14に加えて、アイドル状態の検出
時の処理を示す指示情報11を格納するためのも
のである。
In the virtual machine control method shown in Figure 1,
The virtual machine control table 1 has entries corresponding to each virtual machine, and each entry contains status information 1 indicating whether the corresponding virtual machine is operable.
2 and the corresponding virtual machine time slice value 1
3, in addition to the saved information 14 which is the processor state at the time when the real processor was taken away from the virtual processor of the virtual machine last time, that is, when the assignment of the real processor to the virtual processor of the virtual machine was cancelled. , for storing instruction information 11 indicating processing when an idle state is detected.

指示情報11として値“1”がセツトされてい
る場合には、アイドル状態の検出時に、仮想計算
機の切換えを行なうべきであることを示している
ものとする。また、指示情報11として値“0”
がセツトされている場合にはアイドル状態が検出
されても、仮想計算機の切換えを行なわずに、割
当てをそのまま続行して処理を続行すべきである
ことを示しているものとする。
When the value "1" is set as the instruction information 11, it indicates that the virtual machine should be switched when an idle state is detected. In addition, the value “0” is specified as the instruction information 11.
If set, it indicates that even if an idle state is detected, the allocation should continue without switching the virtual machine and processing should continue.

また、仮想計算機切換制御機構2は、各仮想計
算機の切換えの契機において、次に実プロセツサ
を割当てるべき仮想計算機を決定し、この決定に
もとづき、直前まで実プロセツサを割り当ててい
た仮想計算機のプロセツサ状態を、プロセツサ状
態レジスタ群3から読み出し、前記仮想計算機制
御テーブル1に退避情報14として退避し、新た
に実プロセツサを割り当てるべき仮想計算機に対
応した退避情報14を前記仮想計算機制御テーブ
ル1から取り出し、実プロセツサのプロセツサ状
態レジスタ群3に格納させることにより、仮想計
算機の切換えも行なう。これとともに、新たに実
プロセツサを割り当てた仮想計算機を指示する仮
想計算機識別番号VMIDを仮想計算機識別番号レ
ジスタ5に設定し、仮想計算機の状態も“実行
中”に更新する。
Furthermore, at the time of switching each virtual machine, the virtual machine switching control mechanism 2 determines the next virtual machine to which a real processor should be assigned, and based on this decision, changes the processor state of the virtual machine to which the real processor was assigned until just before. is read from the processor status register group 3 and saved as the save information 14 in the virtual machine control table 1, and the save information 14 corresponding to the virtual machine to which a new real processor is to be allocated is retrieved from the virtual machine control table 1 and executed. By storing the information in the processor status register group 3 of the processor, switching between virtual machines is also performed. At the same time, the virtual machine identification number VMID indicating the virtual machine to which the real processor has been newly assigned is set in the virtual machine identification number register 5, and the state of the virtual machine is also updated to "running".

また、このときに、タイムスライスタイマ7の
初期設定も行なう。すなわち、仮想計算機切換制
御機構2は仮想計算機制御テーブル1上の仮想計
算機識別番号VMIDに対応するタイムスライス値
13をタイムスライス値設定信号72を供給する
ことにより、タイムスライスタイマ7に設定す
る。タイムスライスタイマ7は、クロツク信号に
よりカウントダウンするタイマで、指定された時
間が経過すると、タイムスライス切れ信号71を
発生して仮想計算機切換制御機構2に通知する。
At this time, the time slice timer 7 is also initialized. That is, the virtual machine switching control mechanism 2 sets the time slice value 13 corresponding to the virtual machine identification number VMID on the virtual machine control table 1 in the time slice timer 7 by supplying the time slice value setting signal 72. The time slice timer 7 is a timer that counts down based on a clock signal, and when a specified time has elapsed, it generates a time slice expiration signal 71 and notifies the virtual machine switching control mechanism 2.

タイムスライスタイマ7からのタイムスライス
切れ信号71は、仮想計算機切換制御機構2に印
加され、これが仮想計算機の切換えの契機として
使用される。すなわち、タイムスライス切れの契
機では、これまで実プロセツサを割り当てられて
いた仮想計算機から実プロセツサを取り上げ、他
へ実行可能な仮想計算機に割り当てが行われる。
A time slice expiration signal 71 from the time slice timer 7 is applied to the virtual machine switching control mechanism 2, and is used as a trigger for switching the virtual machine. That is, when the time slice expires, the real processor is taken away from the virtual machine to which the real processor has been assigned so far, and is assigned to another executable virtual machine.

また、第1図に示す実施例においては、仮想計
算機上のプログラムから発生する入出力動作の処
理はすべてフアームウエアによりなされその処理
のために、実行中の仮想計算機のプロセツサ状態
を退避し、入出力動作の処理のための制御プログ
ラムの動作環境をロードする等の処理が不要であ
るとしている。
In addition, in the embodiment shown in FIG. 1, all input/output operations generated by programs on the virtual machine are performed by firmware. It is said that processing such as loading the operating environment of the control program for processing the output operation is not necessary.

すなわち、仮想計算機上のプログラムから出さ
れた仮想入出力デバイスへの入出力要求は、仮想
計算機のプロセツサ状態を退避することなく、フ
アームウエアにより、対応する実デバイスへの入
出力要求に変換され、実行され、入出力完了によ
り実プロセツサに印加される入出力割込みも、フ
アームウエアにより、仮想計算機の状態の退避を
行なうことなく、仮想入出力デバイスの入出力割
込みに変換され、これを、仮想計算機の状態にも
反映させる。すなわち、仮想計算機の状態を実行
可能な状態とする処理がなされるとともに、仮想
計算機の切換えの契機としても使用される。
In other words, an input/output request issued by a program on a virtual machine to a virtual input/output device is converted by firmware into an input/output request to a corresponding real device without saving the processor state of the virtual machine. The input/output interrupt that is executed and applied to the real processor upon completion of the input/output is also converted to the input/output interrupt of the virtual input/output device by the firmware without saving the state of the virtual machine, and the input/output interrupt is sent to the virtual machine. It is also reflected in the state of That is, a process is performed to change the state of the virtual machine to an executable state, and it is also used as a trigger for switching the virtual machine.

この契機で起動された仮想計算機切換制御機構
2は、他に実行可能な仮想計算機がなければ、こ
の仮想計算機に実プロセツサを割り当てることに
なる。
The virtual machine switching control mechanism 2 started with this opportunity will allocate a real processor to this virtual machine if there is no other executable virtual machine.

また、当然のことながら、仮想計算機切換制御
機構2自体もハームウエアあるいはフアームウエ
アにより実現されており、これが動作するのに仮
想計算機に与えられていた実プロセツサを取り上
げる必要はない。
Further, as a matter of course, the virtual machine switching control mechanism 2 itself is realized by hardware or firmware, and there is no need to use the real processor provided to the virtual machine for this to operate.

また、プロセス切換制御機構4は、仮想計算機
内の各プロセスに対するプロセツサの割当てを制
御するもので、仮想計算機内で実行可能なプロセ
スがなくなつたとき、すなわち、仮想計算機内で
プロセツサがアイドル状態になつたときこれを検
出し、アイドル検出信号41を出力する。このア
イドル検出信号41はアンドゲート6の一方の入
力に印加され、他方の入力には、仮想計算機制御
テーブル1からの指示情報11が印加され、その
出力は仮想計算機切換信号61として仮想計算機
切換制御機構2に印加されている。
The process switching control mechanism 4 controls the allocation of processors to each process within the virtual machine, and when there are no executable processes within the virtual machine, that is, the processors within the virtual machine become idle. When the idle time is reached, this is detected and an idle detection signal 41 is output. This idle detection signal 41 is applied to one input of the AND gate 6, and the instruction information 11 from the virtual machine control table 1 is applied to the other input, and its output is used as the virtual machine switching signal 61 to control virtual machine switching. is applied to mechanism 2.

いま、ある仮想計算機を実行しているとき(こ
のとき、この仮想計算機を識別するための仮想計
算機識別番号VMIDは仮想計算機識別番号レジス
タ5に格納され、この仮想計算機識別番号VMID
によりアドレスされる仮想計算機制御テーブル1
に格納されている指示情報11の値はアンドゲー
ト6に印加されている。)プロセス切換制御機構
4がアイドル状態を検出してアイドル検出信号4
1を出力すると、アンドゲート6にこのアイドル
検出信号41が印加される。
When a certain virtual machine is currently being executed (at this time, the virtual machine identification number VMID for identifying this virtual machine is stored in the virtual machine identification number register 5, and this virtual machine identification number VMID
Virtual machine control table 1 addressed by
The value of the instruction information 11 stored in is applied to the AND gate 6. ) The process switching control mechanism 4 detects the idle state and outputs the idle detection signal 4.
When 1 is output, this idle detection signal 41 is applied to the AND gate 6.

このとき、仮想計算機制御テーブル1に格納さ
れている指示情報11のうち実行中の仮想計算機
に対応するエントリの指示情報11が値“1”の
とき、すなわち、アイドル状態の検出時における
仮想計算機の切換えを指示している場合には、ア
ンドゲート6は、仮想計算機切換信号61として
値“1”を出力し、これにより、仮想計算機切換
制御機構2が起動される。
At this time, when the instruction information 11 of the entry corresponding to the running virtual machine among the instruction information 11 stored in the virtual machine control table 1 has the value "1", that is, when the virtual machine's idle state is detected, If switching is being instructed, the AND gate 6 outputs the value "1" as the virtual machine switching signal 61, and thereby the virtual machine switching control mechanism 2 is activated.

起動された仮想計算機切換制御機構2は現在実
プロセツサを割り当てられている仮想計算機の状
態を待ち状態にする。
The activated virtual machine switching control mechanism 2 changes the state of the virtual machine to which the real processor is currently assigned to the waiting state.

次に、仮想計算機制御テーブル1の状態情報1
2をサーチし、実行可能な仮想計算機を決定す
る。このあと、これまで実プロセツサを割り当て
られていた仮想計算機のプロセツサ状態を仮想計
算機制御テーブル1の退避情報14として退避
し、次に、決定された仮想計算機の退避情報14
を実プロセツサに戻すことにより、選択された仮
想計算機への切換えを完了する。
Next, state information 1 of virtual machine control table 1
2 and determines an executable virtual machine. After this, the processor state of the virtual machine to which the real processor has been assigned up to now is saved as the save information 14 of the virtual machine control table 1, and then the saved information 14 of the determined virtual machine is saved.
The switch to the selected virtual machine is completed by returning the virtual machine to the real processor.

プロセス切換制御機構4がアイドル状態を検出
したとき、仮想計算機制御テーブル1の実行中の
すなわち実プロセツサを割り当てられている仮想
計算機に対応する指示情報11が、仮想計算機の
割当ての続行を指示している場合、すなわち、対
応する指示情報11の値が“0”の場合には、ア
ンドゲート6は“0”を出力するので、仮想計算
機の状態の変更、およびこれに伴なう仮想計算機
の切換えは行なわず、この仮想計算機は、実プロ
セツサを割り当てられたままで、アイドル状態が
解除されるのを待つていることになる。
When the process switching control mechanism 4 detects an idle state, the instruction information 11 corresponding to the virtual machine that is being executed, that is, to which a real processor has been assigned in the virtual machine control table 1, indicates that the virtual machine allocation should continue. In other words, when the value of the corresponding instruction information 11 is "0", the AND gate 6 outputs "0", so the state of the virtual machine is changed and the virtual machine is switched accordingly. Instead, this virtual machine remains assigned a real processor and waits for the idle state to be released.

指示情報11が仮想計算機の割当ての続行を指
示している場合には、この仮想計算機が実プロセ
ツサを取り上げられるのに、この仮想計算機に割
り当てられたタイムスライス値13が消化された
とき、すなわち、この仮想計算機が実プロセツサ
を割り当てられた時点でセツトされたタイムスラ
イスタイマ7がタイムスライス切れ信号71を発
生したとき、あるいは、この仮想計算機よりも高
い優先度をもつ仮想計算機が実行可能な状態にな
つた場合に限られることになる。
If the instruction information 11 instructs to continue the allocation of the virtual machine, when the time slice value 13 allocated to this virtual machine is used up even though the real processor is taken away from this virtual machine, that is, When the time slice timer 7, which was set when this virtual machine was assigned a real processor, generates the time slice expiry signal 71, or when a virtual machine with a higher priority than this virtual machine becomes executable. This will be limited to cases where the child has grown old.

以上、本発明の実施例について説明したが、上
述の説明により明らかなように、本発明の主旨は
複数個の仮想計算機を実現する仮想計算機システ
ムにおいて、実プロセツサに割り当てるべき仮想
計算機を決定し、この決定にもとづき、仮想計算
機を切換える仮想計算機切換制御手段と、 前記仮想計算機が実プロセツサを割り当てられ
てから、指定時間が経過すると、前記仮想計算機
切換制御手段に対して仮想計算機切換信号を発生
するタイムスライスタイマと、 実プロセツサで実行中の仮想計算機におけるア
イドル状態を検出するプロセス切換制御手段と、 各仮想計算機の状態情報およびプロセツサ状態
としての退避情報を格納するほかにアイドル状態
の検出時における動作を指定するための指示情報
を格納する仮想計算機制御テーブルとをもち、 実プロセツサを割り当てられて実行中の仮想計
算機においてアイドル状態が検出された場合に、
実プロセツサを割り当てられている仮想計算機に
対応する前記仮想計算機制御テーブル上の前記指
示情報を参照し、その内容に従つて、指示情報が
切換えを指定している場合には、前記仮想計算機
切換制御機構を起動することにより、他の仮想計
算機への実プロセツサの切換えを行い、指示情報
が続行を指定している場合には、他の仮想計算機
への実プロセツサの割当ての切換えは行わず、前
記タイムスライスタイマの発生するタイムスライ
ス切れ信号を契機として仮想計算機の切換えを行
なうことにより、仮想計算機の切換えのオーバヘ
ツドが少く、かつ、実プロセツサの使用効率も高
めた仮想計算機切換制御方式を実現することにあ
り、個々の手段の具体的な実現方式に関しては、
本発明の主旨とは直接関係がないので説明を簡潔
にするために省略してあるが、当業者にとつては
種々の方式で実実現できることが明らかであろ
う。
The embodiments of the present invention have been described above, but as is clear from the above description, the gist of the present invention is to determine a virtual machine to be assigned to a real processor in a virtual computer system that implements a plurality of virtual machines, Based on this determination, a virtual machine switching control means for switching virtual machines; and when a specified time has elapsed since the virtual machine was assigned a real processor, a virtual machine switching signal is generated to the virtual machine switching control means. A time slice timer, a process switching control means that detects an idle state in a virtual machine running on a real processor, and a process switching control means that stores state information of each virtual machine and save information as a processor state, and performs operations when an idle state is detected. A virtual machine control table that stores instruction information for specifying the
The instruction information on the virtual machine control table corresponding to the virtual machine to which a real processor is assigned is referred to, and according to the contents, if the instruction information specifies switching, the virtual machine switching control is performed. By starting the mechanism, the real processor is switched to another virtual machine, and if the instruction information specifies to continue, the real processor is not switched to the other virtual machine, and the above To realize a virtual machine switching control method that reduces the overhead of virtual machine switching and improves the efficiency of using a real processor by switching virtual machines using a time slice expiration signal generated by a time slice timer as a trigger. Regarding the specific implementation method of each method,
Although not directly related to the gist of the present invention, it has been omitted for the sake of brevity, but it will be obvious to those skilled in the art that it can be implemented in various ways.

本発明の仮想計算機制御方式は、仮想計算機制
御テーブルに指示情報を格納しておくことによ
り、アイドル状態が検出されても指示情報が続行
を指示しておれば仮想計算機の切換を行なわなく
させることができるため、仮想計算機の切換回数
を削減できるので、オーバヘツドを低減しかつ実
プロセツサの使用効率を向上できるという効果が
ある。
The virtual machine control method of the present invention stores instruction information in a virtual machine control table, so that even if an idle state is detected, if the instruction information instructs to continue, the virtual machine will not be switched. As a result, the number of times virtual machines are switched can be reduced, which has the effect of reducing overhead and improving the efficiency of using real processors.

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

第1図は本発明の一実施例を示すブロツク図で
ある。 1……仮想計算機制御テーブル、2……仮想計
算機切換制御機構、3……プロセツサ状態レジス
タ、4……プロセス切換制御機構、5……仮想計
算機識別番号レジスタ、6……アンドゲート、7
……タイムスライスタイマ、11……指示情報、
12……状態情報、13……タイムスライス値、
14……退避情報、41……アイドル検出信号、
61……仮想計算機切換信号、71……タイムス
ライス切れ信号、72……タイムスライス値設定
信号。
FIG. 1 is a block diagram showing one embodiment of the present invention. DESCRIPTION OF SYMBOLS 1... Virtual machine control table, 2... Virtual machine switching control mechanism, 3... Processor status register, 4... Process switching control mechanism, 5... Virtual machine identification number register, 6... AND gate, 7
...Time slice timer, 11...Instruction information,
12...Status information, 13...Time slice value,
14... Evacuation information, 41... Idle detection signal,
61...Virtual computer switching signal, 71...Time slice expiry signal, 72...Time slice value setting signal.

Claims (1)

【特許請求の範囲】[Claims] 1 仮想計算機ごとにタイムスライス値および切
換か続行かを指示する指示情報を格納する仮想計
算機制御テーブルと、実プロセツサで実行中の前
記仮想計算機におけるアイドル状態を検出してア
イドル検出信号を出力するプロセス切換制御機構
と、前記仮想計算機が前記実プロセツサを割り当
てられてから対応する前記タイムスライス値で指
示される指定時間の経過後にタイムスライス切れ
信号を出力するタイムスライスタイマと、前記ア
イドル検出信号が供給されたときに対応する前記
指示情報が切換えを指示しているときおよび前記
タイムスライス切れ信号が供給されたときに前記
実プロセツサに割り当てるべき仮想計算機を決定
し切り換えるための仮想計算機切換制御機構とを
含むことを特徴とする仮想計算機制御方式。
1. A virtual machine control table that stores time slice values and instruction information for switching or continuing for each virtual machine, and a process that detects the idle state of the virtual machine running on a real processor and outputs an idle detection signal. a switching control mechanism; a time slice timer that outputs a time slice expiration signal after a specified time indicated by the corresponding time slice value has elapsed since the virtual computer was assigned the real processor; and the idle detection signal is supplied. a virtual machine switching control mechanism for determining and switching a virtual machine to be assigned to the real processor when the corresponding instruction information instructs switching when the time slice expiration signal is supplied; A virtual computer control method characterized by comprising:
JP66883A 1983-01-06 1983-01-06 Virtual computer control system Granted JPS59125450A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP66883A JPS59125450A (en) 1983-01-06 1983-01-06 Virtual computer control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP66883A JPS59125450A (en) 1983-01-06 1983-01-06 Virtual computer control system

Publications (2)

Publication Number Publication Date
JPS59125450A JPS59125450A (en) 1984-07-19
JPH0532771B2 true JPH0532771B2 (en) 1993-05-17

Family

ID=11480117

Family Applications (1)

Application Number Title Priority Date Filing Date
JP66883A Granted JPS59125450A (en) 1983-01-06 1983-01-06 Virtual computer control system

Country Status (1)

Country Link
JP (1) JPS59125450A (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4975836A (en) * 1984-12-19 1990-12-04 Hitachi, Ltd. Virtual computer system
JPH0324633A (en) * 1989-06-21 1991-02-01 Matsushita Electric Ind Co Ltd Coordination operation method for operating system
JP2554172B2 (en) * 1989-09-14 1996-11-13 株式会社日立製作所 Task scheduling method

Also Published As

Publication number Publication date
JPS59125450A (en) 1984-07-19

Similar Documents

Publication Publication Date Title
JPH0776894B2 (en) Clock signal control method for processor and information processing system
US20110078702A1 (en) Multiprocessor system
EP0362880B1 (en) Process for partially swapping real storage areas used by a program between a real storage and an auxiliary storage
KR101673247B1 (en) Processor with assignable general purpose register set
JPH0532771B2 (en)
JP2001117786A (en) Process scheduling device and process scheduling method
EP0223463B1 (en) Multiprocessor data processing system
JP2001282560A (en) Virtual computer control method, its performing device and recording medium recording its processing program
JPS603229B2 (en) Information processing method
JPH0644234B2 (en) Task management device
JPS6027031A (en) Information processor
JP2815095B2 (en) Task allocation control method in multiprocessor
JPH10260850A (en) Virtual computer system
JP2566002B2 (en) Task dispatching method
JPS6126095B2 (en)
JPS59146387A (en) Stack control system of multiprocessing
JP3362673B2 (en) Channel control device
JP2581007B2 (en) CPU fixed system
JPH0354603A (en) Multitask processing method
JPH02206841A (en) Virtual machine system
JPH05143370A (en) Multi-task computer
JPH05342021A (en) Multitask computer
JPS6347861A (en) Input/output control method for electronic computer
JPH03116335A (en) System for transferring from non-privileged cpu to privileged cpu
JPH0444131A (en) Device and method for execution of inter-processor communication in plural os running systems