JP2008077388A - Multiprocessor control system, method and program - Google Patents
Multiprocessor control system, method and program Download PDFInfo
- Publication number
- JP2008077388A JP2008077388A JP2006255826A JP2006255826A JP2008077388A JP 2008077388 A JP2008077388 A JP 2008077388A JP 2006255826 A JP2006255826 A JP 2006255826A JP 2006255826 A JP2006255826 A JP 2006255826A JP 2008077388 A JP2008077388 A JP 2008077388A
- Authority
- JP
- Japan
- Prior art keywords
- execution right
- processor
- processors
- execution
- acquired
- 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
Links
Images
Abstract
Description
本発明は、マルチプロセッサ環境における制御切り換えシステムに関する。 The present invention relates to a control switching system in a multiprocessor environment.
シングルプロセッサによる制御環境下でファームウェアに基づく処理が実行されるシステムにおいて、原因不明のプログラム例外やTLB(Translation Look-aside buffer)例外などによる不具合が発生した場合には、プログラムが停止してしまう障害があった。システムの停止は、使用者に多大な迷惑をかけることになる。 In a system in which processing based on firmware is executed under the control environment of a single processor, a failure that causes the program to stop if a problem such as a program exception of unknown cause or a TLB (Translation Look-aside buffer) exception occurs. was there. Stopping the system causes great trouble for the user.
プログラム例外やTLBによるプログラム停止の障害に対する対策としては、例外ハンドラにプログラムの再起動やCPUまたはシステムリセットの処理を埋め込み、システム全体を再初期化する方法がある。また、ハードウェアがプログラム停止信号をCPUアラームとして検知し、上位の管理システムにアラーム通知する方法もある。しかし、これらの手法では、フェールセーフなシステム(障害が発生しても、処理機能の低下を最小限に抑え、全体としてシステムの安全性が保たれるような方式)は実現できるものの、フェールソフトなシステム(障害が発生して処理機能が低下しても基本的機能が継続して働く方式)を実現することはできない。 As a countermeasure against a program exception or a program stop failure due to TLB, there is a method of reinitializing the entire system by embedding program restart or CPU or system reset processing in the exception handler. There is also a method in which the hardware detects a program stop signal as a CPU alarm and notifies the upper management system of the alarm. However, these methods can achieve fail-safe systems (methods that minimize the degradation of processing functions and maintain overall system safety even if a failure occurs). System (a system in which basic functions continue to work even if a failure occurs and processing functions are reduced) cannot be realized.
そこで、マルチプロセッサを備えた情報処理システムが提案されている(特許文献1参照)。この情報処理システムでは、少なくとも1つのプロセッサをシステム支援プロセッサSSPとして動作させ、残りのプロセッサを命令プロセッサIPとして動作させる。SSPの障害発生時は、少なくとも1つのIP上で動作しているOSに対して割り込みを発生させる。割り込みの発生によりOSが障害を検知し、IPがSSPの機能を引き継ぐ。
しかしながら、特許文献1に記載の情報処理システムでは、SSPやIPの役割定義をする必要があるため、そのまま、既存のマルチプロセッサシステムに適用することは困難である。また、SSPの障害発生時に、SSPの機能をIPに引き継がせるための切替手段(ハードウェア)を必要とする。このため、既存のマルチプロセッサシステムに適用するためには、切替手段(ハードウェア)を用意する必要があり、その分、コストが高くなる。 However, in the information processing system described in Patent Document 1, since it is necessary to define the role of SSP and IP, it is difficult to apply it to an existing multiprocessor system as it is. In addition, when an SSP failure occurs, a switching means (hardware) is required to allow the SSP function to be taken over by the IP. For this reason, in order to apply to an existing multiprocessor system, it is necessary to prepare switching means (hardware), which increases the cost.
本発明の目的は、新たなハードウェアの追加なしに、プログラム例外やTLB例外などの障害発生時にもフェールソフト動作を保証することができるマルチプロセッサ制御システムを提供することにある。 An object of the present invention is to provide a multiprocessor control system that can guarantee fail-soft operation even when a failure such as a program exception or a TLB exception occurs without adding new hardware.
上記目的を達成するため、本発明のマルチプロセッサ制御システムは、アプリケーションを実行可能な複数のプロセッサと、前記複数のプロセッサによって共通に使用されるメモリと、を有し、前記メモリは、前記複数のプロセッサのそれぞれによって個別に実行される複数のプロセッサ実行権獲得処理プログラムと、前記複数のプロセッサに対して現用系と予備系の割り付けを行うオペレーティングシステムと、を有し、前記オペレーティングシステムは、システム起動時に、前記複数のプロセッサのうちの所定数のプロセッサに対して、プロセッサ実行権獲得処理プログラムを実行した順番に、前記アプリケーションの実行権を獲得させ、実行権を獲得した前記所定数のプロセッサを現用系とし、実行権の獲得がなされなかった残りのプロセッサを予備系として割り付けて、現用系のプロセッサに前記アプリケーションを実行させ、前記アプリケーションの実行後に、前記現用系のプロセッサのいずれかから、前記アプリケーションの実行に伴う動作の異常が発生した旨の例外指示を受信すると、該例外指示を送出したプロセッサが獲得した実行権を解放し、該解放した実行権を、前記予備系のプロセッサに獲得させる、ことを特徴とする。 In order to achieve the above object, a multiprocessor control system of the present invention includes a plurality of processors capable of executing an application and a memory commonly used by the plurality of processors, and the memory includes the plurality of processors. A plurality of processor execution right acquisition processing programs that are individually executed by each of the processors, and an operating system that allocates an active system and a standby system to the plurality of processors, and the operating system starts up the system Sometimes, the predetermined number of processors of the plurality of processors are made to acquire the execution right of the application in the order of execution of the processor execution right acquisition processing program, and the predetermined number of processors that have acquired the execution right are currently used The remaining programs for which execution rights were not acquired An exception indicating that an operation abnormality associated with the execution of the application has occurred from one of the active processors after the execution of the application by allocating a sessa as a standby system and causing the active processor to execute the application. When the instruction is received, the execution right acquired by the processor that sent the exception instruction is released, and the released execution right is acquired by the standby processor.
上記の構成によれば、オペレーティングシステムが、システム起動時に、現用系プロセッサと予備系プロセッサの割り当て、現用系プロセッサに障害が発生すると、障害の発生した現用系プロセッサの実行権を解放し、解放した実行権を予備系のプロセッサに獲得させる。予備系のプロセッサは、実行権を獲得すると、現用系プロセッサとして稼動する。このようにオペレーティングシステムが、現用系と予備系の切り替えを行うので、解析困難なプログラム例外やTLB例外発生時にもフェールセーフ動作を保証することが可能である。 According to the above configuration, the operating system allocates the active processor and the standby processor when the system starts, and releases the execution right of the active processor that has failed when the active processor fails. Let the standby processor acquire the execution right. When the standby processor acquires the execution right, it operates as an active processor. As described above, since the operating system switches between the active system and the standby system, it is possible to guarantee a fail-safe operation even when a program exception or a TLB exception that is difficult to analyze occurs.
加えて、オペレーティングシステムやプロセッサ実行権獲得処理プログラムなどのソフトウェアの更新・追加だけで、既存のマルチプロセッサシステムに適用することが可能であり、新規なハードウェアの追加は必要ない。 In addition, the present invention can be applied to an existing multiprocessor system only by updating / adding software such as an operating system and a processor execution right acquisition processing program, and does not require addition of new hardware.
本発明によれば、ハードウェアの変更なしに、フェールソフトなマルチプロセッサ制御システムを低コストで構築できる、という効果がある。 According to the present invention, there is an effect that a fail-soft multiprocessor control system can be constructed at low cost without changing hardware.
次に、本発明の実施形態について図面を参照して説明する。 Next, embodiments of the present invention will be described with reference to the drawings.
図1は、本発明の一実施形態であるマルチプロセッサ制御システムの構成を示すブロック図である。図1を参照すると、マルチプロセッサ制御システム1は、SMP(Symmetric Mult-Processor)対応のシステムであって、プログラムを実行するプロセッサ11、12と、これらプロセッサ11、12で共通に使用されるメモリ13とからなる。
FIG. 1 is a block diagram showing a configuration of a multiprocessor control system according to an embodiment of the present invention. Referring to FIG. 1, a multiprocessor control system 1 is a system that supports SMP (Symmetric Mult-Processor), and includes
メモリ13は、プログラムやデータを格納するものである。メモリ13には、プロセッサ11、12上で動作するOS(Operating system)131、およびプロセッサ実行権獲得処理プログラム132、133が格納されている。プロセッサ実行権獲得処理プログラム132は、プロセッサ11が実行権を獲得するための処理を記述したプログラムである。プロセッサ実行権獲得処理プログラム133は、プロセッサ12が実行権を獲得するための処理を記述したプログラムである。
The
OS131は、実行権カウンタ1311、実行権カウンタセマフォ1312、例外ハンドラ1313、1314、実行権獲得関数1315および実行権解放関数1316を有する。
The
実行権カウンタ1311は、プロセッサの実行権獲得処理で使用するカウンタであって、初期値は、「プロセッサ数−1」の値とされる。ここでは、プロセッサ数は2個であるので、初期値は「1」とされる。
The execution
実行権カウンタセマフォ1312は、プロセッサ実行権獲得処理プログラム132による実行権獲得処理とプロセッサ実行権獲得処理プログラム133による実行権獲得処理とが同時に実行されることを防止するために設けられたものでのであって、実行可の状態を示す値(ここでは、「0」)と、実行不可の状態を示す値(ここでは、「1」)とのいずれかの値が設定される。プロセッサ実行権獲得処理プログラム132、133は、実行権を獲得する際に、実行権獲得関数1315を呼び出して実行権カウンタセマフォ1312を獲得する必要がある。セマフォ値が「0」であれば、セマフォを獲得することができる。セマフォ値が「1」であれば、セマフォの獲得は失敗となる。セマフォ値が「1」にセットされた場合、その状態はセマフォが解放されるまで維持され、セマフォ解放時にセマフォ値は「0」に設定される。このようなセマフォを用いた操作により、各プロセッサ実行権獲得処理プログラムによる実行権獲得処理に対する排他制御を行うことができる。
The execution
実行権獲得関数1315は、実行権カウンタセマフォ1312を用いた一連の操作(セマフォの獲得および解放と実行権カウンタ1311のカウンタ値の更新に関わる制御など)を行うための関数からなる。
The execution
例外ハンドラ1313は、プロセッサ11のプログラム例外やTLB例外を処理するものであって、プロセッサ11からの例外指示により、実行権解放関数1316を呼び出して獲得した実行権を解放する。例外ハンドラ1314は、プロセッサ12のプログラム例外やTLB例外を処理するものであって、プロセッサ12からの例外指示により、実行権解放関数1316を呼び出して獲得した実行権を解放する。実行権解放関数1316は、例外ハンドラ1313、1314が実行権を解放するための一連の操作(セマフォの獲得および解放と実行権カウンタ1311のカウンタ値の更新に関わる制御など)を行うための関数である。
The exception handler 1313 processes a program exception or a TLB exception of the processor 11, and releases the execution right acquired by calling the execution
次に、本実施形態のマルチプロセッサ制御システム1の動作について詳細に説明する。 Next, the operation of the multiprocessor control system 1 of this embodiment will be described in detail.
(1)実行権獲得処理
図2に、プロセッサ実行権獲得処理の手順を示し、図3に、実行権獲得の際に行われるセマフォ獲得処理の手順を示す。プロセッサ実行権獲得処理プログラム132、133によるプロセッサ実行権獲得処理は図2に示した手順で行われ、その際の実行権獲得関数によるセマフォ獲得処理は、図3に示した手順で行われる。以下、図1から図3を参照して、実行権獲得処理を詳細に説明する。
(1) Execution Right Acquisition Process FIG. 2 shows the procedure of the processor execution right acquisition process, and FIG. 3 shows the procedure of the semaphore acquisition process performed when acquiring the execution right. The processor execution right acquisition processing by the processor execution right
システム起動時(電源投入またはプロセッサのリセット)に、プロセッサ11、12のそれぞれによってプロセッサ実行権獲得処理プログラム132、133が実行される。そして、プロセッサ実行権獲得処理プログラム132、133のそれぞれが、実行権獲得関数1315を呼び出し(図2のステップ201)、実行権を獲得できるまでスピンロックする(図2のステップ202)。
When the system is started (power is turned on or the processor is reset), the processor execution right
スピンロック後、プロセッサ実行権獲得処理プログラム132、133のそれぞれで呼び出した実行権獲得関数1315による実行権獲得処理が個別に実行される。各実行権獲得処理は、いずれも図3に示した以下のような手順で行われる。
After the spin lock, execution right acquisition processing by the execution
実行権獲得関数1315は、実行権カウンタセマフォ1312の獲得を試る(図3のステップ301)。実行権カウンタセマフォ1312の獲得に失敗した場合は、実行権獲得失敗のリターン値を設定し(図3のステップ307)、呼び出し元に戻る(図2のステップ201への移行)。実行権カウンタセマフォ1312の獲得に成功した場合は、続いて、実行権カウンタ1311の値の判断を行う(図3のステップ302)。
The execution
ステップ302で、実行権カウンタ1311が0より大きいと判断した場合は、実行権カウンタ1311を「1」だけデクリメントし(図3のステップ303)、実行権カウンタセマフォ1312を解放する(図3のステップ304)。その後、獲得成功のリターン値を設定し(図3のステップ305)、呼び出し元に戻る(図2のステップ201への移行)。ステップ302で、実行権カウンタ1311が0以下であると判断した場合は、実行権カウンタセマフォを解放し(図3のステップ306)、実行権獲得失敗のリターン値を設定し(図3のステップ307)、呼び出し元に戻る(図2のステップ201への移行)。
If it is determined in
上記の実行権獲得関数1315によるセマフォ獲得処理(排他制御)によれば、プロセッサ11、12のうち、少しでも早くプロセッサ実行権獲得処理プログラムを実行して実行権獲得関数1315を呼び出したプロセッサが実行権を獲得できる。
According to the semaphore acquisition process (exclusive control) by the execution
実行権獲得に成功したプロセッサは、OSのスケジューラを呼び出し(図2のステップ203)、プロセッサ実行権獲得処理プログラムによる実行権獲得処理を終了する。その後、実行権を獲得したプロセッサは、現用系プロセッサとして、ユーザアプリケーションの動作を開始する。実行権を獲得できずに、スピンロック状態(図2のステップ202)のプロセッサは、予備系プロセッサとなる。
The processor that has successfully acquired the execution right calls the OS scheduler (
(2)例外発生時の動作
プロセッサ11、12が現用系および予備系に割り当てられた後、現用系プロセッサにおいて、プログラム例外やTLB例外など、プログラムの動作に伴う異常が発生すると、実行権を解放して、予備系プロセッサに実行権を与えるための処理が行われる。
(2) Operation when an exception occurs After the
図4に、プロセッサ実行権解放処理の手順を示し、図5に、実行権解放の際に行われるセマフォ獲得処理の手順を示す。例外ハンドラ1313、1314のうち、現用系プロセッサからの例外指示を受けた例外ハンドラにおいて、図4に示すプロセッサ実行権解放処理が実行され、その際の実行権解放関数によるセマフォ獲得処理は、図5に示した手順で行われる。
FIG. 4 shows the procedure of the processor execution right release process, and FIG. 5 shows the procedure of the semaphore acquisition process performed at the time of execution right release. Among the
以下、図1、図4および図5を参照して、例外発生時の実行権解放処理を詳細に説明する。ここでは、プロセッサ11が現用系プロセッサ、プロセッサ12が予備系プロセッサとされてシステムが稼動している状態で、プロセッサ11でプログラム例外またはTLB例外が発生した場合の動作を説明する。
In the following, the execution right releasing process when an exception occurs will be described in detail with reference to FIGS. Here, the operation when a program exception or a TLB exception occurs in the processor 11 while the system is operating with the processor 11 being the active processor and the
プロセッサ11で、プログラム例外またはTLB例外が発生すると、例外ハンドラ1313が起動される。例外ハンドラ1313は、実行権解放関数1316を呼び出し(図4のステップ401)、実行権を解放できるまでスピンロックする(図4のステップ402)。
When a program exception or a TLB exception occurs in the processor 11, an
実行権解放関数1316は、実行権カウンタセマフォ1312の獲得を試みる(図5のステップ501)。実行権カウンタセマフォ1312の獲得に失敗した場合は、実行権解放失敗のリターン値を設定し(図5のステップ507)、呼び出し元に戻る(図4のステップ401への移行)。実行権カウンタセマフォ1312の獲得に成功した場合は、実行権カウンタ1311の値の判断を行う(図5のステップ502)。
The execution
ステップ502で、実行権カウンタ1311が[(プロセッサ数)−2]の値以下であると判断した場合は、実行権カウンタ1311を「1」だけインクリメントし(図5のステップ503)、実行権カウンタセマフォ1312を解放する(図5のステップ504)。そして、解放成功のリターン値を設定し(図5のステップ505)、呼び出し元に戻る(図4のステップ401への移行)。
If it is determined in
ステップ502で、実行権カウンタ1311が[(プロセッサ数)−2]の値より大きいと判断した場合は、実行権カウンタセマフォを解放する(図5のステップ506)。そして、実行権解放失敗のリターン値を設定し(図5のステップ507)、呼び出し元に戻る(図4のステップ401への移行)。
If it is determined in
実行権を解放できた例外ハンドラ1313は、プロセッサ実行権獲得処理132を呼び出し(図4のステップ403)、実行権解放処理を終了する。
The
上記の実行権解放処理の終了時において、予備系プロセッサであるプロセッサ12は、スピンロック状態(図2のステップ202)である。例外発生による実行権解放処理により、実行権カウンタ1311が0より大きな値(=1)となるため、プロセッサ12は、実行権を獲得することができる。実行権を獲得したプロセッサ12は、現用系プロセッサとなり、ユーザアプリケーションの動作を開始する。一方、プロセッサ11は、図4のステップ403でプロセッサ実行権獲得処理プログラム132を実行するものの、図2のステップ202でスピンロック状態となる。このため、現用系プロセッサとして動作していたプロセッサ11は、例外発生後に、予備系プロセッサとなる。
At the end of the execution right releasing process, the
以上説明した本実施形態のマルチプロセッサ制御システム1によれば、OS131が、システム起動時に、実行権を獲得した順番にプロセッサを現用系と予備系に割り付け、現用系に解析困難なプログラム例外やTLB例外などの障害が発生すると、障害が発生した現用系の実行権を解放して予備系に割り当てる。これにより、フェールセーフ動作を保証することが可能である。
According to the multiprocessor control system 1 of the present embodiment described above, the
加えて、OSやプロセッサ実行権獲得処理プログラムなどのソフトウェアの更新・追加だけで、既存のマルチプロセッサシステムに適用することが可能であり、新規なハードウェアの追加は必要ない。 In addition, the present invention can be applied to an existing multiprocessor system only by updating / adding software such as an OS and a processor execution right acquisition processing program, and it is not necessary to add new hardware.
本実施形態のマルチプロセッサ制御システムにおいて、プロセッサ数に制限はない。プロセッサが3個以上のマルチ構成において適用することが可能である。3個以上のマルチ構成に適用する場合は、実行権獲得処理プログラムおよび例外ハンドラは、プロセッサ毎に設けられる。 In the multiprocessor control system of the present embodiment, the number of processors is not limited. It can be applied in a multi-configuration with three or more processors. When applied to three or more multi-configurations, an execution right acquisition processing program and an exception handler are provided for each processor.
(他の実施形態)
図6は、本発明の他の実施形態であるマルチプロセッサ制御システムの構成を示すブック図である。
(Other embodiments)
FIG. 6 is a book diagram showing a configuration of a multiprocessor control system according to another embodiment of the present invention.
図6を参照すると、マルチプロセッサ制御システム2は、3つのプロセッサ21〜23と、これらプロセッサによって共通に使用されるメモリ24とを有する。メモリ24は、OS241、初期化タスク242〜244およびユーザタスク245〜248を有する。初期化タスク242は、プロセッサ21によって実行されるプロセッサ実行権獲得処理プログラム2421を有する。初期化タスク243は、プロセッサ22によって実行されるプロセッサ実行権獲得処理プログラム2431を有する。初期化タスク244は、プロセッサ23によって実行されるプロセッサ実行権獲得処理プログラム2441を有する。
Referring to FIG. 6, the multiprocessor control system 2 includes three
OS241は、実行権カウンタ2411、実行権カウンタセマフォ2412、例外ハンドラ2413〜2415、実行権獲得関数2416および実行権解放関数2417を有する。例外ハンドラ2413、2414、2415のそれぞれは、プロセッサ21、22、23からの例外指示に応じて、プログラム例外やTLB例外を処理するものであって、実行権解放関数1316を呼び出して獲得した実行権を解放する。
The
図6において、プロセッサ実行権獲得処理プログラム2421、2431、2441、実行権カウンタ2411、実行権カウンタセマフォ2412、例外ハンドラ2413〜2415、実行権獲得関数2416および実行権解放関数2417は、それぞれ図1に示したプロセッサ実行権獲得処理プログラム、実行権カウンタ、実行権カウンタセマフォ、例外ハンドラ、実行権獲得関数および実行権解放関数に対応する。なお、プロセッサ数が3であるため、実行権カウンタ2411の初期値は「2」とする。初期化タスク242、243、244とユーザタスク245、246、247、248は、OS241の管理下で動作する。
6, processor execution right
本実施形態のマルチプロセッサ制御システム2では、システム起動時に、プロセッサ21、22、23がそれぞれ、初期化タスク242、243、244を実行する。初期化タスク242、243、244はそれぞれ、プロセッサ実行権獲得処理2421、2431、2441を呼び出す。プロセッサ実行権獲得処理2421、2431、2441は、実行権獲得関数2416を呼び出し(図2のステップ201)、実行権を獲得できるまでスピンロックする(図2のステップ202)。
In the multiprocessor control system 2 of the present embodiment, the
ここで、プロセッサ21、プロセッサ22、プロセッサ23の順番で実行権獲得関数2416が呼び出されたと仮定する。
Here, it is assumed that the execution
プロセッサ実行権獲得処理プログラム2421によって呼び出された実行権獲得関数2416は、実行権カウンタセマフォ2412の獲得を試みる(図3のステップ301)。セマフォの獲得に成功すると、実行権獲得関数2416は、実行権カウンタ2411の値の判断を行う(図3のステップ302)。この時点では、実行権カウンタ2411の値は「2」となっているので、実行権獲得関数2416は、実行権カウンタ2411の値を「1」だけデクリメントし(図3のステップ303)、実行権カウンタセマフォ2412を解放し(図3のステップ304)、獲得成功のリターン値を設定し(図3のステップ305)、プロセッサ実行権獲得処理に戻る。
The execution
プロセッサ実行権獲得処理プログラム2431によって呼び出された実行権獲得関数2416は、実行権カウンタセマフォ2412の獲得を試みる(図3のステップ301)。セマフォの獲得に成功すると、実行権獲得関数2416は、実行権カウンタ2411の値の判断を行う(図3のステップ302)。この時点では、実行権カウンタ2411の値は「1」となっているので、実行権獲得関数2416は、実行権カウンタ2411を「1」だけデクリメントし(図3のステップ303)、実行権カウンタセマフォ2412を解放し(図3のステップ304)、獲得成功のリターン値を設定し(図3のステップ305)、プロセッサ実行権獲得処理に戻る。
The execution
プロセッサ実行権獲得処理2441によって呼び出された実行権獲得関数2416は、実行権カウンタセマフォ2412の獲得を試みる(図3のステップ301)。セマフォの獲得に成功すると、実行権獲得関数2416は、実行権カウンタ2411の値の判断を行う(図3のステップ302)。この時点では、実行権カウンタ2411は「0」になっているので、実行権獲得関数2416は、実行権カウンタセマフォ2412を解放し(図3のステップ306)、実行権獲得失敗のリターン値を設定し(図3のステップ307)、プロセッサ実行権獲得処理に戻る。
The execution
上記の一連の動作により、プロセッサ21とプロセッサ22が実行権を獲得できる。実行権獲得に成功したプロセッサ21、22は、OS241のスケジューラを呼び出し(図2のステップ203)、実行権獲得処理を終了する。実行権を獲得したプロセッサ21、22は、現用系プロセッサとして、ユーザタスクの動作を開始する。実行権を獲得できずにスピンロックした状態(図2のステップ202)のプロセッサ23は、予備系プロセッサとなる。
Through the above series of operations, the
次に、例外発生時の動作について説明する。 Next, the operation when an exception occurs will be described.
プロセッサ21、22が現用系とされ、プロセッサ23が予備系とされた場合に、現用系プロセッサにおいて、プログラム例外やTLB例外など、プログラムの動作に伴う異常が発生すると、実行権を解放して、予備系プロセッサに実行権を与えるための処理が行われる。ここでは、OS241が、プロセッサ21に対してユーザタスク245とユーザタスク246の実行割付けを行い、プロセッサ22に対してユーザタスク247とユーザタスク248の実行割付けを行ったものとして、プロセッサ21で例外が発生した時の動作を説明する。
When the
プロセッサ21で、ユーザタスク245の実行時に、プログラム例外またはTLB例外が発生すると、例外ハンドラ2413が起動される。例外ハンドラ2413は、実行権解放関数2417を呼び出し(図4のステップ401)、実行権を解放できるまでスピンロックする(図4のステップ402)。
If a program exception or a TLB exception occurs during execution of the
実行権解放関数2417は、実行権カウンタセマフォ2412の獲得を試みる(図5のステップ501)。セマフォの獲得に成功すると、実行権解放関数2417は、実行権カウンタ2411の値の判断を行う(図5のステップ502)。この時点では、実行権カウンタ2411の値は「0」となっているので、[プロセッサ数−2]の値(=1)以下の条件を満たす。したがって、実行権解放関数2417は、実行権カウンタ2411を「1」だけインクリメントし(図5のステップ503)、実行権カウンタセマフォ2412を解放し(図5のステップ504)、解放成功のリターン値を設定し(図5のステップ505)、例外処理(図4のステップ401)に戻る。
The execution
実行権を解放できた例外ハンドラ2413は、初期化タスク242を呼び出し(図4のステップ403)、実行権解放処理を終了する。
The
上記の実行権解放処理の終了時において、予備系プロセッサであるプロセッサ23は、スピンロック状態(図2のステップ202)である。例外発生による実行権解放処理により、実行権カウンタ1311が0より大きな値(=1)となるため、プロセッサ23は、実行権を獲得することができる。実行権を獲得したプロセッサ23は、現用系プロセッサとなり、ユーザタスク245、246の動作を再開する。一方、プロセッサ21は、図4のステップ403でプロセッサ実行権獲得処理プログラム2421を実行するものの、図2のステップ202でスピンロック状態となる。このため、現用系プロセッサとして動作していたプロセッサ21は、例外発生後に、予備系プロセッサとなる。
At the end of the execution right releasing process, the
1 マルチプロセッサ制御システム
11、12 プロセッサ
13 メモリ
131 オペレーティングシステム
132、133 プロセッサ実行権獲得処理プログラム
1311 実行権カウンタ
1312 実行権カウンタセマフォ
1313、1314 例外ハンドラ
1315 実行権獲得関数
1316 実行権解放関数
DESCRIPTION OF SYMBOLS 1
Claims (5)
前記複数のプロセッサによって共通に使用されるメモリと、を有し、
前記メモリは、
前記複数のプロセッサのそれぞれによって個別に実行される複数のプロセッサ実行権獲得処理プログラムと、
前記複数のプロセッサに対して現用系と予備系の割り付けを行うオペレーティングシステムと、を有し、
前記オペレーティングシステムは、
システム起動時に、前記複数のプロセッサのうちの所定数のプロセッサに対して、プロセッサ実行権獲得処理プログラムを実行した順番に、前記アプリケーションの実行権を獲得させ、実行権を獲得した前記所定数のプロセッサを現用系とし、実行権の獲得がなされなかった残りのプロセッサを予備系として割り付けて、現用系のプロセッサに前記アプリケーションを実行させ、
前記アプリケーションの実行後に、前記現用系のプロセッサのいずれかから、前記アプリケーションの実行に伴う動作の異常が発生した旨の例外指示を受信すると、該例外指示を送出したプロセッサが獲得した実行権を解放し、該解放した実行権を、前記予備系のプロセッサに獲得させる、ことを特徴とする、マルチプロセッサ制御システム。 Multiple processors capable of running applications,
A memory used in common by the plurality of processors,
The memory is
A plurality of processor execution right acquisition processing programs executed individually by each of the plurality of processors;
An operating system that allocates a working system and a standby system to the plurality of processors;
The operating system is
The predetermined number of processors that have acquired the execution right to the predetermined number of processors among the plurality of processors in the order in which the processor execution right acquisition processing program has been executed and acquired the right to execute the application. Is assigned to the active system, the remaining processors for which execution rights have not been acquired are allocated as the standby system, and the active system processor executes the application.
After execution of the application, upon receiving an exception instruction from one of the active processors indicating that an abnormal operation has occurred, the execution right acquired by the processor that sent the exception instruction is released. A multiprocessor control system characterized in that the released execution right is acquired by the standby processor.
前記アプリケーションの実行権を獲得するための実行権獲得関数と、
前記複数のプロセッサの数から1を減算した値が初期値としてセットされる実行権カウンタと、
前記実行権獲得関数による実行権の獲得処理の実行中はセマフォ獲得不可状態とされ、該獲得処理の実行中以外は、セマフォ獲得可状態とされる実行権カウンタセマフォと、を有し、
前記複数のプロセッサ実行権獲得処理プログラムのそれぞれは、前記実行権獲得関数を呼び出して前記実行権を獲得するための処理を実行し、
呼び出された前記実行権獲得関数は、前記実行権カウンタセマフォの状態が前記セマフォ獲得可状態で、かつ、前記実行権カウンタの値が0より大きな場合にのみ、実行権を獲得した旨を対応するプロセッサに送信して、前記実行権カウンタの値を1だけデクリメントする、請求項1に記載のマルチプロセッサ制御システム。 The operating system is
An execution right acquisition function for acquiring the execution right of the application;
An execution right counter in which a value obtained by subtracting 1 from the number of the plurality of processors is set as an initial value;
An execution right counter semaphore that is in a semaphore acquisition disabled state during execution of the execution right acquisition process by the execution right acquisition function, and is in a semaphore acquisition enabled state except during the execution of the acquisition process,
Each of the plurality of processor execution right acquisition processing programs executes the process for acquiring the execution right by calling the execution right acquisition function,
The called execution right acquisition function corresponds to the fact that the execution right has been acquired only when the state of the execution right counter semaphore is in the semaphore acquisition enabled state and the value of the execution right counter is greater than zero. The multiprocessor control system according to claim 1, wherein the multiprocessor control system transmits to the processor and decrements the value of the execution right counter by one.
獲得した実行権を解放するための実行権解放関数と、
前記複数のプロセッサのそれぞれによって個別に使用される複数の例外ハンドラと、をさらに有し、
前記複数の例外ハンドラのそれぞれは、対応するプロセッサから前記例外指示を受信すると、前記実行権解放関数を呼び出して、獲得した実行権を解放するための処理を実行し、
呼び出された前記実行権解放関数は、前記実行権カウンタセマフォの状態が前記セマフォ獲得可状態で、かつ、前記実行権カウンタの値が前記複数のプロセッサの数から2を減算した値以下の場合にのみ、獲得した前記実行権を解放した旨を対応するプロセッサに送信して、前記実行権カウンタの値を1だけインクリメントする、請求項2に記載のマルチプロセッサ制御システム。 The operating system is
An execution right release function for releasing the acquired execution right;
A plurality of exception handlers individually used by each of the plurality of processors;
Each of the plurality of exception handlers, upon receiving the exception instruction from a corresponding processor, calls the execution right release function to execute a process for releasing the acquired execution right,
The called execution right release function is used when the state of the execution right counter semaphore is in the semaphore acquisition enabled state and the value of the execution right counter is equal to or less than a value obtained by subtracting 2 from the number of the plurality of processors. 3. The multiprocessor control system according to claim 2, wherein only when the acquired execution right is released to the corresponding processor, the value of the execution right counter is incremented by one.
前記複数のプロセッサのそれぞれが個別にプロセッサ実行権獲得処理プログラムを実行するステップと、
オペレーティングシステムが、システム起動時に、前記複数のプロセッサのうちの所定数のプロセッサに対して、プロセッサ実行権獲得処理プログラムを実行した順番に、前記アプリケーションの実行権を獲得させ、実行権を獲得した前記所定数のプロセッサを現用系とし、実行権の獲得がなされなかった残りのプロセッサを予備系として割り付けて、現用系のプロセッサに前記アプリケーションを実行させるステップと、
前記アプリケーションの実行後に、前記オペレーティングシステムが、前記現用系のプロセッサのいずれかから、前記アプリケーションの実行に伴う動作の異常が発生した旨の例外指示を受信すると、該例外指示を送出したプロセッサが獲得した実行権を解放し、該解放した実行権を、前記予備系のプロセッサに獲得させるステップと、を含む、マルチプロセッサ制御方法。 A multiprocessor control method performed in a system having a plurality of processors capable of executing an application and a memory commonly used by the plurality of processors,
Each of the plurality of processors individually executing a processor execution right acquisition processing program;
The operating system acquires the execution right of the application in the order in which the processor execution right acquisition processing program is executed with respect to a predetermined number of processors among the plurality of processors at the time of system startup, and acquires the execution right. Allocating a predetermined number of processors as the active system, allocating the remaining processors for which execution rights have not been acquired as a standby system, and causing the active processor to execute the application; and
After the execution of the application, when the operating system receives an exception instruction from the active processor indicating that an operation abnormality has occurred due to the execution of the application, the processor that sent the exception instruction acquires Releasing the execution right, and causing the spare processor to acquire the released execution right.
システム起動時に、前記複数のプロセッサのそれぞれに、個別にプロセッサ実行権獲得処理を実行させ、
前記複数のプロセッサのうちの所定数のプロセッサに対して、プロセッサ実行権獲得処理を実行した順番に、前記アプリケーションの実行権を獲得させ、
実行権を獲得した前記所定数のプロセッサを現用系とし、実行権の獲得がなされなかった残りのプロセッサを予備系として割り付けて、現用系のプロセッサに前記アプリケーションを実行させ、
該アプリケーションの実行後に、前記現用系のプロセッサのいずれかから、前記アプリケーションの実行に伴う動作の異常が発生した旨の例外指示を受信すると、該例外指示を送出したプロセッサが獲得した実行権を解放し、該解放した実行権を、前記予備系のプロセッサに獲得させる、プログラム。 A program used in a computer system having a plurality of processors capable of executing an application and a memory commonly used by the plurality of processors,
When starting up the system, each of the plurality of processors individually executes a processor execution right acquisition process,
The execution right of the application is acquired in the order in which processor execution right acquisition processing is executed for a predetermined number of processors of the plurality of processors,
The predetermined number of processors that have acquired the execution right are used as active systems, the remaining processors for which execution rights have not been acquired are allocated as standby systems, and the active system processors execute the application,
After execution of the application, upon receiving an exception instruction from one of the active processors indicating that an operation abnormality has occurred due to execution of the application, the execution right acquired by the processor that sent the exception instruction is released. A program for causing the reserve processor to acquire the released execution right.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006255826A JP2008077388A (en) | 2006-09-21 | 2006-09-21 | Multiprocessor control system, method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006255826A JP2008077388A (en) | 2006-09-21 | 2006-09-21 | Multiprocessor control system, method and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008077388A true JP2008077388A (en) | 2008-04-03 |
Family
ID=39349374
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006255826A Pending JP2008077388A (en) | 2006-09-21 | 2006-09-21 | Multiprocessor control system, method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008077388A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014170477A (en) * | 2013-03-05 | 2014-09-18 | Mitsubishi Electric Corp | High availability system |
WO2014196083A1 (en) * | 2013-06-07 | 2014-12-11 | 三菱電機株式会社 | Computer system and control method |
-
2006
- 2006-09-21 JP JP2006255826A patent/JP2008077388A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014170477A (en) * | 2013-03-05 | 2014-09-18 | Mitsubishi Electric Corp | High availability system |
WO2014196083A1 (en) * | 2013-06-07 | 2014-12-11 | 三菱電機株式会社 | Computer system and control method |
JP5996110B2 (en) * | 2013-06-07 | 2016-09-21 | 三菱電機株式会社 | Computer system and control method |
US9880888B2 (en) | 2013-06-07 | 2018-01-30 | Mitsubishi Electric Corporation | Executing an operating system in a multiprocessor computer system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6789214B1 (en) | Process for reconfiguring an information processing system upon detection of a component failure | |
RU2437144C2 (en) | Method to eliminate exception condition in one of nuclei of multinuclear system | |
US20110197193A1 (en) | Device and method for controlling communication between bios and bmc | |
US10379931B2 (en) | Computer system | |
EP3241149A1 (en) | Method to isolate real-time or safety-critical software and operating system from non-critical software and operating system | |
US10229077B2 (en) | Method for data transfer between real-time tasks using a DMA memory controller | |
CN105404559B (en) | Debugging in a data processing apparatus | |
US20150006978A1 (en) | Processor system | |
US9015534B2 (en) | Generation of memory dump of a computer process without terminating the computer process | |
US20030018682A1 (en) | Computer system and computer-readable record medium | |
US20060212840A1 (en) | Method and system for efficient use of secondary threads in a multiple execution path processor | |
US10963250B2 (en) | Selectively suppressing time intensive instructions based on a control value | |
US20070143738A1 (en) | Method for efficient utilization of processors in a virtual shared environment | |
US8650579B1 (en) | Containment for computer-software update installation processes | |
JP2008077388A (en) | Multiprocessor control system, method and program | |
US9880888B2 (en) | Executing an operating system in a multiprocessor computer system | |
JP2005234744A (en) | Multiprocessor system and failure processing method | |
JP2010015364A (en) | Multiprocessor system and information processor | |
JP5867630B2 (en) | Multi-core processor system, multi-core processor system control method, and multi-core processor system control program | |
JPH10269110A (en) | Method for avoiding hang-up of computer system, and computer system using the same method | |
JP2019114097A (en) | Semiconductor device | |
JP2019020869A (en) | Vehicle control device | |
JP2008225710A (en) | Computer system and process-switching method used in the system | |
JP2006228074A (en) | Multitask system and method for controlling multitask | |
JPH06223047A (en) | Exclusive control system |