JP2001155001A - Method and device for controlling multiprocessor task - Google Patents

Method and device for controlling multiprocessor task

Info

Publication number
JP2001155001A
JP2001155001A JP34115199A JP34115199A JP2001155001A JP 2001155001 A JP2001155001 A JP 2001155001A JP 34115199 A JP34115199 A JP 34115199A JP 34115199 A JP34115199 A JP 34115199A JP 2001155001 A JP2001155001 A JP 2001155001A
Authority
JP
Japan
Prior art keywords
task
processor
dispatch
processors
data transfer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP34115199A
Other languages
Japanese (ja)
Other versions
JP3576437B2 (en
Inventor
Kenjiro Morihisa
謙二郎 森久
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP34115199A priority Critical patent/JP3576437B2/en
Publication of JP2001155001A publication Critical patent/JP2001155001A/en
Application granted granted Critical
Publication of JP3576437B2 publication Critical patent/JP3576437B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To prevent the competition of buses between processors even when each of processors accesses a kernel and the task information of an execution task. SOLUTION: The bus configuration of a system is made into two stages of a local bus 15 and a global bus 16, two kinds of memories of private memory 11 accessible only for a present processor and a shared memory 12 commonly accessible even from the other processors are loaded on the local bus 15 of each of processors 1-3, a kernel part is loaded in the private memory 11 and a task information part is loaded in the shared memory 12. Thus, even when each of processors 1-3 accesses the kernel and the task information of the execution task, the competition of buses between processors can be prevented. Further, by performing task scheduling while referring to a data transfer time table, the data transfer time of task information between processors can be shortened.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、複数のプロセッサ
を有するマルチプロセッサシステム上で、複数のタスク
から成る1つのアプリケーションプログラム(以後アプ
リケーションと記述する)を実行させるマルチプロセッ
サタスク制御方法及びタスク制御装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a multiprocessor task control method and a task control apparatus for executing one application program (hereinafter, referred to as an application) including a plurality of tasks on a multiprocessor system having a plurality of processors. About.

【0002】[0002]

【従来の技術】従来、マルチプロセッサタスク制御方法
は、例えば特開平8―36553号公報に記載されたも
のが知られている。これは複数のプロセッサと、各プロ
セッサから共通にアクセス可能な1つの共有メモリと、
各プロセッサと共有メモリを接続するシステムバスとか
ら構成されている。マルチタスク・オペレーティングシ
ステムは共有メモリ上に実装される。共有メモリ上のス
ケジューラは割り込み駆動でマルチプロセッサタスク制
御を行う。
2. Description of the Related Art Conventionally, a multiprocessor task control method disclosed in, for example, Japanese Patent Application Laid-Open No. 8-36553 is known. This includes multiple processors, one shared memory commonly accessible by each processor,
It is composed of each processor and a system bus connecting the shared memory. Multitasking operating systems are implemented on shared memory. The scheduler on the shared memory performs multiprocessor task control by interrupt driving.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、上記従
来のマルチプロセッサタスク制御方法においては、各プ
ロセッサがタスクを実行する際に必ず共有メモリにアク
セスしなければならず、システムバスの能力がシステム
全体の能力のボトルネックとなり、思ったほどスループ
ットが上がらないという問題がある。
However, in the above-described conventional multiprocessor task control method, each processor must always access a shared memory when executing a task. There is a bottleneck in capacity, and there is a problem that throughput does not increase as expected.

【0004】本発明はかかる点に鑑みてなされたもので
あり、各プロセッサがカーネル及び実行タスクのタスク
情報にアクセスする場合であっても、プロセッサ間でバ
ス競合が生ずることのないマルチプロセッサタスク制御
方法及びタスク制御装置を提供することを目的とする。
[0004] The present invention has been made in view of such a point, and even when each processor accesses task information of a kernel and an execution task, a multiprocessor task control that does not cause bus contention between processors. It is an object to provide a method and a task control device.

【0005】[0005]

【課題を解決するための手段】本発明のマルチプロセッ
サタスク制御方法は、複数のプロセッサ夫々のローカル
メモリに同一のマルチタスク・オペレーティングシステ
ムを実装してマルチプロセッサシステムを実現すると共
に、マルチタスク・オペレーティングシステムをカーネ
ル部分とタスク情報部分に分割し、前記カーネル部分を
自プロセッサのみがアクセス可能なプライベートメモリ
に実装し、前記タスク情報部分を他のプロセッサからも
共通にアクセス可能な共有メモリに実装するようにし
た。
A multiprocessor task control method according to the present invention realizes a multiprocessor system by mounting the same multitask operating system in local memories of a plurality of processors and realizes a multitask operating system. The system is divided into a kernel part and a task information part, the kernel part is mounted on a private memory accessible only by the own processor, and the task information part is mounted on a shared memory commonly accessible from other processors. I made it.

【0006】この方法によれば、各プロセッサがカーネ
ルにアクセスする場合であっても、プロセッサ間でバス
が競合することがないので、スループットを上げること
ができる。また、既存のマルチタスク・オペレーティン
グシステムを、タスク情報等プロセッサ間で共有する必
要のある情報だけを特定のメモリ(共有メモリ)に格納
するように変更するだけで、容易にマルチプロセッサシ
ステムを実現することができる。
According to this method, even when each processor accesses the kernel, there is no bus contention between the processors, so that the throughput can be increased. Further, a multiprocessor system can be easily realized simply by changing an existing multitask operating system so that only information that needs to be shared between processors, such as task information, is stored in a specific memory (shared memory). be able to.

【0007】また、本発明のマルチプロセッサタスク制
御方法は、上記マルチプロセッサタスク制御方法におい
て、プロセッサがタスクをディスパッチする際、ディス
パッチ対象タスクのタスク情報が異なるプロセッサの共
有メモリ上に保存されていれば、その共有メモリ上のタ
スク情報を自プロセッサの共有メモリ上にデータ転送す
るようにした。
In the multiprocessor task control method according to the present invention, in the above multiprocessor task control method, if the task information of the task to be dispatched is stored in a shared memory of a different processor when the processor dispatches the task. Then, the task information on the shared memory is transferred to the shared memory of the own processor.

【0008】この方法によれば、各プロセッサが実行中
のタスクのタスク情報にアクセスする場合であっても、
プロセッサ間でバスが競合することがないので、スルー
プットを上げることができる。
According to this method, even when each processor accesses the task information of the task being executed,
Since the bus does not compete between the processors, the throughput can be increased.

【0009】また、本発明のマルチプロセッサタスク制
御方法は、上記マルチプロセッサタスク制御方法におい
て、タスク情報が保存されているプロセッサを管理する
手段として、タスク情報部分に保存プロセッサ識別子を
格納するエリアを設ける。
Further, in the multiprocessor task control method according to the present invention, in the multiprocessor task control method, an area for storing a storage processor identifier is provided in a task information portion as means for managing a processor in which task information is stored. .

【0010】この方法によれば、タスク情報が保存され
ているプロセッサをタスク情報の1要素として一元管理
することができるので、管理が容易になる。
According to this method, the processor in which the task information is stored can be centrally managed as one element of the task information, so that the management becomes easy.

【0011】また、本発明のマルチプロセッサタスク制
御方法は、上記マルチプロセッサタスク制御方法におい
て、プロセッサ間のデータ転送時間を記述したデータ転
送時間テーブルを共有メモリ上にシステムで1つ管理
し、各プロセッサは前記データ転送時間テーブルを参照
してディスパッチ対象タスクを決定するようにした。
In the multiprocessor task control method according to the present invention, in the multiprocessor task control method, a system manages one data transfer time table describing data transfer time between processors in a shared memory, Refers to the data transfer time table to determine the dispatch target task.

【0012】この方法によれば、ディスパッチ時に発生
するタスク情報のデータ転送時間を小さく抑えることが
できるので、スループットを上げることができる。
[0012] According to this method, the data transfer time of task information generated at the time of dispatch can be reduced, so that the throughput can be increased.

【0013】また、本発明のマルチプロセッサタスク制
御方法は、システム起動時に全てのプロセッサのプライ
ベートメモリ上にアプリケーションプログラムをダウン
ロードし、マスタプロセッサはアプリケーションプログ
ラムのエントリタスクを起動し、残りの全てのプロセッ
サはアイドルタスクを起動してタスクが割り込まれるの
を待つようにした。
Also, in the multiprocessor task control method of the present invention, at the time of system startup, an application program is downloaded to the private memory of all processors, the master processor starts an entry task of the application program, and all the remaining processors execute Activate an idle task and wait for the task to be interrupted.

【0014】この方法によれば、各プロセッサがタスク
の実行コード(ソース)にアクセスする場合であって
も、プロセッサ間でバスが競合することがないので、ス
ループットを上げることができる。また、アプリケーシ
ョンプログラム開発者は、マルチプロセッサタスク制御
を全く意識する必要はなく、通常のコンパイラを使用し
てマルチタスクプログラミングを行えば良いので、プロ
グラミングが容易になる。
According to this method, even when each processor accesses the execution code (source) of the task, there is no bus contention between the processors, so that the throughput can be increased. Further, the application program developer does not need to be conscious of multiprocessor task control at all, and can perform multitask programming using a normal compiler, so that programming becomes easy.

【0015】また、本発明のマルチプロセッサタスク制
御方法は、システムコール発行時に、コンテクストの保
存及びシステムコール処理を行い、システムコール処理
により自タスクの状態が遷移した場合、タスク優先度と
タスク情報の保存されているプロセッサから自プロセッ
サへのデータ転送時間を考慮してディスパッチ対象タス
クを実行可能タスクの中から選択し、選択したディスパ
ッチ対象タスクが他のプロセッサに保存されているもの
であれば、自プロセッサにタスク情報をデータ転送した
後にディスパッチを行い、システムコール処理により他
タスクの状態が遷移した場合、実行状態のタスクより高
優先度の実行可能状態のタスクが存在するのであれば、
タスク優先度とデータ転送時間よりプリエンプト対象タ
スクとディスパッチ対象タスクの組み合わせを選択し、
選択したディスパッチ対象タスクが他のプロセッサに保
存されているものであれば、自プロセッサに当該タスク
情報をデータ転送した後にプリエンプト及びディスパッ
チを行い、コンテクストの復帰とシステムコールからの
復帰を行うようにした。
In the multiprocessor task control method of the present invention, when a system call is issued, a context is saved and a system call process is performed. The dispatch target task is selected from the executable tasks in consideration of the data transfer time from the stored processor to the own processor, and if the selected dispatch target task is stored in another processor, the dispatch target task is selected. When the task information is transferred to the processor, dispatching is performed, and the status of another task transits due to system call processing.If there is a task in the executable state with a higher priority than the task in the execution state,
Select a combination of preemption target task and dispatch target task from task priority and data transfer time,
If the selected task to be dispatched is stored in another processor, preemption and dispatching are performed after transferring the task information to its own processor, and context return and system call return are performed. .

【0016】この方法によれば、各プロセッサがカーネ
ル及びタスク情報にアクセスする場合であっても、プロ
セッサ間でバスが競合することがなく、またプロセッサ
間のタスク情報のデータ転送時間を小さく抑えることが
できるので、スループットを上げることができる。
According to this method, even when each processor accesses the kernel and the task information, there is no bus contention between the processors and the data transfer time of the task information between the processors is reduced. Therefore, the throughput can be increased.

【0017】また、本発明のマルチプロセッサタスク制
御方法は、上記マルチプロセッサタスク制御方法におい
て、ディスパッチ対象タスクの選択方法は、実行可能状
態のタスクのうち最高優先度のタスク全てに対して、当
該タスク情報の保存されているプロセッサとディスパッ
チ対象プロセッサとの間のデータ転送時間をデータ転送
時間テーブルより算出し、データ転送時間が最も小さい
タスクをディスパッチ対象タスクとして選択する。
Further, in the multiprocessor task control method of the present invention, in the above multiprocessor task control method, the method of selecting a dispatch target task is such that all tasks having the highest priority among the tasks in the executable state are assigned to the tasks having the highest priority. The data transfer time between the processor storing the information and the dispatch target processor is calculated from the data transfer time table, and the task with the shortest data transfer time is selected as the dispatch target task.

【0018】この方法によれば、タスク優先度制御を行
いつつ、同一優先度の場合はタスク情報のデータ転送時
間を小さく抑えることができるので、スループットを上
げることができる。これは、同一優先度のタスクが多数
存在するアプリケーションの場合に特に効果が大きい。
According to this method, the data transfer time of the task information can be reduced in the case of the same priority while performing the task priority control, so that the throughput can be increased. This is particularly effective for an application in which a number of tasks having the same priority exist.

【0019】また、本発明のマルチプロセッサタスク制
御方法は、上記マルチプロセッサタスク制御方法におい
て、プリエンプト対象タスクとディスパッチ対象タスク
の組み合わせ選択方法は、ある実行状態のタスク優先度
より高優先度の実行可能状態のタスクをディスパッチ候
補タスクとして選択し、ある実行可能状態のタスク優先
度より低優先度の実行状態のタスクをプリエンプト候補
タスクとして選択し、プリエンプト候補タスクとディス
パッチ候補タスクの全ての組み合わせに対してデータ転
送時間をデータ転送時間テーブルより算出し、データ転
送時間が小さくなるようにプリエンプト対象タスクとデ
ィスパッチ対象タスクのマッチングを決定する。
In the multiprocessor task control method according to the present invention, in the above multiprocessor task control method, the method for selecting a combination of a preemption target task and a dispatch target task can execute a task having a higher priority than a task priority in a certain execution state. The task in the state is selected as the dispatch candidate task, the task in the execution state having a lower priority than the task priority in a certain executable state is selected as the preemption candidate task, and all the combinations of the preemption candidate task and the dispatch candidate task are selected. The data transfer time is calculated from the data transfer time table, and the matching between the preemption target task and the dispatch target task is determined so that the data transfer time is reduced.

【0020】この方法によれば、タスク優先度制御を行
いつつ、プリエンプト候補タスクとディスパッチ候補タ
スク間で自由にマッチングを決定できるので、データ転
送時間を小さく抑えることができ、スループットを上げ
ることができる。これは、同時に複数のタスクにイベン
トを与える制御が多いアプリケーションの場合に特に効
果が大きい。
According to this method, the matching between the preemption candidate task and the dispatch candidate task can be freely determined while performing the task priority control, so that the data transfer time can be reduced and the throughput can be increased. . This is particularly effective for an application in which there are many controls for giving events to a plurality of tasks at the same time.

【0021】また、本発明のマルチプロセッサタスク制
御方法は、上記マルチプロセッサタスク制御方法におい
て、プリエンプト対象タスクとディスパッチ対象タスク
マッチングを決定する方法は、ディスパッチ候補タスク
の数の方が多い場合は、プリエンプト候補タスクに対す
るディスパッチ候補タスクのデータ転送時間を比較して
データ転送時間の最も小さい組み合わせをマッチング
し、プリエンプト候補タスクの数の方が多い場合は、逆
にディスパッチ候補タスクに対するプリエンプト候補タ
スクのデータ転送時間よりマッチングを行い、また、プ
リエンプト候補タスクとディスパッチ候補タスクの数が
異なる場合は、必ずマッチングされないタスクがプリエ
ンプト候補タスクの場合では最高優先度のタスクに、デ
ィスパッチ候補タスクの場合では最低優先度のタスクに
なる。
Further, in the multiprocessor task control method according to the present invention, in the above multiprocessor task control method, the method of determining the matching between the preemption target task and the dispatch target task is performed when the number of dispatch candidate tasks is larger. Compare the data transfer time of the dispatch candidate task to the candidate task and match the combination with the smallest data transfer time. If the number of preemption candidate tasks is larger, conversely, the data transfer time of the preemption candidate task to the dispatch candidate task If the number of preemption candidate tasks and the number of dispatch candidate tasks are different, if the unmatched task is a preemption candidate task, the task with the highest priority is assigned to the dispatch candidate task. The lowest priority of the task in the case of.

【0022】この方法によれば、プリエンプト対象タス
クとディスパッチ対象タスクのマッチングをタスク優先
度制御に矛盾することなく容易に決定することができ
る。
According to this method, the matching between the preemption target task and the dispatch target task can be easily determined without contradicting the task priority control.

【0023】また、本発明のマルチプロセッサタスク制
御方法は、上記マルチプロセッサタスク制御方法におい
て、ディスパッチ方法は、ディスパッチ対象タスクが自
プロセッサに保存されている場合、実行可能キューより
ディスパッチ対象タスクを取り出して実行キューに接続
し、他のプロセッサに保存されている場合は、実行可能
キューよりディスパッチ対象タスクを取り出してそのタ
スク情報をディスパッチ対象プロセッサにデータ転送し
て実行キューに接続する一方、その他のキューに対して
も繋ぎ代えを行い、タスク制御ブロック上の保存プロセ
ッサ識別子を変更する。
In the multiprocessor task control method according to the present invention, in the multiprocessor task control method, when the dispatch target task is stored in its own processor, the dispatch target task is extracted from the executable queue. When connected to the execution queue and stored in another processor, the task to be dispatched is extracted from the executable queue, the task information is transferred to the dispatched processor and connected to the execution queue, while the other queue is The connection is also changed, and the storage processor identifier on the task control block is changed.

【0024】この方法によれば、タスク情報のプロセッ
サ間の移動を簡素な方法で実現することができるので、
プロセッサの実行タスクのタスク情報へのアクセスを常
にプロセッサ内に閉じて行うことができる。
According to this method, the transfer of the task information between the processors can be realized by a simple method.
The access to the task information of the execution task of the processor can always be performed within the processor.

【0025】本発明のマルチプロセッサタスク制御装置
は、マルチタスク・オペレーティングシステムのカーネ
ル部分がローカルバス上に実装された複数のプロセッサ
と、前記プロセッサのうち自プロセッサのみがアクセス
可能なプライベートメモリと、前記マルチタスク・オペ
レーティングシステムのタスク情報部分を実装し、他の
プロセッサからも共通にアクセス可能な共有メモリと、
を具備する構成を採る。
A multiprocessor task control device according to the present invention includes a plurality of processors each having a kernel portion of a multitask operating system mounted on a local bus, a private memory accessible only by the processor itself among the processors, A shared memory that implements the task information part of the multitasking operating system and is commonly accessible from other processors,
Is adopted.

【0026】この構成によれば、各プロセッサがカーネ
ルにアクセスする場合であっても、プロセッサ間でバス
が競合することがないので、スループットを上げること
ができる。
According to this configuration, even when each processor accesses the kernel, there is no bus contention between the processors, so that the throughput can be increased.

【0027】また、本発明のマルチプロセッサタスク制
御装置は、アプリケーションプログラムを外部から複数
のプロセッサの夫々へダウンロードするための共通の入
出力手段と、前記複数のプロセッサの夫々に存在するダ
ウンローダと、前記複数のプロセッサのうちのマスタプ
ロセッサではアプリケーションプログラムのエントリタ
スクを起動し、スレーブプロセッサではアイドルタスク
を起動するイニシャルプログラムローダと、を具備する
構成を採る。
Further, the multiprocessor task control device of the present invention comprises: a common input / output means for downloading an application program from an external device to each of a plurality of processors; a downloader existing in each of the plurality of processors; The master processor of the plurality of processors starts an entry task of the application program, and the slave processor has an initial program loader that starts an idle task.

【0028】この構成によれば、マスタプロセッサはエ
ントリタスクを起動し、スレーブプロセッサはアイドル
タスクを起動するので、マルチタスクシステムの応用と
してマルチプロセッサシステムを容易に構築することが
できる。
According to this configuration, since the master processor starts the entry task and the slave processor starts the idle task, a multiprocessor system can be easily constructed as an application of the multitask system.

【0029】また、本発明のマルチプロセッサタスク制
御装置は、アプリケーションプログラムを外部から各プ
ロセッサへダウンロードするための共通の入出力手段
と、前記各プロセッサ毎に存在し、前記共通の入出力手
段よりアプリケーションプログラムをダウンロードして
マルチタスク・オペレーティングシステムとリンクし、
プロセッサがマスタの場合はアプリケーションプログラ
ムのエントリタスクを起動し、スレーブの場合はアプリ
ケーションプログラムのアイドルタスクを起動するアプ
リケーションロード手段と、前記各プロセッサ毎に存在
し、システムコール発行時にコンテクストの保存及び復
帰を行うプリエンプト・ディスパッチ手段と、前記各プ
ロセッサ毎に存在し、各プロセッサ毎に存在するコンテ
クスト保存エリアを含むタスク制御ブロックとタスク・
スタックエリアをタスク情報として記憶するタスク情報
記憶手段と、前記各プロセッサ毎に存在し、要求されて
いるシステムコール処理を行うシステムコール処理手段
と、前記各プロセッサ毎に存在し、前記システムコール
処理手段によって遷移されたタスク状態によって各種キ
ュー制御を行い、決定されたタスク・スイッチング情報
に基づいて割り込み制御要求、タスク情報転送要求及び
プリエンプト・ディスパッチ要求を発行するタスク・ス
ケジューリング手段と、前記タスク情報記憶手段より実
行可能状態のタスクをキュー管理する実行可能タスク管
理手段と、前記タスク情報記憶手段より実行状態のタス
クをキュー管理する実行タスク管理手段と、各プロセッ
サとその他のプロセッサとの間のデータ転送時間を管理
するデータ転送時間記憶手段と、前記各プロセッサ毎に
存在し、前記実行可能タスク管理手段と前記実行タスク
管理手段及び前記データ転送時間記憶手段によりタスク
・スイッチング情報を決定するマッチング決定手段と、
前記各プロセッサ毎に存在し、前記タスク・スケジュー
リング手段からの要求に応じて他プロセッサにプリエン
プト・ディスパッチ要求を送信する割り込み発生手段
と、前記各プロセッサ毎に存在し、他プロセッサからの
プリエンプト・ディスパッチ要求を受信し、前記プリエ
ンプト・ディスパッチ手段に報告する割り込み受付け手
段と、前記各プロセッサ毎に存在し、前記タスク・スケ
ジューリング手段によって要求されてディスパッチ対象
のタスクのタスク情報をディスパッチ対象プロセッサに
転送するタスク情報転送手段と、を具備する構成を採
る。
Further, the multiprocessor task control device of the present invention has a common input / output means for downloading an application program from an external device to each processor, and a common input / output means for each of the processors. Download the program and link with the multitasking operating system,
If the processor is a master, the application task starts an entry task of the application program.If the processor is a slave, the application loading means starts an idle task of the application program.The processor exists for each processor and saves and restores the context when a system call is issued. A task control block including a context preserving area that exists for each processor and includes a context storage area that exists for each processor;
A task information storage unit for storing a stack area as task information; a system call processing unit that exists for each processor and performs a required system call process; and a system call processing unit that exists for each processor and Task scheduling means for performing various queue controls in accordance with the task state transitioned by the above, and issuing an interrupt control request, a task information transfer request, and a preemption dispatch request based on the determined task switching information, and the task information storage means Executable task management means for managing queues of tasks in a more executable state, execution task management means for managing queues of tasks in an executable state from the task information storage means, and data transfer time between each processor and other processors When managing data transfer Storage means, and matching determination means for determining a task switching information by the present in each processor, said executable task management unit and the execution task management unit and the data transfer time storing means,
Interrupt generating means for each processor which transmits a preemption dispatch request to another processor in response to a request from the task scheduling means; and a preemption dispatch request for each processor which is present for each processor. Interrupt receiving means for receiving the task information and transmitting the task information of the task to be dispatched, which is present for each processor and is requested by the task scheduling means, to the dispatch target processor. And a transfer means.

【0030】この構成によれば、各プロセッサがカーネ
ル及びタスク情報にアクセスする場合であっても、プロ
セッサ間でバスが競合することがなく、またプロセッサ
間のタスク情報のデータ転送時間を小さく抑えることが
できるので、スループットを上げることができる。
According to this configuration, even when each processor accesses the kernel and the task information, no bus contention occurs between the processors and the data transfer time of the task information between the processors is reduced. Therefore, the throughput can be increased.

【0031】[0031]

【発明の実施の形態】本発明の骨子は、複数のプロセッ
サ夫々のローカルメモリに同一のマルチタスク・オペレ
ーティングシステムを実装してマルチプロセッサシステ
ムを実現すると共に、マルチタスク・オペレーティング
システムをカーネル部分とタスク情報部分に分割して、
そのカーネル部分を自プロセッサのみがアクセス可能な
プライベートメモリに実装し、タスク情報部分を他のプ
ロセッサからも共通にアクセス可能な共有メモリに実装
するようにしたものである。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The gist of the present invention is to implement a multiprocessor system by mounting the same multitask operating system in local memories of a plurality of processors, and to combine the multitask operating system with a kernel part and a task. Divided into information parts,
The kernel part is mounted on a private memory accessible only by the own processor, and the task information part is mounted on a shared memory commonly accessible from other processors.

【0032】以下、本発明の実施の形態について、図面
を参照して詳細に説明する。図1は、本発明の実施の形
態に係るマルチプロセッサタスク制御装置100の構成
を示すブロック図である。本実施の形態では、マルチプ
ロセッサタスク制御装置100は、図2のブロック図に
示すようなハードウェア構成の3つのプロセッサ(プロ
セッサ1、プロセッサ2、プロセッサ3)から構成され
るシステムを例に挙げている。なお、プロセッサ1〜3
のCPU10-1〜CPU10-3から見たメモリマップは
図4に示す通りであり、ソフトウェア構成は図3に示す
通りである。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram illustrating a configuration of a multiprocessor task control device 100 according to an embodiment of the present invention. In the present embodiment, the multiprocessor task control device 100 exemplifies a system including three processors (processor 1, processor 2, and processor 3) having a hardware configuration as shown in the block diagram of FIG. I have. Processors 1 to 3
The memory map viewed from the CPUs 10-1 to 10-3 is as shown in FIG. 4, and the software configuration is as shown in FIG.

【0033】図2において、プロセッサ1はマスタプロ
セッサであり、残りのプロセッサ2及びプロセッサ3は
スレーブプロセッサである。プロセッサ1〜プロセッサ
3の夫々は、CPU(プロセッサ1はCPU10-1、プ
ロセッサ2はCPU10-2、プロセッサ3はCPU10
-3)と、プライベートメモリ11と、共有メモリ12
と、割り込みコントローラ13と、バスブリッジ14と
を有して構成されており、これらCPU、プライベート
メモリ11、共有メモリ12及び割り込みコントローラ
13はローカルバス15を介して互いに接続されてい
る。また、プロセッサ1〜3は、夫々のバスブリッジ1
4を介してグローバルバス16に接続されている。グロ
バールバス16には、プロセッサ1〜3で共通使用され
る共通I/O4がバスブリッジ14を介して接続されて
いる。
In FIG. 2, processor 1 is a master processor, and the remaining processors 2 and 3 are slave processors. Each of the processors 1 to 3 is a CPU (the processor 1 is the CPU 10-1, the processor 2 is the CPU 10-2, and the processor 3 is the CPU 10-1).
-3), private memory 11, and shared memory 12
, An interrupt controller 13, and a bus bridge 14. The CPU, the private memory 11, the shared memory 12, and the interrupt controller 13 are connected to each other via a local bus 15. In addition, the processors 1 to 3 are connected to the respective bus bridges 1.
4 is connected to the global bus 16. A common I / O 4 commonly used by the processors 1 to 3 is connected to the global bus 16 via a bus bridge 14.

