JP2001282558A - Multi-operating computer system - Google Patents

Multi-operating computer system

Info

Publication number
JP2001282558A
JP2001282558A JP2000095537A JP2000095537A JP2001282558A JP 2001282558 A JP2001282558 A JP 2001282558A JP 2000095537 A JP2000095537 A JP 2000095537A JP 2000095537 A JP2000095537 A JP 2000095537A JP 2001282558 A JP2001282558 A JP 2001282558A
Authority
JP
Japan
Prior art keywords
interrupt
request
task
processing
operating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2000095537A
Other languages
Japanese (ja)
Inventor
Hiroshi Ono
大野  洋
Masahiko Saito
雅彦 齊藤
Sunao Kato
加藤  直
Tadashi Kamiwaki
正 上脇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2000095537A priority Critical patent/JP2001282558A/en
Publication of JP2001282558A publication Critical patent/JP2001282558A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a multi-operating computer system realizing the communication of a processing request among a plurality of operating systems with simple modification. SOLUTION: When the processing request is transmitted by communication between the operating systems 301 and 351, the operating system receiving the processing request interruption-processes the processing request from the other operating system by an interruption handler 305.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は複数個のオペレーテ
ィングシステムを切替えて一台のプロセッサを動作させ
るマルチオペレーティング計算機システムに関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a multi-operating computer system that operates a single processor by switching a plurality of operating systems.

【0002】[0002]

【従来の技術】一つの計算機システムで複数のオペレー
ティングシステム(以下、「OS」と呼ぶ)を動作させ
る技術として、従来から大型計算機において使用されて
いる「仮想計算機(Virtual Machine。
以下、「VM」と呼ぶ)」が知られている。VMの技術
では、計算機システム全体を管理するVMコントロール
プログラムが存在し、当該計算機システムのハードウェ
アを独占して管理する。
2. Description of the Related Art As a technique for operating a plurality of operating systems (hereinafter referred to as "OS") on one computer system, a "virtual machine (Virtual Machine)" conventionally used in large computers.
Hereinafter, "VM") is known. In the VM technology, there is a VM control program that manages the entire computer system, and exclusively manages the hardware of the computer system.

【0003】計算機システム上で動作する各OSに対し
て、あたかもハードウェアを独占して管理しているのと
同様の状態を提供するために、VMコントロールプログ
ラムがハードウェアのエミュレーションを実行する。ま
た、ハードウェア通信路のエミュレーションも提供さ
れ、各OSの間に通信路が存在する。
[0003] In order to provide each OS operating on a computer system with the same state as if the hardware were exclusively managed, a VM control program executes hardware emulation. Emulation of hardware communication paths is also provided, and communication paths exist between OSs.

【0004】複数のOSにまたがって通信を行う場合ま
たは複数のOSにまたがって同期をとる場合(以下、両
者を合わせて「OS間通信」と呼ぶ)には、各OS上で
動作するタスクないし各OS上で動作する専用のサブプ
ログラムが、通信路を使って通信を行い実現する。各O
Sでこの通信路に対するアクセスが行われるのは、あら
かじめ当該OSが実行されるように割当てられたタイム
スロットの間だけである。
[0004] When communication is performed across a plurality of OSs or when synchronization is performed across a plurality of OSs (hereinafter, both are collectively referred to as “inter-OS communication”), a task or a task operating on each OS is required. A dedicated subprogram that operates on each OS performs communication using a communication path and is realized. Each O
In S, the access to this communication path is performed only during a time slot allocated so that the OS is executed in advance.

【0005】一方、より小規模な計算機システムにおい
ても、CPU能力の向上により、一つの計算機システム
で複数のOSを動作させることが可能となってきてい
る。このような複数OS共存技術として特開平11−1
49385が挙げられる。この技術では、OS切替プロ
グラムが、各OSごとのレジスタ内容等のコンテキスト
を退避復旧し、OSを切替える。この際、切替の契機と
なるハードウェア割込についてはOS切替プログラムが
取扱うが、それ以外のハードウェアのアクセスについて
は、動作中のOSが実際に操作する。さらに、このよう
な複数OS共存技術を使った計算機システムにおいて、
OS間通信を実現する方法として、特開平11−855
46にある技術が知られている。
On the other hand, even in a smaller computer system, a plurality of OSs can be operated by one computer system due to the improvement in CPU capability. Japanese Patent Application Laid-Open No.
49385. In this technique, an OS switching program saves and restores contexts such as register contents for each OS, and switches OSs. At this time, the OS switching program handles the hardware interrupt that triggers the switching, but the operating OS actually operates for access to other hardware. Further, in a computer system using such a multiple OS coexistence technology,
Japanese Patent Laid-Open No. 11-855 discloses a method for realizing inter-OS communication.
Techniques at 46 are known.

【0006】[0006]

【発明が解決しようとする課題】従来技術のうち、前者
のVM技術の場合、全てのハードウェア処理をエミュレ
ーションしており、またVM間の通信路もハードウェア
の通信路を模擬したものとなるため、処理のオーバヘッ
ドが大きくなる。従って、CPU能力およびメモリ容量
等の資源が限られている小規模な計算機システムには適
さない。
Among the conventional techniques, in the case of the former VM technique, all the hardware processes are emulated, and the communication path between the VMs simulates the communication path of the hardware. Therefore, processing overhead increases. Therefore, it is not suitable for a small-scale computer system with limited resources such as CPU power and memory capacity.

【0007】一方、後者の従来技術は、OS共存技術の
場合、当該技術を適用する計算機システムには次のよう
な課題がある。
On the other hand, in the case of the latter conventional technology, in the case of the OS coexistence technology, the computer system to which the technology is applied has the following problems.

【0008】従来技術では、OSを切替えるプログラム
が各OSに対して何らかの処理要求を行う場合、当該O
S内の処理モジュールを直接呼出すようにしている。当
該計算機システム上で動作するOSとして、本来は計算
機システム上で単独で動作するOSを元にしてこれを修
正しようとする場合には、OS内のタスク切替部分を修
正することが必要となる。これは、当該OSのタスク切
替に関連する全ての処理を完全に理解することが必要で
あり、難易度が極めて高いものになる。
In the prior art, when a program for switching OS makes a certain processing request to each OS, the OS
The processing module in S is directly called. If an OS operating on the computer system is to be modified based on an OS originally operating solely on the computer system, it is necessary to modify the task switching portion in the OS. This requires a complete understanding of all processes related to task switching of the OS, which is extremely difficult.

【0009】このことを図31に示す従来の計算機シス
テムを用いて具体的に説明する。
This will be specifically described with reference to a conventional computer system shown in FIG.

【0010】図31において、第一OS301と第二O
S351が、OS切替部201により切替えられなが
ら、単一の計算機システム上で動作している。第一OS
301上で動作するタスクA302は、第二OS351
上で動作するタスクP352からメッセージが送信され
るのを待機している。
In FIG. 31, a first OS 301 and a second O
S351 is operating on a single computer system while being switched by the OS switching unit 201. First OS
The task A 302 operating on the OS 301 is the second OS 351
It is waiting for a message to be transmitted from the task P352 operating above.

【0011】タスクPからメッセージが送信されたと
き、OS間通信モジュール206は第一OS301に対
して、待機しているタスクA302の動作を再開させる
よう指示を行う。この際、OSコンテキスト切替モジュ
ール202が動作コンテキストを第一OS301のもの
に復旧した上、コールバックルーチン306を呼出す。
このときコールバックルーチン306は、タスクA30
2を再開させる要求をスケジューラ309に行う必要が
ある。
When the message is transmitted from the task P, the inter-OS communication module 206 instructs the first OS 301 to restart the operation of the waiting task A 302. At this time, the OS context switching module 202 restores the operation context to that of the first OS 301 and calls the callback routine 306.
At this time, the callback routine 306 determines that the task A30
It is necessary to send a request to restart the scheduler 309 to the scheduler 309.

【0012】しかし、コールバックルーチン306は、
第一OS301が単独で動作する場合には存在しないも
のであり、スケジューラ309は元々関知していない。
従って、コールバックルーチン306が呼出される直前
に動作していた第一OS301上のタスクのコンテキス
トを保存する処理や、スケジューラ309が当該タスク
を中断したものとして扱うような状態変更処理などを、
既存のスケジューラの状態管理と矛盾が無いように新た
に追加しなければならない。
However, the callback routine 306
This does not exist when the first OS 301 operates alone, and the scheduler 309 does not originally know it.
Therefore, the process of saving the context of the task on the first OS 301 that was operating immediately before the callback routine 306 was called, the status change process in which the scheduler 309 treats the task as interrupted, and the like,
It must be newly added so as not to be inconsistent with the state management of the existing scheduler.

【0013】コールバックルーチン306が直接スケジ
ューラ309を操作せず、タスクA302を再開させる
ためのシステムコール308を呼出す方法も考えられる
が、タスク状態を変更するようなシステムコール308
の呼出しには様々な制約(例えば、使用するスタックの
状態)が伴い、結局OSの内部処理を完全に把握し、そ
の制約を満たす状態を作り出すことが必要になる。
A method is also conceivable in which the callback routine 306 does not directly operate the scheduler 309 and calls a system call 308 for resuming the task A 302.
Is accompanied by various restrictions (for example, the state of the stack to be used), and after all, it is necessary to completely understand the internal processing of the OS and create a state satisfying the restrictions.

【0014】また、上述の課題を解決するには図32に
示すように構成することも考えられる。
In order to solve the above-mentioned problem, a configuration as shown in FIG. 32 may be considered.

【0015】図32においては、コールバックルーチン
は要求されたタスクAの再開を直接行わず、要求があっ
たことをOS内の要求テーブル341に記録し、処理を
一旦OS切替部201に戻す。第一OS上では周期的に
起動されるルーチン342が存在し、このルーチンが要
求テーブル341内の要求を取出して、タスクA302
の再開を要求するシステムコール308を発行する。こ
の場合、周期起動ルーチン342は、OSに組込むデバ
イスドライバまたはタスクを想定しており、システムコ
ールを発行するための条件が予め整っていてOSの内部
処理を意識する必要はない。
In FIG. 32, the callback routine does not directly restart the requested task A, but records the request in the request table 341 in the OS, and returns the processing to the OS switching unit 201 once. On the first OS, there is a routine 342 that is started periodically. This routine fetches a request from the request table 341 and executes the task A302.
Issue a system call 308 requesting restart of the system. In this case, the periodic startup routine 342 assumes a device driver or a task to be incorporated in the OS, and the conditions for issuing a system call are prepared in advance, and there is no need to be aware of the internal processing of the OS.

【0016】しかし、当該OSに動作が切替っても直前
に動作していたタスクが再開するだけであり、周期起動
ルーチン342が実行されるまでは実際の処理が行われ
ず、タスクA302の再開が遅延することになる。この
ため、複数のOSを小さいオーバヘッドで切替えて動作
させるという本来の目的を達成できなくなる。
However, even if the operation is switched to the OS, only the task that was operating immediately before is restarted. Actual processing is not performed until the periodic start routine 342 is executed, and the task A 302 is restarted. Will be delayed. For this reason, the original purpose of switching and operating a plurality of OSs with small overhead cannot be achieved.

【0017】このように、スケジューラはOS内の全体
を管理しているので、他の手順因果関係を考慮した上で
OS間通信できるように改造する必要があり、大幅なプ
ログラム変更を要することになる。
As described above, since the scheduler manages the whole of the OS, it is necessary to modify the scheduler so that communication between the OSs can be performed in consideration of other procedural consequences. Become.

【0018】本発明の目的は、複数個のオペレーティン
グシステム間の処理要求の通信をオペレーティングシス
テムの簡単な改造で行えるマルチオペレーティング計算
機システムを提供することにある。
An object of the present invention is to provide a multi-operating computer system capable of communicating processing requests between a plurality of operating systems by a simple modification of the operating system.

【0019】[0019]

【課題を解決するための手段】本発明の特徴とするとこ
ろは、複数個のオペレーティングシステム間で処理要求
を通信によって送信する際に、処理要求を受信したオペ
レーティングシステムは他のオペレーティングシステム
からの処理要求を割込み処理するようにしたことにあ
る。
A feature of the present invention is that when a processing request is transmitted between a plurality of operating systems by communication, the operating system that has received the processing request performs processing from another operating system. The request is interrupted.

【0020】本発明は、オペレーティングシステムが処
理要求を割込み処理するようにしているので、オペレー
ティングシステムに通信用のハンドラ機能を一つ追加す
るだけでよくオペレーティングシステム間の処理要求の
通信をオペレーティングシステムの簡単な改造で行え
る。
According to the present invention, since the operating system interrupts the processing request, it is only necessary to add one communication handler function to the operating system. It can be done with simple modifications.

【0021】[0021]

【発明の実施の形態】以下、本発明の実施例を図面を用
いて説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0022】図1に本発明の一実施例を示す。FIG. 1 shows an embodiment of the present invention.

【0023】図1において、計算機システムは、プロセ
ッサ101、メモリ102、入出力制御装置103、入
出力装置105、実時刻時計(Real Time C
lock。以下、「RTC」と呼ぶ)107などから構
成される。プロセッサ101、メモリ102、入出力制
御装置103、RTC107はプロセッサバス104に
よって接続される。
In FIG. 1, the computer system includes a processor 101, a memory 102, an input / output control device 103, an input / output device 105, a real time clock (Real Time C).
lock. Hereinafter, this is referred to as “RTC” 107). The processor 101, the memory 102, the input / output control device 103, and the RTC 107 are connected by a processor bus 104.

【0024】プロセッサ101は複数個のオペレーティ
ングシステム(以下、「OS」と呼ぶ)を動作させるた
めのマイクロプロセッサである。メモリ102は、オペ
レーティングシステム切替プログラム201(以下、
「OS切替部」と呼ぶ)、第一のオペレーティングシス
テム301(以下、「第一OS」と呼ぶ)、第二のオペ
レーティングシステム351(以下、「第二OS」と呼
ぶ)、第一OS上で動作するタスク302、303、第
二OS上で動作するタスク352、353、第二OSか
らの要求により第一OS上での処理を行う第一OSRP
Cサーバ304、第一OSからの要求により第二OS上
での処理を行う第二OSRPCサーバ354を保持す
る。これらのプログラム201、301〜304、35
1〜354は、プロセッサ101によって読み出されて
実行される。
The processor 101 is a microprocessor for operating a plurality of operating systems (hereinafter, referred to as “OS”). The memory 102 stores an operating system switching program 201 (hereinafter, referred to as an operating system switching program).
On the first OS, the first operating system 301 (hereinafter, referred to as a “first OS”), the second operating system 351 (hereinafter, referred to as a “second OS”), Tasks 302 and 303 that operate, tasks 352 and 353 that operate on the second OS, and a first OSRP that performs processing on the first OS in response to a request from the second OS
The C server 304 holds a second OSRPC server 354 that performs processing on the second OS in response to a request from the first OS. These programs 201, 301 to 304, 35
1 to 354 are read and executed by the processor 101.

【0025】入出力制御装置103には、プロセッサ1
01またはメモリ102との間で、データを入力または
出力するための入出力装置105が接続される。入出力
装置105としては、データを保存するためのディスク
装置、画面表示用デバイスであるディスプレイ、ユーザ
からの入力用デバイスであるキーボード、あるいは他の
計算機システムとのデータを交換するためのネットワー
ク接続装置などがある。どのような入出力装置が接続さ
れるか、あるいは全て接続されないかは、システム構成
によって決定される。
The input / output control device 103 includes a processor 1
01 or the memory 102, an input / output device 105 for inputting or outputting data is connected. As the input / output device 105, a disk device for storing data, a display as a screen display device, a keyboard as an input device for a user, or a network connection device for exchanging data with another computer system and so on. Which input / output devices are connected or not all are determined by the system configuration.

【0026】入出力制御装置103は、割込信号線10
6によってプロセッサ101と接続され、入出力動作完
了などを通知することができる。なお、図1では割込信
号線106とプロセッサバス104が別の装置であるよ
うに記載しているが、実際には、割込信号線106はプ
ロセッサバス104の一部である。プロセッサ101の
内部にはタイマ装置108が設けられており、一定周期
毎に割込を発生させる。タイマ装置108からの割込
は、OS301、351の計時などに使用される。
The input / output control device 103 is connected to the interrupt signal line 10
6, it can be connected to the processor 101 to notify completion of input / output operation and the like. Although FIG. 1 illustrates that the interrupt signal line 106 and the processor bus 104 are different devices, the interrupt signal line 106 is actually a part of the processor bus 104. A timer device 108 is provided inside the processor 101, and generates an interrupt at regular intervals. The interrupt from the timer device 108 is used for time measurement of the OSs 301 and 351 and the like.

【0027】なお、プロセッサ101の種類によって
は、入出力制御装置103、入出力装置105、RTC
107の一部あるいは全部が、プロセッサ101の内部
に取り込まれている場合がある。また、タイマ装置10
8がプロセッサ101の内部には存在せず、プロセッサ
バス104を介してプロセッサ101の外部に接続され
る場合もある。
Depending on the type of the processor 101, the input / output control device 103, the input / output device 105, the RTC
Some or all of 107 may be incorporated into the processor 101. In addition, the timer device 10
8 may not exist inside the processor 101 but may be connected to the outside of the processor 101 via the processor bus 104.

【0028】プロセッサ101は割込信号線106によ
って通知されるプロセッサ外部からの割込(以下、「外
部割込」と呼ぶ)やタイマ装置108などのプロセッサ
内部からの割込(以下、「内部割込」と呼ぶ)をマスク
できる機能を有している。割込マスクとは、プログラム
が割込マスクを解除するまでの間、特定の割込が入るこ
とを遅延させる機能である。
The processor 101 receives an interrupt from the outside of the processor (hereinafter referred to as "external interrupt") notified by the interrupt signal line 106 and an interrupt from inside the processor such as the timer device 108 (hereinafter, "internal interrupt"). ) Can be masked. The interrupt mask is a function of delaying the entry of a specific interrupt until the program releases the interrupt mask.

【0029】一般に、割込マスク機能には、次の三種類
が存在する。 (1)全割込マスク:全ての割込をマスクする。 (2)個別割込マスク:個々の割込をそれぞれマスクす
る。 (3)割込レベルマスク:各割込にレベルを設定し、指
定レベル以下の割込をマスクする。
Generally, there are the following three types of interrupt mask functions. (1) All interrupt mask: Masks all interrupts. (2) Individual interrupt mask: Masks individual interrupts. (3) Interrupt level mask: A level is set for each interrupt, and interrupts below a specified level are masked.

【0030】プロセッサ101の種類によって、上記
(1)および(2)の組合せ、または(1)および
(3)の組合せのいずれかを装備することが多い。後者
の組合せを装備するプロセッサを採用する場合、対応す
る割込要因の重要性にしたがって割込レベルを割当て
る。例えば、リアルタイム性が高いネットワーク入出力
装置からの割込を、他のディスク装置などの割込よりも
高いレベルに設定する計算機システムの構成がある。
Depending on the type of the processor 101, the processor 101 is often provided with either the combination of the above (1) and (2) or the combination of the above (1) and (3). If a processor equipped with the latter combination is employed, the interrupt level is assigned according to the significance of the corresponding interrupt factor. For example, there is a configuration of a computer system in which an interrupt from a network input / output device having a high real-time property is set to a higher level than an interrupt of another disk device or the like.

【0031】本実施例では、計算機システム内に二つの
OS301、351が存在する。OS301、351
は、各々に割当てられたメモリ・プロセッサ資源を用
い、それぞれプログラム302〜304、プログラム3
52〜354を実行させる。RPCサーバ304ないし
354は、実際には当該OS上の二つのタスクから構成
される。このように実施例としてはOS数が2、タスク
数が8(各OSに対して4ずつ)の例を示しているが、
これらの数値よりも多い、または、少ないOSないしタ
スクを実装することも可能である。OS数は動的にタス
ク生成・削除を行うことにより可能である。
In this embodiment, two OSs 301 and 351 exist in the computer system. OS 301, 351
Uses the memory processor resources allocated to each of the programs 302 to 304 and the program 3
52 to 354 are executed. The RPC servers 304 to 354 are actually composed of two tasks on the OS. Thus, as an embodiment, an example is shown in which the number of OSs is 2 and the number of tasks is 8 (4 for each OS).
It is also possible to implement more or less OSes or tasks than these numbers. The number of OSs can be obtained by dynamically generating and deleting tasks.

【0032】なお、動作している複数のOSを全て同等
のものとして扱っている。従って、以下で単一のOSに
ついてのみしか説明していない部分について、他のOS
でも同様の構成を持っている、ないし同様の動作が行わ
れるものとする。
It should be noted that a plurality of operating OSs are all treated as equivalent. Therefore, in the following, only the description of a single OS will be omitted.
However, it is assumed that it has the same configuration or performs the same operation.

【0033】各OS301、351には、OS切替部2
01の内部から直接呼出されて要求された処理を完結し
OS切替部201にリターンする、コールバックルーチ
ン306ないし356が存在する。OS切替部201は
各OS301、351に対する処理要求のうち、当該処
理要求を即時に実行することが必要なものに関して、コ
ールバックルーチンの呼出を行う。処理要求の例とし
て、当該OSを強制停止させる直前に当該OSが管理す
る入出力装置からの割込発生を抑止する処理がある。
Each of the OSs 301 and 351 has an OS switching unit 2
There are callback routines 306 to 356 that are called directly from the inside of O.01, complete the requested processing, and return to the OS switching unit 201. The OS switching unit 201 calls a callback routine for processing requests to the OSs 301 and 351 that need to immediately execute the processing request. As an example of the processing request, there is a process of suppressing an interrupt from an input / output device managed by the OS immediately before the OS is forcibly stopped.

【0034】OS切替部201には、OSコンテキスト
切替モジュール202が設けられており、OS切替部2
01内の各モジュールからの指示によって、プロセッサ
101上で動作するOSを切替える。また、OS切替部
201には、OS切替部201から各OS301、35
1に対する処理要求を管理する遅延要求管理モジュール
203があり、第一OS301に対する処理要求を蓄積
するために第一OS遅延要求キュー204、第二OS3
51に対する処理要求を蓄積するために第二OS遅延要
求キュー205を有している。処理要求の例として、O
S切替部が提供するOS間メッセージ通信機能を使用し
メッセージが送られてくるのを受信待機しているタスク
がある場合、メッセージが送信された時点で当該タスク
の動作を再開させる処理がある。
The OS switching unit 201 is provided with an OS context switching module 202.
The OS operating on the processor 101 is switched according to an instruction from each module in the processor 01. Also, the OS switching unit 201 includes the respective OSs 301 and 35 from the OS switching unit 201.
There is a delay request management module 203 that manages a processing request for the first OS 301, and a first OS delay request queue 204 and a second OS 3
A second OS delay request queue 205 is provided to accumulate processing requests for the OS 51. An example of a processing request is O
When there is a task using the inter-OS message communication function provided by the S switching unit and waiting to receive a message, there is a process of restarting the operation of the task when the message is transmitted.

【0035】遅延要求管理モジュール203は、第一O
S遅延要求キュー204ないし第二OS遅延要求キュー
205に処理要求が蓄積されていて、なおかつ当該OS
が割込を処理するのに適切な条件が整った場合、OSコ
ンテキスト切替モジュール202を通じて当該OSに割
込が発生したのと同じ状態とし、当該OSに遅延要求の
存在を通知する割込を発生させる。以下、遅延要求管理
モジュール203経由で行われる処理要求を「遅延要
求」、遅延要求管理モジュールの存在を通知する割込を
「遅延要求割込」と呼ぶ。各OS301、351上に
は、遅延要求割込を受けて、遅延要求キュー204ない
し205から要求を取出し対応する処理を行う、遅延要
求割込ハンドラ305ないし355が設けられている。
The delay request management module 203
Processing requests are stored in the S delay request queue 204 or the second OS delay request queue 205, and the OS
When an appropriate condition for processing the interrupt is satisfied, the same state as when the interrupt has occurred in the OS through the OS context switching module 202 is generated, and an interrupt for notifying the OS of the existence of the delay request is generated. Let it. Hereinafter, a processing request made via the delay request management module 203 is referred to as a “delay request”, and an interrupt for notifying the presence of the delay request management module is referred to as a “delay request interrupt”. On each of the OSs 301 and 351, there are provided delay request interrupt handlers 305 to 355 which receive a delay request interrupt, take out a request from the delay request queues 204 to 205, and perform corresponding processing.

【0036】OS間通信モジュール206は、異なるO
Sのタスク間でのメッセージを交換する機能(以下、
「OS間メッセージ通信」と呼ぶ)や、異なるOS間で
同期を取るための機能(以下、「OS間セマフォ」と呼
ぶ)を提供する。OS間メッセージ通信機能では、メッ
セージがまだ存在せず送信されるのを待つためにタスク
の動作が中断する場合があり、またOS間セマフォ機能
では、獲得しようとしたセマフォが先に獲得されていて
当該セマフォが解放されるのを待つためにタスクの動作
が中断する場合がある。いずれの場合も、待っている条
件が整い次第、当該タスクの動作を再開する必要があ
る。OS間通信モジュール206は前記の条件が整った
場合、タスク再開の遅延要求を追加するよう遅延要求管
理モジュール203に対して依頼する。
The inter-OS communication module 206 has different O
A function for exchanging messages between tasks of S
A function for synchronizing between different OSs (hereinafter, referred to as "inter-OS message communication") (hereinafter, referred to as "inter-OS semaphore") is provided. In the inter-OS message communication function, the operation of a task may be interrupted in order to wait for a message to be transmitted because it does not yet exist. In the inter-OS semaphore function, the semaphore that is to be acquired is acquired first. The operation of the task may be interrupted to wait for the release of the semaphore. In either case, it is necessary to resume the operation of the task as soon as the waiting condition is satisfied. When the above condition is satisfied, the inter-OS communication module 206 requests the delay request management module 203 to add a delay request for task restart.

【0037】OS状態管理モジュール207は、各OS
301、351の起動や停止等の状態を管理し、また状
態の移行要求を受付けて各OS301、351に指示す
る機能を有している。例えば、あるタスクからあるOS
に対するシャットダウン要求を受付けた時は、当該OS
に対するシャットダウン処理要求を遅延要求として追加
するよう、遅延要求管理モジュール203に依頼する。
The OS state management module 207 is provided for each OS.
It has a function of managing states such as start and stop of the 301 and 351 and accepting a state transition request and instructing each of the OSs 301 and 351. For example, from a certain task to a certain OS
When a shutdown request is received for
The request is added to the delay request management module 203 to add a shutdown processing request to the request as a delay request.

【0038】RTC管理モジュール208は、RTC1
07からの時刻取得処理およびRTC107への時刻設
定処理を行う。各OS301、351は、RTC107
に対して直接時刻を読み書きする代りに、RTC管理モ
ジュール208にこれらの処理要求を行う。例えば、一
方のOS301からRTC107への時刻設定処理依頼
があった場合、他のOS351に対してRTC107に
時刻を合わせて修正するよう遅延要求を追加する。
The RTC management module 208 includes the RTC 1
07 and a time setting process to the RTC 107. Each of the OSs 301 and 351 has the RTC 107
These processing requests are sent to the RTC management module 208 instead of directly reading and writing the time to the RTC. For example, when there is a time setting processing request from one OS 301 to the RTC 107, a delay request is added to the other OS 351 so as to adjust the time to the RTC 107 and correct it.

【0039】各OS301、351のRPCサーバ30
4、354は、それぞれ、他のOSからOSメッセージ
通信機能を使用して送られてくる処理要求を受付け、当
該OS上で処理を実行し、さらにOSメッセージ通信機
能を使用して処理結果を送り返す。
The RPC server 30 of each OS 301 and 351
4 and 354 each receive a processing request sent from another OS using the OS message communication function, execute processing on the OS, and send back a processing result using the OS message communication function. .

【0040】図2に、プロセッサ101の内部構成の一
例を示す。
FIG. 2 shows an example of the internal configuration of the processor 101.

【0041】図2において、キャッシュメモリ122は
メモリ102上のデータまたは命令を一時的に格納する
バッファ記憶装置である。CPU121は演算手段であ
り、メモリ101もしくはキャッシュメモリ122上に
存在する命令を順次読み出して実行する。命令実行に際
して、演算結果を一時的に保持するための汎用レジスタ
123、命令アドレスを指定するプログラムカウンタ
(以下、「PC」と呼ぶ)124、実行状態を保持する
ステータスレジスタ(以下、「SR」と呼ぶ)125を
用いる。
In FIG. 2, a cache memory 122 is a buffer storage device for temporarily storing data or instructions in the memory 102. The CPU 121 is an arithmetic unit that sequentially reads and executes instructions existing in the memory 101 or the cache memory 122. When executing an instruction, a general-purpose register 123 for temporarily holding an operation result, a program counter (hereinafter, referred to as “PC”) 124 for specifying an instruction address, and a status register (hereinafter, “SR”) for holding an execution state Call) 125 is used.

【0042】タイマ装置108として、三つのタイマ装
置1081〜1083を備えている。タイマ装置108
の個数は、後述の割込処理の説明のために三つとしてい
るが、本発明の実施にあたっては最低一つ存在していれ
ばよい。
As the timer device 108, three timer devices 1081 to 1083 are provided. Timer device 108
Are set to three for the description of the interrupt processing described later, but it is sufficient that at least one exists in implementing the present invention.

【0043】割込信号線106とタイマ装置108から
の割込信号は割込コントローラ126に接続される。割
込コントローラ126は、外部割込または内部割込が発
生した場合、SR125の内部にある割込マスクに関す
る情報を参照し、当該割込を受け付けるか否かを決定す
る。
The interrupt signal from the interrupt signal line 106 and the timer device 108 is connected to an interrupt controller 126. When an external interrupt or an internal interrupt occurs, the interrupt controller 126 refers to information on an interrupt mask inside the SR 125 and determines whether or not to accept the interrupt.

【0044】割込を受付ける場合、割込コントローラ1
26は、割込の要因を割込要因レジスタ130に記録
し、PC124の現在値を退避プログラムカウンタ(以
下、「SPC」と呼ぶ)126に保存してから割込アド
レスレジスタ129の値に書換える。さらに、SR12
5の現在値を退避ステータスレジスタ(以下、「SS
R」と呼ぶ)128に保存してから書換える。SR12
5の書換え内容については後述する。この結果、割込ア
ドレスレジスタ130に登録されたアドレスに存在す
る、割込処理プログラムが起動する。割込処理プログラ
ムは割込要因レジスタ130に記録された割込要因を参
照して、これに対応する処理を実行する。
When accepting an interrupt, the interrupt controller 1
26 records the cause of the interrupt in the interrupt cause register 130, saves the current value of the PC 124 in a save program counter (hereinafter, referred to as “SPC”) 126, and rewrites the value into the interrupt address register 129. . In addition, SR12
5 is saved in the save status register (hereinafter referred to as “SS
R ”) and then rewrite. SR12
The rewriting contents of No. 5 will be described later. As a result, the interrupt processing program existing at the address registered in the interrupt address register 130 is started. The interrupt processing program refers to the interrupt factor recorded in the interrupt factor register 130 and executes a process corresponding to the interrupt factor.

【0045】なお、使用するプロセッサ101の種類に
より、割込処理プログラムのアドレスをメモリ上に格納
し、当該格納位置のアドレスをプロセッサ内のレジスタ
に設定することもできる。
Note that, depending on the type of the processor 101 used, the address of the interrupt processing program can be stored in the memory, and the address of the storage location can be set in a register in the processor.

【0046】また、使用するプロセッサ101の種類に
より、割込要因レジスタ130に割込要因を示す値を設
定する代りに、割込要因ごとに異なる割込処理プログラ
ムのアドレスを使用することもできる。この場合、各割
込要因ごとの割込処理プログラムで要因を示す値を特定
の汎用レジスタに記録してから共通の割込処理プログラ
ムにジャンプし、当該共通割込処理プログラムで割込要
因レジスタ130に記録された要因を参照する代りに前
記の汎用レジスタを参照するようにすれば、図2で示し
たプロセッサと全く同様の割込処理を行うことができ
る。
Instead of setting the value indicating the interrupt factor in the interrupt factor register 130 depending on the type of the processor 101 to be used, a different address of the interrupt processing program can be used for each interrupt factor. In this case, the value indicating the factor is recorded in a specific general-purpose register by the interrupt processing program for each interrupt factor, and then the process jumps to the common interrupt processing program. If the general-purpose register is referred to instead of referring to the factor recorded in the processor, interrupt processing exactly the same as that of the processor shown in FIG. 2 can be performed.

【0047】CPU121、キャッシュメモリ122、
各レジスタ123〜125,127〜130は、互い
に、データ転送を行うデータバス131、アドレス指定
を行うアドレスバス132によって接続されている。
CPU 121, cache memory 122,
The registers 123 to 125 and 127 to 130 are connected to each other by a data bus 131 for performing data transfer and an address bus 132 for specifying addresses.

【0048】図3は、プロセッサ101が全割込マスク
機能と割込レベルマスク機能とを装備している場合の、
SR125の構成例である。SR125は、割込ブロッ
クビット141と割込マスクレベルフィールド142を
有する。割込ブロックビット141がONの場合、プロ
セッサ101に対する全ての割込がマスクされる。割込
マスクレベルフィールド142は現在の割込マスクレベ
ル値を示し、これ以下の割込レベルの割込は受け付けら
れない。
FIG. 3 shows a case where the processor 101 is equipped with a full interrupt mask function and an interrupt level mask function.
It is a structural example of SR125. The SR 125 has an interrupt block bit 141 and an interrupt mask level field 142. When the interrupt block bit 141 is ON, all interrupts to the processor 101 are masked. The interrupt mask level field 142 indicates the current interrupt mask level value, and interrupts of an interrupt level lower than this value are not accepted.

【0049】図3の例では、割込マスクレベルフィール
ド142は4ビット長であり、合計16種類のマスクレ
ベルを指定可能である。通常、割込レベル0は「割込が
発生していない」ことを意味し、割込マスクレベルを0
に設定すると「割込マスクを行わない」という指定にな
るため、実質的には15種類となる。
In the example of FIG. 3, the interrupt mask level field 142 has a 4-bit length, and a total of 16 types of mask levels can be designated. Normally, the interrupt level 0 means “no interrupt has occurred”, and the interrupt mask level is 0.
Is set to "do not perform interrupt masking", so there are practically 15 types.

【0050】プロセッサ101の割込マスクレベルフィ
ールド142のビット数を変更することにより、使用で
きる割込レベルの種類を増減させることができる。特権
モードビット149がONの場合、のプログラムは特権
モードで動作しており、プロセッサ101に対する全て
の操作が可能である。一方、特権モードビット149が
OFFの場合、動作中のプログラムは非特権モードで動
作し、一部の機能、例えば、制御用レジスタやメモリ管
理レジスタへのアクセスなどが禁止される。
By changing the number of bits in the interrupt mask level field 142 of the processor 101, the types of interrupt levels that can be used can be increased or decreased. When the privilege mode bit 149 is ON, the program is operating in the privilege mode, and all operations on the processor 101 are possible. On the other hand, when the privilege mode bit 149 is OFF, the running program operates in the non-privileged mode, and some functions, such as access to the control register and the memory management register, are prohibited.

【0051】一般に、OSは特権モードで動作する。一
方、OS上で動作するタスクは、OSの種類により、特
権モードで動作するものや非特権モードで動作するもの
がある。
Generally, an OS operates in a privileged mode. On the other hand, tasks that operate on the OS include those that operate in the privileged mode and those that operate in the non-privileged mode, depending on the type of the OS.

【0052】図4は、プロセッサ101が全割込マスク
機能と個別割込マスク機能とを装備している場合の、S
R125の構成例である。SR125は実際には二つの
レジスタ(実行状態レジスタ143と割込マスクレジス
タ144)から構成され、SSR127もこれら二つの
レジスタを格納する領域を備える。図3と同様、実行状
態レジスタ143内に割込ブロックビット141が設け
られている。割込マスクレジスタ144内の割込マスク
ビット145〜148はそれぞれ別々の割込に対応して
おり、割込マスクビットのいずれかをONとした場合、
当該ビットに対応する割込が受け付けられなくなる。
FIG. 4 shows the case where the processor 101 is equipped with the all interrupt mask function and the individual interrupt mask function.
It is a structural example of R125. The SR 125 is actually composed of two registers (the execution status register 143 and the interrupt mask register 144), and the SSR 127 also has an area for storing these two registers. 3, an interrupt block bit 141 is provided in the execution state register 143. The interrupt mask bits 145 to 148 in the interrupt mask register 144 respectively correspond to different interrupts. When any one of the interrupt mask bits is turned ON,
The interrupt corresponding to the bit is not accepted.

【0053】図3に示すSRの例は、図4のSRの特殊
例とみなせる。たとえば、割込マスクビット145のみ
ONとなっている状態をレベル1とし、割込マスクビッ
ト145、146の二つがONとなっている状態をレベ
ル2、割込マスクビット145〜147の三つがONと
なっている状態をレベル3、…、のように対応させるこ
とができる。このため、以降、ステータスレジスタ12
5は図4に示す構成を有するとして説明する。
The example of the SR shown in FIG. 3 can be regarded as a special example of the SR in FIG. For example, a state where only the interrupt mask bit 145 is ON is set to level 1, a state where two of the interrupt mask bits 145 and 146 are ON is level 2, and three of the interrupt mask bits 145 to 147 are ON. Can be made to correspond to levels 3,.... Therefore, the status register 12
5 is described as having the configuration shown in FIG.

【0054】割込を受理した場合、割込コントローラ1
26によりSR125が書換えられる。一般的なプロセ
ッサでは、割込ブロックビット141および特権モード
ビット149がONに書換えられる。
When an interrupt is accepted, the interrupt controller 1
26 rewrites the SR 125. In a general processor, the interrupt block bit 141 and the privilege mode bit 149 are rewritten to ON.

【0055】OS、デバイスドライバ、および特権モー
ドで動作するタスクは、割込ブロックビット141や割
込マスクレジスタ144の内容を書き換えることが可能
で、割込マスクレベルを設定できる。これにより、割込
処理実行中に同一割込やより優先度の低い割込が発生す
ることを禁止したり、あるいは排他制御を実現すること
ができる。
The OS, the device driver, and the task operating in the privilege mode can rewrite the contents of the interrupt block bit 141 and the interrupt mask register 144, and can set the interrupt mask level. As a result, it is possible to prohibit the occurrence of the same interrupt or an interrupt having a lower priority during execution of the interrupt processing, or to realize exclusive control.

【0056】以下、その動作について詳細に説明する。Hereinafter, the operation will be described in detail.

【0057】本実施例では、動作している複数のOSを
全て同等のものとして扱っている。従って、以下の説明
で一つのOS上での動作、または一つのOSから他の一
つのOSへの動作しか説明しない部分があるが、これら
の処理を他のOSに対しても同様に適用することが可能
である。
In this embodiment, a plurality of operating OSs are all treated as equivalent. Therefore, in the following description, there is a portion that describes only the operation on one OS or the operation from one OS to another OS, but these processes are similarly applied to other OSs. It is possible.

【0058】図5に詳細なソフトウェアの機能ブロック
図を示す。ただし、一部のコンポーネントについては図
5に図示しておらず、図6〜図8に示している。図5〜
図8に記載されている全てのコンポーネントはメモリ1
02上に格納されており、プロセッサ101にて実行さ
れる。以下の説明では、計算機システム上でのいくつか
の動作パターンに分割して、各コンポーネントの詳細な
動作を説明する。なお、図9以降の各図面が各コンポー
ネントの処理フローならびに処理で使用するデータ構造
を示している。
FIG. 5 shows a detailed functional block diagram of the software. However, some components are not shown in FIG. 5 and are shown in FIGS. 6 to 8. Figure 5
All components described in FIG.
02 is executed by the processor 101. In the following description, detailed operation of each component will be described by dividing into several operation patterns on the computer system. Each drawing after FIG. 9 shows a processing flow of each component and a data structure used in the processing.

【0059】第一に、各OS上のタスクが当該OSのス
ケジューリング機能により切替えながら動作している場
合の動作について説明する。
First, the operation in the case where the tasks on each OS are operating while switching by the scheduling function of the OS will be described.

【0060】第一OS301内には、タスクに対してサ
ービスを提供するシステムコールプログラム308、お
よびタスク切替を行うスケジューラ309を有する。ま
た、第一OS301上で動作するタスクがOS切替部2
01の処理を利用するための関数を格納したOS切替部
利用ライブラリ310を有する。
The first OS 301 has a system call program 308 for providing a service to a task, and a scheduler 309 for switching tasks. Also, the task operating on the first OS 301 is the OS switching unit 2
01 has an OS switching unit use library 310 in which functions for using the process of No. 01 are stored.

【0061】図5では、OS切替部ライブラリ310を
タスクA302が利用している構成を示しているが、他
のタスクからも利用可能である。タスクA302は、O
S切替部ライブラリ310が提供する関数を呼出すこと
で処理を依頼する。呼出されたOS切替部ライブラリ3
10内の関数は、タスクA302の一部として動作し、
OS切替部201の処理関数を呼出したり、必要なシス
テムコール308を呼出したりして、依頼された処理を
実現する。
FIG. 5 shows a configuration in which the task A 302 uses the OS switching unit library 310, but it can be used by other tasks. Task A302 is O
The processing is requested by calling a function provided by the S switching unit library 310. Called OS switching library 3
The functions in 10 operate as part of task A302,
The requested processing is realized by calling a processing function of the OS switching unit 201 or calling a necessary system call 308.

【0062】なお、タスクが専用の論理メモリ空間で動
作している、あるいはタスクが非特権モードで動作して
いるなどの理由により、タスクの一部として動作するO
S切替部ライブラリ310が直接OS切替部201の関
数の呼出すことができない場合、OS切替部利用ライブ
ラリの機能の一部を、デバイスドライバなどの形でOS
内に置けばよい。
It is to be noted that the task operates as a part of the task because the task is operating in the dedicated logical memory space or the task is operating in the non-privileged mode.
If the S switching unit library 310 cannot directly call the function of the OS switching unit 201, a part of the functions of the OS switching unit use library may be replaced by a device driver or the like.
You can put it inside.

【0063】スケジューラ309は、第一OS301上
に存在する各々のタスクに対応してタスク管理ブロック
321をメモリ上に確保し、各タスクを管理する。
The scheduler 309 secures a task management block 321 in the memory corresponding to each task existing on the first OS 301, and manages each task.

【0064】タスク管理ブロックの内部構造例を図9
に、タスク管理ブロックの管理構造例を図10に示す。
タスク管理ブロック321の内部には、複数のタスク管
理ブロックをキューに接続して管理するためのキュー接
続用ポインタ3211、当該タスクの状態を表す状態フ
ラグ3212、当該タスクが中断した時点のPC、S
R、汎用レジスタ値等を保存するためのレジスタ退避領
域3213を含む。また、その他に中断理由や優先順位
等の情報を含む場合もある。
FIG. 9 shows an example of the internal structure of the task management block.
FIG. 10 shows an example of the management structure of the task management block.
Inside the task management block 321, a queue connection pointer 3211 for connecting and managing a plurality of task management blocks to a queue, a status flag 3212 indicating the status of the task, the PC at the time when the task was interrupted,
R, a register save area 3213 for storing general-purpose register values and the like. In addition, it may include information such as a reason for interruption and a priority.

【0065】スケジューラ309は、実行可能なタスク
に対応するタスク管理ブロックを、優先順位毎の実行可
能タスクキュー(322、323など)に接続して管理
する。従って、実行可能タスクキューは、優先順位の数
だけ存在することになる。ただし、優先度の高いタスク
のタスク管理ブロックをより前方に接続するという規則
を追加することにより、単一の実行可能タスクキューに
より管理することも可能である。
The scheduler 309 connects and manages task management blocks corresponding to executable tasks to executable task queues (322, 323, etc.) for each priority. Therefore, the number of executable task queues is equal to the number of priorities. However, by adding a rule that the task management blocks of higher priority tasks are connected more forward, it is also possible to manage the tasks with a single executable task queue.

【0066】入出力装置105に対する処理完了待ち、
あるいはミューテックス・セマフォ・イベントなど第一
OS301内の同期処理メカニズムによる再開待ちとい
った理由で処理を中断しているタスクに対応するタスク
管理ブロックを、実行中断タスクキュー324に接続し
て管理する。なお、実行中断理由ごとに異なるキューで
管理することもある。これらの各キューにタスク管理ブ
ロックを接続するためにキュー接続用ポインタ3211
が使用される。
Waiting for completion of processing for the input / output device 105,
Alternatively, a task management block corresponding to a task whose processing is suspended due to waiting for resumption by a synchronous processing mechanism in the first OS 301 such as a mutex semaphore event is connected to the execution suspended task queue 324 and managed. It should be noted that a different queue may be managed for each execution interruption reason. In order to connect a task management block to each of these queues, a queue connection pointer 3211
Is used.

【0067】スケジューラ309は、システムコール3
08の処理や後述する割込ハンドラ307の処理が終了
した時点で、現在実行中のタスクが実行可能でなくなっ
た場合または現在実行中のタスクより高い優先順位のタ
スクが実行可能となった場合に、実行タスクを切替える
ために呼出される。スケジューラ309を起動する可能
性のあるシステムコールには、(ア)タスクの生成・終
了・停止・再開(たとえば、自分より優先順位の高いタ
スクを生成した場合)、(イ)排他制御の実行・終了
(たとえば、排他制御待ち状態に移行した場合)(ウ)
タスクの優先順位変更(たとえば、自己の優先順位を低
下させた場合)といったものがある。
The scheduler 309 has a system call 3
When the process of step 08 or the process of the interrupt handler 307 to be described later is completed, if the task currently being executed is no longer executable, or if a task with a higher priority than the currently executed task becomes executable, , To switch the execution task. The system calls that may activate the scheduler 309 include (A) task creation / termination / stop / restart (for example, when a task having a higher priority than itself is created); End (for example, when shifting to the exclusive control wait state) (c)
For example, there is a task priority change (for example, when its own priority is lowered).

【0068】スケジューラ309の処理フローを図11
に示す。スケジューラ309は、実行中だったタスクの
レジスタを当該タスクのタスク管理ブロック内にあるレ
ジスタ退避領域3213に保存し(処理401)、実行
可能タスクキューを優先順位が高い方から順に検索する
(処理402)。
The processing flow of the scheduler 309 is shown in FIG.
Shown in The scheduler 309 saves the register of the task that was being executed in the register save area 3213 in the task management block of the task (process 401), and searches the executable task queue in descending order of priority (process 402). ).

【0069】タスク管理ブロックが一つも無かった場合
は、処理403で判定され、OS間優先順位管理モジュ
ール211にアイドル状態であることを通知する(処理
405)。そして実行可能タスクが存在しないのである
から、アイドルループへ移行し(処理408)、実行す
べきタスクが現れるまで何も行わない。
If there is no task management block, it is determined in step 403, and the inter-OS priority management module 211 is notified of the idle state (step 405). Since there is no executable task, the process shifts to an idle loop (step 408), and nothing is performed until a task to be executed appears.

【0070】一方、タスク管理ブロックが存在した場合
には、当該タスクの優先順位をOS間優先順位管理モジ
ュール211に通知する(処理404)。ただし、通知
する優先順位は全てのOSに渡って統一的に決められた
優先順位を使用するものとし、第一OS301内で管理
されている優先順位から予め決められた対応関係により
変換して通知する。
On the other hand, if there is a task management block, the priority of the task is notified to the inter-OS priority management module 211 (process 404). However, the priority to be notified uses the priority determined uniformly for all OSs, and the notification is performed by converting the priority managed in the first OS 301 by a predetermined correspondence. I do.

【0071】OS間優先順位管理モジュール211で
は、ここで(ア)通知した優先順位と、(イ)他のOS
で当該OSが中断する前に動作していたタスクの優先順
位とを比較する。(以下、(ア)(イ)をまとめて、単
に「当該OSの優先順位」と呼ぶ。)通知した優先順位
が、第二OS351の優先順位よりも高いか同じだった
場合、処理404はすぐにリターンする。
In the inter-OS priority management module 211, (A) the notified priority and (A) other OS
Then, the priority of the task that was operating before the OS was interrupted is compared. (Hereinafter, (A) and (A) will be collectively referred to simply as “priority of the OS”.) If the notified priority is higher than or the same as the priority of the second OS 351, the process 404 proceeds immediately. Return to

【0072】一方、通知した優先順位が第二OS351
の優先順位よりも低かった場合、この時点で第一OS3
01の実行が中断され第二OS351に切替わり、その
後第二OS351で動作しているタスクの優先順位が低
下して第一OS301の優先順位の方が高くなった時点
で処理404が終了し戻ってくる。ここで選択したタス
ク管理ブロックをキューから取出し(処理406)、レ
ジスタ退避領域3213の内容をプロセッサ101の各
レジスタに復旧し(処理407)、選択したタスクの処
理が再開される。なお、当該タスクが新規作成された場
合はレジスタ退避領域3213には初期レジスタ値が登
録されており、同じ処理でタスクの新規起動が行われ
る。
On the other hand, the notified priority is the second OS 351
If the priority is lower than the priority of the first OS 3
01 is interrupted and switched to the second OS 351. After that, when the priority of the task operating on the second OS 351 decreases and the priority of the first OS 301 becomes higher, the process 404 ends and returns. Come. The task management block selected here is removed from the queue (process 406), the contents of the register save area 3213 are restored to the registers of the processor 101 (process 407), and the process of the selected task is resumed. When the task is newly created, the initial register value is registered in the register save area 3213, and the task is newly activated by the same processing.

【0073】OS間優先順位管理モジュール211の処
理フローを図12に示す。OS間優先順位管理モジュー
ル211は、各OSが最後に通知した優先順位を記録す
る変数を持つ。この変数が保持する値は、前述の当該O
Sの優先順位に相当するため、以下、この変数を「OS
優先順位変数」と呼ぶ。OSのスケジューラ309ない
し359から優先順位の通知を受けると、当該OSに対
応するOS優先順位変数の内容を通知された値に更新し
(処理411)、全てのOS優先順位変数を比較しても
っとも高い優先順位を持つOSを次に動作するOSとし
て選択する(処理412)。
FIG. 12 shows a processing flow of the inter-OS priority management module 211. The inter-OS priority management module 211 has a variable for recording the last priority notified by each OS. The value held by this variable is the O
This variable is hereinafter referred to as “OS
Called "priority variables." When the notification of the priority is received from the schedulers 309 to 359 of the OS, the contents of the OS priority variable corresponding to the OS are updated to the notified value (process 411), and all the OS priority variables are compared, and The OS having the higher priority is selected as the OS that operates next (process 412).

【0074】なお、複数のOS優先順位変数が同一の最
高値を持つ状態になった場合、当該OS優先順位変数に
対応するOSのうち任意のものを選択すればよい。ま
た、これらの複数のOSの中に最後に優先順位を通知し
たOSが含まれる場合には、切替オーバヘッドを削減す
るために当該OSを選択するものとする。
When a plurality of OS priority variables have the same maximum value, any one of the OSs corresponding to the OS priority variables may be selected. Further, when the OS whose last priority is notified is included in the plurality of OSs, the OS is selected to reduce the switching overhead.

【0075】次に動作するOSを選択した後、遅延要求
管理モジュール203を呼出す(処理413)。遅延要
求が存在する場合の処理は後述するので、ここでは遅延
要求が存在しなかったものとして説明を続ける。処理4
12で選択したOSが最後に動作していたOSだった場
合、すわなち最後に優先順位を通知したOSの優先順位
が最も高かった場合には、処理413がリターンしてく
るので、呼出元であるスケジューラ309ないし359
にそのままリターンする(処理414)。この結果、当
該OSのスケジューラが再開して選択したタスクが実行
される。
After selecting the next operating OS, the delay request management module 203 is called (process 413). Since the processing in the case where the delay request is present will be described later, the description will be continued here on the assumption that the delay request has not existed. Processing 4
If the OS selected in step 12 is the last operating OS, that is, if the OS whose last priority was notified has the highest priority, the process 413 returns. Schedulers 309 to 359
Then, the process returns (step 414). As a result, the scheduler of the OS restarts to execute the selected task.

【0076】一方、処理412で選択したOSが最後に
動作していたOSと異なる場合、遅延要求管理モジュー
ル203はOSコンテキスト切替モジュール202を呼
出して動作OSを切替える。処理413はリターンしな
い。なお、いずれかのOSのスケジューラ309、35
9がOS優先順位管理211の呼出を行わない構成とし
た場合、当該OSに対応するOS優先順位変数を固定値
とすることで、当該OS上の全てのタスクが前記固定値
の優先順位で動作しているものとみなしてOS間の優先
順位を管理することが可能である。
On the other hand, if the OS selected in the process 412 is different from the last operating OS, the delay request management module 203 calls the OS context switching module 202 to switch the operating OS. The process 413 does not return. The scheduler 309 or 35 of any OS
9 does not call the OS priority management 211, the OS priority variable corresponding to the OS is set to a fixed value, so that all tasks on the OS operate at the priority of the fixed value. It is possible to manage the priorities between OSs assuming that the OSs are operating.

【0077】OSコンテキスト切替モジュール202の
処理フローを図13に示す。OSコンテキスト切替モジ
ュール202は、OS切替部201内の他のコンポーネ
ントから呼出され、動作するOSを切替え、必要に応じ
て割込と同じ状態を作り出す。OSコンテキスト切替モ
ジュール202はメモリ102上に各OSごとのコンテ
キスト退避領域を確保し、管理している。ここでは、O
S間優先順位管理モジュール211からのOS切替要求
を処理する部分についてのみ説明する。
FIG. 13 shows a processing flow of the OS context switching module 202. The OS context switching module 202 is called from another component in the OS switching unit 201, switches the operating OS, and creates the same state as the interrupt if necessary. The OS context switching module 202 secures and manages a context save area for each OS on the memory 102. Here, O
Only the part that processes the OS switching request from the inter-S priority management module 211 will be described.

【0078】図13の処理421ならびに処理422は
いずれもNOと判定され、プロセッサ101の各レジス
タの現在値を直前に動作していたOS(以下、「切替元
OS」と呼ぶ)のコンテキスト退避領域に保存し(処理
425)、これから動作させようとしているOS(以
下、「切替先OS」と呼ぶ)のコンテキスト退避領域に
ある値をプロセッサ101の各レジスタに復旧する(処
理426)。この後PCも保存されていた値に復旧し
(処理428)、切替先OSの中断点から動作が再開す
る。
Both the processing 421 and the processing 422 in FIG. 13 are determined to be NO, and the current value of each register of the processor 101 is saved in the context save area of the OS that was operating immediately before (hereinafter referred to as “switching source OS”). (Processing 425), and restores the values in the context save area of the OS to be operated (hereinafter referred to as “switching destination OS”) to the registers of the processor 101 (processing 426). Thereafter, the PC is restored to the stored value (process 428), and the operation resumes from the interruption point of the switching destination OS.

【0079】処理425をより詳細に説明する。OS切
替部201に入ってからOS切替部201内の各モジュ
ールで変更したレジスタについては、現在値ではなくO
S切替部201に入った時点の値を保存する。これによ
り、当該OSの動作が再開された時点において、OS切
替部201に切替る前の状態を完全に復旧できる。
The process 425 will be described in more detail. Registers changed by each module in the OS switching unit 201 after entering the OS switching unit 201 are not the current values but O
The value at the time of entering the S switching unit 201 is stored. Thus, when the operation of the OS is restarted, the state before switching to the OS switching unit 201 can be completely restored.

【0080】また、OS切替部201内のモジュールを
関数呼出の形で明示的に呼出した結果で処理425を実
行する場合には、PCの値として当該呼出関数からのリ
ターンアドレスを保存し、リターン値を示すレジスタの
値として当該呼出関数のリターン値を保存し、その他の
レジスタについては前述のとおりOS切替部201に入
った時点の値を保存することがある。これにより当該O
Sの動作が再開された時点において当該呼出関数がリタ
ーンした状態から実行されることになる。
When the process 425 is executed as a result of explicitly calling a module in the OS switching unit 201 in the form of a function call, the return address from the call function is stored as the value of the PC, and the return is performed. The return value of the call function may be stored as the value of the register indicating the value, and the values at the time of entering the OS switching unit 201 may be stored in other registers as described above. As a result, the O
When the operation of S is restarted, the calling function is executed from the state in which it returned.

【0081】以上で説明した動作により、各OS上のタ
スクが、全てのOSに渡って統一的に決められた優先順
位に従って、順次OSを切替えられながら動作していく
ことになる。
According to the above-described operation, the tasks on each OS operate while sequentially switching the OSs in accordance with the priority order determined uniformly over all the OSs.

【0082】第二に、割込が入った場合の動作について
説明する。ここで説明する割込とは、前述の外部割込や
内部割込であり、遅延要求割込については後述する。
Second, the operation when an interrupt is made will be described. The interrupt described here is the above-mentioned external interrupt or internal interrupt, and the delay request interrupt will be described later.

【0083】割込を受付けた場合の割込処理プログラム
として、図5に示されている共通割込ハンドラ212が
呼出される。すなわち、割込アドレスレジスタ129に
は共通割込ハンドラ212のアドレスを設定している。
割込要因ごとに第一OS301または第二OS351の
いずれかで処理するものとして割当を行う。共通割込ハ
ンドラ212がその割当に基づき、OSコンテキスト切
替モジュール202に当該OSに対する割込状態の発生
を依頼する。
As an interrupt processing program when an interrupt is accepted, the common interrupt handler 212 shown in FIG. 5 is called. That is, the address of the common interrupt handler 212 is set in the interrupt address register 129.
Assignment is performed assuming that the processing is performed by either the first OS 301 or the second OS 351 for each interrupt factor. Based on the assignment, the common interrupt handler 212 requests the OS context switching module 202 to generate an interrupt state for the OS.

【0084】OSコンテキスト切替モジュール202
は、当該OSの割込ハンドラ307ないし357を呼出
し、割込処理を実行させる。各割込ハンドラは必要に応
じてシステムコールを発行し、その結果スケジューラが
実行されてタスクの切替が発生する場合もある。例え
ば、入出力装置105の処理完了により割込が発生し、
当該処理の完了を待機していたタスクの中断が解除され
て当該タスクが再開される場合である。また別な例とし
て、タイマ装置108からの割込発生により当該OSの
内部時間が更新され、ラウンドロビン方式のスケジュー
リングを行うために現在実行中のタスクが中断され他の
同一優先順位の実行待ちタスクにタスクスイッチされる
場合がある。なお、本計算機システムでは、一部の割込
要因をOS切替部201の内部コンポーネントで処理す
るよう定義することもできる。
OS context switching module 202
Calls the interrupt handlers 307 to 357 of the OS to execute the interrupt processing. Each interrupt handler issues a system call as necessary, and as a result, the scheduler may be executed and task switching may occur. For example, when the processing of the input / output device 105 is completed, an interrupt occurs,
This is a case where the suspension of the task waiting for completion of the process is released and the task is restarted. As another example, the internal time of the OS is updated due to the occurrence of an interrupt from the timer device 108, the currently executing task is interrupted to perform round-robin scheduling, and another task waiting to be executed with the same priority is performed. May be task switched. In this computer system, it is also possible to define that some interrupt factors are processed by an internal component of the OS switching unit 201.

【0085】割込を受付けた場合には、即座に処理を行
うOS上の割込ハンドラ305ないし355、あるいは
OS切替部201の内部コンポーネントを呼出す。従っ
て、ある処理の実行中に、当該実行中の処理よりも処理
の必要性が低い割込が発生して、その割込ハンドラによ
り当該実行中の処理が中断されることを防止するために
は、割込マスクレベル値を引上げることが必要である。
When the interrupt is accepted, the interrupt handlers 305 to 355 on the OS that immediately performs the processing or the internal components of the OS switching unit 201 are called. Therefore, in order to prevent an interrupt having a lower necessity for the process than the process being executed from occurring during the execution of the process and preventing the interrupted process from being interrupted by the interrupt handler, , It is necessary to raise the interrupt mask level value.

【0086】共通割込ハンドラ212の処理フローを図
14に示す。共通割込ハンドラ212は、図15に示す
割込割当テーブル231を持っており、割込要因レジス
タ131の値と、当該割込要因レジスタ231の値に対
応する割込を処理すべきOSとの組合わせを記録してい
る。図15に示した例の場合、割込要因レジスタ131
に設定される値は、200(16進数)から始り、20
(16進数)刻みの値であるものとしている。また、以
下の説明では、200(16進数)はタイマ装置1「1
081」からの割込、220(16進数)はタイマ装置
2「1082」からの割込、240(16進数)はタイ
マ装置3「1083」からの割込を受付けた場合に設定
される値とする。ここで、割込割当テーブル231の内
容は固定されたものとしているが、各OSや各OS上で
動作するタスクからの要求により内容を動的に変更する
ことも可能である。
FIG. 14 shows the processing flow of the common interrupt handler 212. The common interrupt handler 212 has an interrupt assignment table 231 shown in FIG. 15, and stores the value of the interrupt factor register 131 and the OS that should process the interrupt corresponding to the value of the interrupt factor register 231. The combination is recorded. In the case of the example shown in FIG.
Is set to 200 (hexadecimal) and 20
(Hexadecimal number). Also, in the following description, 200 (hexadecimal) is the timer device 1 “1”.
081 ”, 220 (hexadecimal) is an interrupt from timer device 2“ 1082 ”, 240 (hexadecimal) is a value set when an interrupt from timer device 3“ 1083 ”is accepted. I do. Here, the contents of the interrupt assignment table 231 are fixed, but the contents can be dynamically changed in response to a request from each OS or a task running on each OS.

【0087】共通割込ハンドラ212は、割込発生時点
で呼出され、割込禁止で動作する。まず、プロセッサ1
01の割込要因レジスタ131を参照し、割込要因を取
得する(処理441)。次に割込割当テーブル231か
ら当該割込を処理するOSを取得する(処理442)。
ここで割当がOS切替部201となっていた場合(処理
443)、OS切替部201内の当該割込を処理するモ
ジュールを呼出して処理を実行し(処理445)、終了
後に当該処理で使用したレジスタを元に戻してからプロ
セッサの割込リターン命令(ReTurn from
Exception。以下、「RTE」と呼ぶ)により
割込発生時点の動作に復帰する(処理446)。
The common interrupt handler 212 is called when an interrupt occurs, and operates with interrupts disabled. First, processor 1
With reference to the interrupt factor register 131 of 01, an interrupt factor is acquired (process 441). Next, an OS that processes the interrupt is acquired from the interrupt assignment table 231 (process 442).
Here, when the assignment is the OS switching unit 201 (process 443), the module that processes the interrupt in the OS switching unit 201 is called and the process is executed (process 445), and the process is used after the end. After returning the register to its original state, the processor's interrupt return instruction (ReTurn from)
Exception. Hereinafter, the operation is returned to the operation at the time of the occurrence of the interrupt due to “RTE” (process 446).

【0088】ここで割込要因とOS切替部201内の処
理を担当するモジュール(呼出される関数)との関係
は、別途割当表が存在することを想定しているが、割込
割当テーブル231の一部として記録することも可能で
ある。一方、割当がOS切替部201ではない場合、当
該OSに対して割込発生状態とするよう、OSコンテキ
スト切替モジュール202へ依頼する(処理444)。
Here, the relationship between the interrupt factor and the module (the function to be called) in charge of the processing in the OS switching unit 201 is based on the assumption that a separate allocation table exists. It is also possible to record as part of On the other hand, if the assignment is not the OS switching unit 201, the OS context switching module 202 is requested to make the OS into an interrupt occurrence state (process 444).

【0089】OSコンテキスト切替モジュール202で
は、図13に示すように、処理で使用したワークレジス
タの値を、割込が発生した時点の内容に回復する(処理
423)。ここで、割込発生時点で動作していたOSと
当該OSが異なっていた場合(処理424)、既に説明
したように切替元OSのレジスタを退避し(処理42
5)、切替先OSのレジスタを復旧する(処理42
6)。続いて、当該OSの割込ハンドラ307ないし3
57のアドレスをPCに設定することで、当該割込ハン
ドラの実行を開始する(処理429)。
In the OS context switching module 202, as shown in FIG. 13, the value of the work register used in the process is restored to the content at the time when the interrupt occurred (process 423). Here, if the OS operating at the time of occurrence of the interrupt is different from the OS (process 424), the register of the switching source OS is saved as described above (process 42).
5), restore the register of the switching destination OS (process 42)
6). Then, the interrupt handlers 307 to 3 of the OS
By setting the address 57 to the PC, the execution of the interrupt handler is started (process 429).

【0090】図15に示した割込割当テーブル231の
内容の場合、タイマ装置1「1081」からの割込が発
生した場合は第一OS301に割込を発生させ、タイマ
装置2「1082」からの割込が発生した場合は第二O
S351に割込を発生させる。また、タイマ装置3「1
083」からの割込が発生した場合はOS切替部201
内部のOS状態管理モジュール207が呼出されるもの
とする。OS状態管理モジュール207で行う割込処理
の内容は後述する。
In the case of the contents of the interrupt assignment table 231 shown in FIG. 15, when an interrupt from the timer device 1 “1081” occurs, an interrupt is generated in the first OS 301 and the timer device 2 “1082” If an interrupt occurs, the second O
An interrupt is generated in S351. Also, the timer device 3 "1
083 ”, the OS switching unit 201
It is assumed that the internal OS state management module 207 is called. The contents of the interrupt processing performed by the OS state management module 207 will be described later.

【0091】なお、本実施例ではタイマ装置が三つ存在
するものとして、各タイマの割込に対応して各OSない
しOS切替部201が呼出されるものとしたが、タイマ
装置が一つしか無い場合でも、当該タイマ装置からの割
込が発生するごとに予め決められた順序で各OSないし
OS切替部201のいずれかへの割込として扱うことで
同じ効果を得ることができる。
In this embodiment, it is assumed that there are three timer devices, and each OS or OS switching unit 201 is called in response to each timer interrupt. However, only one timer device is used. Even when there is no interrupt, the same effect can be obtained by treating each of the OSs or the OS switching unit 201 as an interrupt in a predetermined order each time an interrupt from the timer device occurs.

【0092】なお、割込要因レジスタ131に、割込割
当テーブル231に存在しない値が設定されていた場合
があり得る。また、割込割当テーブル231の割当OS
の欄に第四の値として「無効」と設定されている場合が
あり得る。これらの場合、共通割込ハンドラ212で単
純にRTE(処理446)を行い無視するか、またはハ
ードウェアの重大エラーとして扱い、エラー表示、エラ
ー記録、ないし計算機システムの停止などの処理を行う
かの、いずれかとする。
Incidentally, a value that does not exist in the interrupt assignment table 231 may be set in the interrupt factor register 131. Also, the assigned OS in the interrupt assignment table 231
May be set as "invalid" as the fourth value. In these cases, the common interrupt handler 212 simply ignores the RTE (process 446) and ignores it, or treats it as a serious hardware error and performs processing such as error display, error recording, or computer system shutdown. , Either.

【0093】第一OS301の割込ハンドラ307の処
理フローを図16に示す。割込ハンドラ307も割込禁
止の状態で呼出され、まず現時点のレジスタの内容を割
込スタックに退避する(処理451)。割込要因レジス
タ131から割込要因を取得し(処理452)、当該割
込とレベルが同じかよりレベルの低い割込が発生しない
ように割込マスクレベルを設定してから割込禁止を解除
する(処理453)。処理453以降では、より割込レ
ベルの高い割込を受付けて、さらに割込ハンドラが呼出
されて処理すること(これを「多重割込」と呼ぶ)が可
能になる。そして、割込要因に対応する各々の処理を実
行する(処理454)。
FIG. 16 shows a processing flow of the interrupt handler 307 of the first OS 301. The interrupt handler 307 is also called in a state where interrupts are prohibited, and first saves the current register contents to the interrupt stack (process 451). The interrupt factor is acquired from the interrupt factor register 131 (step 452), the interrupt mask level is set so that an interrupt having the same level as the interrupt or a lower level is not generated, and then the interrupt prohibition is released. (Step 453). After the process 453, it becomes possible to accept an interrupt with a higher interrupt level and to call and process an interrupt handler (this is called "multiple interrupts"). Then, each process corresponding to the interrupt factor is executed (process 454).

【0094】一般的なOSの場合、処理454の部分に
ついてはデバイスドライバなどの形でユーザの任意の処
理を組込めるような仕組となっており、処理の組込み方
法やシステムコール308ないし358の使用方法等が
明確に規定されている。またOSによっては、処理45
4の内容を動作中に動的に変更することも可能である。
各処理が終ると再度割込禁止とし(処理455)、多重
割込の処理中であった場合(処理456)や、割込処理
の結果スケジューリングが発生しなかった場合(処理4
57)は、処理451で割込スタック上に退避したレジ
スタを復旧して(処理460)、RTE命令により割込
発生時点の処理に復帰する(処理461)。 一方、割
込処理内でのシステムコール発行などによりスケジュー
リングが必要となった場合には、処理451で割込スタ
ック上に退避したレジスタをそれまで動作していたタス
クのタスク管理ブロック内のレジスタ退避領域3213
に保存し、割込スタックを破棄する(処理458)。そ
してスケジューラ309へジャンプして割込ハンドラ3
07の処理を終了する。
In the case of a general OS, the process 454 is configured so that a user can arbitrarily perform a process in the form of a device driver or the like. The method is clearly specified. Also, depending on the OS, processing 45
4 can also be dynamically changed during operation.
When each process is completed, the interrupt is prohibited again (process 455), and when multiple interrupts are being processed (process 456), or when scheduling has not occurred as a result of the interrupt process (process 4).
Step 57) restores the register saved on the interrupt stack in step 451 (step 460), and returns to the processing at the time of occurrence of the interrupt by the RTE instruction (step 461). On the other hand, if scheduling becomes necessary due to issuance of a system call or the like in the interrupt process, the register saved on the interrupt stack in process 451 is saved in the task management block of the task that has been operating up to that point. Region 3213
And the interrupt stack is discarded (process 458). Then, the process jumps to the scheduler 309 and interrupt handler 3
07 is terminated.

【0095】以上で説明した動作により、割込を受付け
た場合に、必要に応じてOSを切替えながら、当該割込
を割込ハンドラにて処理される。
According to the operation described above, when an interrupt is accepted, the interrupt is processed by the interrupt handler while switching the OS as necessary.

【0096】第三に、OS間通信、特にOS間メッセー
ジ通信機能の動作について説明する。
Third, the operation of the inter-OS communication, particularly the operation of the inter-OS message communication function will be described.

【0097】図17にOS間メッセージ通信の概要を示
す。OS間メッセージ通信は、OS間通信モジュール2
06の一機能として提供される。OS間通信モジュール
206内に、メッセージキューと呼ばれるバッファ領域
が存在する。メッセージキューには、ID番号が付けら
れ各々を識別している。
FIG. 17 shows an outline of message communication between OSs. OS message communication is performed by the OS communication module 2
06 is provided as a function. A buffer area called a message queue exists in the inter-OS communication module 206. An ID number is assigned to the message queue to identify each.

【0098】図17には、ID=1のメッセージキュー
241と、ID=2のメッセージキュー242の二つが
示されている。図17では、タスクP352が、OS切
替部ライブラリ360を通じて、メッセージ243を送
信している。メッセージの内容はメッセージキュー24
1に一旦コピーされ、その後、タスクA302がOS切
替部ライブラリ310を通じて当該メッセージを取出す
(受信)。
FIG. 17 shows two message queues 241 with ID = 1 and a message queue 242 with ID = 2. In FIG. 17, the task P352 transmits the message 243 via the OS switching unit library 360. The content of the message is the message queue 24
1 once, and then the task A 302 extracts (receives) the message through the OS switching unit library 310.

【0099】図17のメッセージ244、245のよう
に、メッセージキューは受信要求があるまでの間複数の
メッセージを保持することが可能である。この場合、メ
ッセージ受信一回につき、FIFO(First In
First Out)方式で一つのメッセージのみを
取出して返す。
As in the case of the messages 244 and 245 in FIG. 17, the message queue can hold a plurality of messages until a reception request is issued. In this case, each time a message is received, the FIFO (First In
Only one message is fetched and returned by the First Out method.

【0100】ところで、タスクA302のメッセージ受
信が、タスクP352のメッセージ送信よりも先に行わ
れた場合、メッセージキュー241には取出すべきメッ
セージが存在しない、すなわち空の状態である。この場
合、タスクA302からの指定により二つの動作が選択
可能である。第一はメッセージが存在しないものとして
エラーとする動作である。第二はメッセージが送信され
るまでタスクA302の実行を停止し、メッセージが送
信された時点で、A302の実行を再開して当該メッセ
ージを取出すという動作である。第二の動作を、以下、
「受信待機」と呼ぶ。
When the message of task A 302 is received prior to the message transmission of task P 352, there is no message to be taken out in message queue 241, that is, it is empty. In this case, two operations can be selected by the designation from the task A302. The first is an operation in which a message does not exist and an error occurs. The second is an operation in which the execution of the task A302 is stopped until the message is transmitted, and when the message is transmitted, the execution of the task A302 is resumed to retrieve the message. The second operation is as follows.
This is called “waiting for reception”.

【0101】以上のような手順で異なるOS上のタスク
間でのメッセージ通信を実現する。なお、ここで説明し
ているOS間メッセージ通信の機能を使い、同一のOS
上で動作するタスク間でのメッセージ通信を行うことも
可能である。
The message communication between the tasks on the different OSs is realized by the above procedure. Note that the same OS message communication function is used by using the OS message communication function described here.
It is also possible to perform message communication between tasks operating on the above.

【0102】OS切替部ライブラリ310のメッセージ
受信処理(処理470)の処理フローを図18に示す。
以下の説明では、メッセージキューが空であった場合に
受信待機をするよう指定された場合についてのみ説明す
る。この処理では、第一OS301の同期機能の一つで
あるイベントを使う。ここで、各イベントはイベントを
識別するID(以下、「イベントID」と呼ぶ)を持つ
ものとする。各イベントはシグナル状態と非シグナル状
態の二つの状態が存在し、これらの状態を変更するシス
テムコールが提供されているものとする。また、任意の
タスクは任意のイベントについてシグナル状態になるの
を待機することができ、待機している間ポーリングなど
のCPU処理を一切行うことなく動作が中断しているも
のとする。
FIG. 18 shows a processing flow of the message reception processing (processing 470) of the OS switching unit library 310.
In the following description, only the case where it is specified to wait for reception when the message queue is empty will be described. In this process, an event that is one of the synchronization functions of the first OS 301 is used. Here, it is assumed that each event has an ID for identifying the event (hereinafter, referred to as “event ID”). It is assumed that each event has two states, a signal state and a non-signal state, and a system call for changing these states is provided. Also, it is assumed that an arbitrary task can wait for a signal state to be reached for an arbitrary event, and the operation is suspended without performing any CPU processing such as polling while waiting.

【0103】メッセージ受信処理470では、まずOS
間通信モジュール206に対して、メッセージキューの
ID番号と自分自身のタスクIDを指定して受信要求を
行う(処理471)。ここでメッセージキューが空でな
ければ(処理472)、取出したメッセージの内容とと
もに呼出元にリターンする(処理473)。OS間通信
モジュール206から何らかのエラーが返された場合も
同様である。
In the message receiving process 470, first, the OS
The reception request is made to the inter-communication module 206 by designating the ID number of the message queue and the task ID of itself (process 471). If the message queue is not empty (process 472), the process returns to the calling source together with the content of the fetched message (process 473). The same applies when an error is returned from the inter-OS communication module 206.

【0104】一方、メッセージキューが空であった場
合、OS間通信モジュール206は処理保留のリターン
値を返してくるので、イベントを非シグナル状態で作成
し、このイベントIDと自分自身のタスクIDを遅延要
求ハンドラ305に登録した上で、イベントがシグナル
状態になるまで待機する(処理474)。
On the other hand, if the message queue is empty, the inter-OS communication module 206 returns a return value indicating that the process is suspended, so that the event is created in a non-signal state, and the event ID and the task ID of the own task are created. After registering with the delay request handler 305, the process waits until the event is signaled (process 474).

【0105】当該イベントはメッセージが送信された場
合ないし何らかのエラー状態が発生した場合に、遅延要
求ハンドラ305によりシグナル状態に変更される。当
該イベントがシグナル状態になった時点で、再度OS間
通信モジュール206にメッセージ受信要求を行い、当
該メッセージを取出し(処理476)、使用したイベン
トを削除した上で呼出元にリターンする(処理47
7)。処理476でエラーが返された場合も同様であ
る。なお、処理476では、当該要求が受信待機してい
た後の受信要求再発行であることを示す「再要求フラ
グ」を付ける。
The event is changed to a signal state by the delay request handler 305 when a message is transmitted or some error state occurs. When the event is signaled, a message reception request is made to the inter-OS communication module 206 again, the message is taken out (process 476), the used event is deleted, and the process returns to the caller (process 47).
7). The same applies when an error is returned in the process 476. In the process 476, a “re-request flag” indicating that the request is a re-issue of a reception request after waiting for reception is added.

【0106】OS間通信モジュール206では、当該フ
ラグにより受信待機していた処理を、当該IDのメッセ
ージキューに対する他の受信要求と区別し、受信待機し
ていた処理にメッセージを取出させるようにする。処理
474のイベントの待機処理では、タイムアウトを設定
する。もし、タイムアウトが発生した場合(処理47
5)、OS間通信モジュール206に対して、受信待機
している要求が無くなったことを知らせる通知を行い
(処理478)、使用したイベントを削除した上で呼出
元には、タイムアウトエラーでリターンする(処理47
9)。
The inter-OS communication module 206 distinguishes the process waiting for reception by the flag from other reception requests for the message queue of the ID, and causes the process waiting for reception to take out the message. In the event waiting process of process 474, a timeout is set. If a timeout occurs (process 47)
5) A notification is sent to the inter-OS communication module 206 indicating that there are no more requests waiting to be received (process 478), the used event is deleted, and the caller returns with a timeout error. (Process 47
9).

【0107】なお、以上の説明では、受信待機が発生す
る毎にイベントを生成、削除するように記したが、あら
かじめタスク毎にイベントを作成したり、いくつかのイ
ベントを作成しておき使用されていないものを順次使用
するということも可能である。
In the above description, an event is generated and deleted each time reception standby occurs. However, an event is created in advance for each task, or several events are created and used. It is also possible to use those that are not used sequentially.

【0108】OS間通信モジュール206のメッセージ
受信処理(処理480)の処理フローを図19に示す。
ここでも、メッセージキューが空であった場合、受信待
機をするよう指定された場合についてのみ説明する。
FIG. 19 shows a processing flow of the message reception processing (processing 480) of the inter-OS communication module 206.
Here, only the case where the message queue is empty and the case where the reception standby is designated is described.

【0109】OS間通信モジュール206は、各メッセ
ージキュー毎に、受信待機中フラグと受信遅延要求発行
フラグという二つの変数を持っている。このうち受信待
機中フラグは、当該メッセージキューが空であったため
にメッセージの受信待機を行っているタスクが存在する
ことを示すフラグで、受信待機を行っているタスクの動
作OSとタスクIDが格納されている。受信遅延要求発
行フラグは、受信待機が行われた後にメッセージ送信さ
れ、受信待機しているタスクからの再度の受信要求によ
り当該メッセージが取出されるのを待機している状態で
あることを示すフラグである。
The inter-OS communication module 206 has two variables, a reception waiting flag and a reception delay request issuance flag, for each message queue. The reception waiting flag is a flag indicating that there is a task waiting to receive a message because the message queue is empty, and stores the operation OS and the task ID of the task waiting to receive the message. Have been. The reception delay request issuance flag is a flag indicating that the message is transmitted after the reception standby is performed, and the message is waiting for the message to be taken out by a re-reception request from the task waiting for reception. It is.

【0110】まずメッセージ受信要求を受けると、当該
メッセージキューの受信待機中フラグを調べ(処理48
1)、もし待機中ならばエラーリターンとする(処理4
82)。すなわち、同時に複数のタスクが受信待機をす
ることはできない。
First, when a message reception request is received, the reception waiting flag of the message queue is checked (step 48).
1) If it is waiting, an error return is made (Process 4)
82). That is, a plurality of tasks cannot wait for reception at the same time.

【0111】次に、受信遅延要求発行フラグが設定され
ていない場合、当該キューにメッセージが存在するか確
認し(処理484)、存在すればFIFO式にメッセー
ジを一つ取出し、当該メッセージを本処理の呼出元が用
意したバッファにコピーしてリターンする(処理48
5)。一方、メッセージが存在しない場合、要求元タス
クの動作OSとタスクIDを当該キューの受信待機中フ
ラグに設定し(処理486)、受信待機を受付けたこと
を示す「処理保留」のリターン値でリターンする(処理
487)。
Next, if the reception delay request issuance flag is not set, it is checked whether a message exists in the queue (process 484), and if it exists, one message is taken out in a FIFO manner, and the message is processed in this process. Is copied to a buffer prepared by the caller of the process (step 48).
5). On the other hand, if the message does not exist, the operation OS and task ID of the requesting task are set in the reception waiting flag of the queue (step 486), and the process returns with a return value of “processing pending” indicating that reception standby has been accepted. (Step 487).

【0112】一方、受信遅延要求発行フラグが設定され
ている場合、受信待機が行われた後にメッセージ送信さ
れたことを示している。当該受信待機を行っているタス
ク以外から当該キューに対するメッセージ受信要求があ
った場合、すなわち受信要求に「再要求フラグ」が付い
ていなかった場合(処理488)、当該要求はエラーリ
ターンとする(処理490)。一方、当該受信待機を行
っているタスクからの受信処理要求(図18の処理47
6など)があった場合、受信遅延要求発行フラグをOF
Fした上で(処理489)、前述のメッセージ取出し処
理485を行う。
On the other hand, if the reception delay request issuance flag is set, it indicates that the message was transmitted after waiting for reception. If there is a message reception request for the queue from a task other than the task waiting for reception, that is, if the reception request does not have a “re-request flag” (process 488), the request is returned as an error (process 488). 490). On the other hand, a reception processing request from the task waiting for reception (processing 47 in FIG. 18).
6), the reception delay request issuance flag is set to OF.
F (process 489), the above-described message fetch process 485 is performed.

【0113】OS間通信モジュール206のメッセージ
送信処理(処理500)の処理フローを図20に示す。
FIG. 20 shows a processing flow of the message transmission processing (processing 500) of the inter-OS communication module 206.

【0114】まず送信されたメッセージを指定のキュー
にコピーする(処理501)。次に当該キューの受信待
機中フラグを調べ(処理502)、受信待機中でなけれ
ばそのまま呼出元にリターンする(処理506)。一
方、受信待機中フラグが設定されていた場合、当該フラ
グに記録されているタスクIDを取出した後当該フラグ
をクリアし(処理503)、当該キューの受信遅延要求
割込フラグをONにする(処理504)。そして、受信
待機しているタスクの動作を再開させるよう、遅延要求
管理モジュール203に、処理503で取出したタスク
IDのタスクに対するタスク再開の遅延要求の追加を依
頼する(処理505)。
First, the transmitted message is copied to a designated queue (process 501). Next, the reception waiting flag of the queue is checked (process 502), and if it is not waiting for reception, the process directly returns to the calling source (process 506). On the other hand, if the reception waiting flag is set, the task ID recorded in the flag is taken out, the flag is cleared (process 503), and the reception delay request interrupt flag of the queue is turned on (step 503). Process 504). Then, it requests the delay request management module 203 to add a task restart delay request to the task with the task ID extracted in the process 503 so as to restart the operation of the task waiting for reception (process 505).

【0115】遅延要求管理モジュール203は、遅延要
求を蓄積してすぐにリターンする場合もあれば、OSコ
ンテキスト切替モジュール202を通じて遅延要求割込
を発行し遅延要求割込ハンドラへ処理が移行する場合も
ある。後者の場合、本送信処理を要求したタスクの属す
るOSが当該タスクの動作を再開する時点で、処理50
5のリターン時点に復旧するようにPCの退避を行う。
これによりいずれの場合でも、呼出元へのリターンが行
われる(処理506)。
The delay request management module 203 may accumulate the delay request and return immediately, or may issue a delay request interrupt through the OS context switching module 202 and shift the processing to the delay request interrupt handler. is there. In the latter case, when the OS to which the task that has requested this transmission process belongs resumes the operation of the task, the process 50
The PC is evacuated so as to recover to the point of return of step 5.
As a result, in any case, a return to the caller is performed (process 506).

【0116】遅延要求管理モジュール203の処理フロ
ーを図21〜図23に示す。
The processing flow of the delay request management module 203 is shown in FIGS.

【0117】遅延要求管理モジュール203は、大きく
分けて二つの状況で呼出される。第一は新たな遅延要求
が発生した場合である。この場合、当該要求先OSに対
応した遅延要求キュー204ないし205に要求を一旦
格納する(処理512)。第二は、OS切替部201内
の各モジュールがOSコンテキスト切替モジュール20
2にOSの切替を要求する場合で、共通割込ハンドラ2
12からの割込発生要求を除き、遅延要求管理モジュー
ル203を経由する形での要求とする。この場合処理5
12はスキップされる(処理511)。
The delay request management module 203 is called in roughly two situations. The first is when a new delay request occurs. In this case, the request is temporarily stored in the delay request queues 204 to 205 corresponding to the request destination OS (process 512). Second, each module in the OS switching unit 201 is connected to the OS context switching module 20.
2 requests OS switching, the common interrupt handler 2
Except for the interrupt generation request from T.12, the request is made via the delay request management module 203. Processing 5 in this case
12 is skipped (process 511).

【0118】遅延要求管理モジュール203は、図5に
示すように、各OSに対する遅延要求割込許可フラグ2
09ないし210を持っている。このフラグがOFFの
場合は、当該OSに対して一旦遅延要求割込を発行して
当該割込に対する遅延要求割込ハンドラの処理が完了し
ていないことを示している。また、遅延要求管理モジュ
ール203は、各OSに対する遅延要求割込レベルを記
録する変数を持っていて、予め当該OSに対する遅延要
求割込の割込レベルを設定しておく。
The delay request management module 203, as shown in FIG.
09 to 210. When this flag is OFF, it indicates that a delay request interrupt is issued once to the OS and the processing of the delay request interrupt handler for the interrupt has not been completed. Further, the delay request management module 203 has a variable for recording the delay request interrupt level for each OS, and sets the delay request interrupt level for the OS in advance.

【0119】遅延要求管理モジュール203は、まず第
一OSの遅延要求割込レベルを現時点でのプロセッサ1
01の割込マスクレベルと比較し、割込マスクレベルの
方が高ければ第一OSに対する以降の処理をスキップす
る(処理513)。次に第一OSに対する遅延要求割込
許可フラグ209を調べ、これがOFFの場合は第一O
Sに対する以降の処理をスキップする(処理514)。
遅延要求割込ハンドラ305は第一OS遅延要求キュー
204内にある遅延要求を全て取出すまで処理を継続す
るため、当該処理が完了するまでは新たに遅延要求の発
生を通知する必要がない。
The delay request management module 203 first sets the delay request interrupt level of the first OS to
Compared with the interrupt mask level of 01, if the interrupt mask level is higher, the subsequent processing for the first OS is skipped (process 513). Next, the delay request interrupt permission flag 209 for the first OS is checked.
The subsequent processing for S is skipped (processing 514).
Since the delay request interrupt handler 305 continues the processing until all the delay requests in the first OS delay request queue 204 are taken out, it is not necessary to newly notify the occurrence of the delay request until the processing is completed.

【0120】従って、無意味な遅延要求割込の発生およ
びそれに伴うOS切替を抑止するために、処理514の
判定を行っている。続いて、第一OS遅延要求キュー2
04に遅延要求が存在するか調べ(処理515)、要求
が存在する場合には第一OS301に対する遅延要求割
込許可フラグ209をOFFにして(処理519)、遅
延要求割込ハンドラ305に遅延要求の存在を通知する
ために遅延要求割込を発生させる(処理520)。
Therefore, the determination of the process 514 is made in order to suppress the occurrence of the meaningless delay request interrupt and the accompanying OS switching. Subsequently, the first OS delay request queue 2
04 (step 515), and if there is a request, the delay request interruption permission flag 209 for the first OS 301 is turned off (step 519), and the delay request is sent to the delay request interrupt handler 305. (Step 520).

【0121】実際の遅延要求割込の発生はOSコンテキ
スト切替モジュール202にて行われる。遅延要求割込
の発生要求があった場合は、図13に示した処理フロー
の中の処理422で判定され、共通割込ハンドラからの
割込発生要求と同様に扱われる。この際、処理423に
おいて、割込要因レジスタ130に対して予め決めてお
いた遅延要求割込を示す値を設定する。この値は、他の
割込要因では設定されない値を使用する。第一OS30
1と第二OS351で、同一の値とすることも異なる値
とすることも可能である。割込ハンドラ307では、割
込要因レジスタ130に遅延要求割込を示す値が設定さ
れていることを確認し、割込処理454として遅延要求
割込ハンドラ305を起動する。
The actual generation of the delay request interrupt is performed by the OS context switching module 202. When there is a request to generate a delay request interrupt, it is determined in the process 422 in the process flow shown in FIG. 13 and is handled in the same manner as an interrupt generation request from the common interrupt handler. At this time, in processing 423, a value indicating a predetermined delay request interrupt is set in the interrupt factor register 130. This value uses a value that is not set by other interrupt factors. First OS30
1 and the second OS 351 can have the same value or different values. The interrupt handler 307 confirms that the value indicating the delay request interrupt is set in the interrupt factor register 130, and activates the delay request interrupt handler 305 as the interrupt processing 454.

【0122】さて、遅延要求管理モジュール203の説
明に戻る。第一OS301に対して遅延要求割込の発生
を行わなかった場合、第二OS351に対しても同様に
遅延要求割込を発生させるかどうかの判定を行う(処理
516〜処理518)。第二OS351に対して遅延要
求割込を発生させると判断した場合は、第一OS301
と同様に処理519および処理520を行う。
Now, let us return to the description of the delay request management module 203. If a delay request interrupt has not been generated for the first OS 301, it is determined whether or not a delay request interrupt should be generated for the second OS 351 as well (steps 516 to 518). If it is determined that a delay request interrupt should occur to the second OS 351, the first OS 301
Processing 519 and processing 520 are performed in the same manner as described above.

【0123】第一OS301および第二OS351のい
ずれに対しても遅延要求割込の発生を行わなかった場
合、遅延要求管理モジュール203が呼出された理由を
処理511と同じ判定で調べ、新たな遅延要求が発生し
た場合の呼出ならば呼出元にリターンし(処理52
2)、OSコンテキスト切替モジュール202にOSの
切替を要求する場合であればOSコンテキスト切替モジ
ュール202にジャンプする(処理523)。
If no delay request interruption has occurred in either the first OS 301 or the second OS 351, the reason why the delay request management module 203 was called is checked by the same determination as in the process 511, and a new delay If the call is made when a request occurs, the process returns to the caller (process 52).
2) If the OS context switching module 202 is requested to switch the OS, the process jumps to the OS context switching module 202 (process 523).

【0124】ここまでの説明では、遅延要求割込の発生
判定を第一OS301、第二OS351の順で固定的に
行うものとしたが、他の順序でも構わない。例えば、遅
延要求割込の割込レベルが高い方を先に行ったり、遅延
要求の追加時は追加された要求のOSを先に行ったりと
いうことも考えられる。
In the above description, the occurrence of the delay request interrupt is fixedly determined in the order of the first OS 301 and the second OS 351. However, another order may be used. For example, it is conceivable that the higher the interrupt level of the delay request interrupt is performed first, and when the delay request is added, the OS of the added request is performed first.

【0125】また、遅延要求割込許可フラグの状態、お
よび遅延要求割込の割込レベルと割込マスクレベルの比
較によって割込発生するかどうかを決めているが、他の
基準を追加することも可能である。例えば、遅延要求割
込を発生させることができるOSの動作優先順位を予め
決めておき、当該OSの優先順位の現在値が予め決めら
れた優先順位よりも低いときに限り遅延要求割込を発生
させるようにすることができる。
Although the state of the delay request interrupt enable flag and the comparison between the delay request interrupt level and the interrupt mask level determine whether or not an interrupt occurs, other criteria should be added. Is also possible. For example, the operation priority of an OS that can generate a delay request interrupt is determined in advance, and the delay request interrupt is generated only when the current value of the priority of the OS is lower than the predetermined priority. You can make it.

【0126】次に、第一OS301の遅延要求割込ハン
ドラ305の処理フローを図24に示す。前述のとお
り、遅延要求割込ハンドラ305は、割込ハンドラ30
7の中の割込処理454の一つとして動作する。割込ハ
ンドラ307で説明したとおり、遅延要求割込ハンドラ
305の処理中は、第一OS301への遅延要求割込の
割込レベルよりも割込レベルの高い割込を受付けること
が可能である。
Next, a processing flow of the delay request interrupt handler 305 of the first OS 301 is shown in FIG. As described above, the delay request interrupt handler 305
7 operates as one of the interruption processes 454. As described in the interrupt handler 307, during the processing of the delay request interrupt handler 305, it is possible to receive an interrupt having a higher interrupt level than the interrupt level of the delay request interrupt to the first OS 301.

【0127】遅延要求割込ハンドラ305は、遅延要求
キュー204から遅延要求を一つ取出す(処理53
1)。遅延要求が残っていないことがわかった場合(処
理532)、第一OS遅延要求割込許可フラグ209を
ONにして(処理533)、処理を完了する。
The delay request interrupt handler 305 fetches one delay request from the delay request queue 204 (process 53).
1). If it is found that no delay request remains (process 532), the first OS delay request interrupt permission flag 209 is turned on (process 533), and the process is completed.

【0128】遅延要求が取出せた場合、その要求の種類
を判定し(処理534)、各々対応する処理を行う。こ
こまでで説明してきたOS間メッセージ通信の場合、メ
ッセージの送信により、受信待機していたタスクを再開
する要求(以下、「タスク再開要求」と呼ぶ)が取出さ
れることになる。この場合、タスク再開要求には再開す
べきタスクのタスクIDがパラメータとして付随してい
るので、受信待機する際に記録されたタスクIDとイベ
ントIDの組から当該タスクIDに対応するを再開する
ためのイベントIDを取得し、当該イベントをシグナル
状態にするシステムコールを発行する(処理535)。
If the delay request can be taken out, the type of the request is determined (step 534), and the corresponding processing is performed. In the case of the OS-to-OS message communication described above, a request for resuming a task that has been waiting to be received (hereinafter, referred to as a “task resumption request”) is obtained by transmitting a message. In this case, since the task ID of the task to be restarted is attached as a parameter to the task restart request, the task ID corresponding to the task ID is restarted from the set of the task ID and the event ID recorded when waiting for reception. And issues a system call to make the event into a signal state (process 535).

【0129】イベントがシグナル状態になると、当該タ
スクで実行中だったOS切替部利用ライブラリ310の
メッセージ受信処理(処理470)が再開され、送信さ
れたメッセージの取出しが行われることになる。遅延要
求割込ハンドラ305は、遅延要求キュー204の要求
が無くなるまで、要求の取出し(処理531)を繰返
す。
When the event becomes a signal state, the message receiving process (process 470) of the OS switching unit use library 310 that was being executed by the task is restarted, and the transmitted message is taken out. The delay request interrupt handler 305 repeats the request fetch (process 531) until there are no more requests in the delay request queue 204.

【0130】なお、ここで説明した遅延要求割込ハンド
ラ305の処理の大部分を、割込ハンドラではなく第一
OS301上で動作するタスクとして構成することも可
能である。すなわち、遅延要求割込ハンドラ305は、
当該処理タスクに割込の発生を通知するだけで処理を終
了する。当該処理タスクでは前記通知を受け次第、ここ
までで説明してきた遅延要求割込ハンドラ305の処理
を実行する。第一OS遅延要求割込許可フラグ209を
ONにする処理533が実行されるまでは、再度遅延要
求割込が発生することはないので、遅延要求割込ハンド
ラと当該処理タスクの間で競合管理を行う必要はない。
Note that most of the processing of the delay request interrupt handler 305 described here can be configured as a task that operates on the first OS 301 instead of the interrupt handler. That is, the delay request interrupt handler 305
The process ends only by notifying the process task of the occurrence of the interrupt. Upon receiving the notification, the processing task executes the processing of the delay request interrupt handler 305 described above. Until the processing 533 for turning on the first OS delay request interrupt permission flag 209 is executed, the delay request interrupt does not occur again, so that the conflict management between the delay request interrupt handler and the processing task is performed. No need to do.

【0131】ここまでの説明では、遅延要求割込ハンド
ラ305が直接遅延要求キュー204や遅延要求割込許
可フラグ209を操作するようにしている。これらのキ
ューやフラグには遅延要求管理モジュール203もアク
セスするため、競合管理が必要となる。第一OS301
上のコンポーネントである遅延要求割込ハンドラ305
とOS切替部201上のコンポーネントである遅延要求
管理モジュール203との間で競合管理をするには、複
雑な処理が必要になる。これを解決するには、遅延要求
管理モジュール203に、遅延要求キュー204からの
要求取出し処理や遅延要求割込許可フラグ209の操作
処理を用意し、遅延要求割込ハンドラ305はこれらの
処理を呼出す形とすればよい。
In the description so far, the delay request interrupt handler 305 directly operates the delay request queue 204 and the delay request interrupt permission flag 209. Since the delay request management module 203 also accesses these queues and flags, contention management is required. First OS 301
The delay request interrupt handler 305 which is the above component
In order to manage conflicts between the OS and the delay request management module 203 as a component on the OS switching unit 201, complicated processing is required. To solve this, the delay request management module 203 prepares a request fetch process from the delay request queue 204 and an operation process of the delay request interrupt permission flag 209, and the delay request interrupt handler 305 calls these processes. It should be in the shape.

【0132】以上で説明した動作により、異なるOS上
で動作するタスク間でのメッセージ通信機能が実現され
る。
By the operation described above, a message communication function between tasks operating on different OSs is realized.

【0133】第四に、遅延要求を使用するその他の処理
について説明する。既に述べたとおり、遅延要求割込ハ
ンドラ305は当該OSのシステムコールを発行できる
ため、OS切替部201から各OSに対する様々な処理
要求の実現手段として使用できる。
Fourth, other processing using the delay request will be described. As described above, since the delay request interrupt handler 305 can issue a system call of the OS, it can be used as means for realizing various processing requests from the OS switching unit 201 to each OS.

【0134】まず、OS間通信の他の処理での使用を説
明する。OS間メッセージ通信のメッセージキューが満
杯の場合、当該メッセージキューに対する送信要求をメ
ッセージキューにメッセージを格納する空きが出来るま
で待機させる処理を実装することができる。この場合、
前述のメッセージ受信待機と同様にタスク再開要求の遅
延要求を使用すれば実現できる。
First, use of the inter-OS communication in another process will be described. When the message queue of the inter-OS message communication is full, it is possible to implement a process of waiting for a transmission request for the message queue until there is a space for storing a message in the message queue. in this case,
This can be realized by using the delay request of the task restart request as in the case of the message reception standby described above.

【0135】ただし、送信待機の場合は受信待機と異な
り、複数の要求を同時に待機させてもよい。そのように
した場合、サイズの大きなメッセージがメッセージキュ
ーより取出されたときに、複数のタスク再開要求を同時
に発行する必要がある。この場合、遅延要求管理モジュ
ール203へは全ての要求を一括して追加するように依
頼し、遅延要求キューに格納することが可能である。
However, in the case of the transmission standby, unlike the reception standby, a plurality of requests may be simultaneously standby. In such a case, it is necessary to simultaneously issue a plurality of task restart requests when a large message is taken out of the message queue. In this case, it is possible to request the delay request management module 203 to add all requests collectively and store the requests in the delay request queue.

【0136】しかし、これら複数の要求が複数のOSに
対するものでありなおかつこれらのOSがいずれも遅延
要求割込を発行できる状態にあった場合でも、いずれか
一つのOSにしか遅延要求割込は発行できず、他のOS
への割込発生は再度遅延要求管理モジュール203が呼
出されるまで遅れることになる。
However, even if the plurality of requests are for a plurality of OSs and all of the OSs are in a state where a delay request interrupt can be issued, the delay request interrupt is issued to only one of the OSs. Unable to issue, other OS
Is delayed until the delay request management module 203 is called again.

【0137】次に、OS間通信モジュール206の機能
の一つとして、異なるOSで動作するタスク間で競合管
理を行うためのOS間セマフォを実装する場合について
説明する。
Next, as one of the functions of the inter-OS communication module 206, a case will be described in which an inter-OS semaphore for performing conflict management between tasks operating on different OSs is implemented.

【0138】OS間セマフォは、基本的にはOS間メッ
セージ通信の送受信処理と同様にして実現できる。すな
わち、セマフォの獲得が成功した場合には獲得処理が即
座にリターンし、一方獲得待ちとなった場合には処理保
留でリターンする。そして、セマフォの解放処理で、セ
マフォ獲得待機タスクがある場合には当該タスクのタス
ク再開遅延要求を行えばよい。
The inter-OS semaphore can be realized basically in the same manner as the transmission / reception processing of the inter-OS message communication. That is, if the acquisition of the semaphore is successful, the acquisition process returns immediately, while if the acquisition is waiting, the process returns with the process suspended. In the semaphore release processing, if there is a semaphore acquisition standby task, a task restart delay request for the task may be performed.

【0139】一方、OS間セマフォの追加的な機能とし
て、優先順位の継承を実装する場合がある。これはOS
間セマフォの獲得待機をしているタスクの実行優先順位
が、既に当該セマフォを獲得しているタスクの優先順位
よりも高かった場合に、既に当該セマフォを獲得してい
るタスクの優先順位を一時的に獲得待機をしているタス
クの実行優先順位まで引上げる機能である。このために
は、OS間通信モジュール206から各OSに対して、
タスクの優先順位変更を依頼しなければならない。この
依頼はは、タスクの優先順位変更という遅延要求を追加
し、遅延要求割込ハンドラ305内で当該要求取出し時
にタスクの優先順位変更システムコールを発行すること
で実現できる。
On the other hand, there is a case where priority inheritance is implemented as an additional function of the semaphore between OSs. This is OS
If the execution priority of the task waiting to acquire the semaphore is higher than the priority of the task that has already acquired the semaphore, the priority of the task that has already acquired the semaphore is temporarily changed. This function raises the task that is waiting to be acquired to the execution priority. For this purpose, the inter-OS communication module 206 sends a
You must ask for a task priority change. This request can be realized by adding a delay request for changing the priority of a task and issuing a task priority change system call at the time of taking out the request in the delay request interrupt handler 305.

【0140】次に、OSのシステム時刻変更時の動作に
ついて説明する。既に述べたとおり、各OSは、RTC
107に対して直接時刻を読み書きする代りに、RTC
管理モジュール208にこれらの要求を行う。第二OS
351で管理するシステム時刻が変更された場合、変更
後の新しいシステム時刻をRTC107にも反映させる
ため、RTC管理モジュール208に設定依頼が行われ
る。
Next, the operation of the OS when the system time is changed will be described. As described above, each OS uses RTC
RTC instead of reading and writing the time directly to 107
These requests are made to the management module 208. Second OS
When the system time managed in 351 is changed, a setting request is made to the RTC management module 208 so that the new system time after the change is reflected in the RTC 107.

【0141】この場合の処理フローが、図25である。
依頼が合った場合、実際にRTC107へ時刻を設定し
(処理551)、遅延要求管理モジュール203にOS
1に対する「時刻変更要求」の遅延要求の発行を依頼す
る(処理552)。遅延要求割込ハンドラ305は、図
24に示したように、取出した遅延要求が「時刻変更要
求」であった場合には、RTC107の時刻を取得し
(処理536)、システム時刻をこの値に設定するシス
テムコールを発行する(処理537)。
FIG. 25 shows a processing flow in this case.
If the request matches, the time is actually set in the RTC 107 (process 551), and the OS is stored in the delay request management module 203.
A request is issued to issue a delay request for a “time change request” to the first server (process 552). As shown in FIG. 24, when the extracted delay request is a “time change request”, the delay request interrupt handler 305 acquires the time of the RTC 107 (process 536), and sets the system time to this value. A system call to be set is issued (process 537).

【0142】ただし、処理537の実行中に、当該シス
テムコール発行の結果再度RTC管理モジュール208
のRTC設定処理が呼出されないように予め設定してお
く必要がある。なお、RTC時刻にシステム時刻を一致
させるシステムコールがあれば、処理536ならびに処
理537は、一括して当該システムコールに置換えるこ
とができる。また、より簡易な処理としては、処理53
6を実行する代りに、処理522において、「時刻変更
要求」の遅延要求に付随するパラメータに設定すべき時
刻のデータを付加しておく方法も可能である。
However, during the execution of the process 537, the RTC management module 208
Must be set in advance so that this RTC setting process is not called. Note that if there is a system call that matches the system time with the RTC time, the processing 536 and the processing 537 can be collectively replaced with the system call. Further, as a simpler processing, processing 53
Instead of executing step 6, it is also possible to add data of the time to be set to the parameter accompanying the delay request of “time change request” in the process 522.

【0143】さらに、OS状態管理モジュール207か
らの要求も遅延要求として実現することが可能である。
図24の処理フローではその一例として、「シャットダ
ウン要求」の遅延要求処理を含んでいる。遅延要求割込
ハンドラ305は、取出した遅延要求が「シャットダウ
ン要求」であった場合には、シャットダウンを開始する
システムコールを発行する(処理538)。シャットダ
ウン要求の他に、あるOSの動作状態が変化した場合、
たとえばOSが起動した場合、OSがシャットダウンし
た場合、OSが異常停止した場合など、これを通知する
ための遅延要求を他のOSに行うことができる。遅延要
求割込ハンドラ305が、このようなOSの状態変化を
通知する遅延要求を受取った場合、状態変化を取扱うタ
スクを起動する、状態変化を通知するイベントをシグナ
ル状態に変更する、といった処理を行うことが可能であ
る。
Further, a request from the OS state management module 207 can be realized as a delay request.
The processing flow of FIG. 24 includes, as an example, a delay request processing of a “shutdown request”. If the extracted delay request is a “shutdown request”, the delay request interrupt handler 305 issues a system call to start shutdown (process 538). In addition to the shutdown request, when the operating state of a certain OS changes,
For example, when the OS is started, when the OS is shut down, or when the OS is abnormally stopped, a delay request for notifying this can be made to another OS. When the delay request interrupt handler 305 receives such a delay request for notifying a change in the state of the OS, the delay request interrupt handler 305 starts a task for handling the state change, and changes an event for notifying the state change to a signal state. It is possible to do.

【0144】図5では、遅延要求キュー204、205
は各OS301、351ごとに一つだけ存在するように
示されているが、以上で説明したような各遅延要求の重
要性のレベル毎にキューを用意して、対応するキューに
分けて蓄積することが可能である。
In FIG. 5, the delay request queues 204 and 205
Is shown so that only one exists for each of the OSs 301 and 351. However, as described above, a queue is prepared for each level of importance of each delay request, and the queue is divided and stored in the corresponding queue. It is possible.

【0145】このような遅延要求キューの構成例を図6
に示す。図6の構成の場合、第一OS遅延要求キュー2
04は、レベル1遅延要求キュー2041、レベル2遅
延要求キュー2042、レベル3遅延要求キュー204
3の集合体として構成される。レベル1遅延要求キュー
2041にはシャットダウン要求などのOS状態管理モ
ジュール207からの処理要求が、レベル2遅延要求キ
ュー2042にはRTC管理モジュール208から時刻
変更要求が、レベル3遅延要求キュー2043にはタス
ク再開要求などのOS間通信モジュール206からの処
理要求が蓄積される。
An example of the configuration of such a delay request queue is shown in FIG.
Shown in In the case of the configuration of FIG. 6, the first OS delay request queue 2
04 is a level 1 delay request queue 2041, a level 2 delay request queue 2042, a level 3 delay request queue 204
3 as an aggregate. The level 1 delay request queue 2041 receives a processing request such as a shutdown request from the OS state management module 207, the level 2 delay request queue 2042 receives a time change request from the RTC management module 208, and the level 3 delay request queue 2043 receives a task. Processing requests such as a restart request from the inter-OS communication module 206 are accumulated.

【0146】ここで、遅延要求割込ハンドラ305が、
レベルの小さいキューから順に遅延要求を取出すことに
より、各要求はレベル1、レベル2、レベル3の順で優
先して処理されることになる。なお、遅延要求管理モジ
ュール203の中に遅延要求の取出し処理を実装する場
合には、当該処理の中でレベルの小さいキューから順に
遅延要求を取出すことになる。図6では、遅延要求キュ
ーを三つのキューで構成されるとしたが、キューの数を
変更し各キューに優先順位を付けることも可能である。
また、各キュー毎に、遅延要求割込の割込レベルを異な
るものとしたり、遅延要求割込を発生させることができ
るOSの動作優先順位を変更したりすることも可能であ
る。
Here, the delay request interrupt handler 305
By taking out delay requests in order from the queue with the smallest level, each request is processed with priority in the order of level 1, level 2, and level 3. When the delay request fetching process is implemented in the delay request management module 203, the delay requests are fetched in order from the queue having the lowest level in the process. In FIG. 6, the delay request queue is composed of three queues, but it is also possible to change the number of queues and give priority to each queue.
It is also possible to make the interrupt level of the delay request interrupt different for each queue, or to change the operation priority of the OS that can generate the delay request interrupt.

【0147】以上のように、OS切替部201から各O
S301、351に対する様々な処理要求の実現手段と
して、遅延要求が使用される。しかし、処理内容によっ
ては遅延要求が適さず、OS切替部201から呼出され
るコールバックルーチンで処理する必要がある。
As described above, the OS switching unit 201
A delay request is used as means for realizing various processing requests for S301 and S351. However, the delay request is not suitable depending on the processing content, and the processing needs to be performed by a callback routine called from the OS switching unit 201.

【0148】遅延要求とコールバックルーチンのいずれ
を使うかの判断基準の例を図30に示す。図30で示し
た判断基準の場合、処理によりスケジューリングが発生
する可能性がある場合や処理時間が長く処理中にOS切
替や割込発生を許可したい場合に遅延要求を使用し、即
座に実行が必要な処理や当該OSの割込処理が正常に行
われていない場合の処理、あるいは処理によりスケジュ
ーリングが発生しない短時間の処理にコールバックルー
チンを使用する。例えば、OS状態管理モジュール20
7から当該OSを強制停止させる処理の場合、当該OS
が正常に動作していない場合に使われる可能性があるた
め、遅延要求を使用せずにコールバックルーチンを使用
する必要がある。ただし、長時間の処理をコールバック
ルーチンで処理することは可能であり、また処理結果で
スケジューリングが発生しない短い処理を遅延要求で処
理することも可能である。
FIG. 30 shows an example of a criterion for determining whether to use the delay request or the callback routine. In the case of the criterion shown in FIG. 30, the delay request is used when there is a possibility that scheduling may occur due to the processing, or when the processing time is long and it is desired to permit the OS switching or the occurrence of the interrupt during the processing. The callback routine is used for necessary processing, processing when the interrupt processing of the OS is not performed normally, or short processing in which scheduling does not occur due to the processing. For example, the OS state management module 20
7, when the OS is forcibly stopped, the OS
You should use a callback routine without using deferred requests, as it can be used if is not working properly. However, it is possible to process a long process by a callback routine, and it is also possible to process a short process in which scheduling does not occur in a process result by a delay request.

【0149】以上で説明した動作により、遅延要求を使
用する各処理が実現される。
By the operation described above, each process using the delay request is realized.

【0150】第五に、OS状態管理モジュール207の
各OSに対する監視タイマ機能(Watch Dog
Timer。以下、「WDT」と呼ぶ)の動作について
説明する。
Fifth, a monitoring timer function (Watch Dog) for each OS of the OS state management module 207 is described.
Timer. Hereinafter, the operation will be described as “WDT”.

【0151】図7にWDT機能に関するソフトウェアの
機能ブロック図を示す。
FIG. 7 is a functional block diagram of software related to the WDT function.

【0152】OS状態管理モジュール207は、第一O
S301用のWDTカウンタ217、および第二OS3
51用のWDTカウンタ218を管理している。これら
のカウンタ217、218は当該OS301、351に
対するWDT機能を開始したときに0にクリアされる。
また、タスクからの要求があった場合にも、当該タスク
が動作しているOS用のWDTカウンタが0にクリアさ
れる。タスクからの0クリア要求は、当該タスクが動作
していることを通知する意味を持ち、以下、これを「生
存通知」と呼ぶ。共通割込ハンドラ212は、一定周期
で発生するタイマ装置1083からの割込発生を受付
け、OS状態管理モジュール207を呼出す。
The OS state management module 207 has a first O
WDT counter 217 for S301 and second OS3
51 manages the WDT counter 218. These counters 217 and 218 are cleared to 0 when the WDT function for the OS 301 or 351 is started.
Also, when there is a request from the task, the WDT counter for the OS on which the task is running is cleared to zero. A 0 clear request from a task has the meaning of notifying that the task is operating, and is hereinafter referred to as “survival notification”. The common interrupt handler 212 accepts the occurrence of an interrupt from the timer device 1083 that occurs at a fixed cycle, and calls the OS state management module 207.

【0153】OS状態管理モジュール207のタイマ割
込処理(処理560)の処理フローを図26に示す。
FIG. 26 shows a processing flow of the timer interruption processing (processing 560) of the OS state management module 207.

【0154】処理では、まず、第一OS301および第
二OS351用のWDTカウンタに値を1だけ加算する
(処理561、処理562)。そして第一OS用WDT
カウンタ217が予め指定された第一OS301のタイ
ムアウト時間に相当するカウント値よりも大きいと判断
された場合(処理563)、第一OS301のコールバ
ックルーチン306を呼出して第一OSが管理する入出
力装置からの割込発生を抑止させ(処理564)、以後
OSコンテキスト切替モジュール202の処理で第一O
Sへ切替えることを禁止する(処理565)。第二OS
に対しても同様の処理を行う(処理566〜568)。
In the processing, first, the value is added to the WDT counter for the first OS 301 and the second OS 351 by 1 (steps 561 and 562). And WDT for the first OS
When it is determined that the counter 217 is larger than the count value corresponding to the timeout period of the first OS 301 specified in advance (process 563), the callback routine 306 of the first OS 301 is called to input / output the first OS 301. The occurrence of an interrupt from the device is suppressed (step 564), and the first O
Switching to S is prohibited (step 565). Second OS
The same processing is performed for (steps 566 to 568).

【0155】ここで説明した処理により、OSの動作の
正常性を確認する機能が提供される。生存通知を行うタ
スクの優先順位を高く設定しておけば、OS本体や優先
順位の非常に高いタスク(たとえば当該OS上の統括処
理を行うタスク)が動作できなくなった場合に限り、当
該OSが不正常だとみなされる。
By the processing described here, a function for confirming the normality of the operation of the OS is provided. If the priority of the task for performing the existence notification is set to be high, the OS itself or the task having a very high priority (for example, the task for performing the overall processing on the OS) cannot operate. Considered abnormal.

【0156】一方、生存通知を行うタスクの優先順位を
低く設定しておけば、当該優先順位以上の優先順位を持
つタスクのいずれか一つに対してでも処理時間の割当が
行われなかった場合に、当該OSの動作を不正常として
検出することになる。生存通知を行うタスクの優先順位
は、当該OS上で動作する各タスクの重要性と、当該O
Sの状態管理や当該OS上の統括処理を行うタスクの処
理内容を勘案して決定することになる。
On the other hand, if the priority of the task for which the existence notification is made is set low, the processing time is not allocated to any one of the tasks having the priority higher than the priority. Then, the operation of the OS is detected as abnormal. The priority of the task that performs the existence notification depends on the importance of each task operating on the OS and the O
The determination is made in consideration of the state of S and the processing contents of the task for performing the overall processing on the OS.

【0157】本実施例では、WDTで異常を検出した場
合、当該OSの動作を即座に停止するものとしている。
In this embodiment, when an abnormality is detected in the WDT, the operation of the OS is immediately stopped.

【0158】一方、異常を検出した場合に、まず正規の
シャットダウン手順での停止を当該OSに要求し、一定
時間以内にシャットダウンの完了通知がなかった場合に
は、強制的に停止することも可能である。このようにす
るには、WDTタイムアウト時間を越えた場合の処理5
64ないし567の代りに当該OSに対するシャットダ
ウン要求の遅延要求を発行し、OSへの切替禁止(処理
565ないし処理568)をしない。その後のタイマ割
込処理においても、当該OSのWDTカウンタ加算56
1ないし562を継続する。
On the other hand, when an abnormality is detected, first, the OS is requested to stop in a proper shutdown procedure, and if there is no notice of shutdown completion within a predetermined time, the OS can be forcibly stopped. It is. To do so, the processing 5 when the WDT timeout time is exceeded
A delay request for a shutdown request to the OS is issued instead of 64 to 567, and switching to the OS is not prohibited (steps 565 to 568). In the subsequent timer interrupt processing, the WDT counter addition 56
Continue from 1 to 562.

【0159】ここで当該OSからシャットダウン完了の
通知があった場合はタイマの加算を行わないようにする
が、当該通知がないまま加算を継続して第二のタイムア
ウト時間を越えた場合、当該OSの割込マスクを行うコ
ールバックルーチン呼出(図26の処理564ないし処
理567)、および当該OSへの切替禁止(処理565
ないし処理568)を行えばよい。なお、ここで説明し
た一定時間以内にシャットダウンの完了通知がなかった
場合に当該OSを強制停止するという手順については、
WDTのタイムアウト時以外にも、各OSに対するシャ
ットダウン要求を行う全ての場合に共通に適用すること
が可能である。
Here, the timer is not incremented when the shutdown notification is received from the OS, but when the addition is continued without the notification and the second timeout period is exceeded, the timer is not incremented. Callback routine for performing the interrupt mask of (steps 564 to 567 in FIG. 26) and prohibition of switching to the OS (step 565)
Or 568). The procedure for forcibly stopping the OS when the shutdown completion notification is not received within the predetermined time described above is described in the following.
The present invention can be applied to all cases in which a shutdown request is issued to each OS other than when the WDT times out.

【0160】さらに、異常を検出して当該OSを停止さ
せた後に、自動的に当該OSの起動処理を呼出し、当該
OSを再起動する手順を追加することも可能である。こ
の場合、当該OS上タスクの不良論理などによる異常検
出・再起動の繰返しを防ぐために、OS状態管理モジュ
ール207内に各OSの再起動回数を記録する変数を用
意して、再起動回数が指定回数以上になった場合は自動
再起動を抑止する機能を追加することが可能である。
Further, it is also possible to add a procedure for automatically calling the boot process of the OS after detecting the abnormality and stopping the OS and restarting the OS. In this case, a variable for recording the number of restarts of each OS is prepared in the OS state management module 207 in order to prevent repetition of abnormality detection and restart due to defective logic of the task on the OS, and the number of restarts is specified. It is possible to add a function to suppress automatic restart when the number of times exceeds the number.

【0161】この再起動回数の記録は、指定時間ごと
に、あるいは最後の再起動が行われてから指定時間が経
過した後にクリアする機能を追加することが可能であ
る。また、再起動を要求してから指定した時間内に再度
異常を検出した場合に、正常な起動が出来ないものとみ
なして自動再起動を抑止する機能を追加することが可能
である。なお、ここで説明した自動再起動の処理につい
ては、WDTのタイムアウト時以外に、各OSの異常終
了検出時にも共通に適用することが可能である。
It is possible to add a function of clearing the number of restarts at a specified time interval or after a specified time has elapsed since the last restart. In addition, when an abnormality is detected again within a specified time after a request for restart, a function for suppressing automatic restart can be added by regarding that normal restart cannot be performed. It should be noted that the automatic restart process described here can be applied commonly when an abnormal termination of each OS is detected, in addition to when the WDT times out.

【0162】以上で説明した処理により、当該計算機シ
ステムの信頼性を向上させるためのOS動作管理モジュ
ール、特にWDT機能の動作が実現される。
By the processing described above, the operation of the OS operation management module for improving the reliability of the computer system, in particular, the operation of the WDT function is realized.

【0163】第六に、OS間リモート手続き呼出機能
(Remote ProcedureCall。以下
「RPC機能」と呼ぶ)の動作について説明する。
Sixth, the operation of the inter-OS remote procedure call function (Remote Procedure Call, hereinafter referred to as “RPC function”) will be described.

【0164】図8にOS間RPC機能に関するソフトウ
ェアの構成図を示す。OS間RPC機能を使用する第一
OS301上のタスクはRPC利用ライブラリ311に
用意された処理関数を呼出す。RPC利用ライブラリ3
11は、OS間通信モジュール206のOS間メッセー
ジ通信機能を使用して、第二OS351上にあるRPC
サーバ354に処理を依頼する。このとき使用されるメ
ッセージキュー219は第二OS351のRPCサーバ
354に対する処理要求を送るための専用のもので、そ
のメッセージキューIDはRPC利用ライブラリ311
が予め知っているものとする。
FIG. 8 is a configuration diagram of software related to the inter-OS RPC function. A task on the first OS 301 that uses the inter-OS RPC function calls a processing function prepared in the RPC use library 311. RPC Library 3
The RPC 11 on the second OS 351 uses the inter-OS message communication function of the inter-OS communication module 206.
It requests the server 354 for processing. The message queue 219 used at this time is dedicated to sending a processing request to the RPC server 354 of the second OS 351, and its message queue ID is the RPC use library 311.
Shall know in advance.

【0165】RPCサーバ354は、実際にはRPC管
理タスク3541とRPC実行タスク3542の組合わ
せで構成される。RPC実行タスク3542は、要求さ
れた関数(手続き)を実行する。この関数は通常のタス
ク環境で実行されているので、システムコール358を
発行することが可能である。また、要求関数として、シ
ステムコールそのものを指定することも可能である。R
PC管理タスク3541は要求された処理が完了した
後、当該処理要求を行ったタスクA302専用のRPC
結果通知メッセージキュー220を使用して、処理結果
を通知する。
The RPC server 354 is actually composed of a combination of an RPC management task 3541 and an RPC execution task 3542. The RPC execution task 3542 executes the requested function (procedure). Since this function is being executed in a normal task environment, a system call 358 can be issued. It is also possible to specify the system call itself as the request function. R
After the requested processing is completed, the PC management task 3541 executes an RPC dedicated to the task A302 that has issued the processing request.
The processing result is notified using the result notification message queue 220.

【0166】RPC利用ライブラリ311の初期化処理
(処理580)の処理フローを図27に示す。この初期
化処理は、各タスクがRPCを初めて利用するときに一
度だけ呼出される。この処理を呼出したタスクが、その
後のRPC処理要求を行った場合に、処理結果を受取る
ためのRPC結果通知メッセージキュー220を作成す
る(処理581)。
FIG. 27 shows a processing flow of the initialization processing (processing 580) of the RPC use library 311. This initialization process is called only once when each task uses RPC for the first time. When the task that has called this process makes a subsequent RPC process request, it creates an RPC result notification message queue 220 for receiving the process result (process 581).

【0167】RPC利用ライブラリ311のRPC実行
処理(処理590)の処理フローを図28に示す。タス
クは、実行する関数名とパラメータを渡して処理590
を呼出す。処理590では、第二OS351のRPC要
求メッセージキュー219に対して、要求元から指定さ
れたままの関数名とパラメータ、および初期化処理58
0で作成したRPC結果通知メッセージキュー220の
メッセージキューIDを、一つの要求メッセージとして
送信する(処理591)。その後、RPC結果通知メッ
セージキュー220に対して結果を通知するメッセージ
が送られてくるのを受信待機する(処理592)。
FIG. 28 shows a processing flow of the RPC execution processing (processing 590) of the RPC utilizing library 311. The task performs processing 590 by passing the name of the function to be executed and the parameters.
Call. In the process 590, the function name and the parameter as specified by the request source and the initialization process 58 are sent to the RPC request message queue 219 of the second OS 351.
The message queue ID of the RPC result notification message queue 220 created in step 0 is transmitted as one request message (step 591). Then, it waits for a message notifying the result to be sent to the RPC result notification message queue 220 (process 592).

【0168】第二OS351のRPC管理タスク354
1の処理フローを図29に示す。管理タスクは常時RP
C要求メッセージキュー219の受信待機をしておりメ
ッセージが到着次第これを取出す(処理601)。要求
メッセージを取出すと、RPC実行タスク3542を起
動し(処理602)、要求された実行関数名およびパラ
メータをRPC実行タスク3542に渡して実行開始を
指示する(処理603)。そしてPRC実行タスク35
42からの実行完了メッセージが送られてくるのを待機
する(処理604)。なお、ここでいうメッセージは、
第二OS351の機能として提供される同期機能あるい
は通信機能のいずれかを使用して実現する。
The RPC management task 354 of the second OS 351
FIG. 29 shows the processing flow of No. 1. Management tasks are always RP
It is waiting to receive the C request message queue 219, and takes out the message as soon as it arrives (process 601). When the request message is taken out, the RPC execution task 3542 is activated (process 602), and the execution function name and the parameter are passed to the RPC execution task 3542 to instruct the start of the execution (process 603). And PRC execution task 35
It waits for the execution completion message to be sent from 42 (process 604). The message here is
It is realized by using either the synchronization function or the communication function provided as a function of the second OS 351.

【0169】PRC実行タスク3542は、関数名から
当該関数のアドレスを返す第二OS351のシステムコ
ールを呼出すことにより要求された関数のアドレスを解
決し、当該関数を実行する。実行が完了した場合、関数
のリターン値を含む終了メッセージをRPC管理タスク
3541に送る。ここで、要求された処理やパラメータ
の正当性チェックは行わないため、処理が完了しなかっ
たり、PRC実行タスク3542が停止してしまったり
する場合がある。
The PRC execution task 3542 resolves the address of the requested function by calling the system call of the second OS 351 that returns the address of the function from the function name, and executes the function. When the execution is completed, an end message including the return value of the function is sent to the RPC management task 3541. Here, since the requested process and the validity check of the parameters are not performed, the process may not be completed or the PRC execution task 3542 may be stopped.

【0170】第二OS351のRPC管理タスク354
1は実行完了メッセージの待機処理604において、タ
イムアウトを設定しており、前記のようにPRC実行タ
スク3542が正常に終了しない場合にはタイムアウト
となる(処理605)。この場合は、PRC実行タスク
3542を強制的に停止し(処理608)、処理要求元
タスクのRPC結果通知メッセージキュー220に対し
てタイムアウトエラーの結果メッセージを送信する。
The RPC management task 354 of the second OS 351
No. 1 sets a timeout in the execution completion message waiting process 604, and if the PRC execution task 3542 does not end normally as described above, a timeout occurs (process 605). In this case, the PRC execution task 3542 is forcibly stopped (step 608), and a timeout error result message is transmitted to the RPC result notification message queue 220 of the process requesting task.

【0171】一方、PRC実行タスク3542が正常に
処理を終了して、終了メッセージが送られてきた場合、
PRC実行タスク3542を停止し(処理606)、終
了メッセージに含まれるリターン値を含む結果メッセー
ジを、処理要求元タスクのRPC結果通知メッセージキ
ュー220に対して送信する(処理607)。
On the other hand, if the PRC execution task 3542 finishes the processing normally and the end message is sent,
The PRC execution task 3542 is stopped (process 606), and a result message including the return value included in the end message is transmitted to the RPC result notification message queue 220 of the process requesting task (process 607).

【0172】RPC利用ライブラリ311のRPC実行
処理(処理590)は、結果通知メッセージの到着で動
作を再開し、その結果とともに、処理呼出元にリターン
する(処理593)。ここで、あるタスクがRPC実行
処理590を呼出すと、この処理が終了するまで当該タ
スクは実行を中断することになる。
The RPC execution process of the RPC utilization library 311 (process 590) resumes operation upon arrival of the result notification message, and returns to the process caller together with the result (process 593). Here, when a certain task calls the RPC execution processing 590, the execution of the task is interrupted until this processing ends.

【0173】RPC管理タスク3541は予め決められ
た処理を実行するだけであり要求された処理の内容にか
かわらず異常終了することはなく、またRPC実行タス
ク3542に対するタイムアウトが設定されているた
め、必ず何らかの処理結果のメッセージが送られる。す
なわち、処理590に相当する関数内で指定したRPC
処理が完結するかタイムアウトするかのいずれかでリタ
ーンしてくることが期待でき、異なるOS間で通信する
処理や、通信に伴うエラー処理などを意識することな
く、他のOS上での処理が実行できる。なお、ここでは
タイムアウト時間をRPCサーバが保持している固定の
値としたが、個々のRPC処理要求毎にタイムアウト時
間を指定するようにしてもよい。
The RPC management task 3541 only executes a predetermined process and does not end abnormally regardless of the content of the requested process. Further, since a timeout has been set for the RPC execution task 3542, it must be executed. A message of some processing result is sent. That is, the RPC specified in the function corresponding to process 590
It is expected that the process will return when the process is completed or the timeout occurs, and the process on another OS can be performed without being aware of the process of communicating between different OSes or the error process associated with communication. I can do it. Here, the timeout time is a fixed value held by the RPC server, but the timeout time may be specified for each individual RPC processing request.

【0174】ここで説明したRPCサーバの構成では、
RPC実行タスク3542でエラーが発生して強制停止
した場合にはRPC管理タスク3541内でのタイムア
ウト発生まで待つものとしたが、タスクの停止を通知す
る機能が当該OSに備わっている場合には、この通知を
検出して、即座にエラーの通知を行う構成も可能であ
る。
In the configuration of the RPC server described here,
If an error occurs in the RPC execution task 3542 and the operation is forcibly stopped, the system waits until a timeout occurs in the RPC management task 3541. However, if the OS has a function of notifying the stop of the task, A configuration is also possible in which this notification is detected and an error notification is immediately sent.

【0175】また、RPCサーバの構成では、関数アド
レスの解決はRPC実行タスク3542で行うものとし
たが、これをRPC管理タスク3541で実行し、RP
C実行タスク3542には解決済のアドレスを渡す構成
も可能である。さらに、一旦解決した関数アドレスをR
PC管理タスク3541内に置いたテーブルに記録し、
同一の関数を再度実行する場合には当該テーブルからア
ドレスを取得することによって、アドレスの解決処理の
オーバヘッドを小さくできる。また、システムコールに
よる関数アドレスの解決の代りに、予めRPC管理タス
ク3541のビルド時にアドレスを解決して、前記記録
テーブルに保持しておく方法も可能である。
In the configuration of the RPC server, the function address resolution is performed by the RPC execution task 3542. This is performed by the RPC management task 3541, and the
A configuration in which a resolved address is passed to the C execution task 3542 is also possible. Furthermore, the function address once resolved is
Record in the table placed in PC management task 3541,
When the same function is executed again, the address is obtained from the table, thereby reducing the overhead of the address resolution process. Instead of resolving a function address by a system call, a method of resolving the address in advance at the time of building the RPC management task 3541 and storing the address in the recording table is also possible.

【0176】RPCサーバは、RPC実行タスク354
2を一つとしたが、複数のRPC要求を同時に実行する
ために、RPC実行タスク3542を複数同時に起動す
る構成も考えられる。ただし、この場合には、起動した
RPC実行タスク3542全てに対して実行完了メッセ
ージをタイムアウト付で待機することが必要となる。例
えば、起動したRPC実行タスク3542と同数の管理
サブタスクを別に起動し、各々一つのRPC実行タスク
3542からの実行完了メッセージを待機するといった
処理が必要になる。逆に、簡易な構成として、RPC実
行タスク3542の処理をRPC管理タスク3541の
一部とする方法も可能である。この場合、要求関数の実
行で例外が発生した場合に、当該OSが提供するエラー
回復手段(シグナル機構や構造化例外処理などの手段)
を使用してタスクの動作を継続させ、エラー発生を処理
要求元タスクのRPC結果通知メッセージキュー220
に対して送信する構成にしなければならない。
The RPC server executes the RPC execution task 354.
The number of RPC execution tasks 3542 is one, but a plurality of RPC execution tasks 3542 may be simultaneously activated in order to simultaneously execute a plurality of RPC requests. However, in this case, it is necessary to wait for the execution completion message with a timeout for all the activated RPC execution tasks 3542. For example, a process of separately starting the same number of management subtasks as the activated RPC execution task 3542 and waiting for an execution completion message from one RPC execution task 3542 is required. Conversely, as a simple configuration, a method in which the processing of the RPC execution task 3542 is part of the RPC management task 3541 is also possible. In this case, if an exception occurs during execution of the request function, error recovery means provided by the OS (means such as a signal mechanism and structured exception handling)
To continue the operation of the task, and report the occurrence of an error as the RPC result notification message queue 220 of the process requesting task.
Must be sent to

【0177】以上で説明した処理により、異なるOS上
の処理を用意に呼出すためのOS間RPC機能の動作が
実現される。
By the processing described above, the operation of the inter-OS RPC function for easily calling the processing on different OSs is realized.

【0178】以上のようにして複数個のオペレーティン
グシステム間で処理要求を通信するのであるが、オペレ
ーティングシステムが処理要求を割込み処理するように
しているので、オペレーティングシステムに通信用のハ
ンドラ機能を一つ追加するだけでよくオペレーティング
システム間の処理要求の通信をオペレーティングシステ
ムの簡単な改造で行える。
As described above, a processing request is communicated between a plurality of operating systems. Since the operating system interrupts the processing request, the operating system has one communication handler function. Communication of processing requests between operating systems can be performed by simple modification of the operating system simply by adding.

【0179】なお、上述の実施例においてはハード構成
で説明しているが、プログラムの処理手順としてCD―
ROMなどの記憶媒体に収納し、コンピュータなどの演
算処理装置を用いて本発明を実施できることは明らかな
ことである。
Although the above embodiment has been described with a hardware configuration, a CD-ROM is used as a program processing procedure.
It is obvious that the present invention can be implemented in a storage medium such as a ROM and using an arithmetic processing device such as a computer.

【0180】[0180]

【発明の効果】本発明によれば、オペレーティングシス
テムが処理要求を割込み処理するようにしているので、
オペレーティングシステムに通信用のハンドラ機能を一
つ追加するだけでよくオペレーティングシステム間の処
理要求の通信をオペレーティングシステムの簡単な改造
で行える。
According to the present invention, the operating system interrupts a processing request.
By simply adding one handler function for communication to the operating system, communication of processing requests between operating systems can be performed by a simple modification of the operating system.

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

【図1】本発明の一実施例の構成を示す図である。FIG. 1 is a diagram showing a configuration of an embodiment of the present invention.

【図2】計算機システムのハードウェア構成を示す図で
ある。
FIG. 2 is a diagram illustrating a hardware configuration of a computer system.

【図3】割込レベルマスク機能を装備する場合のステー
タスレジスタを示す図である。
FIG. 3 is a diagram showing a status register when an interrupt level mask function is provided.

【図4】個別割込マスク機能を装備する場合のステータ
スレジスタを示す図である。
FIG. 4 is a diagram showing a status register when an individual interrupt mask function is provided.

【図5】ソフトウェア構成の詳細を示す機能ブロック図
である。
FIG. 5 is a functional block diagram showing details of a software configuration.

【図6】遅延要求キューの構成例を示す図である。FIG. 6 is a diagram illustrating a configuration example of a delay request queue.

【図7】ソフトウェア構成の詳細を示す機能ブロック図
である。
FIG. 7 is a functional block diagram showing details of a software configuration.

【図8】ソフトウェア構成の詳細を示す機能ブロック図
である。
FIG. 8 is a functional block diagram showing details of a software configuration.

【図9】タスク管理ブロックの内部構造の例を示す図で
ある。
FIG. 9 is a diagram illustrating an example of an internal structure of a task management block.

【図10】タスク管理ブロックの管理例を示す図であ
る。
FIG. 10 is a diagram illustrating a management example of a task management block.

【図11】スケジューラの処理フローを示す図である。FIG. 11 is a diagram showing a processing flow of a scheduler.

【図12】OS間優先順位管理モジュールの処理フロー
を示す図である。
FIG. 12 is a diagram illustrating a processing flow of an inter-OS priority management module.

【図13】OSコンテキスト切替モジュールの処理フロ
ーを示す図である。
FIG. 13 is a diagram illustrating a processing flow of an OS context switching module.

【図14】共通割込ハンドラの処理フローを示す図であ
る。
FIG. 14 is a diagram showing a processing flow of a common interrupt handler.

【図15】割込割当テーブルの構造の例を示す図であ
る。
FIG. 15 is a diagram illustrating an example of the structure of an interrupt assignment table.

【図16】割込ハンドラの処理フローを示す図である。FIG. 16 is a diagram showing a processing flow of an interrupt handler.

【図17】OS間メッセージ通信機能の動作を示す図で
ある。
FIG. 17 is a diagram illustrating an operation of an inter-OS message communication function.

【図18】OS切替部利用ライブラリのメッセージ受信
処理の処理フローを示す図である。
FIG. 18 is a diagram depicting a processing flow of a message reception processing of an OS switching unit utilization library;

【図19】OS間通信モジュールのメッセージ受信処理
の処理フローを示す図である。
FIG. 19 is a diagram depicting a processing flow of a message receiving processing of the inter-OS communication module;

【図20】OS間通信モジュールのメッセージ送信処理
の処理フローを示す図である。
FIG. 20 is a diagram depicting a processing flow of a message transmission processing of the inter-OS communication module;

【図21】遅延要求管理モジュールの処理フローを示す
第一の図である。
FIG. 21 is a first diagram illustrating a processing flow of the delay request management module.

【図22】遅延要求管理モジュールの処理フローを示す
第二の図である。
FIG. 22 is a second diagram illustrating the processing flow of the delay request management module.

【図23】遅延要求管理モジュールの処理フローを示す
第三の図である。
FIG. 23 is a third diagram illustrating a processing flow of the delay request management module.

【図24】遅延要求割込ハンドラの処理フローを示す図
である。
FIG. 24 is a diagram showing a processing flow of a delay request interrupt handler.

【図25】RTC管理モジュールのRTC設定処理の処
理フローを示す図である。
FIG. 25 is a diagram depicting a processing flow of an RTC setting processing of the RTC management module;

【図26】OS状態管理モジュールのタイマ割込処理の
処理フローを示す図である。
FIG. 26 is a diagram depicting a processing flow of a timer interruption processing of the OS state management module;

【図27】RPC利用ライブラリの初期化処理の処理フ
ローを示す図である。
FIG. 27 is a diagram depicting a processing flow of an initialization processing of an RPC-based library;

【図28】RPC利用ライブラリのRPC実行処理の処
理フローを示す図である。
FIG. 28 is a diagram depicting a processing flow of an RPC execution processing of an RPC utilization library;

【図29】RPC管理タスクの処理フローを示す図であ
る。
FIG. 29 is a diagram depicting a processing flow of an RPC management task;

【図30】遅延要求とコールバックを選択する基準の例
を示す図である。
FIG. 30 is a diagram showing an example of criteria for selecting a delay request and a callback.

【図31】OS間通信機能の従来技術を示す構成図であ
FIG. 31 is a configuration diagram showing a conventional technique of an inter-OS communication function.

【図32】OS間通信機能の従来技術の他の例を示す構
成図である
FIG. 32 is a configuration diagram showing another example of the conventional technology of the inter-OS communication function.

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

101…プロセッサ、102…メモリ、103…入出力
制御装置、104…プロセッサバス、105…入出力装
置、106…割込信号線、107…RTC、108…タ
イマ装置、121…CPU、122…キャッシュメモ
リ、123…汎用レジスタ、124…プログラムカウン
タ、125…ステータスレジスタ、126…割込コント
ローラ、127…退避プログラムカウンタ、128…退
避ステータスレジスタ、129…割込アドレスレジス
タ、130…割込要因レジスタ、131…データバス、
132…アドレスバス、141…割込ブロックビット、
142…割込マスクレベルフィールド、143…実行状
態レジスタ、144…割込マスクレジスタ、145〜1
48…割込マスクビット、149…特権モードビット、
201…オペレーティングシステム切替プログラム、2
02…OSコンテキスト切替モジュール、203…遅延
要求管理モジュール、204…第一OS遅延要求キュ
ー、205…第二OS遅延要求キュー、206…OS間
通信モジュール、207…OS状態管理モジュール、2
08…RTC管理モジュール、209…第一OS遅延要
求割込許可フラグ、210…第二OS遅延要求割込許可
フラグ、211…OS間優先順位管理モジュール、21
2…共通割込ハンドラ、217…第一OS用WDTカウ
ンタ、218…第二OS用WDTカウンタ、219…R
PC要求メッセージキュー、220…RPC結果通知メ
ッセージキュー、231…割込割当テーブル、241・
242…メッセージキュー、301…第一OS、351
…第二OS、302・303・352・353…タス
ク、304・354…RPCサーバ、3541…RPC
管理タスク、3542…RPC実行タスク、305・3
55…遅延要求割込ハンドラ、306・356…コール
バックルーチン、307・357…割込ハンドラ、30
8・358…システムコール、309・359…スケジ
ューラ、310・360…OS切替部利用ライブラリ、
311・361…RPC利用ライブラリ、321…タス
ク管理ブロック、322・323…実行可能タスクキュ
ー、324…実行中断タスクキュー
101 processor, 102 memory, 103 input / output control device, 104 processor bus, 105 input / output device, 106 interrupt signal line, 107 RTC, 108 timer device, 121 CPU, 122 cache memory 123, a general-purpose register, 124, a program counter, 125, a status register, 126, an interrupt controller, 127, a save program counter, 128, a save status register, 129, an interrupt address register, 130, an interrupt factor register, 131, Data bus,
132: address bus, 141: interrupt block bit,
142: interrupt mask level field; 143: execution status register; 144: interrupt mask register;
48: interrupt mask bit, 149: privilege mode bit,
201: operating system switching program, 2
02: OS context switching module, 203: delay request management module, 204: first OS delay request queue, 205: second OS delay request queue, 206: inter-OS communication module, 207: OS state management module, 2
08 RTC management module, 209 first OS delay request interrupt permission flag, 210 second OS delay request interrupt permission flag, 211 inter-OS priority management module, 21
2 ... common interrupt handler, 217 ... first OS WDT counter, 218 ... second OS WDT counter, 219 ... R
PC request message queue, 220... RPC result notification message queue, 231.
242: message queue, 301: first OS, 351
... Second OS, 302, 303, 352, 353 ... Task, 304, 354 ... RPC server, 3541 ... RPC
Management task, 3542 ... RPC execution task, 305.3
55: delay request interrupt handler, 306, 356: callback routine, 307, 357: interrupt handler, 30
8, 358: system call, 309, 359: scheduler, 310, 360: OS switching unit use library,
311, 361: RPC library, 321: task management block, 322, 323: executable task queue, 324: execution suspended task queue

フロントページの続き (72)発明者 加藤 直 茨城県日立市大みか町五丁目2番1号 株 式会社日立製作所大みか事業所内 (72)発明者 上脇 正 茨城県日立市大みか町五丁目2番1号 株 式会社日立製作所大みか事業所内 Fターム(参考) 5B098 BA06 BB05 EE06 GA02 GA04 HH01 HH04 Continued on the front page (72) Inventor Nao Kato 5-2-1 Omikacho, Hitachi City, Ibaraki Prefecture Inside Omika Works, Hitachi, Ltd. (72) Inventor Tadashi Uwaki 5-2-1 Omikacho, Hitachi City, Ibaraki Prefecture F-term (reference) in Hitachi, Ltd. Omika Works 5B098 BA06 BB05 EE06 GA02 GA04 HH01 HH04

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】複数個のオペレーティングシステムを切替
えて一台のプロセッサを動作させ、前記複数個のオペレ
ーティングシステム間で処理要求を行うようにしたマル
チオペレーティング計算機システムにおいて、前記処理
要求を受けたオペレーティングシステムは他のオペレー
ティングシステムからの処理要求を割込み処理するよう
にしたことを特徴とするマルチオペレーティング計算機
システム。
1. A multi-operating computer system in which a plurality of operating systems are switched to operate one processor and a processing request is issued between the plurality of operating systems. Is a multi-operating computer system in which processing requests from other operating systems are interrupted.
【請求項2】複数個のオペレーティングシステムを割込
み要求に基づき切替えて一台のプロセッサを動作させ、
前記複数個のオペレーティングシステム間で処理要求を
行うようにしたマルチオペレーティング計算機システム
において、前記処理要求を受けたオペレーティングシス
テムは他のオペレーティングシステムからの処理要求を
割込み処理する割込ハンドラを具備することを特徴とす
るマルチオペレーティング計算機システム。
2. A single processor is operated by switching a plurality of operating systems based on an interrupt request,
In the multi-operating computer system configured to make a processing request among the plurality of operating systems, the operating system that has received the processing request may include an interrupt handler that interrupts a processing request from another operating system. Features a multi-operating computer system.
【請求項3】複数個のオペレーティングシステムを割込
み要求に基づき切替えて一台のプロセッサを動作させ、
前記複数個のオペレーティングシステム間で処理要求を
行うようにしたマルチオペレーティング計算機システム
において、前記オペレーティングシステムが要求する処
理要求を一時的に遅延要求キューに格納し、前記処理要
求を受けたオペレーティングシステムは他のオペレーテ
ィングシステムからの処理要求を前記遅延要求キューか
ら取出す遅延要求割込ハンドラを具備することを特徴と
するマルチオペレーティング計算機システム。
3. A single processor is operated by switching a plurality of operating systems based on an interrupt request,
In the multi-operating computer system configured to make a processing request among the plurality of operating systems, a processing request requested by the operating system is temporarily stored in a delay request queue, and the operating system that has received the processing request is another A multi-operating computer system comprising a delay request interrupt handler for taking out a processing request from the operating system from the delay request queue.
【請求項4】割込み要求を発生して複数個のオペレーテ
ィングシステムから一つを選択して動作する一台のプロ
セッサと、前記プロセッサの割込み要求に基づき前記複
数個のオペレーティングシステムを切替える切替手段
と、前記複数個のオペレーティングシステム間における
処理要求を通信する通信手段とを具備し、前記オペレー
ティングシステムは、他のオペレーティングシステムか
らの処理要求を割込み処理するようにしたことを特徴と
するマルチオペレーティング計算機システム。
4. A processor that generates an interrupt request and selects one of a plurality of operating systems to operate, and a switching unit that switches the plurality of operating systems based on an interrupt request from the processor. Communication means for communicating a processing request between the plurality of operating systems, wherein the operating system interrupts a processing request from another operating system.
【請求項5】割込み要求を発生してオペレーティングシ
ステムを選択して動作する一台のプロセッサと、前記プ
ロセッサの割込み要求に基づき複数個のオペレーティン
グシステムを選択して切替える切替手段と、前記複数個
のオペレーティングシステム間における処理要求を通信
する通信手段とを具備し、前記オペレーティングシステ
ムは、他のオペレーティングシステムからの処理要求を
割込み処理する割込みハンドラを具備することを特徴と
するマルチオペレーティング計算機システム。
5. A processor which generates an interrupt request and operates by selecting an operating system, a switching means for selecting and switching a plurality of operating systems based on the interrupt request of the processor, and Communication means for communicating a processing request between operating systems, wherein the operating system comprises an interrupt handler for interrupting a processing request from another operating system.
【請求項6】割込み要求を発生してオペレーティングシ
ステムを選択して動作する一台のプロセッサと、前記プ
ロセッサの割込み要求に基づき複数個のオペレーティン
グシステムを選択して切替える切替手段と、前記複数個
のオペレーティングシステム間における処理要求を通信
する通信手段と、前記オペレーティングシステムが送信
した処理要求を一時的に格納する遅延要求キューとを具
備し、前記処理要求を受信したオペレーティングシステ
ムは、他のオペレーティングシステムからの処理要求を
前記遅延要求キューから取出す遅延要求割込ハンドラを
具備することを特徴とするマルチオペレーティング計算
機システム。
6. A processor which generates an interrupt request and operates by selecting an operating system, a switching means for selecting and switching a plurality of operating systems based on the interrupt request of said processor, Communication means for communicating a processing request between operating systems, and a delay request queue for temporarily storing the processing request transmitted by the operating system, the operating system receiving the processing request, A multi-operating computer system comprising a delay request interrupt handler for taking out the processing request from the delay request queue.
【請求項7】複数個のオペレーティングシステムを切替
えて一台のプロセッサを動作させ、前記複数個のオペレ
ーティングシステム間で処理要求を通信によって送信す
るようにしたマルチオペレーティング計算機システムに
おける前記処理要求を受信したオペレーティングシステ
ムが他のオペレーティングシステムからの処理要求を割
込み処理するようにしたプログラムを格納していること
を特徴とする記憶媒体。
7. A multi-operating computer system in which a plurality of operating systems are switched to operate one processor and a processing request is transmitted between the plurality of operating systems by communication. A storage medium storing a program in which an operating system interrupts a processing request from another operating system.
【請求項8】複数個のオペレーティングシステムを割込
み要求に基づき切替えて一台のプロセッサを動作させ、
前記複数個のオペレーティングシステム間で処理要求を
通信によって送信するようにしたマルチオペレーティン
グ計算機システムにおける前記オペレーティングシステ
ムが送信した処理要求を一時的に遅延要求キューに格納
し、前記処理要求を受信したオペレーティングシステム
が他のオペレーティングシステムからの処理要求を前記
遅延要求キューから取出させるように処理するプログラ
ムを格納していることを特徴とする記憶媒体。
8. A single processor is operated by switching a plurality of operating systems based on an interrupt request,
An operating system that temporarily stores a processing request transmitted by the operating system in a delay request queue and receives the processing request in a multi-operating computer system configured to transmit the processing request between the plurality of operating systems by communication; Storing a program for causing a processing request from another operating system to be fetched from the delay request queue.
JP2000095537A 2000-03-30 2000-03-30 Multi-operating computer system Pending JP2001282558A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000095537A JP2001282558A (en) 2000-03-30 2000-03-30 Multi-operating computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000095537A JP2001282558A (en) 2000-03-30 2000-03-30 Multi-operating computer system

Publications (1)

Publication Number Publication Date
JP2001282558A true JP2001282558A (en) 2001-10-12

Family

ID=18610430

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000095537A Pending JP2001282558A (en) 2000-03-30 2000-03-30 Multi-operating computer system

Country Status (1)

Country Link
JP (1) JP2001282558A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004109512A1 (en) 2003-06-03 2004-12-16 Sony Corporation Information processing device, process control method, and computer program
JP2007004719A (en) * 2005-06-27 2007-01-11 Sony Computer Entertainment Inc Emulation device and emulation method
JP2007507779A (en) * 2003-10-01 2007-03-29 ジャルナ エスアー operating system
JP2007509387A (en) * 2003-09-30 2007-04-12 ジャルナ エスアー operating system
CN100382033C (en) * 2004-11-24 2008-04-16 松下电器产业株式会社 Computer system
JP2008513909A (en) * 2004-09-30 2008-05-01 インテル・コーポレーション Method and apparatus for providing support for a timer associated with a virtual machine monitor
JP2010518512A (en) * 2007-02-06 2010-05-27 マイクロソフト コーポレーション Multiple operating system support in media devices
US8042117B2 (en) 2006-07-25 2011-10-18 Ntt Docomo, Inc. Operating system switching control device and computer system
JP2012134728A (en) * 2010-12-21 2012-07-12 Sony Corp Information processing device, information processing method, and computer program
US8266629B2 (en) 2008-12-02 2012-09-11 Hitachi, Ltd. Virtual machine system, hypervisor in virtual machine system, and scheduling method in virtual machine system
US10871994B2 (en) 2017-07-31 2020-12-22 Mitsubishi Electric Corporation Information processing device and information processing method
US10908973B2 (en) 2017-07-31 2021-02-02 Mitsubishi Electric Corporation Information processing device

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7818751B2 (en) 2003-06-03 2010-10-19 Sony Corporation Methods and systems for scheduling execution of interrupt requests
WO2004109512A1 (en) 2003-06-03 2004-12-16 Sony Corporation Information processing device, process control method, and computer program
JP2007509387A (en) * 2003-09-30 2007-04-12 ジャルナ エスアー operating system
JP2007507779A (en) * 2003-10-01 2007-03-29 ジャルナ エスアー operating system
US7840962B2 (en) 2004-09-30 2010-11-23 Intel Corporation System and method for controlling switching between VMM and VM using enabling value of VMM timer indicator and VMM timer value having a specified time
JP2008513909A (en) * 2004-09-30 2008-05-01 インテル・コーポレーション Method and apparatus for providing support for a timer associated with a virtual machine monitor
US7590990B2 (en) 2004-11-24 2009-09-15 Panasonic Corporation Computer system
CN100382033C (en) * 2004-11-24 2008-04-16 松下电器产业株式会社 Computer system
JP2007004719A (en) * 2005-06-27 2007-01-11 Sony Computer Entertainment Inc Emulation device and emulation method
US8042117B2 (en) 2006-07-25 2011-10-18 Ntt Docomo, Inc. Operating system switching control device and computer system
JP2010518512A (en) * 2007-02-06 2010-05-27 マイクロソフト コーポレーション Multiple operating system support in media devices
US8266629B2 (en) 2008-12-02 2012-09-11 Hitachi, Ltd. Virtual machine system, hypervisor in virtual machine system, and scheduling method in virtual machine system
JP2012134728A (en) * 2010-12-21 2012-07-12 Sony Corp Information processing device, information processing method, and computer program
US10871994B2 (en) 2017-07-31 2020-12-22 Mitsubishi Electric Corporation Information processing device and information processing method
US10908973B2 (en) 2017-07-31 2021-02-02 Mitsubishi Electric Corporation Information processing device

Similar Documents

Publication Publication Date Title
US5390329A (en) Responding to service requests using minimal system-side context in a multiprocessor environment
US6715016B1 (en) Multiple operating system control method
US9798595B2 (en) Transparent user mode scheduling on traditional threading systems
KR100976280B1 (en) Multi processor and multi thread safe message queue with hardware assistance
US20050015768A1 (en) System and method for providing hardware-assisted task scheduling
US20180150322A1 (en) Data processing
EP1162536A1 (en) Multiple operating system control method
JP2004362100A (en) Information processor, method for controlling process, and computer program
JP2001282558A (en) Multi-operating computer system
JP2000076087A (en) Multioperating system control method
JP2007164421A (en) Parallel processors, parallel processing method and parallel processing program
WO2024007934A1 (en) Interrupt processing method, electronic device, and storage medium
WO2023241307A1 (en) Method and apparatus for managing threads
US7797473B2 (en) System for executing system management interrupts and methods thereof
JP3644042B2 (en) Multitask processing device
CN108845969B (en) Operation control method and operation system suitable for incompletely symmetrical multi-processing microcontroller
US20030014558A1 (en) Batch interrupts handling device, virtual shared memory and multiple concurrent processing device
JP2003271404A (en) Multiprocessor system
WO2004061663A2 (en) System and method for providing hardware-assisted task scheduling
JPH04291660A (en) Inter-processor communication method and its parallel processor
Arnold et al. Design of tightly-coupled multiprocessing programming
WO2023144878A1 (en) Intra-server delay control device, intra-server delay control method, and program
WO2023218596A1 (en) Intra-server delay control device, intra-server delay control method, and program
Labrosse Operating systems
JP2007323256A (en) Interruption control method and information processor