JP2010191886A - Operation computer of operating system (os) to be started, and os boot method and os boot program of computer - Google Patents

Operation computer of operating system (os) to be started, and os boot method and os boot program of computer Download PDF

Info

Publication number
JP2010191886A
JP2010191886A JP2009038183A JP2009038183A JP2010191886A JP 2010191886 A JP2010191886 A JP 2010191886A JP 2009038183 A JP2009038183 A JP 2009038183A JP 2009038183 A JP2009038183 A JP 2009038183A JP 2010191886 A JP2010191886 A JP 2010191886A
Authority
JP
Japan
Prior art keywords
cpu
unit
booted
initial
startup
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
JP2009038183A
Other languages
Japanese (ja)
Other versions
JP5328410B2 (en
Inventor
Hirotaka Motai
寛隆 茂田井
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2009038183A priority Critical patent/JP5328410B2/en
Publication of JP2010191886A publication Critical patent/JP2010191886A/en
Application granted granted Critical
Publication of JP5328410B2 publication Critical patent/JP5328410B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To allow each OS to occupy a CPU without changing a conventional multi-OS operated by one CPU, in a computer with a plurality of CPUs mounted thereon. <P>SOLUTION: A multi-CPU computer 100 includes an initial boot CPU 110 and a booted CPU 111. Further, the multi-CPU computer 100 includes an initial boot OS 200 and a booted OS that are switched for operation by one CPU. The initial boot OS 200 initializes the CPU, but the booted OS does not initialize the CPU. An initial boot OS boot part 201 initializes the initial boot CPU 110 and boots the initial boot OS 200. A booted CPU initial boot part 311 starts the booted CPU 111, and a booted CPU initialization part 312 initializes the booted CPU 111. Thereafter, a booted OS boot part 211 starts a booted OSa 210 by the booted CPU 111. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、例えば、1つの計算機にて複数のOSが動作するマルチOS環境において、2つ目以降のOSを起動する被起動OS動作計算機、計算機のOS起動方法およびOS起動プログラムに関するものである。   The present invention relates to, for example, a booted OS operation computer that boots the second and subsequent OSs, a computer OS boot method, and an OS boot program in a multi-OS environment in which a plurality of OSs run on a single computer. .

オペレーティングシステム(以下、「OS」という)は1台の計算機上で動作するソフトウェアである。OSは起動時に計算機の初期化処理を行い、計算機資源(CPU、メモリ、割込みなど)を管理する。
OSは単独で計算機資源を管理することを前提としており、複数のOSの共存は何らかの機構なしには不可能である。
An operating system (hereinafter referred to as “OS”) is software that operates on one computer. The OS performs computer initialization processing at startup and manages computer resources (CPU, memory, interrupt, etc.).
The OS is premised on managing computer resources independently, and coexistence of a plurality of OSs is impossible without some mechanism.

1台の計算機上で複数のOSを並行して動作させるためには、大型計算機で実現されている仮想計算機方式(非特許文献1)がある。
仮想計算機方式では、全ての計算機資源を計算機制御プログラムが占有して管理し、OSには仮想的な計算機として一部の資源が提供される。これにより、複数のOSそれぞれがあたかも異なる計算機上で単独に動作するため、複数のOSを並行動作させることができる。しかし、計算機資源の一部のみを提供する特別なハードウェア支援と特権命令のエミュレーションとが必要であるため、オーバヘッドが存在する。
In order to operate a plurality of OSs in parallel on one computer, there is a virtual computer system (Non-patent Document 1) realized by a large computer.
In the virtual computer system, all computer resources are occupied and managed by a computer control program, and some resources are provided to the OS as virtual computers. Thereby, since each of the plurality of OSs operates independently on different computers, the plurality of OSs can be operated in parallel. However, overhead is present because special hardware support that provides only a portion of computer resources and emulation of privileged instructions is required.

一方で、OSの初期化処理部分、割込み管理部分の変更および割込み管理プログラムの追加により、特別なハードウェア支援や特権命令のエミュレーションを不要にした発明(特許文献1)も提案されている。
この発明では、第一OSの初期化処理において、第二OS,第三OSが必要とする物理メモリ・外部デバイスなどの計算機資源を予約する。第二OS,第三OSの起動処理では予約された計算機資源のみを占有して管理する。また、独立した管理プログラムが外部割込みを横取りして、割込み要因に応じて各OSへ伝達する。これらにより、計算機資源を分割し、各OSを並行動作させることができる。
On the other hand, there has also been proposed an invention (Patent Document 1) in which special hardware support and privileged instruction emulation are not required by changing the OS initialization processing part, the interrupt management part, and adding an interrupt management program.
In the present invention, in the initialization process of the first OS, computer resources such as physical memory and external devices required by the second OS and the third OS are reserved. In the activation process of the second OS and the third OS, only reserved computer resources are occupied and managed. An independent management program intercepts external interrupts and transmits them to each OS according to the interrupt factor. By these, computer resources can be divided and each OS can be operated in parallel.

また、複数CPUを備えた計算機上で、各CPUにOSをそれぞれ動作させる方式(非特許文献2)がある。
この方式では、計算機資源を分割して各OSを並行動作させるために、各OSが事前に割り振られたCPU上で動作する。さらに、割込みを割り振られた先のCPUに通知するか、割込みを第一のOSから第二,第三のOSへ伝播する。
Further, there is a method (Non-patent Document 2) in which each CPU operates an OS on a computer having a plurality of CPUs.
In this method, each OS operates on a CPU allocated in advance in order to divide computer resources and operate each OS in parallel. Further, an interrupt is notified to the assigned CPU, or the interrupt is propagated from the first OS to the second and third OS.

特開平11−149385号公報JP-A-11-149385

OSシリーズ第11巻 VM、岡崎世雄他著、共立出版株式会社OS Series Vol.11 VM, Yoshio Okazaki et al., Kyoritsu Publishing Co., Ltd. シングルチップマルチプロセッサ上のハイブリッドOS環境の実現−OS間インタフェースの実装、管井、遠藤、山口、近藤著、情報処理学会第66回全国大会、2D−6Realization of a hybrid OS environment on a single-chip multiprocessor-Implementation of an interface between OSs, Tukai, Endo, Yamaguchi, Kondo, IPSJ 66th National Convention, 2D-6

従来のマルチOSは、初期起動OSの起動処理にてCPUを初期化し、被起動OSの起動処理を変更してCPUの初期化処理を無効にしている。このため、別のCPU上で被起動OSを起動する際にCPUが正常動作しないという課題があった。
また、割込み管理は初期起動OSにて割込みの全てを自CPUに通知されるように設定し、被起動OSの割込み管理処理では自CPUに入った割込みの伝播先として自OSを登録するように変更されている。別CPUにて被起動OSが動作した場合、割込みをどのCPUへ通知するかを設定していないため、別CPUに割り込みが通知されず、別CPUで独立動作する際に割り込みを受けることが出来ないという課題があった。
既存の発明では、これらを解決するために被起動OSの起動処理を変更している(非特許文献2)。
In the conventional multi-OS, the CPU is initialized by the boot process of the initial boot OS, and the boot process of the booted OS is changed to invalidate the CPU initialization process. For this reason, there is a problem that the CPU does not operate normally when starting the OS to be started on another CPU.
In addition, the interrupt management is set so that all the interrupts are notified to the own CPU in the initial boot OS, and the own OS is registered as the propagation destination of the interrupt entered in the own CPU in the interrupt management process of the booted OS. has been edited. When a booted OS is operated on another CPU, it is not set to which CPU an interrupt is notified. Therefore, an interrupt is not notified to another CPU, and an interrupt can be received when operating independently on another CPU. There was no problem.
In the existing invention, in order to solve these problems, the boot process of the booted OS is changed (Non-Patent Document 2).

本発明は、例えば、複数のCPU(マルチコアCPU含)を搭載した計算機において、1つのCPUにて動作する従来のマルチOSを変更することなく、各OSにCPUを占有させることを目的とする。   An object of the present invention is, for example, to allow each OS to occupy a CPU without changing a conventional multi-OS operating on one CPU in a computer having a plurality of CPUs (including a multi-core CPU).

本発明の被起動OS動作計算機は、第1のCPU(Central Proccessing Unit)と、第2のCPUと、起動後の第1のCPUを用いて未起動である第2のCPUを起動するCPU起動部と、前記CPU起動部により起動された前記第2のCPUを初期化するCPU初期化部と、前記CPU初期化部により初期化された前記第2のCPUを用いて特定のOS(Operating System)を被起動OSとして起動するOS起動部とを備える。   The booted OS operation computer of the present invention is a CPU booting that boots a first CPU (Central Processing Unit), a second CPU, and a second CPU that has not been booted using the first CPU after booting. Unit, a CPU initialization unit that initializes the second CPU activated by the CPU activation unit, and a specific OS (Operating System) using the second CPU initialized by the CPU initialization unit ) As an activated OS.

本発明によれば、例えば、従来のマルチOSを変更することなく、各OSにCPUを占有させることができる。そのため、被起動OSを初期起動OSと同じCPU上でも、別のCPU上でも起動できるようになる。   According to the present invention, for example, a CPU can be occupied by each OS without changing the conventional multi-OS. Therefore, the booted OS can be booted on the same CPU as the initial boot OS or on another CPU.

実施の形態1におけるマルチCPU計算機100の構成図。1 is a configuration diagram of a multi-CPU computer 100 according to Embodiment 1. FIG. 実施の形態1におけるマルチOS拡張方式を示すフローチャート。3 is a flowchart showing a multi-OS extension method in the first embodiment. 実施の形態1における初期起動OS起動処理(S120)のフローチャート。6 is a flowchart of initial boot OS boot processing (S120) in the first embodiment. 実施の形態1における外部デバイス予約テーブル410の構造を示す図。FIG. 4 is a diagram showing a structure of an external device reservation table 410 according to the first embodiment. 実施の形態1におけるOS管理テーブル400の構造を示す図。FIG. 3 is a diagram showing a structure of an OS management table 400 according to the first embodiment. 実施の形態1におけるOS動作CPUテーブル420の構造を示す図。FIG. 5 is a diagram showing a structure of an OS operation CPU table 420 according to the first embodiment. 実施の形態1におけるOS切替処理(S130、S170)のフローチャート。5 is a flowchart of OS switching processing (S130, S170) in the first embodiment. 実施の形態1における被起動CPU起動処理(S140)のフローチャート。5 is a flowchart of activated CPU activation processing (S140) in the first embodiment. 実施の形態1における被起動OS起動処理(S150)のフローチャート。5 is a flowchart of a booted OS boot process (S150) according to the first embodiment. 実施の形態2におけるマルチCPU計算機100の構成図。FIG. 3 is a configuration diagram of a multi-CPU computer 100 according to the second embodiment. 実施の形態2におけるOS管理テーブル400の構造を示す図。The figure which shows the structure of OS management table 400 in Embodiment 2. FIG. 実施の形態2におけるOS一時停止処理のフローチャート。10 is a flowchart of OS suspension processing according to the second embodiment. 実施の形態2におけるOS切替処理(S130、S170)のフローチャート。10 is a flowchart of OS switching processing (S130, S170) in the second embodiment. 実施の形態2におけるOS再開処理のフローチャート。10 is a flowchart of OS restart processing according to the second embodiment. 実施の形態3におけるマルチCPU計算機100の構成図。FIG. 6 is a configuration diagram of a multi-CPU computer 100 according to the third embodiment. 実施の形態3における割込み転送処理のフローチャート。10 is a flowchart of interrupt transfer processing according to the third embodiment.

実施の形態1.
1つのCPU(Central Proccessing Unit)で動作するように作られた複数のOS(Operating System)を複数のCPUで動作させるマルチOS拡張方式について説明する。
Embodiment 1 FIG.
A multi-OS expansion method will be described in which a plurality of OSs (Operating Systems) created to operate on one CPU (Central Processing Unit) are operated on the plurality of CPUs.

図1は、実施の形態1におけるマルチCPU計算機100の構成図である。
実施の形態1におけるマルチCPU計算機100の構成について、図1に基づいて以下に説明する。
FIG. 1 is a configuration diagram of a multi-CPU computer 100 according to the first embodiment.
The configuration of multi-CPU computer 100 in the first embodiment will be described below with reference to FIG.

マルチCPU計算機100(被起動OS動作計算機の一例)は、初期起動CPU110(第1のCPUの一例)、被起動CPU111(第2のCPUの一例)、主記憶装置120などを備える。   The multi-CPU computer 100 (an example of a started OS operation computer) includes an initial startup CPU 110 (an example of a first CPU), a started CPU 111 (an example of a second CPU), a main storage device 120, and the like.

初期起動CPU110はマルチCPU計算機100の起動時に起動し、第1のOS(後述する「初期起動OS200」)を動作させるCPUである。
被起動CPU111は第2のOS(後述する「被起動OS」)が起動するときに起動し、第2のOSを動作させるCPUである。
The initial activation CPU 110 is a CPU that is activated when the multi-CPU computer 100 is activated, and operates a first OS (“initial activation OS 200” described later).
The booted CPU 111 is a CPU that is started when a second OS (a “booted OS” to be described later) is booted and operates the second OS.

初期起動CPU110と被起動CPU111とは、制御レジスタ(アキュムレータ、スタックレジスタ、プログラムカウンタ、割り込みレジスタ、フラグレジスタ、起動レジスタなど)および汎用レジスタを備える。   The initial activation CPU 110 and the activated CPU 111 include control registers (accumulator, stack register, program counter, interrupt register, flag register, activation register, etc.) and general purpose registers.

例えば、CPUは、起動割込みや起動レジスタへの所定値の設定により起動される。   For example, the CPU is activated by setting a predetermined value in the activation interrupt or activation register.

初期起動CPU110と被起動CPU111とは、バス101を介して主記憶装置120および複数の外部デバイス(191〜194)と接続し、主記憶装置120および複数の外部デバイスを制御する。
外部デバイス(191〜194)とは、ハードディスク、キーボード、ディスプレイ装置、ネットワークインタフェースカードなど、計算機(コンピュータ)に接続される機器のことである。
The initial activation CPU 110 and the activated CPU 111 are connected to the main storage device 120 and a plurality of external devices (191 to 194) via the bus 101, and control the main storage device 120 and the plurality of external devices.
The external devices (191 to 194) are devices connected to a computer (computer) such as a hard disk, a keyboard, a display device, and a network interface card.

初期起動CPU110と被起動CPU111とは、個別のパッケージに実装されたプロセッサコアであっても、一つのパッケージに実装されたマルチコアプロセッサであっても構わない。   The initial activation CPU 110 and the activated CPU 111 may be processor cores mounted in individual packages or multicore processors mounted in one package.

主記憶装置120は、初期起動OS200、複数の被起動OS(210、220)、OS切替部300、被起動CPU起動部310、OS管理テーブル400、外部デバイス予約テーブル410、OS動作CPUテーブル420などを記憶する。
以下、主記憶装置120の記憶領域を「メモリ領域」という。
The main storage device 120 includes an initial boot OS 200, a plurality of booted OSs (210, 220), an OS switching unit 300, a booted CPU boot unit 310, an OS management table 400, an external device reservation table 410, an OS operation CPU table 420, and the like. Remember.
Hereinafter, the storage area of the main storage device 120 is referred to as a “memory area”.

OS(例えば、初期起動OS200や被起動OS)は、CPU、主記憶装置内のメモリ領域、外部デバイスなどの計算機資源を占有して動作する。
初期起動OS200および複数の被起動OSは、CPUが一つである計算機において互いに切り替わりながら一つのCPU上で動作するように作られたマルチOSである。
被起動OSは、初期起動OS200によりCPUが初期化されることを前提に動作し、CPUが初期化されていないと誤動作を起こす。
CPUの初期化とは、例えば、所定のレジスタを初期設定することである。
The OS (for example, the initial startup OS 200 or the OS to be started) operates by occupying computer resources such as a CPU, a memory area in the main storage device, and an external device.
The initial startup OS 200 and the plurality of OSs to be started are multi-OSs configured to operate on one CPU while switching to each other in a computer having one CPU.
The booted OS operates on the assumption that the CPU is initialized by the initial boot OS 200, and malfunctions if the CPU is not initialized.
The initialization of the CPU is, for example, to initialize a predetermined register.

初期起動OS200は、初期起動OS起動部201を備え、マルチCPU計算機100の起動時に初期起動CPU110で起動する。
初期起動OS起動部201は、初期起動OS200を起動する起動処理を初期起動CPU110を用いて実行する。初期起動OS起動部201による起動処理では、初期起動CPU110の初期化、被起動OSa210用の計算機資源の予約などが行われる。
The initial startup OS 200 includes an initial startup OS startup unit 201, and is started up by the initial startup CPU 110 when the multi-CPU computer 100 is started up.
The initial startup OS startup unit 201 uses the initial startup CPU 110 to execute startup processing for starting up the initial startup OS 200. In the boot process by the initial boot OS boot unit 201, initialization of the initial boot CPU 110, reservation of computer resources for the booted OSa 210, and the like are performed.

各被起動OSは、被起動OS起動部211(OS起動部の一例)を備え、マルチCPU計算機100の起動完了後において特定のタイミングに初期起動CPU110または被起動CPU111で起動する。例えば、特定のタイミングとは、利用者による指定時や割り当てられた外部デバイスからの割込み発生時である。
被起動OS起動部211は、被起動OSを起動する起動処理を初期起動CPU110または被起動CPU111(自OSが動作する方)を用いて実行する。被起動OS起動部211による起動処理では、被起動OSa210用に予約された計算機資源の確認などが行われる。但し、被起動CPU111の初期化は行われない。
Each activated OS includes an activated OS activation unit 211 (an example of an OS activation unit), and is activated by the initial activation CPU 110 or the activated CPU 111 at a specific timing after the activation of the multi-CPU computer 100 is completed. For example, the specific timing is when a user designates or when an interrupt from an assigned external device occurs.
The booted OS boot unit 211 executes boot processing for booting the booted OS using the initial boot CPU 110 or the booted CPU 111 (the one on which the own OS operates). In the boot process by the booted OS boot unit 211, confirmation of a computer resource reserved for the booted OSa 210 is performed. However, the activated CPU 111 is not initialized.

OS切替部300は、動作中のOSに替えて非動作中のOSを動作させる。
例えば、非動作中のOSとは、未起動のOSや待機中のOS(起動済であるがCPUの割り当てを待っているOS)である。
The OS switching unit 300 operates a non-operating OS instead of the operating OS.
For example, a non-operating OS is an unstarted OS or a standby OS (an OS that has been started but is waiting for a CPU assignment).

被起動CPU起動部310は、未起動の被起動CPU111を起動し、被起動CPU111を初期化し、被起動OS起動部211を呼出して被起動OSを被起動CPU111で起動させる。
被起動CPU起動部310は、被起動CPU初期起動部311(CPU起動部の一例)と被起動CPU初期化部312(CPU初期化部の一例)とを備える。
被起動CPU初期起動部311は、起動後の初期起動CPU110を用いて未起動である被起動CPU111を起動する。
被起動CPU初期化部312は、被起動CPU初期起動部311により起動された被起動CPU111を初期化し、被起動OS起動部211を呼出して被起動OSを被起動CPU111で起動させる。
The activated CPU activation unit 310 activates the unactivated activated CPU 111, initializes the activated CPU 111, calls the activated OS activation unit 211, and activates the activated OS on the activated CPU 111.
The activated CPU activation unit 310 includes an activated CPU initial activation unit 311 (an example of a CPU activation unit) and an activated CPU initialization unit 312 (an example of a CPU initialization unit).
The activated CPU initial activation unit 311 activates the activated CPU 111 that has not been activated, using the initial activation CPU 110 after activation.
The activated CPU initialization unit 312 initializes the activated CPU 111 activated by the activated CPU initial activation unit 311, calls the activated OS activation unit 211, and activates the activated OS by the activated CPU 111.

OS管理テーブル400は、OS毎に起動状態、次に実行すべきコード、待機後に再開するために必要な情報(コンテキスト)を管理するためのテーブルである。
外部デバイス予約テーブル410は、各外部デバイスと当該外部デバイスを割り当てられたOSとの関係を管理するためのテーブルである。
OS動作CPUテーブル420は、各OSと当該OSが動作中のCPUとの関係を管理するためのテーブルである。
The OS management table 400 is a table for managing the activation state, the code to be executed next, and information (context) necessary to resume after waiting for each OS.
The external device reservation table 410 is a table for managing the relationship between each external device and the OS to which the external device is assigned.
The OS operation CPU table 420 is a table for managing the relationship between each OS and the CPU on which the OS is operating.

実施の形態において「〜部」として説明する機能はプログラムとしてCPUにより読み出され実行される。すなわち、プログラムは、「〜部」として計算機(コンピュータ)を機能させるものであり、また「〜部」の手順や方法を計算機に実行させるものである。   The functions described as “units” in the embodiments are read and executed by the CPU as programs. In other words, the program causes the computer (computer) to function as “˜part”, and causes the computer to execute the procedure and method of “˜part”.

実施の形態においてフローチャートに含まれている矢印は主としてデータや信号の入出力を示す。   In the embodiment, arrows included in the flowchart mainly indicate input / output of data and signals.

実施の形態において「〜部」として説明するものは「〜回路」、「〜装置」、「〜機器」であってもよく、また「〜ステップ」、「〜手順」、「〜処理」であってもよい。すなわち、「〜部」として説明するものは、ファームウェア、ソフトウェア、ハードウェアまたはこれらの組み合わせのいずれで実装されても構わない。   In the embodiment, what is described as “to part” may be “to circuit”, “to apparatus”, and “to device”, and “to step”, “to procedure”, and “to processing”. May be. That is, what is described as “to part” may be implemented by any of firmware, software, hardware, or a combination thereof.

図2は、実施の形態1におけるマルチOS拡張方式を示すフローチャートである。
1つのCPUで動作するように作られた初期起動OS200と被起動OSとを初期起動CPU110と被起動CPU111とで動作させるマルチOS拡張方式(OS起動方法の一例)について、図2に基づいて以下に説明する。
FIG. 2 is a flowchart showing the multi-OS extension method in the first embodiment.
A multi-OS expansion method (an example of an OS startup method) in which an initial startup OS 200 and a startup OS that are created to operate with one CPU are operated by the initial startup CPU 110 and the startup CPU 111 will be described below with reference to FIG. Explained.

マルチCPU計算機100の起動時に初期起動CPU110が起動し(S110)、初期起動CPU110で初期起動OS200が起動する(S120)。
その後、特定のタイミングにおいて初期起動CPU110で被起動CPU起動部310が被起動CPU111を起動し(S130、S140)、被起動CPU111で被起動OSが起動する(S150)。
OSを切り替える必要があるときには(S160)、いずれかのCPUでOS切替部300がOSを切り替える(S170)。
When the multi-CPU computer 100 is activated, the initial activation CPU 110 is activated (S110), and the initial activation OS 110 is activated by the initial activation CPU 110 (S120).
Thereafter, at a specific timing, the activated CPU activation unit 310 activates the activated CPU 111 by the initial activation CPU 110 (S130, S140), and the activated OS is activated by the activated CPU 111 (S150).
When the OS needs to be switched (S160), the OS switching unit 300 switches the OS with any of the CPUs (S170).

以下に、各処理(S110〜S170)の詳細について説明する。   Details of each process (S110 to S170) will be described below.

<S110:初期起動CPU起動処理>
マルチCPU計算機100に電源が入ると、マルチCPU計算機100の起動処理により初期起動CPU110が起動される。
S110の後、処理はS120に進む。
<S110: Initial Startup CPU Startup Process>
When the multi-CPU computer 100 is turned on, the initial activation CPU 110 is activated by the activation process of the multi-CPU computer 100.
After S110, the process proceeds to S120.

<S120:初期起動OS起動処理>
初期起動CPU110が起動すると、マルチCPU計算機100の起動処理により初期起動OS起動部201が初期起動CPU110で動作して初期起動OS200が起動する。
<S120: Initial Startup OS Startup Process>
When the initial activation CPU 110 is activated, the initial activation OS activation unit 201 operates on the initial activation CPU 110 by the activation processing of the multi-CPU computer 100, and the initial activation OS 200 is activated.

図3は、実施の形態1における初期起動OS起動処理(S120)のフローチャートである。
初期起動OS起動処理(S120)について、図3に基づいて以下に説明する。
以下に説明する各処理(S121〜S125)は、初期起動OS起動部201が初期起動CPU110を用いて実行する。
FIG. 3 is a flowchart of the initial boot OS boot process (S120) in the first embodiment.
The initial boot OS boot process (S120) will be described below with reference to FIG.
Each process (S121 to S125) described below is executed by the initial startup OS startup unit 201 using the initial startup CPU 110.

<S121>
初期起動OS起動部201は、初期起動CPU110を初期化する。
CPUの初期化とは、主記憶装置120に記憶される割込みテーブル(図示省略)のメモリアドレスの設定や動作モード(16ビットモードまたは32ビットモードまたは64ビットモード)の設定など、CPUのアーキテクチャ依存部分に関する初期設定を行うことである。
例えば、初期起動OS起動部201は初期起動CPU110の所定のレジスタに所定の初期値を設定する。
S121の後、処理はS122に進む。
<S121>
The initial startup OS startup unit 201 initializes the initial startup CPU 110.
The initialization of the CPU depends on the architecture of the CPU, such as setting the memory address of an interrupt table (not shown) stored in the main storage device 120 and setting the operation mode (16-bit mode, 32-bit mode, or 64-bit mode). The initial setting for the part.
For example, the initial startup OS startup unit 201 sets a predetermined initial value in a predetermined register of the initial startup CPU 110.
After S121, the process proceeds to S122.

<S122>
初期起動OS起動部201は、各外部デバイスを所定の処理により初期化する。
例えば、初期起動OS起動部201は、各外部デバイス内のコントローラ(制御プログラム)にCPUへのデータ転送速度などの動作モードを初期設定する。
S122の後、処理はS123に進む。
<S122>
The initial startup OS startup unit 201 initializes each external device by a predetermined process.
For example, the initial activation OS activation unit 201 initializes an operation mode such as a data transfer rate to the CPU in a controller (control program) in each external device.
After S122, the process proceeds to S123.

<S123>
初期起動OS起動部201は、被起動OS(210、220)用の計算機資源を予約する。
例えば、初期起動OS起動部201は、外部デバイス予約テーブル410に基づいて被起動OS用の外部デバイスを予約する。
<S123>
The initial boot OS boot unit 201 reserves computer resources for the booted OS (210, 220).
For example, the initial startup OS startup unit 201 reserves an external device for the OS to be started based on the external device reservation table 410.

図4は、実施の形態1における外部デバイス予約テーブル410の構造を示す図である。
実施の形態1における外部デバイス予約テーブル410の構造について、図4に基づいて以下に説明する。
FIG. 4 is a diagram showing the structure of the external device reservation table 410 in the first embodiment.
The structure of the external device reservation table 410 in the first embodiment will be described below with reference to FIG.

外部デバイス予約テーブル410には、各外部デバイスを識別する外部デバイス番号411と各外部デバイスを割り当てられたOSを識別するOS番号412とが予め設定されている。
以下、外部デバイス番号411として各外部デバイスの符号を用い、OS番号412として各OSの符号を用いて説明する。
図4の外部デバイス予約テーブル410は、初期起動OS200に外部デバイスa191と外部デバイスb192とが割り当てられ、被起動OSa210に外部デバイスc193が割り当てられ、被起動OSb220に外部デバイスd194が割り当てられていることを示している。
In the external device reservation table 410, an external device number 411 for identifying each external device and an OS number 412 for identifying an OS to which each external device is assigned are set in advance.
In the following description, the external device number 411 is used as the code of each external device, and the OS number 412 is used as the code of each OS.
In the external device reservation table 410 of FIG. 4, the external device a191 and the external device b192 are assigned to the initial boot OS 200, the external device c193 is assigned to the booted OSa 210, and the external device d194 is assigned to the booted OSb220. Is shown.

外部デバイス予約テーブル410が図4の設定値を示す場合、S123(図3)において、初期起動OS起動部201は外部デバイスa191と外部デバイスb192とを自OSに割り当てられた外部デバイスとして自OS用のメモリ領域に設定する。
これにより、初期起動OS起動部201が他のOSに割り当てられた外部デバイスを使用することはなく、被起動OS用の外部デバイスが予約される。
When the external device reservation table 410 shows the setting values of FIG. 4, in S123 (FIG. 3), the initial boot OS startup unit 201 uses the external device a191 and the external device b192 as external devices assigned to the local OS. Set to the memory area.
As a result, the initial boot OS boot unit 201 does not use an external device assigned to another OS, and reserves an external device for the booted OS.

S123(図3)の後、処理はS124に進む。   After S123 (FIG. 3), the process proceeds to S124.

<S124>
初期起動OS起動部201は、初期起動OS200のデータ構造を初期化する。
例えば、初期起動OS起動部201は、初期起動OS200用のメモリ管理テーブルや割込みテーブル(図示省略)を初期設定する。
また、初期起動OS起動部201は、OS管理テーブル400に自OSが起動したことを設定し、OS動作CPUテーブル420に自OSが初期起動CPU110で起動したことを設定する。
<S124>
The initial startup OS startup unit 201 initializes the data structure of the initial startup OS 200.
For example, the initial startup OS startup unit 201 initializes a memory management table and an interrupt table (not shown) for the initial startup OS 200.
Further, the initial startup OS startup unit 201 sets that the own OS has started up in the OS management table 400 and sets that the own OS has been started up by the initial startup CPU 110 in the OS operation CPU table 420.

図5は、実施の形態1におけるOS管理テーブル400の構造を示す図である。
実施の形態1におけるOS管理テーブル400の構造について、図5に基づいて以下に説明する。
FIG. 5 shows the structure of the OS management table 400 in the first embodiment.
The structure of the OS management table 400 in the first embodiment will be described below with reference to FIG.

OS管理テーブル400には、各OS(と被起動CPU起動部310)のOS番号401毎にOS起動情報402、OSコード403およびOSコンテキスト404の初期値が予め設定されている。被起動CPU起動部310は、OSの一つとして扱われ、OS管理テーブル400と後述するOS動作CPUテーブル420とで管理されるものとする。
OS番号401には、各OSを識別する番号が設定される。以下、OS番号401として各OSの符号を用いて説明する。
OS起動情報402には、当該OSの起動状態として「起動済」または「未起動」が設定される。OS起動情報402の初期値は「未起動」である。
OSコード403には、当該OSに実行させる実行コードが記憶されているメモリ領域のアドレスが設定される。初期起動OS200のOSコード403の初期値は初期起動OS起動部201のアドレスであり、被起動OSa210と被起動OSb220とのOSコード403の初期値はそれぞれの被起動OS起動部211のアドレスである。また、被起動CPU起動部310のOSコード403の初期値は被起動CPU初期起動部311のアドレスである。OSコード403の設定値(被起動CPU起動部310の設定値を除く)は、CPUで動作するOSが切り替わるときに変更される。被起動CPU起動部310のOSコード403の設定値の変更は不要である。
OSコンテキスト404には、OSが動作を始めるために必要な情報(コンテキストまたはコンテキストが設定されるメモリ領域のアドレス)が設定される。OSコンテキスト404の設定値(被起動CPU起動部310の設定値を除く)は、CPUで動作するOSが切り替わるときに変更される。被起動CPU起動部310のOSコンテキスト404の設定値の変更は不要である。
In the OS management table 400, initial values of the OS activation information 402, the OS code 403, and the OS context 404 are set in advance for each OS number 401 of each OS (and the activated CPU activation unit 310). The activated CPU activation unit 310 is treated as one of the OSs, and is managed by the OS management table 400 and an OS operation CPU table 420 described later.
In the OS number 401, a number for identifying each OS is set. Hereinafter, the OS number 401 will be described using the symbols of the respective OSs.
In the OS activation information 402, “activated” or “not activated” is set as the activated state of the OS. The initial value of the OS activation information 402 is “not activated”.
In the OS code 403, an address of a memory area in which an execution code to be executed by the OS is stored is set. The initial value of the OS code 403 of the initial startup OS 200 is the address of the initial startup OS startup unit 201, and the initial value of the OS code 403 of the startup OSa 210 and the startup OSb 220 is the address of the startup OS startup unit 211. . In addition, the initial value of the OS code 403 of the activated CPU activation unit 310 is the address of the activated CPU initial activation unit 311. The setting value of the OS code 403 (excluding the setting value of the activated CPU activation unit 310) is changed when the OS operating on the CPU is switched. It is not necessary to change the setting value of the OS code 403 of the CPU activation unit 310 to be activated.
In the OS context 404, information necessary for the OS to start its operation (a context or an address of a memory area in which the context is set) is set. The setting value of the OS context 404 (excluding the setting value of the activated CPU activation unit 310) is changed when the OS operating on the CPU is switched. It is not necessary to change the setting value of the OS context 404 of the activated CPU activation unit 310.

S124(図3)において、初期起動OS起動部201は、初期起動OS200についてOS管理テーブル400のOS起動情報402を「未起動」から「起動済」に変更する。   In S124 (FIG. 3), the initial startup OS startup unit 201 changes the OS startup information 402 of the OS management table 400 for the initial startup OS 200 from “not started” to “started”.

図6は、実施の形態1におけるOS動作CPUテーブル420の構造を示す図である。
実施の形態1におけるOS動作CPUテーブル420の構造について、図6に基づいて以下に説明する。
FIG. 6 is a diagram showing the structure of the OS operation CPU table 420 in the first embodiment.
The structure of the OS operation CPU table 420 according to the first embodiment will be described below with reference to FIG.

OS動作CPUテーブル420には、各OS(と被起動CPU起動部310)を識別するOS番号421と当該OSが動作しているCPUを識別するCPU番号422とが設定される。
OS番号421には、各OSの識別番号が予め設定されている。
CPU番号422は、各OSが起動または動作を再開したときに設定される。
以下、OS番号421として各OSの符号を用い、CPU番号422として各CPUの符号を用いて説明する。
In the OS operation CPU table 420, an OS number 421 for identifying each OS (and the activated CPU activation unit 310) and a CPU number 422 for identifying the CPU on which the OS is operating are set.
In the OS number 421, an identification number of each OS is set in advance.
The CPU number 422 is set when each OS starts up or resumes operation.
In the following description, the OS number 421 is used as a symbol for each OS, and the CPU number 422 is used as a symbol for each CPU.

S124(図3)において、初期起動CPU110で動作している初期起動OS起動部201は、初期起動OS200についてOS動作CPUテーブル420のCPU番号422に「110」を設定する。   In S <b> 124 (FIG. 3), the initial startup OS startup unit 201 operating on the initial startup CPU 110 sets “110” to the CPU number 422 of the OS operation CPU table 420 for the initial startup OS 200.

S124の後、処理はS125に進む。   After S124, the process proceeds to S125.

<S125>
初期起動OS起動部201は、初期起動OS200の所定の初期プロセスを作成する。
初期プロセスの作成とは、初期プロセスを実行するためのメモリ領域の確保、外部デバイス(例えば、ハードディスク)からメモリ領域への初期プロセスの読み込み、CPUのレジスタへの初期プロセスの起動設定を意味する。
初期プロセスの作成により、初期プロセスが動作し、所定の処理(例えば、ログイン画面の表示)が行われる。
S125の後、初期起動OS起動処理(S120)は終了する。
<S125>
The initial startup OS startup unit 201 creates a predetermined initial process of the initial startup OS 200.
The creation of an initial process means securing a memory area for executing the initial process, reading an initial process from an external device (for example, a hard disk) into the memory area, and setting the start of the initial process in a register of the CPU.
By creating the initial process, the initial process operates and a predetermined process (for example, display of a login screen) is performed.
After S125, the initial startup OS startup process (S120) ends.

図2に戻り、マルチOS拡張方式の説明を続ける。
S120の後、処理はS130、S140に進む。
Returning to FIG. 2, the description of the multi-OS extension method will be continued.
After S120, the process proceeds to S130 and S140.

<S130、S140:OS切替処理、被起動CPU起動処理>
ここで、被起動OSa210(または被起動OSb220、S150まで以下同じ)を起動する特定のタイミングになったものとする。例えば、特定のタイミングとは、利用者から初期起動OS200に対して被起動OSa210の起動を指定されたときや被起動OSa210用に予約された外部デバイスから初期起動CPU110へ割込み要求があったときである。
このとき、OS切替部300が初期起動CPU110で動作して被起動CPU起動部310を呼出し(S130)、被起動CPU起動部310が初期起動CPU110から被起動CPU111を起動する(S140)。
<S130, S140: OS switching process, activated CPU activation process>
Here, it is assumed that a specific timing for starting the booted OSa 210 (or the booted OSb 220 and S150) is started. For example, the specific timing is when the activation of the booted OSa 210 is designated by the user to the initial boot OS 200 or when there is an interrupt request from the external device reserved for the boot OSa 210 to the initial boot CPU 110. is there.
At this time, the OS switching unit 300 operates on the initial activation CPU 110 to call the activated CPU activation unit 310 (S130), and the activated CPU activation unit 310 activates the activated CPU 111 from the initial activation CPU 110 (S140).

図7は、実施の形態1におけるOS切替処理(S130、S170)のフローチャートである。
実施の形態1におけるOS切替処理(S130)について、図7に基づいて以下に説明する。
FIG. 7 is a flowchart of the OS switching process (S130, S170) in the first embodiment.
The OS switching process (S130) in the first embodiment will be described below with reference to FIG.

<S131>
OS切替部300は、動作中のOS(初期起動OS200)のコンテキストをOS管理テーブル400のOSコンテキスト404に設定して保存する。
また、OS切替部300は、動作中のOSの次の実行コードのメモリアドレスをOS管理テーブル400のOSコード403に設定する。
S131の後、処理はS132に進む。
<S131>
The OS switching unit 300 sets and saves the context of the operating OS (initial startup OS 200) in the OS context 404 of the OS management table 400.
Further, the OS switching unit 300 sets the memory address of the next execution code of the operating OS in the OS code 403 of the OS management table 400.
After S131, the process proceeds to S132.

<S132>
OS切替部300は、新たに動作させるOS(被起動OSa210)についてOS管理テーブル400のOS起動情報402を参照する。
但し、OS切替部300は、被起動CPU111が未起動である場合には新たに動作させるOSのOS起動情報402の代わりに、被起動CPU起動部310のOS起動情報402を参照する。
このとき、被起動CPU起動部310のOS起動情報402は「未起動」であるため、処理はS133に進む。
<S132>
The OS switching unit 300 refers to the OS startup information 402 of the OS management table 400 for the OS to be newly operated (started OSa 210).
However, the OS switching unit 300 refers to the OS activation information 402 of the activated CPU activation unit 310 instead of the OS activation information 402 of the OS to be newly activated when the activated CPU 111 is not activated.
At this time, since the OS activation information 402 of the activated CPU activation unit 310 is “not activated”, the process proceeds to S133.

<S133>
OS切替部300は、被起動CPU起動部310の実行コードを所定の外部デバイス(例えば、ハードディスク)から所定のメモリ領域に読み込む。所定のメモリ領域は、OS管理テーブル400内の被起動CPU起動部310のOSコード403に示される領域である。実行コードは、テキスト(命令、関数)やスタックともいう。
S133の後、処理はS134に進む。
<S133>
The OS switching unit 300 reads the execution code of the activated CPU activation unit 310 from a predetermined external device (for example, a hard disk) into a predetermined memory area. The predetermined memory area is an area indicated by the OS code 403 of the activated CPU activation unit 310 in the OS management table 400. The execution code is also called text (instruction, function) or stack.
After S133, the process proceeds to S134.

<S134>
OS切替部300は、被起動CPU起動部310についてOS管理テーブル400のOS起動情報402を「未起動」から「起動済」に変更する。
そして、OS切替部300は、OSコード403に基づいて被起動CPU起動部310の実行コードを呼出す。
実行コードの呼出しにより、被起動CPU起動部310は被起動CPU起動処理(S140)を開始する。
S134の後、OS切替処理(S130)は終了する。
<S134>
The OS switching unit 300 changes the OS activation information 402 of the OS management table 400 for the activated CPU activation unit 310 from “not activated” to “activated”.
Then, the OS switching unit 300 calls the execution code of the activated CPU activation unit 310 based on the OS code 403.
The invoked CPU activation unit 310 starts the activated CPU activation process (S140) by calling the execution code.
After S134, the OS switching process (S130) ends.

図8は、実施の形態1における被起動CPU起動処理(S140)のフローチャートである。
実施の形態1における被起動CPU起動処理(S140)について、図8に基づいて以下に説明する。
被起動CPU初期起動部311は以下に説明するS141〜S143、S148を初期起動CPU110を用いて実行し、被起動CPU初期化部312は以下に説明するS144〜S147を被起動CPU111を用いて実行する。
FIG. 8 is a flowchart of the activated CPU activation process (S140) in the first embodiment.
The activated CPU activation process (S140) in the first embodiment will be described below with reference to FIG.
The activated CPU initial activation unit 311 executes S141 to S143 and S148 described below using the initial activation CPU 110, and the activated CPU initialization unit 312 executes S144 to S147 described below using the activated CPU 111. To do.

<S141>
被起動CPU初期起動部311は、所定のメモリ領域に被起動CPU初期化部312の実行コードを被起動CPU111の起動エントリとして設定する。
S141の後、処理はS142に進む。
<S141>
The activated CPU initial activation unit 311 sets the execution code of the activated CPU initialization unit 312 as an activation entry of the activated CPU 111 in a predetermined memory area.
After S141, the process proceeds to S142.

<S142>
被起動CPU初期起動部311は、被起動CPU111を起動する。
S142の後、初期起動CPU110での処理はS143に進み、被起動CPU111での処理はS144に進む。
<S142>
The activated CPU initial activation unit 311 activates the activated CPU 111.
After S142, the process at the initial activation CPU 110 proceeds to S143, and the process at the activated CPU 111 proceeds to S144.

<S143>
初期起動CPU110において、被起動CPU初期起動部311は被起動CPU111の起動完了を待つ。
<S143>
In the initial activation CPU 110, the activated CPU initial activation unit 311 waits for completion of activation of the activated CPU 111.

<S144>
被起動CPU111において、被起動CPU初期化部312は被起動CPU111を初期化する。被起動CPU111の初期化は、初期起動CPU110の初期化(S121)と同様である。
例えば、被起動CPU初期化部312は、被起動CPU111の所定のレジスタを初期設定する。
S144の後、処理はS145に進む。
<S144>
In the activated CPU 111, the activated CPU initialization unit 312 initializes the activated CPU 111. The initialization of the activated CPU 111 is the same as the initialization of the initial activation CPU 110 (S121).
For example, the activated CPU initialization unit 312 initializes a predetermined register of the activated CPU 111.
After S144, the process proceeds to S145.

<S145>
被起動CPU初期化部312は、新たに動作するOS(被起動OSa210)用に予約されている外部デバイスを外部デバイス予約テーブル410を参照して特定し、当該外部デバイスを使用できるようにする。
例えば、被起動CPU初期化部312は、新たに動作するOSが起動される被起動CPU111を割込み先のCPUとして当該外部デバイスに割込み設定を行う。また、被起動CPU初期化部312は、当該外部デバイスがS122において初期化されないデバイスであれば、当該外部デバイスを初期化する。
S145の後、処理はS146に進む。
<S145>
The started CPU initialization unit 312 identifies an external device reserved for a newly operating OS (started OSa 210) with reference to the external device reservation table 410, and enables the external device to be used.
For example, the activated CPU initialization unit 312 performs an interrupt setting for the external device with the activated CPU 111 from which a newly operating OS is activated as the interrupt destination CPU. Further, the activated CPU initialization unit 312 initializes the external device if the external device is a device that is not initialized in S122.
After S145, the process proceeds to S146.

<S146>
被起動CPU初期化部312は、被起動CPU111の起動完了を初期起動CPU110で動作している被起動CPU初期起動部311に通知する。
例えば、被起動CPU初期化部312は、初期起動CPU110への割込みや所定のメモリ領域へのフラグの設定により、被起動CPU111の起動完了を被起動CPU初期起動部311に通知する。
S146の後、被起動CPU111での処理はS147に進み、初期起動CPU110での処理はS148に進む。
<S146>
The activated CPU initialization unit 312 notifies the activated CPU initial activation unit 311 operating in the initial activation CPU 110 that the activation of the activated CPU 111 has been completed.
For example, the activated CPU initialization unit 312 notifies the activated CPU initial activation unit 311 of the activation completion of the activated CPU 111 by interrupting the initial activation CPU 110 or setting a flag for a predetermined memory area.
After S146, the process in the activated CPU 111 proceeds to S147, and the process in the initial activation CPU 110 proceeds to S148.

<S147>
被起動CPU初期化部312は、被起動OSa210の実行コードを所定の外部デバイスから被起動OSa210用のメモリ領域に読み込む。
また、被起動CPU初期化部312は、OS管理テーブル400内の被起動OSa210のOS起動情報402を「未起動」から「起動済」に変更する。
そして、被起動CPU初期化部312は、被起動OSa210の被起動OS起動部211を呼出す。
S147の後、被起動CPU111において被起動CPU起動処理(S140)は終了する。
<S147>
The booted CPU initialization unit 312 reads the execution code of the booted OSa 210 from a predetermined external device into the memory area for the booted OSa 210.
Further, the activated CPU initialization unit 312 changes the OS activation information 402 of the activated OSa 210 in the OS management table 400 from “not activated” to “activated”.
Then, the activated CPU initialization unit 312 calls the activated OS activation unit 211 of the activated OSa 210.
After S147, the CPU activation process (S140) is terminated in the activated CPU 111.

<S148>
被起動CPU初期起動部311は、OS動作CPUテーブル420内の被起動OSa210のCPU番号422に被起動OSa210を起動したCPUの番号「111」を設定する。
また、被起動CPU初期起動部311は、OS管理テーブル400内の被起動CPU起動部310のOS起動情報402を「起動済」から「未起動」に変更する。
そして、被起動CPU初期起動部311は、被起動CPU起動部310から初期起動OS200へのOSの切り替えをOS切替部300に要求する。被起動CPU初期起動部311から要求を受けたOS切替部300は、OS管理テーブル400内の初期起動OS200のOSコンテキスト404を初期起動CPU110のレジスタに設定する。初期起動CPU110は、レジスタに設定されたOSコンテキスト404に基づいて初期起動OS200の動作を再開させる。
S148の後、初期起動CPU110において被起動CPU起動処理(S140)は終了する。
<S148>
The activated CPU initial activation unit 311 sets the number “111” of the CPU that activated the activated OSa 210 in the CPU number 422 of the activated OSa 210 in the OS operation CPU table 420.
In addition, the activated CPU initial activation unit 311 changes the OS activation information 402 of the activated CPU activation unit 310 in the OS management table 400 from “activated” to “not activated”.
Then, the activated CPU initial activation unit 311 requests the OS switching unit 300 to switch the OS from the activated CPU activation unit 310 to the initial activation OS 200. The OS switching unit 300 that has received the request from the activated CPU initial activation unit 311 sets the OS context 404 of the initial activation OS 200 in the OS management table 400 in the register of the initial activation CPU 110. The initial startup CPU 110 restarts the operation of the initial startup OS 200 based on the OS context 404 set in the register.
After S148, the activated CPU activation process (S140) ends in the initial activation CPU 110.

図2に戻り、マルチOS拡張方式の説明を続ける。
S130、S140の後、処理はS150に進む。
Returning to FIG. 2, the description of the multi-OS extension method will be continued.
After S130 and S140, the process proceeds to S150.

<S150:被起動OS起動処理>
S147において呼出された被起動OS起動部211は、被起動CPU111で被起動OSa210を起動する。
<S150: Booted OS boot process>
The activated OS activation unit 211 called in S147 activates the activated OSa 210 by the activated CPU 111.

図9は、実施の形態1における被起動OS起動処理(S150)のフローチャートである。
実施の形態1における被起動OS起動処理(S150)について、図9に基づいて以下に説明する。
被起動OS起動部211は、以下に説明する処理を被起動CPU111を用いて実行する。
FIG. 9 is a flowchart of the booted OS boot process (S150) in the first embodiment.
The booted OS boot process (S150) in the first embodiment will be described below with reference to FIG.
The booted OS boot unit 211 executes the process described below using the booted CPU 111.

<S151>
被起動OS起動部211は、被起動OSa210用に予約された計算機資源を確認する。
例えば、被起動OS起動部211は、被起動OSa210用のメモリ領域に予め設定される外部デバイスの番号と外部デバイス予約テーブル410に被起動OSa210用として設定されている外部デバイス番号411とを比較し、被起動OSa210用に予約された外部デバイスを確認する。例えば、メモリ領域と外部デバイス予約テーブル410とのいずれにしか設定されていない外部デバイスがある場合、被起動OSa210は当該外部デバイスを使用しない。
S151の後、処理はS152に進む。
<S151>
The booted OS boot unit 211 confirms the computer resources reserved for the booted OSa 210.
For example, the booted OS boot unit 211 compares the external device number preset in the memory area for the booted OSa 210 with the external device number 411 set for the booted OSa 210 in the external device reservation table 410. The external device reserved for the booted OSa 210 is confirmed. For example, if there is an external device that is set only in either the memory area or the external device reservation table 410, the booted OSa 210 does not use the external device.
After S151, the process proceeds to S152.

<S152>
被起動OS起動部211は、初期起動OS起動部201と同様に(S124)、被起動OSa210のデータ構造を初期化する。
S152の後、処理はS153に進む。
<S152>
The booted OS boot unit 211 initializes the data structure of the booted OSa 210 as in the case of the initial boot OS boot unit 201 (S124).
After S152, the process proceeds to S153.

<S153>
被起動OS起動部211は、初期起動OS起動部201と同様に(S125)、被起動OSa210の初期プロセスを作成する。
S153の後、被起動OS起動処理(S150)は終了する。
<S153>
The booted OS boot unit 211 creates an initial process of the booted OSa 210 as in the case of the initial boot OS boot unit 201 (S125).
After S153, the booted OS boot process (S150) ends.

図2に戻り、マルチOS拡張方式の説明を続ける。
S150の後、処理はS160に進む。
Returning to FIG. 2, the description of the multi-OS extension method will be continued.
After S150, the process proceeds to S160.

<S160>
初期起動CPU110で動作するOS(例えば、初期起動OS200)または被起動CPU111で動作するOS(例えば、被起動OSa210)を他のOS(例えば、被起動OSb220)に切り替える場合(YES)、処理はS170に進む。
例えば、他のOSに切り替える場合とは、利用者からOSの切り替え指示があった場合、動作していないOS用に予約された外部デバイスから割込み要求があった場合、動作中のOSが外部デバイスからの割込み待ちになったためCPUが空いた場合などである。
<S160>
When the OS (for example, the initial startup OS 200) operating on the initial startup CPU 110 or the OS (for example, the startup OS a 210) operating on the started CPU 111 is switched to another OS (eg, the startup OS b 220) (YES), the process is S170. Proceed to
For example, when switching to another OS, when there is an OS switching instruction from the user, when there is an interrupt request from an external device reserved for a non-operating OS, the operating OS is an external device This is the case when the CPU becomes empty because of waiting for an interrupt from.

<S170:OS切替処理>
OS切替部300は、初期起動CPU110または被起動CPU111で動作するOSを他のOSに切り替える。
OS切替処理(S170)について、図7に基づいて以下に説明する。
<S170: OS switching process>
The OS switching unit 300 switches the OS running on the initial startup CPU 110 or the started CPU 111 to another OS.
The OS switching process (S170) will be described below with reference to FIG.

<S171>
OS切替部300は、動作中のOS(例えば、被起動OSa210)のコンテキストをOS管理テーブル400のOSコンテキスト404に設定して保存する。
S171の後、処理はS172に進む。
<S171>
The OS switching unit 300 sets and saves the context of the operating OS (for example, the booted OSa 210) in the OS context 404 of the OS management table 400.
After S171, the process proceeds to S172.

<S172>
OS切替部300は、新たに動作させるOS(例えば、被起動OSb220)についてOS管理テーブル400のOS起動情報402を参照する。
OS起動情報402が「未起動」である場合、処理はS173に進み、OS起動情報402が「起動済」である場合、処理はS175に進む。
<S172>
The OS switching unit 300 refers to the OS activation information 402 of the OS management table 400 for an OS to be newly operated (for example, an OSb 220 to be activated).
If the OS activation information 402 is “not activated”, the process proceeds to S173. If the OS activation information 402 is “activated”, the process proceeds to S175.

<S173>
S172においてOS起動情報402が「未起動」である場合、新たに動作させるOSは被起動OSa210または被起動OSb220である。
OS切替部300は、新たに動作させるOSの被起動OS起動部211の実行コードを所定の外部デバイスから当該OS用のメモリ領域に読み込む。
S173の後、処理はS174に進む。
<S173>
When the OS activation information 402 is “not activated” in S172, the OS to be newly operated is the activated OSa 210 or the activated OSb 220.
The OS switching unit 300 reads the execution code of the OS startup unit 211 of the OS to be newly operated from a predetermined external device into the OS memory area.
After S173, the process proceeds to S174.

<S174>
OS切替部300は、新たに動作させるOSについてOS管理テーブル400のOS起動情報402を「未起動」から「起動」に変更する。
そして、OS切替部300は、OS管理テーブル400内のOSコード403に基づいて、新たに動作させるOSの被起動OS起動部211の実行コードを呼出す。
実行コードの呼出しにより、被起動OS起動処理(S150)(図9参照)が実行され、新たに動作させるOSが起動する。
S174の後、OS切替処理(S170)は終了する。
<S174>
The OS switching unit 300 changes the OS activation information 402 of the OS management table 400 from “not activated” to “activated” for the OS to be newly operated.
Based on the OS code 403 in the OS management table 400, the OS switching unit 300 calls the execution code of the OS startup unit 211 of the OS to be newly operated.
When the execution code is called, the booted OS boot process (S150) (see FIG. 9) is executed, and the OS to be newly operated is booted.
After S174, the OS switching process (S170) ends.

<S175>
S172においてOS起動情報402が「起動済」である場合、新たに動作させるOSのコンテキストは過去のOS切替処理(S171)においてOS管理テーブル400のOSコンテキスト404に保存されている。
OS切替部300は、新たに動作させるOSのOSコンテキスト404をOSを切り替えるCPUのレジスタに設定する。CPUは、レジスタに設定されたOSコンテキスト404に基づいて、新たに動作させるOSの動作を再開させる。
S175の後、OS切替処理(S170)は終了する。
<S175>
If the OS activation information 402 is “activated” in S172, the OS context to be newly operated is stored in the OS context 404 of the OS management table 400 in the past OS switching process (S171).
The OS switching unit 300 sets the OS context 404 of the OS to be newly operated in the register of the CPU that switches the OS. The CPU restarts the operation of the OS to be newly operated based on the OS context 404 set in the register.
After S175, the OS switching process (S170) ends.

図2において、S160〜S170はマルチCPU計算機100の電源が落とされるまで繰り返し実行される。   In FIG. 2, S160 to S170 are repeatedly executed until the power source of the multi-CPU computer 100 is turned off.

実施の形態1において、以下のようなマルチOS拡張方式について説明した。
マルチOS拡張方式は、複数のCPU(もしくはCPUコア)を持つ計算機システム(マルチCPU計算機100)でマルチOSを動作させる。ここで、マルチOSとは、各OSに計算機資源を予約し、1つのCPUを切り替えながら共有する複数のOSである。
マルチOS拡張方式は(1)CPU起動手段(被起動CPU初期起動部311)と(2)CPU初期化手段(被起動CPU初期化部312)を計算機システムに備える。
(1)CPU起動手段は、他のCPUを起動する。
(2)CPU初期化手段は、他のCPUを初期化して動作中のCPUと同じ状態にし、起動を要求された被起動OSを他のCPUにて動作させる。
マルチOS拡張方式は、上記(1,2)により、共有するCPUでしか起動できない被起動OSを他のCPUにて起動可能にする。
In the first embodiment, the following multi-OS extension method has been described.
In the multi-OS expansion method, a multi-OS is operated by a computer system (multi-CPU computer 100) having a plurality of CPUs (or CPU cores). Here, the multi-OS is a plurality of OSs that reserve computer resources for each OS and share while switching one CPU.
The multi-OS expansion method includes (1) CPU starting means (started CPU initial starting section 311) and (2) CPU initializing means (started CPU initializing section 312) in the computer system.
(1) The CPU activation means activates another CPU.
(2) The CPU initialization means initializes the other CPU to the same state as the operating CPU, and causes the other OS to operate the OS to be started.
In the multi-OS expansion method, the booted OS that can be booted only by the shared CPU can be booted by other CPUs by the above (1, 2).

以上のように、マルチOS拡張方式は、被起動OSの起動直前に、CPU起動手段により停止中のCPUを起動し、CPU初期化手段により被起動OSの起動に必要な計算機環境を整える。
これにより、被起動OSに変更を加えることなく、従来どおり初期起動OSと被起動OSとを1つのCPU上で同時動作させることも、初期起動OSと被起動OSとをそれぞれ独立したCPU上で並行動作させることも可能となる。今までは独立したCPU上で動作させるための変更をOSに加える必要があった。
被起動OSに変更を加える必要がないため、複数のCPUを備える計算機でも従来のマルチOSのソースコードをそのまま使用でき、計算機システムの開発期間の短縮や保守性の向上が見込める。
As described above, in the multi-OS expansion method, the CPU that has been stopped is started by the CPU starting unit immediately before the booted OS is booted, and the computer environment necessary for booting the booted OS is prepared by the CPU initialization unit.
As a result, the initial boot OS and the booted OS can be simultaneously operated on one CPU as before without changing the booted OS, and the initial boot OS and the booted OS can be operated on independent CPUs. It is also possible to operate in parallel. Until now, it was necessary to make changes to the OS to operate on an independent CPU.
Since it is not necessary to change the OS to be started, a conventional multi-OS source code can be used as it is even in a computer having a plurality of CPUs, and the development period and improvement of maintainability of the computer system can be expected.

実施の形態1において、CPUが3つ以上あっても、被起動OSが3つ以上あっても、CPUの数とOSの数(初期起動OS+各被起動OS)が同じであっても構わない。   In the first embodiment, the number of CPUs and the number of OSs (initial boot OS + each booted OS) may be the same, even if there are three or more CPUs or three or more booted OSs. .

実施の形態2.
OSを切り替える際に保存するコンテキストがOS毎に異なる形態について説明する。
以下、実施の形態1と異なる事項について主に説明する。説明を省略する事項は実施の形態1と同様である。
Embodiment 2. FIG.
A description will be given of a form in which a context to be saved when switching between OSs is different for each OS.
Hereinafter, items different from the first embodiment will be mainly described. Matters whose description is omitted are the same as those in the first embodiment.

図10は、実施の形態2におけるマルチCPU計算機100の構成図である。
実施の形態2におけるマルチCPU計算機100の構成について、図10に基づいて以下に説明する。
FIG. 10 is a configuration diagram of the multi-CPU computer 100 according to the second embodiment.
The configuration of the multi-CPU computer 100 in the second embodiment will be described below with reference to FIG.

マルチCPU計算機100は、実施の形態1の構成(図1参照)に加えて、初期起動OS200および各被起動OSがOS一時停止部(202、212)とOS再開部(203、213)とを備える。   In the multi-CPU computer 100, in addition to the configuration of the first embodiment (see FIG. 1), the initial boot OS 200 and each booted OS have an OS temporary suspension unit (202, 212) and an OS restart unit (203, 213). Prepare.

OS一時停止部は、自OSの再開に必要なコンテキストのみを自OS用のメモリ領域に保存する。OS一時停止部により保存される初期起動OS200のコンテキスト、被起動OSa210のコンテキストおよび被起動OSb220のコンテキストは、種類や数が同じでも違っても構わない。   The OS temporary suspension unit stores only the context necessary for resuming the own OS in the memory area for the own OS. The context of the initial boot OS 200, the context of the booted OSa 210, and the context of the booted OSb 220 stored by the OS temporary suspension unit may be the same or different.

OS再開部は、OS一時停止部により自OS用のメモリ領域に保存された自OSのコンテキストを用いて自OSの動作を再開させる。   The OS resuming unit resumes the operation of the own OS by using the context of the own OS stored in the memory area for the own OS by the OS temporary suspension unit.

図11は、実施の形態2におけるOS管理テーブル400の構造を示す図である。
OS管理テーブル400は、実施の形態1の構造(図5参照)からOSコンテキスト404を削除したものである。
各OSのコンテキストはそれぞれのメモリ領域に保存されるため、OS管理テーブル400にOSコンテキスト404を設定する必要はない。
FIG. 11 is a diagram illustrating the structure of the OS management table 400 according to the second embodiment.
The OS management table 400 is obtained by deleting the OS context 404 from the structure of the first embodiment (see FIG. 5).
Since the context of each OS is stored in each memory area, it is not necessary to set the OS context 404 in the OS management table 400.

マルチ拡張方式(図2参照)において、OS切替処理(S130、S170)が実行される前に、OS一時停止部によるOS一時停止処理が実行される。
例えば、S130の前(被起動CPUの起動前)、初期起動OS200のOS一時停止部202が動作する。
また例えば、S170の前(被起動CPUの起動後)において新たに動作する被起動OSが未起動である場合、利用者から被起動OSの起動を指定されたOSのOS一時停止部が動作する。
また例えば、S170の前(被起動CPUの起動後)において新たに動作するOSが起動済である場合、新たに動作するOSが前回動作したCPUで動作中のOSのOS一時停止部が動作する。
In the multi-expansion method (see FIG. 2), the OS suspension process by the OS suspension unit is executed before the OS switching process (S130, S170) is executed.
For example, the OS temporary stop unit 202 of the initial startup OS 200 operates before S130 (before startup of the started CPU).
Also, for example, when the newly started OS that is operating before S170 (after starting the CPU to be started) has not been started, the OS temporary suspension unit of the OS designated to start the OS to be started by the user operates. .
In addition, for example, when the OS that is newly operating has been started before S170 (after the booted CPU is started), the OS temporary suspension unit of the OS that is operating on the CPU that has been previously operated operates. .

図12は、実施の形態2におけるOS一時停止処理のフローチャートである。
実施の形態2におけるOS一時停止処理について、図12に基づいて以下に説明する。
FIG. 12 is a flowchart of the OS suspension process in the second embodiment.
OS suspension processing according to the second embodiment will be described below with reference to FIG.

<S200>
OS一時停止部は、自OSのコンテキストを自OS用のメモリ領域に保存する。
また、OS一時停止部は、OS再開部の実行コードのメモリアドレスをOS管理テーブル400のOSコード403に設定する。
S200の後、処理はS210に進む。
<S200>
The OS temporary suspension unit saves the context of the own OS in the memory area for the own OS.
The OS temporary suspension unit sets the memory address of the execution code of the OS resumption unit in the OS code 403 of the OS management table 400.
After S200, the process proceeds to S210.

<S210>
OS一時停止部は、OS切替部300の実行コードを呼出す。
実行コードの呼出しにより、OS切替処理(S130、S170)が実行される。
S210の後、OS一時停止処理は終了する。
<S210>
The OS temporary suspension unit calls the execution code of the OS switching unit 300.
The OS switching process (S130, S170) is executed by calling the execution code.
After S210, the OS suspension process ends.

図13は、実施の形態2におけるOS切替処理(S130、S170)のフローチャートである。
実施の形態2におけるOS切替処理(S130、S170)について、図13に基づいて以下に説明する。
FIG. 13 is a flowchart of the OS switching process (S130, S170) in the second embodiment.
The OS switching process (S130, S170) in the second embodiment will be described below based on FIG.

OS切替処理(S130、S170)は、実施の形態1(図7参照)に対して、S131(S171)を削除し、S175をS175Bに変更したものである。
以下、S175Bについて説明し、他の処理の説明を省略する。
The OS switching process (S130, S170) is obtained by deleting S131 (S171) and changing S175 to S175B with respect to the first embodiment (see FIG. 7).
Hereinafter, S175B will be described, and description of other processes will be omitted.

<S175B>
OS切替部300は、OS管理テーブル400内のOSコード403に基づいて、新たに動作させるOSのOS再開部の実行コードを呼出す。
実行コードの呼出しにより、OS再開部によるOS再開処理が実行される。
S175Bの後、OS切替処理は終了する。
<S175B>
Based on the OS code 403 in the OS management table 400, the OS switching unit 300 calls the execution code of the OS resuming unit of the OS to be newly operated.
The OS resumption process by the OS resumption unit is executed by calling the execution code.
After S175B, the OS switching process ends.

図14は、実施の形態2におけるOS再開処理のフローチャートである。
実施の形態2におけるOS再開処理について、図14に基づいて以下に説明する。
FIG. 14 is a flowchart of OS restart processing according to the second embodiment.
The OS restart process according to the second embodiment will be described below with reference to FIG.

<S220>
OS再開部は、自OSのメモリ領域に保存されている自OSのコンテキストをOSを切り替えるCPUのレジスタに設定する。CPUは、レジスタに設定されたコンテキストに基づいて、当該OSの動作を再開させる。
S220の後、OS再開処理は終了する。
<S220>
The OS resuming unit sets the context of the own OS stored in the memory area of the own OS in a register of the CPU that switches the OS. The CPU restarts the operation of the OS based on the context set in the register.
After S220, the OS restart process ends.

例えば、上記のマルチOS拡張方式により、以下のような処理が行われる。
初期起動OS200のOS一時停止部202(初期起動OS情報保存部の一例)は、初期起動CPU110で動作している初期起動OS200のコンテキストを主記憶装置120に保存する。
OS切替部300は、初期起動OS200の代わりに被起動CPU起動部310を初期起動CPU110で動作させる。
初期起動OS200のOS再開部203(初期起動OS再開部の一例)は、OS切替部OS切替部300により動作された被起動CPU起動部310の代わりに初期起動OS200をOS一時停止部202により保存されたコンテキストを用いて初期起動CPU110で動作させる。
For example, the following processing is performed by the multi-OS extension method.
The OS temporary suspension unit 202 (an example of the initial startup OS information storage unit) of the initial startup OS 200 stores the context of the initial startup OS 200 operating on the initial startup CPU 110 in the main storage device 120.
The OS switching unit 300 operates the activated CPU activation unit 310 with the initial activation CPU 110 instead of the initial activation OS 200.
The OS restart unit 203 (an example of the initial startup OS restart unit) of the initial startup OS 200 saves the initial startup OS 200 by the OS temporary suspension unit 202 instead of the started CPU startup unit 310 operated by the OS switching unit OS switching unit 300. The initial activation CPU 110 is operated using the determined context.

また例えば、上記のマルチOS拡張方式により、以下のような処理が行われる。
被起動OSa210のOS一時停止部212(被起動OS情報保存部の一例)は、被起動CPU111で動作している被起動OSa210のコンテキストであって初期起動OS200のコンテキストとは異なるコンテキストを主記憶装置120に保存する。
被起動OSb220の被起動OS起動部211(OS第2起動部の一例)は、被起動OSb220を被起動CPU111を用いて起動する。
被起動OSa210のOS再開部213(被起動OS再開部の一例)は、被起動OSb220の代わりに被起動OSa210をOS一時停止部212により保存されたコンテキストを用いて被起動CPU111で動作させる。
Further, for example, the following processing is performed by the multi-OS extension method.
The OS temporary suspension unit 212 (an example of the booted OS information storage unit) of the booted OSa 210 has a context that is a context of the booted OSa 210 operating on the booted CPU 111 and is different from the context of the initial boot OS 200. Save to 120.
A booted OS boot unit 211 (an example of an OS second boot unit) of the booted OSb 220 boots the booted OSb 220 using the booted CPU 111.
The OS resuming unit 213 (an example of a booted OS resuming unit) of the booted OSa 210 causes the booted OS 111 to operate on the booted CPU 111 using the context saved by the OS temporary suspension unit 212 instead of the booted OSb 220.

また例えば、上記のマルチOS拡張方式により、以下のような処理が行われる。
初期起動OS200のOS一時停止部202(初期起動OS情報保存部の一例)は初期起動CPU110で動作している初期起動OS200のコンテキストを保存する。
被起動OSb220の被起動OS起動部211(OS第2起動部の一例)は、被起動OSb220を初期起動CPU110を用いて起動する。
被起動OSb220のOS一時停止部212(被起動第2OS情報保存部の一例)は、被起動OSb220のコンテキストであって初期起動OS200のコンテキストとは異なるコンテキストを主記憶装置120に保存する。
初期起動OS200のOS再開部203(初期起動OS再開部の一例)は、被起動OSb220の代わりに初期起動OS200をOS一時停止部202により保存されたコンテキストを用いて初期起動CPU110で動作させる。
被起動OSb220のOS再開部213(被起動第2OS再開部の一例)は、初期起動OS200の代わりに被起動OSb220をOS再開部213により保存されたコンテキストを用いて初期起動CPU110で動作させる。
Further, for example, the following processing is performed by the multi-OS extension method.
The OS temporary suspension unit 202 (an example of the initial startup OS information storage unit) of the initial startup OS 200 stores the context of the initial startup OS 200 operating on the initial startup CPU 110.
A booted OS boot unit 211 (an example of an OS second boot unit) of the booted OSb 220 boots the booted OSb 220 using the initial boot CPU 110.
The OS temporary suspension unit 212 (an example of the second OS information storage unit to be started) of the booted OSb 220 stores a context that is the context of the booted OSb 220 and is different from the context of the initial boot OS 200 in the main storage device 120.
The OS restart unit 203 (an example of the initial startup OS restart unit) of the initial startup OS 200 causes the initial startup CPU 110 to operate the initial startup OS 200 using the context stored by the OS temporary suspension unit 202 instead of the OSb 220 to be started.
The OS resuming unit 213 (an example of a second activated OS resuming unit) of the booted OSb 220 operates the booted OSb 220 on the initial boot CPU 110 using the context saved by the OS restart unit 213 instead of the initial boot OS 200.

実施の形態2では、以下のようなマルチOS拡張方式について説明した。
マルチOS拡張方式は、(3)OS一時停止手段(202、212)と(4)OS再開手段(203、213)とを各OSに備える。
(3)OS一時停止手段は、そのOSの動作に必要な現在の情報(コンテキスト)を保存し、OSを一時停止させる。
(4)OS再開手段は、OS一時停止手段により保存された情報をもとに、OSを再開させる。
マルチOS拡張方式は、上記(3,4)により、各OSのデータを各OSの領域で保護し、不要な情報(他のOSの再開には必要であるが自OSの再開には不要な情報)を削減することにより、高速なOS切り替えを可能にする。
In the second embodiment, the following multi-OS extension method has been described.
The multi-OS expansion method includes (3) OS temporary stop means (202, 212) and (4) OS restart means (203, 213) in each OS.
(3) The OS suspension means stores current information (context) necessary for the operation of the OS, and temporarily stops the OS.
(4) The OS restarting means restarts the OS based on the information stored by the OS temporary stopping means.
In the multi-OS expansion method, the data of each OS is protected in the area of each OS according to (3, 4) above, and unnecessary information (necessary for restarting other OS but not required for restarting the own OS). (Information) is reduced, enabling high-speed OS switching.

以上のように、OSコンテキストの保存場所を各OSに持たせることにより、各OSに必要な特別な情報のみ保存し、不要な情報を排除することにより、主記憶領域の節約やOS切替の高速化が可能である。   As described above, by providing each OS with a storage location of the OS context, only special information necessary for each OS is stored, and unnecessary information is eliminated, thereby saving main storage area and switching OS quickly. Is possible.

実施の形態3.
各外部デバイスからの割込みを特定のCPUで受け付け、他のCPUで動作するOSに割込みを通知する形態について説明する。
以下、実施の形態1と異なる事項について主に説明する。説明を省略する事項は実施の形態1と同様である。
Embodiment 3 FIG.
A mode will be described in which an interrupt from each external device is received by a specific CPU and the interrupt is notified to an OS operating on another CPU.
Hereinafter, items different from the first embodiment will be mainly described. Matters whose description is omitted are the same as those in the first embodiment.

図15は、実施の形態3におけるマルチCPU計算機100の構成図である。
実施の形態3におけるマルチCPU計算機100の構成について、図15に基づいて以下に説明する。
FIG. 15 is a configuration diagram of the multi-CPU computer 100 according to the third embodiment.
The configuration of the multi-CPU computer 100 in the third embodiment will be described below based on FIG.

マルチCPU計算機100は、実施の形態1の構成(図1参照)に加えて、被起動CPU起動部310が割込み転送部313を備える。
さらに、マルチCPU計算機100は、被起動OSc230を備える。
In the multi-CPU computer 100, the activated CPU activation unit 310 includes an interrupt transfer unit 313 in addition to the configuration of the first embodiment (see FIG. 1).
Furthermore, the multi-CPU computer 100 includes a booted OSc 230.

割込み転送部313は、外部デバイスから特定のCPUに通知された割込み要求を他のCPUで動作するOSに転送する。
例えば、割込み転送部313は、被起動OSa210が使用する外部デバイスから初期起動CPU110に割込み要求が通知された場合、被起動OSa210が動作する被起動CPU111に割込み要求を転送する。
また例えば、割込み転送部313は、初期起動OS200が使用する外部デバイスから被起動CPU111に割込み要求が通知された場合、初期起動OS200が動作する初期起動CPU110に割込み要求を通知する。
The interrupt transfer unit 313 transfers an interrupt request notified from an external device to a specific CPU to an OS operating on another CPU.
For example, when an interrupt request is notified to the initial activation CPU 110 from an external device used by the activated OSa 210, the interrupt transfer unit 313 transfers the interrupt request to the activated CPU 111 on which the activated OSa 210 operates.
For example, when an interrupt request is notified from the external device used by the initial activation OS 200 to the activated CPU 111, the interrupt transfer unit 313 notifies the initial activation CPU 110 on which the initial activation OS 200 operates.

以下、各外部デバイスには割込み要求先のCPUとして初期起動CPU110が設定されているものとして説明する。各外部デバイスからの割込み要求は初期起動CPU110に通知され、各外部デバイスから被起動CPU111に割込み要求は通知されない。
また、初期起動CPU110で動作しているOSを初期起動OS200、被起動CPU111で動作しているOSを被起動OSa210とする。
さらに、被起動OSc230は初期起動OS200と切り替わりながら初期起動CPU110で動作し、被起動OSb220は被起動OSa210と切り替わりながら被起動CPU111で動作するものとする。各OSが動作するCPUを示す情報はOS動作CPUテーブル420に設定されているものとする。
In the following description, it is assumed that an initial activation CPU 110 is set as an interrupt request destination CPU in each external device. An interrupt request from each external device is notified to the initial activation CPU 110, and no interrupt request is notified from each external device to the activated CPU 111.
Further, an OS operating on the initial startup CPU 110 is referred to as an initial startup OS 200, and an OS operating on the started CPU 111 is referred to as a started OS a 210.
Furthermore, the booted OSc 230 operates on the initial boot CPU 110 while switching to the initial boot OS 200, and the booted OSb 220 operates on the booted CPU 111 while switching to the booted OSa 210. It is assumed that information indicating the CPU on which each OS operates is set in the OS operation CPU table 420.

図16は、実施の形態3における割込み転送処理のフローチャートである。
割込み転送部313により実行される割込み転送処理について、図16に基づいて以下に説明する。
FIG. 16 is a flowchart of interrupt transfer processing in the third embodiment.
The interrupt transfer process executed by the interrupt transfer unit 313 will be described below with reference to FIG.

割込み転送処理は、いずれかの被起動OS用に予約された外部デバイスから割込み要求があった場合に実行される。初期起動OS200用に予約された外部デバイスから割込み要求があった場合、割込み転送処理は実行されず、初期起動OS200が割込み要求を処理する。   The interrupt transfer process is executed when there is an interrupt request from an external device reserved for any of the OSs to be started. When there is an interrupt request from an external device reserved for the initial startup OS 200, the interrupt transfer process is not executed and the initial startup OS 200 processes the interrupt request.

<S310>
いずれかの被起動OS用に予約された外部デバイスから割込み要求が通知されたとき、初期起動OS200はOS切替部300に割込み転送部313の呼出しを要求し、OS切替部300は割込み転送部313の実行コードを呼出す。
割込み転送部313は、初期起動CPU110に割込み要求を通知した外部デバイスの予約OSを外部デバイス予約テーブル410に基づいて特定する。
さらに、割込み転送部313は、特定したOSが動作するCPUをOS動作CPUテーブル420に基づいて特定する。
S310の後、処理はS320に進む。
<S310>
When an interrupt request is notified from an external device reserved for any OS to be started, the initial startup OS 200 requests the OS switching unit 300 to call the interrupt transfer unit 313, and the OS switching unit 300 uses the interrupt transfer unit 313. Call the executable code.
Based on the external device reservation table 410, the interrupt transfer unit 313 specifies the reservation OS of the external device that has notified the initial activation CPU 110 of the interrupt request.
Furthermore, the interrupt transfer unit 313 specifies the CPU on which the specified OS operates based on the OS operation CPU table 420.
After S310, the process proceeds to S320.

<S320>
割込み転送部313は、S320において特定したCPUが初期起動CPU110である場合、割込み要求を被起動CPU111に転送する必要がないと判定し、S320において特定したCPUが被起動CPU111である場合、割込み要求を被起動CPU111に転送する必要があると判定する。
割込み要求を被起動CPU111に転送する必要がある場合(YES)、処理はS330に進み、割込み要求を被起動CPU111に転送する必要がない場合(NO)、処理はS350に進む。
<S320>
When the CPU specified in S320 is the initial activation CPU 110, the interrupt transfer unit 313 determines that it is not necessary to transfer the interrupt request to the activated CPU 111. When the CPU identified in S320 is the activated CPU 111, an interrupt request Is determined to be transferred to the activated CPU 111.
If the interrupt request needs to be transferred to the activated CPU 111 (YES), the process proceeds to S330, and if the interrupt request does not need to be transferred to the activated CPU 111 (NO), the process proceeds to S350.

<S330>
割込み転送部313は、割込み要求をCPU間割込みにより被起動CPU111に転送する。
S330の後、処理はS340に進む。
<S330>
The interrupt transfer unit 313 transfers the interrupt request to the activated CPU 111 by an inter-CPU interrupt.
After S330, the process proceeds to S340.

<S340>
被起動CPU111で動作する被起動OSa210は、転送された割込み要求を通知した外部デバイスの予約OSを外部デバイス予約テーブル410に基づいて特定する。
そして、被起動OSa210は、特定したOSが自OSである場合、転送された割込み要求を処理し、特定したOSが他のOS(被起動OSb220)である場合、OS切替部300の実行コードを呼出す。OS切替部300の実行コードの呼出しにより、OS切替処理(S170)が実行され、被起動CPU111で動作するOSが被起動OSa210から被起動OSb220に切り替わる。OS切替処理後、被起動OSb220は割込み要求を処理する。
S340の後、割込み転送処理は終了する。
<S340>
Based on the external device reservation table 410, the started OSa 210 operating on the started CPU 111 identifies the reserved OS of the external device that has notified the transferred interrupt request.
Then, the booted OSa 210 processes the transferred interrupt request when the identified OS is its own OS, and when the identified OS is another OS (booted OSb 220), the execution code of the OS switching unit 300 is executed. Call. The OS switching process (S170) is executed by calling the execution code of the OS switching unit 300, and the OS operating on the started CPU 111 is switched from the started OSa 210 to the started OSb 220. After the OS switching process, the started OSb 220 processes the interrupt request.
After S340, the interrupt transfer process ends.

<S350>
割込み転送部313は、OS切替部300の実行コードを呼出す。OS切替部300の実行コードの呼出しにより、OS切替処理(S170)が実行され、初期起動CPU110で動作するOSが初期起動OS200から被起動OSc230に切り替わる。OS切替処理後、被起動OSc230は割込み要求を処理する。
S350の後、割込み転送処理は終了する。
<S350>
The interrupt transfer unit 313 calls the execution code of the OS switching unit 300. The OS switching process (S170) is executed by calling the execution code of the OS switching unit 300, and the OS operating on the initial startup CPU 110 is switched from the initial startup OS 200 to the booted OS c 230. After the OS switching process, the started OSc 230 processes the interrupt request.
After S350, the interrupt transfer process ends.

実施の形態3では、以下のようなマルチOS拡張方式について説明した。
マルチOS拡張方式の計算機システムは、外部割込みが特定のCPUに通知されるように制限され、(5)割込み通知手段(割込み転送部313)を備える。
(5)割込み通知手段は、外部割込みを他のOSが動作するCPUに伝播する。
マルチOS拡張方式は、上記(5)により、割込み通知の制限を隠蔽することができる。
In the third embodiment, the following multi-OS extension method has been described.
The multi-OS extended computer system is limited so that an external interrupt is notified to a specific CPU, and includes (5) an interrupt notification unit (interrupt transfer unit 313).
(5) The interrupt notification means propagates the external interrupt to the CPU on which another OS operates.
The multi-OS extension method can hide the restriction of the interrupt notification by the above (5).

以上のように、1つのCPUにて外部割込みを受付け、他のCPUへ転送することにより、割り込みを任意のCPUへ通知できない外部デバイスが用いられても、マルチOSの動作が可能になる。   As described above, by accepting an external interrupt at one CPU and transferring it to another CPU, even if an external device that cannot notify an interrupt to an arbitrary CPU is used, a multi-OS operation can be performed.

実施の形態3において、実施の形態2で説明したように、OSの切り替え時にOS毎に異なるコンテキストを保存してもよい。   In the third embodiment, as described in the second embodiment, a different context may be stored for each OS when the OS is switched.

100 マルチCPU計算機、101 バス、110 初期起動CPU、111 被起動CPU、120 主記憶装置、191 外部デバイスa、192 外部デバイスb、193 外部デバイスc、194 外部デバイスd、200 初期起動OS、201 初期起動OS起動部、202 OS一時停止部、203 OS再開部、210 被起動OSa、211 被起動OS起動部、212 OS一時停止部、213 OS再開部、220 被起動OSb、230 被起動OSc、300 OS切替部、310 被起動CPU起動部、311 被起動CPU初期起動部、312 被起動CPU初期化部、313 割込み転送部、400 OS管理テーブル、401 OS番号、402 OS起動情報、403 OSコード、404 OSコンテキスト、410 外部デバイス予約テーブル、411 外部デバイス番号、412 OS番号、420 OS動作CPUテーブル、421 OS番号、422 CPU番号。   100 multi-CPU computer, 101 bus, 110 initial startup CPU, 111 started CPU, 120 main storage, 191 external device a, 192 external device b, 193 external device c, 194 external device d, 200 initial startup OS, 201 initial Booted OS boot unit, 202 OS paused unit, 203 OS resumed unit, 210 booted OSa, 211 booted OS boot unit, 212 OS paused unit, 213 OS resumed unit, 220 booted OSb, 230 booted OSc, 300 OS switching unit, 310 started CPU activation unit, 311 activated CPU initial activation unit, 312 activated CPU initialization unit, 313 interrupt transfer unit, 400 OS management table, 401 OS number, 402 OS activation information, 403 OS code, 404 OS context, 410 Part device reservation table, 411 an external device number, 412 OS number, 420 OS operating CPU table 421 OS number, 422 CPU number.

Claims (7)

第1のCPU(Central Proccessing Unit)と、
第2のCPUと、
起動後の第1のCPUを用いて未起動である第2のCPUを起動するCPU起動部と、
前記CPU起動部により起動された前記第2のCPUを初期化するCPU初期化部と、
前記CPU初期化部により初期化された前記第2のCPUを用いて特定のOS(Operating System)を被起動OSとして起動するOS起動部と
を備えたことを特徴とする被起動OS動作計算機。
A first CPU (Central Processing Unit);
A second CPU;
A CPU activation unit that activates a second CPU that has not been activated using the first CPU after activation;
A CPU initialization unit for initializing the second CPU activated by the CPU activation unit;
A booted OS operation computer comprising: an OS booting unit that boots a specific OS (Operating System) as a booted OS using the second CPU initialized by the CPU initialization unit.
前記被起動OS動作計算機は、さらに、
前記第1のCPUで動作している初期起動OSの情報を記憶装置に保存する初期起動OS情報保存部と、
前記初期起動OSの代わりに前記CPU起動部を前記第1のCPUで動作させるOS切替部と、
前記OS切替部により動作された前記CPU起動部の代わりに前記初期起動OSを前記初期起動OS情報保存部により保存された情報を用いて前記第1のCPUで動作させる初期起動OS再開部と
を備えたことを特徴とする請求項1記載の被起動OS動作計算機。
The booted OS operation computer further includes:
An initial startup OS information storage unit that stores information of an initial startup OS running on the first CPU in a storage device;
An OS switching unit that causes the CPU startup unit to operate on the first CPU instead of the initial startup OS;
An initial startup OS resuming unit that operates the first CPU using the information stored by the initial startup OS information storage unit instead of the CPU startup unit operated by the OS switching unit; The booted OS operation computer according to claim 1, further comprising:
前記被起動OS動作計算機は、さらに、
前記第2のCPUで動作している被起動OSの情報であって前記初期起動OS情報保存部により保存される前記初期起動OSの情報とは異なる情報を記憶装置に保存する被起動OS情報保存部と、
前記被起動OSを動作させる代わりに被起動第2OSを前記第2のCPUで起動するOS第2起動部と、
前記OS第2起動部により起動された前記被起動第2OSの代わりに前記被起動OSを前記被起動OS情報保存部により保存された情報を用いて前記第2のCPUで動作させる被起動OS再開部と
を備えたことを特徴とする請求項2記載の被起動OS動作計算機。
The booted OS operation computer further includes:
Save booted OS information that stores information on the booted OS running on the second CPU that is different from the initial boot OS information saved by the initial boot OS information saving unit in a storage device. And
An OS second booting unit for booting the second booted OS by the second CPU instead of operating the booted OS;
Resuming a booted OS that causes the second CPU to operate using the information stored by the booted OS information storage unit instead of the booted second OS started by the OS second boot unit The booted OS operation computer according to claim 2, further comprising:
前記被起動OS動作計算機は、さらに、
前記第1のCPUで動作している初期起動OSの情報を記憶装置に保存する初期起動OS情報保存部と、
前記初期起動OSを動作させる代わりに被起動第2OSを前記第1のCPUで起動するOS第2起動部と、
前記OS第2起動部により起動された被起動第2OSの情報であって前記初期起動OS情報保存部により保存される前記初期起動OSの情報とは異なる情報を記憶装置に保存する被起動第2OS情報保存部と、
前記OS第2起動部により起動された前記被起動第2OSの代わりに前記初期起動OSを前記初期起動OS情報保存部により保存された情報を用いて前記第1のCPUで動作させる初期起動OS再開部と、
前記初期起動OS再開部により動作された前記初期起動OSの代わりに前記被起動第2OSを前記被起動第2OS情報保存部により保存された情報を用いて前記第1のCPUで動作させる被起動第2OS再開部と、
を備えたことを特徴とする請求項1記載の被起動OS動作計算機。
The booted OS operation computer further includes:
An initial startup OS information storage unit that stores information of an initial startup OS running on the first CPU in a storage device;
An OS second boot unit that boots a second OS to be booted by the first CPU instead of operating the initial boot OS;
A second booted OS that stores information on the second booted OS started by the second OS booting unit that is different from the information on the initial booted OS saved by the initial booting OS information storage unit in a storage device. An information storage unit;
Resuming the initial startup OS to operate the first CPU using the information stored by the initial startup OS information storage unit instead of the second OS to be started started by the OS second startup unit. And
Instead of the initial boot OS operated by the initial boot OS resuming unit, the second CPU to be started is operated by the first CPU using the information stored by the second OS information storage unit to be started. 2OS resumption part,
The booted OS operation computer according to claim 1, further comprising:
前記被起動OS動作計算機は、さらに、
前記被起動OSが使用する外部デバイスから前記第1のCPUに割込み要求が通知された場合、前記被起動OSが動作する前記第2のCPUに割込み要求を転送し、前記初期起動OSが使用する外部デバイスから前記第2のCPUに割込み要求が通知された場合、前記初期起動OSが動作する前記第1のCPUに割込み要求を転送する割込み転送部
を備えたことを特徴とする請求項1〜請求項4いずれかに記載の被起動OS動作計算機。
The booted OS operation computer further includes:
When an interrupt request is notified to the first CPU from an external device used by the booted OS, the interrupt request is transferred to the second CPU on which the booted OS operates and used by the initial boot OS. 2. An interrupt transfer unit that transfers an interrupt request to the first CPU on which the initial startup OS operates when an interrupt request is notified from an external device to the second CPU. The booted OS operation computer according to claim 4.
第1のCPU(Central Proccessing Unit)と、第2のCPUとを備える計算機のOS起動方法であり、
CPU起動部が、起動後の第1のCPUを用いて未起動である第2のCPUを起動し、
CPU初期化部が、前記CPU起動部により起動された前記第2のCPUを初期化し、
OS起動部が、前記CPU初期化部により初期化された前記第2のCPUを用いて特定のOS(Operating System)を被起動OSとして起動する
ことを特徴とする計算機のOS起動方法。
A computer OS startup method comprising a first CPU (Central Processing Unit) and a second CPU,
The CPU activation unit activates the second CPU that has not been activated using the first CPU after activation,
A CPU initialization unit that initializes the second CPU activated by the CPU activation unit;
An OS startup method for a computer, wherein an OS startup unit starts up a specific OS (Operating System) as a booted OS using the second CPU initialized by the CPU initialization unit.
請求項6記載のOS起動方法を計算機に実行させるOS起動プログラム。   An OS startup program for causing a computer to execute the OS startup method according to claim 6.
JP2009038183A 2009-02-20 2009-02-20 Booted operating system (OS) operation computer, computer OS boot method, and OS boot program Expired - Fee Related JP5328410B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009038183A JP5328410B2 (en) 2009-02-20 2009-02-20 Booted operating system (OS) operation computer, computer OS boot method, and OS boot program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009038183A JP5328410B2 (en) 2009-02-20 2009-02-20 Booted operating system (OS) operation computer, computer OS boot method, and OS boot program

Publications (2)

Publication Number Publication Date
JP2010191886A true JP2010191886A (en) 2010-09-02
JP5328410B2 JP5328410B2 (en) 2013-10-30

Family

ID=42817835

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009038183A Expired - Fee Related JP5328410B2 (en) 2009-02-20 2009-02-20 Booted operating system (OS) operation computer, computer OS boot method, and OS boot program

Country Status (1)

Country Link
JP (1) JP5328410B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012247850A (en) * 2011-05-25 2012-12-13 Denso Corp Microcomputer
JP2012256117A (en) * 2011-06-07 2012-12-27 Mitsubishi Electric Corp Multiprocessor system
JP2013090070A (en) * 2011-10-15 2013-05-13 Konica Minolta Business Technologies Inc Image processing apparatus, linkage method and linkage program
JP2016508647A (en) * 2013-05-28 2016-03-22 ▲ホア▼▲ウェイ▼技術有限公司Huawei Technologies Co.,Ltd. Method and system for supporting resource separation in a multi-core architecture
JP2019084774A (en) * 2017-11-08 2019-06-06 コニカミノルタ株式会社 Image formation device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CSNG200700509007; 菅井尚人ほか: '組込み向けチップマルチプロセッサ上の複数OS実行基盤' 情報処理学会研究報告 Vol.2007 No.4, 20070122, 43-48頁, 社団法人情報処理学会 *
JPN6013008323; 菅井尚人ほか: '組込み向けチップマルチプロセッサ上の複数OS実行基盤' 情報処理学会研究報告 Vol.2007 No.4, 20070122, 43-48頁, 社団法人情報処理学会 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012247850A (en) * 2011-05-25 2012-12-13 Denso Corp Microcomputer
JP2012256117A (en) * 2011-06-07 2012-12-27 Mitsubishi Electric Corp Multiprocessor system
JP2013090070A (en) * 2011-10-15 2013-05-13 Konica Minolta Business Technologies Inc Image processing apparatus, linkage method and linkage program
JP2016508647A (en) * 2013-05-28 2016-03-22 ▲ホア▼▲ウェイ▼技術有限公司Huawei Technologies Co.,Ltd. Method and system for supporting resource separation in a multi-core architecture
JP2019084774A (en) * 2017-11-08 2019-06-06 コニカミノルタ株式会社 Image formation device
JP7385343B2 (en) 2017-11-08 2023-11-22 コニカミノルタ株式会社 Image forming device

Also Published As

Publication number Publication date
JP5328410B2 (en) 2013-10-30

Similar Documents

Publication Publication Date Title
KR100879825B1 (en) Instruction set architecture-based inter-sequencer communications with a heterogeneous resource
JP4345630B2 (en) Information processing apparatus, interrupt processing control method, and computer program
JP5945292B2 (en) How to boot a heterogeneous system and display a symmetric view of the core
US20040205755A1 (en) Operating systems
EP2239662A2 (en) System management mode inter-processor interrupt redirection
US20090007112A1 (en) Method for controlling a virtual machine and a virtual machine system
EP3491519A1 (en) Optimized uefi reboot process
JP2011100431A (en) Device and method for controlling virtual machine
JP2015503784A (en) Migration between virtual machines in the graphics processor
US10725770B2 (en) Hot-swapping operating systems using inter-partition application migration
US9959134B2 (en) Request processing using VM functions
WO2006036375A1 (en) Operating system transfer and launch without performing post
JP5328410B2 (en) Booted operating system (OS) operation computer, computer OS boot method, and OS boot program
JP2008186175A (en) Start control method of operating system and information processor
TW200525365A (en) Optimization of SMI handling and initialization
JP5200085B2 (en) Method and computer for starting computer in a short time
CN114741233A (en) Quick start method
US11169837B2 (en) Fast thread execution transition
US11086658B2 (en) System performance enhancement with SMI on multi-core systems
EP4187374A1 (en) Kernel restarting method
JP2006522971A (en) operating system
KR102285084B1 (en) System-on-chip for operating heterogeneous multiple cpu and method thereof
US20230161600A1 (en) Kernel reboot method
JP2022055002A (en) Information processing device, information processing method, and information processing program
JP2003242129A (en) Processor adding and reducing method and computer system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110928

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130215

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130226

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130402

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: 20130625

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130723

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees