JP2001236237A - Method for constituting multi-os - Google Patents

Method for constituting multi-os

Info

Publication number
JP2001236237A
JP2001236237A JP2000052108A JP2000052108A JP2001236237A JP 2001236237 A JP2001236237 A JP 2001236237A JP 2000052108 A JP2000052108 A JP 2000052108A JP 2000052108 A JP2000052108 A JP 2000052108A JP 2001236237 A JP2001236237 A JP 2001236237A
Authority
JP
Japan
Prior art keywords
interrupt
operating system
procedure
address
operating
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
JP2000052108A
Other languages
Japanese (ja)
Inventor
Shinji Kimura
信二 木村
Toshiaki Arai
利明 新井
Masahide Sato
雅英 佐藤
Toshikazu Umetsu
利和 梅都
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 JP2000052108A priority Critical patent/JP2001236237A/en
Priority to US09/649,958 priority patent/US6996828B1/en
Publication of JP2001236237A publication Critical patent/JP2001236237A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a method for constituting a multi-OS for reducing the generation of overhead without necessitating any special hardware. SOLUTION: A physical memory 102 is divided for each of plural operating systems. An interruption management program independent of the operating system accepts all outside interruption, and decides which the operating system interruption handler should be started according to an interruption factor. A timing in which the interruption handler should be started is decided according to the executed state of the operating system, and the interruption handler of each operating system is started based on that.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、一台の計算機上で
複数のオペレーティングシステムを稼動させるためのマ
ルチOS構成方法に関する。
The present invention relates to a multi-OS configuration method for operating a plurality of operating systems on a single computer.

【0002】[0002]

【従来の技術】通常、計算機システムでは、計算機上で
1つのオペレーティングシステムを動作させ、それによ
り計算機のプロセッサ、メモリ、および、二次記憶装置
等の計算機資源を管理し、計算機が効率良く動作できる
ように資源スケジュールを実施している。オペレーティ
ングシステムには様々な種類がある。バッチ処理に優れ
るものや、TSS(Time Sharing System)に優れるも
の、GUI(Graphical UserInterface)に優れているも
のなど様々である。
2. Description of the Related Art Generally, in a computer system, one operating system is operated on the computer, thereby managing computer resources such as a processor, a memory, and a secondary storage device of the computer, so that the computer can operate efficiently. The resource schedule is implemented as follows. There are various types of operating systems. There are various types such as those that are excellent in batch processing, those that are excellent in TSS (Time Sharing System), and those that are excellent in GUI (Graphical User Interface).

【0003】一方、これら複数あるオペレーティングシ
ステムを一台の計算機で同時に実行したいというニーズ
がある。例えば、大型計算機においては、実際の業務に
伴うオンライン処理を実行するオペレーティングシステ
ムと、開発用のオペレーティングシステムを一台の計算
機で動作させたいという要求がある。あるいは、GUI
の整っているオペレーティングシステムと、実時間性に
優れているオペレーティングシステムを同時に稼動させ
たいという要求もある。
[0003] On the other hand, there is a need to execute these plural operating systems simultaneously on one computer. For example, in a large-scale computer, there is a demand that an operating system for executing online processing associated with actual work and an operating system for development be operated by one computer. Alternatively, the GUI
There is also a demand to run an operating system with a well-equipped operating system and an operating system with excellent real-time performance at the same time.

【0004】しかしながら、個々のオペレーティングシ
ステムは、単独で計算機資源の管理を実施することを仮
定しており、複数のオペレーティングシステムの共存
は、何らかの機構なしに実現することは困難である。
However, it is assumed that each operating system manages computer resources independently, and it is difficult to realize coexistence of a plurality of operating systems without any mechanism.

【0005】一台の計算機上で複数のオペレーティング
システムを動作させる機構として、大型計算機で実現さ
れている仮想計算機方式がある。仮想計算機方式では、
仮想計算機制御プログラムが全ハードウェア資源を占有
して管理し、それを仮想化して仮想計算機を構成する。
仮想計算機を構成する制御部は、物理メモリ、入出力機
器装置、外部割り込み等を仮想化する。
As a mechanism for operating a plurality of operating systems on one computer, there is a virtual computer system realized by a large computer. In the virtual machine method,
The virtual machine control program occupies and manages all hardware resources, and virtualizes them to form a virtual machine.
The control unit configuring the virtual machine virtualizes a physical memory, an input / output device, an external interrupt, and the like.

【0006】例えば、分割された物理メモリは、仮想計
算機に対してはあたかも0番地から始まる物理メモリの
ように振る舞い、入出力装置を識別する装置番号も同様
に仮想化されている。更に、仮想計算機方式では、磁気
ディスクの記憶領域も分割して磁気ディスク装置の仮想
化まで実現している。
For example, the divided physical memory behaves as if it were a physical memory starting at address 0 for a virtual machine, and the device number for identifying an input / output device is also virtualized. Further, in the virtual computer system, the storage area of the magnetic disk is also divided to realize the virtualization of the magnetic disk device.

【0007】各オペレーティングシステムは、制御プロ
グラムにより構築された仮想計算機上で実行されるよう
に制御プログラムによりスケジュールされる。
Each operating system is scheduled by a control program to be executed on a virtual machine constructed by the control program.

【0008】[0008]

【発明が解決しようとする課題】上述したような従来の
大型計算機における仮想計算機方式では、計算機資源を
完全に仮想化、および、分割しようとするため、仮想計
算機を構成する制御部分が複雑になるという問題があ
る。
In the virtual computer system of the conventional large computer as described above, since the computer resources are to be completely virtualized and divided, the control part constituting the virtual computer becomes complicated. There is a problem.

【0009】また、特別なハードウェア支援がない場
合、仮想計算機上で動作するオペレーティングシステム
が発行する制御レジスタの設定、入出力命令等の特権命
令は、仮想計算機制御プログラムによりエミュレートし
なければならない。このため、オーバーヘッドが大きく
なるという問題もある。実際、仮想計算機を実装してい
る大型計算機では、仮想計算機用に特別なプロセッサ機
能やマイクロコード等のハードウェアを追加してオーバ
ーヘッドの削減を図っている。
In addition, without special hardware support, privileged instructions such as control register setting and input / output instructions issued by an operating system operating on a virtual machine must be emulated by a virtual machine control program. . For this reason, there is also a problem that overhead increases. In fact, in a large-scale computer on which a virtual computer is mounted, a special processor function and hardware such as microcode are added for the virtual computer to reduce overhead.

【0010】このように、仮想計算機方式は、完全に計
算機資源を仮想化することを目的としているため複雑で
あり、更に、仮想計算機の高性能化のためには特殊なハ
ードウェア機構が必要となる。
As described above, the virtual computer system is complicated because it aims to completely virtualize computer resources, and requires a special hardware mechanism for improving the performance of the virtual computer. Become.

【0011】一方、一台の計算機上で複数のオペレーテ
ィングシステムのインタフェースを提供する技術とし
て、マイクロカーネルと呼ばれる技術がある。マイクロ
カーネルでは、マイクロカーネルの上に、ユーザに見せ
るオペレーティングシステム機能を提供するオペレーテ
ィングシステムサーバが構築される。ユーザは、そのサ
ーバを経由して計算機資源を利用する。オペレーティン
グシステム毎のサーバを用意すれば、ユーザに様々なオ
ペレーティングシステム環境を提供できる。
On the other hand, as a technique for providing an interface of a plurality of operating systems on one computer, there is a technique called a microkernel. In the microkernel, an operating system server that provides an operating system function to be shown to a user is built on the microkernel. The user utilizes computer resources via the server. By preparing a server for each operating system, various operating system environments can be provided to the user.

【0012】しかし、マイクロカーネル方式では、オペ
レーティングシステムサーバをマイクロカーネルに合わ
せて新規に構築する必要がある。多くの場合、現在ある
オペレーティングシステムをマイクロカーネル上で動作
するように変更することになるが、スケジューリング、
メモリ管理等のカーネルの中枢部分も変更することにな
り、変更箇所が多く、また、変更箇所がオペレーティン
グシステムの中枢部分に及ぶため変更作業が複雑で容易
ではないといった問題がある。
However, in the microkernel system, it is necessary to newly construct an operating system server according to the microkernel. Often, you will need to change your existing operating system to run on a microkernel, but scheduling,
The core part of the kernel, such as memory management, is also changed, so that there are many changes, and since the change extends to the core part of the operating system, the change operation is complicated and not easy.

【0013】また、オペレーティングシステムサーバは
マイクロカーネルのサービスを利用することになるが、
これは通常のオペレーティングシステムではないことで
あり、オーバーヘッドとなり性能低下をもたらす。
The operating system server uses the service of the microkernel,
This is not a normal operating system, resulting in overhead and reduced performance.

【0014】本発明の目的は、このような従来技術にお
ける問題点を解決し、特殊なハードウェアを用いること
なく、1台の計算機上で複数のオペレーティングシステ
ムの同時・並列的な実行を実現することにある。
[0014] An object of the present invention is to solve such problems in the prior art and realize simultaneous and parallel execution of a plurality of operating systems on one computer without using special hardware. It is in.

【0015】また、本発明の他の目的は、1台の計算機
上で複数のオペレーティングシステムを動作させるにあ
たり、特権命令のエミュレーションによるオーバヘッド
の発生を抑えることにある。
Another object of the present invention is to suppress the occurrence of overhead due to emulation of privileged instructions when operating a plurality of operating systems on one computer.

【0016】[0016]

【課題を解決するための手段】上述した目的を達成する
ために、本発明によるマルチOSの構成方法では、複数
のオペレーティングシステム毎に物理メモリを分割す
る。オペレーティングシステムから独立した割り込み管
理プログラムが、すべての外部割り込みを受け付け、割
り込み要因によりどのオペレーティングシステムの割り
込みハンドラを起動すべきかを決定する。オペレーティ
ングシステムの実行状態により割り込みハンドラを起動
するタイミングを決定して、それに基づいて各オペレー
ティングシステムの割り込みハンドラを起動することに
より、複数のオペレーティングシステムを一台の計算機
で動作させる。
In order to achieve the above-mentioned object, in the multi-OS configuration method according to the present invention, a physical memory is divided for each of a plurality of operating systems. An interrupt management program independent of the operating system accepts all external interrupts and determines which operating system's interrupt handler to activate based on the interrupt factor. The timing of activating the interrupt handler is determined according to the execution state of the operating system, and the interrupt handler of each operating system is activated based on the timing, whereby a plurality of operating systems are operated by one computer.

【0017】本発明によれば、第一のオペレーティング
システムを補完する機能を容易に追加でき、高機能な計
算機システムの構築が可能になる。更に、デバイスドラ
イバとは異なり、第一のオペレーティングシステムとは
全く独立して動作する機能を組み込むことができるた
め、第一のオペレーティングシステムに依存しない高信
頼化機能を追加することも可能になる。
According to the present invention, a function that complements the first operating system can be easily added, and a high-performance computer system can be constructed. Furthermore, unlike the device driver, a function that operates completely independently of the first operating system can be incorporated, so that a high-reliability function independent of the first operating system can be added.

【0018】また、マイクロカーネル方式で複数のマル
チオペレーティングシステム環境を構築する方法では、
それぞれのオペレーティングシステムのインタフェース
を提供するオペレーティングシステムサーバの構築が難
しいという問題がある。本発明によれば、オペレーティ
ングシステムを変更することなく、割り込み管理部分の
追加だけで、簡単にマルチオペレーティングシステム環
境を構成できる。
In a method of constructing a plurality of multi-operating system environments by a microkernel system,
There is a problem that it is difficult to construct an operating system server that provides an interface for each operating system. According to the present invention, a multi-operating system environment can be easily configured simply by adding an interrupt management part without changing the operating system.

【0019】[0019]

【発明の実施の形態】図1は本発明の実施の形態におけ
る計算機100の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a computer 100 according to an embodiment of the present invention.

【0020】計算機100は、プロセッサ101、主記
憶装置102、バス109、割り込み信号線110、ク
ロック割り込み生成器111、割り込み制御装置11
2、ブート手順を格納している記憶装置118、およ
び、割り込みバス119を有して構成されている。
The computer 100 includes a processor 101, a main storage device 102, a bus 109, an interrupt signal line 110, a clock interrupt generator 111, and an interrupt control device 11.
2. It has a storage device 118 for storing a boot procedure, and an interrupt bus 119.

【0021】割り込み信号線110は、外部の入出力機
器と割り込み制御装置112を接続している。外部機器
が割り込みを発生すると、割り込み信号線110を経由
して割り込み制御装置112が信号を受け取る。割り込
み制御装置112は、この信号を数値化して、割り込み
バス119を介してプロセッサ101に渡す。
The interrupt signal line 110 connects an external input / output device and the interrupt control device 112. When an external device generates an interrupt, the interrupt control device 112 receives a signal via the interrupt signal line 110. The interrupt control device 112 converts this signal into a numerical value and passes it to the processor 101 via the interrupt bus 119.

【0022】クロック割り込み生成器111は、周期的
な割り込みを生成する。
The clock interrupt generator 111 generates a periodic interrupt.

【0023】割り込み制御装置112は、外部機器から
の割り込みを受け付け、要求元にしたがって数値化され
た割り込み信号を生成し、プロセッサ101に送る。ま
た、プロセッサ101からの指示により、特定の機器か
らの割り込み信号をプロセッサ101に通知しないよう
にすることもできる。
The interrupt control device 112 receives an interrupt from an external device, generates a numerically-defined interrupt signal according to the request source, and sends it to the processor 101. Further, according to an instruction from the processor 101, an interrupt signal from a specific device may not be notified to the processor 101.

【0024】プロセッサ101は、演算装置103、割
り込みテーブルレジスタ104、ページテーブルレジス
タ105、および、アドレス変換装置106を有して構
成されている。
The processor 101 includes an arithmetic unit 103, an interrupt table register 104, a page table register 105, and an address translator 106.

【0025】割り込みテーブルレジスタ104は、割り
込みテーブル107の仮想アドレスを指し示している。
割り込みテーブルの詳細については後述するが、割り込
み番号毎の割り込みハンドラの開始アドレスを記録して
いる。図1で、割り込みレジスタ104と割り込みテー
ブル107の接続を破線で記載しているのは、割り込み
テーブルレジスタ104が割り込みテーブルの指し示す
ためである。
The interrupt table register 104 indicates a virtual address of the interrupt table 107.
Although details of the interrupt table will be described later, the start address of the interrupt handler for each interrupt number is recorded. In FIG. 1, the connection between the interrupt register 104 and the interrupt table 107 is indicated by a broken line because the interrupt table register 104 indicates the interrupt table.

【0026】割り込みが発生すると、プロセッサ101
は、割り込み制御装置112から数値化された割り込み
番号を受ける。プロセッサ101は、この番号をインデ
ックスとして割り込みテーブル107より割り込みハン
ドラアドレスを取得し、割り込みハンドラに制御を渡
す。
When an interrupt occurs, the processor 101
Receives a digitized interrupt number from the interrupt controller 112. The processor 101 acquires the interrupt handler address from the interrupt table 107 using this number as an index, and passes control to the interrupt handler.

【0027】ページテーブルレジスタ105は、ページ
テーブル108を指し示している。ページテーブルレジ
スタ105は、ページテーブル108の物理アドレスを
格納している。
The page table register 105 points to the page table 108. The page table register 105 stores the physical address of the page table 108.

【0028】アドレス変換装置106は、演算装置が要
求する命令アドレス、あるいは、オペランドが格納され
ているアドレスを受け取り、ページテーブルレジスタ1
05の指しているページテーブル108の内容に基づき
仮想−実アドレス変換を実施する。
The address translator 106 receives the instruction address requested by the arithmetic unit or the address where the operand is stored, and
The virtual-to-real address conversion is performed based on the contents of the page table 108 pointed to by reference numeral 05.

【0029】計算機100には、外部入出力装置として
キーボード113、ディスプレイ114、磁気ディスク
115、その他の外部機器116、および、117が接
続されている。ディスプレイ114を除く機器は割り込
み信号線110により割り込み制御装置112に接続さ
れている。
The computer 100 is connected to a keyboard 113, a display 114, a magnetic disk 115, other external devices 116, and 117 as external input / output devices. Devices other than the display 114 are connected to an interrupt control device 112 by an interrupt signal line 110.

【0030】主記憶装置102の内容について簡単に説
明する。ここでは、計算機101では2つのオペレーテ
ィングシステムが動作しているとする。それぞれを第一
のオペレーティングシステム、第二のオペレーティング
システムと呼ぶことにする。また、計算機を起動すると
第一のオペレーティングシステムが起動するように設定
されており、外部機器116、および、117は第二の
オペレーティングシステムにより管理される機器とす
る。以下では、第一のオペレーティングシステムを第一
のOS、第二のオペレーティングシステムを第二のOS
と記す。
The contents of the main storage device 102 will be briefly described. Here, it is assumed that two operating systems are operating on the computer 101. These will be referred to as a first operating system and a second operating system, respectively. The first operating system is set to start when the computer is started, and the external devices 116 and 117 are devices managed by the second operating system. Hereinafter, the first operating system is referred to as a first OS, and the second operating system is referred to as a second OS.
It is written.

【0031】第一のOSは、起動時の初期化処理で、そ
の他のオペレーティングシステム用に、この場合は第二
のOS用に物理メモリ領域を予約する。つまり、第一の
OSが、第二のOS用に予約した物理メモリ領域を利用
できないように物理メモリ領域を確保する。図1は、こ
の奪った領域に第二のOSがロードされている様子を示
している。
The first OS reserves a physical memory area for other operating systems, in this case, for the second OS in initialization processing at the time of startup. That is, the physical memory area is reserved so that the first OS cannot use the physical memory area reserved for the second OS. FIG. 1 shows a state in which the second OS is loaded in the deprived area.

【0032】また、主記憶装置102は、すべてのオペ
レーティングシステムから参照可能な共通領域を持つ。
共通領域には、割り込みテーブル107、割り込み管理
プログラム、割り込みハンドラ、各オペレーティングシ
ステムから呼び出し可能なインタフェースモジュール等
が格納される。
The main storage device 102 has a common area that can be referred to from all operating systems.
The common area stores an interrupt table 107, an interrupt management program, an interrupt handler, an interface module that can be called from each operating system, and the like.

【0033】本実施形態の動作概要について説明する。
本実施形態では、第二のOSは第一のOSよりも優先し
て動作する。優先して動作するとは、第一のOSは第二
のOSがアイドル状態であるときのみ動作可能であるこ
とを示す。第二のOSの処理が終了しない限り、第一の
OSは動作できない。
An outline of the operation of the present embodiment will be described.
In the present embodiment, the second OS operates prior to the first OS. To operate with priority means that the first OS can operate only when the second OS is in the idle state. Unless the processing of the second OS is completed, the first OS cannot operate.

【0034】また、第二のOSが管理するデバイスが割
り込みを発生すると、第一のOSの処理は中断され、制
御は第二のOSに移る。第二のOS実行中に第一のOS
への割り込みが発生しても、その割り込み処理は第一の
OSが実行されるまで延期される。
When a device managed by the second OS generates an interrupt, the processing of the first OS is interrupted, and control is transferred to the second OS. While the second OS is running, the first OS
Even if an interrupt occurs, the interrupt processing is postponed until the first OS is executed.

【0035】さらに、第一のOSと第二のOSは明確に
区分されており、割り込みハンドラなどを配置する共通
領域以外は、互いにアクセスできないように構成され
る。これにより、2つのオペレーティングシステムが誤
って互いの領域にアクセスして障害が起きることを防い
でいる。
Further, the first OS and the second OS are clearly separated, and are configured so as to be inaccessible to each other except for a common area where an interrupt handler and the like are arranged. This prevents the two operating systems from accidentally accessing each other's area and causing a failure.

【0036】図2は、本実施形態における2つのオペレ
ーティングシステムの関係を概念的に示した模式図であ
る。
FIG. 2 is a schematic diagram conceptually showing the relationship between two operating systems in this embodiment.

【0037】それぞれのオペレーティングシステムは、
それぞれ独立したアドレス空間を保持する。201は第
一のOSの仮想空間で、202は第二のOSの仮想空間
を示している。ここで、第二のOSの空間202に対応
する実記憶は、図1の主記憶装置102の第二のOSの
領域になる。
Each operating system:
Each has an independent address space. 201 is a virtual space of the first OS, and 202 is a virtual space of the second OS. Here, the real storage corresponding to the space 202 of the second OS is the area of the second OS in the main storage device 102 in FIG.

【0038】仮想空間の一部分には、共通領域203が
マップされる。共通領域203に対応する実記憶は、図
1において、主記憶102の共通領域として示される領
域である。
A common area 203 is mapped to a part of the virtual space. The real storage corresponding to the common area 203 is an area shown as a common area of the main storage 102 in FIG.

【0039】図2は、また、各オペレーティングシステ
ムが管理するハードウェアを示している。第一のOS
は、キーボード113、ディスプレイ114、および、
磁気ディスク115を、第二のOSは入出力装置11
6、および、117を管理する。クロック111と割り
込み制御装置112は、もともとは第一のOSが管理し
ているハードウェアであるが、共通領域203中のプロ
グラムが管理する。
FIG. 2 shows hardware managed by each operating system. First OS
Is a keyboard 113, a display 114, and
The magnetic disk 115 is used as the second OS and the input / output device 11
6, and 117 are managed. The clock 111 and the interrupt control device 112 are originally hardware managed by the first OS, but are managed by a program in the common area 203.

【0040】図3は、本実施形態でのページテーブルの
構成を示している。
FIG. 3 shows the configuration of the page table in this embodiment.

【0041】ページテーブル300は、プロセッサ10
1の仮想アドレス空間の仮想ページ毎に、それぞれの仮
想ページを記述するエントリを持っている。それぞれの
エントリは、有効ビット301と、物理ページ番号30
2を含んで構成される。
The page table 300 is stored in the processor 10
Each virtual page in one virtual address space has an entry describing each virtual page. Each entry has a valid bit 301 and a physical page number 30
2 is included.

【0042】有効ビット301は、その仮想ページに対
応する物理ページが割り当てられているか、つまり、仮
想−実アドレス変換が可能かを示している。例えば、ペ
ージテーブル300の仮想ページ3は、有効ビットがセ
ットされていないので、仮想ページ3に対応する物理ペ
ージが存在しないことを示している。有効ビット301
がセットされていない仮想ページへのアクセスが発生す
ると、プロセッサはページフォルトを発生する。
The valid bit 301 indicates whether a physical page corresponding to the virtual page is allocated, that is, whether virtual-real address conversion is possible. For example, the virtual page 3 of the page table 300 has no valid bit set, indicating that there is no physical page corresponding to the virtual page 3. Valid bit 301
When an access to a virtual page for which is not set occurs, the processor generates a page fault.

【0043】物理メモリ番号302は、仮想ページに対
応する物理ページ番号を記録している。
The physical memory number 302 records a physical page number corresponding to a virtual page.

【0044】アドレス変換装置106は、ページテーブ
ルレジスタ105の指し示しているページテーブルの内
容を参照して、演算装置103の生成する仮想アドレス
を実アドレスに変換する。プロセッサ101は、変換に
より得られた実アドレスにより主記憶装置102を参照
する。
The address translation unit 106 translates a virtual address generated by the arithmetic unit 103 into a real address with reference to the contents of the page table pointed to by the page table register 105. The processor 101 refers to the main storage device 102 based on the real address obtained by the conversion.

【0045】ページテーブルを切り替えることにより独
立した空間を構築することができ、図2に示した第一の
OSの空間、および、第二のOSの空間の構築が可能で
ある。また、共通領域203については、両方のオペレ
ーティングシステムのページテーブルの共通領域に対応
する部分に、同じ物理ページをマップするように設定し
ておけば、共通領域を実現できる。
By switching the page tables, an independent space can be constructed, and the space of the first OS and the space of the second OS shown in FIG. 2 can be constructed. The common area 203 can be realized by setting the same physical page to be mapped to a portion corresponding to the common area of the page tables of both operating systems.

【0046】図4は、割り込みテーブルの構成を示して
いる。
FIG. 4 shows the structure of the interrupt table.

【0047】割り込みテーブル400は、プロセッサ1
01が割り込み制御装置112から受ける割り込み番号
毎の、割り込みハンドラの仮想アドレス401を記録し
ている。プロセッサ101は、割り込み要求を割り込み
制御装置112から受け取ると、割り込み番号に対応す
る割り込みハンドラのアドレスを、割り込みテーブルレ
ジスタ104の指し示している割り込みテーブル400
から取得し、そのアドレスに制御を移すことで割り込み
処理を開始する。
The interrupt table 400 indicates that the processor 1
01 records the virtual address 401 of the interrupt handler for each interrupt number received from the interrupt controller 112. When receiving the interrupt request from the interrupt control device 112, the processor 101 stores the address of the interrupt handler corresponding to the interrupt number in the interrupt table 400 indicated by the interrupt table register 104.
And transfers control to that address to start interrupt processing.

【0048】図5は、割り込み制御装置112の構成を
示している。
FIG. 5 shows the configuration of the interrupt control device 112.

【0049】割り込み制御装置112は、割り込みマス
クレジスタ501、および、選択装置502を持ってい
る。
The interrupt control device 112 has an interrupt mask register 501 and a selection device 502.

【0050】割り込みを発生する入出力装置は、割り込
み信号線110により割り込み制御装置112と接続さ
れる。入出力機器の発生する割り込みは、割り込み信号
線110のどの信号線に接続するかにより優先順位が付
けられる。ここでは、割り込み0番に対応する割り込み
信号がもっとも優先度が高い割り込みであるとする。
An input / output device that generates an interrupt is connected to an interrupt control device 112 by an interrupt signal line 110. The priority of the interrupt generated by the input / output device is determined depending on which signal line of the interrupt signal line 110 is connected. Here, it is assumed that the interrupt signal corresponding to the interrupt 0 is the interrupt having the highest priority.

【0051】割り込み信号線110は、選択装置502
に接続されている。選択装置502は、割り込み信号を
受けると、プロセッサがその割り込みを受けたことを通
知するまで、未処理の割り込みがあることを記録してい
る。
The interrupt signal line 110 is connected to the selection device 502
It is connected to the. Upon receiving the interrupt signal, the selecting device 502 records that there is an unprocessed interrupt until the processor notifies that the interrupt has been received.

【0052】割り込みマスクレジスタ501は、入出力
機器の発生した割り込みをプロセッサに通知してよいか
を記録している。割り込みマスクレジスタ501は、プ
ロセッサ101からの入出力命令により設定可能であ
る。
The interrupt mask register 501 records whether an interrupt generated by an input / output device may be notified to the processor. The interrupt mask register 501 can be set by an input / output instruction from the processor 101.

【0053】選択装置502は、割り込み信号線110
からの割り込み要求を受けた時と、割り込みマスクレジ
スタ501の内容が書き換えられた時に、選択装置50
2が記録している未処理割り込みと、割り込みマスクレ
ジスタ502の内容を比較して、プロセッサに割り込み
を通知するかどうかを決める。具体的には、選択装置5
02が記録している未処理割り込みのうち、割り込みマ
スクレジスタ501に割り込み可能と設定されていて、
優先度の最も高い割り込みから順にプロセッサに通知す
る。選択した割り込みについて、選択装置502は、通
知する割り込み信号に対応する数値信号を、割り込みバ
ス119経由でプロセッサ101に送る。
The selection device 502 is connected to the interrupt signal line 110
When the interrupt request is received from the CPU and when the contents of the interrupt mask register 501 are rewritten,
2 and the contents of the interrupt mask register 502 are compared to determine whether to notify the processor of the interrupt. Specifically, the selection device 5
02, among the unprocessed interrupts recorded in 02, the interrupt mask register 501 is set to enable interrupts, and
Notify the processor in order from the interrupt with the highest priority. For the selected interrupt, the selecting device 502 sends a numerical signal corresponding to the interrupt signal to be notified to the processor 101 via the interrupt bus 119.

【0054】プロセッサ101は、割り込みを受けたと
きに、入出力命令により選択装置502に記録されてい
る未処理割り込みを解消できる。
When receiving an interrupt, the processor 101 can eliminate the unprocessed interrupt recorded in the selecting device 502 by the input / output instruction.

【0055】次に、本実施形態における、計算機のブー
ト手順について説明する。
Next, a description will be given of a computer boot procedure in this embodiment.

【0056】ブート手順の始めの部分は、読み取り専用
の記憶装置118に格納されている。記憶装置118
は、プロセッサの物理アドレス空間のある決められたア
ドレスにマップされるように、バス109を介してプロ
セッサ101に接続されている。この手順は、ハードウ
ェア構成の検出、オペレーティングシステムをロードす
るプログラムの主記憶へのローディングを実施する。
The beginning of the boot procedure is stored in read-only storage device 118. Storage device 118
Are connected to the processor 101 via the bus 109 so as to be mapped to a predetermined address in the physical address space of the processor. In this procedure, a hardware configuration is detected, and a program for loading an operating system is loaded into a main memory.

【0057】プロセッサ101がリセットされると、プ
ロセッサ101は予め定められた物理アドレスに制御を
移す。記憶装置118は、この時に実行されるプログラ
ムを格納しており、プロセッサ101がリセットされた
時にこのプログラムに制御を渡せるように物理アドレス
空間にマップされている。
When the processor 101 is reset, the processor 101 transfers control to a predetermined physical address. The storage device 118 stores a program to be executed at this time, and is mapped to a physical address space so that control can be passed to the program when the processor 101 is reset.

【0058】記憶装置118に格納されているプログラ
ムは、磁気ディスク装置112に格納されている第一の
OSのカーネルローダを主記憶装置102にロードして
実行する。カーネルローダは、磁気ディスク装置112
の予め定められた位置にあり、記憶装置118に格納さ
れていたプログラムは、容易にこれを見つけることがで
きる。
The program stored in the storage device 118 loads the kernel loader of the first OS stored in the magnetic disk device 112 into the main storage device 102 and executes it. The kernel loader is used for the magnetic disk drive 112
The program stored in the storage device 118 at a predetermined position can easily find the program.

【0059】図6は、本実施形態における、オペレーテ
ィングシステムのカーネルローダの処理手順を示すフロ
ーチャートである。
FIG. 6 is a flowchart showing the processing procedure of the kernel loader of the operating system in the present embodiment.

【0060】カーネルローダは、オペレーティングシス
テムのファイルシステム構造を理解して、ファイル名に
よりファイルの格納位置を特定し、主記憶に読み込むこ
とができるように構成されている。
The kernel loader is configured to understand the file system structure of the operating system, specify the storage location of the file by the file name, and read the file into the main memory.

【0061】カーネルローダは、まず、カーネルにパラ
メータとして渡す主記憶リスト801、ロードモジュー
ルリスト804、および、デバイスリスト802を初期
化し、カーネル用のページテーブル領域を割り当てる
(ステップ601)。
First, the kernel loader initializes a main memory list 801, a load module list 804, and a device list 802 to be passed to the kernel as parameters, and allocates a page table area for the kernel (step 601).

【0062】主記憶リスト801は、主記憶装置102
の利用状況を示すデータ構造であり、カーネルローダが
以降の処理で物理メモリの割り当てをする場合は、主記
憶リスト801を参照、及び、変更して実施する。
The main storage list 801 is stored in the main storage 102
This is a data structure that indicates the usage status of the memory. When the kernel loader allocates a physical memory in the subsequent processing, the kernel loader refers to the main storage list 801 and changes the physical memory.

【0063】次に、カーネル用のハードウェア構成の検
査(ステップ602)、および、ハードウェア構成デー
タの作成(ステップ603)を実施する。ステップ60
2においては、計算機100にどのようなハードウェア
デバイスが接続されているかをハードウェアが検査す
る。続くステップ603では、ステップ602の結果に
基づいてハードウェア構成に関するデータ構造であるデ
バイスリスト802が作成される。オペレーティングシ
ステムのカーネルは、このデバイスリスト802を参照
してカーネル初期化を実施する。
Next, an inspection of the hardware configuration for the kernel (step 602) and the creation of hardware configuration data (step 603) are performed. Step 60
In 2, the hardware checks which hardware device is connected to the computer 100. In the following step 603, a device list 802, which is a data structure relating to the hardware configuration, is created based on the result of step 602. The kernel of the operating system refers to the device list 802 to execute kernel initialization.

【0064】次に、オペレーティングシステムの構成情
報700を磁気ディスク装置112より読み込み、パラ
メータテーブル810に構成情報のアドレスを設定する
(ステップ604)。オペレーティングシステムのカー
ネルは、カーネル本体のファイルと、その他のデバイス
ドライバのファイルといったように、複数のファイルか
ら構成されていてもよい。構成情報700は、予め決め
られたファイル名で磁気ディスク装置112に格納され
ており、ロードプログラムはこれを見つけることができ
る。
Next, the configuration information 700 of the operating system is read from the magnetic disk device 112, and the address of the configuration information is set in the parameter table 810 (step 604). The kernel of the operating system may be composed of a plurality of files such as a file of the kernel itself and a file of another device driver. The configuration information 700 is stored in the magnetic disk device 112 with a predetermined file name, and the load program can find this.

【0065】本実施形態におけるカーネル構成情報のデ
ータ構造を図7に示す。
FIG. 7 shows the data structure of the kernel configuration information in this embodiment.

【0066】カーネル構成情報700は、カーネルロー
ダやオペレーティングシステムが参照するデータを格納
している。格納されているデータには名前が付けられて
おり、プログラムは名前からそれに対応するデータを取
得することができる。図7の例では、名前がメモリサイ
ズというエントリ701があり、その内容としてメモリ
サイズを示すデータが格納されている。また、名前がse
condary OSというエントリ705は、第二のOS用のデ
ータが格納されている。
The kernel configuration information 700 stores data referred to by a kernel loader and an operating system. The stored data is given a name, and the program can obtain the corresponding data from the name. In the example of FIG. 7, there is an entry 701 whose name is memory size, and data indicating the memory size is stored as the contents. Also, the name is se
An entry 705 called condary OS stores data for the second OS.

【0067】カーネル構成情報700を読み込んだ後、
カーネルローダは、カーネル構成情報700中のメモリ
サイズ701に格納されたデータの値によって、第一の
OSに割り当てる物理メモリサイズを決定する(ステッ
プ605)。次に、オブジェクトファイル703に設定
されているカーネル構成ファイルのすべてを主記憶装置
102に読み込み、ロードモジュールリスト804にエ
ントリを追加する(ステップ606〜608)。ここで
はkernel、driver1、および、drive
r2というファイル名のオブジェクトファイルをロード
する。
After reading the kernel configuration information 700,
The kernel loader determines the physical memory size to be allocated to the first OS based on the value of the data stored in the memory size 701 in the kernel configuration information 700 (Step 605). Next, all the kernel configuration files set in the object file 703 are read into the main storage device 102, and an entry is added to the load module list 804 (steps 606 to 608). Here, kernel, driver1, and drive
Load the object file with the file name r2.

【0068】次にステップ605で求めたメモリサイズ
に対応するカーネル用のページテーブルを設定する(ス
テップ609)。ステップ609で設定したページテー
ブルのアドレスをページテーブルレジスタ105に設定
し、プロセッサを仮想アドレスモードに移行させ(ステ
ップ610)、構築した主記憶リスト801、デバイス
リスト802、カーネル構成情報テーブル803、およ
び、ロードオブジェクトリスト804の組からなるパラ
メータテーブル810をパラメータとして、カーネルの
初期化ルーチンに制御を渡す(ステップ611)。カー
ネルのエントリポイントはカーネルファイル内のデータ
に記録されている。
Next, a page table for the kernel corresponding to the memory size obtained in step 605 is set (step 609). The address of the page table set in step 609 is set in the page table register 105, the processor is shifted to the virtual address mode (step 610), and the constructed main memory list 801, device list 802, kernel configuration information table 803, and Control is passed to the kernel initialization routine using the parameter table 810, which is a set of the load object list 804, as a parameter (step 611). Kernel entry points are recorded in data in the kernel file.

【0069】次に、ステップ601から始まるブート手
順が作成するハードウェア構成データと、ロードオブジ
ェクトデータの構成について説明する。図8は、ハード
ウェア構成データとロードオブジェクトデータの構成を
示す図である。
Next, the hardware configuration data created by the boot procedure starting from step 601 and the configuration of load object data will be described. FIG. 8 is a diagram showing the configuration of hardware configuration data and load object data.

【0070】パラメータテーブル800は、カーネルロ
ーダが作成するデータ構造である。パラメータテーブル
800から始まる3つのリストは、ローダが構築するカ
ーネルの仮想空間に配置されており、カーネルから参照
可能である。
The parameter table 800 is a data structure created by the kernel loader. The three lists starting from the parameter table 800 are arranged in the virtual space of the kernel constructed by the loader and can be referred to from the kernel.

【0071】パラメータテーブル800は、ローダが構
築した3つのリストの先頭へのポインタと、1つのテー
ブルへのポインタを保持している。3つのリストとは、
主記憶リスト801、デバイスリスト802、および、
ロードオブジェクトリスト804で、1つのテーブルは
カーネル構成情報テーブル803である。それぞれにつ
いて説明する。
The parameter table 800 holds a pointer to the head of the three lists constructed by the loader and a pointer to one table. The three lists are
A main storage list 801, a device list 802, and
In the load object list 804, one table is a kernel configuration information table 803. Each will be described.

【0072】主記憶リスト801は、主記憶ブロック記
述データ810のリストである。主記憶ブロック記述デ
ータ810は、ベースアドレス811、ブロックサイズ
812、ブロック利用状況813、および、次の主記憶
ブロック記述データへのポインタ814から構成されて
いる。
The main storage list 801 is a list of main storage block description data 810. The main storage block description data 810 includes a base address 811, a block size 812, a block use state 813, and a pointer 814 to the next main storage block description data.

【0073】主記憶ブロック記述データ810は、ある
連続した主記憶領域についての利用状況を記録してい
る。ベースアドレス811は連続領域の開始物理アドレ
スを示し、ブロックサイズ812は連続領域の大きさを
格納し、ブロック利用状況813は、当該連続領域が未
使用であるか、あるいは、ローダにより割り当て済みで
あるかを示す値が格納されている。そして、次エントリ
へのポインタ814によりリストを構成している。図8
では、810の次のエントリは820である。主記憶リ
スト801を参照することで、物理メモリの利用状態を
知ることができる。
The main storage block description data 810 records the usage status of a certain continuous main storage area. The base address 811 indicates the start physical address of the continuous area, the block size 812 stores the size of the continuous area, and the block usage status 813 indicates that the continuous area is unused or has been assigned by the loader. Is stored. Then, a list is constituted by the pointer 814 to the next entry. FIG.
Then, the next entry after 810 is 820. By referring to the main storage list 801, the use state of the physical memory can be known.

【0074】デバイスリスト802は、カーネルローダ
が検出したハードウェアデバイスに関するデータを格納
しており、ステップ603で作成される。デバイスリス
ト802は、デバイスデータ850からなるリストであ
る。デバイスデータ850は、デバイスタイプ851、
デバイス情報852、および、次のデバイスデータへの
ポインタ853から構成される。
The device list 802 stores data on hardware devices detected by the kernel loader, and is created in step 603. The device list 802 is a list including device data 850. The device data 850 includes a device type 851,
It comprises device information 852 and a pointer 853 to the next device data.

【0075】デバイスタイプ851には、このデバイス
データエントリ850により記述されるデバイスの種類
を示す値が格納されている。デバイス情報852は、デ
バイスの種類に特有なデータを格納している。例えば、
割り込み番号やI/Oアドレスなどがそれに相当する。
そして、次のエントリへのポインタ853によりリスト
を構成している。
In the device type 851, a value indicating the type of the device described by the device data entry 850 is stored. The device information 852 stores data unique to the type of device. For example,
An interrupt number, an I / O address, and the like correspond thereto.
The list is constituted by the pointer 853 to the next entry.

【0076】カーネル構成情報テーブルへのポインタ8
03は、カーネルローダが主記憶装置102に読み込ん
だカーネル構成情報ファイル700の内容を指し示して
いる。
Pointer 8 to kernel configuration information table
03 indicates the contents of the kernel configuration information file 700 read by the kernel loader into the main storage device 102.

【0077】ロードオブジェクトリスト804は、カー
ネルローダが主記憶にロードしたオブジェクトファイル
に関するデータを保持している。ロードオブジェクトリ
ストは、ロードオブジェクトデータ830のリストであ
る。ロードオブジェクトデータ830は、オブジェクト
ファイル名831、オブジェクトアドレス832、およ
び、次のロードオブジェクトデータへのポインタ833
から構成される。
The load object list 804 holds data relating to the object file loaded into the main memory by the kernel loader. The load object list is a list of the load object data 830. The load object data 830 includes an object file name 831, an object address 832, and a pointer 833 to the next load object data.
Consists of

【0078】オブジェクトファイル名831は、ロード
オブジェクト830により記述されているオブジェクト
ファイルのファイル名である。オブジェクトアドレス8
32は、当該オブジェクトファイルのヘッダ領域がロー
ドされているカーネル空間のアドレスを格納している。
そして、次エントリへのポインタ833によりリストを
構成している。
The object file name 831 is the file name of the object file described by the load object 830. Object address 8
Reference numeral 32 stores the address of the kernel space where the header area of the object file is loaded.
Then, a list is constituted by the pointer 833 to the next entry.

【0079】ロードオブジェクトリスト804は、カー
ネルローダがカーネルを構成するオブジェクトファイル
を読み込むときに同時に作成される(ステップ60
8)。
The load object list 804 is created at the same time that the kernel loader reads the object file constituting the kernel (step 60).
8).

【0080】次に、本実施形態におけるデバイスドライ
バのロード処理手順について説明する。デバイスドライ
バとは、計算機100に接続されたハードウェアデバイ
スを制御するためのソフトウェアであり、図6で説明し
たオペレーティングシステムのカーネルの初期化中、あ
るいは、オペレーティングシステムが立ち上がった後に
ロードできるものとする。
Next, a procedure for loading a device driver in this embodiment will be described. The device driver is software for controlling a hardware device connected to the computer 100, and can be loaded during the initialization of the kernel of the operating system described with reference to FIG. 6 or after the operating system is started. .

【0081】まず、デバイス管理テーブルについて説明
する。図9は、第一のOSのデバイス管理テーブルの構
造を示した図である。デバイス管理テーブルは、割り込
み管理テーブル900と、I/Oアドレス管理リスト9
10の2つのデータ構造からなる。
First, the device management table will be described. FIG. 9 is a diagram showing the structure of the device management table of the first OS. The device management table includes an interrupt management table 900 and an I / O address management list 9
It consists of ten data structures.

【0082】割り込み管理テーブル900は、プロセッ
サ101が受け付ける各割り込み番号について、第一の
OSがその割り込み番号を利用するかどうかを示す値が
格納されている。カーネルは、デバイスドライバがロー
ド時に割り込み番号を要求した場合に、このテーブル9
00を検査し、使用されていない場合のみ、要求された
割り込み番号を使用する権利をデバイスドライバに与え
る。既に利用済みであると記されている場合は、そのハ
ードウェアデバイスは第一のOSからは利用できないこ
とになる。例えば、割り込み番号3の場合、番号3に対
応するデータ902が割り当て済みかあるいは未使用か
を示す値を保持する。
The interrupt management table 900 stores, for each interrupt number accepted by the processor 101, a value indicating whether the first OS uses the interrupt number. When the device driver requests an interrupt number at the time of loading, the kernel
Check 00 and give the device driver the right to use the requested interrupt number only if it is not being used. If it is described that the hardware device has already been used, the hardware device cannot be used from the first OS. For example, in the case of the interrupt number 3, a value indicating whether the data 902 corresponding to the number 3 has been allocated or not used is held.

【0083】I/Oアドレス管理リスト910について
も同様である。I/Oアドレス管理リスト910は、I
/Oアドレスを表現するエントリ920からなるリスト
である。エントリ920は、第一のOSが利用するI/
Oアドレス921と、リストを構成するための次のエン
トリへのポインタ922からなる。割り込みベクタ管理
テーブル900と同様、デバイスドライバがI/Oアド
レス範囲を要求した場合、カーネルは、そのアドレス範
囲が既に利用されているかI/Oアドレス管理リスト9
10により検査し、未使用である場合、このリスト91
0にエントリを追加して、利用許可を与える。
The same applies to the I / O address management list 910. The I / O address management list 910 is
This is a list including entries 920 representing / O addresses. The entry 920 is an I / O used by the first OS.
It comprises an O address 921 and a pointer 922 to the next entry for composing the list. As in the case of the interrupt vector management table 900, when the device driver requests an I / O address range, the kernel checks whether the address range is already used or not.
10 and if not used, this list 91
An entry is added to 0 to give use permission.

【0084】図10は、デバイスドライバのロード処理
手順を示すフローチャートである。
FIG. 10 is a flowchart showing a procedure for loading a device driver.

【0085】デバイスドライバのロード処理では、ま
ず、デバイスドライバの情報が取得される(ステップ1
001)。デバイスドライバの情報とは、デバイスドラ
イバのオブジェクトファイル名であり、デバイスドライ
バがオペレーティングシステムのカーネル初期化時にロ
ードされる場合は、カーネル構成情報ファイル700の
エントリ名オブジェクトファイル703から得られ、ま
た、カーネル立ち上げ後にデバイスドライバがロードさ
れる場合は、オペレータがロードを指示したオブジェク
トファイル名が使用される。
In the device driver loading process, first, device driver information is obtained (step 1).
001). The device driver information is the object file name of the device driver. If the device driver is loaded at the time of kernel initialization of the operating system, the device driver information is obtained from the entry name object file 703 of the kernel configuration information file 700. When the device driver is loaded after startup, the object file name that the operator instructed to load is used.

【0086】次に、指定されたオブジェクトファイルを
調べ、当該オブジェクトをロードするために必要なメモ
リサイズを調べる(ステップ1002)。調べたメモリ
サイズに必要な主記憶装置102上のメモリをオペレー
ティングシステムに対して要求し(ステップ100
3)、当該デバイスドライバをメモリに読み込む(ステ
ップ1004)。
Next, the designated object file is checked, and the memory size required for loading the object is checked (step 1002). A request is made to the operating system for a memory on the main storage device 102 necessary for the checked memory size (step 100).
3) The device driver is read into the memory (step 1004).

【0087】次に、当該デバイスドライバのオブジェク
トファイルからデバイスドライバの初期化処理のエント
リポイントを得て、デバイスドライバの初期化処理を実
行する(ステップ1005)。ステップ1005の初期
化処理では、デバイスリスト802を参照することによ
り、当該デバイスドライバが対象とするハードウェアデ
バイスが計算機100に接続されているか確認する(ス
テップ1006)。
Next, an entry point for the device driver initialization process is obtained from the object file of the device driver, and the device driver initialization process is executed (step 1005). In the initialization processing of step 1005, it is checked whether the hardware device targeted by the device driver is connected to the computer 100 by referring to the device list 802 (step 1006).

【0088】当該ハードウェアデバイスが接続されてい
るならば、当該ハードウェアデバイスの初期化、およ
び、デバイスドライバの処理に必要なテーブルの初期化
を実行する(ステップ1007)。もし、当該ハードウ
ェアデバイスが割り込み番号あるいはI/Oアドレスを
必要とするならば、当該デバイスドライバからオペレー
ティングシステムに対して、割り込み番号あるいはI/
Oアドレス範囲を使用することを通知する。通知を受け
たオペレーティングシステムは、図9の割り込み管理テ
ーブル900とI/Oアドレス管理リスト910を調
べ、要求された資源が利用可能な場合、デバイスドライ
バに使用の許可を与え、また、デバイスドライバ管理テ
ーブルを更新することによって、他のデバイスドライバ
はこの資源を使用しないように設定する(ステップ10
08)。割り込み番号の使用の許可が得られた場合、割
り込みを処理するための割り込みハンドラ処理のアドレ
スをオペレーティングシステムに対して登録する(ステ
ップ1009)。また、必要に応じて、当該デバイスド
ライバに固有の処理を実行する(ステップ1010)。
If the hardware device is connected, initialization of the hardware device and initialization of a table necessary for device driver processing are executed (step 1007). If the hardware device requires an interrupt number or an I / O address, the device driver sends an interrupt number or an I / O address to the operating system.
Signals the use of the O address range. The operating system that has received the notification checks the interrupt management table 900 and the I / O address management list 910 in FIG. 9 and, if the requested resource is available, gives permission to use the device driver, and manages the device driver. By updating the table, other device drivers are set not to use this resource (step 10).
08). If permission to use the interrupt number is obtained, the address of the interrupt handler process for processing the interrupt is registered in the operating system (step 1009). Further, if necessary, a process specific to the device driver is executed (step 1010).

【0089】デバイスドライバのロード処理では、ステ
ップ1001から1009の処理がすべて正しく行われ
た場合、ロードオブジェクトリスト804に当該デバイ
スドライバのオブジェクトファイル情報を追加し(ステ
ップ1011)、当該デバイスドライバがオペレーティ
ングシステムの一部となって動作し、ハードウェアデバ
イスを制御する。
In the device driver loading process, when all of the processes in steps 1001 to 1009 are correctly performed, the object file information of the device driver is added to the load object list 804 (step 1011), and the device driver operates the operating system. It operates as a part of and controls hardware devices.

【0090】図11は、デバイスドライバのアンロード
処理のフローチャートである。
FIG. 11 is a flowchart of a device driver unloading process.

【0091】デバイスドライバのアンロードは、ハード
ウェアデバイスの使用を止めるために行うもので、オペ
レーティングシステム立ち上げ後、ロードされたデバイ
スドライバを、指示によりアンロードする場合や、ハー
ドウェアデバイスが計算機から取り除かれた場合に実行
される。
The unloading of the device driver is performed to stop the use of the hardware device. When the operating system is started, the loaded device driver is unloaded according to an instruction, or the hardware device is unloaded from the computer. Executed when removed.

【0092】デバイスドライバのアンロード処理では、
まず、オペレーティングシステムにより当該デバイスド
ライバの終了処理が呼び出される(ステップ110
1)。
In the unload processing of the device driver,
First, termination processing of the device driver is called by the operating system (step 110).
1).

【0093】デバイスドライバの終了処理では、割り込
みハンドラの登録、および、使用していた割り込み番号
あるいはI/Oアドレス範囲の使用が解除される(ステ
ップ1102、1103)。これにより、解除された割
り込み番号あるいはI/Oアドレス範囲は未使用とな
り、他のデバイスドライバでの利用が可能になる。次に
当該デバイスドライバが使用していたメモリを解放し
(ステップ1104)、デバイスドライバの終了処理が
完了する。
In the termination processing of the device driver, the registration of the interrupt handler and the use of the used interrupt number or I / O address range are released (steps 1102 and 1103). As a result, the released interrupt number or I / O address range becomes unused and can be used by another device driver. Next, the memory used by the device driver is released (step 1104), and the termination processing of the device driver is completed.

【0094】デバイスドライバの終了処理後、オペレー
ティングシステムは、デバイスドライバのオブジェクト
ファイルをロードしていた主記憶装置102上のメモリ
を開放し(ステップ1105)、ロードオブジェクトリ
スト804から当該デバイスドライバのオブジェクトフ
ァイルのリストを削除する(ステップ1106)。
After the end processing of the device driver, the operating system releases the memory on the main storage device 102 into which the object file of the device driver has been loaded (step 1105), and reads the object file of the device driver from the load object list 804. Is deleted (step 1106).

【0095】次に、1台のPC上で複数のオペレーティ
ングシステムを実行するための処理手順について説明す
る。本実施形態では、マルチOSを実行するための制御
を第一のOSのデバイスドライバ(以下ではマルチOS
ドライバと記す)として組み込むものとする。
Next, a processing procedure for executing a plurality of operating systems on one PC will be described. In the present embodiment, control for executing the multi-OS is performed by a device driver of the first OS (hereinafter referred to as a multi-OS).
Driver)).

【0096】図12にマルチOSドライバの処理構造を
示す。
FIG. 12 shows the processing structure of the multi-OS driver.

【0097】マルチOSドライバの構造は大きく2つに
分かれ、オペレーティングシステムから呼び出しによっ
て実行される入り口関数部分1201と、入り口関数部
分1201からの呼び出しによって実行される実行関数
部分1202で構成される。
The structure of the multi-OS driver is roughly divided into two parts, and includes an entry function part 1201 executed by a call from the operating system and an execution function part 1202 executed by a call from the entry function part 1201.

【0098】マルチOSドライバのすべての入り口関数
は対応する実行関数のアドレスを保持しており、オペレ
ーティングシステムから入り口関数が呼び出されると、
対応する実行部関数を呼び出し(ステップ1203)、
呼び出された実行関数が当該関数の実際の処理を実行す
る(ステップ1204)。マルチOSドライバがこのよ
うに2つに分かれた構造になっている理由は、オペレー
ティングシステムがデバイスドライバをロード後、さら
に、実行関数部分1202のアドレスを変更可能とする
ためである。
All entry functions of the multi-OS driver hold the addresses of the corresponding execution functions, and when the entry function is called from the operating system,
Call the corresponding execution unit function (step 1203),
The called execution function executes the actual processing of the function (step 1204). The reason that the multi-OS driver has such a two-part structure is that the operating system can change the address of the execution function part 1202 after loading the device driver.

【0099】図13にマルチOSドライバのロード処理
手順のフローチャートを示す。マルチOSドライバもデ
バイスドライバの一種であり、オペレーティングシステ
ムは図10で説明したフローチャートに従ってマルチO
Sドライバのオブジェクトファイルをロードする。この
ため、ここでは、マルチOSドライバのデバイスドライ
バ固有処理(ステップ1010)の詳細のみを示してい
る。
FIG. 13 shows a flowchart of the procedure for loading the multi-OS driver. The multi-OS driver is also a kind of device driver, and the operating system operates in a multi-O
Load the S driver object file. Therefore, only the details of the device driver-specific processing (step 1010) of the multi-OS driver are shown here.

【0100】図13において、まず、すべてのオペレー
ティングシステムから参照可能な共通領域用の物理メモ
リを確保する(ステップ1301)。この共通領域に
は、マルチOSドライバの一部として、割り込みテーブ
ル107、割り込み管理プログラム、割り込みハンド
ラ、各オペレーティングシステムから呼びだし可能なイ
ンターフェイスモジュール等が格納される。共通領域用
の物理メモリの確保は、主記憶リスト801を参照し、
空き領域を確保する。本実施形態では、物理メモリは第
一のOSがロードされているだけであり、空いている物
理メモリのうち、アドレスの大きいほうのメモリを必要
な容量だけ確保する。
In FIG. 13, first, a physical memory for a common area that can be referred to from all operating systems is secured (step 1301). The common area stores an interrupt table 107, an interrupt management program, an interrupt handler, an interface module that can be called from each operating system, and the like as a part of the multi-OS driver. To secure the physical memory for the common area, refer to the main storage list 801 and
Secure free space. In the present embodiment, only the first OS is loaded in the physical memory, and a memory having a larger address among the free physical memories is secured in a necessary capacity.

【0101】次に、共通領域のための、第一のOSの仮
想アドレス空間を確保する(ステップ1302)。この
仮想アドレス空間はすべてのオペレーティングシステム
で一致させる必要があるため、予めすべてのオペレーテ
ィングシステムで取り決めたアドレスを割り当てるもの
とする。本実施形態では、第1のOSの仮想アドレス空
間の中で最もアドレスの大きい空間から必要な容量だけ
確保する。
Next, a virtual address space of the first OS for the common area is secured (step 1302). Since this virtual address space needs to be the same in all operating systems, it is assumed that addresses determined in advance in all operating systems are assigned. In the present embodiment, a necessary capacity is secured from a space having the largest address in the virtual address space of the first OS.

【0102】物理メモリと仮想アドレス空間の領域が確
保できたならば、ステップ1302で確保した仮想アド
レスからステップ1301で確保した物理メモリにアク
セスが可能なように、第一のOSのページテーブルを設
定する(ステップ1303)。
If the area of the physical memory and the virtual address space can be secured, the page table of the first OS is set so that the virtual address secured in step 1302 can access the physical memory secured in step 1301. (Step 1303).

【0103】次に、マルチOSドライバが第一のOSが
ロードされた領域のオブジェクトとデータを、共通領域
に複写し(ステップ1304)、図12で説明したマル
チOSドライバ関数のうちのオペレーティングシステム
から呼び出される入り口関数が保持する実行関数のアド
レスを共通領域に複写した実行関数のアドレスに更新す
る(ステップ1305)。この実行関数のアドレスの変
更により、第一のOSからマルチOSドライバの関数を
呼び出した場合、共通領域にある実行関数のオブジェク
トが実行されることになる。
Next, the multi-OS driver copies the object and data in the area where the first OS is loaded to the common area (step 1304), and the multi-OS driver transmits the object and data from the multi-OS driver function described in FIG. The address of the execution function held by the called entry function is updated to the address of the execution function copied to the common area (step 1305). When the function of the multi-OS driver is called from the first OS by changing the address of the execution function, the object of the execution function in the common area is executed.

【0104】図14に、仮想アドレス空間と主記憶装置
102の物理メモリの対応を示す。
FIG. 14 shows the correspondence between the virtual address space and the physical memory of the main storage device 102.

【0105】1401は物理メモリを、1402は第一
のOSの仮想アドレス空間を示しており、図中、下部か
ら上部に向かってアドレスが大きくなっていくものとす
る。第一のOSの仮想アドレス空間1402は、オペレ
ーティングシステムのみがアクセス可能なカーネル空間
1404とオペレーティングシステムとユーザプログラ
ムがアクセス可能なユーザ空間に分かれる。カーネル空
間1404の下位のアドレス側1408は、物理メモリ
1401のうち、第一のOSに割り当てたメモリ140
9にアクセスできるようにページマップテーブルが設定
されていることを示している。
Reference numeral 1401 denotes a physical memory, and 1402 denotes a virtual address space of the first OS. It is assumed that the address increases from the bottom to the top in the figure. The virtual address space 1402 of the first OS is divided into a kernel space 1404 accessible only by the operating system and a user space accessible by the operating system and user programs. The lower address side 1408 of the kernel space 1404 is the memory 140 allocated to the first OS in the physical memory 1401.
9 indicates that the page map table has been set so as to be accessible.

【0106】マルチOSドライバは、第一のOSによっ
て、物理メモリ1409の一部の領域1413にロード
され、仮想アドレス空間1404のマルチOSドライバ
A領域1412にマップされる。マルチOSドライバA
領域1412は、オペレーティングシステムの仮想アド
レス空間の利用状況によって変化するため、予め予測す
ることはできない。
The multi-OS driver is loaded by the first OS into a partial area 1413 of the physical memory 1409 and mapped to the multi-OS driver A area 1412 in the virtual address space 1404. Multi OS driver A
The area 1412 cannot be predicted in advance because it changes depending on the usage status of the virtual address space of the operating system.

【0107】マルチOSドライバは、すべてのオペレー
ティングシステムで使用するオブジェクトとデータを含
むため、すべてのオペレーティングシステムで確保で
き、かつ、一致した仮想アドレス空間の領域(マルチO
SドライバB領域1415)にオブジェクトとデータを
移動させる。これにより、すべてのオペレーティングシ
ステムで共通のアドレスでマルチOSドライバにアクセ
スできることになる。また、マルチOSドライバB領域
1415の物理メモリも、第一のOSに割り当てた物理
メモリ内の領域1413から共通領域203に移動させ
ることによって、オペレーティングシステムの不具合に
よる誤ったメモリアクセスを防ぐことができる。
Since the multi-OS driver includes objects and data used in all operating systems, it can be secured in all operating systems, and the area of the matched virtual address space (multi-OS driver)
The object and the data are moved to the S driver B area 1415). As a result, the multi-OS driver can be accessed at a common address in all operating systems. Also, by moving the physical memory of the multi-OS driver B area 1415 from the area 1413 in the physical memory allocated to the first OS to the common area 203, erroneous memory access due to a malfunction of the operating system can be prevented. .

【0108】図15は、第二のOSのロード手順を示す
フローチャートである。
FIG. 15 is a flowchart showing a procedure for loading the second OS.

【0109】この処理では、まず、第二のOS用に割り
当てた物理メモリ領域に、第二のOSのオブジェクトフ
ァイルを読み込む必要がある。しかし、第二のOSの物
理メモリ領域は、そのままでは第一のOSから書き込む
ことはできないので、割り当てた物理メモリ領域を第一
のOSの仮想空間に一時的にマッピングする(ステップ
1501)。
In this processing, first, it is necessary to read the object file of the second OS into the physical memory area allocated for the second OS. However, since the physical memory area of the second OS cannot be written from the first OS as it is, the allocated physical memory area is temporarily mapped in the virtual space of the first OS (step 1501).

【0110】ステップ1502では、マッピングした領
域に、第一のOSのファイル読み込み手順を利用して、
第二のOSのオブジェクトファイルを読み込む。
In step 1502, the file is read into the mapped area by using the file read procedure of the first OS.
The object file of the second OS is read.

【0111】次に、第二のOS用のページテーブルを作
成する(ステップ1503)。このページテーブルも第二
のOS用の領域に作成する。このとき共通領域203の
領域についても、第二のOSの空間から参照できるよう
に、ページテーブルを構築する。
Next, a page table for the second OS is created (step 1503). This page table is also created in the area for the second OS. At this time, a page table is constructed so that the area of the common area 203 can be referred to from the space of the second OS.

【0112】共通領域203をマッピングするマルチO
SドライバC領域1416は、第一のOSのマルチOS
ドライバB領域1415の仮想アドレスと同じ値になる
ように設定する。
Multi-O mapping common area 203
The S driver C area 1416 is a multi-OS of the first OS.
The value is set to be the same value as the virtual address of the driver B area 1415.

【0113】次に、第二のOSからマルチOSドライバ
C領域1416に配置したマルチOSドライバのインタ
フェースモジュールの呼び出しができるように、インタ
フェースモジュールのアドレスを第二のOSの領域に書
き込み、起動時の引数として第二のOSに渡す(ステッ
プ1504)。同様に、マルチOSドライバから第二の
OSを呼び出すときに必要な関数のアドレスを、オブジ
ェクトファイルから取得し、共通領域203に保持して
おく(ステップ1505)。
Next, the address of the interface module is written in the second OS area so that the second OS can call the interface module of the multi-OS driver arranged in the multi-OS driver C area 1416. It is passed to the second OS as an argument (step 1504). Similarly, the address of a function necessary for calling the second OS from the multi-OS driver is acquired from the object file and stored in the common area 203 (step 1505).

【0114】これで、第二のOS領域の設定を終了し、
第一のOSにマッピングした、第二のOS用の物理メモ
リ領域のマッピングを解除する(ステップ1506)。
Thus, the setting of the second OS area is completed.
The mapping of the physical memory area for the second OS, which has been mapped to the first OS, is released (step 1506).

【0115】次に、OSコンテクストテーブル1610
の第二のOSのコンテクストと、OS識別変数1630
を設定する(ステップ1507)。OSコンテクストは、
実行オペレーティングシステムを切り替えるときに参照
するデータ構造で、ページテーブルアドレス値とスタッ
クポインタの初期値とで構成される。ここでは、ページ
テーブルレジスタ値として第二のOSをマップするペー
ジテーブルのアドレスを、スタックポインタ値として第
二のOSのカーネルスタックの初期アドレスを設定す
る。OS識別変数1630には、第一のOSが実行中で
あることを示す値が格納される。OSコンテクストテー
ブル1610とOS識別変数1630については後述す
る。
Next, the OS context table 1610
And the OS identification variable 1630
Is set (step 1507). OS context is
A data structure that is referred to when switching the execution operating system, and includes a page table address value and an initial value of a stack pointer. Here, the address of the page table that maps the second OS is set as the page table register value, and the initial address of the kernel stack of the second OS is set as the stack pointer value. The OS identification variable 1630 stores a value indicating that the first OS is running. The OS context table 1610 and the OS identification variable 1630 will be described later.

【0116】次に、第二のOSの初期化モジュールを実
行する(ステップ1508)。これには、オペレーティン
グシステム空間の切り替えが伴う。オペレーティングシ
ステムの切り替えについては、別のフローチャートによ
り説明する。
Next, the initialization module of the second OS is executed (Step 1508). This involves switching the operating system space. The switching of the operating system will be described with reference to another flowchart.

【0117】最後に、ステップ1509にて、現在の割
り込みテーブルレジスタ104に登録されている第一の
OSの割り込みハンドラのアドレスを、割り込み識別テ
ーブル1620のハンドラ欄1622に複写し、割り込
みテーブルレジスタ値を、マルチOSドライバに割り当
てた割り込みテーブルのアドレスに変更する。これはプ
ロセッサ101の割り込みテーブルレジスタ104の変
更により実施する。
Finally, in step 1509, the address of the first OS interrupt handler registered in the current interrupt table register 104 is copied to the handler column 1622 of the interrupt identification table 1620, and the interrupt table register value is set. Is changed to the address of the interrupt table assigned to the multi-OS driver. This is performed by changing the interrupt table register 104 of the processor 101.

【0118】割り込みテーブルをマルチOSドライバ内
のテーブルに変更するのは、割り込み発生時にどのオペ
レーティングシステムが実行していても、常にプロセッ
サ101の仮想アドレス空間に割り込みテーブルが存在
している必要があるためである。割り込みテーブルに登
録される割り込みハンドラも、マルチOSドライバ内に
配置される。マルチOSドライバの領域は、ステップ1
503にて、第二のOSの仮想空間にもマッピングして
共通領域203とするので、いつでも参照できることに
なる。マルチOSドライバの割り込み処理については後
述する。
The reason why the interrupt table is changed to the table in the multi-OS driver is that the interrupt table must always exist in the virtual address space of the processor 101 regardless of which operating system is executing when the interrupt occurs. It is. The interrupt handler registered in the interrupt table is also arranged in the multi-OS driver. Step 1
At 503, the virtual area of the second OS is also mapped to the common area 203, so that it can be referred to at any time. The interrupt processing of the multi-OS driver will be described later.

【0119】図16は、共通領域203のうちデータ領
域1600に格納されるデータのデータ構造を示した図
である。
FIG. 16 is a diagram showing a data structure of data stored in the data area 1600 of the common area 203.

【0120】1610は、OSコンテクストテーブルで
ある。OSコンテクストテーブル1610は、第一のO
Sと第二のOSとの間の切り替えに必要なデータを保持
する。本実施形態では、第一のOSは第二のOSがアイ
ドル状態の時のみ走行できるとする。この場合、第一の
OS実行中のある時点で第二のOSへの切り替えが起こ
り、第二のOSの実行が終了した時点で、第一のOSに
制御を戻せばよい。
Reference numeral 1610 denotes an OS context table. The OS context table 1610 stores the first O
Data necessary for switching between S and the second OS is held. In the present embodiment, it is assumed that the first OS can run only when the second OS is in the idle state. In this case, the switching to the second OS occurs at a certain time during the execution of the first OS, and the control may be returned to the first OS when the execution of the second OS ends.

【0121】したがって、それぞれで保存しておかなけ
ればコンテクストは一組でよい。第一のOSのコンテク
ストについては、OS切り替えが要求された時点でのペ
ージテーブルレジスタ値1611と、スタックポインタ
値1612を保存しておけば、第二のOS実行終了後
に、第一のOSに制御を復帰させることができる。
Therefore, the context may be one set unless it is stored individually. For the context of the first OS, if the page table register value 1611 and the stack pointer value 1612 at the time when the OS switching is requested are stored, the first OS is controlled by the first OS after the execution of the second OS is completed. Can be restored.

【0122】第一のOSから第二のOSへ制御を切り替
えるときには第二のOSは動作していない。したがっ
て、第二のOSのコンテクストは、ページテーブルアド
レスもスタックポインタも固定のアドレスでよい。第二
のOSのページテーブルレジスタ1613とスタックポ
インタ値1614は、第二のOSをロードするときに設
定される(ステップ1507)。
When the control is switched from the first OS to the second OS, the second OS is not operating. Therefore, the context of the second OS may be a fixed address for both the page table address and the stack pointer. The page table register 1613 and the stack pointer value 1614 of the second OS are set when loading the second OS (Step 1507).

【0123】1620は、割り込み識別テーブルであ
る。割り込み識別テーブル1620には、外部割り込み
の割り込み番号毎に、どのオペレーティングシステムが
割り込み処理を処理するかを示す値1621と、割り込
みハンドラのアドレス1622が記録されている。外部
割り込みが発生すると、共通領域203内の割り込みハ
ンドラが割り込みを捕獲し、この割り込み識別テーブル
1620の処理OS1621を参照して、どのオペレー
ティングシステムに処理させるかを決定し、ハンドラ1
622のアドレスに制御を渡す。割り込み処理の詳細に
ついては、後述する。
Reference numeral 1620 denotes an interrupt identification table. In the interrupt identification table 1620, a value 1621 indicating which operating system processes the interrupt process and an address 1622 of the interrupt handler are recorded for each interrupt number of the external interrupt. When an external interrupt occurs, the interrupt handler in the common area 203 captures the interrupt and refers to the processing OS 1621 in the interrupt identification table 1620 to determine which operating system is to be processed, and the handler 1
Control is passed to the address 622. Details of the interrupt processing will be described later.

【0124】1630は、実行中のオペレーティングシ
ステムを示す値を格納しているOS識別変数である。O
S識別変数1630は、ステップ1701から始まるO
S切り替え手順でOS切り替えの度に設定される。割り
込み処理では、OS識別変数1630を参照して割り込
み処理手順が決定される。
An OS identification variable 1630 stores a value indicating the operating system being executed. O
The S identification variable 1630 is obtained by
It is set every time the OS is switched in the S switching procedure. In the interrupt processing, an interrupt processing procedure is determined with reference to the OS identification variable 1630.

【0125】1640は、第二のOSの実行中に、第一
のOSが管理しているデバイスの割り込みが発生したか
を示す遅延割り込み状態変数である。遅延割り込み状態
変数1640は、どの割り込み番号の割り込みが発生し
たかを記録している。OS切り替え手順は、第二のOS
の実行が終了したときに遅延割り込み状態変数1640
を検査して、割り込み処理を起動するかを決定する(ス
テップ1708)。
Reference numeral 1640 denotes a delayed interrupt status variable indicating whether an interrupt of a device managed by the first OS has occurred during execution of the second OS. The delay interrupt status variable 1640 records which interrupt number has occurred. The OS switching procedure is the second OS
Interrupt status variable 1640 when execution of
Is checked to determine whether to start interrupt processing (step 1708).

【0126】1660は、第二のOSで動作するデバイ
スドライバが、割り込み番号あるいはI/Oアドレス範
囲の資源を使用要求あるいは使用解除要求したことを示
す変数である。第二のOSが実行中に資源が要求された
とき、第一のOSでこの資源を使用しないように通知す
る必要があるが、第二のOSから第一のOSの処理を直
接は呼び出すことはできない。このため、マルチOSド
ライバが第二のOSからの資源の要求を受け、仮予約の
状態を作り、第二のOSの実行が終了したときに、変数
1660を検査することによって、マルチOSドライバ
が再度、第一のOSに対して資源の要求を行う。第二の
OSが実行中は、第一のOSは必ず停止状態にあるた
め、資源がマルチOSドライバによって仮予約の状態で
も、第一のOSがその資源を使用することはない。
Reference numeral 1660 denotes a variable indicating that the device driver operating on the second OS has requested the use or release of the resources in the interrupt number or the I / O address range. When a resource is requested during execution of the second OS, it is necessary to notify the first OS not to use this resource, but the second OS directly calls the processing of the first OS. Can not. Therefore, the multi-OS driver receives a request for resources from the second OS, creates a provisional reservation state, and checks the variable 1660 when the execution of the second OS is completed. Again, a request for resources is made to the first OS. While the second OS is running, the first OS is always in a stopped state, so even if the resources are temporarily reserved by the multi-OS driver, the first OS does not use the resources.

【0127】図17は、本発明の実施の形態における、
オペレーティングシステムの切り替え手順を示すフロー
チャートである。この切り替えの手順は、第一のOSの
実行中に呼び出され、第二のOSへの切り替えを行う。
FIG. 17 shows an embodiment of the present invention.
6 is a flowchart illustrating a procedure for switching an operating system. This switching procedure is called during the execution of the first OS, and switches to the second OS.

【0128】図17に示した手順は、第二のOSへの切
り替え後に実行する第二のOSもモジュールのアドレス
と、そのモジュールへ渡す引数を引数として受け取る。
第二のOSのモジュールのアドレスは、ステップ150
5で取得しているものとする。
In the procedure shown in FIG. 17, the second OS executed after switching to the second OS also receives the address of the module and the arguments to be passed to the module as arguments.
The address of the module of the second OS is stored in step 150
Assume that it has been acquired in 5.

【0129】まず、ステップ1701で、現在のスタッ
クポインタ値とページテーブルレジスタ値を、OSコン
テクストテーブル1610の、第一のOSのコンテクス
トとして保存する。ステップ1701では、現在のスタ
ックポインタ値を1612に、現在のページテーブルレ
ジスタ値を1611に保存する。他のレジスタコンテク
ストについては、OSコンテクストテーブル1610に
保存する必要はない。必要があれば、第一のOSのスタ
ックに保存すればよい。
First, in step 1701, the current stack pointer value and page table register value are stored as the first OS context in the OS context table 1610. In step 1701, the current stack pointer value is stored in 1612, and the current page table register value is stored in 1611. Other register contexts do not need to be stored in the OS context table 1610. If necessary, it may be stored in the stack of the first OS.

【0130】スタックポインタ値とページテーブルレジ
スタ値を保存した後、ステップ1702にて、ページテ
ーブルレジスタ105に第二のOSを仮想空間にマップ
するページテーブルのアドレスを設定する。これは、O
Sコンテクストテーブル1610の1613に記録され
ている。更に、スタックポインタを第二のOS用に設定
する。これも、テーブル1610の第二のOSのスタッ
クポインタ1614に格納されている。
After storing the stack pointer value and the page table register value, in step 1702, the page table register 105 is set with the address of the page table that maps the second OS to the virtual space. This is O
It is recorded in 1613 of the S context table 1610. Further, a stack pointer is set for the second OS. This is also stored in the stack pointer 1614 of the second OS in the table 1610.

【0131】次のステップ1703で、第一のOSの割
り込み状態を示す遅延割り込み状態変数1640と割り
込み資源の要求変数1660をクリアし、割り込み管理
テーブル900とI/Oアドレス管理リスト910の内
容を共通領域203に複写しておく。そして、現在実行
中のOSを示しているOS識別変数1630を、第二の
OSを示す値に書き換える(ステップ1704)。スタッ
クポインタ、ページテーブルレジスタ105、および、
OS識別変数1630は、常に一貫した値になっていな
ければならないので、ここまでのステップ1701、な
いし、1704は、全て外部割り込みを禁止した状態で
実行しなければならない。
In the next step 1703, the delay interrupt status variable 1640 indicating the interrupt status of the first OS and the request variable 1660 of the interrupt resource are cleared, and the contents of the interrupt management table 900 and the I / O address management list 910 are shared. It is copied in the area 203. Then, the OS identification variable 1630 indicating the currently executing OS is rewritten to a value indicating the second OS (step 1704). Stack pointer, page table register 105, and
Since the OS identification variable 1630 must always have a consistent value, all of the steps 1701 to 1704 up to this point must be executed with external interrupts disabled.

【0132】続くステップ1705で、引数として渡さ
れたモジュールのアドレスに制御を移し、第二のOSに
制御を渡す。本実施形態においては、第一のOSは第2
のOSが動作していないとき、つまり、第二のOSの処
理が終了したときに、ステップ1706へ制御が戻る。
In the following step 1705, control is transferred to the address of the module passed as an argument, and control is passed to the second OS. In the present embodiment, the first OS is the second OS
When the OS of the second OS is not operating, that is, when the processing of the second OS is completed, the control returns to step 1706.

【0133】ステップ1706では、ステップ1701
でOSコンテクストテーブル1610に保存したページ
テーブルレジスタ値1611と、スタックポインタ値1
612のそれぞれを回復する。続くステップ1707
で、OS識別変数1630を第一のOSが実行中である
ことを示す値に変更する。この2つステップの処理も割
り込みを禁止した状態で実行しなければならない。
In step 1706, step 1701
The page table register value 1611 stored in the OS context table 1610 and the stack pointer value 1
Recover each of 612. Following step 1707
Then, the OS identification variable 1630 is changed to a value indicating that the first OS is running. These two steps must also be executed with interrupts disabled.

【0134】次に、第二のOSの実行中に発生した、第
一のOSが管理するデバイスの外部割り込みを処理す
る。まず、ステップ1708では、遅延割り込み状態変
数1640を検査して、割り込みが発生したかを検査す
る。発生していない場合は、ステップ1711を実行す
る。割り込みが発生している場合は、ステップ1709
を実行する。このステップでは、第二のOSが実行中に
発生した割り込みを、第一のOSが管理している遅延割
り込み状態変数に、未処理の割り込みがある旨を記録す
る。続いて、第一のOSの割り込み処理を起動する(ス
テップ1710)。全ての割り込み処理が終了したと
き、ステップ1711を実行する。
Next, an external interrupt of a device managed by the first OS, which occurs during execution of the second OS, is processed. First, in step 1708, the delay interrupt status variable 1640 is checked to determine whether an interrupt has occurred. If not, step 1711 is executed. If an interrupt has occurred, step 1709
Execute In this step, the fact that there is an unprocessed interrupt is recorded in the delayed interrupt state variable managed by the first OS for the interrupt that occurred while the second OS was executing. Subsequently, the interrupt processing of the first OS is started (step 1710). When all the interrupt processes have been completed, step 1711 is executed.

【0135】ステップ1711では、第二のOS実行中
にデバイスドライバのロードあるいはアンロードにより
ハードウェアデバイスが必要とする割り込み番号あるい
はI/Oアドレス範囲の資源の利用状態に変化があった
かを検査する。つまり、第二のOSを実行中に、図10
で説明した処理手順により、第二のOSが使用するハー
ドウェアデバイスを制御するため、対応するデバイスド
ライバのロードが行われ、資源の使用要求がデバイスド
ライバから第二のOSに通知された場合、第二のOSは
マルチOSドライバに対して資源の使用が要求されたこ
とを通知する。通知を受けたマルチOSドライバは、ス
テップ1703で共通領域203に複写した割り込み管
理テーブル900とI/Oアドレス管理リスト910を
調査し、資源の使用が可能ならば、共通領域203のテ
ーブル(900,910)を更新後、第二のOSに対し
て資源の使用の許可を出す。同時に、資源の使用の状態
が変化したことを、変数1660に記録しておく。第二
のOSを実行中にデバイスドライバのアンロードが行わ
れた場合と同様であり、当該デバイスドライバから第二
のOSへ、更に、第二のOSからマルチOSドライバへ
と要求が伝わり、変数1660に変化を記録する。
In step 1711, it is checked whether the use state of the resource of the interrupt number or the I / O address range required by the hardware device has changed due to the loading or unloading of the device driver during the execution of the second OS. That is, while the second OS is being executed, FIG.
When the corresponding device driver is loaded in order to control the hardware device used by the second OS according to the processing procedure described in and the resource use request is notified from the device driver to the second OS, The second OS notifies the multi-OS driver that the use of the resource has been requested. The multi-OS driver that has received the notification checks the interrupt management table 900 and the I / O address management list 910 copied to the common area 203 in step 1703, and if resources can be used, the table (900, 900) in the common area 203 910), the second OS is given permission to use the resources. At the same time, the fact that the usage status of the resource has changed is recorded in a variable 1660. This is the same as the case where the device driver is unloaded during execution of the second OS. A request is transmitted from the device driver to the second OS, and further, the request is transmitted from the second OS to the multi-OS driver. The change is recorded at 1660.

【0136】ステップ1711では、変数1660を検
査することによって、割り込み番号あるいはI/Oアド
レス範囲の資源の利用状態に変化があったことを検出
し、変化があった場合は、共通領域203にある割り込
み管理テーブル900とI/Oアドレス管理リスト91
0の内容を、第一のOSが管理する割り込み管理テーブ
ル900とI/Oアドレス管理リスト910へと書き戻
す(ステップ1712)。
In step 1711, by examining the variable 1660, it is detected that a change has occurred in the use state of the resource in the interrupt number or the I / O address range. Interrupt management table 900 and I / O address management list 91
0 is written back to the interrupt management table 900 and the I / O address management list 910 managed by the first OS (step 1712).

【0137】これにより第二のOSが使用するハードウ
ェアデバイスの資源は、第一のOSにも設定されるた
め、第一のOSのデバイスドライバにこの資源が割り当
てられることが防げる。第一のOSから見て、第二のO
Sが使用するハードウェアデバイスの資源は、第一のO
SにロードされているマルチOSドライバが使用する資
源として見せることによって、オペレーティングシステ
ム内の管理の一貫性は保たれる。
As a result, the resources of the hardware device used by the second OS are also set in the first OS, so that the resources can be prevented from being allocated to the device driver of the first OS. From the perspective of the first OS, the second O
The resource of the hardware device used by S is the first O
By showing it as a resource used by the multi-OS driver loaded in S, the consistency of management in the operating system is maintained.

【0138】図18は、本実施形態の割り込み処理手順
を示すフローチャートである。この手順を実行するモジ
ュールは、割り込みハンドラとしてプロセッサ101の
割り込みテーブル107に登録される。さらに、この割
り込みハンドラは、どのオペレーティングシステムから
も参照できる共通領域203に配置される。
FIG. 18 is a flowchart showing an interrupt processing procedure according to this embodiment. The module that executes this procedure is registered in the interrupt table 107 of the processor 101 as an interrupt handler. Further, this interrupt handler is arranged in the common area 203 which can be referred to from any operating system.

【0139】外部割り込みが発生して、プロセッサ10
1により割り込みハンドラが起動されると、割り込みハ
ンドラは割り込み要因を検査し、割り込みを発生したハ
ードウェアデバイスが第一のOSが関するハードウェア
デバイスか、第二のOSが管理するハードウェアデバイ
スかを判定する(ステップ1801)。この判定は、割り
込み識別テーブル1620を割り込み番号をインデック
スとしてOS欄1621を参照することにより実施され
る。第一のOSのハードウェアデバイスである場合はス
テップ1802へ、第二のOSのハードウェアデバイス
である場合はステップ1805へ進む。例えば、図16
でいえば、割り込み番号が1であれば第一のOSの割り
込みであり、割り込み番号4であれば第二のOSの割り
込みとなる。
When an external interrupt occurs, the processor 10
When the interrupt handler is activated by step 1, the interrupt handler checks the cause of the interrupt and determines whether the hardware device that generated the interrupt is a hardware device associated with the first OS or a hardware device managed by the second OS. A determination is made (step 1801). This determination is made by referring to the OS column 1621 in the interrupt identification table 1620 using the interrupt number as an index. If it is the hardware device of the first OS, the process proceeds to step 1802; if it is the hardware device of the second OS, the process proceeds to step 1805. For example, FIG.
In other words, if the interrupt number is 1, it is an interrupt of the first OS, and if the interrupt number is 4, it is an interrupt of the second OS.

【0140】割り込みが第一のOSのハードウェアデバ
イスの割り込みである場合、ステップ1802を実行す
る。ステップ1802では、割り込み発生時に実行して
いたオペレーティングシステムを判定する。この判定
は、OS識別変数1630を参照して実施する。実行中
のOSが第一のOSの場合はステップ1803へ、第二
のOSの場合はステップ1804へ進む。
If the interrupt is a hardware device interrupt of the first OS, step 1802 is executed. In step 1802, the operating system that was being executed when the interrupt occurred is determined. This determination is made with reference to the OS identification variable 1630. If the OS being executed is the first OS, the process proceeds to step 1803, and if it is the second OS, the process proceeds to step 1804.

【0141】ステップ1803から始まる処理は、第一
のOSが管理しているハードウェアデバイスが、第一の
OSを実行中に割り込みを発生した場合の処理である。
The process starting from step 1803 is a process performed when a hardware device managed by the first OS generates an interrupt while the first OS is being executed.

【0142】ステップ1803では、あたかも1801
から始まる処理が存在せず、第一のOSの割り込みハン
ドラが、直接プロセッサ101から制御を受けたように
見えるようにコンテクストを設定する。ここでコンテク
ストとは、スタックの内容やレジスタの内容を示す。そ
して、第一のOSの割り込みハンドラのアドレスは、割
り込み識別テーブル1620のハンドラ欄1622に格
納されている。例えば、割り込み番号1の割り込みなら
ば、1をインデックスとして割り込み識別テーブルを参
照して、ハンドラのアドレスを求める。この場合、ステ
ップ1801から始まる手順には制御は戻らず、第一の
OSが処理を続ける。
At step 1803, it is as if 1801
, And the context is set such that the interrupt handler of the first OS appears to be directly controlled by the processor 101. Here, the context indicates the contents of the stack and the contents of the register. The address of the interrupt handler of the first OS is stored in the handler column 1622 of the interrupt identification table 1620. For example, if the interrupt is interrupt number 1, the address of the handler is obtained by referring to the interrupt identification table using 1 as an index. In this case, the control does not return to the procedure starting from step 1801, and the first OS continues the processing.

【0143】第一のOSが管理しているハードウェアデ
バイスが、第二のOSを実行中に割り込みを発生した場
合、ステップ1804を実行する。ステップ1804で
は、遅延割り込み状態変数1640に割り込みを発生し
たハードウェアデバイスの割り込み番号を記録する。割
り込みハンドラの処理はこれで終了する。この場合の割
り込みの処理は、実行OSが第一のOSに切り替わった
ときに実行される(ステップ1708)。
If the hardware device managed by the first OS generates an interrupt while the second OS is running, step 1804 is executed. In step 1804, the interrupt number of the hardware device that generated the interrupt is recorded in the delay interrupt status variable 1640. This completes the processing of the interrupt handler. The interruption process in this case is executed when the execution OS is switched to the first OS (step 1708).

【0144】発生した外部割り込みが、第二のOSが管
理するハードウェアデバイスの割り込みだった場合、ス
テップ1805へ進み、どちらのOSが実行中であるか
を検査する。ここでも、OS識別変数1630によって
実行中のOSを判定する。第一のOSが実行中の場合
は、ステップ1806へ、第二のOSが実行中の場合は
ステップ1811へ進む。
If the generated external interrupt is an interrupt of a hardware device managed by the second OS, the flow advances to step 1805 to check which OS is being executed. Here, the OS under execution is determined by the OS identification variable 1630. If the first OS is running, the process proceeds to step 1806; if the second OS is running, the process proceeds to step 1811.

【0145】第二のOSが管理するハードウェアデバイ
スの割り込みが、第二のOSの実行中に発生した場合、
ステップ1811を実行する。ステップ1811は、第
二のOSの割り込みハンドラを起動する。第二のOSの
割り込みハンドラのアドレスは、割り込み識別テーブル
1620のハンドラ欄1622に記録されている。第二
のOSの割り込みハンドラ処理が終了して戻ってきた
ら、この割り込みハンドラも終了し、割り込まれたとき
のコンテクストを回復して制御を戻す。
When an interrupt of a hardware device managed by the second OS occurs during execution of the second OS,
Step 1811 is executed. Step 1811 activates the interrupt handler of the second OS. The address of the interrupt handler of the second OS is recorded in the handler column 1622 of the interrupt identification table 1620. When the second OS interrupt handler process ends and returns, this interrupt handler also ends, recovers the context at the time of the interrupt, and returns control.

【0146】第二のOSが管理するハードウェアデバイ
スの外部割り込みが、第一のOSの実行中に発生した場
合、ステップ1806を実行する。この場合は、第一の
OSの実行よりも第二のOSの処理を優先して実行す
る。
If an external interrupt of a hardware device managed by the second OS occurs during the execution of the first OS, step 1806 is executed. In this case, the process of the second OS is executed with priority over the execution of the first OS.

【0147】まず、ステップ1806では、コンテクス
トを保存する。ここでのコンテクストとは、割り込み処
理が終了した後で第一のOSに制御を戻すときに、割り
込まれたときの状態を回復するのに必要なスタックの内
容とレジスタの内容を示す。このコンテクストは、第一
のOSのカーネルのスタックに保存される。
First, in step 1806, the context is saved. Here, the context indicates the contents of the stack and the contents of the registers necessary for restoring the interrupted state when returning control to the first OS after the end of the interrupt processing. This context is stored in the stack of the kernel of the first OS.

【0148】続いて、実行OSの切り替えと第二のOS
の割り込み処理の起動を実行する(ステップ1807,
1808)。これは、ステップ1701から始まる手順
により実行する。
Subsequently, the switching of the execution OS and the second OS
Of the interrupt processing is executed (step 1807,
1808). This is performed by a procedure starting from step 1701.

【0149】第二のOSの処理が終了した時点で、第一
のOSへの切り替えを実行し(ステップ1809)、割り
込み時のコンテクストを回復し(ステップ1810)、第
一のOSの処理を再開する。ステップ1809の処理
は、必ずしも、ステップ1801から始まる処理と同一
のもモジュールで実行されなくてもよい。第一のOSへ
の切り替えにより処理はこのモジュールに復帰する。
When the processing of the second OS is completed, switching to the first OS is executed (step 1809), the context at the time of interruption is restored (step 1810), and the processing of the first OS is restarted. I do. The processing in step 1809 does not necessarily have to be executed by the same module as the processing starting from step 1801. The process returns to this module by switching to the first OS.

【0150】2つのオペレーティングシステムで共有し
ているクロック割り込みの処理について説明する。
The processing of a clock interrupt shared by two operating systems will now be described.

【0151】クロック割り込みは、共通領域203内の
割り込みハンドラにより捕獲する。この割り込みのハン
ドラでは、まず、第二のOSのクロック割り込み用の割
り込みハンドラを実行する。第二のOSの割り込みハン
ドラはハンドラ欄1623に格納されている。第二のO
Sの割り込みハンドラが終了したら、図18のステップ
1802から始まる処理により第一のOSの割り込み処
理を実行する。第1のOSの割り込みハンドラのアドレ
スはハンドラ欄1622に格納されている。
The clock interrupt is captured by an interrupt handler in the common area 203. In this interrupt handler, first, an interrupt handler for a clock interrupt of the second OS is executed. The interrupt handler of the second OS is stored in the handler column 1623. Second O
When the S interrupt handler ends, the first OS interrupt process is executed by the process starting from step 1802 in FIG. The address of the interrupt handler of the first OS is stored in the handler column 1622.

【0152】以上により、一台の計算機で2つのオペレ
ーティングシステムを同時に動作させることが可能にな
る。
As described above, two operating systems can be operated simultaneously by one computer.

【0153】さらに、上述した実施形態において、図1
5で示した第二のOSのロード手順に図19のフローチ
ャートで示すようなステップ1510を加えることによ
って、第二のOSに第一のOSの動作状態を監視させる
ことが可能になる。図19の処理手順について以下説明
する。
Further, in the above-described embodiment, in FIG.
By adding step 1510 as shown in the flowchart of FIG. 19 to the loading procedure of the second OS shown in 5, it becomes possible to cause the second OS to monitor the operating state of the first OS. The processing procedure of FIG. 19 will be described below.

【0154】図19の処理手順のうち、ステップ150
1からステップ1509までは、図15のフローチャー
トの処理と同じであり、新たに監視処理を実施するため
のステップ1510を追加している。
In the processing procedure of FIG.
Steps 1 to 1509 are the same as the processing in the flowchart of FIG. 15, and additionally include a step 1510 for performing a new monitoring process.

【0155】オペレーティングシステムは、実行中に障
害が発生し、処理の継続が不可能と判定した場合、オペ
レーティングシステムのエラー処理関数を実行すること
によって、計算機に接続している全てのハードウェアデ
バイスを停止させ、最後に計算機のプロセッサを停止さ
せる。本実施形態では、一台の計算機上で複数のオペレ
ーティングシステムを動作させているため、一つのオペ
レーティングシステムの障害で、必ずしも計算機全体を
停止させる必要はなく、障害を起こしたオペレーティン
グシステム以外のオペレーティングシステムが計算機の
動作を継続することが可能である。
When a failure occurs during execution and it is determined that the processing cannot be continued, the operating system executes an error handling function of the operating system to execute all the hardware devices connected to the computer. Stop, and finally the processor of the computer. In this embodiment, since a plurality of operating systems are operated on one computer, it is not always necessary to stop the entire computer due to a failure of one operating system. Can continue the operation of the computer.

【0156】本実施形態では、第一のOSに障害が発生
し、第二のOSがこれを検出するものとする。ステップ
1510では、第二のOSのローディング処理の最後
に、第一のOSが呼び出すエラー処理関数の先頭の命令
を、割り込みを発生する命令に書き換える。例えば、図
16に示した割り込み識別テーブル1620の状態で、
割り込み番号5を発生させる命令を書き込むと、第一の
OSで継続不能な障害が発生した場合、第一のOSのエ
ラー処理関数が実行される前に割り込み番号5がプロセ
ッサ101で発生する。割り込み番号5は、第二のOS
が管理する割り込みであり、割り込み番号5のハンドラ
欄1623の内容にしたがって、第2のOSのハンドラ
が呼び出される。つまり、第一のOSのエラー処理関数
が実行される前に、第二のOSは第一のOSに障害が発
生したことを検知できる。割り込み番号5の割り込みハ
ンドラ処理で、マルチOSドライバに対して、第一のO
Sがダウンしたことを通知し、以後、第二のOSのみを
動作させるようにすれば、第二のOSの処理は継続させ
ることができる。処理を継続する第二のOSが、第一の
OSの障害診断や障害回復を行い、オペレータに対する
通知を行うことが可能である。これにより、一台の計算
機で複数のオペレーティングシステムを同時に動作させ
る環境において、1つのオペレーティングシステムが他
のオペレーティングシステムで発生した障害を監視する
システムを実現できる。
In this embodiment, it is assumed that a failure has occurred in the first OS and the second OS has detected the failure. In step 1510, at the end of the loading processing of the second OS, the first instruction of the error processing function called by the first OS is rewritten to an instruction that generates an interrupt. For example, in the state of the interrupt identification table 1620 shown in FIG.
When an instruction for generating the interrupt number 5 is written, if a failure that cannot be continued occurs in the first OS, the interrupt number 5 is generated in the processor 101 before the error processing function of the first OS is executed. Interrupt number 5 is the second OS
, And the handler of the second OS is called in accordance with the contents of the handler column 1623 of the interrupt number 5. That is, before the error processing function of the first OS is executed, the second OS can detect that a failure has occurred in the first OS. In the interrupt handler process of interrupt number 5, the first O
By notifying that S has gone down and operating only the second OS thereafter, the processing of the second OS can be continued. The second OS that continues the process can diagnose and recover from the failure of the first OS and notify the operator. Accordingly, in an environment where a plurality of operating systems are simultaneously operated by one computer, a system in which one operating system monitors a failure that has occurred in another operating system can be realized.

【0157】また、上述した実施形態では、一台の計算
機で複数のオペレーティングシステムを動作させる機能
を、マルチOSドライバというデバイスドライバで実施
したが、計算機のブート処理によりロードされるオペレ
ーティングシステムの内部にマルチOSを実施する機能
を組み込むことも可能である。この実施形態では、図6
のブート処理のステップ611の処理の中で、図13に
示したマルチOSを実施する処理(ステップ1301か
ら1306)を実行することによって、第一のOSが立
ち上がった時点で、第二のOSのローディングが可能な
状態になる。この実施形態においても、図15、図1
6、図17、図18、図19に示した処理手順は変更す
ることはない。これにより、1台の計算機で、自オペレ
ーティングシステム以外のオペレーティングシステムを
同時に動作させることができるオペレーティングシステ
ムを実現し、複数のオペレーティングシステムを同時に
動作させることができる。
In the above-described embodiment, the function of operating a plurality of operating systems on one computer is implemented by a device driver called a multi-OS driver. However, the function is loaded into the operating system loaded by the boot process of the computer. It is also possible to incorporate a function for implementing a multi-OS. In this embodiment, FIG.
By executing the process (steps 1301 to 1306) for executing the multi-OS shown in FIG. 13 in the process of step 611 of the boot process of the second OS, when the first OS starts up, the second OS Loading is enabled. Also in this embodiment, FIGS.
6, the processing procedures shown in FIGS. 17, 18 and 19 are not changed. As a result, an operating system capable of operating an operating system other than the own operating system simultaneously on one computer is realized, and a plurality of operating systems can be operated simultaneously.

【0158】[0158]

【発明の効果】以上説明した実施形態によれば、特別な
ハードウェアの支援なしで、1台の計算機で複数のオペ
レーティングシステムを同時に動作できる。第一のOS
に欠けている機能を容易に導入することができ、さら
に、その機能を第一のOSとはまったく独立して動作さ
せることができる。
According to the embodiment described above, a plurality of operating systems can be operated simultaneously by one computer without special hardware support. First OS
Can be easily introduced, and the function can be operated completely independently of the first OS.

【0159】また、マルチOSを実施する機能をデバイ
スドライバとして実現することにより、第一のOSの処
理を変更することがないため、既存のオペレーティング
システムに対して容易に機能を追加できる。さらに、1
台の計算機で複数のオペレーティングシステムを同時に
動作させた環境で、1つのオペレーティングシステムは
他のオペレーティングシステムの障害を監視することが
でき、監視オペレーティングシステムが被監視オペレー
ティングシステムの障害診断や障害回復を行うことによ
って、計算機全体の信頼性および保守性を向上されるこ
とができる。
Further, by realizing the function of executing the multi-OS as a device driver, the processing of the first OS is not changed, so that the function can be easily added to the existing operating system. In addition, 1
In an environment in which a plurality of operating systems are simultaneously operated on one computer, one operating system can monitor the failure of another operating system, and the monitoring operating system diagnoses and recovers from the failure of the monitored operating system. Thereby, the reliability and maintainability of the entire computer can be improved.

【0160】さらにまた、ハードウェアデバイスが使用
する割り込み資源を、複数のオペレーティングシステム
間で動的に割り当てることによって、1つのオペレーテ
ィングシステムに割り当てたハードウェアデバイスを、
該オペレーティングシステムが利用終了後、他のオペレ
ーティングシステムが利用することが可能になる。
Furthermore, by dynamically allocating an interrupt resource used by a hardware device among a plurality of operating systems, the hardware device allocated to one operating system can be
After the use of this operating system is completed, another operating system can use it.

【0161】[0161]

【発明の効果】本発明によれば、特別なハードウェアを
用いる必要なく、また、入出力処理等の特権命令のエミ
ュレーションを行うことなく1台の計算機上で複数のオ
ペレーティングシステムを同時、並列的に動作させるこ
とができる。
According to the present invention, a plurality of operating systems can be run simultaneously and in parallel on a single computer without using special hardware and without emulating privileged instructions such as input / output processing. Can be operated.

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

【図1】本発明の一実施形態における計算機構成を示す
ブロック図である。
FIG. 1 is a block diagram showing a computer configuration according to an embodiment of the present invention.

【図2】計算機構成を示す模式図である。FIG. 2 is a schematic diagram showing a computer configuration.

【図3】ページテーブルの構成を示す図である。FIG. 3 is a diagram showing a configuration of a page table.

【図4】割り込みテーブルの構成を示す図である。FIG. 4 is a diagram showing a configuration of an interrupt table.

【図5】割り込み制御装置の構成を示す図である。FIG. 5 is a diagram illustrating a configuration of an interrupt control device.

【図6】計算機のブート処理手順を示すフローチャート
である。
FIG. 6 is a flowchart illustrating a boot processing procedure of the computer.

【図7】第一のOSのカーネル構成情報ファイルの構成
を示す図である。
FIG. 7 is a diagram illustrating a configuration of a kernel configuration information file of a first OS.

【図8】カーネル起動パラメータのデータ構造を示す図
である。
FIG. 8 is a diagram showing a data structure of a kernel startup parameter.

【図9】第一のOSのデバイス管理テーブルのデータ構
造を示す図である。
FIG. 9 is a diagram illustrating a data structure of a device management table of the first OS.

【図10】オペレーティングシステムのデバイスドライ
バのロード処理手順を示すフローチャートである。
FIG. 10 is a flowchart illustrating a procedure for loading a device driver of the operating system.

【図11】オペレーティングシステムのデバイスドライ
バのアンロード処理手順を示すフローチャートである。
FIG. 11 is a flowchart illustrating a procedure for unloading a device driver of the operating system.

【図12】マルチOSドライバの処理構造を示す図であ
る。
FIG. 12 is a diagram illustrating a processing structure of a multi-OS driver.

【図13】マルチOSドライバのロード処理手順のフロ
ーチャートである。
FIG. 13 is a flowchart of a multi-OS driver load processing procedure.

【図14】仮想アドレス空間と主記憶装置102の物理
メモリの対応を示す図である。
FIG. 14 is a diagram showing the correspondence between the virtual address space and the physical memory of the main storage device 102;

【図15】第二のOSのロード処理手順を示すフローチ
ャートである。
FIG. 15 is a flowchart illustrating a load processing procedure of a second OS.

【図16】第一のOSと第二のOSが共有するデータ構
造を示す図である。
FIG. 16 is a diagram illustrating a data structure shared by a first OS and a second OS.

【図17】実行OSの切り替え処理手順を示すフローチ
ャートである。
FIG. 17 is a flowchart illustrating a procedure for switching an execution OS.

【図18】割り込み処理手順を示すフローチャートであ
る。
FIG. 18 is a flowchart illustrating an interrupt processing procedure.

【図19】第2のOSに監視機能を付加するための、第
二のOSのロード処理手順を示すフローチャートであ
る。
FIG. 19 is a flowchart illustrating a load processing procedure of a second OS for adding a monitoring function to the second OS.

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

100・・・計算機 101・・・プロセッサ 102・・・主記憶装置 103・・・演算装置 104・・・割り込みテーブルレジスタ 105・・・ページテーブルレジスタ 106・・・アドレス変換装置 107・・・割り込みテーブル 108・・・ページテーブル 109・・・バス 110・・・信号線 111・・・クロック割り込み生成器 112・・・割り込みコントローラ 113・・・キーボード 114・・・ディスプレイ 115・・・磁気ディスク 116、117・・・外部機器 118・・・記憶装置 119・・・割り込みバス 100: Computer 101: Processor 102: Main storage device 103: Arithmetic device 104: Interrupt table register 105: Page table register 106: Address conversion device 107: Interrupt table 108: page table 109: bus 110: signal line 111: clock interrupt generator 112: interrupt controller 113: keyboard 114: display 115: magnetic disk 116, 117 ... External equipment 118 ... Storage device 119 ... Interrupt bus

───────────────────────────────────────────────────── フロントページの続き (72)発明者 佐藤 雅英 神奈川県川崎市麻生区王禅寺1099番地 株 式会社日立製作所システム開発研究所内 (72)発明者 梅都 利和 愛知県尾張旭市晴丘町池上1番地 株式会 社日立製作所情報機器事業部内 Fターム(参考) 5B042 GA22 GA23 GA25 GC07 GC12 JJ01 JJ05 5B076 AA13 AA14 AB14 CA08 5B098 BA06 BB11 EE02 EE06 GA02 GC01 GD02 GD20 GD22 HH04 HH07 JJ08  ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Masahide Sato 1099 Ozenji Temple, Aso-ku, Kawasaki City, Kanagawa Prefecture Inside System Development Laboratory, Hitachi, Ltd. F-term in the Information Technology Division of Hitachi, Ltd. (reference) 5B042 GA22 GA23 GA25 GC07 GC12 JJ01 JJ05 5B076 AA13 AA14 AB14 CA08 5B098 BA06 BB11 EE02 EE06 GA02 GC01 GD02 GD20 GD22 HH04 HH07 JJ08

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】計算機システムにおけるオペレーティング
システムの制御方法において、計算機のハードウェア資
源を第一のオペレーティングシステムの管理対象から外
して他のオペレーティングシステムに与える手順と、複
数のオペレーティングシステムで共有する領域に配置し
た共通の処理手順とデータを有し、前記共通処理手順の
割り込み処理部が各オペレーティングシステムの実行を
スケジュールすることにより、各オペレーティングシス
テムが実行する特権命令のエミュレート処理なしで、複
数のオペレーティングシステムを一台の計算機で動作さ
せるようにしたマルチOSの構成方法において、複数の
オペレーティングシステムで共有する領域に配置した共
通の処理手順を第一のオペレーティングシステムのデバ
イスドライバとして組み込む手順と、該デバイスドライ
バが第一のオペレーティングシステムの割り込み処理部
から前記共通処理手順の割り込み処理部へ制御を切り替
える手順と、該デバイスドライバが第二のオペレーティ
ングシステムをロードして第一のオペレーティングシス
テムとは別の仮想アドレス空間で第二のオペレーティン
グシステムを起動する手順とを有し、前記共通処理手順
の割り込み処理部が各オペレーティングシステムの実行
をスケジュールすることにより、第一のオペレーティン
グシステムの処理手順を変更することなしに、複数のオ
ペレーティングシステムを一台の計算機で動作させるこ
とを特徴とするマルチOS構成方法。
1. A method for controlling an operating system in a computer system, wherein a procedure for excluding hardware resources of the computer from a management target of the first operating system to another operating system and an area shared by a plurality of operating systems are provided. With the common processing procedure and data arranged, the interrupt processing unit of the common processing procedure schedules execution of each operating system, so that a plurality of operating systems can be executed without emulating privileged instructions executed by each operating system. In a multi-OS configuration method in which a system is operated by one computer, a common processing procedure arranged in an area shared by a plurality of operating systems is used as a device driver of a first operating system. An incorporation procedure, a procedure in which the device driver switches control from an interrupt processing unit of the first operating system to an interrupt processing unit in the common processing procedure, and a step in which the device driver loads the second operating system and executes the first operating system. Starting the second operating system in a virtual address space different from the system, and the interrupt processing unit of the common processing procedure schedules the execution of each operating system, thereby executing the processing of the first operating system. A multi-OS configuration method characterized by operating a plurality of operating systems on one computer without changing the procedure.
【請求項2】請求項1記載のマルチOS構成方法におい
て、1つのオペレーティングシステムが使用する割り込
み資源を他のオペレーティングシステムがアクセスでき
ないようにするため、1つのオペレーティングシステム
が割り込み資源を必要とする時点で、他のオペレーティ
ングシステムに対しアクセスできないように予約するこ
とを特徴とするマルチOS構成方法。
2. The multi-OS configuration method according to claim 1, wherein one operating system requires an interrupt resource to prevent another operating system from accessing an interrupt resource used by one operating system. And making a reservation so that other operating systems cannot be accessed.
【請求項3】請求項1記載のマルチOS構成方法におい
て、1つのオペレーティングシステムに割り込み資源を
割り当て後、該オペレーティングシステムが割り込み資
源を必要としなくなった時点で、他のオペレーティング
システムが該割り込み資源を利用できるようにするた
め、他のオペレーティングシステムの割り込み資源の予
約を解除することを特徴とするマルチOS構成方法。
3. The multi-OS configuration method according to claim 1, wherein after assigning an interrupt resource to one operating system, another operating system assigns the interrupt resource when the operating system no longer needs the interrupt resource. A multi-OS configuration method, which releases reservation of an interrupt resource of another operating system so that it can be used.
【請求項4】請求項1記載のマルチOS構成方法におい
て、複数のオペレーティングシステムで共有する領域に
配置した共通処理手順及び共通データのアドレスを、す
べてのオペレーティングシステムの仮想アドレス空間上
で一致させる手順を有することを特徴とするマルチOS
構成方法。
4. A multi-OS configuration method according to claim 1, wherein a common processing procedure and a common data address arranged in an area shared by a plurality of operating systems are matched in a virtual address space of all operating systems. Multi-OS characterized by having
Configuration method.
【請求項5】請求項1記載のマルチOS構成方法におい
て、被監視オペレーティングシステムの関数群のアドレ
ス情報を取得する手順と、アドレス情報からオペレーテ
ィングシステム内で障害発生時にコールされるエラー関
数のアドレスを抽出する手順と、抽出したエラー関数の
アドレスに割り込み発生命令を書きこむ手順と、該割り
込みが発生したとき、複数のオペレーティングシステム
で共有する領域に配置した共通処理手順の割り込み処理
部が監視オペレーティングシステムに通知する手順と、
通知によって該監視オペレーティングシステムが被監視
オペレーティングシステムの障害診断あるいは障害回復
処理を行う手順を有することを特徴とするマルチOS構
成方法。
5. The multi-OS configuration method according to claim 1, further comprising: a step of acquiring address information of a function group of the monitored operating system; A procedure for extracting, a procedure for writing an interrupt generation instruction at an address of the extracted error function, and, when the interrupt occurs, an interrupt processing unit of a common processing procedure arranged in an area shared by a plurality of operating systems, Steps to notify
A method for configuring a multi-OS, comprising a procedure for performing a fault diagnosis or a fault recovery process of a monitored operating system by the monitored operating system by notification.
JP2000052108A 1997-09-12 2000-02-23 Method for constituting multi-os Pending JP2001236237A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2000052108A JP2001236237A (en) 2000-02-23 2000-02-23 Method for constituting multi-os
US09/649,958 US6996828B1 (en) 1997-09-12 2000-08-29 Multi-OS configuration method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000052108A JP2001236237A (en) 2000-02-23 2000-02-23 Method for constituting multi-os

Publications (1)

Publication Number Publication Date
JP2001236237A true JP2001236237A (en) 2001-08-31

Family

ID=18573676

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000052108A Pending JP2001236237A (en) 1997-09-12 2000-02-23 Method for constituting multi-os

Country Status (1)

Country Link
JP (1) JP2001236237A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005332030A (en) * 2004-05-18 2005-12-02 Mitsubishi Electric Corp Controller
US7000153B2 (en) 2001-06-05 2006-02-14 Hitachi, Ltd. Computer apparatus and method of diagnosing the computer apparatus and replacing, repairing or adding hardware during non-stop operation of the computer apparatus
US7363524B2 (en) 2002-05-01 2008-04-22 Fujitsu Limited System for executing prescribed process during operating system is in sleep state using information stored in common area
JP2008251000A (en) * 2007-03-16 2008-10-16 Symantec Corp Failsafe computer support assistant
US7448050B2 (en) 2002-11-18 2008-11-04 Arm Limited Handling multiple interrupts in a data processing system utilising multiple operating systems
WO2009113394A1 (en) * 2008-03-14 2009-09-17 三菱電機株式会社 Multi-operating system (os) start device, multi-os start program, recording medium, and multi-os start method
JP2011526714A (en) * 2008-07-02 2011-10-13 ヒューレット・パッカード・カンパニー Memory management for hypervisor loading
US8843742B2 (en) 2008-08-26 2014-09-23 Hewlett-Packard Company Hypervisor security using SMM

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7000153B2 (en) 2001-06-05 2006-02-14 Hitachi, Ltd. Computer apparatus and method of diagnosing the computer apparatus and replacing, repairing or adding hardware during non-stop operation of the computer apparatus
US7363524B2 (en) 2002-05-01 2008-04-22 Fujitsu Limited System for executing prescribed process during operating system is in sleep state using information stored in common area
US7448050B2 (en) 2002-11-18 2008-11-04 Arm Limited Handling multiple interrupts in a data processing system utilising multiple operating systems
JP4558376B2 (en) * 2004-05-18 2010-10-06 三菱電機株式会社 controller
JP2005332030A (en) * 2004-05-18 2005-12-02 Mitsubishi Electric Corp Controller
JP2008251000A (en) * 2007-03-16 2008-10-16 Symantec Corp Failsafe computer support assistant
WO2009113394A1 (en) * 2008-03-14 2009-09-17 三菱電機株式会社 Multi-operating system (os) start device, multi-os start program, recording medium, and multi-os start method
JPWO2009113394A1 (en) * 2008-03-14 2011-07-21 三菱電機株式会社 Multi-operating system (OS) booting apparatus, multi-OS booting program, recording medium, and multi-OS booting method
US8484452B2 (en) 2008-03-14 2013-07-09 Mitsubishi Electric Corporation Multi-operating system (OS) booting apparatus, multi-OS booting program, recording medium, and multi-OS booting method
KR101288700B1 (en) * 2008-03-14 2013-08-23 미쓰비시덴키 가부시키가이샤 Multi-operating system(os) start device, computer-readable recording medium, and multi-os start method
JP2011526714A (en) * 2008-07-02 2011-10-13 ヒューレット・パッカード・カンパニー Memory management for hypervisor loading
US9286080B2 (en) 2008-07-02 2016-03-15 Hewlett-Packard Development Company, L.P. Memory management for hypervisor loading
US8843742B2 (en) 2008-08-26 2014-09-23 Hewlett-Packard Company Hypervisor security using SMM

Similar Documents

Publication Publication Date Title
JP3546678B2 (en) Multi-OS configuration method
US6996828B1 (en) Multi-OS configuration method
US6711605B2 (en) Multi OS configuration method and computer system
US9396013B2 (en) Method for controlling a virtual machine and a virtual machine system
US9304794B2 (en) Virtual machine control method and virtual machine system using prefetch information
JP5018252B2 (en) How to change device allocation
US5706514A (en) Distributed execution of mode mismatched commands in multiprocessor computer systems
US7412702B1 (en) System software displacement in a virtual computer system
US20040205755A1 (en) Operating systems
JPH1124943A (en) Computer restarting method and computer stopping method
JP2015503784A (en) Migration between virtual machines in the graphics processor
JP2001256066A (en) Computer system, switching system of operating system, mounting method of operating system, switching method of operating system, storage medium and program transmitter
JP2000330806A (en) Computer system
US20100332722A1 (en) Virtual machine system and control method thereof
US20230205713A1 (en) Computer device, exception processing method, and interrupt processing method
JP4026667B2 (en) Multi-OS configuration method
JP2001236237A (en) Method for constituting multi-os
JP2005122334A (en) Memory dump method, memory dumping program and virtual computer system
JP4316882B2 (en) System and method for logical replacement of processor control in an emulated computing environment
JP2000259434A (en) Logical interval type computer system
JP2001216172A (en) Multi-os constituting method
CN114253681A (en) Interrupt registration and sharing management method and electronic equipment
JP2001290678A (en) Asynchronous memory dump executing system
JPH0552535B2 (en)
JP2004038995A (en) Multiple operation system configuration method

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20051214

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060308

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060322

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060518

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20060523

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061107

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070109

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070626