JP2004171477A - Multi-operating system control method, program for executing this method by computer and multi-operating system control device - Google Patents

Multi-operating system control method, program for executing this method by computer and multi-operating system control device Download PDF

Info

Publication number
JP2004171477A
JP2004171477A JP2002339499A JP2002339499A JP2004171477A JP 2004171477 A JP2004171477 A JP 2004171477A JP 2002339499 A JP2002339499 A JP 2002339499A JP 2002339499 A JP2002339499 A JP 2002339499A JP 2004171477 A JP2004171477 A JP 2004171477A
Authority
JP
Japan
Prior art keywords
operating system
access
switching
interrupt
memory space
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.)
Granted
Application number
JP2002339499A
Other languages
Japanese (ja)
Other versions
JP3863094B2 (en
Inventor
Hideo Taniguchi
秀夫 谷口
Yoshinari Nomura
能成 乃村
Kenichi Ito
健一 伊藤
Yusaku Nakajima
雄作 中島
Masaki Tabuchi
正樹 田渕
Kei Masumoto
圭 桝本
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.)
NTT Data Group Corp
Original Assignee
NTT Data Corp
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 NTT Data Corp filed Critical NTT Data Corp
Priority to JP2002339499A priority Critical patent/JP3863094B2/en
Publication of JP2004171477A publication Critical patent/JP2004171477A/en
Application granted granted Critical
Publication of JP3863094B2 publication Critical patent/JP3863094B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To improve reliability and processing capacity of a multi-operating system. <P>SOLUTION: A switching command A for switching to OS20<SB>2</SB>from OS20<SB>1</SB>is virtually stored in a logical address N of a virtual memory space 40<SB>1</SB>corresponding to the OS20<SB>1</SB>, and various commands are virtually stored on and after a logical address N + 1 of a virtual memory space 40<SB>2</SB>corresponding to the OS20<SB>2</SB>. Among a plurality of access destinations (an I/O port) in the OS20<SB>1</SB>, an access destination (an I/O port : for example, a LAN card) used as a trigger for switching the operating system is set to access prohibition. The OS20<SB>1</SB>is switched to the OS20<SB>2</SB>from the OS20<SB>1</SB>by the switching command A with this access as a trigger when the OS20<SB>1</SB>tries to make access to the access destination prohibited from access, and the OS20<SB>2</SB>executes the various commands on and after the logical address N + 1 of the virtual memory space 40<SB>2</SB>. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は、一台の計算機上で複数のオペレーティングシステムを稼動させるためのマルチオペレーティングシステム制御方法、およびその方法をコンピュータに実行させるプログラム、ならびにマルチオペレーティングシステム制御装置に関するものであり、特に、信頼性、処理能力を向上させることができるマルチオペレーティングシステム制御方法、およびその方法をコンピュータに実行させるプログラム、ならびにオペレーティングシステム制御装置に関するものである。
【0002】
【従来の技術】
通常の計算機では、1つのオペレーティングシステムが動作し、それが計算機のプロセッサ、メモリ、二次記憶装置等の計算機資源を管理し、計算機が効率良く動作できるように資源スケジュールを実施している。オペレーティングシステムには、様々な種類がある。バッチ処理に優れるものや、TSS(Time Sharing System)に優れるもの、GUI(Graphical User Interface)に優れているものなど様々である。
【0003】
一方で、これら複数あるオペレーティングシステムを1台の計算機で同時に実行したいというニーズがある。例えば、大型計算機においては、実際の業務に伴うオンライン処理を実行するオペレーティングシステムと、開発用のオペレーティングシステムとを一台の計算機で動作させたいという要求がある。あるいは、GUIの整っているオペレーティングシステムと、実時間性に優れているオペレーティングシステムとを同時に稼働させたい等という要求もある。
【0004】
しかしながら、個々のオペレーティングシステムは、単独で計算機資源の管理を実施することを前提として設計されている。従って、複数のオペレーティングシステムの共存は、何らかの機構なしには不可能である。
【0005】
一台の計算機上で複数のオペレーティングシステムを動作させる機構としては、大型計算機で実現されている仮想計算機方式がある。図23は、上記仮想計算機方式による従来のマルチオペレーティングシステムの構成例1を示すブロック図である。
【0006】
同図に示したマルチオペレーティングシステムは、ハードウェア1、基盤OS2、VM(Virtual Machine)モニタ3、仮想OS(オペレーティングシステム)4、仮想OS4および仮想OS4から構成されている。
【0007】
ハードウェア1は、CPU(Central Processing Unit)、物理メモリ、入出力機器等である。基盤OS2およびVMモニタ3は、ハードウェア1の全てを制御している。VMモニタ3は、仮想OS4〜4 のそれぞれのハードウェア1に対するインタフェースをエミュレートする。仮想OS4〜4 は、基盤OS2の上で走行する。すなわち、基盤OS2と仮想OS4〜4 とは、主従関係にある。
【0008】
また、一台の計算機で複数のオペレーティングシステムのインタフェースを提供する技術として、マイクロカーネル方式がある。図24は、上記マイクロカーネル方式による従来のマルチオペレーティングシステムの構成例2を示すブロック図である。
【0009】
同図に示したマルチオペレーティングシステムは、ハードウェア5、マイクロカーネル(制御プログラム)6、OS7、OS7およびOS7から構成されている。
【0010】
マイクロカーネル方式では、マイクロカーネル6の上に、ユーザに見せるオペレーティングシステム機能を提供するOS7〜7 が構築されている。ユーザはOS7〜7 を経由してハードウェア5(計算機資源)を利用する。マイクロカーネル6は、OS7〜7 を制御する。
【0011】
【特許文献1】
特開2001−21672号公報
【特許文献2】
特開平11−149385号公報
【特許文献3】
特開2000−330806号公報
【特許文献4】
特開2001−175486号公報
【0012】
【発明が解決しようとする課題】
ところで、前述したように、図23に示した従来のマルチオペレーティングシステムにおいては、ハードウェア1を一つの基盤OS2が制御しているため、基盤OS2の停止により、システムダウンが生じ、信頼性が低いという問題があった。
【0013】
また、同マルチオペレーティングシステムにおいては、VMモニタ3により仮想OS4〜4 のインタフェースをエミュレートしているため、エミュレートに処理時間がかかり、動作不具合や制限事項が多いという処理能力の問題があった。
【0014】
ここで、基盤OS2を改造することにより、上記動作不具合や制限事項が少なくなるが、汎用性が低下したり、改造の手間がかかるというデメリットが生じる。
【0015】
また、図24に示した従来のマルチオペレーティングシステムにおいては、一つのマイクロカーネル6がOS7〜7を制御しているため、マイクロカーネル6の停止により、システムダウンが生じ、信頼性が低いという問題があった。
【0016】
本発明は、上記に鑑みてなされたもので、マルチオペレーティングシステムの信頼性、処理能力を向上させることができるマルチオペレーティングシステム制御方法、およびその方法をコンピュータに実行させるプログラム、ならびにマルチオペレーティングシステム制御装置を提供することを目的とする。
【0017】
【課題を解決するための手段】
上記目的を達成するために、本発明にかかるマルチオペレーティングシステム制御方法にあっては、前記第1のオペレーティングシステムから前記第2のオペレーティングシステムへ切り替えるための第1の切替命令を、前記第1のオペレーティングシステムに対応する第1の仮想メモリ空間の論理アドレスNに仮想記憶させる第1の仮想記憶工程と、前記第2のオペレーティングシステムに対応する第2の仮想メモリ空間の論理アドレスN+1以降に各種命令を仮想記憶させる第2の仮想記憶工程と、前記第1のオペレーティングシステムにおける複数のアクセス先のうち、オペレーティングシステム切り替えのトリガーとするアクセス先をアクセス禁止に設定するアクセス禁止設定工程と、を含み、前記第1のオペレーティングシステムは、前記第1のオペレーティングシステムが、アクセス禁止されている前記アクセス先へアクセスしようとした場合、これをトリガーとして、前記第1の切替命令により、前記第1のオペレーティングシステムから前記第2のオペレーティングシステムに切り替え、前記第2のオペレーティングシステムは、前記第2の仮想メモリ空間の論理アドレスN+1以降の前記各種命令を実行することを特徴とする。
【0018】
この発明によれば、第1のオペレーティングシステムに対応する第1の仮想メモリ空間の論理アドレスNに第1の切替命令を仮想記憶させ、第2の仮想メモリ空間の論理アドレスN+1以降に各種命令を仮想記憶させておき、さらに、第1のオペレーティングシステムにおける複数のアクセス先のうち、オペレーティングシステム切り替えのトリガーとするアクセス先をアクセス禁止に設定し、第1のオペレーティングシステムが、アクセス禁止されているアクセス先へアクセスしようとした場合、これをトリガーとして、第1の切替命令により、第1のオペレーティングシステムから第2のオペレーティングシステムに切り替え、第2のオペレーティングシステムが、第2の仮想メモリ空間の論理アドレスN+1以降の各種命令を実行することとしたので、従来の基盤OSやVMモニタ等の共通部分が不要で、オペレーティングシステムの信頼性、処理能力を向上させることができる。
【0019】
また、本発明によれば、従来の共通部分が不要であるため、第1のオペレーティングシステムと第2のオペレーティングシステムとを独立的に動作させることができ、セキュリティを向上させることができる。
【0020】
つぎの発明にかかるマルチオペレーティングシステム制御方法にあっては、前記第2の仮想記憶工程では、前記第2のオペレーティングシステムから前記第1のオペレーティングシステムへ切り替えるための第2の切替命令を、前記第2の仮想メモリ空間の論理アドレスNに仮想記憶させ、前記第1のオペレーティングシステムは、アクセス禁止されている前記アクセス先へアクセスしようとした場合をトリガーとして、前記第1の切替命令により、前記第1のオペレーティングシステムから前記第2のオペレーティングシステムに切り替え、前記第2のオペレーティングシステムは、前記第2の仮想メモリ空間の論理アドレスN+1以降の前記各種命令を実行した後、前記第2の切替命令により、前記第2のオペレーティングシステムから前記第1のオペレーティングシステムに切り替えることを特徴とする。
【0021】
この発明によれば、第2の仮想メモリ空間の論理アドレスNに第2の切替命令を仮想記憶させ、第1の切替命令により切り替えが行われてから、第2のオペレーティングシステムが、第2の仮想メモリ空間の論理アドレスN+1以降の各種命令を実行した後、第2の切替命令により、第2のオペレーティングシステムから第1のオペレーティングシステムに切り替えることとしたので、切り替えおよび切り戻しを円滑に行うことができる。
【0022】
つぎの発明にかかるマルチオペレーティングシステム制御方法にあっては、前記第2のオペレーティングシステムは、前記第2の切替命令により切り替えを実行する前に、前記アクセス先に所定の処理を実行させることを特徴とする。
【0023】
この発明によれば、第2の切替命令により切り替えを実行する前に、第2のオペレーティングシステムがアクセス先に所定の処理を実行させることとしたので、第1のオペレーティングシステムへの不正攻撃を防止することができる。
【0024】
つぎの発明にかかるマルチオペレーティングシステム制御方法にあっては、前記アクセス先は、I/Oポートであることを特徴とする。
【0025】
この発明によれば、アクセス先をI/Oポートとしたので、第1のオペレーティングシステムへの不正攻撃を防止することができる。
【0026】
つぎの発明にかかるマルチオペレーティングシステム制御方法にあっては、アクセス禁止されている前記アクセス先は、データ通信を行うデータ通信ポートであることを特徴とする。
【0027】
この発明によれば、アクセス禁止されているアクセス先を、データ通信を行うデータ通信ポートとしたので、データ通信を介しての第1のオペレーティングシステムへの不正攻撃を防止することができる。
【0028】
つぎの発明にかかるマルチオペレーティングシステム制御方法にあっては、前記第1の仮想記憶工程では、前記第1の仮想メモリ空間の論理アドレスNの前後に割り込み禁止命令および割り込み許可命令を仮想記憶させることを特徴とする。
【0029】
この発明によれば、第1の仮想メモリ空間の論理アドレスNの前後に割り込み禁止命令および割り込み許可命令を仮想記憶させることとしたので、第1のオペレーティングシステム側での多重割り込みを回避することができる。
【0030】
つぎの発明にかかるマルチオペレーティングシステム制御方法にあっては、前記第2の仮想記憶工程では、前記第2の仮想メモリ空間の論理アドレスNの前後に割り込み禁止命令および割り込み許可命令を仮想記憶させることを特徴とする。
【0031】
この発明によれば、第2の仮想メモリ空間の論理アドレスNの前後に割り込み禁止命令および割り込み許可命令を仮想記憶させることとしたので、第2のオペレーティングシステム側での多重割り込みを回避することができる。
【0032】
つぎの発明にかかるプログラムは、上記の発明のいずれか一つに記載されたマルチオペレーティングシステム制御方法をコンピュータに実行させるプログラムであり、そのプログラムがコンピュータ読み取り可能となり、これによって、上記の発明のいずれか一つの動作をコンピュータによって実行することができる。
【0033】
つぎの発明にかかるマルチオペレーティングシステム制御装置にあっては、一つの計算機で稼動する第1のオペレーティングシステムおよび第2のオペレーティングシステムを制御するマルチオペレーティングシステム制御装置であって、前記第1のオペレーティングシステムから前記第2のオペレーティングシステムへ切り替えるための第1の切替命令を、前記第1のオペレーティングシステムに対応する第1の仮想メモリ空間の論理アドレスNに仮想記憶する第1の仮想記憶空間と、前記第2のオペレーティングシステムに対応する第2の仮想メモリ空間の論理アドレスN+1以降に各種命令を仮想記憶する第2の仮想記憶空間と、前記第1のオペレーティングシステムにおける複数のアクセス先のうち、オペレーティングシステム切り替えのトリガーとするアクセス先をアクセス禁止に設定するアクセス禁止設定手段と、を備え、前記第1のオペレーティングシステムは、前記第1のオペレーティングシステムが、アクセス禁止されている前記アクセス先へアクセスしようとした場合、これをトリガーとして、前記第1の切替命令により、前記第1のオペレーティングシステムから前記第2のオペレーティングシステムに切り替え、前記第2のオペレーティングシステムは、前記第2の仮想メモリ空間の論理アドレスN+1以降の前記各種命令を実行することを特徴とする。
【0034】
この発明によれば、第1のオペレーティングシステムに対応する第1の仮想メモリ空間の論理アドレスNに第1の切替命令を仮想記憶させ、第2の仮想メモリ空間の論理アドレスN+1以降に各種命令を仮想記憶させておき、さらに、第1のオペレーティングシステムにおける複数のアクセス先のうち、オペレーティングシステム切り替えのトリガーとするアクセス先をアクセス禁止に設定し、第1のオペレーティングシステムが、アクセス禁止されているアクセス先へアクセスしようとした場合、これをトリガーとして、第1の切替命令により、第1のオペレーティングシステムから第2のオペレーティングシステムに切り替え、第2のオペレーティングシステムが、第2の仮想メモリ空間の論理アドレスN+1以降の各種命令を実行することとしたので、従来の基盤OSやVMモニタ等の共通部分が不要で、オペレーティングシステムの信頼性、処理能力を向上させることができる。
【0035】
また、この発明によれば、従来の共通部分が不要であるため、第1のオペレーティングシステムと第2のオペレーティングシステムとを独立的に動作させることができ、セキュリティを向上させることができる。
【0036】
つぎの発明にかかるマルチオペレーティングシステム制御装置にあっては、前記第2の仮想記憶空間の論理アドレスNには、前記第2のオペレーティングシステムから前記第1のオペレーティングシステムへ切り替えるための第2の切替命令が仮想記憶され、前記第1のオペレーティングシステムは、アクセス禁止されている前記アクセス先へアクセスしようとした場合をトリガーとして、前記第1の切替命令により、前記第1のオペレーティングシステムから前記第2のオペレーティングシステムに切り替え、前記第2のオペレーティングシステムは、前記第2の仮想メモリ空間の論理アドレスN+1以降の前記各種命令を実行した後、前記第2の切替命令により、前記第2のオペレーティングシステムから前記第1のオペレーティングシステムに切り替えることを特徴とする。
【0037】
この発明によれば、第2の仮想メモリ空間の論理アドレスNに第2の切替命令を仮想記憶させ、第1の切替命令により切り替えが行われてから、第2のオペレーティングシステムが、第2の仮想メモリ空間の論理アドレスN+1以降の各種命令を実行した後、第2の切替命令により、第2のオペレーティングシステムから第1のオペレーティングシステムに切り替えることとしたので、切り替えおよび切り戻しを円滑に行うことができる。
【0038】
【発明の実施の形態】
以下、図面を参照して本発明にかかるマルチオペレーティングシステム制御方法、およびその方法をコンピュータに実行させるプログラム、ならびにマルチオペレーティングシステム制御装置の一実施の形態について詳細に説明する。
【0039】
図1は、本発明にかかる一実施の形態の概略構成を示すブロック図である。この図に示したマルチオペレーティングシステムは、ハードウェア10、OS20、OS20およびAP(アプリケーションプログラム)30〜30、仮想LAN(Local Area Network)デバイスドライバ50、LANデバイスドライバ50および共有メモリ領域60から構成されている。
【0040】
同マルチオペレーティングシステムでは、OS20からOS20へ、またはOS20からOS20への切り替えが割り込み処理ルーチンの中で実行される。割り込みの発生要因としては、マルチオペレーティングシステムにおけるI/O(Input/Output)ポートのうちLANカード17に対応するI/Oポートをアクセス禁止に予め設定しておき、同I/Oポートにアクセスがあった場合に発生する一般保護例外(例えば、米国インテル社のIA−32インテル(登録商標)のアーキテクチャでは、0x0D)が挙げられる。LANカード17は、LAN70に接続されており、ネットワークインターフェースカードである。
【0041】
ここで、同マルチオペレーティングシステムでは、OS20がデータをLANカード17経由でLAN70へ送信する場合に、上記一般保護例外を発生させ、OS20からOS20へ切り替え、ファイアウォールとしての機能を持たせたOS20からLANカード17経由でLAN70へデータを送信するというOS切替制御が行われる。
【0042】
また、OS20がデータをLANカード17経由で受信する場合には、上記一般保護例外を発生させ、OS20からOS20へ切り替え、ファイアウォールとしての機能を持たせたOS20の下で、LANカード17でデータを受信し、該データをOS20へ渡すというOS切替制御が行われる。
【0043】
図2は、一実施の形態の具体的構成を示すブロック図である。この図において、図1の各部に対応する部分には同一の符号を付ける。同図において、ハードウェア10は、計算機資源であり、制御部11、物理メモリ12、割り込みベクタテーブルレジスタ13、ページテーブルレジスタ14、その他レジスタ15、プログラムカウンタ16、LANカード17や、図示しないキーボード、ディスプレイ等から構成されている。
【0044】
ハードウェア10には、マルチ構成のOS20およびOS20が存在している。OS20およびOS20のそれぞれは、ハードウェア10の計算機資源を管理し、割り込み処理ルーチンの中で切り替えられる。すなわち、ある時間を考えると、ハードウェア10は、一つのOS(OS20またはOS20)により占有される。
【0045】
OS20 は、割り込み振分処理部21、割り込み処理部22 、割り込みベクタテーブル23 、ページテーブル24 、レジスタ退避領域25 、I/O許可ビットマップ26、カーネルスタック27 等から構成されている。AP30およびAP30は、OS20上で走行するアプリケーションプログラムである。
【0046】
一方、OS20 は、OS20に併設されており、割り込み振分処理部21、割り込み処理部22 、割り込みベクタテーブル23 、ページテーブル24 、レジスタ退避領域25 、I/O許可ビットマップ26、カーネルスタック27等から構成されている。AP30およびAP30は、OS20上で走行するアプリケーションプログラムである。
【0047】
ハードウェア10において、制御部11は、CPU等であり、プログラム実行により各部を制御する。物理メモリ12は、物理的に実在する大容量の記憶装置であり、図4(a)に示したように、仮想記憶制御方式に用いられ、各種命令やデータ等を実際に記憶する。
【0048】
すなわち、一実施の形態においては、物理メモリ12に対応して、仮想メモリ空間40および仮想メモリ空間40が仮想的に構築されている。仮想メモリ空間40は、OS20側に対応して設けられており、物理メモリ12のOS用物理メモリ領域12a およびAP用物理メモリ領域12bにマッピングされている。
【0049】
具体的には、OS用仮想メモリ空間40aは、OS20で利用されるメモリ空間であり、OS用物理メモリ領域12aにマッピングされている。AP用仮想メモリ空間40b は、AP30およびAP30で利用されるメモリ空間であり、AP用物理メモリ領域12bにマッピングされている。
【0050】
一方、仮想メモリ空間40は、OS20側に対応して設けられており、物理メモリ12のOS用物理メモリ領域12a およびAP用物理メモリ領域12bにマッピングされている。
【0051】
具体的には、OS用仮想メモリ空間40aは、OS20で利用されるメモリ空間であり、OS用物理メモリ領域12aにマッピングされている。AP用仮想メモリ空間40b は、AP30およびAP30で利用されるメモリ空間であり、AP用物理メモリ領域12bにマッピングされている。
【0052】
物理メモリ12では、物理的な記憶単位に物理アドレスが付与されている。一方、仮想メモリ空間40および仮想メモリ空間40では、プログラム中で用いられる論理アドレスによって命令やデータが特定される。仮想記憶制御方式では、ページング方式、セグメンテーション方式、ページング/セグメンテーション方式により、論理アドレスを物理アドレスに変換している。
【0053】
ページング方式では、アドレス変換がページと呼ばれるブロック単位(4キロバイト)で行われる。このため、OS20においては、仮想メモリ空間40の仮想ページが、物理メモリ12のどの物理ページに対応しているかを表すページテーブル(変換テーブル)24が設けられている。同様にして、OS20においても、仮想メモリ空間40のページが、物理メモリ12のどのページに対応しているかを表すページテーブル(変換テーブル)24が設けられている。
【0054】
また、図4(b)に示したように、仮想メモリ空間40のN番地(論理アドレス)には、OS20からOS20へ切り替えるための切替命令Aが記憶されている。一方、仮想メモリ空間40において、仮想メモリ空間40のN番地と同一のN番地には、OS20からOS20へ切り替えるための切替命令Bが記憶されている。
【0055】
図2に戻り、割り込みベクタテーブルレジスタ13は、後述する割り込みベクタテーブル23または割り込みベクタテーブル23の先頭論理アドレスを指すレジスタである。前記割り込みベクタテーブル23または割り込みベクタテーブル23のオフセットに格納されている論理アドレス先には、該当する割込番号の割り込み処理に対応する論理アドレスが格納されている。例えば、一般保護例外(割込番号0x0D)の割り込みが発生すると、制御部11(CPU)は、前記割り込みベクタテーブル23または割り込みベクタテーブル23のオフセット0x0D番地に格納されている論理アドレス先に格納されている論理アドレスにある一般保護例外に対応する割り込み処理ルーチンまでジャンプし、実行する。
【0056】
ページテーブルレジスタ14は、後述するページテーブル24またはページテーブル24へのページインデックスを格納するレジスタである。その他レジスタ15は、汎用レジスタ、フラグレジスタ等である。プログラムカウンタ16は、仮想メモリ空間から命令をフェッチする論理アドレスを1インクリメントする。LANカード17は、LAN70に接続されており、データ通信に関する制御を行うカードである。
【0057】
OS20において、割り込み振分処理部21は、割り込み発生時に、割り込みベクタテーブルレジスタ13が指す割り込みベクタテーブル23を参照して、所定の割り込み処理ルーチンへジャンプさせる。なお、前記割り込み振分処理部21の処理は、制御部11(CPU)が実行してもよい。
【0058】
割り込み処理部22は、割り込み処理ルーチン、OS切り替え処理(OS20からOS20)を実行する。割り込みベクタテーブル23の各オフセットに格納されている論理アドレス先には、上述した割込番号毎の、割り込み処理に対応する論理アドレスが格納されている。ページテーブル24は、仮想メモリ空間40(図4(a)参照)の各仮想ページと、物理メモリ12の各物理ページとの対応関係を表すテーブルである。
【0059】
レジスタ退避領域25は、OS切り替え時に、切り替え前のOSに対応するレジスタ(割り込みベクタテーブルレジスタ13、ページテーブルレジスタ14、その他レジスタ15)の内容を退避するための領域である。具体的には、OS20からOS20へ切り替えられる場合、レジスタ退避領域25には、図4(a)に示したように、OS20に対応するレジスタの内容が退避される。
【0060】
I/O許可ビットマップ26は、OS20側よりI/Oポートへのアクセスの許可または禁止を規定するビットマップである。なお、実際には、I/O許可ビットマップ26は、各タスクにそれぞれ存在するTSS(Task State Segment)内にある。I/Oポートは、オペレーティングシステムで入出力機能を備えたデバイス(例えば、LANカード17)に対応するポートである。
【0061】
図3はI/O許可ビットマップ26の構成例を示す。I/O許可ビットマップ26において、I/Oポートは、図示の如く、縦方向の16進数表記(000〜FFF)と、横方向の16進数表記(0〜F)との組み合わせからなるI/Oアドレスで特定される。当該I/Oポートへのアクセスが許可されている場合、I/O許可ビットマップ26では、上記I/Oポートに対応するI/Oアドレスに「0」が設定される。
【0062】
一方、当該I/Oポートへのアクセスが禁止されている場合、I/O許可ビットマップ26では、上記I/Oポートに対応するI/Oアドレスに「1」が設定される。
【0063】
I/O許可ビットマップ26においては、I/Oアドレスが0026(16進数)〜002A(16進数)の部分(太線で囲まれた部分)に「1」が設定されており、その他の部分に「0」が設定されている。
【0064】
上記I/Oアドレスが0026(16進数)〜002A(16進数)で特定されるI/Oポートは、LANカード17に対応している。すなわち、LANカード17は、アクセス禁止とされている。このLANカード17にアクセスしようとした場合には、一般保護例外による割り込みが発生する。図2に示したカーネルスタック27は、各種命令のオペランド等を格納する。
【0065】
一方、OS20において、割り込み振分処理部21は、割り込み発生時に、割り込みベクタテーブルレジスタ13が指す割り込みベクタテーブル23を参照して、所定の割り込み処理ルーチンへジャンプさせる。なお、前記割り込み振分処理部21の処理は、制御部11(CPU)が実行してもよい。
【0066】
割り込み処理部22は、割り込み処理ルーチン、OS切り替え処理(OS20からOS20)を実行する。割り込みベクタテーブル23の各オフセットに格納されている論理アドレス先には、上述した割込番号毎の、割り込み処理に対応する論理アドレスが格納されている。ページテーブル24は、仮想メモリ空間40(図4(a)参照)の各仮想ページと、物理メモリ12の各物理ページとの対応関係を表すテーブルである。
【0067】
レジスタ退避領域25は、OS切り替え時に、切り替え前のOSに対応するレジスタ(割り込みベクタテーブルレジスタ13、ページテーブルレジスタ14、その他レジスタ15)の内容を退避するための領域である。具体的には、OS20からOS20へ切り替えられる場合、レジスタ退避領域25には、図4(a)に示したように、OS20に対応するレジスタの内容が退避される。
【0068】
I/O許可ビットマップ26は、I/O許可ビットマップ26と同一構成とされており、I/Oポートへのアクセスの許可または禁止を規定するビットマップである。カーネルスタック27は、各種命令のオペランド等を格納する。なお、実際には、I/O許可ビットマップ26も、各タスクにそれぞれ存在する上述したTSS内にある。
【0069】
仮想LANデバイスドライバ50は、OS20に対応して設けられており、LAN通信のためのドライバである。この仮想LANデバイスドライバ50は、仮想的に設けられており、LANデバイスドライバ50の機能(LAN通信のドライバ機能)をエミュレートする。LANデバイスドライバ50は、OS20に対応して設けられており、LAN通信のためのドライバである。共有メモリ領域60は、LAN通信時に、OS20とOS20との間でデータを受け渡すためのメモリ領域(バッファ)であり、図5に示したように物理メモリ12の一部領域である。
【0070】
つぎに、図5を参照して、一実施の形態の動作原理について説明する。同図において、OS20側でデータ送信要求が発生した場合、仮想LANデバイスドライバ50は、(1)で送信すべきデータを用意し、共有メモリ領域60に格納する。(2)では、仮想LANデバイスドライバ50は、I/O命令を発行する。
【0071】
これにより、I/O許可ビットマップ26(図3参照)が参照され、この場合、当該I/Oアドレス(I/Oアドレス空間80)に対応するI/Oポートがアクセス禁止に設定されているため、(3)では、一般保護例外が発生する。これにより、OSがOS20からOS20(図4(b)参照)に切り替えられる。
【0072】
(4)では、I/O解析が行われ、(5)では、LANデバイスドライバ50が起動される。(6)では、共有メモリ領域60に格納されているデータが別の領域にコピーされ、(7)では、I/O命令が発行され、データがLANカード17経由でLAN70へ送信される。(8)では、割り込みが復帰される((9))。
【0073】
つぎに、図6〜図14を参照して、一実施の形態の動作例1および2について説明する。
【0074】
(動作例1)
図6および図7は、一実施の形態の動作例1を説明する図である。動作例1では、仮想メモリ空間40および仮想メモリ空間40の各論理アドレスには、図6および図7に示した処理に対応する各種命令が割り当てられている。
【0075】
また、動作例1では、OS20がLANカード17経由でデータを送信する場合について説明する。図6の例では、OS20が動作状態にあり、OS20が待機状態にあるものとする。この状態でデータ送信を行う場合、(a)では、OS20は、仮想LANデバイスドライバ50にデータを渡す。仮想LANデバイスドライバ50は、データを共有メモリ領域60に格納する。
【0076】
(b)では、仮想LANデバイスドライバ50は、LANカード17に対応するI/Oポート(例えば、I/Oアドレス=26(16進数))をアクセスするためのI/O命令を発行する。この場合、図3に示したI/O許可ビットマップ26において、上記26(16進数)に対応する部分に「1」(アクセス禁止)が設定されているため、OS20側で一般保護例外の割り込みが発生し、制御部11は、割り込みベクタテーブルレジスタ13に上記一般保護例外に対応する割込番号を格納し、カーネルスタック27に、一般保護例外を発生させた命令のオペランド等を格納する。
【0077】
割り込み振分処理部21は、(1)で、割り込みベクタテーブルレジスタ13の割込番号に基づいて、割り込みベクタテーブル23を参照し、一般保護例外の割り込み処理へジャンプする。
【0078】
これにより、(2)で、割り込み処理部22は、仮想メモリ空間40のL番地で、カーネルスタック27より命令オペランド等を取得し、L+1番地で、該命令オペランドの比較により、割り込みがLANカード17のI/OポートにアクセスするためのI/O命令で発生した一般保護例外による割り込みであるか否かを判断する。L+2番地では、割り込み処理部22は、上記判断結果が「No」である場合、N+i番地へジャンプする。
【0079】
この場合、上記判断結果が「Yes」であるとすると、L+3番地では、割り込み処理部22は、割り込み禁止命令を実行する。これにより、他の割り込みを受け付けない状態とされる。
【0080】
つぎに、OS切り替え処理(レジスタをレジスタ退避領域に退避)では、OS20に対応する割り込みベクタテーブルレジスタ13、ページテーブルレジスタ14およびその他レジスタ15の内容がレジスタ退避領域25に退避される。
【0081】
つぎのOS切り替え処理(IDTR切り替え命令)では、割り込みベクタテーブルレジスタ13が、OS20用からOS20用に切り替えられる。つぎのOS切り替え処理(ページテーブルレジスタ変更命令)では、仮想メモリ空間40のN番地で、ページテーブルレジスタ14がOS20用からOS20用に変更される。これにより、OS20からOS20へ切り替えられる((3))。
【0082】
仮想メモリ空間40において、つぎのOS切り替え処理(レジスタ退避領域からレジスタを復帰)では、仮想メモリ空間40のN+1番地で、以前にレジスタ退避領域25に退避されていたOS20用のレジスタの内容が割り込みベクタテーブルレジスタ13、ページテーブルレジスタ14およびその他レジスタ15にそれぞれ復帰される((4))。
【0083】
つぎに、割り込み処理部22は、割り込み許可命令を実行した後、割り込み処理ルーチンを順次実行する。つぎに、割り込み処理部22は、レジスタ退避領域25にあるOS20のLANアクセスフラグをONにする。このLANアクセスフラグは、OS20からの指示に基づいて、データをLANカード17(I/Oポート)から送信することを表す。
【0084】
つぎに、割り込み処理部22は、LANデバイスドライバ50をCALL(呼び出し)する((5))。これにより、(6)で、LANデバイスドライバ50は、共有メモリ領域60にあるデータを、共有メモリ領域60の送信バッファにコピーする。つぎに、LANデバイスドライバ50は、上記データをLAN70へ送信した後、復帰する((7))。仮想メモリ空間40のS番地では、IRET(割り込み復帰命令)が実行される((8))。
【0085】
そして、図7に示した(9)では、LANカード17は、データ送信が終了したことを通知するため、LAN割り込みを発生させる。これにより、仮想メモリ空間40のM番地で、割り込み処理ルーチンが実行される((10))。
【0086】
つぎに、レジスタ退避領域25にあるOS20のLANアクセスフラグが参照される。つぎに、上記LANアクセスフラグがOFFならば、割り込み処理部22は、N+P番地(IRET)へジャンプする。この場合、LANアクセスフラグがONであるため、割り込み処理部22は、LANアクセスフラグをONからOFFに戻す。
【0087】
つぎに、割り込み禁止命令が実行される。つぎのOS切り替え処理(レジスタをレジスタ退避領域に退避)では、OS20に対応する割り込みベクタテーブルレジスタ13、ページテーブルレジスタ14およびその他レジスタ15の内容がレジスタ退避領域25に退避される。
【0088】
つぎのOS切り替え処理(IDTR切り替え命令)では、割り込みベクタテーブルレジスタ13が、OS20用からOS20用に切り替えられる。つぎのOS切り替え処理(ページテーブルレジスタ変更命令)では、仮想メモリ空間40のN番地で、ページテーブルレジスタ14がOS20用からOS20用に変更される。これにより、OS20からOS20へ切り替えられる((11))。
【0089】
仮想メモリ空間40において、つぎのOS切り替え処理(レジスタ退避領域からレジスタを復帰)では、仮想メモリ空間40のN+1番地で、先にレジスタ退避領域25に退避されていたOS20用のレジスタの内容が割り込みベクタテーブルレジスタ13、ページテーブルレジスタ14およびその他レジスタ15にそれぞれ復帰される((12))。
【0090】
つぎに、割り込み許可命令が実行され、LAN割り込みがソフトウェア割り込みにより発生される。つぎに、IRET(割り込み復帰命令)が実行される((13))。これにより、割り込み処理部22は、LAN割り込み処理として、N+i番地で、割り込み処理ルーチンを順次実行する。そして、IRET(割り込み復帰命令)が実行され、処理ルーチンが割り込み処理ルーチンから通常処理ルーチンへ復帰される((14))。
【0091】
図8〜図10は、上記動作例1を説明するフローチャートである。図8において、ステップSA1では、OS20は、仮想LANデバイスドライバ50にデータを渡す。仮想LANデバイスドライバ50は、データを共有メモリ領域60に格納する。
【0092】
ステップSA2では、仮想LANデバイスドライバ50は、LANカード17に対応するI/OポートをアクセスするためのI/O命令を発行する。ステップSA3では、図3に示したI/O許可ビットマップ26において、I/Oポートに対応する部分に「1」(アクセス禁止)が設定されているものとし、OS20側で一般保護例外の割り込みが発生する。
【0093】
また、制御部11は、割り込みベクタテーブルレジスタ13に上記一般保護例外に対応する割込番号を格納し、カーネルスタック27に、一般保護例外を発生させた命令のオペランド等を格納する。
【0094】
ステップSA4では、割り込み振分処理部21は、割り込みベクタテーブルレジスタ13より割込番号を取得する。ステップSA5では、割り込み振分処理部21は、割り込みベクタテーブルレジスタ13の割込番号に基づいて、割り込みベクタテーブル23を参照し、一般保護例外の割り込み処理のある論理アドレスへジャンプする。
【0095】
ステップSA6では、一般保護例外に対応する割り込み処理ルーチンが実行される。ステップSA7では、割り込み処理部22は、カーネルスタック27より命令オペランド等を取得する。ステップSA8では、割り込み処理部22は、該命令オペランドの比較により、割り込みがLANカード17のI/OポートにアクセスするためのI/O命令で発生した一般保護例外による割り込みであるか否かを判断する。
【0096】
ステップSA9では、割り込み処理部22は、上記判断結果が「No」である場合、N+i番地へジャンプする。ステップSA10では、割り込み処理部22は、上記判断結果が「Yes」であるため、割り込み禁止命令を実行する。
【0097】
ステップSA11では、OS切り替え処理(レジスタをレジスタ退避領域に退避)が実行され、OS20に対応する割り込みベクタテーブルレジスタ13、ページテーブルレジスタ14およびその他レジスタ15の内容がレジスタ退避領域25に退避される。
【0098】
ステップSA12では、OS切り替え処理(IDTR切り替え命令)が実行され、割り込みベクタテーブルレジスタ13が、OS20用からOS20用に切り替えられる。ステップSA13では、OS切り替え処理(ページテーブルレジスタ変更命令)が実行され、仮想メモリ空間40のN番地で、ページテーブルレジスタ14がOS20用からOS20用に変更される。これにより、OS20からOS20へ切り替えられる。
【0099】
仮想メモリ空間40において、ステップSA14では、OS切り替え処理(レジスタ退避領域からレジスタを復帰)が実行され、仮想メモリ空間40のN+1番地で、以前にレジスタ退避領域25に退避されていたOS20用のレジスタの内容が割り込みベクタテーブルレジスタ13、ページテーブルレジスタ14およびその他レジスタ15にそれぞれ復帰される。
【0100】
ステップSA15では、割り込み処理部22は、割り込み許可命令を実行する。ステップSA16では、割り込み処理部22は、割り込み処理ルーチンを順次実行する。ステップSA17では、割り込み処理部22は、レジスタ退避領域25にあるOS20のLANアクセスフラグをONにする。
【0101】
ステップSA18では、割り込み処理部22は、LANデバイスドライバ50をCALL(呼び出し)する。図9に示したステップSA19では、LANデバイスドライバ50は、共有メモリ領域60にあるデータを、共有メモリ領域60の送信バッファにコピーする。
【0102】
ステップSA20では、LANデバイスドライバ50は、上記データをLAN70へ送信する。ステップSA21では、LANデバイスドライバ50は、割り込み処理に復帰する。ステップSA22では、IRET(割り込み復帰命令)が実行される。
【0103】
ステップSA23では、待機される。ステップSA24では、LANカード17は、データ送信が終了したことを通知するため、LAN割り込みを発生させる。ステップSA25では、仮想メモリ空間40のM番地で、割り込み処理ルーチンが実行される。
【0104】
ステップSA26では、レジスタ退避領域25にあるOS20のLANアクセスフラグが参照される。ステップSA27では、上記LANアクセスフラグがOFFならば、割り込み処理部22は、N+P番地(IRET)へジャンプし、ステップSA32でIRET(割り込み復帰命令)が実行される。この場合、LANアクセスフラグがONであるため、割り込み処理部22は、LANアクセスフラグをONからOFFに戻す。
【0105】
ステップSA28では、割り込み禁止命令が実行される。ステップSA29では、OS切り替え処理(レジスタをレジスタ退避領域に退避)が実行され、OS20に対応する割り込みベクタテーブルレジスタ13、ページテーブルレジスタ14およびその他レジスタ15の内容がレジスタ退避領域25に退避される。
【0106】
ステップSA30では、OS切り替え処理(IDTR切り替え命令)が実行され、割り込みベクタテーブルレジスタ13が、OS20用からOS20用に切り替えられる。ステップSA31では、OS切り替え処理(ページテーブルレジスタ変更命令)が実行され、仮想メモリ空間40のN番地で、ページテーブルレジスタ14がOS20用からOS20用に変更される。これにより、OS20からOS20へ切り替えられる。
【0107】
仮想メモリ空間40において、図10に示したステップSA33では、OS切り替え処理(レジスタ退避領域からレジスタを復帰)が実行され、仮想メモリ空間40のN+1番地で、先にレジスタ退避領域25に退避されていたOS20用のレジスタの内容が割り込みベクタテーブルレジスタ13、ページテーブルレジスタ14およびその他レジスタ15にそれぞれ復帰される。
【0108】
ステップSA34では、割り込み許可命令が実行される。ステップSA35では、LAN割り込みがソフトウェア割り込みにより発生される。ステップSA36では、IRET(割り込み復帰命令)が実行される。
【0109】
ステップSA37では、一旦、OS20に制御が戻り、LAN割り込みが発生し、割り込み振分処理部21で判別され、割り込み処理ルーチンにジャンプされる。ステップSA38では、割り込み処理部22は、LAN割り込み処理として、N+i番地で、割り込み処理ルーチンを実行する。ステップSA39では、IRET(割り込み復帰命令)が実行され、処理ルーチンが割り込み処理ルーチンから通常処理ルーチンへ復帰される。
【0110】
(動作例2)
図11および図12は、一実施の形態の動作例2を説明する図である。動作例2では、仮想メモリ空間40および仮想メモリ空間40の各論理アドレスには、図11および図12に示した処理に対応する各種命令が割り当てられている。
【0111】
また、動作例2では、OS20がLANカード17経由でデータを受信する場合について説明する。図11の例では、OS20が動作状態にあり、OS20が待機状態にあるものとする。この状態で、(a)では、LANカード17がデータを受信すると、LAN割り込みが発生する。
【0112】
(b)では、仮想LANデバイスドライバ50は、LANカード17に対応するI/Oポート(例えば、I/Oアドレス=26(16進数))をアクセスするためのI/O命令を発行する。この場合、図3に示したI/O許可ビットマップ26で上記I/Oポートに対応する部分に「1」(アクセス禁止)が設定されているため、OS20側で一般保護例外の割り込みが発生し、制御部11は、割り込みベクタテーブルレジスタ13に上記一般保護例外に対応する割込番号を格納し、カーネルスタック27に、一般保護例外を発生させた命令のオペランド等を格納する。
【0113】
割り込み振分処理部21は、(1)で、割り込みベクタテーブルレジスタ13の割込番号に基づいて、割り込みベクタテーブル23を参照し、一般保護例外の割り込み処理へジャンプする。
【0114】
これにより、(2)で、割り込み処理部22は、仮想メモリ空間40のL番地で、カーネルスタック27より命令オペランド等を取得し、L+1番地で、該命令オペランドの比較により、割り込みがLANカード17のI/OポートにアクセスするためのI/O命令で発生した一般保護例外による割り込みであるか否かを判断する。L+2番地では、割り込み処理部22は、上記判断結果が「No」である場合、N+i番地へジャンプする。
【0115】
この場合、上記判断結果が「Yes」であるとすると、L+3番地では、割り込み処理部22は、割り込み禁止命令を実行する。これにより、他の割り込みを受け付けない状態とされる。
【0116】
つぎに、OS切り替え処理(レジスタをレジスタ退避領域に退避)では、OS20に対応する割り込みベクタテーブルレジスタ13、ページテーブルレジスタ14およびその他レジスタ15の内容がレジスタ退避領域25に退避される。
【0117】
つぎのOS切り替え処理(IDTR切り替え命令)では、割り込みベクタテーブルレジスタ13が、OS20用からOS20用に切り替えられる。つぎのOS切り替え処理(ページテーブルレジスタ変更命令)では、仮想メモリ空間40のN番地で、ページテーブルレジスタ14がOS20用からOS20用に変更される。これにより、OS20からOS20へ切り替えられる((3))。
【0118】
仮想メモリ空間40において、つぎのOS切り替え処理(レジスタ退避領域からレジスタを復帰)では、仮想メモリ空間40のN+1番地で、以前にレジスタ退避領域25に退避されていたOS20用のレジスタの内容が割り込みベクタテーブルレジスタ13、ページテーブルレジスタ14およびその他レジスタ15にそれぞれ復帰される((4))。
【0119】
つぎに、割り込み処理部22は、割り込み許可命令を実行した後、割り込み処理ルーチンを順次実行する。つぎに、割り込み処理部22は、レジスタ退避領域25にあるOS20のLANアクセスフラグをONにする。
【0120】
つぎに、LAN割り込みがソフトウェア割り込みにより発生される。つぎに、IRET(割り込み復帰命令)が実行される((5))。これにより、図12において、割り込み処理部22は、LAN割り込み処理として、X番地で、割り込み処理ルーチンを順次実行する。つぎに、割り込み処理部22は、LANデバイスドライバ50をCALL(呼び出し)する((6))。
【0121】
LANデバイスドライバ50は、受信したデータを共有メモリ領域60にコピーする。これにより、上記データは、OS20で取得可能とされる。つぎに、処理が、LAN割り込み処理に復帰される((7))。つぎに、レジスタ退避領域25にあるOS20のLANアクセスフラグが参照される。つぎに、上記LANアクセスフラグがOFFならば、割り込み処理部22は、N+P番地(IRET)へジャンプする。この場合、LANアクセスフラグがONであるため、割り込み処理部22は、LANアクセスフラグをONからOFFに戻す。
【0122】
つぎに、割り込み禁止命令が実行される。つぎのOS切り替え処理(レジスタをレジスタ退避領域に退避)では、OS20に対応する割り込みベクタテーブルレジスタ13、ページテーブルレジスタ14およびその他レジスタ15の内容がレジスタ退避領域25に退避される。
【0123】
つぎのOS切り替え処理(IDTR切り替え命令)では、割り込みベクタテーブルレジスタ13が、OS20用からOS20用に切り替えられる。つぎのOS切り替え処理(ページテーブルレジスタ変更命令)では、仮想メモリ空間40のN番地で、ページテーブルレジスタ14がOS20用からOS20用に変更される。これにより、OS20からOS20へ切り替えられる((9))。
【0124】
仮想メモリ空間40において、つぎのOS切り替え処理(レジスタ退避領域からレジスタを復帰)では、仮想メモリ空間40のN+1番地で、先にレジスタ退避領域25に退避されていたOS20用のレジスタの内容が割り込みベクタテーブルレジスタ13、ページテーブルレジスタ14およびその他レジスタ15にそれぞれ復帰される((10))。
【0125】
つぎに、割り込み許可命令が実行され、LAN割り込みがソフトウェア割り込みにより発生される。つぎに、IRET(割り込み復帰命令)が実行される((11))。
【0126】
図13および図14は、上記動作例2を説明するフローチャートである。図13において、ステップSB1では、LANカード17がデータを受信すると、LAN割り込みが発生する。
【0127】
ステップSB2では、仮想LANデバイスドライバ50は、LANカード17に対応するI/OポートをアクセスするためのI/O命令を発行する。ステップSB3では、図3に示したI/O許可ビットマップ26において、I/Oポートに対応する部分に「1」(アクセス禁止)が設定されているものとし、OS20側で一般保護例外の割り込みが発生する。
【0128】
また、制御部11は、割り込みベクタテーブルレジスタ13に上記一般保護例外に対応する割込番号を格納し、カーネルスタック27に、一般保護例外を発生させた命令のオペランド等を格納する。
【0129】
ステップSB4では、割り込み振分処理部21は、割り込みベクタテーブルレジスタ13より割込番号を取得する。ステップSB5では、割り込み振分処理部21は、割り込みベクタテーブルレジスタ13の割込番号に基づいて、割り込みベクタテーブル23を参照し、一般保護例外の割り込み処理のある論理アドレスへジャンプする。
【0130】
ステップSB6では、一般保護例外に対応する割り込み処理ルーチンが実行される。ステップSB7では、割り込み処理部22は、カーネルスタック27より命令オペランド等を取得する。ステップSB8では、割り込み処理部22は、該命令オペランドの比較により、割り込みがLANカード17のI/OポートにアクセスするためのI/O命令で発生した一般保護例外による割り込みであるか否かを判断する。
【0131】
ステップSB9では、割り込み処理部22は、上記判断結果が「No」である場合、N+i番地へジャンプする。ステップSB10では、割り込み処理部22は、上記判断結果が「Yes」であるため、割り込み禁止命令を実行する。
【0132】
ステップSB11では、OS切り替え処理(レジスタをレジスタ退避領域に退避)が実行され、OS20に対応する割り込みベクタテーブルレジスタ13、ページテーブルレジスタ14およびその他レジスタ15の内容がレジスタ退避領域25に退避される。
【0133】
ステップSB12では、OS切り替え処理(IDTR切り替え命令)が実行され、割り込みベクタテーブルレジスタ13が、OS20用からOS20用に切り替えられる。ステップSB13では、OS切り替え処理(ページテーブルレジスタ変更命令)が実行され、仮想メモリ空間40のN番地で、ページテーブルレジスタ14がOS20用からOS20用に変更される。これにより、OS20からOS20へ切り替えられる。
【0134】
仮想メモリ空間40において、ステップSB14では、OS切り替え処理(レジスタ退避領域からレジスタを復帰)が実行され、仮想メモリ空間40のN+1番地で、以前にレジスタ退避領域25に退避されていたOS20用のレジスタの内容が割り込みベクタテーブルレジスタ13、ページテーブルレジスタ14およびその他レジスタ15にそれぞれ復帰される。
【0135】
ステップSB15では、割り込み処理部22は、割り込み許可命令を実行する。ステップSB16では、割り込み処理部22は、割り込み処理ルーチンを順次実行する。ステップSB17では、割り込み処理部22は、レジスタ退避領域25にあるOS20のLANアクセスフラグをONにする。
【0136】
ステップSB18では、LAN割り込みがソフトウェア割り込みにより発生される。ステップSB19では、IRET(割り込み復帰命令)が実行される。
【0137】
図14に示したステップSB20では、割り込み処理ルーチンが実行され、データの送信時のLAN割り込みか、または受信時のLAN割り込みかが判別される。ステップSB21では、割り込み処理部22は、LANデバイスドライバ50をCALL(呼び出し)する。
【0138】
ステップSB22では、LANデバイスドライバ50は、受信したデータを共有メモリ領域60にコピーする。これにより、上記データは、OS20で取得可能とされる。ステップSB23では、処理が、LAN割り込み処理に復帰される。
【0139】
ステップSB24では、レジスタ退避領域25にあるOS20のLANアクセスフラグが参照される。ステップSB25では、上記LANアクセスフラグがOFFならば、割り込み処理部22は、N+P番地(IRET)へジャンプし、ステップSB30でIRET(割り込み復帰命令)を実行する。この場合、LANアクセスフラグがONであるため、割り込み処理部22は、LANアクセスフラグをONからOFFに戻す。
【0140】
ステップSB26では、割り込み禁止命令が実行される。ステップSB27では、OS切り替え処理(レジスタをレジスタ退避領域に退避)が実行され、OS20に対応する割り込みベクタテーブルレジスタ13、ページテーブルレジスタ14およびその他レジスタ15の内容がレジスタ退避領域25に退避される。
【0141】
ステップSB28では、OS切り替え処理(IDTR切り替え命令)が実行され、割り込みベクタテーブルレジスタ13が、OS20用からOS20用に切り替えられる。ステップSB29では、OS切り替え処理(ページテーブルレジスタ変更命令)が実行され、仮想メモリ空間40のN番地で、ページテーブルレジスタ14がOS20用からOS20用に変更される。これにより、OS20からOS20へ切り替えられる。
【0142】
仮想メモリ空間40において、ステップSB31では、OS切り替え処理(レジスタ退避領域からレジスタを復帰)が実行され、仮想メモリ空間40のN+1番地で、先にレジスタ退避領域25に退避されていたOS20用のレジスタの内容が割り込みベクタテーブルレジスタ13、ページテーブルレジスタ14およびその他レジスタ15にそれぞれ復帰される。ステップSB32では、割り込み許可命令が実行される。ステップSB33では、IRET(割り込み復帰命令)が実行される。
【0143】
図15(a)〜図15(d)は、上述した一実施の形態の応用例1〜4を説明する図である。図15(a)に示した応用例1は、新旧OSを共存させ、システム更改時に利用する例である。新OSは、例えば、OS20に対応している。一方、旧OSは、OS20に対応している。
【0144】
図15(b)に示した応用例2は、ソース公開OSを活用し、ソース非公開OSのリリースを待たずに、ソース公開OS側で新機能をスピード開発する例である。ソース非公開OSは、ソースコードが公開されていないオペレーティングシステムであり、例えば、OS20に対応している。一方、ソース公開OSは、ソースコードが公開されているオペレーティングシステムであり、OS20に対応している。
【0145】
図15(c)に示した応用例3は、専用OSと汎用OSとを共存させる例である。専用OSは、リアルタイム性等に特化する機能を分担し、例えば、OS20に対応している。一方、汎用OSは、マイクロソフト社のWindows(登録商標)等であり、GUI機能を分担し、OS20に対応している。
【0146】
図15(d)に示した応用例4は、資源を分割する例であり、OS1とOS2の使用目的により使用方法が異なる例である。OS1は、例えば、OS20に対応している。一方、OS2は、OS20に対応している。
【0147】
図16は、一実施の形態をシステム移行に適用した場合を説明する図である。同図において、従来の移行作業では、一度に、旧端末に実装されている旧OSの全モジュールを新端末の新OSに移行させる必要があり、安全面で不安が残る。
【0148】
これに対して、マルチオペレーティングシステムがあると、旧端末に実装されている旧OSの各モジュールを中間端末の旧OSに安全を確認しながら移行させる。つぎに、中間端末において、旧OSの各モジュールを新OSに安全を確認しながら移行させる。
【0149】
つぎに、中間端末の新OSの全モジュールを、新端末の新OSに一度に移行させる。この場合、新OS間での移行であるため、問題が発生しない。マルチOSによる移行は、ある特定のモジュールに急いで新機能をつける場合に有効である。
【0150】
図17は、一実施の形態を高セキュリティゲートウェイに適用した場合を説明する図である。同図において、ハードウェアは、マルチオペレーティングシステム(OS1およびOS2)を備えており、NIC(ネットワークインタフェースカード)を経由してインターネットに接続されている。このハードウェアは、高セキュリティゲートウェイとして機能する。
【0151】
OS1は、ユーザが使用するAP(アプリケーションプログラム)1を管理するとともに、通信ログをDK(ディスク)1に蓄積する。一方、OS2は、インターネットからの通信パケットを監視し、監視ログをDK2に蓄積する。
【0152】
また、OS2では、NICを直接制御し、通信を行う。このため、OS2は、OS1の通信を支援するため、NICの対ソフトウェア提供インタフェースを疑似した疑似NIC−I/FをOS1に提供している。AP2は、パケット監視ログ収集用のアプリケーションプログラムであり、OS2上で動作する。
【0153】
また、AP2は、通信パケットを外から見るだけで、通信パケットに含まれる実行コードを処理しないため、ウイルスに感染しない。DK2に蓄積される監視ログは、悪意の第三者による改竄がなされないようになっている。従って、攻撃の痕跡を残すことが可能となる。
【0154】
ここで、ユーザの環境(OS1等)に対して、セキュリティの攻撃が行われた場合、OS1の通信ログが改竄されることが考えられる。しかしながら、一実施の形態では、マルチオペレーティングシステムにより、OS1とOS2の監視ログが別々に管理されるため、攻撃者の追跡を行うことが可能となる。これにより、当該セキュリティゲートウェイへの攻撃を抑止する効果が期待できる。
【0155】
図18は、一実施の形態をデスクトップGrid端末に適用した場合を説明する図である。同図において、ハードウェアは、マルチオペレーティングシステム(OS1およびOS2)を備えており、NICを経由してインターネットに接続されている。インターネットには、Gridサーバが接続されている。ハードウェアは、デスクトップGrid端末として機能する。
【0156】
デスクトップGrid端末は、ユーザが計算機を利用しない間に、大きな計算の一部を割り当てて計算を実現しようとするデスクトップGrid計算を行うための端末である。ここで、ユーザ側から見ると、内容が不明な上記計算が自身の計算機環境に及ぼす悪影響が心配となる。
【0157】
そこで、同図では、自身の計算機環境をOS1で管理し、Grid計算の処理環境をOS2で管理することにより、上記悪影響を排除できる。つまり、Grid計算で利用されるデータやプログラムは、全てOS2の制御下のみで管理され実行される。一方、OS1の制御下にあるDK1やMEM(メモリ)1という計算機資源には、アクセスが許可されない。従って、Grid計算のプログラムからの悪影響が排除される。
【0158】
図19は、一実施の形態を遠隔管理端末に適用した場合を説明する図である。同図において、ハードウェアは、マルチオペレーティングシステム(OS1およびOS2)を備えており、NICを経由してネットワークに接続されている。ネットワークには、システム管理者マシンや他のマシンが接続されている。ハードウェアは、遠隔管理端末として機能する。
【0159】
同図において、ユーザが管理できる範疇をOS1に制限し、OS2の管理をネットワークを介してシステム管理者マシンで行うように構成されている。これにより、オフィス環境などで利用するパーソナルコンピュータのデフォルト環境を、システム管理者がOS2の管理下で構築し、一方、ユーザ個人の好みや状況に応じて利用する環境を、ユーザがOS1の管理下で構築することができる。
【0160】
したがって、ユーザ個人の環境設定により、システム側で用意した環境が動作不具合になることが防止される。OS2は、システム管理者マシンでシステム管理者により管理され、システム側で設計された環境を提供する。ユーザは、該環境を利用する場合、OS2のファイル情報をOS1に読み込んで起動するか、または、OS2に起動を依頼してクライアント/サーバの形態で実行する。
【0161】
図20は、一実施の形態を高効率ネットサービス提供端末に適用した場合を説明する図である。同図において、ハードウェアは、マルチオペレーティングシステム(OS1およびOS2)を備えており、NICを経由してネットワークに接続されている。ネットワークには、コンテンツプロバイダサーバや他のマシンが接続されている。ハードウェアは、高効率ネットサービス提供端末として機能する。
【0162】
同図においては、高効率ネットサービス提供端末は、遠隔管理端末(図19参照)と同様にして、一方のOS1をユーザの管理下、他方のOS2をネットサービスの管理下として、例えば、封切り前のコンテンツを事前にOS2の管理下(DK2)に配信しておき、封切り時刻にOS1の管理下のDK1からのコンテンツの即時利用を実現する端末である。
【0163】
コンテンツは、ネットワークを介して、コンテンツプロバイダサーバからOS2の管理下のDK2に配信された後、ユーザの希望により、DK2からOS1の管理下のDK1へ当該コンテンツが提供され、即時利用が可能となる。このように、コンテンツプロバイダサーバでは、事前配信により、ダウンロードアクセスの集中が防止される。
【0164】
図21は、一実施の形態を高セキュリティWebサービス提供サーバに適用した場合を説明する図である。同図において、ハードウェアは、マルチオペレーティングシステム(OS1およびOS2)を備えており、NICを経由してネットワークに接続されている。ネットワークには、Web閲覧端末が接続されている。ハードウェアは、高セキュリティWebサービス提供サーバとして機能する。
【0165】
同図の高セキュリティWebサービス提供サーバにおいては、外部からアクセスできる環境がOS2で、ローカルユーザだけがアクセスできる環境がOS1で構築される。
【0166】
例えば、Web公開コンテンツや利用ログは、OS2の管理下のDK2に格納される。一方、公開したくないデータ等は、OS1の管理下のDK1に格納される。この場合、設定ミス等により、公開したくない情報を誤ってWeb上で公開してしまうという事態が回避される。また、外部から悪意の第三者による攻撃をOS2側が受けた場合であっても、OS1では、ネットワーク機能を除き、動作することが可能となる。
【0167】
以上説明したように、一実施の形態によれば、図4に示したように、OS20に対応する仮想メモリ空間40のN番地に切替命令Aを仮想記憶させ、仮想メモリ空間40のN+1番地以降に各種命令を仮想記憶させておき、さらに、OS20における複数のアクセス先(I/Oポート)のうち、オペレーティングシステム切り替えのトリガーとするアクセス先(I/Oポート:例えば、LANカード17)をアクセス禁止に設定し、OS20が、アクセス禁止されているアクセス先(I/Oポート)へアクセスしようとした場合、これをトリガーとして、切替命令Aにより、OS20からOS20に切り替え、OS20が、仮想メモリ空間40のN+1番地以降の各種命令を実行することとしたので、従来の基盤OSやVMモニタ等の共通部分が不要で、オペレーティングシステムの信頼性、処理能力を向上させることができる。
【0168】
また、一実施の形態によれば、従来の共通部分が不要であるため、OS20とOS20とを独立的に動作させることができ、セキュリティを向上させることができる。
【0169】
また、一実施の形態によれば、仮想メモリ空間40のN番地に切替命令Bを仮想記憶させ、切替命令Aにより切り替えが行われてから、OS20が、仮想メモリ空間40のN+1番地以降の各種命令を実行した後、切替命令Bにより、OS20からOS20に切り替えることとしたので、切り替えおよび切り戻しを円滑に行うことができる。
【0170】
また、一実施の形態によれば、切替命令Bにより切り替えを実行する前に、OS20がアクセス先(LANカード17)に所定の処理(データ送信等)を実行させることとしたので、OS20への不正攻撃を防止することができる。
【0171】
また、一実施の形態によれば、アクセス先をI/Oポートとしたので、OS20への不正攻撃を防止することができる。
【0172】
また、一実施の形態によれば、アクセス禁止されているアクセス先を、データ通信を行うLANカード17(データ通信ポート)としたので、データ通信を介してのOS20への不正攻撃を防止することができる。
【0173】
また、一実施の形態によれば、仮想メモリ空間40のN番地の前後に割り込み禁止命令および割り込み許可命令を仮想記憶させることとしたので、OS20側での多重割り込みを回避することができる。
【0174】
また、一実施の形態によれば、仮想メモリ空間40のN番地の前後に割り込み禁止命令および割り込み許可命令を仮想記憶させることとしたので、OS20側での多重割り込みを回避することができる。
【0175】
以上本発明にかかる一実施の形態について図面を参照して詳述してきたが、具体的な構成例はこの一実施の形態に限られるものではなく、本発明の要旨を逸脱しない範囲の設計変更等があっても本発明に含まれる。
【0176】
例えば、前述した一実施の形態においては、マルチオペレーティングシステム制御を実現するためのプログラムを図22に示したコンピュータ読み取り可能な記録媒体200に記録して、この記録媒体200に記録されたプログラムを同図に示したコンピュータ100に読み込ませ、実行することにより各機能を実現してもよい。
【0177】
同図に示したコンピュータ100は、上記プログラムを実行するCPU110と、キーボード、マウス等の入力装置120と、各種データを記憶するROM(Read Only Memory)130と、演算パラメータ等を記憶するRAM(Random Access Memory)140と、記録媒体200からプログラムを読み取る読取装置150と、ディスプレイ、プリンタ等の出力装置160と、装置各部を接続するバス170とから構成されている。
【0178】
CPU110は、読取装置150を経由して記録媒体200に記録されているプログラムを読み込んだ後、プログラムを実行することにより、前述した機能を実現する。なお、記録媒体200としては、光ディスク、フレキシブルディスク、ハードディスク等が挙げられる。
【0179】
【発明の効果】
以上説明したように、本発明によれば、第1のオペレーティングシステムに対応する第1の仮想メモリ空間の論理アドレスNに第1の切替命令を仮想記憶させ、第2の仮想メモリ空間の論理アドレスN+1以降に各種命令を仮想記憶させておき、さらに、第1のオペレーティングシステムにおける複数のアクセス先のうち、オペレーティングシステム切り替えのトリガーとするアクセス先をアクセス禁止に設定し、第1のオペレーティングシステムが、アクセス禁止されているアクセス先へアクセスしようとした場合、これをトリガーとして、第1の切替命令により、第1のオペレーティングシステムから第2のオペレーティングシステムに切り替え、第2のオペレーティングシステムが、第2の仮想メモリ空間の論理アドレスN+1以降の各種命令を実行することとしたので、従来の基盤OSやVMモニタ等の共通部分が不要で、オペレーティングシステムの信頼性、処理能力を向上させることができるという効果を奏する。
【0180】
また、本発明によれば、従来の共通部分が不要であるため、第1のオペレーティングシステムと第2のオペレーティングシステムとを独立的に動作させることができ、セキュリティを向上させることができるという効果を奏する。
【0181】
また、本発明によれば、第2の仮想メモリ空間の論理アドレスNに第2の切替命令を仮想記憶させ、第1の切替命令により切り替えが行われてから、第2のオペレーティングシステムが、第2の仮想メモリ空間の論理アドレスN+1以降の各種命令を実行した後、第2の切替命令により、第2のオペレーティングシステムから第1のオペレーティングシステムに切り替えることとしたので、切り替えおよび切り戻しを円滑に行うことができるという効果を奏する。
【0182】
また、本発明によれば、第2の切替命令により切り替えを実行する前に、第2のオペレーティングシステムがアクセス先に所定の処理を実行させることとしたので、第1のオペレーティングシステムへの不正攻撃を防止することができるという効果を奏する。
【0183】
また、本発明によれば、アクセス先をI/Oポートとしたので、第1のオペレーティングシステムへの不正攻撃を防止することができるという効果を奏する。
【0184】
また、本発明によれば、アクセス禁止されているアクセス先を、データ通信を行うデータ通信ポートとしたので、データ通信を介しての第1のオペレーティングシステムへの不正攻撃を防止することができるという効果を奏する。
【0185】
また、本発明によれば、第1の仮想メモリ空間の論理アドレスNの前後に割り込み禁止命令および割り込み許可命令を仮想記憶させることとしたので、第1のオペレーティングシステム側での多重割り込みを回避することができるという効果を奏する。
【0186】
また、本発明によれば、第2の仮想メモリ空間の論理アドレスNの前後に割り込み禁止命令および割り込み許可命令を仮想記憶させることとしたので、第2のオペレーティングシステム側での多重割り込みを回避することができるという効果を奏する。
【0187】
また、本発明によれば、上記の発明のいずれか一つに記載されたマルチオペレーティングシステム制御方法をコンピュータに実行させるようにしたので、プログラムがコンピュータ読み取り可能となり、これによって、上記の発明のいずれか一つの動作をコンピュータによって実行することができるという効果を奏する。
【図面の簡単な説明】
【図1】本発明にかかる一実施の形態の概略構成を示すブロック図である。
【図2】同一実施の形態の具体的構成を示すブロック図である。
【図3】図2に示したI/O許可ビットマップを示す図である。
【図4】同一実施の形態の動作原理を説明する図である。
【図5】同一実施の形態の動作原理を説明する図である。
【図6】同一実施の形態の動作例1を説明する図である。
【図7】同一実施の形態の動作例1を説明する図である。
【図8】同一実施の形態の動作例1を説明するフローチャートである。
【図9】同一実施の形態の動作例1を説明するフローチャートである。
【図10】同一実施の形態の動作例1を説明するフローチャートである。
【図11】同一実施の形態の動作例2を説明する図である。
【図12】同一実施の形態の動作例2を説明する図である。
【図13】同一実施の形態の動作例2を説明するフローチャートである。
【図14】同一実施の形態の動作例2を説明するフローチャートである。
【図15】同一実施の形態の応用例1〜4を説明する図である。
【図16】同一実施の形態をシステム移行に適用した場合を説明する図である。
【図17】同一実施の形態を高セキュリティゲートウェイに適用した場合を説明する図である。
【図18】同一実施の形態をデスクトップGrid端末に適用した場合を説明する図である。
【図19】同一実施の形態を遠隔管理端末に適用した場合を説明する図である。
【図20】同一実施の形態を高効率ネットサービス提供端末に適用した場合を説明する図である。
【図21】同一実施の形態を高セキュリティWebサービス提供サーバに適用した場合を説明する図である。
【図22】同一実施の形態の変形例の構成を示すブロック図である。
【図23】従来のマルチオペレーティングシステムの構成例1を示すブロック図である。
【図24】従来のマルチオペレーティングシステムの構成例2を示すブロック図である。
【符号の説明】
10 ハードウェア
17 LANカード
20 ,20 OS
11 制御部
12 物理メモリ
21 ,21 割り込み振分処理部
22 ,22 割り込み処理部
26 ,26 I/O許可ビットマップ
40 ,40 仮想メモリ空間
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a multi-operating system control method for operating a plurality of operating systems on one computer, a program for causing a computer to execute the method, and a multi-operating system control device. The present invention relates to a multi-operating system control method capable of improving processing capability, a program for causing a computer to execute the method, and an operating system control device.
[0002]
[Prior art]
In an ordinary computer, one operating system operates, which manages computer resources such as a processor, a memory, and a secondary storage device of the computer, and implements a resource schedule so that the computer can operate efficiently. 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), those that are excellent in GUI (Graphical User Interface).
[0003]
On the other hand, there is a need to simultaneously execute these plural operating systems on one computer. For example, in a large-scale computer, there is a demand to operate an operating system for executing online processing associated with actual work and an operating system for development on one computer. Alternatively, there is a demand that an operating system having a GUI and an operating system having an excellent real-time property be operated at the same time.
[0004]
However, each operating system is designed on the assumption that computer resources are managed independently. Therefore, coexistence of a plurality of operating systems is not possible without some mechanism.
[0005]
As a mechanism for operating a plurality of operating systems on one computer, there is a virtual computer system implemented by a large computer. FIG. 23 is a block diagram showing a configuration example 1 of a conventional multi-operating system based on the virtual computer system.
[0006]
The multi-operating system shown in FIG. 1 includes hardware 1, a base OS 2, a VM (Virtual Machine) monitor 3, and a virtual OS (operating system) 4. 1 , Virtual OS4 2 And virtual OS4 3 It is composed of
[0007]
The hardware 1 is a CPU (Central Processing Unit), a physical memory, an input / output device, and the like. The base OS 2 and the VM monitor 3 control all of the hardware 1. VM monitor 3 is a virtual OS 4 1 ~ 4 3 Emulates an interface to the respective hardware 1. Virtual OS4 1 ~ 4 3 Runs on the platform OS2. That is, the base OS 2 and the virtual OS 4 1 ~ 4 3 Are in a master-slave relationship.
[0008]
As a technique for providing an interface of a plurality of operating systems with one computer, there is a microkernel method. FIG. 24 is a block diagram showing a configuration example 2 of the conventional multi-operating system based on the microkernel system.
[0009]
The multi-operating system shown in FIG. 1 includes a hardware 5, a microkernel (control program) 6, and an OS7. 1 , OS7 2 And OS7 3 It is composed of
[0010]
In the microkernel system, on the microkernel 6, an OS 7 providing an operating system function to be shown to the user is provided. 1 ~ 7 3 Has been built. User is OS7 1 ~ 7 3 Via the hardware 5 (computer resources). Microkernel 6 is OS7 1 ~ 7 3 Control.
[0011]
[Patent Document 1]
JP 2001-21672 A
[Patent Document 2]
JP-A-11-149385
[Patent Document 3]
JP 2000-330806 A
[Patent Document 4]
JP 2001-175486 A
[0012]
[Problems to be solved by the invention]
By the way, as described above, in the conventional multi-operating system shown in FIG. 23, the hardware 1 is controlled by one base OS 2, so that the stop of the base OS 2 causes a system down and low reliability. There was a problem.
[0013]
In the multi-operating system, the virtual OS 4 is controlled by the VM monitor 3. 1 ~ 4 3 However, the emulation of this interface takes a long time to emulate, and there is a problem in processing capability that there are many operational defects and restrictions.
[0014]
Here, by modifying the base OS 2, the above-mentioned operation defects and restrictions are reduced, but disadvantages arise in that the versatility is reduced and the modification is troublesome.
[0015]
Further, in the conventional multi-operating system shown in FIG. 1 ~ 7 3 Therefore, there is a problem that the system is down due to the stop of the microkernel 6 and the reliability is low.
[0016]
The present invention has been made in view of the above, and has a multi-operating system control method capable of improving the reliability and processing capability of a multi-operating system, a program for causing a computer to execute the method, and a multi-operating system control device The purpose is to provide.
[0017]
[Means for Solving the Problems]
In order to achieve the above object, in a multi-operating system control method according to the present invention, a first switching instruction for switching from the first operating system to the second operating system is transmitted to the first operating system. A first virtual storage step of virtually storing data at a logical address N of a first virtual memory space corresponding to an operating system; and various instructions to a second virtual memory space corresponding to the second operating system at a logical address N + 1 and thereafter. A virtual storage step of virtually storing, and among the plurality of access destinations in the first operating system, an access prohibition setting step of setting access prohibition to an access destination that triggers switching of the operating system, The first operating system When the first operating system attempts to access the access destination for which access is prohibited, the first operating system is triggered by the first switching instruction to cause the first operating system to switch from the second operating system to the second operating system. And the second operating system executes the various instructions at and after the logical address N + 1 in the second virtual memory space.
[0018]
According to the present invention, the first switching instruction is virtually stored in the logical address N of the first virtual memory space corresponding to the first operating system, and various instructions are stored in the second virtual memory space after the logical address N + 1. Virtual storage is performed, and among the plurality of access destinations in the first operating system, an access destination that is used as a trigger for operating system switching is set to access prohibition. When an attempt is made to access the destination first, this is used as a trigger to switch from the first operating system to the second operating system according to the first switching instruction, and the second operating system issues a logical address of the second virtual memory space. Execute various instructions after N + 1 Since the the a, common part, such as a conventional base OS and VM monitor is not required, reliability of the operating system, it is possible to improve the processing capacity.
[0019]
Further, according to the present invention, since the conventional common part is unnecessary, the first operating system and the second operating system can be operated independently, and security can be improved.
[0020]
In the multi-operating system control method according to the next invention, in the second virtual storage step, a second switching command for switching from the second operating system to the first operating system is transmitted to the second virtual storage step. Virtual storage at a logical address N in the virtual memory space of the second operating system, and the first operating system uses the first switching instruction to trigger the access to the prohibited access destination in response to the first switching instruction. The first operating system is switched to the second operating system, and the second operating system executes the various instructions after the logical address N + 1 of the second virtual memory space, and then executes the second switching instruction. , From the second operating system And switches to the serial first operating system.
[0021]
According to the present invention, the second switching instruction is virtually stored in the logical address N of the second virtual memory space, and after the switching is performed by the first switching instruction, the second operating system executes the second switching instruction. After executing various instructions after the logical address N + 1 in the virtual memory space, the second switching instruction is used to switch from the second operating system to the first operating system, so that switching and switching back can be performed smoothly. Can be.
[0022]
In the multi-operating system control method according to the next invention, the second operating system causes the access destination to execute a predetermined process before executing switching according to the second switching command. And
[0023]
According to the present invention, since the second operating system causes the access destination to execute the predetermined process before executing the switching by the second switching command, an unauthorized attack on the first operating system is prevented. can do.
[0024]
In the multi-operating system control method according to the next invention, the access destination is an I / O port.
[0025]
According to the present invention, since the access destination is the I / O port, it is possible to prevent an unauthorized attack on the first operating system.
[0026]
In a multi-operating system control method according to the next invention, the access destination whose access is prohibited is a data communication port for performing data communication.
[0027]
According to the present invention, since the access destination whose access is prohibited is set to the data communication port for performing data communication, it is possible to prevent an unauthorized attack on the first operating system via the data communication.
[0028]
In the multi-operating system control method according to the next invention, in the first virtual storage step, an interrupt disable instruction and an interrupt enable instruction are virtually stored before and after a logical address N in the first virtual memory space. It is characterized by.
[0029]
According to the present invention, since the interrupt disable instruction and the interrupt enable instruction are virtually stored before and after the logical address N in the first virtual memory space, it is possible to avoid multiple interrupts on the first operating system side. it can.
[0030]
In the multi-operating system control method according to the next invention, in the second virtual storage step, an interrupt disable instruction and an interrupt enable instruction are virtually stored before and after a logical address N in the second virtual memory space. It is characterized by.
[0031]
According to this invention, since the interrupt disable instruction and the interrupt enable instruction are virtually stored before and after the logical address N in the second virtual memory space, multiple interrupts on the second operating system side can be avoided. it can.
[0032]
A program according to the next invention is a program for causing a computer to execute the multi-operating system control method according to any one of the above inventions, and the program becomes readable by a computer. One of the operations can be performed by a computer.
[0033]
A multi-operating system control device according to the next invention is a multi-operating system control device for controlling a first operating system and a second operating system running on one computer, wherein the first operating system A first virtual storage space for virtually storing a first switching instruction for switching from the first operating system to the second operating system at a logical address N of a first virtual memory space corresponding to the first operating system; A second virtual storage space for virtually storing various instructions after a logical address N + 1 in a second virtual memory space corresponding to the second operating system; and an operating system among a plurality of access destinations in the first operating system. Cut Access prohibition setting means for setting an access destination to be an access trigger as an access trigger, wherein the first operating system attempts to access the access destination whose access is prohibited by the first operating system. In this case, using this as a trigger, the first switching instruction is used to switch from the first operating system to the second operating system, and the second operating system sets a logical address in the second virtual memory space. It is characterized by executing the above-mentioned various instructions after N + 1.
[0034]
According to the present invention, the first switching instruction is virtually stored in the logical address N of the first virtual memory space corresponding to the first operating system, and various instructions are stored in the second virtual memory space after the logical address N + 1. Virtual storage is performed, and among the plurality of access destinations in the first operating system, an access destination that is used as a trigger for operating system switching is set to access prohibition. When an attempt is made to access the destination first, this is used as a trigger to switch from the first operating system to the second operating system according to the first switching instruction, and the second operating system issues a logical address of the second virtual memory space. Execute various instructions after N + 1 Since the the a, common part, such as a conventional base OS and VM monitor is not required, reliability of the operating system, it is possible to improve the processing capacity.
[0035]
Also, according to the present invention, since the conventional common part is unnecessary, the first operating system and the second operating system can operate independently, and security can be improved.
[0036]
In the multi-operating system control device according to the next invention, the logical address N of the second virtual storage space includes a second switch for switching from the second operating system to the first operating system. An instruction is virtually stored, and the first operating system uses the first switching instruction to trigger the second operating instruction from the first operating system in response to an attempt to access the prohibited access destination. After the second operating system executes the various instructions after the logical address N + 1 of the second virtual memory space, the second operating system executes the second switching instruction to switch from the second operating system to the second operating system. The first operating system And switches to Temu.
[0037]
According to the present invention, the second switching instruction is virtually stored in the logical address N of the second virtual memory space, and after the switching is performed by the first switching instruction, the second operating system executes the second switching instruction. After executing various instructions after the logical address N + 1 in the virtual memory space, the second switching instruction is used to switch from the second operating system to the first operating system, so that switching and switching back can be performed smoothly. Can be.
[0038]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, an embodiment of a multi-operating system control method, a program for causing a computer to execute the method, and a multi-operating system control device according to the present invention will be described in detail with reference to the drawings.
[0039]
FIG. 1 is a block diagram showing a schematic configuration of an embodiment according to the present invention. The multi-operating system shown in FIG. 1 , OS20 2 And AP (application program) 30 1 ~ 30 4 , Virtual LAN (Local Area Network) device driver 50 1 , LAN device driver 50 2 And a shared memory area 60.
[0040]
In the multi-operating system, the OS 20 1 From OS20 2 Or OS20 2 From OS20 1 Is switched in the interrupt processing routine. As an interrupt generation factor, of the I / O (Input / Output) ports in the multi-operating system, an I / O port corresponding to the LAN card 17 is set in advance to access prohibition, and access to the I / O port is prohibited. A general protection exception (for example, 0x0D in the IA-32 Intel (registered trademark) architecture of Intel Corporation of the United States) that occurs in the event of occurrence. The LAN card 17 is connected to the LAN 70 and is a network interface card.
[0041]
Here, in the multi-operating system, the OS 20 1 Causes the above general protection exception to occur when the OS 20 transmits data to the LAN 70 via the LAN card 17, 1 From OS20 2 OS20 with switch to firewall function 2 OS switching control for transmitting data to the LAN 70 from the LAN card 17 via the LAN card 17 is performed.
[0042]
OS20 1 Receives the data via the LAN card 17, generates the above-mentioned general protection exception, and 1 From OS20 2 OS20 with switch to firewall function 2 , The data is received by the LAN card 17 and the data is transmitted to the OS 20. 1 OS switching control of transferring the data to the OS is performed.
[0043]
FIG. 2 is a block diagram showing a specific configuration of one embodiment. In this figure, parts corresponding to respective parts in FIG. 1 are denoted by the same reference numerals. In FIG. 1, hardware 10 is a computer resource, and includes a control unit 11, a physical memory 12, an interrupt vector table register 13, a page table register 14, other registers 15, a program counter 16, a LAN card 17, a keyboard (not shown), It is composed of a display and the like.
[0044]
The hardware 10 includes a multi-configuration OS 20 1 And OS20 2 Exists. OS20 1 And OS20 2 Manage the computer resources of the hardware 10 and are switched in the interrupt processing routine. That is, considering a certain period of time, the hardware 10 is provided with one OS (the OS 20). 1 Or OS20 2 ).
[0045]
OS20 1 Is the interrupt distribution processing unit 21 1 , Interrupt processing unit 22 1 , Interrupt vector table 23 1 , Page table 24 1 , Register save area 25 1 , I / O permission bitmap 26 1 , Kernel stack 27 1 And so on. AP30 1 And AP30 2 Is OS20 1 An application program that runs on top.
[0046]
On the other hand, OS20 2 Is OS20 1 The interrupt distribution processing unit 21 2 , Interrupt processing unit 22 2 , Interrupt vector table 23 2 , Page table 24 2 , Register save area 25 2 , I / O permission bitmap 26 2 , Kernel stack 27 2 And so on. AP30 3 And AP30 4 Is OS20 2 An application program that runs on top.
[0047]
In the hardware 10, the control unit 11 is a CPU or the like, and controls each unit by executing a program. The physical memory 12 is a physically large-capacity storage device, and is used in a virtual storage control method as shown in FIG. 4A, and actually stores various instructions, data, and the like.
[0048]
That is, in one embodiment, the virtual memory space 40 corresponds to the physical memory 12. 1 And virtual memory space 40 2 Is virtually built. Virtual memory space 40 1 Is OS20 1 The OS physical memory area 12a of the physical memory 12 1 And AP physical memory area 12b 1 Is mapped to
[0049]
Specifically, the OS virtual memory space 40a 1 Is OS20 1 Is a memory space used by the OS, and the OS physical memory area 12a 1 Is mapped to AP virtual memory space 40b 1 Is AP30 1 And AP30 2 Is the memory space used by the AP, and the AP physical memory area 12b 1 Is mapped to
[0050]
On the other hand, the virtual memory space 40 2 Is OS20 2 The OS physical memory area 12a of the physical memory 12 2 And AP physical memory area 12b 2 Is mapped to
[0051]
Specifically, the OS virtual memory space 40a 2 Is OS20 2 Is a memory space used by the OS, and the OS physical memory area 12a 2 Is mapped to AP virtual memory space 40b 2 Is AP30 3 And AP30 4 Is the memory space used by the AP, and the AP physical memory area 12b 2 Is mapped to
[0052]
In the physical memory 12, a physical address is assigned to a physical storage unit. On the other hand, the virtual memory space 40 1 And virtual memory space 40 2 In, an instruction or data is specified by a logical address used in a program. In the virtual storage control method, a logical address is converted to a physical address by a paging method, a segmentation method, or a paging / segmentation method.
[0053]
In the paging method, address conversion is performed in blocks (4 kilobytes) called pages. For this reason, OS20 1 In the virtual memory space 40 1 Page table (conversion table) 24 indicating to which physical page of the physical memory 12 the virtual page corresponds to 1 Is provided. Similarly, the OS 20 2 Also in the virtual memory space 40 2 Page table (conversion table) 24 indicating which page of the physical memory 12 corresponds to 2 Is provided.
[0054]
Also, as shown in FIG. 4B, the virtual memory space 40 1 Address N (logical address) of the OS 20 1 From OS20 2 A switching command A for switching to is stored. On the other hand, the virtual memory space 40 2 In the virtual memory space 40 1 In the same address N as the address N, the OS 20 2 From OS20 1 A switching command B for switching to is stored.
[0055]
Returning to FIG. 2, the interrupt vector table register 13 stores an interrupt vector table 23 described later. 1 Or the interrupt vector table 23 2 Is a register that indicates the start logical address of the. The interrupt vector table 23 1 Or the interrupt vector table 23 2 The logical address corresponding to the interrupt processing of the corresponding interrupt number is stored in the logical address destination stored at the offset of (1). For example, when an interrupt of a general protection exception (interrupt number 0x0D) occurs, the control unit 11 (CPU) 1 Or the interrupt vector table 23 2 Jump to the interrupt processing routine corresponding to the general protection exception at the logical address stored at the logical address stored at the offset 0x0D.
[0056]
The page table register 14 stores a page table 24 described later. 1 Or page table 24 2 Is a register that stores the page index to The other register 15 is a general-purpose register, a flag register, or the like. The program counter 16 increments a logical address for fetching an instruction from the virtual memory space by one. The LAN card 17 is a card that is connected to the LAN 70 and controls data communication.
[0057]
OS20 1 In the interrupt distribution processing unit 21 1 Is the interrupt vector table 23 indicated by the interrupt vector table register 13 when an interrupt occurs. 1 To jump to a predetermined interrupt processing routine. The interrupt distribution processing unit 21 1 May be executed by the control unit 11 (CPU).
[0058]
Interrupt processing unit 22 1 Are interrupt processing routines, OS switching processing (OS 20 1 From OS20 2 ). Interrupt vector table 23 1 The logical address corresponding to the interrupt process for each of the above-described interrupt numbers is stored in the logical address destination stored in each offset of the above. Page table 24 1 Is the virtual memory space 40 1 5 is a table showing a correspondence relationship between each virtual page of FIG. 4A and each physical page of the physical memory 12.
[0059]
Register save area 25 1 Is an area for saving the contents of registers (interrupt vector table register 13, page table register 14, and other registers 15) corresponding to the OS before switching when the OS is switched. Specifically, the OS 20 1 From OS20 2 To the register save area 25 1 As shown in FIG. 4A, the OS 20 1 Is saved.
[0060]
I / O permission bitmap 26 1 Is OS20 1 This is a bitmap that specifies permission or prohibition of access to the I / O port from the side. In practice, the I / O permission bitmap 26 1 Is in a TSS (Task State Segment) that exists in each task. The I / O port is a port corresponding to a device having an input / output function in the operating system (for example, the LAN card 17).
[0061]
FIG. 3 shows the I / O permission bitmap 26. 1 An example of the configuration will be described. I / O permission bitmap 26 1 As shown in the figure, an I / O port is specified by an I / O address composed of a combination of a hexadecimal notation (000 to FFF) in a vertical direction and a hexadecimal notation (0 to F) in a horizontal direction. If access to the I / O port is permitted, the I / O permission bitmap 26 1 In this case, “0” is set to the I / O address corresponding to the I / O port.
[0062]
On the other hand, when access to the I / O port is prohibited, the I / O permission bitmap 26 1 In this example, "1" is set to the I / O address corresponding to the I / O port.
[0063]
I / O permission bitmap 26 1 In the case of (1), "1" is set in a portion (portion surrounded by a thick line) where the I / O address is 0026 (hexadecimal) to 002A (hexadecimal), and "0" is set in other portions. I have.
[0064]
The I / O port whose I / O address is specified by 0026 (hexadecimal) to 002A (hexadecimal) corresponds to the LAN card 17. That is, access to the LAN card 17 is prohibited. When an attempt is made to access the LAN card 17, an interrupt occurs due to a general protection exception. The kernel stack 27 shown in FIG. 1 Stores operands of various instructions.
[0065]
On the other hand, OS20 2 In the interrupt distribution processing unit 21 2 Is the interrupt vector table 23 indicated by the interrupt vector table register 13 when an interrupt occurs. 2 To jump to a predetermined interrupt processing routine. The interrupt distribution processing unit 21 2 May be executed by the control unit 11 (CPU).
[0066]
Interrupt processing unit 22 2 Are interrupt processing routines, OS switching processing (OS 20 2 From OS20 1 ). Interrupt vector table 23 2 The logical address corresponding to the interrupt process for each of the above-described interrupt numbers is stored in the logical address destination stored in each offset of the above. Page table 24 2 Is the virtual memory space 40 2 5 is a table showing a correspondence relationship between each virtual page of FIG. 4A and each physical page of the physical memory 12.
[0067]
Register save area 25 2 Is an area for saving the contents of registers (interrupt vector table register 13, page table register 14, and other registers 15) corresponding to the OS before switching when the OS is switched. Specifically, the OS 20 2 From OS20 1 To the register save area 25 2 As shown in FIG. 4A, the OS 20 2 Is saved.
[0068]
I / O permission bitmap 26 2 Is the I / O permission bitmap 26 1 This is a bit map that defines the permission or prohibition of access to the I / O port. Kernel stack 27 2 Stores operands of various instructions. In practice, the I / O permission bitmap 26 2 Also exist in the above-mentioned TSS which exists in each task.
[0069]
Virtual LAN device driver 50 1 Is OS20 1 And a driver for LAN communication. This virtual LAN device driver 50 1 Are virtually provided, and the LAN device driver 50 2 (LAN communication driver function) is emulated. LAN device driver 50 2 Is OS20 1 And a driver for LAN communication. The shared memory area 60 stores the OS 20 during LAN communication. 1 And OS20 2 This is a memory area (buffer) for transferring data to and from the physical memory 12 as shown in FIG.
[0070]
Next, the operation principle of the embodiment will be described with reference to FIG. In FIG. 1 When a data transmission request occurs on the side, the virtual LAN device driver 50 1 Prepares data to be transmitted in (1) and stores it in the shared memory area 60. In (2), the virtual LAN device driver 50 1 Issues an I / O instruction.
[0071]
Thereby, the I / O permission bitmap 26 1 (See FIG. 3). In this case, since the I / O port corresponding to the I / O address (I / O address space 80) is set to the access prohibition, in (3), the general protection exception Occurs. As a result, the OS becomes OS 20 1 From OS20 2 (See FIG. 4B).
[0072]
In (4), I / O analysis is performed, and in (5), the LAN device driver 50 2 Is started. In (6), data stored in the shared memory area 60 is copied to another area. In (7), an I / O command is issued and the data is transmitted to the LAN 70 via the LAN card 17. In (8), the interrupt is returned ((9)).
[0073]
Next, operation examples 1 and 2 of the embodiment will be described with reference to FIGS.
[0074]
(Operation example 1)
6 and 7 are diagrams illustrating an operation example 1 of the embodiment. In the operation example 1, the virtual memory space 40 1 And virtual memory space 40 2 Various instructions corresponding to the processing shown in FIGS. 6 and 7 are assigned to the respective logical addresses.
[0075]
In the first operation example, the OS 20 1 Transmitting data via the LAN card 17 will be described. In the example of FIG. 1 Is operating and the OS 20 2 Is in a standby state. When data transmission is performed in this state, in FIG. 1 Is the virtual LAN device driver 50 1 Pass the data to. Virtual LAN device driver 50 1 Stores data in the shared memory area 60.
[0076]
In (b), the virtual LAN device driver 50 1 Issues an I / O command for accessing an I / O port (for example, I / O address = 26 (hexadecimal)) corresponding to the LAN card 17. In this case, the I / O permission bitmap 26 shown in FIG. 1 In this case, since “1” (access prohibited) is set in the portion corresponding to 26 (hexadecimal), the OS 20 1 The control unit 11 stores the interrupt number corresponding to the general protection exception in the interrupt vector table register 13, and the kernel stack 27 1 And the operand of the instruction that caused the general protection exception.
[0077]
Interrupt distribution processing unit 21 1 In (1), based on the interrupt number of the interrupt vector table register 13, 1 And jump to the interrupt processing of the general protection exception.
[0078]
Thereby, in (2), the interrupt processing unit 22 1 Is the virtual memory space 40 1 Address L, kernel stack 27 1 The instruction operand and the like are obtained from address L + 1, and the comparison of the instruction operand indicates whether the interrupt is an interrupt due to a general protection exception generated by an I / O instruction for accessing an I / O port of LAN card 17. Judge. At address L + 2, the interrupt processing unit 22 1 Jumps to address N + i if the result of the determination is "No".
[0079]
In this case, if the result of the determination is “Yes”, the interrupt processing unit 22 1 Executes an interrupt disable instruction. As a result, other interrupts are not accepted.
[0080]
Next, in the OS switching process (save the register in the register save area), the OS 20 1 The contents of the interrupt vector table register 13, page table register 14, and other registers 15 corresponding to the 1 Evacuated to
[0081]
In the next OS switching process (IDTR switching command), the interrupt vector table register 13 stores the OS 20 1 From OS20 2 Can be switched for In the next OS switching process (page table register change instruction), the virtual memory space 40 1 , The page table register 14 is stored in the OS 20 1 From OS20 2 Changed for Thereby, the OS 20 1 From OS20 2 Is switched to ((3)).
[0082]
Virtual memory space 40 2 In the next OS switching process (restoring the register from the register save area), the virtual memory space 40 2 Of the register save area 25 2 OS20 that was evacuated to 2 Are restored to the interrupt vector table register 13, page table register 14, and other registers 15, respectively ((4)).
[0083]
Next, the interrupt processing unit 22 2 Executes the interrupt enable routine and then sequentially executes the interrupt processing routine. Next, the interrupt processing unit 22 2 Is the register save area 25 2 OS20 in 1 Turn on the LAN access flag. This LAN access flag indicates that the OS 20 1 Indicates that data is transmitted from the LAN card 17 (I / O port) based on the instruction from
[0084]
Next, the interrupt processing unit 22 2 Is the LAN device driver 50 2 (Call) ((5)). Thus, in (6), the LAN device driver 50 2 Copies the data in the shared memory area 60 to the transmission buffer of the shared memory area 60. Next, the LAN device driver 50 2 Transmits the data to the LAN 70 and then returns ((7)). Virtual memory space 40 2 At address S, IRET (interrupt return instruction) is executed ((8)).
[0085]
Then, in (9) shown in FIG. 7, the LAN card 17 generates a LAN interrupt to notify that the data transmission has ended. Thereby, the virtual memory space 40 2 The interrupt processing routine is executed at the address M ((10)).
[0086]
Next, the register save area 25 2 OS20 in 1 Is referred to. Next, if the LAN access flag is OFF, the interrupt processing unit 22 2 Jumps to address N + P (IRET). In this case, since the LAN access flag is ON, the interrupt processing unit 22 2 Returns the LAN access flag from ON to OFF.
[0087]
Next, an interrupt disable instruction is executed. In the next OS switching process (the register is saved in the register save area), the OS 20 2 The contents of the interrupt vector table register 13, page table register 14, and other registers 15 corresponding to the 2 Evacuated to
[0088]
In the next OS switching process (IDTR switching command), the interrupt vector table register 13 stores the OS 20 2 From OS20 1 Can be switched for In the next OS switching process (page table register change instruction), the virtual memory space 40 2 , The page table register 14 is stored in the OS 20 2 From OS20 1 Changed for Thereby, the OS 20 2 From OS20 1 Is switched to ((11)).
[0089]
Virtual memory space 40 1 In the next OS switching process (restoring the register from the register save area), the virtual memory space 40 1 At the address N + 1 of the register save area 25 1 OS20 that was evacuated to 1 Are restored to the interrupt vector table register 13, page table register 14, and other register 15, respectively ((12)).
[0090]
Next, an interrupt enable command is executed, and a LAN interrupt is generated by a software interrupt. Next, IRET (interrupt return instruction) is executed ((13)). Thereby, the interrupt processing unit 22 1 Executes the interrupt processing routine at address N + i as LAN interrupt processing. Then, an IRET (interrupt return instruction) is executed, and the processing routine returns from the interrupt processing routine to the normal processing routine ((14)).
[0091]
8 to 10 are flowcharts illustrating the first operation example. In FIG. 8, in step SA1, the OS 20 1 Is the virtual LAN device driver 50 1 Pass the data to. Virtual LAN device driver 50 1 Stores data in the shared memory area 60.
[0092]
In step SA2, the virtual LAN device driver 50 1 Issues an I / O command for accessing an I / O port corresponding to the LAN card 17. In step SA3, the I / O permission bitmap 26 shown in FIG. 1 It is assumed that “1” (access prohibited) is set in a portion corresponding to the I / O port 1 Side generates a general protection exception interrupt.
[0093]
The control unit 11 stores the interrupt number corresponding to the general protection exception in the interrupt vector table register 13 and stores the interrupt number in the kernel stack 27. 1 And the operand of the instruction that caused the general protection exception.
[0094]
In step SA4, the interrupt distribution processing unit 21 1 Acquires the interrupt number from the interrupt vector table register 13. In step SA5, the interrupt distribution processing unit 21 1 Is based on the interrupt number of the interrupt vector table register 13, 1 And jump to the logical address where the interrupt processing of the general protection exception is performed.
[0095]
At step SA6, an interrupt processing routine corresponding to the general protection exception is executed. In step SA7, the interrupt processing unit 22 1 Is the kernel stack 27 1 More instruction operands and the like are obtained. In step SA8, the interrupt processing unit 22 1 Determines whether the interrupt is an interrupt due to a general protection exception generated by an I / O instruction for accessing the I / O port of the LAN card 17 by comparing the instruction operands.
[0096]
In step SA9, the interrupt processing unit 22 1 Jumps to address N + i if the result of the determination is "No". In step SA10, the interrupt processing unit 22 1 Executes the interrupt disable instruction because the result of the determination is "Yes".
[0097]
In step SA11, an OS switching process (save the register in the register save area) is executed, and the OS 20 1 The contents of the interrupt vector table register 13, page table register 14, and other registers 15 corresponding to the 1 Evacuated to
[0098]
In step SA12, an OS switching process (IDTR switching command) is executed, and the interrupt vector table register 13 stores 1 From OS20 2 Can be switched for In step SA13, an OS switching process (page table register change instruction) is executed, and the virtual memory space 40 1 , The page table register 14 is stored in the OS 20 1 From OS20 2 Changed for Thereby, the OS 20 1 From OS20 2 Can be switched to
[0099]
Virtual memory space 40 2 In step SA14, the OS switching process (restore the register from the register save area) is executed, and the virtual memory space 40 2 Of the register save area 25 2 OS20 that was evacuated to 2 Are restored to the interrupt vector table register 13, page table register 14, and other registers 15, respectively.
[0100]
In step SA15, the interrupt processing unit 22 2 Executes an interrupt enable instruction. In step SA16, the interrupt processing unit 22 2 Executes the interrupt processing routine sequentially. In step SA17, the interrupt processing unit 22 2 Is the register save area 25 2 OS20 in 1 Turn on the LAN access flag.
[0101]
In step SA18, the interrupt processing unit 22 2 Is the LAN device driver 50 2 CALL (call). In step SA19 shown in FIG. 2 Copies the data in the shared memory area 60 to the transmission buffer of the shared memory area 60.
[0102]
In step SA20, the LAN device driver 50 2 Transmits the data to the LAN 70. In step SA21, the LAN device driver 50 2 Returns to the interrupt processing. In step SA22, an IRET (interrupt return instruction) is executed.
[0103]
In step SA23, the process waits. In step SA24, the LAN card 17 generates a LAN interrupt to notify that the data transmission has ended. In step SA25, the virtual memory space 40 2 The interrupt processing routine is executed at address M.
[0104]
In step SA26, the register save area 25 2 OS20 in 1 Is referred to. In step SA27, if the LAN access flag is OFF, the interrupt processing unit 22 2 Jumps to address N + P (IRET), and an IRET (interrupt return instruction) is executed in step SA32. In this case, since the LAN access flag is ON, the interrupt processing unit 22 2 Returns the LAN access flag from ON to OFF.
[0105]
In step SA28, an interrupt disable instruction is executed. At step SA29, an OS switching process (save the register in the register save area) is executed, and the OS 20 2 The contents of the interrupt vector table register 13, page table register 14, and other registers 15 corresponding to the 2 Evacuated to
[0106]
In step SA30, an OS switching process (IDTR switching instruction) is executed, and the interrupt vector table register 13 stores 2 From OS20 1 Can be switched for In step SA31, an OS switching process (page table register change instruction) is executed, and the virtual memory space 40 2 , The page table register 14 is stored in the OS 20 2 From OS20 1 Changed for Thereby, the OS 20 2 From OS20 1 Can be switched to
[0107]
Virtual memory space 40 1 In step SA33 shown in FIG. 10, the OS switching process (restoring the register from the register save area) is executed, and the virtual memory space 40 1 At the address N + 1 of the register save area 25 1 OS20 that was evacuated to 1 Are restored to the interrupt vector table register 13, page table register 14, and other registers 15, respectively.
[0108]
In step SA34, an interrupt permission instruction is executed. In step SA35, a LAN interrupt is generated by a software interrupt. In step SA36, an IRET (interrupt return instruction) is executed.
[0109]
At Step SA37, once the OS 20 1 The control returns to the step (1), a LAN interrupt occurs, and the interrupt distribution processing unit 21 1 And jumps to the interrupt processing routine. In step SA38, the interrupt processing unit 22 1 Executes an interrupt processing routine at address N + i as LAN interrupt processing. In step SA39, an IRET (interrupt return instruction) is executed, and the processing routine returns from the interrupt processing routine to the normal processing routine.
[0110]
(Operation example 2)
FIG. 11 and FIG. 12 are diagrams illustrating Operation Example 2 of the embodiment. In the operation example 2, the virtual memory space 40 1 And virtual memory space 40 2 Various instructions corresponding to the processing shown in FIGS. 11 and 12 are assigned to each logical address.
[0111]
In the operation example 2, the OS 20 1 Receiving data via the LAN card 17 will be described. In the example of FIG. 1 Is operating and the OS 20 2 Is in a standby state. In this state, in (a), when the LAN card 17 receives data, a LAN interrupt occurs.
[0112]
In (b), the virtual LAN device driver 50 1 Issues an I / O command for accessing an I / O port (for example, I / O address = 26 (hexadecimal)) corresponding to the LAN card 17. In this case, the I / O permission bitmap 26 shown in FIG. 1 Since “1” (access prohibited) is set in the portion corresponding to the above I / O port, the OS 20 1 The control unit 11 stores the interrupt number corresponding to the general protection exception in the interrupt vector table register 13, and the kernel stack 27 1 And the operand of the instruction that caused the general protection exception.
[0113]
Interrupt distribution processing unit 21 1 In (1), based on the interrupt number of the interrupt vector table register 13, 1 And jump to the interrupt processing of the general protection exception.
[0114]
Thereby, in (2), the interrupt processing unit 22 1 Is the virtual memory space 40 1 Address L, kernel stack 27 1 The instruction operand and the like are obtained from address L + 1, and the comparison of the instruction operand indicates whether the interrupt is an interrupt due to a general protection exception generated by an I / O instruction for accessing an I / O port of LAN card 17. Judge. At address L + 2, the interrupt processing unit 22 1 Jumps to address N + i if the result of the determination is "No".
[0115]
In this case, if the result of the determination is “Yes”, the interrupt processing unit 22 1 Executes an interrupt disable instruction. As a result, other interrupts are not accepted.
[0116]
Next, in the OS switching process (save the register in the register save area), the OS 20 1 The contents of the interrupt vector table register 13, page table register 14, and other registers 15 corresponding to the 1 Evacuated to
[0117]
In the next OS switching process (IDTR switching command), the interrupt vector table register 13 stores the OS 20 1 From OS20 2 Can be switched for In the next OS switching process (page table register change instruction), the virtual memory space 40 1 , The page table register 14 is stored in the OS 20 1 From OS20 2 Changed for Thereby, the OS 20 1 From OS20 2 Is switched to ((3)).
[0118]
Virtual memory space 40 2 In the next OS switching process (restoring the register from the register save area), the virtual memory space 40 2 Of the register save area 25 2 OS20 that was evacuated to 2 Are restored to the interrupt vector table register 13, page table register 14, and other registers 15, respectively ((4)).
[0119]
Next, the interrupt processing unit 22 2 Executes the interrupt enable routine and then sequentially executes the interrupt processing routine. Next, the interrupt processing unit 22 2 Is the register save area 25 2 OS20 in 1 Turn on the LAN access flag.
[0120]
Next, a LAN interrupt is generated by a software interrupt. Next, an IRET (interrupt return instruction) is executed ((5)). As a result, in FIG. 1 Executes an interrupt processing routine sequentially at address X as LAN interrupt processing. Next, the interrupt processing unit 22 2 Is the LAN device driver 50 2 (Call) ((6)).
[0121]
LAN device driver 50 2 Copies the received data to the shared memory area 60. Thus, the data is stored in the OS 20 1 Can be obtained at Next, the process returns to the LAN interrupt process ((7)). Next, the register save area 25 2 OS20 in 1 Is referred to. Next, if the LAN access flag is OFF, the interrupt processing unit 22 2 Jumps to address N + P (IRET). In this case, since the LAN access flag is ON, the interrupt processing unit 22 2 Returns the LAN access flag from ON to OFF.
[0122]
Next, an interrupt disable instruction is executed. In the next OS switching process (the register is saved in the register save area), the OS 20 2 The contents of the interrupt vector table register 13, page table register 14, and other registers 15 corresponding to the 2 Evacuated to
[0123]
In the next OS switching process (IDTR switching command), the interrupt vector table register 13 stores the OS 20 2 From OS20 1 Can be switched for In the next OS switching process (page table register change instruction), the virtual memory space 40 2 , The page table register 14 is stored in the OS 20 2 From OS20 1 Changed for Thereby, the OS 20 2 From OS20 1 Is switched to ((9)).
[0124]
Virtual memory space 40 1 In the next OS switching process (restoring the register from the register save area), the virtual memory space 40 1 At the address N + 1 of the register save area 25 1 OS20 that was evacuated to 1 Are restored to the interrupt vector table register 13, page table register 14, and other register 15, respectively ((10)).
[0125]
Next, an interrupt enable command is executed, and a LAN interrupt is generated by a software interrupt. Next, an IRET (interrupt return instruction) is executed ((11)).
[0126]
13 and 14 are flowcharts for explaining the operation example 2 described above. In FIG. 13, in step SB1, when the LAN card 17 receives data, a LAN interrupt occurs.
[0127]
In step SB2, the virtual LAN device driver 50 1 Issues an I / O command for accessing an I / O port corresponding to the LAN card 17. In step SB3, the I / O permission bitmap 26 shown in FIG. 1 It is assumed that “1” (access prohibited) is set in a portion corresponding to the I / O port 1 Side generates a general protection exception interrupt.
[0128]
The control unit 11 stores the interrupt number corresponding to the general protection exception in the interrupt vector table register 13 and stores the interrupt number in the kernel stack 27. 1 And the operand of the instruction that caused the general protection exception.
[0129]
In step SB4, the interrupt distribution processing unit 21 1 Acquires the interrupt number from the interrupt vector table register 13. In step SB5, the interrupt distribution processing unit 21 1 Is based on the interrupt number of the interrupt vector table register 13, 1 And jump to the logical address where the interrupt processing of the general protection exception is performed.
[0130]
At step SB6, an interrupt processing routine corresponding to the general protection exception is executed. In step SB7, the interrupt processing unit 22 1 Is the kernel stack 27 1 More instruction operands and the like are obtained. In step SB8, the interrupt processing unit 22 1 Determines whether the interrupt is an interrupt due to a general protection exception generated by an I / O instruction for accessing the I / O port of the LAN card 17 by comparing the instruction operands.
[0131]
In step SB9, the interrupt processing unit 22 1 Jumps to address N + i if the result of the determination is "No". In step SB10, the interrupt processing unit 22 1 Executes the interrupt disable instruction because the result of the determination is "Yes".
[0132]
In step SB11, an OS switching process (save the register in the register save area) is executed, and the OS 20 1 The contents of the interrupt vector table register 13, page table register 14, and other registers 15 corresponding to the 1 Evacuated to
[0133]
In step SB12, an OS switching process (IDTR switching command) is executed, and the interrupt vector table register 13 1 From OS20 2 Can be switched for In step SB13, the OS switching process (page table register change instruction) is executed, and the virtual memory space 40 1 , The page table register 14 is stored in the OS 20 1 From OS20 2 Changed for Thereby, the OS 20 1 From OS20 2 Can be switched to
[0134]
Virtual memory space 40 2 In step SB14, the OS switching process (restore the register from the register save area) is executed, and the virtual memory space 40 2 Of the register save area 25 2 OS20 that was evacuated to 2 Are restored to the interrupt vector table register 13, page table register 14, and other registers 15, respectively.
[0135]
In step SB15, the interrupt processing unit 22 2 Executes an interrupt enable instruction. In step SB16, the interrupt processing unit 22 2 Executes the interrupt processing routine sequentially. In step SB17, the interrupt processing unit 22 2 Is the register save area 25 2 OS20 in 1 Turn on the LAN access flag.
[0136]
In step SB18, a LAN interrupt is generated by a software interrupt. In step SB19, an IRET (interrupt return instruction) is executed.
[0137]
In step SB20 shown in FIG. 14, an interrupt processing routine is executed, and it is determined whether the interrupt is a LAN interrupt when transmitting data or a LAN interrupt when receiving data. In step SB21, the interrupt processing unit 22 2 Is the LAN device driver 50 2 CALL (call).
[0138]
In step SB22, the LAN device driver 50 2 Copies the received data to the shared memory area 60. Thus, the data is stored in the OS 20 1 Can be obtained at In step SB23, the process returns to the LAN interrupt process.
[0139]
In step SB24, the register save area 25 2 OS20 in 1 Is referred to. In step SB25, if the LAN access flag is OFF, the interrupt processing unit 22 2 Jumps to address N + P (IRET) and executes IRET (interrupt return instruction) in step SB30. In this case, since the LAN access flag is ON, the interrupt processing unit 22 2 Returns the LAN access flag from ON to OFF.
[0140]
In step SB26, an interrupt disable instruction is executed. In step SB27, an OS switching process (save the register in the register save area) is executed, and the OS 20 2 The contents of the interrupt vector table register 13, page table register 14, and other registers 15 corresponding to the 2 Evacuated to
[0141]
In step SB28, an OS switching process (IDTR switching instruction) is executed, and the interrupt vector table register 13 2 From OS20 1 Can be switched for In step SB29, the OS switching process (page table register change instruction) is executed, and the virtual memory space 40 2 , The page table register 14 is stored in the OS 20 2 From OS20 1 Changed for Thereby, the OS 20 2 From OS20 1 Can be switched to
[0142]
Virtual memory space 40 1 In step SB31, the OS switching process (restore the register from the register save area) is executed, and the virtual memory space 40 1 At the address N + 1 of the register save area 25 1 OS20 that was evacuated to 1 Are restored to the interrupt vector table register 13, page table register 14, and other registers 15, respectively. In step SB32, an interrupt permission instruction is executed. In step SB33, an IRET (interrupt return instruction) is executed.
[0143]
FIGS. 15A to 15D are diagrams illustrating Application Examples 1 to 4 of the above-described embodiment. Application example 1 shown in FIG. 15A is an example in which new and old OSs coexist and are used at the time of system renewal. The new OS is, for example, the OS 20 1 It corresponds to. On the other hand, the old OS is OS20 2 It corresponds to.
[0144]
The application example 2 shown in FIG. 15B is an example in which a new function is speed-developed on the source-public OS without utilizing the source-public OS and waiting for the release of the source non-public OS. The source non-disclosed OS is an operating system whose source code is not disclosed. 1 It corresponds to. On the other hand, the open source OS is an operating system whose source code is open, and the OS 20 2 It corresponds to.
[0145]
Application example 3 shown in FIG. 15C is an example in which a dedicated OS and a general-purpose OS coexist. The dedicated OS shares functions specialized for real-time performance and the like. 1 It corresponds to. On the other hand, the general-purpose OS is Windows (registered trademark) of Microsoft Corporation, etc. 2 It corresponds to.
[0146]
The application example 4 shown in FIG. 15D is an example in which resources are divided, and the usage method differs depending on the purpose of use of OS1 and OS2. OS1 is, for example, OS20 1 It corresponds to. On the other hand, OS2 2 It corresponds to.
[0147]
FIG. 16 is a diagram illustrating a case where one embodiment is applied to system migration. In the figure, in the conventional migration work, it is necessary to migrate all the modules of the old OS mounted on the old terminal to the new OS of the new terminal at a time, and there is a concern about safety.
[0148]
On the other hand, if there is a multi-operating system, each module of the old OS installed in the old terminal is transferred to the old OS of the intermediate terminal while confirming safety. Next, in the intermediate terminal, each module of the old OS is transferred to the new OS while confirming the security.
[0149]
Next, all the modules of the new OS of the intermediate terminal are transferred at once to the new OS of the new terminal. In this case, no problem occurs because the transition is between new OSs. The transition by the multi-OS is effective when a new function is quickly added to a specific module.
[0150]
FIG. 17 is a diagram illustrating a case where one embodiment is applied to a high security gateway. In the figure, the hardware includes a multi-operating system (OS1 and OS2) and is connected to the Internet via a NIC (network interface card). This hardware functions as a high security gateway.
[0151]
The OS 1 manages an AP (application program) 1 used by a user and stores a communication log in a DK (disk) 1. On the other hand, the OS 2 monitors a communication packet from the Internet and accumulates a monitoring log in the DK 2.
[0152]
In the OS 2, the NIC is directly controlled to perform communication. For this reason, the OS2 provides the OS1 with a pseudo NIC-I / F that simulates an interface for providing software to the NIC in order to support the communication of the OS1. AP2 is an application program for collecting packet monitoring logs, and operates on OS2.
[0153]
The AP 2 does not infect the virus because it only looks at the communication packet from the outside and does not process the execution code included in the communication packet. The monitoring log stored in the DK2 is not falsified by a malicious third party. Therefore, it is possible to leave a trace of the attack.
[0154]
Here, when a security attack is performed on the environment of the user (such as the OS1), the communication log of the OS1 may be falsified. However, in one embodiment, the monitoring logs of the OS1 and the OS2 are separately managed by the multi-operating system, so that the attacker can be tracked. Thereby, an effect of suppressing an attack on the security gateway can be expected.
[0155]
FIG. 18 is a diagram illustrating a case where the embodiment is applied to a desktop Grid terminal. In FIG. 1, the hardware includes a multi-operating system (OS1 and OS2), and is connected to the Internet via an NIC. A Grid server is connected to the Internet. The hardware functions as a desktop grid terminal.
[0156]
The desktop grid terminal is a terminal for performing a desktop grid calculation for realizing the calculation by allocating a part of a large calculation while the user does not use the computer. Here, from the user's point of view, there is a concern that the above-mentioned calculation whose contents are unknown will adversely affect its own computer environment.
[0157]
Therefore, in the same figure, the above adverse effect can be eliminated by managing its own computer environment by OS1 and managing the grid calculation processing environment by OS2. That is, all data and programs used in the Grid calculation are managed and executed only under the control of the OS 2. On the other hand, access to computer resources such as DK1 and MEM (memory) 1 under the control of OS1 is not permitted. Therefore, an adverse effect from the grid calculation program is eliminated.
[0158]
FIG. 19 is a diagram illustrating a case where the embodiment is applied to a remote management terminal. In FIG. 1, the hardware includes a multi-operating system (OS1 and OS2) and is connected to a network via an NIC. A system administrator machine and other machines are connected to the network. The hardware functions as a remote management terminal.
[0159]
In the figure, a category that can be managed by a user is limited to OS1, and management of OS2 is performed by a system administrator machine via a network. This allows the system administrator to construct a default environment for a personal computer used in an office environment or the like under the control of the OS 2, while setting the environment to be used according to the personal preference or situation of the user under the control of the OS 1. Can be built with
[0160]
Therefore, it is possible to prevent the environment prepared by the system from causing an operation failure due to the user's personal environment setting. The OS 2 is managed by a system administrator on a system administrator machine and provides an environment designed on the system side. When using the environment, the user reads the file information of OS2 into OS1 and starts it, or requests OS2 to start it and executes it in a client / server mode.
[0161]
FIG. 20 is a diagram illustrating a case where one embodiment is applied to a high-efficiency network service providing terminal. In FIG. 1, the hardware includes a multi-operating system (OS1 and OS2) and is connected to a network via an NIC. A content provider server and other machines are connected to the network. The hardware functions as a highly efficient network service providing terminal.
[0162]
In the figure, the high-efficiency network service providing terminal is, like the remote management terminal (see FIG. 19), one OS1 under the management of the user and the other OS2 under the management of the net service. Is a terminal that distributes in advance the content under the management of the OS2 (DK2) and immediately uses the content from the DK1 managed by the OS1 at the release time.
[0163]
After the content is distributed from the content provider server to the DK2 under the management of the OS2 via the network, the content is provided from the DK2 to the DK1 under the management of the OS1 at the request of the user, and the content can be used immediately. . In this way, in the content provider server, concentration of download access is prevented by pre-delivery.
[0164]
FIG. 21 is a diagram illustrating a case where one embodiment is applied to a high security Web service providing server. In FIG. 1, the hardware includes a multi-operating system (OS1 and OS2) and is connected to a network via an NIC. A web browsing terminal is connected to the network. The hardware functions as a high security Web service providing server.
[0165]
In the high security Web service providing server shown in FIG. 1, an environment accessible from outside is OS2, and an environment accessible only by local users is OS1.
[0166]
For example, Web published contents and usage logs are stored in the DK2 managed by the OS2. On the other hand, data that is not desired to be disclosed is stored in the DK1 under the management of the OS1. In this case, it is possible to avoid a situation in which information that is not desired to be disclosed is erroneously disclosed on the Web due to a setting error or the like. Further, even when the OS2 side is attacked by a malicious third party from the outside, the OS1 can operate except for the network function.
[0167]
As described above, according to one embodiment, as shown in FIG. 1 Virtual memory space 40 corresponding to 1 Of the switching instruction A at the address N of the virtual memory space 40 2 Various instructions are virtually stored in the address N + 1 and after, and the OS 20 1 Out of a plurality of access destinations (I / O ports), the access destination (I / O port: for example, LAN card 17) that is used as a trigger for operating system switching is set to access prohibition, and the OS 20 1 Attempts to access an access destination (I / O port) for which access is prohibited, and using this as a trigger, the OS 20 1 From OS20 2 Switch to OS20 2 Is the virtual memory space 40 2 Are executed, the common parts such as the conventional base OS and VM monitor are not required, and the reliability and processing capability of the operating system can be improved.
[0168]
Further, according to the embodiment, since the conventional common part is unnecessary, the OS 20 1 And OS20 2 Can operate independently, and security can be improved.
[0169]
Also, according to one embodiment, the virtual memory space 40 2 The switching command B is virtually stored in the address N of the OS 20 and the switching is performed by the switching command A. 2 Is the virtual memory space 40 2 After execution of various instructions after the address N + 1, the OS 20 2 From OS20 1 , The switching and switching back can be performed smoothly.
[0170]
Further, according to the embodiment, before executing the switching by the switching command B, the OS 20 2 Causes the access destination (LAN card 17) to execute a predetermined process (such as data transmission). 1 Can prevent unauthorized attacks.
[0171]
According to the embodiment, the access destination is the I / O port. 1 Can prevent unauthorized attacks.
[0172]
Further, according to the embodiment, the access destination whose access is prohibited is the LAN card 17 (data communication port) for performing data communication. 1 Can prevent unauthorized attacks.
[0173]
Also, according to one embodiment, the virtual memory space 40 1 The interrupt disable command and the interrupt enable command are virtually stored before and after the address N. 1 Multiple interrupts on the side can be avoided.
[0174]
Also, according to one embodiment, the virtual memory space 40 2 The interrupt disable command and the interrupt enable command are virtually stored before and after the address N. 2 Multiple interrupts on the side can be avoided.
[0175]
An embodiment according to the present invention has been described in detail with reference to the drawings. However, a specific configuration example is not limited to the embodiment, and a design change within a range not departing from the gist of the present invention. The present invention is also included in the present invention.
[0176]
For example, in the above-described embodiment, a program for implementing multi-operating system control is recorded on the computer-readable recording medium 200 shown in FIG. Each function may be realized by causing the computer 100 shown in the figure to read and execute the functions.
[0177]
The computer 100 shown in FIG. 1 includes a CPU 110 that executes the above-described program, an input device 120 such as a keyboard and a mouse, a ROM (Read Only Memory) 130 that stores various data, and a RAM (Random) that stores calculation parameters and the like. Access Memory) 140, a reading device 150 that reads a program from the recording medium 200, an output device 160 such as a display and a printer, and a bus 170 that connects each unit of the device.
[0178]
After reading the program recorded on the recording medium 200 via the reading device 150, the CPU 110 executes the program to realize the functions described above. Note that the recording medium 200 includes an optical disk, a flexible disk, a hard disk, and the like.
[0179]
【The invention's effect】
As described above, according to the present invention, the first switching instruction is virtually stored at the logical address N of the first virtual memory space corresponding to the first operating system, and the logical address of the second virtual memory space is stored. Various instructions are virtually stored after N + 1, and among a plurality of access destinations in the first operating system, an access destination that is used as a trigger for switching the operating system is set to access prohibition. When an attempt is made to access an access destination for which access is prohibited, this is used as a trigger to switch from the first operating system to the second operating system according to a first switching instruction, and the second operating system switches to the second operating system. After the logical address N + 1 in the virtual memory space Since it was decided to run a seed instruction, intersection, such as a conventional base OS and VM monitor is not required, reliability of the operating system, an effect that it is possible to improve the processing capacity.
[0180]
Further, according to the present invention, since the conventional common part is unnecessary, the first operating system and the second operating system can be operated independently, and the security can be improved. Play.
[0181]
According to the present invention, the second switching instruction is virtually stored in the logical address N of the second virtual memory space, and after the switching is performed by the first switching instruction, the second operating system executes the second switching instruction. After executing various instructions after the logical address N + 1 of the second virtual memory space, the second switching instruction is used to switch from the second operating system to the first operating system, so that switching and switching back can be performed smoothly. This has the effect that it can be performed.
[0182]
Further, according to the present invention, the second operating system causes the access destination to execute the predetermined process before executing the switching by the second switching command, so that the first operating system can be attacked illegally. The effect that it can prevent is produced.
[0183]
Further, according to the present invention, since the access destination is set to the I / O port, it is possible to prevent an unauthorized attack on the first operating system.
[0184]
Further, according to the present invention, since the access destination whose access is prohibited is set to the data communication port for performing data communication, it is possible to prevent an unauthorized attack on the first operating system via the data communication. It works.
[0185]
Further, according to the present invention, since the interrupt disable instruction and the interrupt enable instruction are virtually stored before and after the logical address N in the first virtual memory space, multiple interrupts on the first operating system side are avoided. It has the effect of being able to.
[0186]
Further, according to the present invention, since the interrupt disable instruction and the interrupt enable instruction are virtually stored before and after the logical address N in the second virtual memory space, multiple interrupts on the second operating system side are avoided. It has the effect of being able to.
[0187]
Further, according to the present invention, the multi-operating system control method described in any one of the above-described inventions is caused to be executed by a computer, so that the program can be read by a computer. There is an effect that one of the operations can be executed by a computer.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a schematic configuration of an embodiment according to the present invention.
FIG. 2 is a block diagram showing a specific configuration of the same embodiment.
FIG. 3 is a diagram showing an I / O permission bitmap shown in FIG. 2;
FIG. 4 is a diagram illustrating the operation principle of the same embodiment.
FIG. 5 is a diagram illustrating an operation principle of the same embodiment.
FIG. 6 is a diagram illustrating an operation example 1 of the same embodiment.
FIG. 7 is a diagram illustrating an operation example 1 of the same embodiment.
FIG. 8 is a flowchart illustrating an operation example 1 of the same embodiment.
FIG. 9 is a flowchart illustrating an operation example 1 of the same embodiment.
FIG. 10 is a flowchart illustrating an operation example 1 of the same embodiment.
FIG. 11 is a diagram illustrating an operation example 2 of the same embodiment.
FIG. 12 is a diagram illustrating an operation example 2 of the same embodiment.
FIG. 13 is a flowchart illustrating an operation example 2 of the same embodiment.
FIG. 14 is a flowchart illustrating an operation example 2 of the same embodiment.
FIG. 15 is a diagram illustrating Application Examples 1 to 4 of the same embodiment.
FIG. 16 is a diagram illustrating a case where the same embodiment is applied to system migration.
FIG. 17 is a diagram illustrating a case where the same embodiment is applied to a high security gateway.
FIG. 18 is a diagram illustrating a case where the same embodiment is applied to a desktop Grid terminal.
FIG. 19 is a diagram illustrating a case where the same embodiment is applied to a remote management terminal.
FIG. 20 is a diagram illustrating a case where the same embodiment is applied to a high-efficiency network service providing terminal.
FIG. 21 is a diagram illustrating a case where the same embodiment is applied to a high security Web service providing server.
FIG. 22 is a block diagram showing a configuration of a modification of the same embodiment.
FIG. 23 is a block diagram showing a configuration example 1 of a conventional multi-operating system.
FIG. 24 is a block diagram illustrating a configuration example 2 of a conventional multi-operating system.
[Explanation of symbols]
10 Hardware
17 LAN card
20 1 , 20 2 OS
11 Control part
12 Physical memory
21 1 , 21 2 Interrupt distribution processing unit
22 1 , 22 2 Interrupt processing unit
26 1 , 26 2 I / O permission bitmap
40 1 , 40 2 Virtual memory space

