JP2003271404A - Multiprocessor system - Google Patents

Multiprocessor system

Info

Publication number
JP2003271404A
JP2003271404A JP2002075424A JP2002075424A JP2003271404A JP 2003271404 A JP2003271404 A JP 2003271404A JP 2002075424 A JP2002075424 A JP 2002075424A JP 2002075424 A JP2002075424 A JP 2002075424A JP 2003271404 A JP2003271404 A JP 2003271404A
Authority
JP
Japan
Prior art keywords
cpu
task
cpus
switching
agent
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
JP2002075424A
Other languages
Japanese (ja)
Inventor
Kazuyoshi Kondo
一義 近藤
Koji Higuchi
晃治 樋口
Hiroshi Wakameda
宏 若目田
Joji Furuya
丈二 古谷
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2002075424A priority Critical patent/JP2003271404A/en
Publication of JP2003271404A publication Critical patent/JP2003271404A/en
Pending legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a multiprocessor system for measuring a use ratio of a CPU, suppressing the use ratio of the CPU to dispersion of a fixed range by performing a dynamic task arrangement and efficiently performing load distribution. <P>SOLUTION: This system has a task mapping table for setting which tasks are arranged in a plurality of CPUs and a timer having a timer value specific to each of the plurality of CPUs. The CPU to which the timer having earlier time-out belongs is made a host, and tasks for the plurality of CPUs are rearranged according to states of the tasks set to the task mapping table. <P>COPYRIGHT: (C)2003,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、複数のCPUに動
的にタスクを配置可能なマルチプロセッサシステムに関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a multiprocessor system capable of dynamically allocating tasks to a plurality of CPUs.

【0002】[0002]

【従来の技術】タスクを複数のCPUで実行するマルチ
プロセッサシステムを実現する構成として、負荷分散と
機能分散とが上げられる。すなわち、従来のマルチプロ
セッサシステムでは、全てのCPUに共通に全機能を実
装し、動作可能なCPUが処理を行う負荷を分散させる
方式と、各CPUで受け持つ機能を予め定められた機能
に分散させる方式がある。
2. Description of the Related Art Load distribution and function distribution can be mentioned as a structure for realizing a multiprocessor system in which a task is executed by a plurality of CPUs. That is, in the conventional multiprocessor system, all the functions are mounted in common to all the CPUs, and the load of processing by the operable CPUs is distributed, and the function of each CPU is distributed to the predetermined functions. There is a method.

【0003】後者の機能分散によるマルチプロセッサシ
ステムでは、実装される機能が限定できる為、処理実行
速度も高速化できる。しかし、機能が集約されている為
に障害に対して弱いという特徴を持つ。
In the latter multiprocessor system by function distribution, since the functions to be mounted can be limited, the processing execution speed can be increased. However, it has a feature that it is vulnerable to obstacles because its functions are integrated.

【0004】一方、負荷分散型マルチプロセッサシステ
ムでは、同一機能を多重化する為障害に強いが、処理の
スケジューリングが必要になる為、ソフトウエア構成が
複雑になる。また、処理のオーバヘッドも増え処理実行
速度が低下する。さらに、順番に処理をCPUへ振り分
けていく為、処理の複雑さによってCPUの負荷率にば
らつきが生じ、効率的な処理分散が行えないという問題
がある。
On the other hand, in the load balancing type multiprocessor system, since the same function is multiplexed, the system is resistant to troubles, but the scheduling of processing is required, and the software configuration becomes complicated. In addition, the processing overhead increases and the processing execution speed decreases. Further, since the processes are distributed to the CPUs in order, the load factor of the CPUs varies depending on the complexity of the processes, and there is a problem that the efficient process distribution cannot be performed.

【0005】[0005]

【発明が解決しようとする課題】したがって、本発明の
目的は、CPUの使用率を測定し、動的タスク配置を行
うことによりCPU使用率を一定範囲のばらつきに抑え
ることができ、効率的な負荷分散が行えるマルチプロセ
ッサシステムを提供することにある。
SUMMARY OF THE INVENTION Therefore, an object of the present invention is to measure the CPU usage rate and perform dynamic task placement, whereby the CPU usage rate can be suppressed within a certain range, which is efficient. It is to provide a multiprocessor system capable of load distribution.

【0006】さらに、本発明の目的は、機能分割をタス
ク単位で行うことによりプロセッサ間通信を抑止でき、
これによりソフトウエア構成を容易かつ処理のオーバヘ
ッドを軽減させることができるマルチプロセッサシステ
ムを提供することにある。
Further, an object of the present invention is to suppress inter-processor communication by performing function division in task units,
Accordingly, it is an object of the present invention to provide a multiprocessor system in which the software configuration is easy and the processing overhead can be reduced.

【0007】また、本発明の目的は、障害発生時におい
て障害が発生したCPUで動作していたタスクを別CP
Uへ動的に再配置し、別CPUで継続処理を可能とし、
これによりCPU障害の影響を最小限に抑えることがで
きるマルチプロセッサシステムを提供することにある。
Another object of the present invention is to separate the task running in the faulty CPU at the time of the fault from another CP.
Dynamically relocated to U, enabling continuous processing with another CPU,
This is to provide a multiprocessor system that can minimize the influence of a CPU failure.

【0008】また、タスクの再配置を行うCPU自体も
変更していくことで、タスク再配置の負荷分散、負荷分
散を行うCPUの障害による再配置機能の中断を防止す
ることにある。
Further, the CPU itself for relocating the task is also changed to prevent the load redistribution of the task relocation and the interruption of the relocation function due to the failure of the CPU for relocating the load.

【0009】[0009]

【課題を解決するための手段】上記の課題を達成するた
めの本発明に従うマルチプロセッサシステムは、第1の
態様として、複数のCPUにより複数のタスクを実行す
るマルチプロセッサシステムにおいて、前記複数のCP
Uのそれぞれに共通に、前記複数のCPUに対する、前
記複数のタスクの配置状態を示すタスクマッピングテー
ブルと、前記タスクマッピングテーブルに設定されたタ
スクの配置状態に基づき、前記複数のCPUに対するタ
スクの再配置を行うホストCPUを前記複数のCPUの
間で切り替える手段を備えたことを特徴とする。
According to a first aspect of the present invention, there is provided a multiprocessor system in which a plurality of CPUs execute a plurality of tasks.
Common to each U, the task mapping table indicating the allocation state of the plurality of tasks to the plurality of CPUs, and the task reconfiguration for the plurality of CPUs based on the task allocation state set in the task mapping table. It is characterized in that a means for switching the host CPU to be arranged among the plurality of CPUs is provided.

【0010】上記の課題を達成するための本発明に従う
マルチプロセッサシステムは、第2の態様として、複数
のCPUにより複数のタスクを実行するマルチプロセッ
サシステムにおいて、前記複数のCPUのそれぞれのタ
スク配置状態を示すテーブルと、前記テーブルに設定さ
れたタスクの配置状態と、各CPUにおける使用率に基
づき、前記複数のCPUに対するタスクの再配置を行う
手段を有することを特徴とする。
A second aspect of the multiprocessor system according to the present invention for achieving the above object is, in a multiprocessor system for executing a plurality of tasks by a plurality of CPUs, a task allocation state of each of the plurality of CPUs. Table, a task allocation state set in the table, and a means for rearranging tasks to the plurality of CPUs based on the usage rate of each CPU.

【0011】上記の課題を達成するための本発明に従う
マルチプロセッサシステムは、第3の態様として、第1
の態様において、さらに、前記複数のCPUのそれぞれ
は、タスク名と関数名が設定された外部提供関数リスト
を有し、前記タスクマッピングテーブルと前記外部提供
関数リストに基づき、共有メモリにアクセスする外部提
供関数のオブジェクトがいずれのCPUに存在するかを
判断し、前記オブジェクトが他のCPUに存在する時、
CPU間通信により前記他のCPUに関数コールを送る
ことを特徴とする。
A multiprocessor system according to the present invention for attaining the above object is, as a third mode, a first mode.
In the above aspect, each of the plurality of CPUs further includes an externally provided function list in which a task name and a function name are set, and an external device that accesses a shared memory based on the task mapping table and the externally provided function list. When determining which CPU the provided function object exists in, and when the object exists in another CPU,
It is characterized in that a function call is sent to the other CPU by inter-CPU communication.

【0012】上記の課題を達成するための本発明に従う
マルチプロセッサシステムは、第4の態様として、第1
の態様において、更に、前記複数のCPUのそれぞれ
は、切替元タスク及び切替先タスクに運用キューと待機
キューを備え、タスク切替イベントが発生した際、前記
切替元タスクの前記運用キューにある処理すべきイベン
トの後に終了(END)イベントを設定し、前記切替先
タスクの運用キューに継続するイベントを設定し、前記
終了(END)イベント処理後に前記切替先タスクの待
機キューに切替要求メッセージを送ることにより、タス
ク切替時の追い越し制御を行うことを特徴とする。
A multiprocessor system according to the present invention for attaining the above object is, as a fourth mode, a first mode.
In the above aspect, each of the plurality of CPUs further includes an operation queue and a standby queue in the switching source task and the switching destination task, and when a task switching event occurs, processing in the operation queue of the switching source task is performed. An end (END) event is set after the desired event, an event to be continued is set in the operation queue of the switching destination task, and a switching request message is sent to the standby queue of the switching destination task after the end (END) event is processed. By this, overtaking control at the time of task switching is performed.

【0013】上記の課題を達成するための本発明に従う
マルチプロセッサシステムは、第5の態様として、第1
の態様において、前記複数のCPUののそれぞれは、ロ
ーカルメモリに、自CPU用メモリアクセス領域と、他
CPU用メモリアクセス領域を設け、一のCPUに障害
が生じたとき、前記一のCPUの自CPU用メモリアク
セス領域と前記切替先CPUの他CPU用メモリアクセ
ス領域をバス切替により接続し、前記ローカルメモリの
情報を引き継ぐ様に構成されていることを特徴とする。
A multiprocessor system according to the present invention for attaining the above object is, as a fifth mode, a first mode.
In this aspect, each of the plurality of CPUs has its own CPU memory access area and another CPU memory access area provided in the local memory, and when one CPU fails, the one CPU's own It is characterized in that the CPU memory access area and the other CPU memory access area of the switching destination CPU are connected by bus switching to take over the information of the local memory.

【0014】さらに、上記の課題を達成するための本発
明に従うマルチプロセッサシステムは、第6の態様とし
て、第1の態様において、前記複数のCPUに少なくと
も一のCPUの使用率を他のCPUに対して低く設定し
ておき、前記他のCPUのいずれかが障害の時に、前記
一のCPUを復旧先CPUとすることを特徴とする。
Further, in a multiprocessor system according to the present invention for achieving the above object, as a sixth aspect, in the first aspect, the utilization rate of at least one CPU in the plurality of CPUs is set to another CPU. It is characterized in that the CPU is set to a low value, and when one of the other CPUs fails, the one CPU is set as a recovery destination CPU.

【0015】上記の課題を達成するための本発明に従う
マルチプロセッサシステムは、第7の態様として、第1
の態様において、前記他のCPUにおける使用率は、前
記ホストとなるCPUから他のCPUへの問い合わせに
より得られることを特徴とする。
A multiprocessor system according to the present invention for attaining the above object is, as a seventh mode, a first mode.
In this mode, the usage rate in the other CPU is obtained by an inquiry from the CPU serving as the host to the other CPU.

【0016】本発明の特徴は、更に図面を参照して説明
される発明の実施の形態例から明らかになる。
The features of the present invention will be apparent from the embodiments of the invention described with reference to the drawings.

【0017】[0017]

【発明の実施の形態】ここで、本発明の実施例の説明に
先立って、理解を容易とするべく本発明を概要を説明す
る。
BEST MODE FOR CARRYING OUT THE INVENTION Here, prior to the description of the embodiments of the present invention, the outline of the present invention will be described for easy understanding.

【0018】図1は、本発明を適用するマルチプロセッ
サシステムの構成例を示す図である。複数のCPU1〜
CPUnを有し、それぞれ同一の構成であり、OS(オ
ペレーティングシステム)上でアプリケーションソフト
ウエアが実行されるように構成され、更にOSとアプリ
ケーションソフトウエアの中間として、ミドルウエアを
有する。
FIG. 1 is a diagram showing a configuration example of a multiprocessor system to which the present invention is applied. Multiple CPU1
It has a CPUn, has the same configuration, and is configured to execute application software on an OS (operating system), and further has middleware as an intermediate between the OS and the application software.

【0019】図2は、図1に示すマルチプロセッサシス
テムの一つのCPUの構成例を示す図である。ミドルウ
エアは、後に説明するエージェント1、関数リストテー
ブル2及びタスクマッピングテーブル3を構成してい
る。さらに、複数のタスク1〜タスクnはアプリケーシ
ョンソフトウエアで実現される。
FIG. 2 is a diagram showing a configuration example of one CPU of the multiprocessor system shown in FIG. The middleware constitutes an agent 1, a function list table 2 and a task mapping table 3 which will be described later. Further, a plurality of tasks 1 to n are realized by application software.

【0020】本発明に従うマルチプロセッサシステムで
は、図1に示す構成において、全てのCPU1〜CPU
nに対して同じロードモジュールがロードされ、一様に
全タスクが生成される。
In the multiprocessor system according to the present invention, in the configuration shown in FIG.
The same load module is loaded for n, and all tasks are uniformly generated.

【0021】さらに、メッセージ送信先CPUを動的に
切替えることで、CPU単位で動作するタスクを変更し
ている。したがってメッセージ送信を行う際、対象タス
クが動作しているCPUを知る必要がある。
Further, by dynamically switching the message transmission destination CPU, the task operating on a CPU basis is changed. Therefore, when sending a message, it is necessary to know the CPU on which the target task is operating.

【0022】本発明のマルチプロセッサシステムでは、
上記のタスクマッピングテーブル3を使用して、タスク
動作情報を管理する。これにより、対象タスクが動作し
ているCPUを判断することができる。
In the multiprocessor system of the present invention,
The task operation information is managed using the task mapping table 3 described above. This makes it possible to determine the CPU on which the target task is operating.

【0023】タスクマッピングテーブルの一例が下記の
表1に示される。
An example of the task mapping table is shown in Table 1 below.

【0024】[0024]

【表1】 表1に示すタスクマッピングテーブル3は、メッセージ
キューを識別する為のキュー識別子(Qid)、Qid
が割り当てられているタスク名、該当タスクが動作して
いるCPU番号、動作CPU上でのメッセージキューの
実アドレス(msgQid)、再配置できないアイドルタスク
やWDT(ウォッチドックタイマ)監視タスクを識別す
る為の再配置可否フラグから構成される。
[Table 1] The task mapping table 3 shown in Table 1 is a queue identifier (Qid) for identifying a message queue, and a Qid.
To identify the task name to which is assigned, the CPU number on which the task is running, the real address of the message queue (msgQid) on the running CPU, the idle task that cannot be relocated, and the WDT (watchdog timer) monitoring task Of the relocation availability flag.

【0025】メッセージキューには運用キューと待機キ
ューがあり、通常動作では運用キューが使用される。待
機キューはタスク再配置時に、イベントをキューイング
するのに使用される一時領域である。
The message queue has an operation queue and a standby queue, and the normal operation uses the operation queue. The wait queue is a temporary area used for queuing events during task relocation.

【0026】また、図示しない共有メモリにデータを書
き込む場合、データ処理を実施するタスクと共有メモリ
へデータアクセスするタスクが異なるCPUで動作して
いる可能性がある。その場合は、本来書き込みを行いた
いデータはデータ処理を実施したタスクのローカル領域
にしかなく、共有メモリへデータアクセスするタスクが
他CPUで動作していた場合、期待するデータが共有メ
モリへ書き込まれないことになる。
Further, when writing data to a shared memory (not shown), there is a possibility that the task of executing data processing and the task of accessing data to the shared memory are operating in different CPUs. In that case, the data to be originally written is only in the local area of the task that executed the data processing, and if the task that accesses the shared memory is operating in another CPU, the expected data is written in the shared memory. There will be no.

【0027】したがって、共有メモリへアクセスする際
にデータ処理を実施するタスクから共有メモリへデータ
アクセスするタスクへデータを通知する必要がある。そ
こで、本発明に従うマルチプロセッサシステムでは、メ
ッセージ送信機能と共有メモリアクセス機能を司る処理
部を設ける。ここでは便宜上その機能部を「エージェン
ト」と命名し、図2に示すエージェント1の構成を有す
る。
Therefore, when accessing the shared memory, it is necessary to notify the data from the task that executes the data processing to the task that accesses the shared memory. Therefore, the multiprocessor system according to the present invention is provided with a processing unit that controls the message transmission function and the shared memory access function. Here, for the sake of convenience, the functional unit is named "agent" and has the configuration of the agent 1 shown in FIG.

【0028】図2に示す構成において、本発明に従い
「エージェント」が提供する機能をそれぞれ以下に説明
する。 [共有メモリアクセス機能]1−1.エージェント1
(第1のCPUのエージェントを指す)は、共有メモリ
へアクセスする関数コールを「処理判定部」で受ける
と、関数リストテーブル2の外部提供関数リストとタス
クマッピングテーブル3を参照して該当関数がどのCP
Uに割り当てられているか判定する。
In the configuration shown in FIG. 2, the functions provided by the "agent" according to the present invention will be described below. [Shared memory access function] 1-1. Agent 1
When the "processing determination unit" receives a function call for accessing the shared memory (refers to the agent of the first CPU), the corresponding function is referenced by referring to the externally provided function list of the function list table 2 and the task mapping table 3. Which CP
Determine if it is assigned to U.

【0029】1−2.該当関数が自CPUに割り当てら
れていればそのまま関数コールを行う。他CPUの場合
は、「メッセージキュー管理部」で汎用メッセージキ
ューIDを獲得し、これを「メッセージ送信部」によ
り送信先CPUのエージェント2に対してCPU間通信
を行う。
1-2. If the corresponding function is assigned to the own CPU, the function is called as it is. In the case of another CPU, the general message queue ID is acquired by the “message queue management unit”, and the CPU 2 communicates with the agent 2 of the destination CPU by the “message transmission unit”.

【0030】2−1.エージェント1からのメッセージ
を「メッセージ受信部」で受信したエージェント2
(第2のCPUエージェントを指す)は、「処理判定
部」で受信したメッセージ内の外部提供関数INDEX
番号を基に、外部提供関数リストテーブル2とマッピン
グテーブル3を参照して処理関数を求めて、対象関数に
対して関数コールを行う。
2-1. Agent 2 that received the message from Agent 1 in the "message receiver"
(Indicates the second CPU agent) is the externally provided function INDEX in the message received by the "processing determination unit".
Based on the number, the processing function is obtained by referring to the externally provided function list table 2 and the mapping table 3, and the function call is made to the target function.

【0031】ここで、上記の外部提供関数とは、処理依
頼元タスクが、関数コールにより処理依頼先タスクへ処
理を依頼し、実際の処理は依頼先タスクで実施し、依頼
元タスクはその結果だけを得る場合を言う。
Here, the above-mentioned externally provided function means that the processing request source task requests the processing request destination task to perform processing by a function call, the actual processing is executed by the request destination task, and the request source task executes the result. Just say if you get.

【0032】2−2.エージェント2は、「処理判定
部」で共有メモリアクセス関数からの処理結果を受信す
ると、「メッセージ送信部」でエージェント1から通
知された汎用キューに対してCPU間通信を行い処理結
果を返却する。
2-2. When the agent 2 receives the processing result from the shared memory access function in the “processing determination unit”, the “message transmission unit” performs inter-CPU communication with the general-purpose queue notified from the agent 1 and returns the processing result.

【0033】1−3.エージェント1は、「メッセー
ジ受信部」にて処理結果を受信すると処理結果を起動元
タスクに返却し、汎用キューを解放する。 [メッセージ送受信機能]1−1.エージェント1は、
タスクAからタスクBへのメッセージ送信要求を「処
理判定部」で受信すると、タスクマッピングテーブル3
を参照して該当タスクがどのCPUに配置されているか
確認する。
1-3. When the agent 1 receives the processing result at the "message receiving unit", the agent 1 returns the processing result to the activation source task and releases the general-purpose queue. [Message Transmission / Reception Function] 1-1. Agent 1
When the “process determination unit” receives a message transmission request from task A to task B, task mapping table 3
To check which CPU the relevant task is located.

【0034】1−2.送信先タスクBが自CPU内に配
置されていれば、エージェント1は「メッセージ送信
部」によりタスクBに対してタスク間通信を行うが、他
CPUに配置されている場合、「メッセージ送信部」
で対象CPU内のエージェント2に対してCPU間通信
を行う。
1-2. If the destination task B is located in its own CPU, the agent 1 performs inter-task communication with the task B by the "message sending unit", but if it is located in another CPU, the "message sending unit".
Then, the inter-CPU communication is performed with respect to the agent 2 in the target CPU.

【0035】2−1.エージェント1からのメッセージ
を「メッセージ受信部」で受信したエージェント2で
は、「処理判定部」にて受信したメッセージが自CP
U内のタスク宛であるか否かをタスクマッピングテーブ
ル3を参照して確認し、該当タスクに対してタスク間通
信を行う。 [タスク走行時間算出機能]「タスク走行時間管理
部」において、自CPU内の各タスク走行時間を算出
し、「タスク走行時間管理部」内のタスク走行時間管
理テーブルで管理する。 [タスク配置の動的切替機能]エージェントは、「タ
イマ管理部」において、開始された周期タイマのタイム
アウトを検出するとホストCPUとして動作し、「メ
ッセージ送信部」よりCPU間通信を用いて他CPUに
対してCPU使用率報告要求を送信する。
2-1. At the agent 2 that received the message from the agent 1 at the “message receiving unit”, the message received at the “processing determination unit” is the own CP.
Whether or not it is addressed to the task in U is confirmed by referring to the task mapping table 3, and inter-task communication is performed for the relevant task. [Task running time calculation function] The "task running time management unit" calculates each task running time in its own CPU and manages the task running time management table in the "task running time management unit". [Dynamic switching function of task allocation] When the "timer management unit" detects the time-out of the started periodic timer, the agent operates as a host CPU, and the "message transmission unit" uses the inter-CPU communication to transfer to another CPU. A CPU usage rate report request is sent to it.

【0036】「メッセージ受信部」によりCPU使用
率報告要求を受信したエージェントは、「メッセージ
送信部」よりタスク走行時間管理テーブル情報をCPU
使用率報告メッセージとして要求元エージェントに送信
する。
The agent which has received the CPU usage rate report request from the "message receiving unit" sends the task running time management table information to the CPU from the "message transmitting unit".
It is sent to the requesting agent as a usage report message.

【0037】さらに、「メッセージ受信部」におい
て、CPU使用率報告を受信したエージェント(ホス
ト)は、「タスク配置切替部」で各タスクの走行時間
を元に、タスク配置のばらつきを算出し、タスクマッピ
ングテーブル3を更新する。 更新されたタスクマッピ
ングテーブル3は、「メッセージ送信部」より各CP
UのエージェントにCPU間通信を用いて送信する。
Further, the agent (host) which has received the CPU usage rate report in the "message receiving unit" calculates the variation in the task placement based on the running time of each task in the "task placement switching unit", The mapping table 3 is updated. The updated task mapping table 3 is stored in the "message sending unit" from each CP.
Send to U agent using inter-CPU communication.

【0038】更新されたタスクマッピングテーブルを受
信したエージェントは、「タスク配置切替部」でCP
U切替時の追い越し制御を行いながらタスク配置を切り
替える。 [障害復旧機能]本発明のおいては、CPUを動的に切
替が可能であるので、CPU障害に備えて、障害が発生
したCPUの処理を引き継いでもCPU使用率が100
%を超えないように、使用率の低いCPUを配置し、
「障害復旧部」において、CPU障害の復旧処理を実
現する。これにより、システムの障害に対しての高い耐
性を実現できる。
The agent that received the updated task mapping table uses the "task placement switching unit" to execute the CP.
The task placement is switched while performing the overtaking control at the time of U switching. [Fault Recovery Function] In the present invention, since the CPU can be dynamically switched, the CPU usage rate is 100 even if the CPU of the faulty device takes over the process in preparation for the CPU fault.
Place a CPU with low usage rate so that it does not exceed%,
The "failure recovery unit" implements recovery processing for a CPU failure. This makes it possible to achieve high resistance to system failures.

【0039】ここで、CPU1〜CPUnの各々は、C
PU番号等から計算により得られるCPU毎に異なるタ
イマ値を保持している(以降、個別タイマと命名す
る)。図2に示すエージェント1のタイマ管理部にお
いて、システム再開時に各CPUで保持している個別タ
イマを設定する。
Here, each of the CPU1 to CPUn is C
It holds a different timer value for each CPU obtained by calculation from the PU number and the like (hereinafter, referred to as an individual timer). In the timer management unit of the agent 1 shown in FIG. 2, an individual timer held by each CPU is set when the system is restarted.

【0040】個別タイマのタイムアウト後は、CPU毎
に異なる周期タイマを設定する。タイマ管理部に設定
した個別/周期タイマのタイムアウトを最初に検出した
CPUをホストCPUとする。これにより本発明では、
いずれのCPUでもホストCPUとして動作可能であ
り、動的なホストCPUの切替えが実施できる。
After the individual timer times out, a different periodic timer is set for each CPU. The CPU that first detects the timeout of the individual / periodic timer set in the timer management unit is the host CPU. Therefore, in the present invention,
Any of the CPUs can operate as a host CPU and can dynamically switch the host CPU.

【0041】CPU1〜CPUnの各々では上記の表 1
に示すタスクマッピングテーブル3を保持し、図2に示
す各CPUに存在するエージェント1のタスク配置切替
部においてCPU使用率を基に、動的なタスク再配置
を実施する。
For each of the CPU1 to CPUn, the above table 1
The task mapping table 3 shown in FIG. 2 is held, and the task allocation switching unit of the agent 1 existing in each CPU shown in FIG. 2 dynamically reallocates the task based on the CPU usage rate.

【0042】表1に示すタスクマッピングテーブル3を
用いて、図2に示すエージェント1の処理判定部、メ
ッセージキュー管理部、メッセージ送信部、メッセ
ージ受信部においてCPU間通信を意識することなく
タスク間のメッセージ送受信を実施する。
By using the task mapping table 3 shown in Table 1, the processing determination unit, the message queue management unit, the message transmission unit, and the message reception unit of the agent 1 shown in FIG. Send and receive messages.

【0043】さらに、表1に示すタスクマッピングテー
ブル3と外部提供関数リストを用いて、図1に示すエー
ジェント1の処理判定部、メッセージキュー管理部
、メッセージ送信部、メッセージ受信部におい
て、共有メモリにアクセスする外部提供関数のオブジェ
クトがどのCPUに存在するかを意識することなく、関
数コールを行うことが実現される。
Further, by using the task mapping table 3 and the externally provided function list shown in Table 1, a shared memory is stored in the processing determination unit, the message queue management unit, the message transmission unit, and the message reception unit of the agent 1 shown in FIG. It is possible to perform the function call without being aware of which CPU the object of the externally provided function to access exists.

【0044】以下に上記のエージェントに備えられる各
機能部に関連して、実現される具体的処理について順次
説明する。 [タスク再配置]上記した本発明に従うタスク再配置の
実施例を図3に示すタスク再配置シーケンスにより説明
する。 S1:本発明ではシステム再開時(処理工程P1)に各
CPUでCPUのシリアル番号等から得られる個別のタ
イマ値をタイマ管理部で計算する。 S2:この個別のタイマ値を設定し、個別にタイマ値を
設定する。
Specific processing to be realized will be sequentially described below in relation to each functional unit provided in the above agent. [Task Relocation] An example of the task relocation according to the present invention described above will be described with reference to the task relocation sequence shown in FIG. S1: In the present invention, when the system is restarted (processing step P1), each timer calculates an individual timer value obtained from the serial number of the CPU or the like in each CPU. S2: This individual timer value is set, and the timer value is individually set.

【0045】個別のタイマ値は、例えば、CPU1〜C
PU3の順に1秒、2秒、3秒とする。 S3:個別タイマが最初にタイムアウトする(処理工程
P2)と、最初にタイムアウトしたCPUがホストCP
Uとして動作する。 S4:CPU1の個別タイマが最初にタイムアウトする
ので、CPU1がホストCPUとして、CPU1のエー
ジェント1がCPU間通信を用いて他CPU2,3に対
してCPU使用率報告要求を送信する(図3:S4)。 S5:CPU使用率報告要求を受信したCPU2,3の
エージェント1は個別タイマを停止する。 S6:CPU2,3から計測していたCPU使用率をC
PU間通信によりホストCPUに報告する。システム再
開時はCPU使用率を0%として報告する。 S7:CPU使用率報告メッセージを受けたホストCP
Uのエージェント1では、CPU使用率からシステム再
開かCPUリセット再開かを判断する。システム再開時
は全CPUからCPU使用率0%で報告される為、タス
クマッピングテーブル3はデフォルトタスクマッピング
テーブルを使用する。
The individual timer values are, for example, CPU1 to CPU1.
PU3 is set to 1 second, 2 seconds, and 3 seconds in this order. S3: When the individual timer times out first (process step P2), the CPU that times out first becomes the host CP.
Act as U. S4: Since the individual timer of the CPU 1 times out first, the agent 1 of the CPU 1 sends a CPU usage rate report request to the other CPUs 2 and 3 by using the CPU 1 as a host CPU (FIG. 3: S4). ). S5: The agent 1 of the CPUs 2 and 3 which has received the CPU usage rate report request stops the individual timer. S6: CPU usage rate measured from CPUs 2 and 3 is C
It reports to the host CPU by communication between PUs. When the system is restarted, the CPU usage rate is reported as 0%. S7: Host CP that received the CPU usage report message
The U agent 1 determines whether the system is restarted or the CPU is reset based on the CPU usage rate. When the system is restarted, all the CPUs report a CPU usage rate of 0%, so the task mapping table 3 uses the default task mapping table.

【0046】また、CPUリセット再開時はCPU使用
率が0%以外で報告される為、CPU使用率報告メッセ
ージで通知されたタスクマッピングテーブル3とCPU
使用率を使用して、CPU負荷率にばらつきがないかを
判断し、タスクマッピングテーブルを作成/更新する
(処理工程P3)。但し、CPU障害時に備え意図的に
CPU使用率を下げたCPUについては対象外とする。
When the CPU reset is restarted, the CPU usage rate is reported at a value other than 0%. Therefore, the task mapping table 3 and the CPU notified by the CPU usage rate report message are reported.
Using the usage rate, it is determined whether or not there is a variation in the CPU load rate, and the task mapping table is created / updated (processing step P3). However, CPUs whose CPU usage rate has been intentionally reduced in case of a CPU failure are excluded.

【0047】ホストCPUのエージェント1は、タスク
マッピングテーブル3を更新すると、他CPUに対して
CPU間通信を用いてタスクマッピングテーブル更新通
知を送信する。
When the agent 1 of the host CPU updates the task mapping table 3, the agent 1 of the host CPU sends a task mapping table update notification to the other CPUs by using inter-CPU communication.

【0048】これにより、タスクマッピングテーブル更
新通知を受けた全てのCPUのエージェント1は、自C
PU内のタスクマッピングテーブル3を更新し、タスク
マッピングテーブル3で示されたタスク配置に切り替え
る。S8:ここで、全CPUはシステム共通に持つ周期
タイマ(= 基準タイマ値+個別タイマ値)でタイマを
開始する。但し、基準タイマ値は各CPUに対して同一
であり、個別タイマ値に対して十分に大きいタイマ値で
ある。
As a result, the agents 1 of all CPUs that have received the task mapping table update notification are
The task mapping table 3 in the PU is updated, and the task allocation shown in the task mapping table 3 is switched. S8: Here, all the CPUs start a timer with a periodic timer (= reference timer value + individual timer value) that the system has in common. However, the reference timer value is the same for each CPU and is a sufficiently large timer value with respect to the individual timer value.

【0049】以降は、周期タイマのタイムアウトを契機
に同様に上記S1〜S7の手順を繰り返し、タスクマッ
ピングテーブルを更新し、動的なタスク再配置を行う。
したがって、図4に示すようにCPU上で動作するタス
クを動的に切り替え、動的にCPU負荷分散(使用率の
均一化)を図ることが可能となる。
After that, when the cycle timer times out, the above steps S1 to S7 are similarly repeated, the task mapping table is updated, and the dynamic task relocation is performed.
Therefore, as shown in FIG. 4, it is possible to dynamically switch the tasks operating on the CPU and dynamically balance the CPU load (uniformize the usage rate).

【0050】すなわち、図4において、デフォルトマッ
ピングによるタスク配置のCPU使用率は、実施例とし
て、CPU1に関してタスクAに対し20%、タスクB
に対し20%、CPU2に関してタスクCに対し10
%、タスクDに対し5%、更にCPU3に関してタスク
Eに対し5%、タスクFに対し0%である。
That is, referring to FIG. 4, the CPU utilization rate of the task allocation by default mapping is 20% for task A for CPU 1 and task B for task A as an example.
20% for CPU2, 10 for task C2
%, 5% for task D, 5% for task E for CPU3, and 0% for task F.

【0051】このデフォルトマッピングの状態から図3
に示した手順によりCPU使用率からタスクを動的に配
置する処理を行った結果として、CPU1に関してタス
クAに対し20%、CPU2に関してタスクBに対し2
0%、更にCPU3に関してタスクCに対し10%、タ
スクDに対し5%、タスクEに対して5%、タスクFに
関して0%となる。したがって、CPU1,CPU2,
CPU3ともに使用率20%ととなり、使用率が均一化
する。
From the state of this default mapping, FIG.
As a result of performing the process of dynamically allocating the task from the CPU usage rate by the procedure shown in, the CPU 1 has 20% of the task A and the CPU 2 has 2 of the task B.
0%, 10% for task C for CPU3, 5% for task D, 5% for task E, and 0% for task F. Therefore, CPU1, CPU2,
The CPU 3 has a usage rate of 20%, which makes the usage rate uniform.

【0052】上記の様に初期立ち上げ直後は、デフォル
トマッピングによる配置のため、各CPUで使用率にば
らつきが生じているが(図4A)、CPU使用率報告に
よりホストCPUがマッピング変更をすることによっ
て、図4Bのように均一化される。 [メッセージ送信]本発明では、更にメッセージ送信を
行う際、エージェント1は、先に示した表1に示すタス
クマッピングテーブル3を参照し、該当タスクが動作し
ているCPUを判断してメッセージ送信を行う為の通信
手段を決定する。
Immediately after the initial startup as described above, the utilization ratio varies among the CPUs due to the default mapping arrangement (FIG. 4A). However, the host CPU may change the mapping by reporting the CPU utilization ratio. Is made uniform as shown in FIG. 4B. [Message Transmission] In the present invention, when a message is further transmitted, the agent 1 refers to the task mapping table 3 shown in Table 1 shown above, determines the CPU in which the task is operating, and transmits the message. Determine the communication method to perform.

【0053】エージェントは送信先タスクが送信元タス
クと同じCPUで動作している場合、タスク間通信を用
いてメッセージ送信を行うが、他のCPU上で動作して
いる場合はCPU間通信を使用してメッセージ送信を行
う。
When the destination task is operating on the same CPU as the source task, the agent uses the inter-task communication to send messages, but when operating on another CPU, the inter-CPU communication is used. And send a message.

【0054】先に説明したように、エージェントはCP
U毎に存在しており、各タスクはエージェント1にメッ
セージ送信を依頼することで、所属するCPUを意識す
ることなくメッセージ送信を行うことができる。
As described above, the agent is the CP
It exists for each U, and each task requests the agent 1 to send a message, so that the message can be sent without being aware of the CPU to which it belongs.

【0055】かかるメッセージ送信のスケジューリング
の概要を図5に示す。図5において、CPU1のタスク
AからCPU2のタスクBにメッセージを送信する場合
を考える。 SS1:タスクAは動作CPUを意識することなくエー
ジェント1に対してタスクBへのメッセージ送信を依頼
する。 SS2:エージェント1は、タスクマッピングテーブル
3を参照し、タスクAとタスクBが同じCPUで動作し
ているか否かを判断する。 SS2−1:タスクAとタスクBが同じCPUで動作し
ている場合、エージェント1はタスク間通信を使用し
て、該当タスクBにメッセージ送信を行う。 SS2−2:一方、タスクAとタスクBが他のCPU2
で動作している場合、エージェント1はCPU間通信を
使用して、CPU2のエージェント2に対してメッセー
ジ送信を行う。 SS3:メッセージを受信したエージェント2は、該当
タスクへメッセージを転送する。したがって、マルチプ
ロセッサを意識することなく、メッセージ送信のスケジ
ューリングが可能となる。 [外部提供関数]ここで、共有メモリアクセスを行う
際、データ処理を実施するタスクと共有メモリへデータ
アクセスするタスクが異なるCPUで動作している可能
性がある。
FIG. 5 shows an outline of such message transmission scheduling. In FIG. 5, consider the case where a message is sent from task A of CPU1 to task B of CPU2. SS1: Task A requests agent 1 to send a message to task B without being aware of the operating CPU. SS2: The agent 1 refers to the task mapping table 3 and determines whether the task A and the task B are operating in the same CPU. SS2-1: When the task A and the task B are operating in the same CPU, the agent 1 uses the intertask communication to send a message to the corresponding task B. SS2-2: On the other hand, task A and task B are other CPU2
, The agent 1 uses the inter-CPU communication to send a message to the agent 2 of the CPU 2. SS3: The agent 2, which has received the message, transfers the message to the corresponding task. Therefore, message transmission can be scheduled without being aware of the multiprocessor. [Externally Provided Function] Here, when performing shared memory access, there is a possibility that the task of performing data processing and the task of accessing data to the shared memory are operating in different CPUs.

【0056】その場合、本来書き込みたいデータはデー
タ処理を実施したタスクのローカル領域にしかなく、共
有メモリへデータアクセスするタスクが他CPUで動作
していた場合、期待するデータが共有メモリへ書き込ま
れないことになる。
In this case, the data to be originally written is only in the local area of the task that executed the data processing, and when the task that accesses the shared memory is operating in another CPU, the expected data is written in the shared memory. There will be no.

【0057】したがって、共有メモリへアクセスする
際、データ処理を実施するタスクから共有メモリへデー
タアクセスするタスクへデータを通知する必要がある。
Therefore, when accessing the shared memory, it is necessary to notify the task of executing the data processing to the task of accessing the shared memory of the data.

【0058】エージェントはタスクマッピングテーブル
3と外部提供関数リストテーブル2を参照して、共有メ
モリへアクセスする外部提供関数のオブジェクトが存在
するCPUを特定し、外部提供関数オブジェクトが自C
PUに存在すれば直接関数コールを行う。
The agent refers to the task mapping table 3 and the externally provided function list table 2 to specify the CPU in which the object of the externally provided function that accesses the shared memory exists, and the externally provided function object is the C
If it exists in PU, a direct function call is made.

【0059】しかし、他CPUに存在する場合は、CP
U間通信を使用して他CPUエージェントへ処理を依頼
し、他CPUエージェントから関数コールを行う。他C
PUにおいて処理実行され処理が完了すると、他CPU
エージェントから処理結果が通知される。
However, if it exists in another CPU, CP
Using U communication, another CPU agent is requested to perform processing, and another CPU agent makes a function call. Other C
When the process is executed in the PU and the process is completed, another CPU
The agent notifies the processing result.

【0060】他CPUエージェントへ処理を依頼する場
合は、他CPUエージェントへ処理依頼ごとに取られる
一時的なメッセージキューを使用する。このメッセージ
キューを汎用キューと呼ぶ。
When requesting a process to another CPU agent, a temporary message queue that is taken for each process request to another CPU agent is used. This message queue is called a general-purpose queue.

【0061】但し、ハンドラ内からは、メッセージ受信
が使用できない為外部提供関数は使用できない。
However, since the message reception cannot be used from within the handler, the externally provided function cannot be used.

【0062】図6は、プロセッサ間での外部提供関数コ
ールを行う実施の形態例を示す図である。
FIG. 6 is a diagram showing an embodiment in which an externally provided function call is made between processors.

【0063】CPU1のエージェント1はタスクAから
関数コールが起動されると(図6:S51)、外部提供
関数リストテーブル2とタスクマッピングテーブル3と
を参照して、共有メモリへアクセスする外部提供関数の
オブジェクトが存在するCPUを特定する。
When the function call is activated from the task A (FIG. 6: S51), the agent 1 of the CPU 1 refers to the externally provided function list table 2 and the task mapping table 3 to access the externally provided function. The CPU in which the object is present is specified.

【0064】外部提供関数オブジェクトが自CPU1内
に存在すれば直接関数コールをエージェント1で処理す
る。しかし、他CPU2に存在する場合は、CPU間通
信を使用して他のCPU2のエージェント2へ処理を依
頼する(図6:S62)。
If the externally provided function object exists in its own CPU 1, the agent 1 processes the direct function call. However, when it exists in the other CPU 2, the inter-CPU communication is used to request the agent 2 of the other CPU 2 for processing (FIG. 6: S62).

【0065】他CPU2のエージェント2からタスクB
の外部提供関数オブジェクトに対して関数コールを行う
(図6:S63)。他CPU2で処理が実行され、処理
が完了すると、他CPUエージェント2の処理結果が渡
され(図6:S64)、それにより処理結果がCPU間
通信により通知される(図6:S65)。
From agent 2 of other CPU 2 to task B
A function call is made to the externally provided function object (FIG. 6: S63). When the processing is executed by the other CPU 2 and the processing is completed, the processing result of the other CPU agent 2 is passed (FIG. 6: S64), and the processing result is notified by the inter-CPU communication (FIG. 6: S65).

【0066】これにより、CPU1のエージェントによ
り処理結果がタスクAに渡される(図6:S66)。
As a result, the processing result is passed to the task A by the agent of the CPU 1 (FIG. 6: S66).

【0067】なお、他CPUエージェント2へ処理を依
頼する場合、他CPUエージェント2への処理依頼毎に
取られる一時的な上記の汎用キューを使用する。
When requesting the processing to the other CPU agent 2, the above-mentioned temporary general-purpose queue that is taken every processing request to the other CPU agent 2 is used.

【0068】ここで、本発明に従うマルチプロセッサシ
ステムでは、タスクとタスクが管理するテーブル情報へ
アクセスする外部提供関数を合わせたものを機能ブロッ
ク(FB:Function Block)とする。
In the multiprocessor system according to the present invention, a combination of a task and an externally provided function for accessing table information managed by the task is referred to as a function block (FB).

【0069】あらかじめ全てのCPUでは機能ブロック
FB毎に所有する下記表2に示すような外部提供関数リ
ストテーブル2を保持する。
In advance, all CPUs hold an externally provided function list table 2 as shown in the following Table 2 owned by each functional block FB.

【0070】[0070]

【表2】 外部提供関数リストテーブル2は、INDEX番号、F
B名、実処理外部提供関数名とエージェント内で使用す
るエージェント関数名、汎用キューの識別子(汎用QI
D)から構成される。
[Table 2] The externally provided function list table 2 has an INDEX number, F
B name, name of externally provided function for actual processing, name of agent function used in agent, general queue identifier (general QI
It consists of D).

【0071】外部提供関数リストは関数毎にINDEX
が割り振られ、INDEX番号でアクセスできるように
する。外部提供関数はエージェント関数名で提供を行
い、外部提供関数を提供するエージェントが実処理外部
提供関数を関数コールする。
The externally provided function list is INDEX for each function.
Are assigned and can be accessed by the INDEX number. The externally provided function is provided by the agent function name, and the agent providing the externally provided function calls the actual processing externally provided function.

【0072】したがって、タスクは常に自CPU内のエ
ージェントに対してエージェント関数名で関数コールを
行えばよく、外部提供関数が存在しているCPUを意識
することなく外部提供関数を使用することができる。 [外部提供関数のスケジューリング]次に、共有メモリ
にアクセスする外部提供関数のスケジューリング方法の
詳細を図7に示す。 S11:CPU1上のタスクAで外部提供関数が関数コ
ールされる。 S12:エージェント1では関数コールされた外部提供
関数が属する機能ブロックFBを関数リストテーブル2
を参照して特定する。すなわち、関数リストテーブル2
を参照することで対象となる外部提供関数がどの関数ブ
ロックFBに属するかを確認する。 S16:3エージェント1は、次いで関数コール方法を
決定する。 S14:外部提供関数が自CPUにあればエージェント
1は直接関数コールを行うが、他CPUであればCPU
間通信を用いて間接的に関数コールを行う。CPU間通
のためには汎用メッセージキューIDを獲得し、CPU
間インタフェースを作成する。 S15:エージェント1は関数コール元を識別できるよ
うに汎用Qidを獲得し、CPU間IFに汎用Qid、
引数情報、INDEX番号を格納してCPU間通信を使
用してメッセージ送信を行う。 S16:メッセージを受信すると、エージェント2では
関数リスト2を参照してコールする関数を検索する。そ
して、CPU間IFのINDEX番号で指定された実処
理外部提供関数に対して関数コールを行う。 S17:実処理外部提供関数において処理が実行され
る。 S18:この処理結果をCPU2のエージェント2が受
信する。 S19、S20:ついで、エージェント2は、処理結果
と汎用QidをCPU間通信のメッセージ中に格納し、
メッセージ送信を行う。 S21、S22、S23:CPU間通信で処理結果を受
信したCPU1のエージェント1は、汎用キューに対し
てメッセージを送信し、コール元タスクAに処理結果を
タスク間通信でメッセージ送信し、汎用Qidを解放す
る。
Therefore, the task may always make a function call to the agent in its own CPU with the agent function name, and the externally provided function can be used without being aware of the CPU in which the externally provided function exists. . [Scheduling of Externally-Provided Function] Next, FIG. 7 shows the details of the scheduling method of the externally-provided function for accessing the shared memory. S11: The externally provided function is called by the task A on the CPU 1. S12: In the agent 1, the function list table 2 is defined as the function block FB to which the externally-provided function called belongs.
Refer to to specify. That is, the function list table 2
It is confirmed by referring to which function block FB the target externally provided function belongs. S16: 3 Agent 1 then determines a function call method. S14: The agent 1 directly calls the function if the externally provided function is in its own CPU, but if it is another CPU, the CPU
Function calls are indirectly made using inter-communication. In order to communicate between CPUs, a general-purpose message queue ID is acquired, and the CPU
Create an inter-interface. S15: The agent 1 acquires a general-purpose Qid so that the function call source can be identified, and the general-purpose Qid is stored in the inter-CPU IF.
The argument information and the INDEX number are stored and the message is transmitted using the inter-CPU communication. S16: When the message is received, the agent 2 refers to the function list 2 to search for a function to call. Then, a function call is made to the actual processing externally provided function designated by the INDEX number of the inter-CPU IF. S17: Processing is executed in the actual processing externally provided function. S18: The agent 2 of the CPU 2 receives this processing result. S19, S20: Then, the agent 2 stores the processing result and the general-purpose Qid in the message of the inter-CPU communication,
Send a message. S21, S22, S23: The agent 1 of the CPU 1, which has received the processing result through the inter-CPU communication, sends a message to the general-purpose queue, sends the processing result to the calling task A by inter-task communication, and sends the general-purpose Qid. release.

【0073】上記の様に、タスクマッピングテーブル3
と関数リストテーブル2の関数リストを用いて、共有メ
モリにアクセスする外部提供関数のオブジェクトがどの
CPUに存在するかを判断する。そして、CPU間通信
と関数コールの仲介を行うエージェントを用いることに
よって共有メモリにアクセスを行う外部提供関数の使用
が可能となる。 [タスク切替制御]ここで、上記したタスクの再配置に
おいて、異なるCPU間をまたいでタスクの再配置が行
われた場合、追い越し制御を考えなくてはイベントの処
理順序に整合性が保たれなくなる。
As described above, the task mapping table 3
And the function list of the function list table 2 are used to determine in which CPU the object of the externally provided function that accesses the shared memory exists. Then, an externally provided function for accessing the shared memory can be used by using an agent for mediating communication between CPUs and function call. [Task switching control] Here, in the above-mentioned task relocation, when tasks are relocated across different CPUs, consistency in the event processing order cannot be maintained without overtaking control. .

【0074】追い越し制御イメージを示す図8におい
て、例えばイベント1〜3までが処理待ちになっている
状態(図8A:CPU1)で、CPU1からCPU2へ
のタスク再配置が行われた場合、切替元CPU1におい
て、イベント1〜3までを実行した後に切替先CPU2
でイベント4〜5を実行する必要がある。この待ち合わ
せ処理を追い越し制御と呼ぶ。
In FIG. 8 showing the overtaking control image, for example, in the state where events 1 to 3 are waiting for processing (FIG. 8A: CPU1), when the task relocation from CPU1 to CPU2 is performed, the switching source In the CPU1, the switching destination CPU2 after executing the events 1 to 3
It is necessary to execute events 4 to 5. This waiting process is called overtaking control.

【0075】CPU間でタスク切替が発生した場合の追
い越し制御の手順を図8と関連して図9に示す。
FIG. 9 shows the procedure of overtaking control when task switching occurs between CPUs in connection with FIG.

【0076】図9において、タスク切替元をCPU1、
タスク切替先をCPU2とする。各タスクには通常のイ
ベントを積むための運用キューと、タスク切替タイミン
グを知らせる切替要求メッセージ専用の待機キューが存
在する。CPU1において次の手順処理が行われる。 (1−1):、更新されたタスクマッピングテーブル3
を受信する。 (1−2):タスクを管理しているCPU1のエージェ
ントは、CPU1の切替対象タスクAに対して入ってく
るイベントが最後であることを知らせるENDイベント
を運用キューに積む。 (1−3):切替対象タスクAへのその他のイベントは
タスクマッピングテーブル3が更新されている(1−
1)為、以降はCPU2の運用キューに積まれる。すな
わち、他CPUからの受信イベントはエージェントにて
回送される。 (1−4):CPU1は運用キューに積まれているイベ
ントを処理しENDイベントを検出後、切替先である自
タスク(切替先のCPU2)に対してタスク切替を知ら
せる切替要求イベントをエージェントに対して送信す
る。なお、切替要求イベントには管理情報(全テーブ
ル)を付与する。 (1−5):切替対象タスクAは待機キューにより待ち
合わせを開始し、運用キューでの待ち合わせを中止す
る。CPU2においては、次に手順処理が行われる。 (2−1):更新されたタスクマッピングテーブル3を
受信する。 (2−2):イベントメッセージを受信すると、CPU
2のエージェントは運用キューにイベントを積む。 (2−3):エージェントは、CPU1からの切替要求
イベントを待機キューに積む。 (2−4):切替先タスクは切替要求イベント実行を契
機に、運用キューに積まれたメッセージを処理する。
In FIG. 9, the task switching source is the CPU 1,
The task switching destination is CPU2. Each task has an operation queue for accumulating normal events and a standby queue dedicated to a switching request message that notifies the task switching timing. The CPU 1 performs the following procedure. (1-1) :, updated task mapping table 3
To receive. (1-2): The agent of the CPU 1 that manages the task puts the END event informing the switching target task A of the CPU 1 that the incoming event is the last in the operation queue. (1-3): For other events to the switching target task A, the task mapping table 3 is updated (1-
Therefore, after that, the data is accumulated in the operation queue of the CPU 2. That is, a reception event from another CPU is forwarded by the agent. (1-4): The CPU 1 processes the event accumulated in the operation queue, detects the END event, and then notifies the agent of a switching request event for notifying the task itself (the switching destination CPU 2) of the switching destination of the task switching. To send. Note that management information (all tables) is attached to the switching request event. (1-5): The switching target task A starts waiting by the waiting queue and cancels waiting in the operation queue. In the CPU 2, the procedure process is next performed. (2-1): Receive the updated task mapping table 3. (2-2): When the event message is received, the CPU
The second agent accumulates the event in the operation queue. (2-3): The agent accumulates the switching request event from the CPU 1 in the standby queue. (2-4): The switching destination task processes the message accumulated in the operation queue upon execution of the switching request event.

【0077】上記の切替処理手順により、CPU1にお
いてタスクAがイベント1〜3を実行待ちの状態でCP
U2へマッピング変更がされた場合には、CPU1では
イベント3の次にENDイベントをエージェントが生成
する(図8B:P10)。
According to the above-mentioned switching processing procedure, the task A in the CPU 1 waits for execution of the events 1 to 3 in the CP state.
When the mapping is changed to U2, the agent generates the END event after the event 3 in the CPU 1 (FIG. 8B: P10).

【0078】CPU1ではENDイベント処理までイベ
ントを実行をするため、イベント1〜3はCPU1で実
行される(図8B:P11)。
Since the CPU 1 executes the events up to the END event process, the events 1 to 3 are executed by the CPU 1 (FIG. 8B: P11).

【0079】ENDイベントを認識したCPU1のエー
ジェントは切替要求イベントをCPU2のタスクA待機
キューへ送信する。CPU2では切替要求イベント受信
までは、タスクAへのイベントは運用キューにキューイ
ングされるが処理はされない(図8B:P12)。
The agent of the CPU 1 which has recognized the END event sends a switching request event to the task A waiting queue of the CPU 2. Until the switching request event is received, the CPU 2 queues the event to the task A in the operation queue but does not process it (FIG. 8B: P12).

【0080】CPU1でENDイベント処理後に切替要
求イベントをCPU2に送信する(図8C:P13)。
After the END event is processed by the CPU1, a switching request event is transmitted to the CPU2 (FIG. 8C: P13).

【0081】ついで、CPU1、CPU2で切替要求イ
ベントに処理後、イベント4〜5を実行する(図8
D)。 [CPU障害時の復旧]次に、図10においてCPU障
害時の復旧方法について説明する。あるCPU3が故障
した場合、その故障CPU3へメッセージ送信(図1
0:S20)を行ったCPU1のエージェントは、送信
失敗によりCPU間通信NGを検出しCPU障害と判断
する(図10:S21)。
Next, after processing the switching request event in the CPU1 and CPU2, the events 4 to 5 are executed (FIG. 8).
D). [Recovery in case of CPU failure] Next, a recovery method in case of CPU failure will be described with reference to FIG. When a certain CPU3 fails, a message is sent to the failed CPU3 (see FIG. 1).
0: S20), the agent of the CPU 1 detects the communication failure between the CPUs due to the transmission failure, and determines that the CPU has a failure (FIG. 10: S21).

【0082】CPU障害を検出したCPU1のエージェ
ントは、タスクマッピングテーブル3を参照して負荷の
低いCPUに対して障害CPUのタスク情報の引継ぎを
要請すると共に、他のCPUにマッピングテーブルの変
更を通知する(図10:S22)。
Upon detecting the CPU failure, the agent of the CPU 1 refers to the task mapping table 3 and requests the CPU having a low load to take over the task information of the failed CPU, and notifies other CPUs of the change of the mapping table. (FIG. 10: S22).

【0083】引継ぎを要請されたCPUのエージェント
では、ローカルデータの引継ぎを行わなくてはならない
が、障害CPUからは通常の情報切替手順は実施できな
い。
The agent of the CPU requested to take over must take over the local data, but the normal information switching procedure cannot be executed from the faulty CPU.

【0084】この為に、図11に示すローカルメモリ書
換イメージによりCPU間のバス接続を実施して、障害
CPUのローカルメモリを自CPUにマッピングする。
Therefore, the CPU is bus-connected by the local memory rewriting image shown in FIG. 11 to map the local memory of the faulty CPU to the own CPU.

【0085】すなわち、図11において、各CPUはメ
モリ内に、自CPU用のメモリアクセス領域Iと他CP
U用メモリアクセス領域IIを有する。他CPU用のメモ
リアクセス領域IIは、通常は何も接続されていないが、
障害時は、異なるCPU間で自CPU用のメモリアクセ
ス領域Iと他CPU用のメモリアクセス領域IIとは、ハ
ード的にバス接続され(図10,図11:)、他CP
U用のメモリアクセス領域IIの内容を自CPU用、メモ
リアクセス領域Iにデータをコピーする(図10,図1
1:)。
That is, in FIG. 11, each CPU has a memory access area I for its own CPU and another CP in the memory.
It has a U memory access area II. Normally, nothing is connected to the memory access area II for the other CPU,
In the event of a failure, the memory access area I for the own CPU and the memory access area II for the other CPU are connected to each other by different buses by hardware (FIGS. 10 and 11 :), and the other CPs are connected.
The contents of the memory access area II for U are copied to the memory access area I for its own CPU (see FIGS. 10 and 1).
1 :).

【0086】この様に、マッピングされたローカルメモ
リより必要な情報(マッピングされたタスクに割り当て
られた領域II)を自CPU用メモリアクセス領域Iに展
開する。メモリの展開が完了すると通常の動作となる
(図10:S23)。
In this way, the necessary information (area II assigned to the mapped task) is expanded from the mapped local memory to the own CPU memory access area I. When the expansion of the memory is completed, the normal operation is performed (FIG. 10: S23).

【0087】この間、他のCPUではタスクマッピング
テーブル更新通知が送られている(図10:S22)
為、既に新マッピングが有効となっており引継ぎタスク
へのメッセージ通知が送信されることが考えられる。
During this time, the task mapping table update notification is sent to the other CPU (FIG. 10: S22).
Therefore, it is conceivable that the new mapping is already valid and a message notification is sent to the takeover task.

【0088】これについてはメモリ展開が完了するまで
は受信エージェントにてキューイングすることで対応す
る(図10:S24)。
This is dealt with by queuing at the receiving agent until the memory expansion is completed (FIG. 10: S24).

【0089】これにより、CPUに障害が発生した場合
バス切替を行ってローカルメモリ情報を引き継ぎ、タス
ク切替を行うことが可能となる。 [CPU障害時のタスク引継シーケンス]次に、図12
においてN+1構成を用いることなくCPU障害時に他
CPUに処理を引き継がせるシーケンス図を示す。
As a result, when a failure occurs in the CPU, it is possible to perform bus switching, inherit local memory information, and perform task switching. [Task takeover sequence at CPU failure] Next, referring to FIG.
2 is a sequence diagram in which a process is handed over to another CPU in the event of a CPU failure without using the N + 1 configuration.

【0090】ここで、CPUの障害の発生に備えて、障
害が発生したCPU2の処理を引き継いでもCPU使用
率が100%を超えないように、使用率の低いCPUを
1つ配置する。
Here, in preparation for the occurrence of a CPU failure, one CPU with a low usage rate is arranged so that the CPU usage rate does not exceed 100% even if the processing of the failed CPU 2 is taken over.

【0091】図12において、図3に示すタスク再配置
シーケンスに基づきS7までの処理により各CPUの使
用率が求められる。処理工程P4において、各CPU
で、マッピングテーブル3を基にタスク再配置を実施す
る。
In FIG. 12, the usage rate of each CPU is obtained by the processing up to S7 based on the task rearrangement sequence shown in FIG. Each CPU in the processing step P4
Then, the task relocation is performed based on the mapping table 3.

【0092】このタスク再配置において、CPU1及び
CPU23の使用率が図13に示すようにそれぞれ65
%、62%であり、使用率の低いCPUとして配置され
るCPU3の使用率を例えば、8%であるとする。
In this task relocation, the usage rates of the CPU 1 and the CPU 23 are 65 as shown in FIG.
%, 62%, and the usage rate of the CPU 3 arranged as a CPU with a low usage rate is, for example, 8%.

【0093】ホストCPUであるCPU1がCPU2の
障害を検知すると、マッピングテーブル3を参照して使
用率の低いCPU3を検索する(処理工程P5)。つい
で、検索されたCPU3に対し、CPU障害時の復旧手
順を実施する(処理工程P6)。
When the CPU 1, which is the host CPU, detects a failure of the CPU 2, it refers to the mapping table 3 to search for a CPU 3 having a low usage rate (processing step P5). Then, a recovery procedure for a CPU failure is executed for the retrieved CPU 3 (processing step P6).

【0094】エージェントはCPU2の障害を検出する
と、先に示した手順で、タスクマッピングテーブル3を
参照して稼動率の低いCPU3を検索し、図13に示す
ように、障害が発生しているCPU2内で動作している
全てのタスク情報の引継ぎを行う。この時のCPU3の
使用率は70%であり、100%を越えない範囲で引継
が行われる。
When the agent detects a failure of the CPU 2, the agent searches the CPU 3 having a low operation rate by referring to the task mapping table 3 according to the procedure described above, and as shown in FIG. Inherit all task information that is running within. The usage rate of the CPU 3 at this time is 70%, and the CPU 3 is handed over within a range not exceeding 100%.

【0095】従って、N+1構成を採らなくても、使用
率の低いCPU3を配置させるタスク構成とすること
で、CPU障害発生時の復旧先CPUを確保しつつ稼動
していないCPUを存在させないことが可能となる。
Therefore, even if the N + 1 configuration is not adopted, it is possible to secure the recovery destination CPU when a CPU failure occurs and not allow the non-operating CPU to exist by providing the task configuration in which the CPU 3 having a low utilization rate is arranged. It will be possible.

【0096】復旧先CPUとして、稼動率が低いながら
も動作させているCPU3に対して処理を引き継がせる
ことで、動作保証されるCPU2に対して処理を引き継
がせることが可能となる。
As the recovery destination CPU, the processing can be handed over to the CPU 2 whose operation is guaranteed by handing over the processing to the CPU 3 which is operating even though the operating rate is low.

【0097】さらに、本発明のマルチプロセッサシステ
ムでは、タスクを動的に配置し各CPUの使用率をほぼ
均一化することができる。また均一化を指示するホスト
CPUについても障害発生等を考慮し、動的に切り替え
ることが可能である。
Further, in the multiprocessor system of the present invention, the tasks can be dynamically arranged and the usage rates of the CPUs can be made substantially uniform. Further, it is possible to dynamically switch the host CPU that instructs the equalization in consideration of the occurrence of a failure or the like.

【0098】ここで、先に説明した図3に示すタスク再
配置シーケンスにおいて、ホストとして動作していたC
PU1で障害が発生した場合、CPU2に関するCPU
使用率報告周期タイマが先にタイムアウトすることにな
る(図3:S8)、この場合CPU2がホストCPUと
して動作する。この場合も同様に、手順S3〜S7を繰
り返す。 [メッセージ送信復旧方法]ここで、CPU間通信を使
用したメッセージ送信の場合、タスク再配置中のマッピ
ングテーブル更新タイミングのずれにより、タスクマッ
ピングテーブル3に各CPU間で不一致が発生すること
が考えられる。これに対処するためにタスクマピングテ
ーブル3に不一致が生じた場合のメッセージ送信復旧方
法を図14とタスクマッピングテーブル更新状況を示す
下記表3により説明する。
Here, in the task relocation sequence shown in FIG. 3 described above, C operating as the host
When a failure occurs in PU1, CPU related to CPU2
The usage rate reporting period timer will time out first (FIG. 3: S8), in which case the CPU 2 operates as a host CPU. In this case as well, steps S3 to S7 are similarly repeated. [Message Transmission Restoration Method] Here, in the case of message transmission using inter-CPU communication, it is conceivable that a mismatch occurs between the CPUs in the task mapping table 3 due to a shift in the mapping table update timing during task relocation. . In order to deal with this, a message transmission recovery method when a mismatch occurs in the task mapping table 3 will be described with reference to FIG. 14 and the following table 3 showing the update status of the task mapping table.

【0099】[0099]

【表3】 図14において、CPU1のエージェント1は上記表3
(1)に示すエージェント1のタスクマッピングテーブ
ル3を参照してタスクBがCPU2で動作していると認
識し、CPU2へメッセージを送信する(図14:SS
10)。
[Table 3] In FIG. 14, the agent 1 of the CPU 1 is shown in Table 3 above.
By referring to the task mapping table 3 of the agent 1 shown in (1), the task B is recognized as operating in the CPU 2, and a message is transmitted to the CPU 2 (FIG. 14: SS
10).

【0100】メッセージを受信したCPU2のエージェ
ント2は、表3(2)を参照してタスクBはCPU1で
動作していると認識し、CPU1へメッセージを送信す
る(図14:SS11)。
Upon receiving the message, the agent 2 of the CPU 2 recognizes that the task B is operating in the CPU 1 by referring to Table 3 (2), and sends the message to the CPU 1 (FIG. 14: SS11).

【0101】CPU2のタスクマッピングテーブル3が
更新するまで、上記SS10,SS11の手順が繰り返
される。
The above steps SS10 and SS11 are repeated until the task mapping table 3 of the CPU 2 is updated.

【0102】次いで、正常にCPU2のタスクマッピン
グテーブル3が更新され、表3の(3)に示すようにな
る(図14:SS12)と、エージェント2はCPU2
で動作するタスクBへメッセージを転送する。
Then, when the task mapping table 3 of the CPU 2 is normally updated to be as shown in (3) of Table 3 (FIG. 14: SS12), the agent 2 makes the CPU 2
The message is transferred to the task B which operates in.

【0103】本発明のマルチプロセッサシステムではシ
ステムリセットではなく個別にCPUをリセットした場
合、タイマ値が異なっていても同時にタイムアウトする
可能性がある。
In the multiprocessor system of the present invention, when the CPUs are individually reset instead of the system reset, there is a possibility that they will time out simultaneously even if the timer values are different.

【0104】CPU1とCPU2で同時にタイムアウト
が発生し、CPU1、CPU2がそれぞれホストCPU
として動作した場合を例に復旧動作を図15に示す。 S01:CPU1の周期タイマタイムアウトとCPU2
の個別タイマタイムアウトが同時に発生すると、CPU
1、CPU2はそれぞれホストCPUとして動作を開始
する。CPU2はデフォルトマッピングで起動される
為、他CPUとタスクマッピングテーブルが異なる。 S02:CPU1は、他CPUに対してCPU使用率報
告要求を送信する。 S03、S04:CPU2はCPU1からCPU使用率
報告要求を受信すると、CPU1で周期タイムアウトが
発生したことを認識し、ホストCPUとしての動作を停
止するが、CPU1にCPU2で個別タイマタイムアウ
トが発生したことを通知する為、CPU使用率報告要求
を送信する。 S05:CPU使用率報告要求を受けたCPU2〜CP
Unは、それぞれの使用率をCPU1に報告する。 S06:CPU1は他CPUからCPU使用率報告を受
信すると、タスクマッピングテーブルの更新を行う。C
PU2からはCPU使用率0%で報告される。
A time-out occurs simultaneously in CPU1 and CPU2, and CPU1 and CPU2 are the host CPUs.
The recovery operation is shown in FIG. S01: Cycle timer timeout of CPU1 and CPU2
If the individual timer timeouts of
The CPU 1 and the CPU 2 respectively start operating as host CPUs. Since the CPU 2 is activated by default mapping, the task mapping table differs from that of other CPUs. S02: The CPU1 sends a CPU usage rate report request to another CPU. S03, S04: When the CPU2 receives the CPU usage rate report request from the CPU1, the CPU1 recognizes that the cycle timeout has occurred in the CPU1 and stops the operation as the host CPU, but the CPU1 has the individual timer timeout in the CPU2. A CPU usage rate report request is transmitted to notify. S05: CPU2 to CP that received the CPU usage rate report request
Un reports each usage rate to the CPU 1. S06: When the CPU1 receives the CPU usage rate report from another CPU, it updates the task mapping table. C
From PU2, the CPU usage rate is reported as 0%.

【0105】S07:CPU1からタスクマッピングテ
ーブル更新メッセージを他CPUへ送信する。 S08:受信したタスクマッピングテーブル更新メッセ
ージに基づいて、各CPUはタスクマッピングテーブル
を更新する。ついで、周期タイマを開始する。
S07: The CPU1 sends a task mapping table update message to another CPU. S08: Each CPU updates the task mapping table based on the received task mapping table update message. Then, the period timer is started.

【0106】[タスク走行時間の算出方法]上記エージ
ェント内の「タスク走行時間管理部」の管理テーブル
で管理される自CPU内の各タスク走行時間の算出方法
について、図16により説明する。図16Aはタスク毎
の切替時の処理を説明し、図16Bは計算されたタスク
毎のタスク走行時間を登録するタスク走行管テーブルの
例である。
[Calculation method of task running time] A method of calculating each task running time in the own CPU managed by the management table of the "task running time management unit" in the above agent will be described with reference to FIG. FIG. 16A explains the processing at the time of switching for each task, and FIG. 16B is an example of the task running tube table in which the calculated task running time for each task is registered.

【0107】図16Aに示すように、タスク切替のタイ
ミングで基準クロックから絶対(現在)時刻を読み出
す。各タスク毎の走行時間テーブルに各タスクの動作時
間を加算する。なお、ハンドラの走行時間はハンドラ処
理前の動作タスクの走行時間として加算されるが、誤差
とする。
As shown in FIG. 16A, the absolute (current) time is read from the reference clock at the task switching timing. The operation time of each task is added to the running time table for each task. The running time of the handler is added as the running time of the operating task before the handler processing, but it is an error.

【0108】CPU使用率報告要求を受信した各CPU
は、図16Bのタスク走行時間管理テーブルから自CP
Uで動作しているタスクの走行時間をホストCPUに対
して報告する。ここで、共通関数は、動作タスクを特定
できずタスク走行時間を算出する場合に問題となる。こ
の場合は、外部提供共通関数が属する機能ブロックFB
の属するタスクの走行時間とする。
Each CPU that has received the CPU utilization report request
From the task travel time management table of FIG.
Report the running time of the task running in U to the host CPU. Here, the common function poses a problem when the task task cannot be specified and the task travel time is calculated. In this case, the functional block FB to which the externally provided common function belongs
Is the running time of the task to which

【0109】(付記1)複数のCPUにより複数のタス
クを実行するマルチプロセッサシステムにおいて、前記
複数のCPUのそれぞれに共通に、前記複数のCPUに
対する、前記複数のタスクの配置状態を示すタスクマッ
ピングテーブルと、固有のタイマー値を有するタイマー
を備え、先にタイムアウトした前記タイマーの属するC
PUをホストCPUとし、前記タスクマッピングテーブ
ルに設定されたタスクの配置状態と、他のCPUにおけ
る使用率に基づき、前記ホストCPUにより、前記複数
のCPUに対するタスクの再配置を行うことを繰り返す
様に構成されたことを特徴とするマルチプロセッサシス
テム。
(Supplementary Note 1) In a multiprocessor system for executing a plurality of tasks by a plurality of CPUs, a task mapping table indicating the arrangement state of the plurality of tasks with respect to the plurality of CPUs, which is common to the plurality of CPUs. And a timer having a unique timer value, and the C to which the timer that has timed out previously belongs
Using the PU as a host CPU, the host CPU repeats the relocation of tasks to the plurality of CPUs based on the task allocation state set in the task mapping table and the usage rate of other CPUs. A multiprocessor system characterized by being configured.

【0110】(付記2)付記1において、前記他のCP
Uにおける使用率は、前記ホストとなるCPUから他の
CPUへの問い合わせにより得られることを特徴とする
マルチプロセッサシステム。
(Supplementary Note 2) In Supplementary Note 1, the CP other than the above
The usage rate in U is obtained by an inquiry from the CPU as the host to another CPU.

【0111】(付記3)付記1において、さらに、前記
複数のCPUのそれぞれは、タスク名と関数名が設定さ
れた外部提供関数リストを有し、前記タスクマッピング
テーブルと前記外部提供関数リストに基づき、共有メモ
リにアクセスする外部提供関数のオブジェクトがいずれ
のCPUに存在するかを判断し、前記オブジェクトが他
のCPUに存在する時、CPU間通信により前記他のC
PUに関数コールを送ることを特徴とするマルチプロセ
ッサシステム。
(Supplementary Note 3) In Supplementary Note 1, further, each of the plurality of CPUs has an externally provided function list in which a task name and a function name are set, and based on the task mapping table and the externally provided function list. , Determining which CPU the object of the externally provided function that accesses the shared memory exists, and when the object exists in another CPU, the other C
A multiprocessor system characterized by sending a function call to a PU.

【0112】(付記4)付記1において、更に、前記複
数のCPUのそれぞれは、切替元タスク及び切替先タス
クに運用キューと待機キューを備え、タスク切替イベン
トが発生した際、前記切替元タスクの前記運用キューに
ある処理すべきイベントの後に終了(END)イベント
を設定し、前記切替先タスクの運用キューに継続するイ
ベントを設定し、前記終了(END)イベント処理後に
前記切替先タスクの待機キューに切替要求メッセージを
送ることにより、タスク切替時の追い越し制御を行うこ
とを特徴とするマルチプロセッサシステム。
(Supplementary Note 4) In Supplementary Note 1, further, each of the plurality of CPUs has an operation queue and a standby queue in the switching source task and the switching destination task, and when a task switching event occurs, the switching source task An end (END) event is set after the event to be processed in the operation queue, an event to be continued is set in the operation queue of the switching destination task, and a waiting queue of the switching destination task is set after the end (END) event is processed. A multiprocessor system characterized by performing overtaking control at the time of task switching by sending a switching request message to.

【0113】(付記5)付記1において、前記複数のC
PUののそれぞれは、ローカルメモリに、自CPU用メ
モリアクセス領域と、他CPU用メモリアクセス領域を
設け、一のCPUに障害が生じたとき、前記一のCPU
の自CPU用メモリアクセス領域と前記切替先CPUの
他CPU用メモリアクセス領域をバス切替により接続
し、前記ローカルメモリの情報を引き継ぐ様に構成され
ていることを特徴とするマルチプロセッサシステム。
(Supplementary Note 5) In Supplementary Note 1, the plurality of C
Each of the PUs has a memory access area for its own CPU and a memory access area for another CPU in the local memory, and when one CPU fails, the one CPU
The multiprocessor system is configured so that the memory access area for its own CPU and the memory access area for other CPUs of the switching destination CPU are connected by bus switching to take over the information of the local memory.

【0114】(付記6)付記1において、前記複数のC
PUに少なくとも一のCPUの使用率を他のCPUに対
して低く設定しておき、前記他のCPUのいずれかが障
害の時に、前記一のCPUを復旧先CPUとすることを
特徴とするマルチプロセッサシステム。
(Supplementary Note 6) In Supplementary Note 1, the plurality of C
The PU is set to have a low usage rate of at least one CPU with respect to other CPUs, and when one of the other CPUs fails, the one CPU is set as a recovery destination CPU. Processor system.

【0115】(付記7)付記1において、前記他のCP
Uにおける使用率は、前記ホストとなるCPUから他の
CPUへの問い合わせにより得られることを特徴とする
マルチプロセッサシステム。
(Supplementary Note 7) In Supplementary Note 1, the other CP
The usage rate in U is obtained by an inquiry from the CPU as the host to another CPU.

【0116】[0116]

【発明の効果】図面に従い、実施の形態例を説明したよ
うに本発明によれば従来のマルチプロセッサシステムに
比べて、ソフトウエア構成が容易で処理のオーバヘッド
を軽減させることができる。加えて、機能分散・負荷分
散・障害復旧に優れているマルチプロセッサ通信が実現
できるので、開発期間の短縮、機能追加が容易であり、
バグの削減に寄与するところが大きい。
As described above with reference to the drawings, according to the present invention, the software configuration is easy and the processing overhead can be reduced as compared with the conventional multiprocessor system. In addition, multiprocessor communication with excellent function distribution, load distribution, and failure recovery can be realized, which shortens the development period and makes it easy to add functions.
It greatly contributes to the reduction of bugs.

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

【図1】本発明を適用するマルチプロセッサシステムの
構成例を示す図である。
FIG. 1 is a diagram showing a configuration example of a multiprocessor system to which the present invention is applied.

【図2】図1に示すマルチプロセッサシステムの一つの
CPUの構成例を示す図である。
FIG. 2 is a diagram showing a configuration example of one CPU of the multiprocessor system shown in FIG.

【図3】本発明に従うタスク再配置の実施例を示す図で
ある。
FIG. 3 is a diagram showing an example of task relocation according to the present invention.

【図4】CPU使用率均一化のイメージを示す図であ
る。
FIG. 4 is a diagram showing an image of equalizing CPU usage rates.

【図5】メッセージ送信のスケジューリングの概要を示
す図である。
FIG. 5 is a diagram showing an outline of message transmission scheduling.

【図6】プロセッサ間での外部提供関数コールを行う実
施の形態例を示す図である。
FIG. 6 is a diagram showing an example of an embodiment in which an externally provided function call is made between processors.

【図7】共有メモリにアクセスする外部提供関数のスケ
ジューリング方法の詳細を示す図である。
FIG. 7 is a diagram showing details of a method of scheduling an externally provided function for accessing a shared memory.

【図8】追い越し制御イメージを示す図である。FIG. 8 is a diagram showing an overtaking control image.

【図9】CPU間でタスク切替が発生した場合の追い越
し制御の手順を図8と関連して示す図である。
9 is a diagram showing a procedure of overtaking control when task switching occurs between CPUs in association with FIG. 8. FIG.

【図10】CPU障害時の復旧方法について説明する図
である。
FIG. 10 is a diagram illustrating a recovery method when a CPU failure occurs.

【図11】ローカルメモリ書換イメージを示す図であ
る。
FIG. 11 is a diagram showing a local memory rewriting image.

【図12】N+1構成を用いることなくCPU障害時に
他CPUに処理を引き継がせるシーケンスを示す図であ
る。
FIG. 12 is a diagram showing a sequence in which processing is handed over to another CPU when a CPU fails without using the N + 1 configuration.

【図13】タスク再配置において、CPU1及びCPU
23の使用率が図13に示す図である。
FIG. 13 shows CPU1 and CPU in task relocation.
It is a figure in which the usage rate of 23 is shown in FIG.

【図14】メッセージ送信復旧方法を説明する図であ
る。
FIG. 14 is a diagram illustrating a message transmission restoration method.

【図15】CPU1とCPU2で同時にタイムアウトが
発生し、それぞれホストCPUとして動作した場合を例
に復旧動作を示す図である。
FIG. 15 is a diagram showing a recovery operation in the case where a timeout occurs at the same time in the CPU1 and the CPU2, and each of them operates as a host CPU.

【図16】タスク走行時間の算出方法を説明する図であ
る。
FIG. 16 is a diagram illustrating a method of calculating task travel time.

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

1 エージェント 2 関数リストテーブル 3 タスクマッピングテーブル 4 複数のタスク 1 agent 2 Function list table 3 task mapping table 4 multiple tasks

───────────────────────────────────────────────────── フロントページの続き (72)発明者 樋口 晃治 福岡県福岡市早良区百道浜2丁目2番1号 富士通西日本コミュニケーション・シス テムズ株式会社内 (72)発明者 若目田 宏 福岡県福岡市早良区百道浜2丁目2番1号 富士通西日本コミュニケーション・シス テムズ株式会社内 (72)発明者 古谷 丈二 福岡県福岡市早良区百道浜2丁目2番1号 富士通西日本コミュニケーション・シス テムズ株式会社内 Fターム(参考) 5B045 BB28 BB32 DD05 EE25 EE29 GG04 JJ13 JJ26 JJ44 5B098 AA10 GA04 GB14 GC08 GD02 GD14    ─────────────────────────────────────────────────── ─── Continued front page    (72) Inventor Koji Higuchi             2-2-1 Hyakudohama, Sawara-ku, Fukuoka, Fukuoka               Fujitsu West Japan Communication System             Thames Co., Ltd. (72) Inventor Hiroshi Wakameda             2-2-1 Hyakudohama, Sawara-ku, Fukuoka, Fukuoka               Fujitsu West Japan Communication System             Thames Co., Ltd. (72) Inventor, Joji Furuya             2-2-1 Hyakudohama, Sawara-ku, Fukuoka, Fukuoka               Fujitsu West Japan Communication System             Thames Co., Ltd. F-term (reference) 5B045 BB28 BB32 DD05 EE25 EE29                       GG04 JJ13 JJ26 JJ44                 5B098 AA10 GA04 GB14 GC08 GD02                       GD14

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】複数のCPUにより複数のタスクを実行す
るマルチプロセッサシステムにおいて、 前記複数のCPUのそれぞれに共通に、 前記複数のCPUに対する、前記複数のタスクの配置状
態を示すタスクマッピングテーブルと、 前記タスクマッピングテーブルに設定されたタスクの配
置状態に基づき、前記複数のCPUに対するタスクの再
配置を行うホストCPUを前記複数のCPUの間で切り
替える手段を備えたことを特徴とするマルチプロセッサ
システム。
1. In a multiprocessor system for executing a plurality of tasks by a plurality of CPUs, a task mapping table indicating the arrangement state of the plurality of tasks with respect to the plurality of CPUs, which is common to the plurality of CPUs. A multiprocessor system comprising means for switching between the plurality of CPUs a host CPU that performs task rearrangement for the plurality of CPUs based on the arrangement state of the tasks set in the task mapping table.
【請求項2】複数のCPUにより複数のタスクを実行す
るマルチプロセッサシステムにおいて、 前記複数のCPUのそれぞれのタスク配置状態を示すテ
ーブルと、 前記テーブルに設定されたタスクの配置状態と、各CP
Uにおける使用率に基づき、前記複数のCPUに対する
タスクの再配置を行う手段を有することを特徴とするマ
ルチプロセッサシステム。
2. In a multiprocessor system for executing a plurality of tasks by a plurality of CPUs, a table showing a task allocation state of each of the plurality of CPUs, a task allocation state set in the table, and each CP.
A multiprocessor system having means for rearranging tasks to the plurality of CPUs based on a usage rate in U.
【請求項3】請求項1において、 さらに、前記複数のCPUのそれぞれは、タスク名と関
数名が設定された外部提供関数リストを有し、 前記タスクマッピングテーブルと前記外部提供関数リス
トに基づき、共有メモリにアクセスする外部提供関数の
オブジェクトがいずれのCPUに存在するかを判断し、 前記オブジェクトが他のCPUに存在する時、CPU間
通信により前記他のCPUに関数コールを送ることを特
徴とするマルチプロセッサシステム。
3. The CPU according to claim 1, further comprising: an externally provided function list in which a task name and a function name are set, and based on the task mapping table and the externally provided function list, It is determined which CPU has an object of an externally provided function that accesses the shared memory, and when the object exists in another CPU, a function call is sent to the other CPU by inter-CPU communication. Multiprocessor system to do.
【請求項4】請求項1において、 更に、前記複数のCPUのそれぞれは、切替元タスク及
び切替先タスクに運用キューと待機キューを備え、 タスク切替イベントが発生した際、前記切替元タスクの
前記運用キューにある処理すべきイベントの後に終了
(END)イベントを設定し、前記切替先タスクの運用
キューに継続するイベントを設定し、 前記終了(END)イベント処理後に前記切替先タスク
の待機キューに切替要求メッセージを送ることにより、
タスク切替時の追い越し制御を行うことを特徴とするマ
ルチプロセッサシステム。
4. The switching CPU according to claim 1, wherein each of the plurality of CPUs has an operation queue and a standby queue in a switching source task and a switching destination task, and when a task switching event occurs, the switching source task An end (END) event is set after the event to be processed in the operation queue, an event to be continued is set in the operation queue of the switching destination task, and a waiting queue of the switching destination task is set after the end (END) event is processed. By sending a switch request message,
A multiprocessor system characterized by performing overtaking control when switching tasks.
【請求項5】請求項1において、 前記複数のCPUののそれぞれは、ローカルメモリに、
自CPU用メモリアクセス領域と、他CPU用メモリア
クセス領域を設け、 一のCPUに障害が生じたとき、前記一のCPUの自C
PU用メモリアクセス領域と前記切替先CPUの他CP
U用メモリアクセス領域をバス切替により接続し、前記
ローカルメモリの情報を引き継ぐ様に構成されているこ
とを特徴とするマルチプロセッサシステム。
5. The CPU according to claim 1, wherein each of the plurality of CPUs has a local memory,
A memory access area for its own CPU and a memory access area for another CPU are provided. When a failure occurs in one CPU, its own C
PU memory access area and other CP of the switching destination CPU
A multiprocessor system characterized in that the memory access areas for U are connected by bus switching and the information in the local memory is taken over.
JP2002075424A 2002-03-19 2002-03-19 Multiprocessor system Pending JP2003271404A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002075424A JP2003271404A (en) 2002-03-19 2002-03-19 Multiprocessor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002075424A JP2003271404A (en) 2002-03-19 2002-03-19 Multiprocessor system

Publications (1)

Publication Number Publication Date
JP2003271404A true JP2003271404A (en) 2003-09-26

Family

ID=29204506

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002075424A Pending JP2003271404A (en) 2002-03-19 2002-03-19 Multiprocessor system

Country Status (1)

Country Link
JP (1) JP2003271404A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008234323A (en) * 2007-03-20 2008-10-02 Hitachi Ltd System resource control device and control method
CN100437496C (en) * 2003-12-16 2008-11-26 苹果公司 Almost-symmetric multiprocessor that supports high-performance and energy-efficient execution
JP2010086137A (en) * 2008-09-30 2010-04-15 Fujitsu Ltd Message queuing method and program
WO2011114496A1 (en) * 2010-03-18 2011-09-22 富士通株式会社 Multi-core processor system, arbitration circuit control method, and arbitration circuit control program
JP2014501054A (en) * 2010-10-14 2014-01-16 アルカテル−ルーセント Core abstraction layer for telecommunications network applications
KR101366075B1 (en) 2007-12-20 2014-02-21 삼성전자주식회사 Method and apparatus for migrating task in multicore platform
JP2014139851A (en) * 2014-05-08 2014-07-31 Fujitsu Ltd Multi-core processor system, control method of multi-core processor system and control program of multi-core processor system
WO2016046950A1 (en) * 2014-09-26 2016-03-31 株式会社日立製作所 Computer system
CN106610869A (en) * 2015-10-23 2017-05-03 大唐移动通信设备有限公司 Process management method and process management device

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100437496C (en) * 2003-12-16 2008-11-26 苹果公司 Almost-symmetric multiprocessor that supports high-performance and energy-efficient execution
JP2008234323A (en) * 2007-03-20 2008-10-02 Hitachi Ltd System resource control device and control method
KR101366075B1 (en) 2007-12-20 2014-02-21 삼성전자주식회사 Method and apparatus for migrating task in multicore platform
US9135060B2 (en) 2007-12-20 2015-09-15 Samsung Electronics Co., Ltd. Method and apparatus for migrating task in multicore platform
JP2010086137A (en) * 2008-09-30 2010-04-15 Fujitsu Ltd Message queuing method and program
WO2011114496A1 (en) * 2010-03-18 2011-09-22 富士通株式会社 Multi-core processor system, arbitration circuit control method, and arbitration circuit control program
JP5541355B2 (en) * 2010-03-18 2014-07-09 富士通株式会社 Multi-core processor system, arbitration circuit control method, control method, and arbitration circuit control program
US9110733B2 (en) 2010-03-18 2015-08-18 Fujitsu Limited Multi-core processor system, arbiter circuit control method, and computer product
JP2014501054A (en) * 2010-10-14 2014-01-16 アルカテル−ルーセント Core abstraction layer for telecommunications network applications
JP2014139851A (en) * 2014-05-08 2014-07-31 Fujitsu Ltd Multi-core processor system, control method of multi-core processor system and control program of multi-core processor system
WO2016046950A1 (en) * 2014-09-26 2016-03-31 株式会社日立製作所 Computer system
CN106610869A (en) * 2015-10-23 2017-05-03 大唐移动通信设备有限公司 Process management method and process management device

Similar Documents

Publication Publication Date Title
US11755435B2 (en) Cluster availability management
FI101432B (en) Fault-tolerant computer system
US5784617A (en) Resource-capability-based method and system for handling service processor requests
US6715016B1 (en) Multiple operating system control method
US9208029B2 (en) Computer system to switch logical group of virtual computers
US9229789B2 (en) Transparent user mode scheduling on traditional threading systems
US5442785A (en) Method and apparatus for passing messages between application programs on host processors coupled to a record lock processor
EP0747832A2 (en) Customer information control system and method in a loosely coupled parallel processing environment
US11640314B2 (en) Service provision system, resource allocation method, and resource allocation program
JP2009265963A (en) Information processing system and task execution control method
JP2001331333A (en) Computer system and method for controlling computer system
JP2000242512A (en) Computer executing plural operating systems
US8141084B2 (en) Managing preemption in a parallel computing system
EP1162536A1 (en) Multiple operating system control method
US20120304184A1 (en) Multi-core processor system, computer product, and control method
US20040015979A1 (en) System and method for efficiently exchanging data among processes
JP4854710B2 (en) Virtual computer system and network device sharing method
US5790868A (en) Customer information control system and method with transaction serialization control functions in a loosely coupled parallel processing environment
JP2009265687A (en) Information processor, information processing method, and computer program
JP2003271404A (en) Multiprocessor system
EP0747812A2 (en) Customer information control system and method with API start and cancel transaction functions in a loosely coupled parallel processing environment
JP2001282558A (en) Multi-operating computer system
US9015717B2 (en) Method for processing tasks in parallel and selecting a network for communication
WO2018188958A1 (en) A method and a host for managing events in a network that adopts event-driven programming framework
JPH04291660A (en) Inter-processor communication method and its parallel processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050201

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070213

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070220

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20070703