【0034】図1において、マルチプロセッサタスク制
御装置100は、アプリケーションロード手段110
と、プリエンプト・ディスパッチ手段120と、タスク
情報記憶手段140と、システムコール処理手段130
と、タスクスケジューリング手段150と、実行可能タ
スク管理手段141と、実行タスク管理手段142と、
データ転送時間記憶手段160と、マッチング決定手段
170と、割り込み発生手段181と、割り込み受付け
手段182と、タスク情報転送手段190とを有して構
成されている。この場合、実行可能タスク管理手段14
1と、実行タスク管理手段142と、データ転送時間記
憶手段160がマスタプロセッサであるプロセッサ1に
のみ存在し、その他の手段は全てのプロセッサ1〜3に
共通して存在する。
In FIG. 1, the multiprocessor task control device 100 includes an application loading unit 110
, Preempt dispatch means 120, task information storage means 140, system call processing means 130
Task scheduling means 150, executable task management means 141, execution task management means 142,
It comprises a data transfer time storage means 160, a matching determination means 170, an interrupt generation means 181, an interrupt acceptance means 182, and a task information transfer means 190. In this case, the executable task management means 14
1, the execution task management means 142, and the data transfer time storage means 160 exist only in the processor 1 which is the master processor, and the other means exist in common in all the processors 1 to 3.

【0035】アプリケーションロード手段110は、ア
プリケーションを共通I/O4よりダウンロードしてマ
ルチタスク・オペレーティングシステムとリンクし、プ
ロセッサがマスタの場合はアプリケーションのエントリ
タスクを起動し、スレーブの場合はアイドルタスクを起
動する。ディスパッチ・プリエンプト手段120は、シ
ステムコール発行時、コンテクストの保存及び復帰を行
う。ここで、図5に示すように、タスク状態を、待ち状
態、実行可能状態、実行状態の3つ定義し、タスク状態
を実行可能状態から実行状態へ遷移させる動作をディス
パッチ、実行状態から実行可能状態に遷移させる動作を
プリエンプトと定義する。
The application loading means 110 downloads the application from the common I / O 4 and links it with the multitasking operating system. If the processor is a master, it starts an application entry task, and if it is a slave, it starts an idle task. I do. The dispatch / preempt means 120 saves and restores the context when issuing a system call. Here, as shown in FIG. 5, three task states are defined: a waiting state, an executable state, and an execution state, and the operation of transitioning the task state from the executable state to the execution state is dispatched, and the operation from the execution state is executable. The operation to transition to the state is defined as preemption.

【0036】タスク情報記憶手段140は、図6に示す
ようなコンテクスト保存領域を含むタスク制御ブロック
(TCB)とタスク・スタックエリアをタスク情報とし
て記憶する。システムコール処理手段130は、要求さ
れているシステムコール処理を行う。なお、本実施の形
態では詳細を割愛しているが、システム資源の制御(各
プロセッサ1〜3に存在する)及び管理(システムで1
つ存在する)もシステムコール処理手段130に含まれ
るものとする。タスク・スケジューリング手段150
は、システムコール処理手段130によって遷移された
タスク状態によって各種キュー制御を行い、決定された
タスク・スイッチング情報に基づいて割込み制御要求、
タスク情報転送要求及びディスパッチ・プリエンプト要
求を発行する。
The task information storage means 140 stores a task control block (TCB) including a context storage area as shown in FIG. 6 and a task stack area as task information. The system call processing means 130 performs a required system call process. Although details are omitted in the present embodiment, control of system resources (existing in each of the processors 1 to 3) and management (one in the system)
Are included in the system call processing means 130. Task scheduling means 150
Performs various queue controls according to the task state transitioned by the system call processing means 130, and performs an interrupt control request based on the determined task switching information;
Issues a task information transfer request and a dispatch preempt request.

【0037】実行可能タスク管理手段141は、タスク
情報記憶手段140に記憶されているタスク情報より、
実行可能状態のタスクを図7に示すようにキュー管理す
る。実行タスク管理手段142は、タスク情報記憶手段
140に記憶されているタスク情報より、実行状態のタ
スクを図8に示すようにキュー管理する。データ転送時
間記憶手段160は、図9に示すように各プロセッサと
その他のプロセッサとの間のデータ転送時間を管理す
る。マッチング決定手段170は、実行可能タスク管理
手段141と実行タスク管理手段142及びデータ転送
時間記憶手段160により図10に示すようなマッチン
グテーブルを作成し、プリエンプト・ディスパッチ対象
タスクを決定する。
The executable task management means 141 uses the task information stored in the task information storage means 140
Tasks in the executable state are queued as shown in FIG. Based on the task information stored in the task information storage unit 140, the execution task management unit 142 manages the queue of the task in the execution state as shown in FIG. The data transfer time storage means 160 manages the data transfer time between each processor and other processors as shown in FIG. The matching determination unit 170 creates a matching table as shown in FIG. 10 by the executable task management unit 141, the execution task management unit 142, and the data transfer time storage unit 160, and determines a preemption / dispatch target task.

【0038】割り込み発生手段181は、タスク・スケ
ジューリング手段150からの要求に応じて他のプロセ
ッサにプリエンプト・ディスパッチ要求を送信する。割
り込み受付け手段182は、逆に他プロセッサからのプ
リエンプト・ディスパッチ要求を受信し、プリエンプト
・ディスパッチ手段120に報告する。タスク情報転送
手段190は、タスク・スケジューリング手段150に
よって要求されてディスパッチ対象のタスクのタスク情
報をディスパッチ対象のプロセッサに転送する。
The interrupt generating means 181 transmits a preempt dispatch request to another processor in response to a request from the task scheduling means 150. Conversely, the interrupt receiving unit 182 receives a preemption dispatch request from another processor and reports it to the preemption dispatching unit 120. The task information transfer unit 190 transfers task information of the task to be dispatched requested by the task scheduling unit 150 to the processor to be dispatched.

【0039】また、プロセッサ1〜3のCPU10-1〜
CPU10-3から見たメモリマップは図4に示すよう
に、ローカルバス空間にはプライベートメモリ11と共
有メモリ12と割り込みコントローラ13が割り当てら
れており、グローバルバス空間には各プロセッサ1〜3
に対して共有メモリ12と、割り込みコントローラ13
と、共通I/O4が割り当てられている。一方、ソフト
ウェア構成は図3に示すように、プロセッサ1では、プ
ライベートメモリ11、共有メモリう12からなるハー
ドウェア層と、カーネル、タスク情報、キューエント
リ、データ転送時間テーブルからなるOS(オペレーテ
ィングシステム)層と、アプリケーション、ローダから
なるアプリケーション層とから成り、プロセッサ2及び
プロセッサ3では、プライベートメモリ11、共有メモ
リう12からなるハードウェア層と、カーネル、タスク
情報からなるOS層と、アプリケーション、ローダから
なるアプリケーション層とから成る。
The CPUs 10-1 to 10-1 of the processors 1 to 3
As shown in FIG. 4, the memory map viewed from the CPU 10-3 is such that the private memory 11, the shared memory 12, and the interrupt controller 13 are allocated to the local bus space, and the processors 1 to 3 are allocated to the global bus space.
Memory 12 and interrupt controller 13
And a common I / O4. On the other hand, as shown in FIG. 3, the software configuration of the processor 1 includes a hardware layer including a private memory 11 and a shared memory 12 and an OS (operating system) including a kernel, task information, queue entries, and a data transfer time table. The processor 2 and the processor 3 include a hardware layer including a private memory 11 and a shared memory 12, an OS layer including kernel and task information, and an application layer including an application and a loader. Application layer.

【0040】以上のように構成されたマルチプロセッサ
タスク制御装置100について、図11〜図19を用い
てその動作を説明する。マルチプロセッサタスク制御動
作は、大きく分けて図11に示すシステム起動動作と、
図12〜図19に示すシステムコール動作の2つから構
成される。システムコール動作は、図12に示すメイン
動作と、図13〜図15に示すプリエンプト及びディス
パッチ対象タスク選択動作と、図16〜図18に示すプ
リエンプト及びディスパッチ動作と、図19に示すマッ
チング動作の4つから成る。図2に示すような3つのプ
ロセッサからなるマルチプロセッサタスク制御装置を例
にとって説明する。
The operation of the multiprocessor task control device 100 configured as described above will be described with reference to FIGS. The multiprocessor task control operation is roughly divided into a system activation operation shown in FIG.
It is composed of two system call operations shown in FIGS. The system call operation includes the main operation shown in FIG. 12, the preemption and dispatch target task selection operation shown in FIGS. 13 to 15, the preemption and dispatch operation shown in FIGS. 16 to 18, and the matching operation shown in FIG. Consisting of one. A multiprocessor task control device including three processors as shown in FIG. 2 will be described as an example.

【0041】〈システム起動動作〉図11はシステム起
動動作を示すフローチャートである。まず、ステップ1
001でアプリケーションを共通I/O20より各プロ
セッサ1〜3のプライベートメモリ11上にダウンロー
ドし、次いでステップ1002で、ダウンロードしたア
プリケーションをマルチタスクオペレーティングシステ
ムとリンクする。次に、ステップ1003でプロセッサ
がマスタプロセッサであるか否かを判定し、マスタであ
る場合はステップ1004に進み、アプリケーションの
エントリタスクを起動する。これに対して、プロセッサ
がスレーブプロセッサである場合はステップ1005に
進み、アイドルタスク(何もしないタスク)を起動して
処理を終了する。
<System Start Operation> FIG. 11 is a flowchart showing the system start operation. First, step 1
At 001, the application is downloaded from the common I / O 20 onto the private memory 11 of each of the processors 1 to 3, and then, at step 1002, the downloaded application is linked to the multitasking operating system. Next, in step 1003, it is determined whether or not the processor is a master processor. If the processor is a master, the process proceeds to step 1004 to start an application entry task. On the other hand, if the processor is a slave processor, the flow advances to step 1005 to start an idle task (a task that does nothing) and end the processing.

【0042】〈システムコール動作〉図12はシステム
コール動作を示すフローチャートである。まず、ステッ
プ201でコンテクストを保存した後、ステップ202
で、要求されているシステムコールの処理を行う。そし
て、ステップ221でシステムコール処理により自タス
クの状態が遷移したか否かを判定し、システムコール処
理によって自タスクの状態が遷移した(実行状態から待
ち状態へ)場合は、ステップ222に進み、実行キュー
から自タスクを取り出す。これにより、プロセッサが空
き状態になることから、ステップ231でディスパッチ
対象タスクを選択して、ステップ241でディスパッチ
を行う。ディスパッチを行った後は、ステップ281で
コンテクストの復帰を行い、システムコール処理を終了
する。
<System Call Operation> FIG. 12 is a flowchart showing the system call operation. First, after saving the context in step 201, step 202
Performs the processing of the requested system call. Then, in step 221, it is determined whether or not the state of the invoking task has transitioned by the system call processing. If the state of the invoking task has transitioned (from the execution state to the waiting state) by the system call processing, the process proceeds to step 222. Take out the invoking task from the execution queue. As a result, the processor becomes idle, so that a task to be dispatched is selected in step 231, and dispatching is performed in step 241. After dispatching, the context is restored in step 281 and the system call process ends.

【0043】一方、上記ステップ221の判定におい
て、システムコール処理によって自タスクの状態が遷移
しなかった(実行状態のまま)場合は、ステップ251
に進み、システムコール処理によって他タスクの状態が
遷移したかどうかを判定する。他タスクの状態が遷移し
た(待ち状態から実行状態へ)場合は、ステップ252
に進み、実行可能状態になった他のタスクを実行可能キ
ューに接続する。そして、ステップ253で、実行キュ
ーの最低優先度のタスクより実行可能キューの最高優先
度のタスクの方が優先度が高いか否かを判定する。実行
キューの最低優先度のタスクより実行可能キューの最高
優先度のタスクの方が優先度が高い場合は、ステップ2
61に進み、プリエンプト・ディスパッチ対象タスク選
択を行い、さらにステップ271でプリエンプト・ディ
スパッチを行う。そして、ステップ281でコンテクス
トの復帰を行ってシステムコール処理を終了する。
On the other hand, if it is determined in step 221 that the state of the invoking task has not transitioned by the system call processing (it remains in the execution state), step 251 is executed.
To determine whether or not the state of another task has transitioned by the system call processing. If the state of another task has transitioned (from the waiting state to the execution state), step 252 is executed.
To connect the other tasks in the ready state to the ready queue. Then, in step 253, it is determined whether or not the task with the highest priority in the executable queue has a higher priority than the task with the lowest priority in the execution queue. If the highest priority task in the executable queue has a higher priority than the lowest priority task in the execution queue, step 2
Proceeding to 61, a preemption / dispatch target task is selected, and in step 271, preemption / dispatching is performed. Then, in step 281, the context is restored, and the system call process ends.

【0044】上記ステップ253において、実行キュー
の最低優先度のタスクより実行可能キューの最高優先度
のタスクの方が優先度が低いと判断した場合は、即座に
ステップ281でコンテクストの復帰を行ってシステム
コール処理を終了する。一方、上記ステップ251にお
いて、他タスクの状態が遷移しなかった(待ち状態のま
ま)と判断した場合は、即座にステップ281でコンテ
クストの復帰を行ってシステムコール処理を終了する。
If it is determined in step 253 that the highest priority task in the executable queue has a lower priority than the lowest priority task in the execution queue, the context is immediately restored in step 281. Terminates the system call processing. On the other hand, if it is determined in step 251 that the state of the other task has not transitioned (remains in the waiting state), the context is immediately restored in step 281 and the system call processing ends.

【0045】〈ディスパッチ対象タスク選択動作〉図1
3はディスパッチ対象タスク選択動作を示すフローチャ
ートである。まず、ステップ301で、実行可能キュー
の最高優先度のタスク(同一優先度のタスクが存在する
場合それらすべて)をディスパッチ候補タスクとする。
そして、ステップ302で、ディスパッチ候補タスクが
保存されているプロセッサとディスパッチ対象プロセッ
サ間のデータ転送時間を全ての組み合わせについてデー
タ転送時間テーブルより計算する。この計算による結果
が得られると、ステップ303で、データ転送時間が最
も小さいタスクをディスパッチ対象タスクとして選択し
て処理を終了する。
<Dispatch target task selection operation> FIG.
3 is a flowchart showing a dispatch target task selecting operation. First, in step 301, the tasks of the highest priority in the executable queue (all tasks having the same priority, if any) are set as dispatch candidate tasks.
Then, in step 302, the data transfer time between the processor storing the dispatch candidate task and the dispatch target processor is calculated from the data transfer time table for all combinations. When the result of this calculation is obtained, in step 303, the task with the shortest data transfer time is selected as the task to be dispatched, and the process ends.

【0046】〈プリエンプト・ディスパッチ対象タスク
選択動作〉図14はプリエンプト・ディスパッチ対象タ
スク選択動作を示すフローチャートである。まず、ステ
ップ401でプリエンプト・ディスパッチ候補タスク選
択を行う。次に、ステップ411で、ディスパッチ候補
タスクが保存されているプロセッサとプリエンプト候補
タスクが実行されているプロセッサ間のデータ転送時間
を全ての組み合わせについてデータ転送時間テーブルよ
り計算して図10に示すようなマッチングテーブルを作
成する。マッチングテーブルを作成した後、ステップ4
21で、作成したマッチングテーブルよりプリエンプト
対象タスクとディスパッチ対象タスクのマッチングを行
う。そして、ステップ431でマッチングによって決定
された組み合わせをディスパッチ対象タスクとプリエン
プト対象タスクとして選択して処理を終了する。
<Preemption / Dispatch Target Task Selection Operation> FIG. 14 is a flowchart showing the preemption / dispatch target task selection operation. First, in step 401, a preempt dispatch candidate task is selected. Next, in step 411, the data transfer time between the processor in which the dispatch candidate task is stored and the processor in which the preemption candidate task is executed is calculated from the data transfer time table for all combinations, as shown in FIG. Create a matching table. After creating the matching table, step 4
At 21, matching is performed between the preemption target task and the dispatch target task from the created matching table. Then, the combination determined by the matching in step 431 is selected as the dispatch target task and the preemption target task, and the processing is terminated.

【0047】〈プリエンプト・ディスパッチ候補タスク
選択動作〉図15はプリエンプト・ディスパッチ候補タ
スク選択動作を示すフローチャートである。まず、ステ
ップ501で実行キューエントリを選択すると共に、実
行可能キューエントリよりキューの先頭タスクを選択す
る。実行キューエントリとキューの先頭タスクを選択し
た後、ステップ502で実行キューのタスクと実行可能
キューのタスクの優先度を比較する。そして、その比較
結果からステップ503の判定において、実行可能キュ
ーのタスクの方が優先度が高い場合は、ステップ504
に進み、実行キューのタスクをプリエンプト候補タスク
に、実行可能キューのタスクをディスパッチ候補タスク
とする。
<Preempt / Dispatch Candidate Task Selection Operation> FIG. 15 is a flowchart showing a preempt / dispatch candidate task selection operation. First, in step 501, an execution queue entry is selected, and a head task of the queue is selected from the executable queue entries. After selecting the execution queue entry and the head task of the queue, in step 502, the priorities of the tasks in the execution queue and the tasks in the executable queue are compared. If the task in the executable queue has a higher priority in the determination in step 503 based on the comparison result, step 504 is executed.
The task in the execution queue is set as a preemption candidate task, and the task in the executable queue is set as a dispatch candidate task.

【0048】次に、ステップ505で実行キュー及び実
行可能キューのタスクを1つ進める。次いで、ステップ
506の判定において、実行キューエンド又は実行可能
キューエンドに到達した場合は、ステップ507に進
み、プリエンプト候補タスクの優先度と同じ優先度を持
つ実行キュー上のタスクをプリエンプト候補タスクに追
加し、ディスパッチ候補タスクの優先度と同じ優先度を
持つ実行可能キュー上のタスクをディスパッチ候補タス
クに追加して処理を終了する。
Next, in step 505, the tasks in the execution queue and the executable queue are advanced by one. Next, if it is determined in step 506 that the task has reached the end of the execution queue or the end of the executable queue, the process proceeds to step 507 and a task on the execution queue having the same priority as the priority of the preemption candidate task is added to the preemption candidate task. Then, a task on the executable queue having the same priority as the priority of the dispatch candidate task is added to the dispatch candidate task, and the process ends.

【0049】一方、上記ス503の判定において、実行
可能キューのタスクの方が優先度が低い場合は、直ちに
ステップ507に進み、プリエンプト候補タスクの優先
度と同じ優先度を持つ実行キュー上のタスクをプリエン
プト候補タスクに追加し、ディスパッチ候補タスクの優
先度と同じ優先度を持つ実行可能キュー上のタスクをデ
ィスパッチ候補タスクに追加して処理を終了する。
On the other hand, if the priority of the task in the executable queue is lower than the priority of the task in the executable queue in step 503, the process immediately proceeds to step 507, and the task in the execution queue having the same priority as the priority of the preemption candidate task is executed. Is added to the preemption candidate task, a task on the executable queue having the same priority as the priority of the dispatch candidate task is added to the dispatch candidate task, and the process ends.

【0050】実行キュー及び実行可能キューのタスクを
1つ進めた結果、ステップ506の判定において、実行
キューエンド又は実行可能キューエンドに到達しなかっ
た場合は、ステップ502に戻り、実行キューのタスク
と実行可能キューのタスクの優先度を比較する処理を行
う。
As a result of advancing the tasks of the execution queue and the executable queue by one, if it is determined in step 506 that the task has not reached the execution queue end or the executable queue end, the process returns to step 502 and the task of the execution queue is A process for comparing the priorities of the tasks in the executable queue is performed.

【0051】〈プリエンプト・ディスパッチ動作〉図1
6はプリエンプト・ディスパッチ動作を示すフローチャ
ートである。まず、ステップ601の判定において、プ
リエンプト対象タスクが自プロセッサで実行されている
場合は、ステップ611に進み、プリエンプト処理を行
う。そして、ステップ621でディスパッチ処理を行っ
た後、ステップ631の判定において、選択したタスク
を全てプリエンプト・ディスパッチした場合は処理を終
了し、まだ選択したタスクを全てプリエンプト・ディス
パッチしていない場合は、ステップ601に戻って、プ
リエンプト対象タスクが自プロセッサで実行されている
かの判定処理を行う。
<Preemption / dispatch operation> FIG.
6 is a flowchart showing the preempt dispatch operation. First, if it is determined in step 601 that the preemption target task is being executed by the own processor, the process proceeds to step 611 to perform preemption processing. Then, after the dispatch processing is performed in step 621, in the determination in step 631, if all the selected tasks have been preempted and dispatched, the processing ends. If all of the selected tasks have not been preempted and dispatched yet, step Returning to 601, a determination process is performed to determine whether the preemption target task is being executed by its own processor.

【0052】一方、ステップ601の判定において、プ
リエンプト対象タスクが自プロセッサで実行されていな
い場合は、ステップ641に進み、ディスパッチ対象プ
ロセッサに対してプリエンプト・ディスパッチ要求を示
す割り込みを発生させて、ステップ631に進み、選択
したタスクを全てプリエンプト・ディスパッチしている
かの判定処理を行う。
On the other hand, if it is determined in step 601 that the preemption target task is not being executed by its own processor, the flow advances to step 641 to generate an interrupt indicating a preemption / dispatch request to the dispatch target processor. To determine whether all of the selected tasks have been preempted and dispatched.

【0053】プリエンプト・ディスパッチ要求を示す割
り込みを発生させられたプロセッサでは、ステップ65
1でコンテクストの保存を行い、さらにステップ661
でプリエンプト処理を行う。その後、ステップ671で
ディスパッチ処理を行い、次いでステップ681でコン
テクストの保存を行って処理を終了する。
In the processor in which the interrupt indicating the preempt dispatch request is generated, step 65 is executed.
In step 1, the context is saved, and then in step 661.
Performs preemption processing. Thereafter, in step 671, dispatch processing is performed, and then, in step 681, the context is saved, and the processing ends.

【0054】〈ディスパッチ動作〉図17はディスパッ
チ動作を示すフローチャートである。まず、ステップ7
01の判定において、ディスパッチ対象タスクが自プロ
セッサ上にある場合は、ステップ702に進み、実行可
能キューより選択したタスクを取り出し、それを実行キ
ューに接続して処理を終了する。ディスパッチ対象タス
クが自プロセッサ上にない(他プロセッサ上にある)場
合は、ステップ703に進み、実行可能キューより選択
したタスクを取り出して、そのときのタスク情報をディ
スパッチ対象プロセッサの共有メモリに転送し、それを
実行キューに接続する。また、その他のキューのリンク
(タスク制御ブロックの前方及び後方リンク等)に対し
ても取り出し接続を行う。そして、最後にタスク制御ブ
ロック(TBC、図6参照)内の保存プロセッサ識別子
20を変更して処理を終了する。
<Dispatch Operation> FIG. 17 is a flowchart showing the dispatch operation. First, step 7
In the determination of 01, if the task to be dispatched is on its own processor, the process proceeds to step 702, where the task selected from the executable queue is taken out, connected to the execution queue, and the process is terminated. If the task to be dispatched is not on its own processor (is on another processor), the process proceeds to step 703, where the task selected from the executable queue is taken out, and the task information at that time is transferred to the shared memory of the processor to be dispatched. , Connect it to the run queue. Further, the connection is also taken out and connected to other links of the queue (the front and rear links of the task control block, etc.). Finally, the storage processor identifier 20 in the task control block (TBC, see FIG. 6) is changed, and the process ends.

【0055】〈プリエンプト動作〉図18はプリエンプ
ト動作を示すフローチャートである。ステップ801
で、実行キューより選択したタスクを取り出し、それを
実行可能キューに接続して処理を終了する。
<Preemption Operation> FIG. 18 is a flowchart showing the preemption operation. Step 801
Then, the selected task is taken out of the execution queue, connected to the executable queue, and the processing is terminated.

【0056】〈マッチング動作〉図19はマッチング動
作を示すフローチャートである。まず、ステップ901
でディスパッチ候補タスク数とプリエンプト候補タスク
数の差分を最低優先度制限個数として算出する。次に、
ステップ902の判定において、ディスパッチ候補タス
ク数の方がプリエンプト候補タスク数より多い場合は、
ステップ911に進み、プリエンプト候補タスクをマッ
チングテーブルより選択する。プリエンプト候補タスク
を選択した後、ステップ912で、選択したプリエンプ
ト候補タスクに対して最小のデータ転送時間を持つディ
スパッチ候補タスクを選択する。
<Matching Operation> FIG. 19 is a flowchart showing the matching operation. First, step 901
Then, the difference between the number of dispatch candidate tasks and the number of preemption candidate tasks is calculated as the minimum priority limit number. next,
If it is determined in step 902 that the number of dispatch candidate tasks is larger than the number of preemption candidate tasks,
Proceeding to step 911, a preemption candidate task is selected from the matching table. After selecting a preemption candidate task, at step 912, a dispatch candidate task having a minimum data transfer time for the selected preemption candidate task is selected.

【0057】そして、ステップ913で、ディスパッチ
候補タスク数とプリエンプト候補タスク数が異なる場合
は、ス914で、最低優先度のディスパッチ候補タスク
が最低優先度制限個数分マッチングされたかどうかを判
定し、最低優先度制限個数分マッチングされた場合は、
ステップ915で、まだマッチングされていない最低優
先度ディスパッチ候補タスクをマッチングテーブルから
削除する。
If the number of dispatch candidate tasks is different from the number of preemption candidate tasks in step 913, it is determined in step S914 whether or not the lowest priority dispatch candidate tasks have been matched by the minimum priority limit number. If the matching is performed for the priority limit number,
In step 915, the lowest priority dispatch candidate task that has not been matched is deleted from the matching table.

【0058】次に、ステップ916の判定において、全
てのプリエンプト候補タスクがマッチングされていた場
合は処理を終了し、全てのプリエンプト候補タスクがま
だマッチングされていない場合は、ステップ911に戻
ってプリエンプト候補タスクをマッチングテーブルより
選択する。ディスパッチ候補タスク数とプリエンプト候
補タスク数が同じ場合(ステップ913)と、ディスパ
ッチ候補タスク数とプリエンプト候補タスク数が異なる
場合(ステップ913)且つ最低優先度のディスパッチ
候補タスクが最低優先度制限個数分マッチングされてい
ない場合(ステップ914)は、ステップ916に進
み、全てのプリエンプト候補タスクがマッチングされて
いるかの判定処理を行う。
If it is determined in step 916 that all preemption candidate tasks have been matched, the process ends. If all preemption candidate tasks have not been matched yet, the process returns to step 911 to return to the preemption candidate task. Select a task from the matching table. When the number of dispatch candidate tasks and the number of preemption candidate tasks are the same (step 913), when the number of dispatch candidate tasks is different from the number of preemption candidate tasks (step 913), and the lowest priority dispatch candidate tasks are matched by the minimum priority limit number If not (step 914), the process proceeds to step 916, and a determination process is performed to determine whether all preemption candidate tasks have been matched.

【0059】一方、上記ステップ902の判定におい
て、ディスパッチ候補タスク数の方がプリエンプト候補
タスク数より少ない場合は、ステップ921からステッ
プ926のように、ディスパッチ候補タスクをプリエン
プト候補タスクに置き換え、プリエンプト候補タスクを
ディスパッチ候補タスクに置き換えて、以上説明したス
テップ911からステップ916と同様の動作をする。
On the other hand, if it is determined in step 902 that the number of dispatch candidate tasks is smaller than the number of preemption candidate tasks, as in steps 921 to 926, the dispatch candidate tasks are replaced with preemption candidate tasks. Is replaced by a dispatch candidate task, and the same operations as those in steps 911 to 916 described above are performed.

【0060】次に、図20を用いて本発明の実施の形態
によるタスクの実行の様子について説明する。以下に説
明するように、本発明によりデータ転送時間を極力小さ
く抑えることができることが分かる。プロセッサ1がマ
スタで、時刻t0でアプリケーションのエントリタスクで
あるtask_Aを起動する。プロセッサ2及びプロセッサ3
はスレーブで、時刻t0でアイドルタスクidleを起動し、
タスクが割り当てられる(割り込まれる)のを待ってい
る。時刻t1でタスクtask_Aはタスクtask_Bを生成し、優
先度制御に従ってプロセッサ2がディスパッチ対象プロ
セッサに選択され、プロセッサ1はプロセッサ2に対し
てプリエンプト・ディスパッチ要求を示す割り込みを発
生させ、プロセッサ2はタスクtask_Bをプリエンプト・
ディスパッチする。その際、タスクtask_Bのタスク情報
をプロセッサ1からプロセッサ2にデータ転送を行う。
Next, the manner of execution of a task according to the embodiment of the present invention will be described with reference to FIG. As will be described below, it can be seen that the present invention can minimize the data transfer time. The processor 1 is the master, and starts task_A which is an entry task of the application at time t0. Processor 2 and processor 3
Is a slave, starts an idle task idle at time t0,
Waiting for a task to be assigned (interrupted). At time t1, task task_A generates task task_B, processor 2 is selected as a dispatch target processor according to the priority control, processor 1 generates an interrupt indicating a preemption dispatch request to processor 2, and processor 2 issues task task_B Preempt
Dispatch. At this time, the task information of the task task_B is transferred from the processor 1 to the processor 2.

【0061】その後、同様に時刻t2でタスクtask_Aはタ
スクtask_Cを生成し、優先度制御に従ってプロセッサ3
がディスパッチ対象プロセッサに選択され、プロセッサ
1はプロセッサ3に対してプリエンプト・ディスパッチ
要求を示す割り込みを発生させ、プロセッサ3はタスク
task_Bをプリエンプト・ディスパッチする。その際、タ
スクtask_Cのタスク情報をプロセッサ1からプロセッサ
3にデータ転送を行う。時刻t8でタスクtask_Aが待ち状
態に遷移し、プロセッサ1はその時点で実行可能なタス
クのうち最高優先度のタスクtask_Gをディスパッチす
る。
Thereafter, similarly, at time t2, the task task_A generates the task task_C, and the processor 3
Is selected as a dispatch target processor, the processor 1 generates an interrupt indicating a preempt dispatch request to the processor 3, and the processor 3
Preempt dispatch task_B. At this time, the task information of the task task_C is transferred from the processor 1 to the processor 3. At time t8, the task task_A transitions to the waiting state, and the processor 1 dispatches the highest priority task task_G among tasks executable at that time.

【0062】その後、時刻t9でタスクtask_Aが待ち状態
から実行可能状態に遷移し、本発明のマルチプロセッサ
タスク制御方法に従って、データ転送時間の小さいプロ
セッサ1がディスパッチ対象プロセッサに選択され、デ
ータ転送処理なしに(タスクtask_Aのタスク情報はプロ
セッサ1にもともとあったため)プロセッサ1がタスク
task_Aをプリエンプト・ディスパッチする。時刻t10で
タスクtask_Eが待ち状態に遷移し、プロセッサ3は優先
度制御に従ってタスクtask_Gをディスパッチ対象タスク
に選択し、データ転送を伴ってディスパッチする。
Thereafter, at time t9, the task task_A transitions from the wait state to the executable state, and the processor 1 having a short data transfer time is selected as the dispatch target processor according to the multiprocessor task control method of the present invention, and no data transfer processing is performed. (Because the task information of task task_A originally existed in processor 1, processor 1
Preempt dispatch task_A. At time t10, the task task_E transitions to the wait state, and the processor 3 selects the task task_G as the dispatch target task according to the priority control, and dispatches the data with data transfer.

【0063】また、時刻t11ではタスクtask_Fが待ち状
態に遷移し、プロセッサ2は優先度制御に従ってタスク
task_Dをディスパッチ対象タスクに選択し、データ転送
をなしに(偶然データ転送が起こらなかった)ディスパ
ッチする。時刻t12でタスクtask_Aが再び待ち状態に遷
移し、プロセッサ1は優先度制御に従ってタスクtask_B
をディスパッチ対象タスクに選択し、データ転送を伴っ
てディスパッチする。
At time t11, the task task_F shifts to the waiting state, and the processor 2 executes the task task according to the priority control.
task_D is selected as the task to be dispatched, and dispatching is performed without data transfer (data transfer did not occur by accident). At time t12, the task task_A transitions to the waiting state again, and the processor 1 executes the task task_B according to the priority control.
Is selected as a dispatch target task, and dispatch is performed with data transfer.

【0064】そして、時刻t13でタスクtask_Aとタスクt
ask_Eが待ち状態から実行可能状態に遷移し、本発明の
マルチプロセッサタスク制御方法に従って、データ転送
時間が小さくなるようにマッチングが行われ、プロセッ
サ1がタスクtask_Aを、プロセッサ2がタスクtask_Eを
ディスパッチするようにマッチングされる。プロセッサ
1のタスクtask_Aに対するプリエンプト・ディスパッチ
はデータ転送処理なしに(タスクtask_Aのタスク情報は
プロセッサ1にもともとあったため)行われ、プロセッ
サ2のタスクtask_Eに対するプリエンプト・ディスパッ
チはデータ転送処理を伴って行われる。
Then, at time t13, task task_A and task t
The ask_E transitions from the wait state to the executable state, matching is performed so that the data transfer time is reduced according to the multiprocessor task control method of the present invention, and the processor 1 dispatches the task task_A and the processor 2 dispatches the task task_E. And so on. The preemption dispatch for the task task_A of the processor 1 is performed without the data transfer processing (since the task information of the task task_A originally exists in the processor 1), and the preemption dispatch for the task task_E of the processor 2 is performed with the data transfer processing. .

【0065】以上のように本発明の実施の形態によれ
ば、システムのバス構成をローカルバス15と、バスブ
リッジ14を介したグローバルバス25の2段構成と
し、各プロセッサ1〜3のローカルバス15上に、自プ
ロセッサのみがアクセス可能なプライベートメモリ11
と、その他のプロセッサからもグローバルバス25、バ
スブリッジ14を介して共通にアクセス可能な共有メモ
リ12の用途の異なる2種類のメモリを実装する。そし
て、マルチタスク・オペレーティングシステムをシステ
ム全体で共有する必要のないカーネル部分と、共有する
必要のあるシステム資源(例えばセマフォ、メッセージ
キュー等)の管理情報及びタスク情報部分に分割し、そ
のうちのカーネル部分はプライベートメモリ15に、タ
スク情報部分は共有メモリ12に実装する。
As described above, according to the embodiment of the present invention, the system has a two-stage configuration of the local bus 15 and the global bus 25 via the bus bridge 14, and the local bus of each of the processors 1 to 3. 15 and a private memory 11 accessible only by its own processor.
In addition, two types of memories having different applications of the shared memory 12 that can be commonly accessed from other processors via the global bus 25 and the bus bridge 14 are mounted. Then, the multitasking operating system is divided into a kernel part that does not need to be shared by the entire system, and management information and task information parts of system resources (for example, semaphores and message queues) that need to be shared. Is implemented in the private memory 15 and the task information portion is implemented in the shared memory 12.

【0066】また、各プロセッサ1〜3の共有メモリ1
2間のデータ転送時間を記憶し、プロセッサ間のタスク
情報のデータ転送時間が小さくなるようにタスクスケジ
ューリングを行う。
The shared memory 1 of each of the processors 1 to 3
The data transfer time between the two is stored, and the task scheduling is performed so that the data transfer time of the task information between the processors is reduced.

【0067】したがって、各プロセッサ1〜3がカーネ
ルアクセスする場合であっても、プロセッサ間でバスが
競合することがなく、またタスク情報にアクセスする場
合も各タスクを実行する前にタスク情報が他プロセッサ
上に保存されていれば、タスク情報のデータ転送処理を
行わなければならないが、その後のタスク情報のアクセ
スに対してもプロセッサ間でバスが競合することはない
ので、スループットを上げることができる。
Therefore, even when each of the processors 1 to 3 accesses the kernel, there is no bus contention between the processors, and even when accessing the task information, the task information is not updated before executing each task. If it is stored on the processor, the task information data transfer processing must be performed, but there is no bus contention between the processors for subsequent access to the task information, so that the throughput can be increased. .

【0068】また、タスク情報のデータ転送処理も、デ
ータ転送時間記憶手段160と、マッチング決定手段1
70とを設けて、記憶しているデータ転送時間をもとに
タスクスケジューリングを行うので、短時間で終えるこ
とができ、これを行うことによって更にスループットを
上げることができる。
The task information data transfer process also includes a data transfer time storage unit 160 and a matching determination unit 1.
Since task scheduling is performed based on the stored data transfer time, the processing can be completed in a short time, and the throughput can be further increased by doing this.

【0069】なお、本発明は、一般的なマルチプロセッ
サタスク制御に関するものであるが、対象とするアプリ
ケーションを例えば呼制御系アプリケーションと考えた
場合、移動通信システム(特に基地局装置)にも適用可
能であり、その場合、例えば各タスクは、夫々の呼を制
御する呼制御タスクとなる。
Although the present invention relates to general multiprocessor task control, if the target application is considered as, for example, a call control system application, it can be applied to a mobile communication system (particularly, a base station device). In this case, for example, each task is a call control task for controlling each call.

【0070】[0070]

【発明の効果】以上のように本発明は、システムのバス
構成をローカルバスとグローバルバスの2段構成とし、
各プロセッサのローカルバス上に自プロセッサのみがア
クセス可能なプライベートメモリと、その他のプロセッ
サからも共通にアクセス可能な共有メモリの2種類のメ
モリを実装し、カーネル部分はプライベートメモリに、
タスク情報部分は共有メモリに実装することにより、各
プロセッサがカーネル及び実行タスクのタスク情報にア
クセスする場合であっても、プロセッサ間でバスが競合
することがないので、スループットを上げることができ
るという効果が得られる。
As described above, according to the present invention, the system has a two-stage configuration of a local bus and a global bus.
Two types of memory are implemented on the local bus of each processor: a private memory that can be accessed only by its own processor, and a shared memory that can be commonly accessed by other processors.
By mounting the task information portion in the shared memory, even when each processor accesses the task information of the kernel and the execution task, the bus does not compete between the processors, so that the throughput can be increased. The effect is obtained.

【0071】また、データ転送時間テーブルを参照して
タスクスケジューリングを行うことにより、プロセッサ
間のタスク情報のデータ転送時間を小さく抑えることが
でき、これを行うことで更にスループットを上げること
ができる。
Further, by performing the task scheduling with reference to the data transfer time table, the data transfer time of the task information between the processors can be reduced, and the throughput can be further increased by doing this.

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

【図1】本発明の実施の形態に係るマルチプロセッサタ
スク制御装置の構成を示すブロック図
FIG. 1 is a block diagram showing a configuration of a multiprocessor task control device according to an embodiment of the present invention.

【図2】本発明の実施の形態に係るマルチプロセッサタ
スク制御装置を用いたマルチプロセッサシステムの構成
を示すブロック図
FIG. 2 is a block diagram showing a configuration of a multiprocessor system using the multiprocessor task control device according to the embodiment of the present invention.

【図3】本発明の実施の形態に係るマルチプロセッサタ
スク制御装置におけるソフトウェア構成を示す図
FIG. 3 is a diagram showing a software configuration in the multiprocessor task control device according to the embodiment of the present invention;

【図4】本発明の実施の形態に係るマルチプロセッサタ
スク制御装置の各CPUから見たメモリマップの例を示
す図
FIG. 4 is a diagram showing an example of a memory map viewed from each CPU of the multiprocessor task control device according to the embodiment of the present invention;

【図5】本発明の実施の形態に係るマルチプロセッサタ
スク制御装置におけるマルチタスクオペレーティングシ
ステム上のタスク状態遷移を説明するための図
FIG. 5 is a diagram for explaining a task state transition on a multitask operating system in the multiprocessor task control device according to the embodiment of the present invention;

【図6】本発明の実施の形態に係るマルチプロセッサタ
スク制御装置におけるタスク情報を示す図
FIG. 6 is a diagram showing task information in the multiprocessor task control device according to the embodiment of the present invention.

【図7】本発明の実施の形態に係るマルチプロセッサタ
スク制御装置を用いたマルチプロセッサシステムにおけ
る実行可能キューを説明するための図
FIG. 7 is a diagram for explaining an executable queue in a multiprocessor system using the multiprocessor task control device according to the embodiment of the present invention;

【図8】本発明の実施の形態に係るマルチプロセッサタ
スク制御装置を用いたマルチプロセッサシステムにおけ
る実行キューを説明するための図
FIG. 8 is a diagram for explaining an execution queue in a multiprocessor system using the multiprocessor task control device according to the embodiment of the present invention;

【図9】本発明の実施の形態に係るマルチプロセッサタ
スク制御装置を用いたマルチプロセッサシステムにおけ
るデータ転送時間テーブルを示す図
FIG. 9 is a diagram showing a data transfer time table in a multiprocessor system using the multiprocessor task control device according to the embodiment of the present invention;

【図10】本発明の実施の形態に係るマルチプロセッサ
タスク制御装置を用いたマルチプロセッサシステムにお
けるマッチングテーブルを示す図
FIG. 10 is a view showing a matching table in a multiprocessor system using the multiprocessor task control device according to the embodiment of the present invention;

【図11】本発明の実施の形態に係るマルチプロセッサ
タスク制御装置を用いたマルチプロセッサシステムにお
けるシステム起動動作を示すフロー図
FIG. 11 is a flowchart showing a system startup operation in a multiprocessor system using the multiprocessor task control device according to the embodiment of the present invention.

【図12】本発明の実施の形態に係るマルチプロセッサ
タスク制御装置を用いたマルチプロセッサシステムにお
けるシステムコール動作を示すフロー図
FIG. 12 is a flowchart showing a system call operation in a multiprocessor system using the multiprocessor task control device according to the embodiment of the present invention.

【図13】本発明の実施の形態に係るマルチプロセッサ
タスク制御装置を用いたマルチプロセッサシステムにお
けるディスパッチ対象タスク選択動作を示すフロー図
FIG. 13 is a flowchart showing a dispatch target task selecting operation in a multiprocessor system using the multiprocessor task control device according to the embodiment of the present invention;

【図14】本発明の実施の形態に係るマルチプロセッサ
タスク制御装置を用いたマルチプロセッサシステムにお
けるプリエンプト・ディスパッチ動作を示すフロー図
FIG. 14 is a flowchart showing a preemption / dispatch operation in a multiprocessor system using the multiprocessor task control device according to the embodiment of the present invention;

【図15】本発明の実施の形態に係るマルチプロセッサ
タスク制御装置を用いたマルチプロセッサシステムにお
けるプリエンプト・ディスパッチ候補タスク選択動作を
示すフロー図
FIG. 15 is a flowchart showing a preemption / dispatch candidate task selection operation in a multiprocessor system using the multiprocessor task control device according to the embodiment of the present invention;

【図16】本発明の実施の形態に係るマルチプロセッサ
タスク制御装置を用いたマルチプロセッサシステムにお
けるプリエンプト・ディスパッチ動作を示すフロー図
FIG. 16 is a flowchart showing a preemption / dispatch operation in a multiprocessor system using the multiprocessor task control device according to the embodiment of the present invention;

【図17】本発明の実施の形態に係るマルチプロセッサ
タスク制御装置を用いたマルチプロセッサシステムにお
けるディスパッチ動作を示すフロー図
FIG. 17 is a flowchart showing a dispatch operation in a multiprocessor system using the multiprocessor task control device according to the embodiment of the present invention.

【図18】本発明の実施の形態に係るマルチプロセッサ
タスク制御装置を用いたマルチプロセッサシステムにお
けるプリエンプト動作を示すフロー図
FIG. 18 is a flowchart showing a preemption operation in a multiprocessor system using the multiprocessor task control device according to the embodiment of the present invention.

【図19】本発明の実施の形態に係るマルチプロセッサ
タスク制御装置を用いたマルチプロセッサシステムにお
けるマッチング動作を示すフロー図
FIG. 19 is a flowchart showing a matching operation in a multiprocessor system using the multiprocessor task control device according to the embodiment of the present invention.

【図20】本発明の実施の形態に係るマルチプロセッサ
タスク制御装置を用いたマルチプロセッサシステムにお
ける実行タスクのスイッチング動作を説明するための図
FIG. 20 is a diagram for explaining an execution task switching operation in a multiprocessor system using the multiprocessor task control device according to the embodiment of the present invention;

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

1、2、3 プロセッサ 4 共通I/O 10-1、10-2、10-3 CPU 11 プライベートメモリ 12 共有メモリ 13 割り込みコントローラ 14 バスブリッジ 15 ローカルバス 16 グローバルバス 20 保存プロセッサ識別子 100 マルチプロセッサタスク制御装置 110 アプリケーションロード手段 120 プリエンプト・ディスパッチ手段 130 システムコール処理手段 140 タスク情報記憶手段 141、142 実行可能タスク管理手段 150 タスク・スケジューリング手段 160 データ転送時間記憶手段 170 マッチング決定手段 181 割り込み発生手段 182 割り込み受付け手段 190 タスク情報転送手段 1, 2, 3 Processor 4 Common I / O 10-1, 10-2, 10-3 CPU 11 Private memory 12 Shared memory 13 Interrupt controller 14 Bus bridge 15 Local bus 16 Global bus 20 Saved processor identifier 100 Multiprocessor task control Apparatus 110 Application loading means 120 Preempt / dispatch means 130 System call processing means 140 Task information storage means 141, 142 Executable task management means 150 Task scheduling means 160 Data transfer time storage means 170 Matching determination means 181 Interrupt generation means 182 Interrupt acceptance Means 190 Task information transfer means

Claims (13)

【特許請求の範囲】[Claims] 【請求項1】 複数のプロセッサ夫々のローカルメモリ
に同一のマルチタスク・オペレーティングシステムを実
装してマルチプロセッサシステムを実現すると共に、マ
ルチタスク・オペレーティングシステムをカーネル部分
とタスク情報部分に分割し、前記カーネル部分を自プロ
セッサのみがアクセス可能なプライベートメモリに実装
し、前記タスク情報部分を他のプロセッサからも共通に
アクセス可能な共有メモリに実装することを特徴とする
マルチプロセッサタスク制御方法。
1. A multi-processor system in which the same multi-task operating system is implemented in a local memory of each of a plurality of processors to realize a multi-processor system. The multi-task operating system is divided into a kernel part and a task information part. A multiprocessor task control method, wherein the task information portion is implemented in a shared memory that can be commonly accessed by other processors, with the portion being implemented in a private memory accessible only by the own processor.
【請求項2】 プロセッサがタスクをディスパッチする
際、ディスパッチ対象タスクのタスク情報が異なるプロ
セッサの共有メモリ上に保存されていれば、その共有メ
モリ上のタスク情報を自プロセッサの共有メモリ上にデ
ータ転送することを特徴とする請求項1記載のマルチプ
ロセッサタスク制御方法。
2. When a processor dispatches a task, if task information of a task to be dispatched is stored in a shared memory of a different processor, the task information on the shared memory is transferred to the shared memory of the own processor. 2. The multiprocessor task control method according to claim 1, further comprising:
【請求項3】 タスク情報が保存されているプロセッサ
を管理する手段として、タスク情報部分に保存プロセッ
サ識別子を格納するエリアを設けることを特徴とする請
求項1又は請求項2記載のマルチプロセッサタスク制御
方法。
3. The multiprocessor task control according to claim 1, wherein an area for storing a saved processor identifier is provided in the task information portion as means for managing the processor in which the task information is stored. Method.
【請求項4】 プロセッサ間のデータ転送時間を記述し
たデータ転送時間テーブルを共有メモリ上にシステムで
管理し、各プロセッサは前記データ転送時間テーブルを
参照してディスパッチ対象タスクを決定することを特徴
とする請求項1から請求項3のいずれかに記載のマルチ
プロセッサタスク制御方法。
4. A system in which a data transfer time table describing data transfer time between processors is managed by a system on a shared memory, and each processor determines a task to be dispatched by referring to the data transfer time table. The multiprocessor task control method according to any one of claims 1 to 3, wherein:
【請求項5】 システム起動時に全てのプロセッサのプ
ライベートメモリ上にアプリケーションプログラムをダ
ウンロードし、マスタプロセッサはアプリケーションプ
ログラムのエントリタスクを起動し、残りの全てのプロ
セッサはアイドルタスクを起動してタスクが割り込まれ
るのを待つことを特徴とするマルチプロセッサタスク制
御方法。
5. When the system is started, the application programs are downloaded onto the private memories of all the processors, the master processor starts an entry task of the application program, and all the remaining processors start an idle task to interrupt the task. A multiprocessor task control method, comprising:
【請求項6】 システムコール発行時に、コンテクスト
の保存及びシステムコール処理を行い、システムコール
処理により自タスクの状態が遷移した場合、タスク優先
度とタスク情報の保存されているプロセッサから自プロ
セッサへのデータ転送時間を考慮してディスパッチ対象
タスクを実行可能タスクの中から選択し、選択したディ
スパッチ対象タスクが他のプロセッサに保存されている
ものであれば、自プロセッサにタスク情報をデータ転送
した後にディスパッチを行い、システムコール処理によ
り他タスクの状態が遷移した場合、実行状態のタスクよ
り高優先度の実行可能状態のタスクが存在するのであれ
ば、タスク優先度とデータ転送時間よりプリエンプト対
象タスクとディスパッチ対象タスクの組み合わせを選択
し、選択したディスパッチ対象タスクが他のプロセッサ
に保存されているものであれば、自プロセッサに当該タ
スク情報をデータ転送した後にプリエンプト及びディス
パッチを行い、コンテクストの復帰とシステムコールか
らの復帰を行うことを特徴とするマルチプロセッサタス
ク制御方法。
6. When a system call is issued, a context is saved and a system call process is performed. When the status of the invoking task is changed by the system call process, a task priority and task information are transferred from the processor to the invoking processor. The task to be dispatched is selected from the executable tasks in consideration of the data transfer time, and if the selected task to be dispatched is stored in another processor, the task information is transferred to its own processor before dispatching When the status of another task changes due to system call processing, if there is a task in the executable state with a higher priority than the task in the execution state, the task to be preempted is dispatched based on the task priority and the data transfer time. Select the target task combination and select the selected disk. If the task to be patched is stored in another processor, pre-emption and dispatching are performed after transferring the task information to the own processor, and context recovery and system call return are performed. Multiprocessor task control method.
【請求項7】 ディスパッチ対象タスクの選択方法は、
実行可能状態のタスクのうち最高優先度のタスク全てに
対して、当該タスク情報の保存されているプロセッサと
ディスパッチ対象プロセッサとの間のデータ転送時間を
データ転送時間テーブルより算出し、データ転送時間が
最も小さいタスクをディスパッチ対象タスクとして選択
することを特徴とする請求項6記載のマルチプロセッサ
タスク制御方法。
7. A method for selecting a task to be dispatched includes:
For all the tasks with the highest priority among the tasks in the executable state, the data transfer time between the processor in which the task information is stored and the dispatch target processor is calculated from the data transfer time table, and the data transfer time is calculated. 7. The multiprocessor task control method according to claim 6, wherein the smallest task is selected as a dispatch target task.
【請求項8】 プリエンプト対象タスクとディスパッチ
対象タスクの組み合わせ選択方法は、ある実行状態のタ
スク優先度より高優先度の実行可能状態のタスクをディ
スパッチ候補タスクとして選択し、ある実行可能状態の
タスク優先度より低優先度の実行状態のタスクをプリエ
ンプト候補タスクとして選択し、プリエンプト候補タス
クとディスパッチ候補タスクの全ての組み合わせに対し
てデータ転送時間をデータ転送時間テーブルより算出
し、データ転送時間が小さくなるようにプリエンプト対
象タスクとディスパッチ対象タスクのマッチングを決定
することを特徴とする請求項6記載のマルチプロセッサ
タスク制御方法。
8. A method for selecting a combination of a task to be preempted and a task to be dispatched, wherein a task in an executable state having a higher priority than a task priority in a certain execution state is selected as a dispatch candidate task, and a task priority in a certain executable state is selected. Tasks in the execution state with a lower priority than the task are selected as preemption candidate tasks, and the data transfer time is calculated from the data transfer time table for all combinations of the preemption candidate task and the dispatch candidate task, and the data transfer time is reduced. 7. The multiprocessor task control method according to claim 6, wherein the matching between the preemption target task and the dispatch target task is determined as described above.
【請求項9】 プリエンプト対象タスクとディスパッチ
対象タスクマッチングを決定する方法は、ディスパッチ
候補タスクの数の方が多い場合は、プリエンプト候補タ
スクに対するディスパッチ候補タスクのデータ転送時間
を比較してデータ転送時間の最も小さい組み合わせをマ
ッチングし、プリエンプト候補タスクの数の方が多い場
合は、逆にディスパッチ候補タスクに対するプリエンプ
ト候補タスクのデータ転送時間よりマッチングを行い、
また、プリエンプト候補タスクとディスパッチ候補タス
クの数が異なる場合は、必ずマッチングされないタスク
がプリエンプト候補タスクの場合では最高優先度のタス
クに、ディスパッチ候補タスクの場合では最低優先度の
タスクになっていることを特徴とする請求項8記載のマ
ルチプロセッサタスク制御方法。
9. A method for determining matching between a task to be preempted and a task to be dispatched, wherein when the number of dispatch candidate tasks is larger, the data transfer time of the dispatch candidate task with respect to the preemption candidate task is compared. If the smallest combination is matched and the number of preemption candidate tasks is larger, on the contrary, matching is performed based on the data transfer time of the preemption candidate task with respect to the dispatch candidate task,
In addition, if the number of preemption candidate tasks and the number of dispatch candidate tasks are different, the unmatched task must be the highest priority task if it is a preemption candidate task and the lowest priority task if it is a dispatch candidate task. 9. The multiprocessor task control method according to claim 8, wherein:
【請求項10】 ディスパッチ方法は、ディスパッチ対
象タスクが自プロセッサに保存されている場合、実行可
能キューよりディスパッチ対象タスクを取り出して実行
キューに接続し、他のプロセッサに保存されている場合
は、実行可能キューよりディスパッチ対象タスクを取り
出してそのタスク情報をディスパッチ対象プロセッサに
データ転送して実行キューに接続する一方、その他のキ
ューに対して繋ぎ代えを行い、タスク制御ブロック上の
保存プロセッサ識別子を変更することを特徴とする請求
項6記載のマルチプロセッサタスク制御方法。
10. The dispatch method according to claim 1, wherein when the dispatch target task is stored in the own processor, the dispatch target task is taken out of the executable queue and connected to the execution queue, and when the task is stored in another processor, the execution is executed. The dispatch target task is taken out from the possible queue, the task information is transferred to the dispatch target processor and connected to the execution queue, while the other queues are switched and the storage processor identifier on the task control block is changed. 7. The multiprocessor task control method according to claim 6, wherein:
【請求項11】 マルチタスク・オペレーティングシス
テムのカーネル部分がローカルバス上に実装された複数
のプロセッサと、 前記プロセッサのうち自プロセッサのみがアクセス可能
なプライベートメモリと、 前記マルチタスク・オペレーティングシステムのタスク
情報部分を実装し、他のプロセッサからも共通にアクセ
ス可能な共有メモリと、 を具備することを特徴とするマルチプロセッサタスク制
御装置。
11. A processor having a kernel part of the multitask operating system mounted on a local bus, a private memory accessible only by the processor among the processors, and task information of the multitask operating system. A shared memory that implements a part and that can be commonly accessed by other processors.
【請求項12】 アプリケーションプログラムを外部か
ら複数のプロセッサの夫々へダウンロードするための共
通の入出力手段と、 前記複数のプロセッサの夫々に存在するダウンローダ
と、 前記複数のプロセッサのうちのマスタプロセッサではア
プリケーションプログラムのエントリタスクを起動し、
スレーブプロセッサではアイドルタスクを起動するイニ
シャルプログラムローダと、 を具備することを特徴とするマルチプロセッサタスク制
御装置。
12. A common input / output unit for downloading an application program from an external device to each of a plurality of processors, a downloader existing in each of the plurality of processors, and a master processor among the plurality of processors, Start the program entry task,
A multiprocessor task control device, comprising: an initial program loader that starts an idle task in a slave processor.
【請求項13】 アプリケーションプログラムを外部か
ら各プロセッサへダウンロードするための共通の入出力
手段と、 前記各プロセッサ毎に存在し、前記共通の入出力手段よ
りアプリケーションプログラムをダウンロードしてマル
チタスク・オペレーティングシステムとリンクし、プロ
セッサがマスタの場合はアプリケーションプログラムの
エントリタスクを起動し、スレーブの場合はアプリケー
ションプログラムのアイドルタスクを起動するアプリケ
ーションロード手段と、 前記各プロセッサ毎に存在し、システムコール発行時に
コンテクストの保存及び復帰を行うプリエンプト・ディ
スパッチ手段と、 前記各プロセッサ毎に存在し、各プロセッサ毎に存在す
るコンテクスト保存エリアを含むタスク制御ブロックと
タスク・スタックエリアをタスク情報として記憶するタ
スク情報記憶手段と、 前記各プロセッサ毎に存在し、要求されているシステム
コール処理を行うシステムコール処理手段と、 前記各プロセッサ毎に存在し、前記システムコール処理
手段によって遷移されたタスク状態によって各種キュー
制御を行い、決定されたタスク・スイッチング情報に基
づいて割り込み制御要求、タスク情報転送要求及びプリ
エンプト・ディスパッチ要求を発行するタスク・スケジ
ューリング手段と、 前記タスク情報記憶手段より実行可能状態のタスクをキ
ュー管理する実行可能タスク管理手段と、 前記タスク情報記憶手段より実行状態のタスクをキュー
管理する実行タスク管理手段と、 各プロセッサとその他のプロセッサとの間のデータ転送
時間を管理するデータ転送時間記憶手段と、 前記各プロセッサ毎に存在し、前記実行可能タスク管理
手段と前記実行タスク管理手段及び前記データ転送時間
記憶手段によりタスク・スイッチング情報を決定するマ
ッチング決定手段と、 前記各プロセッサ毎に存在し、前記タスク・スケジュー
リング手段からの要求に応じて他プロセッサにプリエン
プト・ディスパッチ要求を送信する割り込み発生手段
と、 前記各プロセッサ毎に存在し、他プロセッサからのプリ
エンプト・ディスパッチ要求を受信し、前記プリエンプ
ト・ディスパッチ手段に報告する割り込み受付け手段
と、 前記各プロセッサ毎に存在し、前記タスク・スケジュー
リング手段によって要求されてディスパッチ対象のタス
クのタスク情報をディスパッチ対象プロセッサに転送す
るタスク情報転送手段と、 を具備することを特徴とするマルチプロセッサ制御装
置。
13. A multi-task operating system, comprising: a common input / output unit for downloading an application program from an external device to each processor; Application loading means for activating the application program entry task when the processor is a master, and activating the application program idle task when the processor is a slave; and Preempt dispatch means for saving and restoring; a task control block and a task stack area that are provided for each processor and include a context saving area that exists for each processor. Task information storage means for storing information as task information, system call processing means for each of the processors for performing a required system call processing, and system call processing means for each of the processors, wherein the system call processing means A task scheduling unit that performs various queue controls according to the transitioned task state and issues an interrupt control request, a task information transfer request, and a preemption dispatch request based on the determined task switching information; and Executable task management means for managing queues of tasks in the executable state; execution task management means for managing queues of tasks in the executable state from the task information storage means; and data transfer time between each processor and other processors. Data transfer time memory to manage And a matching determination unit that exists for each processor, and determines task switching information by the executable task management unit, the execution task management unit, and the data transfer time storage unit, and exists for each processor. Interrupt generating means for transmitting a preemption dispatch request to another processor in response to a request from the task scheduling means; and an interrupt generating means which exists for each of the processors and receives a preemption dispatch request from the other processor, and receives the preemption dispatch request. Interrupt accepting means for reporting to the means; and task information transfer means for each of the processors, for transferring task information of the task to be dispatched requested by the task scheduling means to the dispatch target processor. Multiprocessor control apparatus according to claim and.
JP34115199A 1999-11-30 1999-11-30 Multiprocessor task control method and task control device Expired - Fee Related JP3576437B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP34115199A JP3576437B2 (en) 1999-11-30 1999-11-30 Multiprocessor task control method and task control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP34115199A JP3576437B2 (en) 1999-11-30 1999-11-30 Multiprocessor task control method and task control device

Publications (2)

Publication Number Publication Date
JP2001155001A true JP2001155001A (en) 2001-06-08
JP3576437B2 JP3576437B2 (en) 2004-10-13

Family

ID=18343735

Family Applications (1)

Application Number Title Priority Date Filing Date
JP34115199A Expired - Fee Related JP3576437B2 (en) 1999-11-30 1999-11-30 Multiprocessor task control method and task control device

Country Status (1)

Country Link
JP (1) JP3576437B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010257428A (en) * 2009-04-28 2010-11-11 Toshiba Corp Information processing apparatus, parallel processing optimization method, and program
JP2011508349A (en) * 2007-12-27 2011-03-10 プライアント テクノロジー インコーポレイテッド A flash memory storage controller that includes a crossbar switch that connects the processor to internal memory
US20120023295A1 (en) * 2010-05-18 2012-01-26 Lsi Corporation Hybrid address mutex mechanism for memory accesses in a network processor
JP2014048965A (en) * 2012-08-31 2014-03-17 Fujitsu Ltd Information processing apparatus, processing method, and program
KR20220147856A (en) * 2021-04-28 2022-11-04 계명대학교 산학협력단 Method and apparatus for scheduling of block io

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011508349A (en) * 2007-12-27 2011-03-10 プライアント テクノロジー インコーポレイテッド A flash memory storage controller that includes a crossbar switch that connects the processor to internal memory
JP2010257428A (en) * 2009-04-28 2010-11-11 Toshiba Corp Information processing apparatus, parallel processing optimization method, and program
JP4621786B2 (en) * 2009-04-28 2011-01-26 株式会社東芝 Information processing apparatus, parallel processing optimization method, and program
US8255911B2 (en) 2009-04-28 2012-08-28 Kabushiki Kaisha Toshiba System and method for selecting and assigning a basic module with a minimum transfer cost to thread
US20120023295A1 (en) * 2010-05-18 2012-01-26 Lsi Corporation Hybrid address mutex mechanism for memory accesses in a network processor
US8843682B2 (en) * 2010-05-18 2014-09-23 Lsi Corporation Hybrid address mutex mechanism for memory accesses in a network processor
JP2014048965A (en) * 2012-08-31 2014-03-17 Fujitsu Ltd Information processing apparatus, processing method, and program
KR20220147856A (en) * 2021-04-28 2022-11-04 계명대학교 산학협력단 Method and apparatus for scheduling of block io
KR102489335B1 (en) 2021-04-28 2023-01-17 계명대학교 산학협력단 Method and apparatus for scheduling of block io

Also Published As

Publication number Publication date
JP3576437B2 (en) 2004-10-13

Similar Documents

Publication Publication Date Title
US7356680B2 (en) Method of loading information into a slave processor in a multi-processor system using an operating-system-friendly boot loader
US6715016B1 (en) Multiple operating system control method
CN100524223C (en) Method and system for concurrent handler execution in a SMI and PMI-based dispatch-execution framework
US8161453B2 (en) Method and apparatus for implementing task management of computer operations
US20050251806A1 (en) Enhancement of real-time operating system functionality using a hypervisor
EP1720099A1 (en) Use of data engine within a data processing apparatus
US20090165003A1 (en) System and method for allocating communications to processors and rescheduling processes in a multiprocessor system
JP5809366B2 (en) Method and system for scheduling requests in portable computing devices
JP2009265963A (en) Information processing system and task execution control method
JP2006338664A (en) System for performing code during operating system initialization
JP2561801B2 (en) Method and system for managing process scheduling
KR20070083460A (en) Method and system for concurrent execution of multiple kernels
US20050015768A1 (en) System and method for providing hardware-assisted task scheduling
US7590990B2 (en) Computer system
KR20040068600A (en) A method and a system for executing operating system functions, as well as an electronic device
EP1162536A1 (en) Multiple operating system control method
US7924858B2 (en) Use of a data engine within a data processing apparatus
JP2002132741A (en) Processor adding method, computer and recording medium
JP3576437B2 (en) Multiprocessor task control method and task control device
JP5003673B2 (en) Multiprocessing method and multiprocessor system
JPH07306837A (en) Apparatus and method for distributed processing as well as program product
CN114911539A (en) Starting method of running system and computing equipment
CN114911597A (en) Switching method of operation system and computing equipment
CN114911538A (en) Starting method of running system and computing equipment
US20030225817A1 (en) Concurrent execution of kernel work and non-kernel work in operating systems with single-threaded kernel

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040323

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040519

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040706

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040707

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20070716

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20080716

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090716

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090716

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100716

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110716

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20110716

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120716

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120716

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130716

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees