JP2001166954A - Virtual computer device and its control method - Google Patents

Virtual computer device and its control method

Info

Publication number
JP2001166954A
JP2001166954A JP35203699A JP35203699A JP2001166954A JP 2001166954 A JP2001166954 A JP 2001166954A JP 35203699 A JP35203699 A JP 35203699A JP 35203699 A JP35203699 A JP 35203699A JP 2001166954 A JP2001166954 A JP 2001166954A
Authority
JP
Japan
Prior art keywords
timer interrupt
interrupt
pseudo
cpu
period
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
JP35203699A
Other languages
Japanese (ja)
Inventor
Shinya Narahara
伸哉 奈良原
Yoji Yamashita
洋史 山下
Naoko Kako
直子 加来
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP35203699A priority Critical patent/JP2001166954A/en
Publication of JP2001166954A publication Critical patent/JP2001166954A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To surely hold an inside clock by holding cyclic timer interruption, and then by generating it in a prescribed cycle. SOLUTION: This virtual computer device is provided with a main storage, a CPU, a timer interruption generating device 12 for generating timer interruption in a set cycle, and a hardware division controlling part 13 so that hardware including the main storage and the CPU can be logically divided and controlled. The hardware division controlling part 13 is provided with an interruption counter 17 for a first OS for counting timer interruption in the switching cycle of the first OS, an interruption counter 18 for a second OS for counting timer interruption in the switching cycle of the second OS, and a pseudo timer interruption cycle preserving part 19 for preserving a pseudo timer interruption cycle calculated by dividing the operating period of each OS by the counted value of each interruption counter. Then, when the CPU operates the OS, the pseudo timer interruption is generated in the cycle preserved in the pseudo timer interruption cycle preserving part.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は仮想計算機装置にか
かり、特に2以上のOSを動作させることができる仮想
計算機装置に関する。
The present invention relates to a virtual machine, and more particularly, to a virtual machine capable of operating two or more OSs.

【0002】[0002]

【従来の技術】パーソナルコンピュータにおいては、通
常一台のコンピュータの中で唯一のOSが動作する。こ
のOSはタイマ割り込み発生装置を備え、このタイマ割
り込み発生装置は設定した周期にしたがってタイマ割り
込みを発生する。このようなタイマ割り込み発生装置を
用いると、一度周期を設定すれば以降はその周期に従っ
てタイマ割り込みが自動的に発生するため、OSのタイ
マ割り込み制御プログラムの簡便化を図ることができ
る。
2. Description of the Related Art In a personal computer, usually only one OS operates in one computer. The OS includes a timer interrupt generator, and the timer interrupt generator generates a timer interrupt according to a set cycle. When such a timer interrupt generation device is used, once a cycle is set, a timer interrupt is automatically generated according to the cycle thereafter, so that the timer interrupt control program of the OS can be simplified.

【0003】一方、メインフレームに関しては、特開平
06−103092号公報(仮想計算機システム)に、
計算機装置を分割して一台の計算機装置内に仮想的な計
算機を構成して、計算機装置をより有効に運用すること
が示されている。計算機装置の分割は、物理的に分割す
る物理分割および論理的に分割する論理分割が知られて
いる。論理分割はCPU等のハードウエアを分割して形
成した仮想計算機装置間で共有することになるためその
共有方法が重要である。
On the other hand, as for the mainframe, Japanese Patent Laid-Open No. 06-103092 (virtual computer system)
It shows that a computer device is divided to form a virtual computer in one computer device, and the computer device is operated more effectively. As a division of a computer device, a physical division for physically dividing and a logical division for logically dividing are known. Since the logical partitioning is shared between virtual computer devices formed by dividing hardware such as a CPU, the sharing method is important.

【0004】特開平06−187178 号公報(仮想
計算機システムの入出力タイマ割り込み)には、メイン
フレームにおいて、割り込みの周期をOS毎に割り込み
処理プログラム内で逐次変更して、割り込みを効率的に
処理することが示されている。
Japanese Patent Application Laid-Open No. 06-187178 (input / output timer interrupt of a virtual machine system) discloses that in the mainframe, an interrupt cycle is sequentially changed in an interrupt processing program for each OS in an interrupt processing program to efficiently process an interrupt. It is shown to be.

【0005】また、特開平08−263416号公報
(統合機構を用いた入出力処理方法および処理システ
ム)には、発生した割り込みをシーケンシャルに処理す
る装置を付加し、この装置を制御することにより、タイ
マ割り込みを効率的に処理することが示されている。
Japanese Patent Application Laid-Open No. 08-263416 (an input / output processing method and processing system using an integrated mechanism) is provided with a device for sequentially processing generated interrupts, and by controlling this device, It has been shown that timer interrupts are handled efficiently.

【0006】[0006]

【発明が解決しようとする課題】しかし、前記公報に示
される技術、すなわちメインフレームに適用される技術
は、パーソナルコンピュータ上で複数のOSを動作させ
る仮想計算機システムに適用することは困難である。
However, it is difficult to apply the technology disclosed in the above publication, that is, the technology applied to the mainframe, to a virtual computer system that operates a plurality of OSs on a personal computer.

【0007】すなわち、多くのパーソナルコンピュータ
は共通のアーキテクチャを持ち、その上で動作するOS
はそれらのアーキテクチャを前提に設計されており、タ
イマ割り込みの周期を逐一変更したり、付加的な装置を
制御したりすることは考慮されていない。このため、メ
インフレームで利用されているタイマ割り込みの割り込
み周期を逐次変更して割り込みを制御する方法は、既存
のOSの大幅な変更が必要になる。さらに割り込みのた
びに逐一割り込み周期を変更することが必要である。
That is, many personal computers have a common architecture, and an OS operating on the common architecture
Is designed on the basis of those architectures, and does not consider changing the timer interrupt cycle one by one or controlling additional devices. For this reason, the method of controlling the interrupt by sequentially changing the interrupt cycle of the timer interrupt used in the mainframe requires a significant change of the existing OS. Further, it is necessary to change the interrupt cycle for each interrupt.

【0008】また、発生した割り込みをシーケンシャル
に処理する装置を付加する方法は、パーソナルコンピュ
ータの共通のアーキテクチャを変更することになり、適
用範囲が著しく狭まることになる。
In addition, the method of adding a device for sequentially processing generated interrupts changes the common architecture of a personal computer, and its application range is significantly narrowed.

【0009】すなわち、パーソナルコンピュータ上で動
作する既存のOSに、メインフレームで用いられている
タイマ割り込みの制御方法を適用するのは困難である。
このため内部時計を正確に保持することも困難である。
That is, it is difficult to apply a timer interrupt control method used in a mainframe to an existing OS operating on a personal computer.
For this reason, it is also difficult to hold the internal clock accurately.

【0010】本発明は前記問題点に鑑みてなされたもの
で、周期的なタイマ割り込みを保留し、あるいは実時間
を計測することにより、内部時計を正確に保持すること
のできる仮想計算機および仮想計算機装置の制御方法を
提供する。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned problems, and a virtual computer and a virtual computer capable of holding an internal clock accurately by suspending a periodic timer interrupt or measuring real time. An apparatus control method is provided.

【0011】[0011]

【課題を解決するための手段】本発明は、上記の課題を
解決するために次のような手段を採用した。
The present invention employs the following means in order to solve the above-mentioned problems.

【0012】主記憶、CPU、設定した周期でタイマ割
り込みを発生するタイマ割り込み発生装置およびハード
ウエア分割制御部を備え、前記主記憶およびCPUを含
むハードウエアを論理的に分割して制御する仮想計算機
装置において、前記ハードウエア分割制御部に第1のO
Sの切り換え周期内のタイマ割り込みまたはタイマ割り
込みキューを計数する第1のOS用割り込みカウンタ
と、第2のOSの切り換え周期内のタイマ割り込みまた
はタイマ割り込みキューを計数する第2のOS用割り込
みカウンタと、前記それぞれのOSの動作期間を前記そ
れぞれの割り込みカウンタの計数値で除算した擬似的タ
イマ割り込み周期を保存する擬似的タイマ割り込み周期
保存部とを設け、CPUがOSを動作させているとき、
前記擬似的タイマ割り込み周期保存部に保存した周期で
擬似的タイマ割り込みを発生することにより内部時計を
正確に保持する。また、前記タイマ割り込みはタイマ割
り込みキューあるいはI/O割り込みに代えることがで
きる。
A virtual machine which includes a main memory, a CPU, a timer interrupt generating device for generating a timer interrupt at a set cycle, and a hardware division control unit, and which logically divides and controls the hardware including the main storage and the CPU; In the apparatus, a first O is provided to the hardware division control unit.
A first OS interrupt counter for counting a timer interrupt or a timer interrupt queue within a switching cycle of S; a second OS interrupt counter for counting a timer interrupt or timer interrupt queue within a second OS switching cycle; A pseudo timer interrupt period storage unit for storing a pseudo timer interrupt period obtained by dividing the operation period of each OS by the count value of each interrupt counter, and when the CPU is operating the OS,
By generating a pseudo timer interrupt at the cycle stored in the pseudo timer interrupt cycle storage section, the internal clock is accurately held. Further, the timer interrupt can be replaced with a timer interrupt queue or an I / O interrupt.

【0013】[0013]

【発明の実施の形態】以下に本発明の第1の実施形態を
図1ないし図4を用いて説明する。図1は本実施形態に
かかる仮想計算機装置を示す図である。図において、1
0は主記憶装置、11はCPUである。12はタイマ割
り込み発生装置であり、周期的にタイマ割り込み信号を
発生してCPU11に入力する。13はハードウエア分
割制御部であり、ハードウエアを論理分割して複数のO
Sに適宜割り当てる。14は主記憶10に形成した第1
のOS(OS1)、15は主記憶100に形成した第2
のOS(OS2)、16は割り込み制御部であり、稼働
中のOSに対してタイマ割り込みを発生させる。17は
第1のOS用のタイマ割り込みカウンタであり、第1の
OSの稼働周期を計数する。18は第2のOS用のタイ
マ割り込みカウンタであり、第1のOSの稼働周期を計
数する。19は擬似的タイマ割り込み周期保存部であ
り、第1あるいは第2のOSに供給するタイマ割り込み
の擬似的な周期を、稼働中のOSの稼働期間を該当OS
用のタイマ割り込みカウンタの計数値で除算して求め、
求めた擬似的タイマ割り込み周期を保存する。20は第
1のOS用のタイマ割り込み処理部であり、内部時計の
更新等を行う。21は第2のOS用のタイマ割り込み処
理部であり、内部時計の更新等を行う。22は内部バス
であり、CPU11と主記憶装置10を接続する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A first embodiment of the present invention will be described below with reference to FIGS. FIG. 1 is a diagram showing a virtual machine device according to the present embodiment. In the figure, 1
0 is a main storage device, and 11 is a CPU. Reference numeral 12 denotes a timer interrupt generation device which periodically generates a timer interrupt signal and inputs it to the CPU 11. Reference numeral 13 denotes a hardware division control unit, which logically divides the hardware into a plurality of Os
S is appropriately assigned. 14 is the first memory formed in the main memory 10
OS (OS1) 15 is the second OS formed in the main memory 100.
OS (OS2) 16 is an interrupt control unit, which generates a timer interrupt for the operating OS. A timer interrupt counter 17 for the first OS counts the operating cycle of the first OS. Reference numeral 18 denotes a timer interrupt counter for the second OS, which counts the operating cycle of the first OS. A pseudo timer interrupt period storage unit 19 stores the pseudo period of the timer interrupt supplied to the first or second OS, and the operating period of the operating OS.
Divided by the count value of the timer interrupt counter for
The obtained pseudo timer interrupt cycle is stored. Reference numeral 20 denotes a timer interrupt processing unit for the first OS, which updates an internal clock. Reference numeral 21 denotes a timer interrupt processing unit for the second OS, which updates an internal clock and the like. Reference numeral 22 denotes an internal bus, which connects the CPU 11 and the main storage device 10.

【0014】図2はハードウエア分割制御部13が行う
処理を説明するフローチャートである。まずステップ2
00において、タイマ割り込み発生装置12によるタイ
マ割り込みが発生したか否かを判定する。タイマ割り込
みが発生しているとステップ201に進み、そうでなけ
ればループ処理を終了する。ステップ201において、
全てのOS用のカウンタ、すなわち第1のOS用タイマ
割り込みカウンタ17および第2のOS用タイマ割り込
みカウンタ18をインクリメントしてステップ210に
進む。
FIG. 2 is a flowchart for explaining the processing performed by the hardware division control unit 13. First step 2
At 00, it is determined whether or not a timer interrupt by the timer interrupt generation device 12 has occurred. If a timer interrupt has occurred, the process proceeds to step 201; otherwise, the loop process ends. In step 201,
All the OS counters, that is, the first OS timer interrupt counter 17 and the second OS timer interrupt counter 18 are incremented, and the routine proceeds to step 210.

【0015】ステップ210において、OSを切り換え
る時期であるか否かを判定する。OSの切り換え時期で
ある場合にはステップ211に進み、そうでなければス
テップ220に進む。ステップ211において、該当O
Sへの切り換え処理を行う。すなわち現在稼働中のOS
を停止し、CPUなどのハードウエアを次のOSに割り
当て直す。ステップ212において、擬似的タイマ割り
込み周期を、擬似的タイマ割り込み周期=該当OSの動
作時間/タイマ割り込みカウンタ計数値、で演算し、求
めた擬似的タイマ割り込み周期を擬似的タイマ割り込み
周期保存部19に保存する。ステップ213において、
タイマ割り込みカウンタの計数値をリセットしてループ
処理を終了する。
In step 210, it is determined whether it is time to switch the OS. If it is time to switch the OS, the process proceeds to step 211; otherwise, the process proceeds to step 220. In step 211, the corresponding O
The switching process to S is performed. In other words, the currently running OS
Is stopped, and hardware such as a CPU is reassigned to the next OS. In step 212, the pseudo timer interrupt cycle is calculated by the pseudo timer interrupt cycle = the operating time of the OS / counter value of the timer interrupt counter, and the obtained pseudo timer interrupt cycle is stored in the pseudo timer interrupt cycle storage unit 19. save. In step 213,
The count value of the timer interrupt counter is reset, and the loop processing ends.

【0016】ステップ220において、擬似的タイマ割
り込み周期保存部19に保存した擬似的タイマ割り込み
周期が経過したか否かを判定する。擬似的タイマ割り込
み周期が経過した場合にはステップ221に進み、そう
でなければループ処理を終了する。ステップ221にお
いて、現在のCPU状態を待避する。ステップ222に
おいて、CPUを擬似的にタイマ割り込みが発生した状
態に設定する。ステップ223において、現在稼働中の
OSのタイマ割り込み処理部(現在稼働中のOSがOS
1であればタイマ割り込み処理部20、現在稼働中のO
SがOS2であればタイマ割り込み処理部21)を呼び
出す。
In step 220, it is determined whether the pseudo timer interrupt period stored in the pseudo timer interrupt period storage unit 19 has elapsed. If the pseudo timer interrupt period has elapsed, the process proceeds to step 221; otherwise, the loop process ends. In step 221, the current CPU state is saved. In step 222, the CPU is set to a state in which a timer interrupt has been generated in a pseudo manner. At step 223, the timer interrupt processing unit of the currently operating OS (the currently operating OS
If it is 1, the timer interrupt processing unit 20 and the currently operating O
If S is OS2, the timer interrupt processing unit 21) is called.

【0017】ここで、タイマ割り込み処理部20、21
はそれぞれ内部時計の更新等の処理を行う。内部時計の
更新処理は、OSが非稼働中のタイマ割り込みを内部時
計に加算することによって行うことができる。すなわ
ち、擬似的タイマ割り込みは所定時間内に実際のタイマ
割り込みと同じ回数だけ発生するので、内部時計を正確
に保持することができる。また、タイマ割り込み処理部
20、21はそれぞれの処理が終了すると割り込み制御
部16に処理を戻す。
Here, the timer interrupt processing units 20 and 21
Performs processing such as updating the internal clock. The process of updating the internal clock can be performed by adding a timer interrupt during which the OS is not operating to the internal clock. That is, since the pseudo timer interrupt occurs the same number of times as the actual timer interrupt within the predetermined time, the internal clock can be held accurately. Further, the timer interrupt processing units 20 and 21 return the processing to the interrupt control unit 16 when the respective processing is completed.

【0018】ステップ224において、処理を戻された
割り込み制御部16は、ステップ221において待避し
ておいたCPU状態を復帰させる等の後処理を行った
後、ループ処理を終了する。
In step 224, the interrupt control unit 16 whose processing has been returned performs post-processing such as restoring the CPU state saved in step 221 and then ends the loop processing.

【0019】このように、タイマ割り込みが発生するた
びにOSごとに設置されたタイマ割り込みカウンタをイ
ンクリメントし、CPUが該当OSを動作している最中
にそのカウンタ分だけのタイマ割り込みを擬似的に発生
させる。この方法では、OSに対して発生するタイマ割
り込みの発生時刻や間隔は、実際のタイマ割り込み発生
時刻、間隔とは異なったものになる。しかし、ある時間
内にOSに発生するタイマ割り込み回数を論理分割前と
等しく保つことができるので、論理分割時のタイマ割り
込みに対するOSの修正が不要となる。反面、OSに対
するタイマ割り込みの間隔が論理分割前のものよりも短
くなるが、現実のOSのタイマ割り込み処理時間が全体
の処理時間に占める割合が小さいことを考えると、タイ
マ割り込み取りこぼしの可能性は低い。すなわち、タイ
マ割り込み取りこぼしは発生することがあるが、その頻
度を極めて低く保つことができる。
As described above, each time a timer interrupt occurs, the timer interrupt counter provided for each OS is incremented, and while the CPU is operating the corresponding OS, the timer interrupt corresponding to the counter is simulated. generate. In this method, the time and interval of the timer interrupt generated for the OS are different from the actual time and interval of the timer interrupt. However, since the number of timer interrupts generated in the OS within a certain time can be kept equal to that before logical division, it is not necessary to correct the OS for timer interrupts during logical division. On the other hand, the interval between timer interrupts to the OS is shorter than that before logical division. However, considering that the actual timer interrupt processing time of the OS accounts for a small percentage of the entire processing time, the possibility of a timer interrupt being missed is low. Low. That is, although the timer interrupt may be missed, the frequency can be kept extremely low.

【0020】以上説明したように本実施形態によれば、
割り込み制御部16により現在動作中のOSに対し任意
の周期でタイマ割り込みを発生させることが可能であ
り、またOSに変更を加えることなしに周期的タイマ割
り込みをOSごとに発生させることができる。
As described above, according to the present embodiment,
The interrupt control unit 16 can generate a timer interrupt for the currently operating OS at an arbitrary cycle, and can generate a periodic timer interrupt for each OS without changing the OS.

【0021】図3は図1に示す仮想計算機装置の変形例
を示す図である。図において12aはI/O割り込み発
生装置、17aは第1のOS用のI/O割り込みカウン
タ、18aは第2のOS用のI/O割り込みカウンタで
ある。なお、図において図1に示される部分と同一部分
については同一符号を付してその説明を省略する。
FIG. 3 is a diagram showing a modification of the virtual machine shown in FIG. In the figure, 12a is an I / O interrupt generator, 17a is an I / O interrupt counter for the first OS, and 18a is an I / O interrupt counter for the second OS. In the drawing, the same portions as those shown in FIG. 1 are denoted by the same reference numerals, and description thereof will be omitted.

【0022】このように、図1に示すタイマ割り込み発
生装置12に代えて、図3に示すI/O割り込み発生装
置12aを用いることできる。この場合はOS毎に備え
る図1に示す割り込みカウンタ17,18に代えて、図
3に示すようにI/O割り込みカウンタ17a,18a
を用いる。この例の場合には、例えばキーボード入力時
にキーボード入力と文字表示のタイミングの一致をとる
ことができる。
As described above, the I / O interrupt generator 12a shown in FIG. 3 can be used instead of the timer interrupt generator 12 shown in FIG. In this case, instead of the interrupt counters 17 and 18 shown in FIG. 1 provided for each OS, I / O interrupt counters 17a and 18a as shown in FIG.
Is used. In the case of this example, for example, at the time of keyboard input, the timing of keyboard input and the timing of character display can be matched.

【0023】図4は図1に示す仮想計算機装置の他の変
形例を示す図である。図において17bは第1のOS用
のタイマ割り込みキュー、17bは第2のOS用のタイ
マ割り込みキューである。この例の場合にはキュー自身
に割り込み時のCPU状態等の負荷情報を挿入すること
ができる。なお、図において図1に示される部分と同一
部分については同一符号を付してその説明を省略する。
FIG. 4 is a diagram showing another modified example of the virtual machine shown in FIG. In the figure, 17b is a timer interrupt queue for the first OS, and 17b is a timer interrupt queue for the second OS. In the case of this example, load information such as the CPU state at the time of interruption can be inserted into the queue itself. In the drawing, the same portions as those shown in FIG. 1 are denoted by the same reference numerals, and description thereof will be omitted.

【0024】図5ないし図6は、本発明の第2の実施形
態を示す図である。図5において、23は第1のOS内
にソフトウエアで形成した内部時計であり、タイマ割り
込み処理部20により更新、調節される。24は第2の
OS内にソフトウエアで形成した内部時計であり、タイ
マ割り込み処理部21により更新、調節される。25は
実時間計測装置である。なお、図において図1に示され
る部分と同一部分については同一符号を付してその説明
を省略する。
FIGS. 5 and 6 are views showing a second embodiment of the present invention. In FIG. 5, reference numeral 23 denotes an internal clock formed by software in the first OS, which is updated and adjusted by the timer interrupt processing unit 20. Reference numeral 24 denotes an internal clock formed by software in the second OS, which is updated and adjusted by the timer interrupt processing unit 21. 25 is a real-time measuring device. In the drawing, the same portions as those shown in FIG. 1 are denoted by the same reference numerals, and description thereof will be omitted.

【0025】図6はハードウエア分割制御部13、およ
びタイマ割り込み処理部20,21が行う処理を説明す
るフローチャートである。まずステップ300におい
て、タイマ割り込み発生装置12によるタイマ割り込み
が発生したか否かを判定する。タイマ割り込みが発生し
ているとステップ301に進み、そうでない場合にはス
テップ310に進む。ステップ301において、現在稼
働中のOS、すなわち第1のOS、あるいは第2のOS
のいずれかに対して通常のタイマ割り込みを通知する。
ステップ302において、前記稼働中のOSのタイマ割
り込み制御部に処理を移す。ステップ303において、
実時間計測部25から実時間を読み取る。ステップ30
4において、読み取った実時間を内部時計に通知し、内
部時計を調整する。ステップ305において、通常のタ
イマ割り込み処理を実行して、ループ処理を終了する。
ステップ310において、OSを切り換える時期である
か否かを判定する。OSを切り換える時期であればステ
ップ311に進み、そうでなければループ処理を終了す
る。ステップ311において、該当OSへの切り換え処
理を行い、ループ処理を終了する。すなわち現在稼働中
のOSを停止し、CPUなどのハードウエアを次のOS
に割り当て直して、ループ処理を終了する。
FIG. 6 is a flowchart for explaining processing performed by the hardware division control unit 13 and the timer interrupt processing units 20 and 21. First, in step 300, it is determined whether or not a timer interrupt has occurred by the timer interrupt generation device 12. If a timer interrupt has occurred, the process proceeds to step 301; otherwise, the process proceeds to step 310. In step 301, the currently operating OS, that is, the first OS or the second OS
A normal timer interrupt is notified to any of
In step 302, the processing is shifted to the timer interrupt control unit of the operating OS. In step 303,
The real time is read from the real time measuring unit 25. Step 30
At 4, the real time read is notified to the internal clock, and the internal clock is adjusted. In step 305, normal timer interrupt processing is executed, and the loop processing ends.
In step 310, it is determined whether it is time to switch the OS. If it is time to switch the OS, the process proceeds to step 311; otherwise, the loop process ends. In step 311, a process for switching to the corresponding OS is performed, and the loop process ends. That is, the currently running OS is stopped, and hardware such as the CPU is replaced with the next OS.
And the loop processing ends.

【0026】なお、前記ステップ303ないし304に
おいては、実時間計測部25から実時間を読み取り、読
み取った実時間を用いて内部時計を調整しているが、こ
れに代えて、前回のタイマ割り込みからの経過時間を計
測し、この時間を内部時計に加算しても内部時計を調整
することができる。
In the steps 303 to 304, the real time is read from the real time measuring unit 25, and the internal clock is adjusted using the read real time. The internal clock can also be adjusted by measuring the elapsed time and adding this time to the internal clock.

【0027】以上説明したように、タイマ割り込みが発
生した場合には現在動作中のOSにのみそのタイマ割り
込みを通知し、その都度実時間をOSの内部時計に代入
して正確な時間を保つ。この方法ではタイマ割り込み回
数は少なくなるが、タイマ割り込みが生じるたびにOS
の内部時計を実時間に合わせて調節するため、内部時計
の遅延は発生しない。
As described above, when a timer interrupt occurs, only the currently operating OS is notified of the timer interrupt, and each time the actual time is substituted into the internal clock of the OS, an accurate time is maintained. This method reduces the number of timer interrupts, but every time a timer interrupt occurs, the OS
The internal clock is adjusted according to the real time, so that the internal clock is not delayed.

【0028】なお、以上の説明では、第1および第2の
OSを切り換えて動作させる例を示したが、OSの数は
2以上の任意の数とすることができる。
In the above description, an example in which the first and second OSs are operated while being switched is shown. However, the number of OSs can be an arbitrary number of two or more.

【0029】また、主記憶装置上に構成する前記ハード
ウエア分割制御部、OS、タイマ割り込み処理部および
内部時計は、ソフトウエアにより形成可能である。さら
に前記ハードウエア分割制御部が行う処理は前述したフ
ローチャートに示されるようにソフトウエアにより実行
可能である。したがって本発明はこれらのソフトウエア
を記録したコンピュータ読み取り可能な記録媒体により
実施可能である。
The hardware division control unit, the OS, the timer interrupt processing unit, and the internal clock configured on the main storage device can be formed by software. Further, the processing performed by the hardware division control unit can be executed by software as shown in the above-described flowchart. Therefore, the present invention can be implemented by a computer-readable recording medium recording such software.

【0030】[0030]

【発明の効果】以上説明したように本発明によれば、周
期的なタイマ割り込みを保留しその後に所定周期で発生
させるので、あるいは実時間を計測してこの時間を内部
時計に供給するので、内部時計を正確に保持することが
できる。
As described above, according to the present invention, a periodic timer interrupt is suspended and then generated at a predetermined period, or a real time is measured and supplied to an internal clock. The internal clock can be maintained accurately.

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

【図1】本発明の第1の実施形態にかかる仮想計算機を
示す図である。
FIG. 1 is a diagram showing a virtual machine according to a first embodiment of the present invention.

【図2】ハードウエア分割制御部が行う処理を示すフロ
ーチャートである。
FIG. 2 is a flowchart illustrating a process performed by a hardware division control unit.

【図3】図1に示す仮想計算機の変形例を示す図であ
る。
FIG. 3 is a diagram showing a modification of the virtual machine shown in FIG.

【図4】図1に示す仮想計算機の他の変形例を示す図で
ある。
FIG. 4 is a diagram illustrating another modified example of the virtual machine illustrated in FIG. 1;

【図5】本発明の第2の実施形態にかかる仮想計算機を
示す図である。
FIG. 5 is a diagram illustrating a virtual machine according to a second embodiment of the present invention.

【図6】ハードウエア分割制御部およびタイマ割り込み
制御部が行う処理を示すフローチャートである。
FIG. 6 is a flowchart illustrating processing performed by a hardware division control unit and a timer interrupt control unit.

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

11 CPU 12 タイマ割り込み発生装置 12a I/O割り込み発生装置 13 ハードウエア分割制御部 14 第1のOS 15 第2のOS 16 割り込み制御部 17 第1のOS用タイマ割り込みカウンタ 17a 第1のOS用I/O割り込みカウンタ 17b 第1のOS用タイマ割り込みキュー 18 第2のOS用タイマ割り込みカウンタ 18a 第2のOS用I/O割り込みカウンタ 17b 第2のOS用タイマ割り込みキュー 19 擬似的タイマ割り込み周期保存部 20 第1のOS用のタイマ割り込み処理部 21 第2のOS用のタイマ割り込み処理部 22 内部バス DESCRIPTION OF SYMBOLS 11 CPU 12 Timer interrupt generator 12a I / O interrupt generator 13 Hardware division control unit 14 First OS 15 Second OS 16 Interrupt control unit 17 First OS timer interrupt counter 17a First OS I / O interrupt counter 17b First OS timer interrupt queue 18 Second OS timer interrupt counter 18a Second OS I / O interrupt counter 17b Second OS timer interrupt queue 19 Pseudo timer interrupt cycle storage 20 Timer interrupt processing unit for first OS 21 Timer interrupt processing unit for second OS 22 Internal bus

───────────────────────────────────────────────────── フロントページの続き (72)発明者 加来 直子 神奈川県横浜市戸塚区戸塚町5030番地 株 式会社日立製作所ソフトウェア事業部内 Fターム(参考) 5B098 BA04 GA02 HH04  ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Naoko Kaku 5030 Totsukacho, Totsuka-ku, Yokohama-shi, Kanagawa Prefecture F-term in the Software Division, Hitachi, Ltd. 5B098 BA04 GA02 GAH HH04

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 主記憶、CPU、設定した周期でタイマ
割り込みを発生するタイマ割り込み発生装置およびハー
ドウエア分割制御部を備え、前記主記憶およびCPUを
含むハードウエアを論理的に分割して制御する仮想計算
機装置において、 前記ハードウエア分割制御部は、第1のOSの切り換え
周期内のタイマ割り込みまたはタイマ割り込みキューを
計数する第1のOS用割り込みカウンタと、 第2のOSの切り換え周期内のタイマ割り込みまたはタ
イマ割り込みキューを計数する第2のOS用割り込みカ
ウンタと、 前記それぞれのOSの動作期間を前記それぞれの割り込
みカウンタの計数値で除算した擬似的タイマ割り込み周
期を保存する擬似的タイマ割り込み周期保存部を備え、
CPUがOSを動作させているとき、前記擬似的タイマ
割り込み周期保存部に保存した周期で擬似的タイマ割り
込みを発生することを特徴とする仮想計算機装置。
1. A main memory, a CPU, a timer interrupt generation device for generating a timer interrupt at a set cycle, and a hardware division control unit, wherein hardware including the main storage and the CPU are logically divided and controlled. In the virtual machine device, the hardware division control unit includes: a first OS interrupt counter for counting a timer interrupt or a timer interrupt queue within a first OS switching cycle; and a timer within a second OS switching cycle. A second OS interrupt counter for counting an interrupt or a timer interrupt queue; and a pseudo timer interrupt period storage for storing a pseudo timer interrupt period obtained by dividing the operating period of each OS by the count value of the respective interrupt counter. Part,
A virtual machine device wherein a pseudo timer interrupt is generated at a period stored in the pseudo timer interrupt period storage unit when a CPU operates an OS.
【請求項2】 主記憶、CPU、設定した周期でI/O
割り込みを発生するI/O割り込み発生装置およびハー
ドウエア分割制御部を備え、前記主記憶およびCPUを
含むハードウエアを論理的に分割して制御する仮想計算
機装置において、 前記ハードウエア分割制御部は、第1のOSの切り換え
周期内のI/O割り込みを計数する第1のOS用割り込
みカウンタと、 第2のOSの切り換え周期内のI/O割り込みを計数す
る第2のOS用割り込みカウンタと、 前記それぞれのOSの動作期間を前記それぞれの割り込
みカウンタの計数値で除算した擬似的タイマ割り込み周
期を保存する擬似的タイマ割り込み周期保存部を備え、
CPUがOSを動作させているとき、前記擬似的タイマ
割り込み周期保存部に保存した周期で擬似的タイマ割り
込みを発生することを特徴とする仮想計算機装置。
2. A main memory, a CPU, and I / O at a set cycle.
A virtual machine device comprising: an I / O interrupt generation device that generates an interrupt; and a hardware division control unit, wherein the hardware including the main storage and the CPU is logically divided and controlled, wherein the hardware division control unit comprises: A first OS interrupt counter that counts I / O interrupts within the first OS switching cycle, a second OS interrupt counter that counts I / O interrupts within the second OS switching cycle, A pseudo timer interrupt period storage unit for storing a pseudo timer interrupt period obtained by dividing the operating period of each OS by the count value of each interrupt counter;
A virtual machine device wherein a pseudo timer interrupt is generated at a period stored in the pseudo timer interrupt period storage unit when a CPU operates an OS.
【請求項3】 主記憶、CPU、設定した周期でタイマ
割り込みを発生するタイマ割り込み発生装置、実時間計
測装置、およびハードウエア分割制御部を備え、ハード
ウエアを論理的に分割して構成した複数のOSを制御す
る仮想計算機装置において、 前記複数のOSはそれぞれ内部時計を備え、前記タイマ
割り込み発生装置によるタイマ割り込みを稼働中のOS
にのみ通知し、かつ実時間計測装置による実時間または
前回割り込み時からの経過時間を稼働中のOSの内部時
計に供給してOSの内部時計を更正することを特徴とす
る仮想計算機装置。
3. A system comprising a main memory, a CPU, a timer interrupt generation device for generating a timer interrupt at a set cycle, a real-time measurement device, and a hardware division control unit, wherein the hardware is logically divided. A plurality of OSs each having an internal clock and operating a timer interrupt by the timer interrupt generation device.
A real-time measuring device that notifies the real-time measuring device and the elapsed time from the previous interrupt to the internal clock of the operating OS to correct the internal clock of the OS.
【請求項4】 主記憶、CPU、設定した周期でタイマ
割り込みを発生するタイマ割り込み発生装置およびハー
ドウエア分割制御部を備え、前記主記憶およびCPUを
含むハードウエアを論理的に分割して制御する仮想計算
機装置の制御方法において、 第1のOSの切り換え周期内のタイマ割り込みまたはタ
イマ割り込みキューを計数する第1のOS用割り込みカ
ウンタと、第2のOSの切り換え周期内のタイマ割り込
みまたはタイマ割り込みキューを計数する第2のOS用
割り込みカウンタと、前記それぞれのOSの動作期間を
前記それぞれの割り込みカウンタの計数値で除算した擬
似的タイマ割り込み周期を保存する擬似的タイマ割り込
み周期保存部を備え、前記CPUが一方のOSを動作さ
せているとき、前記擬似的タイマ割り込み周期保存部に
保存した周期で前記一方のOSに擬似的タイマ割り込み
を発生し、前記CPUが他方のOSを動作させていると
き、前記擬似的タイマ割り込み周期保存部に保存した周
期で前記他方のOSに擬似的タイマ割り込みを発生する
ことを特徴とする仮想計算機装置の制御方法。
4. A main memory, a CPU, a timer interrupt generation device for generating a timer interrupt at a set cycle, and a hardware division control unit, wherein hardware including the main storage and the CPU are logically divided and controlled. A method for controlling a virtual machine, comprising: a first OS interrupt counter for counting a timer interrupt or a timer interrupt queue within a first OS switching cycle; and a timer interrupt or timer interrupt queue within a second OS switching cycle. A second OS interrupt counter that counts the number of times, and a pseudo timer interrupt period storage unit that stores a pseudo timer interrupt period obtained by dividing the operating period of each OS by the count value of the respective interrupt counter, When the CPU is operating one OS, the pseudo timer interrupt A pseudo timer interrupt is generated in the one OS at the period stored in the storage unit, and when the CPU is operating the other OS, the other OS is generated at the period stored in the pseudo timer interrupt period storage unit. Generating a pseudo timer interrupt in a virtual machine device.
【請求項5】 主記憶、CPU、設定した周期でタイマ
割り込みを発生するタイマ割り込み発生装置、実時間計
測装置、およびハードウエア分割制御部を備え、ハード
ウエアを論理的に分割して構成した複数のOSを制御す
る仮想計算機装置のタイマ割り込み制御方法において、 前記複数のOSはそれぞれ内部時計を備え、前記タイマ
割り込み発生装置によるタイマ割り込みを稼働中のOS
に通知して割り込み処理部に処理を移行し、次いで実時
間計測装置が計測した実時間または前回割り込み時から
の経過時間を前記稼働中のOSの内部時計に供給してO
Sの内部時計を更正することを特徴とする仮想計算機装
置の制御方法。
5. A plurality of units each comprising a main memory, a CPU, a timer interrupt generating device for generating a timer interrupt at a set cycle, a real time measuring device, and a hardware division control unit, wherein the hardware is logically divided. A timer interrupt control method of a virtual machine controlling an OS of the virtual machine, wherein each of the plurality of OSs has an internal clock, and the OS is operating a timer interrupt by the timer interrupt generator.
And the processing is shifted to the interrupt processing unit. Then, the real time measured by the real time measuring device or the elapsed time from the previous interrupt is supplied to the internal clock of the operating OS, and
A method for controlling a virtual machine device, wherein the internal clock of S is adjusted.
JP35203699A 1999-12-10 1999-12-10 Virtual computer device and its control method Pending JP2001166954A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP35203699A JP2001166954A (en) 1999-12-10 1999-12-10 Virtual computer device and its control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP35203699A JP2001166954A (en) 1999-12-10 1999-12-10 Virtual computer device and its control method

Publications (1)

Publication Number Publication Date
JP2001166954A true JP2001166954A (en) 2001-06-22

Family

ID=18421350

Family Applications (1)

Application Number Title Priority Date Filing Date
JP35203699A Pending JP2001166954A (en) 1999-12-10 1999-12-10 Virtual computer device and its control method

Country Status (1)

Country Link
JP (1) JP2001166954A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100783088B1 (en) 2005-03-18 2007-12-07 후지쯔 가부시끼가이샤 Information processing apparatus
JP2008262566A (en) * 2008-04-14 2008-10-30 Hitachi Ltd Data processing system
JP2011145956A (en) * 2010-01-15 2011-07-28 Fujitsu Ltd Virtual machine, virtual machine monitor, and method for controlling computer
JP2013178597A (en) * 2012-02-28 2013-09-09 Hitachi Ltd Time management apparatus, method and program
US8819680B2 (en) 2010-06-25 2014-08-26 Panasonic Intellectual Property Corporation Of America Computer system for controlling the execution of virtual machines

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100783088B1 (en) 2005-03-18 2007-12-07 후지쯔 가부시끼가이샤 Information processing apparatus
JP2008262566A (en) * 2008-04-14 2008-10-30 Hitachi Ltd Data processing system
JP4623126B2 (en) * 2008-04-14 2011-02-02 株式会社日立製作所 Data processing system
JP2011145956A (en) * 2010-01-15 2011-07-28 Fujitsu Ltd Virtual machine, virtual machine monitor, and method for controlling computer
US8819680B2 (en) 2010-06-25 2014-08-26 Panasonic Intellectual Property Corporation Of America Computer system for controlling the execution of virtual machines
JP2013178597A (en) * 2012-02-28 2013-09-09 Hitachi Ltd Time management apparatus, method and program

Similar Documents

Publication Publication Date Title
US6470481B2 (en) State management in a co-verification system
US6006032A (en) System and method for instruction burst performance profiling for single-processor and multi-processor systems
US7512826B2 (en) Method, apparatus, and product for an efficient virtualized time base in a scaleable multi-processor computer
TWI501102B (en) Virtual time control apparatus, method, and computer program product thereof
US20110047315A1 (en) Virtualization of real-time clock
EP1358557B1 (en) Operating system-independent method and system of determining cpu utilization
JPH10283183A (en) Branching prediction adjustment method
EP2551767A1 (en) Method and device for adjusting clock interrupt cycle
JP2001166954A (en) Virtual computer device and its control method
JPS61246840A (en) Performance adjusting system for information processor
US9323642B2 (en) Calculation apparatus, calculation method, and recording medium for calculation program
KR970703564A (en) METHOD AND APPARATUS FOR ACCESSING A DISTRIBUTED DATA BUFFER
Kirkpatrick et al. Operating system-induced jitter in force display computations
US20120221756A1 (en) Method and apparatus for adjusting period of clock interruption
JP2001092692A (en) Circuit and method for measuring time
JP2712730B2 (en) Evaluation chip
JPH0574154A (en) Microcomputer
JPH0823819B2 (en) Information processing device
JP3405513B2 (en) Redundant controller for programmable controller
KR930005650B1 (en) Time delay method using timer
JP2557785Y2 (en) Single chip microcomputer
JPH03158936A (en) Testing method for program
JPH02216532A (en) System for adjusting performance of computer
JPH03269640A (en) Virtual computer system
Huynh et al. A workload model for frame-based real-time applications on distributed systems