Claims (10)

一つの計算機で稼動する第1のオペレーティングシステムおよび第2のオペレーティングシステムを制御するマルチオペレーティングシステム制御方法であって、
前記第1のオペレーティングシステムから前記第2のオペレーティングシステムへ切り替えるための第1の切替命令を、前記第1のオペレーティングシステムに対応する第1の仮想メモリ空間の論理アドレスNに仮想記憶させる第1の仮想記憶工程と、
前記第2のオペレーティングシステムに対応する第2の仮想メモリ空間の論理アドレスN+1以降に各種命令を仮想記憶させる第2の仮想記憶工程と、
前記第1のオペレーティングシステムにおける複数のアクセス先のうち、オペレーティングシステム切り替えのトリガーとするアクセス先をアクセス禁止に設定するアクセス禁止設定工程と、を含み、
前記第1のオペレーティングシステムは、前記第1のオペレーティングシステムが、アクセス禁止されている前記アクセス先へアクセスしようとした場合、これをトリガーとして、前記第1の切替命令により、前記第1のオペレーティングシステムから前記第2のオペレーティングシステムに切り替え、前記第2のオペレーティングシステムは、前記第2の仮想メモリ空間の論理アドレスN+1以降の前記各種命令を実行することを特徴とするマルチオペレーティングシステム制御方法。
A multi-operating system control method for controlling a first operating system and a second operating system running on one computer,
A first switching instruction for virtually storing a first switching instruction for switching from the first operating system to the second operating system at a logical address N of a first virtual memory space corresponding to the first operating system; A virtual memory process;
A second virtual storage step of storing various instructions virtually at a logical address N + 1 or later in a second virtual memory space corresponding to the second operating system;
An access prohibition setting step of setting an access destination to be a trigger for operating system switching among the plurality of access destinations in the first operating system to access prohibition,
When the first operating system attempts to access the access destination for which access is prohibited, the first operating system uses the first operating system as a trigger to execute the first operating system. From the first operating system to the second operating system, and the second operating system executes the various instructions starting from the logical address N + 1 in the second virtual memory space.
前記第2の仮想記憶工程では、前記第2のオペレーティングシステムから前記第1のオペレーティングシステムへ切り替えるための第2の切替命令を、前記第2の仮想メモリ空間の論理アドレスNに仮想記憶させ、前記第1のオペレーティングシステムは、アクセス禁止されている前記アクセス先へアクセスしようとした場合をトリガーとして、前記第1の切替命令により、前記第1のオペレーティングシステムから前記第2のオペレーティングシステムに切り替え、前記第2のオペレーティングシステムは、前記第2の仮想メモリ空間の論理アドレスN+1以降の前記各種命令を実行した後、前記第2の切替命令により、前記第2のオペレーティングシステムから前記第1のオペレーティングシステムに切り替えることを特徴とする請求項1に記載のマルチオペレーティングシステム制御方法。In the second virtual storage step, a second switching instruction for switching from the second operating system to the first operating system is virtually stored at a logical address N of the second virtual memory space, The first operating system switches from the first operating system to the second operating system according to the first switching instruction, triggered by an attempt to access the access destination for which access is prohibited, and The second operating system executes the various instructions after the logical address N + 1 of the second virtual memory space, and then switches from the second operating system to the first operating system by the second switching instruction. Claims characterized by switching Multi operating system control method according to. 前記第2のオペレーティングシステムは、前記第2の切替命令により切り替えを実行する前に、前記アクセス先に所定の処理を実行させることを特徴とする請求項2に記載のマルチオペレーティングシステム制御方法。3. The multi-operating system control method according to claim 2, wherein the second operating system causes the access destination to execute a predetermined process before executing switching according to the second switching command. 前記アクセス先は、I/Oポートであることを特徴とする請求項1〜3のいずれか一つに記載のマルチオペレーティングシステム制御方法。4. The method according to claim 1, wherein the access destination is an I / O port. アクセス禁止されている前記アクセス先は、データ通信を行うデータ通信ポートであることを特徴とする請求項1〜4のいずれか一つに記載のマルチオペレーティングシステム制御方法。5. The multi-operating system control method according to claim 1, wherein the access destination whose access is prohibited is a data communication port for performing data communication. 前記第1の仮想記憶工程では、前記第1の仮想メモリ空間の論理アドレスNの前後に割り込み禁止命令および割り込み許可命令を仮想記憶させることを特徴とする請求項1〜5のいずれか一つに記載のマルチオペレーティングシステム制御方法。The method according to claim 1, wherein in the first virtual storage step, an interrupt disable instruction and an interrupt enable instruction are virtually stored before and after a logical address N in the first virtual memory space. A multi-operating system control method as described. 前記第2の仮想記憶工程では、前記第2の仮想メモリ空間の論理アドレスNの前後に割り込み禁止命令および割り込み許可命令を仮想記憶させることを特徴とする請求項2〜5のいずれか一つに記載のマルチオペレーティングシステム制御方法。6. The method according to claim 2, wherein in the second virtual storage step, an interrupt disable instruction and an interrupt enable instruction are virtually stored before and after a logical address N in the second virtual memory space. A multi-operating system control method as described. 請求項1〜7のいずれか一つに記載されたマルチオペレーティングシステム制御方法をコンピュータに実行させるプログラム。A program for causing a computer to execute the multi-operating system control method according to claim 1. 一つの計算機で稼動する第1のオペレーティングシステムおよび第2のオペレーティングシステムを制御するマルチオペレーティングシステム制御装置であって、
前記第1のオペレーティングシステムから前記第2のオペレーティングシステムへ切り替えるための第1の切替命令を、前記第1のオペレーティングシステムに対応する第1の仮想メモリ空間の論理アドレスNに仮想記憶する第1の仮想記憶空間と、
前記第2のオペレーティングシステムに対応する第2の仮想メモリ空間の論理アドレスN+1以降に各種命令を仮想記憶する第2の仮想記憶空間と、
前記第1のオペレーティングシステムにおける複数のアクセス先のうち、オペレーティングシステム切り替えのトリガーとするアクセス先をアクセス禁止に設定するアクセス禁止設定手段と、を備え、
前記第1のオペレーティングシステムは、前記第1のオペレーティングシステムが、アクセス禁止されている前記アクセス先へアクセスしようとした場合、これをトリガーとして、前記第1の切替命令により、前記第1のオペレーティングシステムから前記第2のオペレーティングシステムに切り替え、前記第2のオペレーティングシステムは、前記第2の仮想メモリ空間の論理アドレスN+1以降の前記各種命令を実行することを特徴とするマルチオペレーティングシステム制御装置。
A multi-operating system control device for controlling a first operating system and a second operating system running on one computer,
A first virtual instruction for virtually storing a first switching instruction for switching from the first operating system to the second operating system at a logical address N of a first virtual memory space corresponding to the first operating system; A virtual storage space,
A second virtual storage space for virtually storing various instructions after a logical address N + 1 of a second virtual memory space corresponding to the second operating system;
Access prohibition setting means for setting, from among the plurality of access destinations in the first operating system, an access destination to be a trigger for operating system switching to access prohibition,
When the first operating system attempts to access the access destination for which access is prohibited, the first operating system uses the first operating system as a trigger to execute the first operating system. To the second operating system, and the second operating system executes the various instructions starting from the logical address N + 1 in the second virtual memory space.
前記第2の仮想記憶空間の論理アドレスNには、前記第2のオペレーティングシステムから前記第1のオペレーティングシステムへ切り替えるための第2の切替命令が仮想記憶され、前記第1のオペレーティングシステムは、アクセス禁止されている前記アクセス先へアクセスしようとした場合をトリガーとして、前記第1の切替命令により、前記第1のオペレーティングシステムから前記第2のオペレーティングシステムに切り替え、前記第2のオペレーティングシステムは、前記第2の仮想メモリ空間の論理アドレスN+1以降の前記各種命令を実行した後、前記第2の切替命令により、前記第2のオペレーティングシステムから前記第1のオペレーティングシステムに切り替えることを特徴とする請求項9に記載のマルチオペレーティングシステム制御装置。At the logical address N of the second virtual storage space, a second switching command for switching from the second operating system to the first operating system is virtually stored, and the first operating system is configured to access The first switching instruction is used to switch from the first operating system to the second operating system, triggered by an attempt to access the prohibited access destination, and the second operating system The method according to claim 1, wherein after executing the various instructions after the logical address N + 1 in the second virtual memory space, the second switching instruction is used to switch from the second operating system to the first operating system. Multi-operability described in 9 Gushisutemu control device.
JP2002339499A 2002-11-22 2002-11-22 Multi-operating system control method, program for causing computer to execute the method, and multi-operating system control device Expired - Fee Related JP3863094B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002339499A JP3863094B2 (en) 2002-11-22 2002-11-22 Multi-operating system control method, program for causing computer to execute the method, and multi-operating system control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002339499A JP3863094B2 (en) 2002-11-22 2002-11-22 Multi-operating system control method, program for causing computer to execute the method, and multi-operating system control device

Publications (2)

Publication Number Publication Date
JP2004171477A true JP2004171477A (en) 2004-06-17
JP3863094B2 JP3863094B2 (en) 2006-12-27

Family

ID=32702439

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002339499A Expired - Fee Related JP3863094B2 (en) 2002-11-22 2002-11-22 Multi-operating system control method, program for causing computer to execute the method, and multi-operating system control device

Country Status (1)

Country Link
JP (1) JP3863094B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102110023A (en) * 2009-12-25 2011-06-29 中国长城计算机深圳股份有限公司 Control method, system and computer for parallel running of multi-user operating system
WO2023077519A1 (en) * 2021-11-08 2023-05-11 华为技术有限公司 Storage device supporting multiple operation systems, and configuration method and computer system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102110023A (en) * 2009-12-25 2011-06-29 中国长城计算机深圳股份有限公司 Control method, system and computer for parallel running of multi-user operating system
CN102110023B (en) * 2009-12-25 2012-11-21 中国长城计算机深圳股份有限公司 Control method, system and computer for parallel running of multi-user operating system
WO2023077519A1 (en) * 2021-11-08 2023-05-11 华为技术有限公司 Storage device supporting multiple operation systems, and configuration method and computer system

Also Published As

Publication number Publication date
JP3863094B2 (en) 2006-12-27

Similar Documents

Publication Publication Date Title
US11893406B2 (en) Using virtual local area networks in a virtual computer system
EP2296089B1 (en) Operating systems
KR101019937B1 (en) Secure operating system switching
US7478204B2 (en) Efficient sharing of memory between applications running under different operating systems on a shared hardware system
KR100938521B1 (en) Method, apparatus and system for enabling a secure location-aware platform
CN109933441A (en) Micro-kernel Inter-Process Communication method and system
EP3985504A1 (en) Virtual machine migration method and apparatus
US10255088B2 (en) Modification of write-protected memory using code patching
Dall et al. ARM virtualization: performance and architectural implications
US20040205755A1 (en) Operating systems
JP2007509387A (en) operating system
KR20070115883A (en) Systems and methods for an augmented interrupt controller and synthetic interrupt sources
JP2003518287A (en) Dual mode processor
JP2007220086A (en) Input/output controller, input/output control system, and input/output control method
Whitaker et al. Denali: A scalable isolation kernel
US20190258503A1 (en) Method for operating virtual machines on a virtualization platform and corresponding virtualization platform
JP2004258840A (en) Computer system with virtualized i/o device
GB2489790A (en) Dual trust architecture
Sun et al. SIDE: Isolated and efficient execution of unmodified device drivers
Yang et al. S2H: Hypervisor as a setter within Virtualized Network I/O for VM isolation on cloud platform
JP2006155272A (en) Control method and program for virtual computer
Gebhardt et al. Challenges for inter virtual machine communication
JP3863094B2 (en) Multi-operating system control method, program for causing computer to execute the method, and multi-operating system control device
JP3863117B2 (en) Multi-operating system control method, program for causing computer to execute the method, and multi-operating system control device
EP1616257B1 (en) Operating systems

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20051021

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051220

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060217

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060926

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060927

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101006

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111006

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121006

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131006

Year of fee payment: 7

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees