JP2005327007A - Integrated computer control program, recording medium for recording its program and integrated system - Google Patents
Integrated computer control program, recording medium for recording its program and integrated system Download PDFInfo
- Publication number
- JP2005327007A JP2005327007A JP2004143253A JP2004143253A JP2005327007A JP 2005327007 A JP2005327007 A JP 2005327007A JP 2004143253 A JP2004143253 A JP 2004143253A JP 2004143253 A JP2004143253 A JP 2004143253A JP 2005327007 A JP2005327007 A JP 2005327007A
- Authority
- JP
- Japan
- Prior art keywords
- task
- executed
- priority
- cpu
- tasks
- 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
Links
- 230000006870 function Effects 0.000 claims description 65
- 238000012217 deletion Methods 0.000 claims description 13
- 230000037430 deletion Effects 0.000 claims description 13
- 238000000034 method Methods 0.000 description 33
- 230000008569 process Effects 0.000 description 25
- 230000004913 activation Effects 0.000 description 18
- 230000000694 effects Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 8
- 230000009471 action Effects 0.000 description 7
- 230000006266 hibernation Effects 0.000 description 4
- 230000007704 transition Effects 0.000 description 4
- 230000007246 mechanism Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 238000012508 change request Methods 0.000 description 1
- 230000007958 sleep Effects 0.000 description 1
Images
Abstract
Description
本発明は、複数のCPUを有する組込みコンピュータの制御プログラム、そのプログラムを記録した記録媒体、及び組込みシステムに関し、タスクの動的分散の技術分野に属する。 The present invention relates to a control program for an embedded computer having a plurality of CPUs, a recording medium storing the program, and an embedded system, and belongs to the technical field of dynamic distribution of tasks.
従来より、家電製品や産業機器等に組込まれてこれらの作動を制御する機器組込み制御システム(組込みシステム)としては、単一のCPUやメモリ(記憶装置)等を有するコンピュータを、例えばTRON仕様等のリアルタイムオペレーティングシステム(制御プログラム)により制御するようにしたものが広く知られている。 Conventionally, as a device embedded control system (embedded system) that is incorporated in home appliances, industrial equipment, etc. and controls these operations, a computer having a single CPU, memory (storage device), etc., for example, TRON specification, etc. Those controlled by a real-time operating system (control program) are widely known.
このリアルタイムオペレーティングシステムは、メモリ(記憶装置)に記憶された複数のタスク(プログラムの並行実行の単位)のうちの実行すべきタスクを、異なる優先度が設定された複数のレディキューのうちの所定のレディキューに接続し、かつ、この接続されたタスクの優先度が実行中のタスクの優先度よりも高いときにはこの接続されたタスクをCPUに割り当てると共に、この接続されたタスクの優先度が実行中のタスクの優先度よりも低いときには現在実行中のタスクの処理が終了したときに、タスクが接続されたレディキューのうちの最も優先度の高いレディキューの先頭に接続されたタスクをCPUに割り当てるように構成されており、これにより、優先度の高いタスクのリアルタイムな処理を可能としている。 This real-time operating system is configured to specify a task to be executed among a plurality of tasks (units of parallel execution of programs) stored in a memory (storage device) as a predetermined one of a plurality of ready queues having different priorities. When the priority of the connected task is higher than the priority of the task being executed, the connected task is assigned to the CPU, and the priority of the connected task is executed. When the priority of the task currently being executed is finished, the task connected to the head of the ready queue with the highest priority among the ready queues to which the task is connected is sent to the CPU. It is configured to be assigned, thereby enabling real-time processing of high priority tasks.
ところで、近年、組込みシステム分野においては、上記家電製品や産業機器等の機能の高度化等に伴って処理対象データ量が増大しており、これに対処するため組込みシステムの処理能力の向上が要求されるようになってきている。 By the way, in recent years, in the embedded system field, the amount of data to be processed has increased with the advancement of functions such as the above-mentioned home appliances and industrial equipment, and in order to cope with this, it is necessary to improve the processing capacity of embedded systems. It has come to be.
組込みシステムの処理能力を向上させる方策としては、組込みシステム以外の分野において既に採用されているように複数のCPUを用いることが考えられる(特許文献1参照)。 As a measure for improving the processing capability of the embedded system, it is conceivable to use a plurality of CPUs as already adopted in fields other than the embedded system (see Patent Document 1).
しかしながら、特許文献1に記載のシステムにおいては、実行すべきタスクを接続するキューはCPU毎に専用のものが1つずつ設けられているだけであり、優先度の異なる複数のキューを有するリアルタイムオペレーティングシステムとは前提とする構成が大きく異なり、参考とすることができない。
However, in the system described in
特に、このように複数のCPUを用いても、各CPUに負荷を適切に分散しないと、例えば、実行すべきタスクは多くあるにも拘わらず、あるCPUにはタスクが割り当てられていない等の状態が生じ、CPUの複数化による処理能力向上効果を十分に発揮させることができない。また、複数のCPUを用いる場合、優先度の高いタスクを如何に迅速にCPUに割り当てるかという課題がある。 In particular, even if a plurality of CPUs are used in this manner, if the load is not properly distributed to each CPU, for example, there are many tasks to be executed, but no tasks are assigned to a certain CPU. A state arises, and the effect of improving the processing capability by using multiple CPUs cannot be fully exhibited. Further, when using a plurality of CPUs, there is a problem of how quickly a task with a high priority is assigned to the CPUs.
そこで、本発明は、複数のCPUを有する組込みシステムにおいて、各CPUにタスクを適切に動的分散することができると共に、優先度の高いタスクを迅速に処理することができるシステム及びプログラム等を提供することを課題とする。 Therefore, the present invention provides a system, a program, and the like that can appropriately dynamically distribute tasks to each CPU and can quickly process high priority tasks in an embedded system having a plurality of CPUs. The task is to do.
上記課題を解決するために、本発明は、次のように構成したことを特徴とする。 In order to solve the above-mentioned problems, the present invention is configured as follows.
まず、本願の請求項1に記載の発明(以下、第1発明という)は、複数のCPUと、該複数のCPUで共用の第1、第2、第3記憶装置とを有する組込みコンピュータを制御するプログラムであって、コンピュータを、上記第1記憶装置上に、上記各CPUで共用とされて異なる優先度が設定された複数のレディキューを作成するレディキュー作成手段、上記第2記憶装置に記憶されている複数のタスクのうちの少なくとも実行すべきタスクの優先度を設定するタスク優先度設定手段、上記第3記憶装置上に、上記複数のタスクのうちの少なくとも実行すべきタスクのタスク管理情報を作成するタスク管理情報作成手段、該タスク管理情報作成手段で作成された実行すべきタスクのタスク管理情報の上記第3記憶装置上における格納領域の情報を、上記レディキュー作成手段で作成された複数のレディキューのうちの、上記タスク優先度設定手段で設定された優先度と同一優先度のレディキューの最後尾に格納するタスク管理情報格納領域情報格納手段、上記複数のCPUで実行中のタスクのうちのいずれかのタスクの実行が終了したときに、この実行が終了したタスクに係るタスク管理情報格納領域情報をレディキューから削除するタスク管理情報格納領域情報削除手段、上記タスク情報格納領域情報格納手段によって実行すべきタスクに係るタスク情報格納領域情報が該タスクの優先度に対応するレディキューの最後尾に格納される場合において、該実行すべきタスクの優先度よりも優先度が低いタスクが実行中であるときは、実行中の全タスクのタスク実行権を解放させて全CPUを一時タスク非実行状態とさせるタスク実行権解放手段、該タスク実行権解放手段で全タスクのタスク実行権が解放されるときに、この解放される各タスクの状態を当該各タスクのタスク管理情報に記録するタスク実行権解放時状態記録手段、上記タスク実行権解放手段でタスク非実行状態とされた各CPUに、上記複数のレディキューに格納されたタスク管理情報格納領域情報に係るタスクのうちの、優先度の高いレディキューに格納されたタスク情報格納領域情報に係るタスクを、該レディキューの先頭側から順に割り当てるタスク割り当て手段、該タスク割り当て手段でタスクを割り当てたCPUに、当該タスクを、当該タスクのタスク管理情報格納領域情報に基づいて実行させるタスク実行手段として機能させることを特徴とする。
First, the invention according to
また、本願の請求項2に記載の発明(以下、第2発明という)は、第1発明において、コンピュータをタスク実行権解放手段として機能させるときに、タスク情報格納領域情報格納手段によって実行すべきタスクに係るタスク情報格納領域情報が該タスクの優先度に対応するレディキューの最後尾に格納される場合において、該実行すべきタスクの優先度よりも優先度が低いタスクが実行中であるとき、または実行が終了したタスクに係るタスク管理情報格納領域情報がタスク管理情報格納領域情報削除手段によってレディキューから削除されるときに、実行中の全タスクのタスク実行権を解放させて全CPUを一時タスク非実行状態とさせることを特徴とする。
The invention according to
そして、本願の請求項3に記載の発明(以下、第3発明という)は、第1発明または第2発明において、複数のCPUのうちに特定の機能を有する特定CPUが備えられている場合において、コンピュータをレディキュー作成手段として機能させるときに、上記特定CPUに関連付けた特定のレディキューを作成するように機能させ、タスク管理情報格納領域情報格納手段として機能させるときに、上記特定の機能を利用する特定タスクのタスク管理情報格納領域情報については上記特定のレディキューに格納するように機能させ、タスク割り当て手段として機能させるときに、特定のレディキューに接続された特定タスクを、該特定CPUに割り当てるように機能させることを特徴とする。
In the invention according to
そして、本願の請求項4に記載の発明(以下、第4発明という)は、第1発明から第3発明のいずれかの発明において、複数のCPU及び第1、第2、第3記憶装置に加え、外部割り込み処理機能を有する専用CPU及び第4、第5、第6記憶装置が備えられた組込みコンピュータにおいて、コンピュータにおける上記複数のCPU及び第1、第2、第3記憶装置を含む第1の部分を請求項1から請求項3のいずれかに記載の各手段として機能させる第1の制御部と、専用CPU及び第4、第5、第6記憶装置を含む第2の部分を、第1の複数のタスクの実行制御に係る要求を第1の制御部に対して行う第2の複数のタスクを制御する手段として機能させる第2の制御部とからなり、第2の制御部は、コンピュータの第2の部分を、上記第4記憶装置上に専用CPUで共用とされて異なる優先度が設定された第2の複数のレディキューを作成する第2レディキュー作成手段、上記第5記憶装置に記憶されている、第1の複数のタスクを実行制御する第2の複数のタスクのうちの少なくとも実行すべきタスクの優先度を設定する第2タスク優先度設定手段、上記第6記憶装置上に、上記第2の複数のタスクのうちの少なくとも実行すべきタスクのタスク管理情報を作成する第2タスク管理情報作成手段、該第2タスク管理情報作成手段で作成された実行すべきタスクのタスク管理情報の上記第6記憶装置上における格納領域の情報を、上記第2レディキュー作成手段で作成された第2の複数のレディキューのうちの、上記第2タスク優先度設定手段で設定された優先度と同一優先度のレディキューの最後尾に格納する第2タスク管理情報格納領域情報格納手段、上記専用CPUで実行中のタスクの実行が終了したときに、この実行が終了したタスクに係るタスク管理情報格納領域情報をレディキューから削除する第2タスク管理情報格納領域情報削除手段、上記第2タスク情報格納領域情報格納手段によって実行すべきタスクに係るタスク情報格納領域情報が該タスクの優先度に対応するレディキューの最後尾に格納される場合において、該実行すべきタスクの優先度よりも優先度が低いタスクが実行中であるときは、実行中のタスクのタスク実行権を解放させてCPUを一時タスク非実行状態とさせる第2タスク実行権解放手段、該第2タスク実行権解放手段でタスクの実行権が解放されるときに、この解放されるタスクの状態を当該タスクのタスク管理情報に記録する第2タスク実行権解放時状態記録手段、上記第2タスク実行権解放手段でタスク非実行状態とされたCPUに、上記第2の複数のレディキューに格納されたタスク管理情報格納領域情報に係るタスクのうちの、優先度の高いレディキューの先頭に格納されたタスク情報格納領域情報に係るタスクを割り当てる第2タスク割り当て手段、該第2タスク割り当て手段でタスクを割り当てたCPUに、当該タスクを、当該タスクのタスク管理情報格納領域情報に基づいて実行させる第2タスク実行手段として機能させることを特徴とする。
The invention according to
また、本願の請求項5に記載の発明(以下、第5発明という)は、第1発明から第4発明のいずれかの組込みシステム制御用プログラムを記録したコンピュータ読み取り可能な記録媒体に関するものである。
The invention according to
次に、本願の請求項6に記載の発明(以下、第6発明という)は、複数のCPUと、該複数のCPUで共用の第1、第2、第3記憶装置と、上記第1記憶装置上に、上記各CPUで共用とされて異なる優先度が設定された複数のレディキューを作成するレディキュー作成手段と、上記第2記憶装置に記憶されている複数のタスクのうちの少なくとも実行すべきタスクの優先度を設定するタスク優先度設定手段と、上記第3記憶装置上に、上記複数のタスクのうちの少なくとも実行すべきタスクのタスク管理情報を作成するタスク管理情報作成手段と、該タスク管理情報作成手段で作成された実行すべきタスクのタスク管理情報の上記第3記憶装置上における格納領域の情報を、上記レディキュー作成手段で作成された複数のレディキューのうちの、上記タスク優先度設定手段で設定された優先度と同一優先度のレディキューの最後尾に格納するタスク管理情報格納領域情報格納手段と、上記複数のCPUで実行中のタスクのうちのいずれかタスクの実行が終了したときに、この実行が終了したタスクに係るタスク管理情報格納領域情報をレディキューから削除するタスク管理情報格納領域情報削除手段と、上記タスク情報格納領域情報格納手段によって実行すべきタスクに係るタスク情報格納領域情報が該タスクの優先度に対応するレディキューの最後尾に格納される場合において、該実行すべきタスクの優先度よりも優先度が低いタスクが実行中であるときは、実行中の全タスクの実行権を解放させて全CPUを一時タスク非実行状態とさせるタスク実行権解放手段と、該タスク実行権解放手段で全タスクの実行権が解放されるときに、この解放される各タスクの状態を当該各タスクのタスク管理情報に記録するタスク実行権解放時状態記録手段と、上記タスク実行権解放手段でタスク非実行状態とされた各CPUに、上記複数のレディキューに格納されたタスク管理情報格納領域情報に係るタスクのうちの、優先度の高いレディキューに格納されたタスク情報格納領域情報に係るタスクを、該レディキューの先頭側から順に割り当てるタスク割り当て手段と、該タスク割り当て手段でタスクを割り当てたCPUに、当該タスクを、当該タスクのタスク管理情報格納領域情報に基づいて実行させるタスク実行手段とを有することを特徴とする。 Next, an invention according to claim 6 of the present application (hereinafter referred to as a sixth invention) includes a plurality of CPUs, first, second, and third storage devices shared by the plurality of CPUs, and the first memory. A ready queue creating means for creating a plurality of ready queues shared by the CPUs and set with different priorities on the device, and at least execution of a plurality of tasks stored in the second storage device Task priority setting means for setting the priority of a task to be performed; task management information creating means for creating task management information for at least a task to be executed among the plurality of tasks on the third storage device; The information of the storage area on the third storage device of the task management information of the task to be executed created by the task management information creation means is stored in the plurality of ready queues created by the ready queue creation means. The task management information storage area information storage means for storing at the tail of the ready queue having the same priority as the priority set by the task priority setting means, and any of the tasks being executed by the plurality of CPUs The task management information storage area information deletion means for deleting the task management information storage area information related to the task for which execution has been completed from the ready queue and the task information storage area information storage means When task information storage area information related to a task to be stored is stored at the end of the ready queue corresponding to the priority of the task, a task having a lower priority than the priority of the task to be executed is being executed. When there is, task execution right releasing means for releasing the execution right of all the tasks being executed and setting all the CPUs to the temporary task non-execution state, and the task When the execution right for all tasks is released by the right release means, the task execution right release state recording means for recording the state of each released task in the task management information of each task, and the task execution right The task information storage area stored in the ready queue having a high priority among the tasks related to the task management information storage area information stored in the plurality of ready queues in each CPU that has been set to the task non-execution state by the release means Task allocation means for assigning tasks related to information in order from the head of the ready queue, and the CPU to which the tasks are assigned by the task assignment means, execute the tasks based on the task management information storage area information of the tasks And a task execution means.
また、本願の請求項7に記載の発明(以下、第7発明という)は、第6発明において、タスク実行権解放手段は、タスク情報格納領域情報格納手段によって実行すべきタスクに係るタスク情報格納領域情報が該タスクの優先度に対応するレディキューの最後尾に格納される場合において、該実行すべきタスクの優先度よりも優先度が低いタスクが実行中であるとき、または実行が終了したタスクに係るタスク管理情報格納領域情報がタスク管理情報格納領域情報削除手段によってレディキューから削除されるときに、実行中の全タスクのタスク実行権を解放させて全CPUを一時タスク非実行状態とさせることを特徴とする。
In the invention according to
また、本願の請求項8に記載の発明(以下、第8発明という)は、第6発明または第7発明において、複数のCPUのうちに特定の機能を有する特定CPUが備えられている場合において、レディキュー作成手段は、上記特定CPUに関連付けた特定のレディキューを作成し、タスク管理情報格納領域情報格納手段は、上記特定の機能を利用する特定タスクのタスク管理情報格納領域情報については上記特定のレディキューに格納し、タスク割り当て手段は、特定のレディキューに接続された特定タスクを、該特定CPUに割り当てることを特徴とする。 In the invention according to claim 8 of the present application (hereinafter referred to as the eighth invention), in the sixth invention or the seventh invention, a specific CPU having a specific function is provided among a plurality of CPUs. The ready queue creation means creates a specific ready queue associated with the specific CPU, and the task management information storage area information storage means includes the task management information storage area information of the specific task that uses the specific function. The task assigning means stores a specific task connected to the specific ready queue, and stores the specific task in the specific ready queue.
そして、本願の請求項9に記載の発明(以下、第9発明という)は、第6発明から第8発明のいずれかにおいて、複数のCPU及び第1、第2、第3記憶装置に加え、外部割り込み処理機能を有する専用CPU及び第4、第5、第6記憶装置が備えられており、かつ、請求項6から請求項8のいずれかに記載の各手段を含む第1の制御部は、上記複数のCPU及び第1、第2、第3記憶装置を含む第1の部分を制御し、上記専用CPU及び第4、第5、第6記憶装置を含む第2の部分を、第1の複数のタスクの実行制御に係る要求を第1の制御部に行う第2の複数のタスクを制御する手段として機能させる第2の制御部は、上記第4記憶装置上に、専用CPUで共用とされて異なる優先度が設定された第2の複数のレディキューを作成する第2レディキュー作成手段と、上記第5記憶装置に記憶されている、第1の複数のタスクを実行制御する第2の複数のタスクのうちの少なくとも実行すべきタスクの優先度を設定する第2タスク優先度設定手段と、上記第6記憶装置上に、上記第2の複数のタスクのうちの少なくとも実行すべきタスクのタスク管理情報を作成する第2タスク管理情報作成手段と、該第2タスク管理情報作成手段で作成された実行すべきタスクのタスク管理情報の上記第6記憶装置上における格納領域の情報を、上記第2レディキュー作成手段で作成された第2の複数のレディキューのうちの、上記第2タスク優先度設定手段で設定された優先度と同一優先度のレディキューの最後尾に格納する第2タスク管理情報格納領域情報格納手段と、上記専用CPUで実行中のタスクの実行が終了したときに、この実行が終了したタスクに係るタスク管理情報格納領域情報をレディキューから削除するタスク第2管理情報格納領域情報削除手段と、上記第2タスク情報格納領域情報格納手段によって実行すべきタスクに係るタスク情報格納領域情報が該タスクの優先度に対応するレディキューの最後尾に格納される場合において、該実行すべきタスクの優先度よりも優先度が低いタスクが実行中であるときは、実行中のタスクのタスク実行権を解放させてCPUを一時タスク非実行状態とさせる第2タスク実行権解放手段と、該第2タスク実行権解放手段でタスクのタスク実行権が解放されるときに、この解放されるタスクの状態を当該タスクのタスク管理情報に記録する第2タスク実行権解放時状態記録手段と、上記第2タスク実行権解放手段でタスク非実行状態とされたCPUに、上記第2の複数のレディキューに格納されたタスク管理情報格納領域情報に係るタスクのうちの、優先度の高いレディキューの先頭に格納されたタスク情報格納領域情報に係るタスクを割り当てる第2タスク割り当て手段と、該第2タスク割り当て手段でタスクを割り当てたCPUに、当該タスクを、当該タスクのタスク管理情報格納領域情報に基づいて実行させる第2タスク実行手段とを有することを特徴とする。 The invention according to claim 9 of the present application (hereinafter referred to as the ninth invention), in any of the sixth invention to the eighth invention, in addition to the plurality of CPUs and the first, second, and third storage devices, A first control unit including a dedicated CPU having an external interrupt processing function and fourth, fifth, and sixth storage devices, and including each unit according to any one of claims 6 to 8. The first portion including the plurality of CPUs and the first, second and third storage devices is controlled, and the second portion including the dedicated CPU and the fourth, fifth and sixth storage devices is controlled as the first portion. The second control unit that functions as a means for controlling the second plurality of tasks that requests the first control unit to execute requests related to the execution control of the plurality of tasks is shared by the dedicated CPU on the fourth storage device. To create a second plurality of ready queues with different priorities A second task for setting a priority of at least a task to be executed among a plurality of second tasks stored in the fifth storage device and controlled to execute the first plurality of tasks. Priority setting means; second task management information creating means for creating task management information of at least a task to be executed out of the second plurality of tasks on the sixth storage device; and the second task management. The information of the storage area on the sixth storage device of the task management information of the task to be executed created by the information creating means is stored in the second plurality of ready queues created by the second ready queue creating means. The second task management information storage area information storage means for storing at the tail of the ready queue having the same priority as the priority set by the second task priority setting means, and the dedicated CPU Task second management information storage area information deletion means for deleting task management information storage area information relating to the task for which execution has ended from the ready queue when the execution of the current task is completed, and the second task information storage area When task information storage area information related to a task to be executed by the information storage means is stored at the tail of the ready queue corresponding to the priority of the task, the priority is lower than the priority of the task to be executed When the task is being executed, the second task execution right releasing means for releasing the task execution right of the task being executed and causing the CPU to be in a temporary task non-execution state, and the second task execution right releasing means Second task execution right release state recording means for recording the state of the released task in the task management information of the task when the task execution right is released; The CPU in the task non-execution state by the second task execution right releasing means has a higher priority among the tasks related to the task management information storage area information stored in the second plurality of ready queues. A second task assigning means for assigning a task related to task information storage area information stored at the head of the queue, and a task management information storage area for the task to the CPU assigned the task by the second task assignment means And a second task execution means that is executed based on the information.
次に、本発明の効果について説明する。 Next, the effect of the present invention will be described.
まず、第1発明によれば、タスクを処理するタスク処理手段としての複数のCPUを有する組込みコンピュータにおいて、上記各CPUで共用とされて異なる優先度が設定された複数のレディキューが作成され、第2記憶装置に記憶されている複数のタスクのうちの少なくとも実行すべきタスクの優先度が設定され、第3記憶装置に、上記複数のタスクのうちの少なくとも実行すべきタスクのタスク管理情報が作成される。 First, according to the first invention, in a built-in computer having a plurality of CPUs as task processing means for processing tasks, a plurality of ready queues that are shared by the CPUs and set with different priorities are created. The priority of at least a task to be executed among the plurality of tasks stored in the second storage device is set, and task management information of at least the task to be executed among the plurality of tasks is stored in the third storage device. Created.
そして、この実行すべきタスクのタスク管理情報の上記第3記憶装置上における格納領域の情報が、上記複数のレディキューのうちの、上記タスク優先度設定手段で設定された優先度と同一優先度のレディキューの最後尾に格納される。 また、上記複数のCPUで実行中のタスクのうちのいずれかのタスクの実行が終了したときに、この実行が終了したタスクに係るタスク管理情報格納領域情報がレディキューから削除される。 The information of the storage area on the third storage device of the task management information of the task to be executed is the same priority as the priority set by the task priority setting means in the plurality of ready queues. Stored at the end of the ready queue. Further, when the execution of any of the tasks being executed by the plurality of CPUs is completed, the task management information storage area information relating to the task for which the execution has been completed is deleted from the ready queue.
そして、実行すべきタスクに係るタスク情報格納領域情報が該タスクの優先度に対応するレディキューの最後尾に格納される場合において、該実行すべきタスクの優先度よりも優先度が低いタスクが実行中であるときは、実行中の全タスクのタスク実行権が解放されて全CPUが一時タスク非実行状態とされると共に、全タスクの実行権が解放されるときに、この解放される各タスクの状態が当該各タスクのタスク管理情報に記録される。 When task information storage area information relating to a task to be executed is stored at the tail of the ready queue corresponding to the priority of the task, a task having a lower priority than the priority of the task to be executed When the task is being executed, the task execution right of all the tasks being executed is released and all CPUs are set to the temporary task non-execution state. The task status is recorded in the task management information of each task.
そして、上記タスク非実行状態とされた各CPUに、上記複数のレディキューに格納されたタスク管理情報格納領域情報に係るタスクのうちの、優先度の高いレディキューに格納されたタスク情報格納領域情報に係るタスクが、該レディキューの先頭側から順に割り当てられ、タスクが割り当てられたCPUにより、当該タスクが、当該タスクのタスク管理情報格納領域情報に基づいて実行される。 The task information storage area stored in the ready queue having a high priority among the tasks related to the task management information storage area information stored in the plurality of ready queues in each CPU in the task non-execution state Tasks related to information are assigned in order from the head of the ready queue, and the task is executed by the CPU to which the task is assigned based on the task management information storage area information of the task.
これによれば、実行すべきタスクの優先度よりも優先度が低いタスクが実行中であるときは、該タスクが即座に複数のCPUのうちのいずれかのCPUに割り当てられて実行されることとなり、複数のCPUを有する組込みコンピュータにおいても優先度の高いタスクのリアルタイム処理が確実に確保される。 According to this, when a task having a lower priority than the priority of the task to be executed is being executed, the task is immediately assigned to any one of a plurality of CPUs and executed. Thus, even in an embedded computer having a plurality of CPUs, real-time processing of tasks with high priority is ensured.
また、複数のCPUで実行中の複数のタスクのいずれかについて実行が終了したときには、このタスクの実行が終了したCPUに即座にタスクが割り当てられて実行されることとなり、タスク処理が終了したCPUにいつまでもタスクが割り当てられない状態が生じることがない。 Further, when execution of any of a plurality of tasks being executed by a plurality of CPUs is completed, the task is immediately assigned to the CPU that has completed the execution of the task and executed, and the CPU that has completed the task processing. There is no case where a task is not assigned indefinitely.
つまり、複数のCPUにタスクが適切に動的分散されて、各CPUの負荷のばらつきが少なくなると共に、優先度の高いタスクの迅速な処理が確保される。 That is, tasks are appropriately dynamically distributed to a plurality of CPUs, variation in the load of each CPU is reduced, and prompt processing of tasks with high priority is ensured.
また、全CPUにタスクが割り当て直されることとなるから、これらのCPUに、確実に、処理の優先順位が最も高いタスクから順に割り当てられることとなる。 Further, since tasks are reassigned to all CPUs, these CPUs are surely assigned in order from the task having the highest processing priority.
なお、第1記憶装置、第2記憶装置、及び第3記憶装置は、1つの記憶装置を共用してもよい。 Note that the first storage device, the second storage device, and the third storage device may share one storage device.
次に、第2発明によれば、複数のCPUで実行中のタスクのうちのいずれかのタスクの実行が終了したときも、このタスクの実行が終了したCPUに即座にタスクが割り当てられて実行されることとなり、タスク実行が終了したCPUにいつまでもタスクが割り当てられない状態が生じることがない。 Next, according to the second invention, even when the execution of any of the tasks being executed by a plurality of CPUs is completed, the task is immediately assigned to the CPU that has completed the execution of the task and executed. As a result, there is no case where a task is not assigned to a CPU for which task execution has been completed.
また、第3発明によれば、複数のCPUのうちに特定の機能を有する特定CPUが備えられている場合において、上記特定CPUに関連付けた特定のレディキューが作成され、上記特定の機能を利用する特定タスクは、複数のレディキューのうちの特定のレディキューに接続され、特定のレディキューに接続された特定タスクは、特定CPUに割り当てられることとなる。 According to the third invention, when a specific CPU having a specific function is provided among a plurality of CPUs, a specific ready queue associated with the specific CPU is created and the specific function is used. The specific task to be connected is connected to a specific ready queue among the plurality of ready queues, and the specific task connected to the specific ready queue is assigned to a specific CPU.
これによれば、例えば特定タスクの処理は特定CPUでしかできないような場合に、特定タスクが、当該タスクを処理することができないCPUに割り当てられることがない。また、特定タスクの処理は特定CPU以外のCPUでもできるが特定CPUで処理すればよりタスク処理速度の向上が望めるような場合に、当該特定タスクを当該タスクの実行に適した特定CPUによって処理することができ、この結果、特定タスクの処理速度の向上等が図れる。 According to this, for example, when a specific task can be processed only by a specific CPU, the specific task is not assigned to a CPU that cannot process the task. Further, the specific task can be processed by a CPU other than the specific CPU, but if the specific CPU can improve the task processing speed, the specific task is processed by the specific CPU suitable for executing the task. As a result, the processing speed of the specific task can be improved.
なお、特定レディキューよりも優先度が高いレディキューにタスクが存在する場合、当該優先度が高いレディキューのタスクを特定CPUに割り当てるようにしてもよいし、特定レディキューに存在するタスクを、優先度が高いレディキューに存在するタスクに優先して特定CPUに割り当てるようにしてもよい。また、特定レディキューには特定タスクのみ接続するようにしてもよいし、特定タスク以外のタスクも接続するようにしてもよい。 If a task exists in a ready queue having a higher priority than the specific ready queue, the task of the ready queue having a higher priority may be assigned to the specific CPU, or the task existing in the specific ready queue may be You may make it allocate to a specific CPU in priority to the task which exists in the ready queue with a high priority. Further, only a specific task may be connected to the specific ready queue, or a task other than the specific task may be connected.
さらに、第4発明によれば、組込みコンピュータ制御プログラムには、コンピュータにおける複数のCPU及び第1、第2、第3記憶装置を含む第1の部分を請求項1から請求項3のいずれかに記載の各手段として機能させる第1の制御部に加えて、外部割り込み処理機能を有する専用CPU及び第4、第5、第6記憶装置を含む第2の部分を、第1の複数のタスクの実行制御の要求を第1の制御部に行う第2の複数のタスクを制御する手段として機能させる第2の制御部が備えられているから、専用CPUで外部割込み処理が処理される。なお、この場合、他の複数のCPUで外部割込み処理を行わないようにしてもよく、これによれば他の複数のCPUの外部割込み処理の負荷が解消される。また、第2の制御部で第1の制御部を状況に応じて制御することができる。また、第1の制御部と第2の制御部とはほぼ同じ構成であるから、専用CPUで外部割込み処理を行う仕組みを容易に構築することができると共に、第1の制御部及び第2の制御部をそれぞれの機能にあわせて最適化することができる。
Further, according to the fourth invention, the embedded computer control program includes a first part including a plurality of CPUs and first, second, and third storage devices in the computer according to any one of
また、第5発明によれば、第1発明から第4発明のいずれかの組込みシステム制御用プログラムを記録したコンピュータ読み取り可能な記録媒体が構成される。 According to the fifth aspect of the invention, there is provided a computer-readable recording medium on which the embedded system control program according to any of the first to fourth aspects of the invention is recorded.
次に、第6発明から第9発明は、第1発明から第4発明のプログラムに対応する組込みシステムの発明であって、これによれば、第1発明から第4発明で説明した作用効果が組込みシステムで達成される。 Next, the sixth invention to the ninth invention are inventions of embedded systems corresponding to the programs of the first invention to the fourth invention, and according to this, the functions and effects described in the first invention to the fourth invention are achieved. Achieved with embedded systems.
以下、本発明の実施の形態について説明する。 Hereinafter, embodiments of the present invention will be described.
まず、図1を用いて本発明に係る組込みシステムAについて説明すると、該組込みシステムAは、複数のCPUB…Bと、該複数のCPUB…Bで共用の記憶装置Cと、上記記憶装置Cに、上記各CPUB…Bで共用とされて異なる優先度が設定された複数のレディキューD…Dを作成するレディキュー作成手段Eと、上記記憶装置Cに記憶されている複数のタスクF…Fのうちの少なくとも実行すべきタスクF…Fの優先度を設定するタスク優先度設定手段Gと、上記記憶装置Cに、上記複数のタスクF…Fのうちの少なくとも実行すべきタスクF…Fのタスク管理情報H…Hを作成するタスク管理情報作成手段Iと、該タスク管理情報作成手段Iで作成された実行すべきタスクF…Fのタスク管理情報H…Hの上記記憶装置C上における格納領域の情報J…Jを、上記レディキュー作成手段Eで作成された複数のレディキューD…Dのうちの、上記タスク優先度設定手段Gで設定された優先度と同一優先度のレディキューDの最後尾に格納するタスク管理情報格納領域情報格納手段Kと、上記複数のCPUB…Bで実行中のタスクF…FのうちのいずれかタスクFの実行が終了したときに、この実行が終了したタスクFに係るタスク管理情報格納領域情報JをレディキューDから削除するタスク管理情報格納領域情報削除手段Lと、上記タスク情報格納領域情報格納手段Kによって実行すべきタスクFに係るタスク情報格納領域情報Jが該タスクFの優先度に対応するレディキューDの最後尾に格納される場合において、該実行すべきタスクFの優先度よりも優先度が低いタスクF…Fが実行中であるときは、実行中の全タスクF…Fのタスク実行権を解放させて全CPUB…Bを一時タスク非実行状態とさせるタスク実行権解放手段Mと、該タスク実行権解放手段Mで全タスクF…Fの実行権が解放されるときに、この解放された各タスクF…Fの状態を当該各タスクF…Fのタスク管理情報H…Hに記録するタスク実行権解放時状態記録手段Nと、上記タスク実行権解放手段Mでタスク非実行状態とされた各CPUB…Bに、上記複数のレディキューD…Dに格納されたタスク管理情報格納領域情報J…Jに係るタスクF…Fのうちの、優先度の高いレディキューD…Dに格納されたタスク情報格納領域情報J…Jに係るタスクF…Fを、該レディキューD…Dの先頭側から順に割り当てるタスク割り当て手段Oと、該タスク割り当て手段OでタスクF…Fを割り当てたCPUB…Bに、当該タスクF…Fを、当該タスクF…Fのタスク管理情報格納領域情報J…Jに基づいて実行させるタスク実行手段Pとを有する。以下、この組込みシステムAについて、第1〜第3の実施の形態を通して詳しく説明する。なお、この組込みシステムAにおいては、特許請求の範囲の請求項1〜3に係る第1,第2,第3記憶装置は共用とされている。
First, the embedded system A according to the present invention will be described with reference to FIG. 1. The embedded system A includes a plurality of CPUB ... B, a storage device C shared by the plurality of CPUB ... B, and the storage device C. , A ready queue creation means E for creating a plurality of ready queues D... D that are shared by the CPUs B and set with different priorities, and a plurality of tasks F... F stored in the storage device C. Task priority setting means G for setting the priority of at least the task F... F to be executed, and at least the tasks F... F to be executed among the plurality of tasks F. Task management information creation means I for creating task management information H ... H, and task management information H ... H of the task F ... F to be executed created by the task management information creation means I on the storage device C The storage area information J... J is used as a ready queue having the same priority as the priority set by the task priority setting means G among the plurality of ready queues D... D created by the ready queue creation means E. When the execution of any one of the task management information storage area information storage means K stored at the end of D and the tasks F... F being executed by the CPUs B. Task management information storage area information deletion means L for deleting the task management information storage area information J related to the finished task F from the ready queue D, and task information related to the task F to be executed by the task information storage area information storage means K When the storage area information J is stored at the end of the ready queue D corresponding to the priority of the task F, a task having a lower priority than the priority of the task F to be executed When F... F is being executed, task execution right releasing means M for releasing the task execution right of all currently executing tasks F... F and making all CPU B. When the right release means M releases the right to execute all the tasks F ... F, the task execution records the state of each released task F ... F in the task management information H ... H of each task F ... F. The task management information storage area information J stored in the plurality of ready queues D... D is stored in each of the CPU B... B that is in a task non-execution state by the right release state recording means N and the task execution right release means M. Among the tasks F... F related to J, the task F storage F related to the task information storage area information J... J stored in the ready queue D. Task assignment means O assigned in order The task execution means P for causing the CPUs B ... B to which the tasks F ... F are assigned by the task assignment means O to execute the tasks F ... F based on the task management information storage area information J ... J of the tasks F ... F. And have. Hereinafter, the embedded system A will be described in detail through the first to third embodiments. In this embedded system A, the first, second and third storage devices according to
まず、第1の実施の形態について説明する。 First, the first embodiment will be described.
図2に示すように、第1の実施の形態の組込みシステムを構成する組込みコンピュータ1は、複数のCPU11−1〜11−n(以下、CPU1,CPU2,CPU3,…CPUnという)と、単一の共有メモリ12(図1の記憶装置Cに相当)と、これらを接続する共有バス13とを有する。
As shown in FIG. 2, the embedded
共有メモリ12は、ROM及びRAMからなる。該共有メモリ12には、請求項1及び請求項2に記載の組込みコンピュータ制御プログラムを構成して、組込みコンピュータ1を図1に記載の各手段として機能させるリアルタイムオペレーティングシステム21(以下、OS21という)と、複数のタスク22…22(図1のタスクF…Fに相当)と、該OS21に関する種々のパラメータや一時データ等からなるOSデータ23とが格納されている。
The shared
OS21は、上記共有メモリ12からCPU1〜CPUn上にそれぞれ読み込まれて実行される。換言すれば、共有メモリ12上に格納されているOS21は1つであるが、各CPU1〜CPUn上で並行して実行され、各CPU上で実行されるOS21により当該各CPU上でのタスク22の実行が制御されることとなる。なお、このOS21の機能の詳細については後述する。
The
OSデータ23は、上記複数のCPU上でそれぞれ実行されるOS21で共有のOS共有データ23aと、上記複数のCPU上でそれぞれ実行されるOS21毎に固有の非共有データ23bとからなる。OS共有データ23aには、複数のレディキュー(図1のレディキューD…Dに相当、図3参照)の状態を管理するレディキューテーブル(図4参照)が含まれている。なお、その詳細については後述する。
The
OS21は、CPU1〜CPUnがタスク22…22を実行しているときにはCPU実行状態と判定し、タスク22…22を実行していないときはCPUアイドル状態(特許請求の範囲に記載のタスク非実行状態)と判定する。
The
タスク22は、OS21によって、実行状態、実行可能状態、待ち状態、休止状態のうちのいずれかの状態に制御される。ここで、実行状態とは、タスク22がOS21によりCPU1〜CPUnのうちのいずれかのCPUに割り当てられて実行中の状態を意味し、実行可能状態とは、タスク22の実行準備は整っているが、そのタスク22よりも優先順位の高いタスク22が実行中であるためそのタスク22を実行できない状態を意味し、待ち状態とは、起動はされたがタスク22の実行条件が整わないため実行できない状態を意味し、休止状態とはタスク22が起動されていない状態をいう。
The
上記タスク22…22の、例えば上記実行状態等の情報、タスク22…22の優先度等の情報を含むタスク管理情報(図1のタスク管理情報H…Hに相当)は、OS21によって、例えばOS21の起動時にタスク22…22の全てに対して作成され、上記メモリ12上のOS共有データ23aの一部として記憶される。
Task management information (equivalent to the task management information H... H in FIG. 1) of the
また、タスク22…22の実行の優先度は、OS21によって、タスク重要性、緊急性、サイズ等に基づいて、例えばOS21の起動時にタスク22…22毎に設定され、上記タスク管理情報の一つの情報として上記メモリ12上に記憶される。なお、この優先度は、タスク22…22がOS21に対して要求することにより、または、OS21によって、起動後に変更してもよい。
Also, the priority of execution of the
図3は、優先度毎に設けられたレディキューの一例を示す説明図であり、図4は、このような優先度毎のレディキューの状態を管理するレディキューテーブルの構成を示す。このレディキューテーブルは、各レディキュー毎に、当該優先度のレディキューに接続されたタスクの次に接続されたタスクのタスク情報を格納している領域の上記メモリ12上における先頭アドレス情報と、1つ前に接続されたタスクのタスク情報を格納している領域の先頭アドレス情報とからなるタスク管理情報格納領域情報とを格納しており、OS21の起動時に共有メモリ12上のOS共有データ23aの一部として作成される。換言すれば、OS21の起動時に、異なる優先度を持つレディキューが複数作成されることとなる。
FIG. 3 is an explanatory diagram showing an example of a ready queue provided for each priority, and FIG. 4 shows a configuration of a ready queue table for managing the status of the ready queue for each priority. The ready queue table includes, for each ready queue, start address information on the
なお、図3は7つのタスク管理情報格納領域情報が格納されている状態を示したが、OS21の起動時にはタスク管理情報格納領域情報は格納されておらず、例えば、タスク22の実行条件が成立したときに、OS21によって、上記複数のレディキューのうちの、当該タスク22の優先度と同一優先度のレディキューの最後尾に格納され、タスク22の実行が終了したときに、この実行が終了したタスク22に係るタスク管理情報格納領域情報がレディキューから削除される。
FIG. 3 shows a state in which seven pieces of task management information storage area information are stored, but no task management information storage area information is stored when the
ここで、本実施の形態に係るOS21は、スケジューリング方式として、イベントドリブン型タスク優先度順スケジューリング方式を採用している。なお、スケジューリングとは、上記レディキューテーブルを検索して次に実行すべきタスクを決定する(タスクをCPUに割り当てることをいう)。
Here, the
具体的には、各CPU1〜CPUn上で実行中のOS21は、(1)実行状態のタスク22または割込み処理から他タスク22の起動(休止状態から実行可能状態への移行)の要求(システムコール等)があったとき、(2)実行状態のタスク22または割込み処理から他タスク22の停止(実行状態から休止状態への移行)の要求があったとき、(3)実行状態のタスク22から自タスク22の待ち状態への移行の宣言があったとき、(4)実行状態のタスク22または割込み処理から他タスク22の待ち状態解除(待ち状態から実行可能状態への移行)の要求があったとき、(5)実行状態のタスク22から自タスク終了の宣言があったとき、(6)実行可能状態のタスクに対し、実行状態のタスクのタスク優先度よりも高優先度のタスク優先度が設定されたとき(システムコール等)のうちのいずれか1つの条件が成立して、実行状態のタスク22の優先度よりも優先度の高いレディキュー(の最後尾)にタスク情報格納領域情報が格納されるとき(接続されるタスクFの優先度よりも優先度が低いタスクが実行状態であるとき)、または実行状態のタスク22がレディキューから切り離されるとき(以下、「所定のスケジューリング条件が成立したとき」という)には、排他制御として、上記複数のCPU1〜CPUnで実行中の全タスク22…22の実行権を解放させてCPU1〜CPUnの全てを一時CPUアイドル状態(タスク非実行状態)とさせると共に、この解放される各タスク22…22の解放されるときの状態を当該各タスク22…22のタスク情報に記録した上で、CPUアイドル状態のCPU1〜CPUnに、上記複数のレディキューに格納されたタスク管理情報格納領域情報に係るタスク22…22のうちの、優先度の高いレディキューに格納されたタスク情報格納領域情報に係るタスク22…22を、該レディキューの先頭側から順に割り当てる。そして、タスク22…22を割り当てたCPU1〜CPUnに、当該タスク22…22を、当該タスク22…22のタスク管理情報格納領域情報に基づいて実行させる。
Specifically, the
なお、以後、説明の便宜上、レディキューにタスク管理情報格納領域情報が格納されていることを、レディキューにタスクT1〜T7が接続されているといい、レディキューからタスク管理情報格納領域情報を削除することを、レディキューからタスクを切り離すという。 Hereinafter, for convenience of explanation, it is said that task management information storage area information is stored in the ready queue, that tasks T1 to T7 are connected to the ready queue, and task management information storage area information is stored in the ready queue. Deleting is called disconnecting the task from the ready queue.
次に、上記所定のスケジューリング条件が成立したときに行われるこのリアルタイムOS21によるスケジューリングについて、図5のフローチャートを用いて説明する。
Next, the scheduling by the real-
まず、ステップS1で、割り当て対象のCPUの番号cとして1を設定する。
なお、CPU番号とは、上記CPU1〜CPUnの添字1〜nのことを意味する。次いで、ステップS2で、スケジューリング対象のレディキューの優先度kとして0を設定すると共に、ステップS3で、kに1を加算した後、ステップS4で、kが所定値m以下か否かを判定し、その判定がYESのとき、すなわち、kが所定値m以下のときは、さらに、ステップS5で、優先度kのレディキューにタスクが接続されているか否かを判定する。
First, in step S1, 1 is set as the number c of the allocation target CPU.
The CPU number means the
そして、ステップS5の判定がNOのとき、すなわち、優先度kのレディキューにタスクが接続されていときは、ステップS3に戻り、以後の処理を繰り返す。ここで、ステップS4の所定値mは、OS21が設定する優先度の最大値である。つまり、kが所定値mより大きくなったときは、全レディキューの検索が終了したわけであり、スケジューリングを終了する。
If the determination in step S5 is NO, that is, if a task is connected to the ready queue having the priority k, the process returns to step S3 and the subsequent processing is repeated. Here, the predetermined value m in step S4 is the maximum priority set by the
一方、上記ステップS5の判定がYESのとき、すなわち、優先度kのレディキューにタスクが存在するときは、ステップS6で、タスク順位pとして1を設定する。ここで、このタスク順位pは、優先度kのレディキュー上において対象タスクが先頭タスクから何番目に位置するかを示す値である。次いで、ステップS7で、優先度kのレディキューにおける先頭からp番目のタスクを、CPU番号cのCPUに割り当てる。 On the other hand, when the determination in step S5 is YES, that is, when a task exists in the ready queue having the priority k, 1 is set as the task order p in step S6. Here, the task order p is a value indicating the position of the target task from the top task on the ready queue having the priority k. Next, in step S7, the p-th task from the top in the ready queue with the priority k is assigned to the CPU with the CPU number c.
次いで、ステップS8で、CPU番号cに1を加算すると共に、ステップS9で、CPU番号cがCPU数nを超えているか否かを判定し、NOのとき、すなわち超えているときは、ステップS10で、タスク順位pに1を加算すると共に、ステップS11で、タスク順位pが優先度kのレディキューに接続されたタスクの数よりも大きいか否かを判定する。そして、このステップS11の判定がYESのとき、すなわち、タスク順位pが優先度kのレディキューに接続されたタスクの数よりも大きく、優先度kのレディキューにタスク順位pのタスクが存在しないときは、ステップS3に戻って以後の処理を繰り返し、NOのときは、ステップS7に戻って以後の処理を繰り返す。 Next, in step S8, 1 is added to the CPU number c, and in step S9, it is determined whether or not the CPU number c exceeds the number of CPUs n. If NO, that is, if it exceeds, step S10. In step S11, it is determined whether or not the task order p is larger than the number of tasks connected to the ready queue having the priority k. When the determination in step S11 is YES, that is, the task rank p is larger than the number of tasks connected to the ready queue with the priority k, and there is no task with the task rank p in the ready queue with the priority k. If so, the process returns to step S3 and the subsequent processes are repeated. If NO, the process returns to step S7 and the subsequent processes are repeated.
一方、上記ステップS9の判定がYESのとき、すなわち、CPU番号cがCPU数nを超えたときは、全てのCPUにタスクが割り当てられたわけであり、スケジューリングを終了する。 On the other hand, when the determination in step S9 is YES, that is, when the CPU number c exceeds the CPU number n, the task is assigned to all the CPUs and the scheduling is terminated.
次に、図6〜図8を用いて、上記所定のスケジューリング条件が成立したときに行われる本OS21によるスケジューリングの一例を説明する。なお、この説明に際しては、組込みコンピュータ1は、図2において、n=3の場合、すなわち、3つのCPU1,CPU2,CPU3を有するものとする。また、優先度1〜5の5つのレディキューを有するものとする。
Next, an example of scheduling by the
まず、上記所定のスケジューリング条件が成立すると、CPU1,2,3で実行中のタスクのタスク実行権が全て解放されると共に、実行中の各タスクのタスク実行権解放時の状態が各タスク毎に各タスク情報に記録される。なお、このとき、7つのセカンダリタスク22…22(以下、T1〜T7という)が実行可能状態になったものとする。具体的には、図3に示すように、優先度1のレディキューにタスクT1が、優先度3のレディキューにタスクT2、及びタスクT3が、優先度5のレディキューにタスクT4、タスクT5、及びタスクT6が、優先度6のレディキューにタスクT7がそれぞれ接続されているものとする。なお、優先度3のレディキューにはタスクは接続されていないものとする。タスクのタスク実行権が全て解放された結果、CPU1,2,3の全てがCPUアイドル状態となっている。
First, when the predetermined scheduling condition is satisfied, all task execution rights of the tasks being executed by the
まず、OS21は、これらのCPUアイドル状態のCPU1,CPU2,CPU3のうち、CPU1にタスクを割り当てるために、レディキューテーブルを優先度の高いレディキューから順に検索する。この検索の結果、図6に示すように、優先度1のレディキューにタスクT1が接続されているので、OS21は、優先度1のレディキューの先頭のタスクT1をCPUlに割り当てる。つまり、タスクT1がCPU1によって実行されることとなる。
First, the
次に、OS21は、CPU2にタスクを割り当てるため、優先度1のレディキューの先頭から2番目にタスクが接続されているかを検索するが、タスクが接続されていないので、次いで、優先度2のレディキューを検索する。この検索の結果、優先度2のレディキューにはタスクが接続されていので、OS21は、優先度2のレディキューの先頭のタスクT2をCPU2に割り当てる。つまり、タスクT2がCPU2によって実行されることとなる。
Next, in order to assign a task to the
次に、OS21は、CPU3にタスクを割り当てるため、優先度2のレディキューの先頭から2番目にタスクが接続されているかを検索すると、タスクT3が接続されているので、OS21は、優先度2のレディキューの先頭から2番目のタスクT3をCPU3に割り当てる。つまり、タスクT3がCPU3によって実行されることとなる。
Next, since the
そして、これにより、CPU1,2,3の全てにタスクが割り当てられ、実行状態となったため、OS21は、スケジューリングを終了する。
As a result, the task is assigned to all of the
なお、タスク実行権が解放されていたタスクについては、該解放されたときの状態から再開されることとなる。 Note that a task whose task execution right has been released is resumed from the state when it was released.
ここで、上記のように割り当てられて現在実行中の例えばタスクT1が、OS21にメモリ12に格納されているタスクT8の起動を要求し、該タスクT8がOS21によって優先度1のレディキューに接続されるときには、所定のスケジューリング条件が成立し、現在実行中のタスクT1,T2,T3のタスク実行権が解放されると共に、実行中のタスクT1,T2,T3のタスク実行権解放時の状態が各タスクT1,T2,T3毎に各タスク情報に記録され、CPU1,2,3の全てがCPUアイドル状態となって、スケジューリングが実行される。そして、この場合、前述したのと同様にレディキューテーブルが検索され、図7に示すように、まず、CPU1にタスクT1が割り当てられ、次いで、CPU2にタスクT8が割り当てられ、次いで、CPU3にタスクT2が割り当てられることとなる。なお、この場合、タスクT1,T2については、タスク実行権が解放されたときの実行状態から再開される。
Here, for example, task T1, which is allocated as described above and is currently being executed, requests activation of task T8 stored in
そして、例えば、上記のように割り当てられて現在実行中の例えばタスクT1の実行が終了し、タスクT1がOS21にタスクの実行終了の宣言をし、該OS21によりレディキューからタスクT1が削除されるときには、所定のスケジューリング条件が成立し、現在実行中のタスクT2,T3のタスク実行権が解放されると共に、該実行中のタスクT2,T3のタスク実行権解放時の状態が各タスクT2,T3毎に各タスク情報に記録され、スケジューリングが実行される。そして、この場合、前述したのと同様にレディキューテーブルが検索され、図8に示すように、まず、CPU1にタスクT8が割り当てられ、次いで、CPU2にタスクT2が割り当てられ、次いで、CPU3にタスクT3が割り当てられることとなる。なお、この場合、タスクT2,T3については、タスク実行権が解放されたときの実行状態から再開される。
Then, for example, the execution of task T1, which is allocated as described above and is currently being executed, is terminated, task T1 declares the task execution end to
以上のように、第1の実施の形態に係る組込みシステムによれば、実行すべきタスクの優先度よりも優先度が低いタスクが実行中であるときは、実行すべきタスクが即座にCPU1,2,3の全てに割り当てられて実行されることとなり、複数のCPU1,2,3を有する組込みコンピュータにおいても優先度の高いタスクのリアルタイム処理が確実に確保される。
As described above, according to the embedded system according to the first embodiment, when a task having a lower priority than the priority of the task to be executed is being executed, the task to be executed is immediately executed by the
また、複数のCPU1,2,3で実行中の複数のタスクのいずれかについて実行が終了したときには、このタスクの実行が完了したCPUに即座にタスクが割り当てられて実行されることとなり、タスク処理が終了したCPUにいつまでもタスクが割り当てられない状態が生じることがない。
Further, when the execution of any of the plurality of tasks being executed by the plurality of
つまり、複数のCPU1,2,3にタスクが適切に動的分散されて、各CPUの負荷のばらつきが少なくなると共に、優先度の高いタスクの迅速な処理が確保される。
In other words, the tasks are appropriately dynamically distributed to the plurality of
また、全CPU1,2,3にタスクが割り当て直されることとなるから、これらのCPU1,2,3に、確実に、処理の優先順位が最も高いタスクから順に割り当てられることとなる。
In addition, since tasks are reassigned to all the
次に、本発明の第2の実施の形態について説明する。 Next, a second embodiment of the present invention will be described.
この第2の実施の形態に係る組込みシステムは、第1の実施の形態に係る組込みシステムにおいて、優先度毎のレディキューに、該優先度のレディキューに接続されたタスクを処理するCPUを関連付けしたものであり、以下、図9〜図16を用いて説明する。 In the embedded system according to the second embodiment, in the embedded system according to the first embodiment, a CPU that processes a task connected to the ready queue having the priority is associated with the ready queue for each priority. This will be described below with reference to FIGS.
図9に示すように、この第2の実施の形態の組込みシステムを構成する組込みコンピュータ31は、複数のCPU41−1,CPU41−2,CPU41−3,…CPU41−n(図1のCPUB…Bに相当。以下、CPU1,CPU2,CPU3,…CPUnという)と、単一の共有メモリ42(図1の記憶装置Cに相当)と、これらを接続する共有バス43とを有する。
As shown in FIG. 9, the embedded
CPU1及びCPU2は、他のCPUが有する機能に加え、それぞれ、描画信号処理や音声処理等に適した特定の機能(これらの処理は一例である)を有する。
The
共有メモリ42は、ROM及びRAMからなる。該共有メモリ42には、請求項1から請求項3に記載の組込みコンピュータ制御プログラムを構成して、組込みコンピュータ1を図1に記載の各手段として機能させるリアルタイムオペレーティングシステム51(以下、OS51という)と、複数のタスク52…52(図1のタスクF…Fに相当)と、該OS51に関する種々のパラメータや一時データ等からなるOSデータ53とが格納されている。
The shared
OS51は、上記共有メモリ42からCPU1〜CPUn上にそれぞれ読み込まれて実行される。換言すれば、共有メモリ42上に格納されているOS51は1つであるが、各CPU1〜CPUn上で並行して実行され、各CPU上で実行されるOS51により当該各CPU上でのタスク52の実行が制御されることとなる。なお、このOS51の機能の詳細については後述する。
The
OSデータ53は、上記複数のCPUでそれぞれ実行されるOS51で共有のOS共有データ53aと、上記複数のCPU上でそれぞれ実行されるOS51毎に固有の非共有データ53bとからなる。OS共有データ53aには、複数のレディキュー(図1のレディキューD…Dに相当、図10参照)を管理するレディキューテーブル(図11参照)が含まれている。なお、その詳細については後述する。
The
OS51は、CPU1〜CPUnがタスク52…52を実行しているときにはCPU実行状態と判定し、タスク52…52を実行していないときはCPUアイドル状態(特許請求の範囲に記載のタスク非実行状態)と判定する。
The
タスク52は、OS51によって、実行状態、実行可能状態、待ち状態、休止状態のうちのいずれかの状態に制御される。ここで、実行状態とは、タスク52がOS51によりCPU1〜CPUnのうちのいずれかのCPUに割り当てられて実行中の状態を意味し、実行可能状態とは、タスク52の実行準備は整っているが、そのタスク52よりも優先順位の高いタスク52が実行中であるためそのタスク52を実行できない状態を意味し、待ち状態とは、起動はされたがタスク52の実行条件が整わないため実行できない状態を意味し、休止状態とは、タスク52が起動されていない状態をいう。
The
上記タスク52…52の、例えば上記実行状態等の情報、タスク優先度等の情報を含むタスク管理情報(図1のタスク管理情報H…Hに相当)、は、OS51によって、例えばOS51の起動時にタスク52…52の全てに対して作成され、上記メモリ42上のOS共有データ53aの一部として記憶される。
Task management information (equivalent to the task management information H... H in FIG. 1) of the
また、タスク52…52の実行の優先度は、OS51によって、タスク重要性、緊急性、サイズ等に基づいて、例えばOS51の起動時にタスク52…52毎に設定され、上記タスク管理情報の一つの情報として上記メモリ42上に記憶される。なお、この優先度は、タスク52…52がOS51に対して要求することにより、または、OS51によって、起動後に変更してもよい。
Further, the priority of execution of the
図10は、優先度毎に設けられたレディキューの一例を示す説明図であり、図11は、このような優先度毎のレディキューの状態を管理するレディキューテーブルの構成を示す。このレディキューテーブルは、各レディキュー毎に、当該優先度のレディキューに接続されたタスクの次に接続されたタスクのタスク情報(タスク管理情報H…Hに相当に相当。タスクコントロールブロック)を格納している領域の上記メモリ42上における先頭アドレス情報と、1つ前に接続されたタスクのタスク情報を格納している領域の先頭アドレス情報とからなるタスク管理情報格納領域情報と、その優先度のタスクを実行可能なCPUの属性情報とを格納しており、OS51の起動時に共有メモリ42上のOS共有データ43aの一部として作成される。換言すれば、OS21の起動時に、異なる優先度を持つレディキューが複数作成されることとなる。また、各レディキューに、上記複数のCPU1〜CPUnのうちのいずれのCPUが当該優先度のレディキューに存在するタスクを実行すべきかの属性が関連付けられていることとなる。
FIG. 10 is an explanatory diagram showing an example of a ready queue provided for each priority, and FIG. 11 shows a configuration of a ready queue table that manages the status of the ready queue for each priority. This ready queue table stores task information (corresponding to task management information H... H, corresponding to task management block) of a task connected next to the task connected to the ready queue of the priority for each ready queue. Task management information storage area information consisting of the start address information of the storage area on the
なお、図10は7つのタスク管理情報格納領域情報が格納されている状態を示したが、OS51の起動時にはタスク管理情報格納領域情報は格納されておらず、例えば、タスク52の実行条件が成立したときに、OS51によって、上記複数のレディキューのうちの、当該タスク52の優先度と同一優先度のレディキューの最後尾に格納され、タスク52の実行が終了したときに、この実行が終了したタスク52に係るタスク管理情報格納領域情報がレディキューから削除される。
FIG. 10 shows a state in which seven pieces of task management information storage area information are stored, but no task management information storage area information is stored when the
この第2の実施の形態に係るレディキューのCPU属性情報を格納する領域は、図12に示すように、32ビットのビットフィールドからなる。ビットフィールド上の各ビットは固有の意味を有する。例えば、1ビット目から31ビット目のいずれかのビットを1とすることは、そのビットに対応したCPUの指定を意味し、32ビット目を1とすることはCPU指定なし、すなわちいずれのCPUにも割り当て可能であることを意味する。なお、1ビット目から31ビット目までのビットについては複数のビットを1とすること(論理和指定)を可能とする。換言すれば複数のCPUの指定を可能とする。 The area for storing the CPU attribute information of the ready queue according to the second embodiment is composed of a 32-bit bit field as shown in FIG. Each bit on the bit field has a unique meaning. For example, setting any bit from the first bit to the 31st bit to 1 means designation of the CPU corresponding to that bit, and setting the 32nd bit to 1 means no CPU designation, that is, any CPU Can also be assigned. In addition, regarding the bits from the first bit to the 31st bit, a plurality of bits can be set to 1 (logical sum designation). In other words, a plurality of CPUs can be specified.
ここで、本実施の形態に係るOS51は、スケジューリング方式として、CPU属性付イベントドリブン型タスク優先度順スケジューリング方式を採用している。このCPU属性付きイベントドリブン型タスク優先度順スケジューリング方式は、前述した図10に示すように、イベントドリブン型タスク優先度順スケジューリング方式の優先度毎のレディキューに、該当レディキューに接続されたタスクを実行するCPUの属性を付与することにより、特定のCPUで特定のタスクを処理できるようにしたものである。なお、CPU属性に基づく制御が追加されている点を除きイベントドリブン型タスク優先度順スケジューリングと基本制御は共通であるため、次に、第1の実施の形態で説明した上記所定のスケジューリング条件が成立したときに行われるこのリアルタイムOS51によるスケジューリングについて、図13のフローチャートを用いて具体的に説明する。
Here, the
まず、ステップS21で、対象のCPUのCPU番号cとして1を設定する。 First, in step S21, 1 is set as the CPU number c of the target CPU.
なお、CPU番号とは、上記CPU1〜CPUnの添字1〜nのことを意味する。次いで、ステップS22で、スケジューリング対象のレディキューの優先度kとして0を設定すると共に、ステップS23で、kに1を加算した後、ステップS24で、kが所定値m以下か否かを判定し、その判定がYESのとき、すなわち、kが所定値m以下のときは、さらに、ステップS25で、優先度kのレディキューのCPU属性が、タスクを割り当てようとしているCPUと一致しているか、又はCPU属性がCPU指定なしかを判定すると共に、このステップS25の判定がYESのときは、さらに、ステップS26で、優先度kのレディキューにタスクが接続されているか否かを判定する。
The CPU number means the
そして、上記ステップS25の判定がNOのとき、すなわち、優先度kのレディキューのCPU属性が、タスクを割り当てようとしているCPUと一致せず、CPU属性がCPU指定なしでもないとき、または、ステップS26の判定がNOのとき、すなわち、優先度kのレディキューにタスクが接続されていないときは、ステップS23に戻り、以後の処理を繰り返す。ここで、ステップS24の所定値mは、OS51が設定する優先度の最大値である。つまり、kが所定値mより大きくなったときは、全レディキューの検索が終了したわけであり、スケジューリングを終了する。
When the determination in step S25 is NO, that is, when the CPU attribute of the ready queue having the priority k does not match the CPU to which the task is to be assigned and the CPU attribute is not CPU designation, or When the determination in S26 is NO, that is, when no task is connected to the ready queue having the priority k, the process returns to step S23 and the subsequent processing is repeated. Here, the predetermined value m in step S24 is the maximum priority set by the
一方、上記ステップS26の判定がYESのとき、すなわち、優先度kのレディキューにタスクが接続されているときは、ステップS27で、タスク順位pとして1を設定する。ここで、このタスク順位pは、優先度kのレディキュー上において対象タスクが先頭タスクから何番目に位置するかを示す値である。次いで、ステップ28で、この先頭からp番目のタスクがいずれかのCPUに割り当て済か否かを判定する。
On the other hand, when the determination in step S26 is YES, that is, when a task is connected to the ready queue having the priority k, 1 is set as the task order p in step S27. Here, the task order p is a value indicating the position of the target task from the top task on the ready queue having the priority k. Next, at
そして、このステップS28の判定がYESのとき、すなわち、p番目のタスクが割り当て済のときは、ステップS29で、タスク順位pの値に1を加算すると共に、ステップS30で、タスク順位pが優先度kのレディキューに接続されたタスクの数よりも大きいか否かを判定する。そして、このステップS30の判定がYESのとき、すなわち、タスク順位pが優先度kのレディキューに接続されたタスクの数よりも大きく、優先度kのレディキューにタスク順位pのタスクが接続されていないときは、ステップS23に戻って以後の処理を繰り返し、NOのときは、ステップS28に戻って以後の処理を繰り返す。 When the determination in step S28 is YES, that is, when the p-th task has been assigned, 1 is added to the value of the task order p in step S29, and the task order p is given priority in step S30. It is determined whether or not it is larger than the number of tasks connected to the ready queue of degree k. When the determination in step S30 is YES, that is, the task rank p is larger than the number of tasks connected to the ready queue having the priority k, and the task rank p is connected to the ready queue having the priority k. If not, the process returns to step S23 and the subsequent processes are repeated. If NO, the process returns to step S28 and the subsequent processes are repeated.
一方、上記ステップS28の判定がNOのとき、すなわち、タスク順位pのタスクが割り当て済でないときは、ステップS31で、優先度kのレディキューにおける先頭からp番目のタスクを、CPU番号cのCPUに割り当てる。 On the other hand, when the determination in step S28 is NO, that is, when the task with the task rank p has not been assigned, in step S31, the p-th task from the head in the ready queue with priority k is assigned to the CPU with CPU number c. Assign to.
次いで、ステップS32では、CPU番号cに1を加算すると共に、ステップS33で、CPU番号cがCPU数nを超えたか否かを判定し、NOのとき、すなわち超えていないときは、このCPU番号cのCPUについてタスクを割り当てるために、ステップS22以後の処理を繰り返す。一方、このステップS33の判定がYESのとき、すなわち、CPU番号cがCPU数nを超えたときは、全てのCPUにタスクが割り当てられたわけであり、スケジューリングを終了する。 Next, in step S32, 1 is added to the CPU number c, and in step S33, it is determined whether or not the CPU number c has exceeded the CPU number n. If NO, that is, if it has not exceeded, this CPU number. In order to assign a task to the CPU of c, the processing after step S22 is repeated. On the other hand, when the determination in step S33 is YES, that is, when the CPU number c exceeds the CPU number n, the task is assigned to all the CPUs, and the scheduling ends.
次に、図14〜図16を用いて、上記所定のスケジューリング条件が成立したときに行われる本OS51によるスケジューリングの一例を説明する。なお、この説明に際しては、組込みコンピュータ31は、図9において、n=3の場合、すなわち、3つのCPU1,CPU2,CPU3を有し、CPU1、CPU2はそれぞれ異なる特定の機能を有するものとする。また、優先度1〜5の5つのレディキューを有するものとする。また、優先度1及び優先度5のレディキューのCPU属性は、全CPU(CPU指定なし)とされ、優先度2のレディキューのCPU属性は、CPU1指定とされ、優先度3及び優先度4のレディキューのCPU属性は、CPU2指定とされているものとする。
Next, an example of scheduling by the
まず、上記所定のスケジューリング条件が成立すると、CPU1,2,3で実行中のタスクのタスク実行権が全て解放されると共に、実行中の各タスクのタスク実行権解放時の状態が各タスク毎に各タスク情報に記録される。なお、このとき、7つのセカンダリタスク52…52(以下、タスクT1〜T7という)が実行可能状態になったものとする。具体的には、図14に示すように、優先度1のレディキューにタスクT1が、優先度2のレディキューにタスクT2、及びタスクT3が、優先度4のレディキューにタスクT4、タスクT5、及びタスクT6が、優先度5のレディキューにタスクT7がそれぞれ接続されているものとする。優先度3のレディキューにはタスクは接続されていないものとする。また、タスクの実行権が全て解放された結果、CPU1,2,3の全てがCPUアイドル状態となっている。
First, when the predetermined scheduling condition is satisfied, all task execution rights of the tasks being executed by the
次に、OS51は、これらのCPUアイドル状態のCPU1,CPU2,CPU3のうち、まずCPU1にタスクを割り当てるために、レディキューテーブルを優先度の高いレディキューから順に検索する。この検索の結果、図14に示すように、優先度1のレディキューはCPU属性が全CPU(CPU指定なし)で、かつ該レディキューにはタスクT1が接続されているので、OS51は、優先度1のレディキューの先頭のタスクT1をCPUlに割り当てる。つまり、タスクT1がCPU1によって実行されることとなる。ここで、優先度1のレディキューのCPU属性が全CPUとされているのは、緊急を要する様々なタスクを即座に処理できるようにすることを目的としている。
Next, the
次に、OS51は、CPU2にタスクを割り当てるため、レディキューテーブルを優先度の高いレディキューから順に検索する。この検索の結果、優先度1のレディキューはCPU属性が全CPU(CPU指定なし)であるが、優先度1のレディキューに接続されているタスクT1がCPU1に割り当てられたため他に割り当てるべきタスクが存在せず、優先度2のレディキューはCPU属性がCPU1指定でCPU属性が一致せず、優先度3のレディキューはCPU属性がCPU2指定でCPU属性が一致するがタスクが存在せず、優先度4のレディキューはCPU属性がCPU2指定でCPU属性が一致し、かつタスクT4,T5,T6が接続されているので、OS51は、優先度4のレディキューの先頭のタスクT4をCPU2に割り当てる。つまり、タスクT4がCPU2によって実行されることとなる。
Next, the
次に、OS51は、CPU3にタスクを割り当てるため、レディキューテーブルを優先度の高いレディキューから順に検索する。この結果、優先度1のレディキューはCPU属性が全CPU(CPU指定なし)であるが、優先度1のレディキューに接続されているタスクT1がCPU1に割り当てられたため他に割り当てるべきタスクが存在せず、優先度2のレディキューはCPU属性がCPU1指定でCPU属性が一致せず、優先度3のレディキューはCPU属性がCPU2指定でCPU属性が一致せず、優先度4のレディキューはCPU属性がCPU2指定でCPU属性が一致せず、優先度5のレディキューはCPU属性が全CPUでかつタスクT7が存在するので、OS51は、優先度5のレディキューの先頭のタスクT7をCPU3に割り当てる。つまり、タスクT7がCPU3によって実行されることとなる。
Next, in order to assign a task to the
そして、これにより、CPU1,2,3の全てにタスクが割り当てられ、実行状態となったため、セカンダリOS51は、スケジューリングを終了する。
As a result, the task is assigned to all of the
なお、タスク実行権が解放されていたタスクについては、該解放されたときの状態から再開されることとなる。 Note that a task whose task execution right has been released is resumed from the state when it was released.
ここで、上記のように割り当てられて現在実行中の例えばタスクT1が、OS51にメモリ42に格納されているタスクT8の起動を要求し、該タスクT8がOS51によって優先度1のレディキューに接続されるときには、所定のスケジューリング条件が成立し、現在実行中のタスクT1,T4,T7のタスク実行権が解放されると共に、実行中のタスクT1,T4,T7のタスク実行権解放時の状態が各タスクT1,T4,T7毎に各タスク情報に記録され、CPU1,2,3の全てがCPUアイドル状態となって、スケジューリングが実行される。そして、この場合、前述したのと同様にレディキューテーブルが検索され、図15に示すように、まず、CPU1にタスクT1が割り当てられ、次いで、CPU2にタスクT8が割り当てられ、次いで、CPU3にタスクT7が割り当てられることとなる。なお、この場合、タスクT1,T3については、タスク実行権が解放されたときの状態から再開される。
Here, for example, task T1, which is allocated as described above and is currently being executed, requests activation of task T8 stored in
そして、例えば、上記のように割り当てられて現在実行中の例えばタスクT1の実行が完了し、タスクT1がOS51にタスクの実行終了の宣言をし、該OS51によりレディキューからタスクT1が削除されるときには、所定のスケジューリング条件が成立し、現在実行中のタスクT8,T7のタスク実行権が解放されると共に、該実行中のタスクT8,T7のタスク実行権解放時の状態が各タスクT8,T7毎に各タスク情報に記録され、スケジューリングが実行される。そして、この場合、前述したのと同様にレディキューテーブルが検索され、図16に示すように、まず、CPU1にタスクT8が割り当てられ、次いで、CPU2にタスクT4が割り当てられ、次いで、CPU3にタスクT7が割り当てられることとなる。なお、この場合、タスクT4,T7については、タスク実行権が解放されたときの状態から再開される。
Then, for example, the execution of task T1, for example, that is allocated and executed as described above is completed, task T1 declares the task execution end to
ここで、優先度2のレディキューに接続されているタスクは、CPU1のみが有する特定の機能を利用しないと処理できないタスク(特定タスク)、またはCPU1のみが有する特定の機能を利用して処理することにより他のCPUで処理するよりも処理の迅速化が図れるタスク(特定タスク)である。そのため、CPU1の特定機能を利用する上記特定タスクは、CPU指定なしのレディキューには接続せず、CPU属性がCPU1指定の上記優先度2のレディキュー(特定レディキュー)に接続するようにしている。なお、CPU1の特定機能を利用する特定タスクであっても、例えば、該優先度2の特定レディキューにタスクが多数存在し、他のCPUでも処理可能であるときは、タスクの優先度を変更して他の優先度のレディキューに接続するようにしてもよい。
Here, a task connected to the ready queue with
また、優先度3,4のレディキューに接続されているタスクは、CPU2のみが有する特定の機能を利用しないと処理できないタスク、またはCPU2のみが有する特定の機能を利用して処理することにより他のCPUで処理するよりも処理の迅速化が図れるタスクである。そのため、CPU2の特定機能を利用する上記特定のタスクは、CPU指定なしのレディキューには接続せず、CPU属性がCPU2指定の優先度3のレディキュー(特定レディキュー)または優先度4のレディキュー(特定レディキュー)に接続するようにしている。なお、CPU2の特定機能を利用する特定のタスクであっても、例えば、該優先度3,4のレディキューにタスクが多数あり、他のCPUでも処理可能であるときは、タスクの優先度を変更して他の優先度のレディキューに接続するようにしてもよい。
In addition, tasks connected to the ready queues with
以上のように 第2の実施の形態に係る組込みシステムによれば、第1の実施の形態で説明した作用・効果に加え、特定タスクの処理は特定CPUでしかできないような場合に、特定タスクが、当該タスクを処理することができないCPUに割り当てられることがない。また、特定タスクの処理は特定CPU以外のCPUでもできるが特定CPUで処理すればよりタスク処理速度の向上が望めるような場合に、当該特定タスクを当該タスクの実行に適した特定CPUによって処理することができ、この結果、特定タスクの処理速度の向上等が図れる。 As described above, according to the embedded system according to the second embodiment, in addition to the operations and effects described in the first embodiment, the specific task can be processed only when the specific CPU can process the specific task. Is not assigned to a CPU that cannot process the task. Further, the specific task can be processed by a CPU other than the specific CPU, but if the specific CPU can improve the task processing speed, the specific task is processed by the specific CPU suitable for executing the task. As a result, the processing speed of the specific task can be improved.
なお、特定レディキューより優先度が高いレディキューにタスクが存在する場合に、特定CPUのアイドル状態が検出されたときは、当該優先度が高いレディキューのタスクを特定CPUに割り当てるようにしてもよいし、特定レディキューに存在するタスクを、優先度が高いレディキューに存在するタスクに優先して特定CPUに割り当てるようにしてもよい。また、特定レディキューには特定タスクのみ接続するようにしてもよいし、特定タスク以外のタスクも接続するようにしてもよい。 When a task exists in a ready queue having a higher priority than the specific ready queue and an idle state of the specific CPU is detected, the task of the ready queue having the higher priority may be assigned to the specific CPU. Alternatively, a task existing in a specific ready queue may be assigned to a specific CPU in preference to a task existing in a ready queue having a high priority. Further, only a specific task may be connected to the specific ready queue, or a task other than the specific task may be connected.
次に、本発明の第3の実施の形態について説明する。 Next, a third embodiment of the present invention will be described.
この第3の実施の形態に係る組込みシステムは、第2の実施の形態に係る組込みシステムにおいて、外部割込み等を処理する専用CPUを新たに設けると共に、第2の実施の形態に係る複数のCPU上で実行されるリアルタイムオペレーティングシステムとは別に、専用CPU上で実行されるリアルタイムオペレーティングシステムを設けたものであり、以下図17〜図18を用いて説明する。 In the embedded system according to the third embodiment, in the embedded system according to the second embodiment, a dedicated CPU for processing an external interrupt or the like is newly provided, and a plurality of CPUs according to the second embodiment are provided. In addition to the real-time operating system executed above, a real-time operating system executed on a dedicated CPU is provided, and will be described below with reference to FIGS.
図17に示すように、この組込みコンピュータ61は1つのプライマリCPU70(以下、M−CPUという)と、複数のセカンダリCPU71−1,71−2,71−3〜71−n(以下、S−CPU1,S−CPU2,S−CPU3〜S−CPUnという)と、単一の共有メモリ72と、これらを接続する共有バス73とを有する。
As shown in FIG. 17, this embedded
S−CPU1及びS−CPU2は、他のS−CPUが有する機能に加え、それぞれ、描画信号処理や音声処理等に適した特定の機能(これらの処理は一例である)を有する。また、M−CPUは、S−CPUが有しない外部信号処理に係る特定の機能(例えば、組込みコンピュータ61の外部機器からの割り込み信号受信機能等の信号処理機能)を有する。つまり、外部機器に係る信号処理はS−CPUでなく、M−CPUで行われる。
Each of the S-
共有メモリ72は、ROM及びRAMからなる。該共有メモリ72には、請求項1〜請求項4に記載の組込みコンピュータ制御プログラムを構成して、組込みコンピュータ61を図1に記載の各手段等として機能させるリアルタイムオペレーティングシステム81(以下、OS81という)と、複数のタスク82a…82a,82b…82bと、該OS81に関する種々のパラメータや一時データ等からなるOSデータ83とが格納されている。
The shared
OS81は、プライマリOS81aと、セカンダリOS81bとからなる。プライマリOS81aは、上記共有メモリ72からM−CPU上に読み込まれて実行され、セカンダリOS81bは、上記共有メモリ72からS−CPU1〜S−CPUn上にそれぞれ読み込まれて実行される。換言すれば、共有メモリ72上に格納されているセカンダリOS81bは1つであるが、各S−CPU1〜S−CPUn上でセカンダリOSが並行して実行されることとなる。なお、プライマリOS81aは、レディキューの構成、スケジューリング方式が、第1の実施の形態に係るOS21と同一とされ、セカンダリOS81bは、レディキューの構成、スケジューリング方式が、第2の実施の形態に係るOS51と同一とされている。そのため、以後、OS81a,81bの説明にあたっては、これらのOS81a,81b間の制御を主に説明する。
The
OSデータ83は、プライマリOS81a固有のプライマリOSデータ83aと、上記複数のS−CPU上で実行されるセカンダリOS81bで共有のセカンダリOS共有データ83bと、上記複数のS−CPU上で実行されるセカンダリOS81b毎に固有のセカンダリOS非共有データ83cとからなる。マスタOSデータ83aには、複数のレディキュー(前述の図3と同様のもの)を管理するレディキューテーブル(前述の図4と同様のもの)が含まれている。また、スレーブOS共有データ83aには、複数のレディキュー(前述の図10と同様のもの)を管理するレディキューテーブル(前述の図11と同様のもの)が含まれている。なお、前述のようにプライマリOS81a用のレディキュー及びレディキューテーブルの構成は第1の実施の形態に係るレディキューと同構成とされ、セカンダリOS81b用のレディキューは第2の実施の形態に係るレディキュー及びレディキューテーブルと同構成とされており、その詳細な説明は省略する。なお、セカンダリOS81b用のレディキューのCPU属性については、図10、図11においてCPUをS−CPUと読み替えればよい。
The
複数のプライマリタスク82a…82aは、プライマリOS81aが処理するタスクであり、複数のセカンダリタスク82b…82bは、セカンダリOS81bが処理するタスクである。プライマリタスク82aは、セカンダリOS81bに対してセカンダリタスク82bの実行制御のための各種要求を行うためのタスクであってプライマリOS81a上でのみ実行される。セカンダリタスク82bは、それ以外のタスクであってセカンダリOS81b上でのみ実行される。
The plurality of
プライマリOS81aは、キーやスイッチ等からの外部割込みの処理、及び各S−CPU上のセカンダリOS81bの状態(実行状態であるかアイドル状態であるか)を管理、把握すると共に、この把握した状態に基づいてセカンダリタスク82bの実行制御を行う。具体的には、各S−CPU上のセカンダリOS81b用の初期セカンダリタスク82bの登録及び実行要求、並びにセカンダリタスク82bの起動要求及び停止要求をセカンダリOS81bに対して行う。なお、プライマリOS81aは、セカンダリOS81bに対するこれらの要求を、プライマリタスク82aを介して行う。セカンダリOS81bは、プライマリOS81aからの上記各種要求に応じて、セカンダリタスク82bを実行する。
The
各OS81a,81bは、CPUがタスクを実行しているときにはCPU実行状態と判定し、タスクを実行していないときはCPUアイドル状態(特許請求の範囲に記載のタスク非実行状態)と判定する。
Each of the
プライマリタスク82a及びセカンダリタスク82bは、OS81a,81bによって、実行状態、実行可能状態、待ち状態、休止状態のうちのいずれかの状態に制御される。
The
S−CPU上で実行中のセカンダリOS81bは、M−CPU上で実行中のプライマリタスク82aまたはM−CPU上で実行中の割込み処理から、セカンダリタスク82bの起動、停止、または待ち状態の解除の要求を受けたときは、S−CPU1〜S−CPUn上で実行中のタスクのタスク実行権を全て解放させて、スケジューリングを行う。
The secondary OS 81b being executed on the S-CPU can start, stop, or release the waiting state from the
また、S−CPU上で実行中のセカンダリOS81bは、あるS−CPU上で実行中のセカンダリタスク82bまたはS−CPU上で実行中の割込み処理から、他のセカンダリタスク82bの起動、停止、または待ち状態の解除の要求を受けたとき、及びこの実行中のセカンダリタスク82bが待ち状態となるときは、S−CPU1〜S−CPUn上で実行中のタスクのタスク実行権を全て解放させて、スケジューリングを行う。
Further, the secondary OS 81b being executed on the S-CPU may start, stop, or stop another
なお、前述のように、プライマリOS81aのスケジューリング方式及びレディキューの構成は、第1の実施の形態に係るOS21と同一とされ、セカンダリOS81bのスケジューリング方式及びレディキューの構成は、第2の実施の形態に係るOS51と同一とされているため、プライマリOS81aのスケジューリングについては図5のフローチャートを参照すればよく、セカンダリOS81bのスケジューリングについては図13のフローチャートを参照すればよい。なお、プライマリOS81aによりスケジューリングされるのは、M−CPUだけであり、CPU番号cが1でスケジューリング終了となる。また、セカンダリOS81bによりスケジューリングされるのは、S−CPU1〜S−CPUnであり、図13のCPUをS−CPUと読み替えればよい。
As described above, the scheduling method and the ready queue configuration of the
なお、セカンダリOS81bは、このスケジューリング中にプライマリタスク82aがセカンダリタスク82bの状態変化要求を出すのを防止するため、プライマリOS81aに対して、M−CPU上で実行中のタスクおよび割込み処理の一時停止の要求を出す。
In order to prevent the
スケジューリングを行うために各OS81a,82aからレディキュー等の各OSの共有データを操作するとき等には、OS81a,81b間の排他制御として、プライマリOS81aによるセカンダリOS81bの停止制御、並びにセカンダリOS81bによるプライマリOS81a及び他セカンダリOS81bの停止制御が行われる。プライマリOS81aによるセカンダリOS81bの停止制御は、セカンダリOS81bによるプライマリOS81a及び他セカンダリOS81bの停止制御よりも実行優先順位が高くされている。
When operating shared data of each OS such as a ready queue from each
この排他制御用として、リアルタイムOS81は、プライマリOS81a及び各セカンダリOS81bから参照可能なセカンダリOS共有データ83bに、排他制御要求用のフラグを格納する。具体的には、S−CPU数分(セカンダリOS81b数分)のプライマリOS用セカンダリ停止要求フラグと、これと同数のプライマリOS用セカンダリ停止応答フラグとを格納し、プライマリOS81aは、これらのフラグを用いてセカンダリOS81b上で実行中のタスクの停止制御を行う。また、S−CPU毎に(S−CPU上の各セカンダリOS81b毎に)、S−CPU数分(セカンダリOS81b数分)のセカンダリOS用セカンダリ停止要求フラグと、これと同数のセカンダリOS用セカンダリ停止応答フラグとを有し、セカンダリOS81bは、これらのフラグを用いてプライマリOS81aおよび他セカンダリOS81bの停止制御を行う。
For this exclusive control, the real-
次に、OS81による制御の具体例について説明する。なお、この説明に際しては、組込みコンピュータ61は、図17において、n=3の場合、すなわち、1つのM−CPU、及び3つのS−CPU,S−CPU2,S−CPU3を有するものとする。
Next, a specific example of control by the
まず、図18を用いて、この組込みコンピュータ61の電源が投入された後の各OS81a,81bの起動及びタスクの処理について説明する。
First, with reference to FIG. 18, the activation of each of the
組込みコンピュータ61の電源が投入された場合、M−CPU、及びS−CPU1,S−CPU2,S−CPU3は、まず、共有メモリ72のリセットベクタの命令及びデータを読み込む。この結果、M−CPU上ではプライマリOS81aが、S−CPU1,S−CPU2,S−CPU3上ではセカンダリOS81bがそれぞれ同時に起動する。
When the power of the embedded
そして、この起動時に、プライマリOS81aは、初期起動タスクとしてプライマリタスク82bを静的に生成してプライマリOS81a用のレディキューに接続し、スケジューリングを行う。そして、このスケジューリングの結果、プライマリOS81aによりM−CPUにこのプライマリタスク82bが割り当てられ、M−CPU上で初期起動タスクとしてのプライマリタスク82bが実行されることとなる。ここで、この初期起動タスクは、S−CPU1,S−CPU2,S−CPU3上で実行すべき初期起動タスクとしてのセカンダリタスク82b…82b(図18では、タスクA,B,Cと記載)を生成し、この生成されたセカンダリタスク82b…82b(タスクA,B,C)の起動要求を、各S−CPU1,S−CPU2,S−CPU3上で実行されるセカンダリOS81bに出力する。
At the time of activation, the
一方、各S−CPU上のセカンダリOS81bは、起動後すぐにアイドル状態に移行する。そして、上記プライマリタスク82aからのセカンダリタスク82b(タスクA,B,C)の起動要求を待ち、起動要求を受けたときに、順次、セカンダリタスク82b…82b(タスクA,B,C)を起動する。起動の際に、どのS−CPUがどのセカンダリタスク82b…82b(タスクA,B,C)を実行するかについては、セカンダリOS81bがスケジューリングを行なって決定する。
On the other hand, the secondary OS 81b on each S-CPU shifts to an idle state immediately after startup. Then, the
なお、上記所定のスケジューリング条件が成立したときに行われる本リアルタイムOS81によるスケジューリングの作用は、プライマリOS81aの場合、基本的に第1の実施の形態に係るOS21と同様であるが、CPUがM−CPU1つであることから、タスクが接続されたレディキューのうちの最も優先度の高いレディキューの先頭に接続されたタスクが実行されることとなる。つまり、先頭のタスクの実行が終了すると、先頭から2番目に接続されたタスク、もしくはそれよりも低い優先度のうち最も高い優先度のレディキューの先頭に接続されているタスクが実行されることとなる。例えば、図3のようにレディキューにタスクが接続されているものとすると、まずタスクT1が実行され、このタスクT1の実行が終了すると、次に、タスクT2が実行され、このタスクT2の実行が終了すると、次にタスクT3が実行されというように、1つのM−CPUで順次実行されることとなる。
Note that the scheduling operation performed by the real-
一方、セカンダリOS81bの場合、その作用は第2の実施の形態と同様となるため、その説明は省略する。 On the other hand, since the operation of the secondary OS 81b is the same as that of the second embodiment, the description thereof is omitted.
その場合に、本第3の実施の形態によれば、例えば、M−CPUが外部からの割り込み信号を受信したときに、該割り込み信号が例えばセカンダリタスク82bの起動に関するものであれば、これに関する割り込みハンドラが起動され、該割り込みハンドラからプライマリOS81aにセカンダリタスク82bの起動要求を行うプライマリタスク82aの起動要求が行われる。そして、プライマリOS81aによって起動されて実行状態となったプライマリタスク82aが、セカンダリOS81bに上記セカンダリタスク82bの起動要求を行い、この結果、このセカンダリタスク82bがセカンダリOS82bによって起動されて実行されることとなる。
In this case, according to the third embodiment, for example, when the M-CPU receives an interrupt signal from the outside, if the interrupt signal relates to the activation of the
つまり、外部割込みを伴う処理が専用に確保されたM−CPUで迅速に実行されると共に、セカンダリタスクの実行制御等組込みシステム全体に係る処理がやはり専用に確保されたM−CPUで迅速に実行され、この結果、組込みシステム全体のタスク処理が迅速に行われることとなる。また、S−CPUに外部割込みに伴うタスクを処理するための機能を設ける必要がない。 In other words, processing involving an external interrupt is quickly executed by the M-CPU secured exclusively, and processing related to the entire embedded system, such as secondary task execution control, is also quickly executed by the M-CPU secured exclusively. As a result, task processing of the entire embedded system is performed quickly. Further, it is not necessary to provide a function for processing a task associated with an external interrupt in the S-CPU.
以上のように、第3の実施の形態に係る組込みシステムによれば、上記第1及び第2の実施の形態で説明した作用・効果に加え、リアルタイムOS81には、複数のS−CPU1,2,3及びメモリ72を含む第1の部分を請求項1から請求項3のいずれかに記載の各手段として機能させるセカンダリOS81b(第1の制御部)に加えて、外部割り込み処理機能を有するM−CPU(専用CPU)及びメモリ72を含む第2の部分を、複数のセカンダリタスク82b(第1の複数のタスク)の起動、停止をセカンダリOS81bに要求する複数のプライマリタスク82a(第2の複数のタスク)を制御する手段として機能させるプライマリOS81a(第2の制御部)が備えられているから、M−CPUで外部割込み処理が処理されるようになり、他の複数のS−CPU1,2,3の外部割込み処理負荷が解消される。また、プライマリOS81aでセカンダリOS81bを状況に応じて制御することができる。また、プライマリOS81aはセカンダリOS81bとはほぼ同じ構成であるから、M−CPUで外部割込み処理を行う仕組みを容易に構築することができると共に、プライマリOS81aでセカンダリOS81bをそれぞれの機能にあわせて最適化することができる。
As described above, according to the embedded system according to the third embodiment, in addition to the operations and effects described in the first and second embodiments, the real-
本発明は、複数のCPUを有する組込みシステムに広く適用することができる。 The present invention can be widely applied to embedded systems having a plurality of CPUs.
1,31,61 組込みコンピュータ
11−1〜11−n,41−1〜41−n,70,71−1〜71−n CPU
12,42,72 共有メモリ(第1記憶装置、第2記憶装置、第3記憶装置、第4記憶装置、第5記憶装置、第6記憶装置)
21,51,81 リアルタイムオペレーティングシステム(制御プログラム)
22,52,82 タスク
70 プライマリCPU
71−1〜71−n セカンダリCPU
81a プライマリOS(第2の制御部)
81b セカンダリOS(第1の制御部)
1, 31, 61 Embedded computers 11-1 to 11-n, 41-1 to 41-n, 70, 71-1 to 71-n CPU
12, 42, 72 Shared memory (first storage device, second storage device, third storage device, fourth storage device, fifth storage device, sixth storage device)
21, 51, 81 Real-time operating system (control program)
22, 52, 82
71-1 to 71-n Secondary CPU
81a Primary OS (second control unit)
81b Secondary OS (first control unit)
Claims (9)
In addition to a plurality of CPUs and first, second, and third storage devices, a dedicated CPU having an external interrupt processing function and fourth, fifth, and sixth storage devices are provided, and claims 6 to 6. A first control unit including each means according to any one of 8 controls the first part including the plurality of CPUs and the first, second, and third storage devices, and the dedicated CPU and the fourth, A second part that includes the fifth and sixth storage devices and functions as means for controlling a second plurality of tasks that requests the first control unit to execute a request for execution control of the first plurality of tasks. The control unit includes a second ready queue creating means for creating a second plurality of ready queues that are shared by the dedicated CPU and set with different priorities on the fourth storage device, and the fifth storage device. And a second plurality of execution controls of the first plurality of tasks Second task priority setting means for setting the priority of at least a task to be executed among the tasks, and task management of at least the task to be executed among the plurality of second tasks on the sixth storage device Second task management information creating means for creating information, and storage area information on the sixth storage device for the task management information of the task to be executed created by the second task management information creating means. The second task management stored at the tail of the ready queue having the same priority as the priority set by the second task priority setting means among the second plurality of ready queues created by the ready queue creation means When the execution of the task being executed by the information storage area information storage means and the dedicated CPU is completed, the task management information storage area information relating to the task for which the execution has been completed is readied. The task second management information storage area information deletion means to be deleted from the task, and the task information storage area information relating to the task to be executed by the second task information storage area information storage means, the ready queue corresponding to the priority of the task When stored at the end, if a task with a lower priority than the priority of the task to be executed is being executed, the task execution right of the task being executed is released and the CPU is not executed temporarily When the task execution right of the task is released by the second task execution right releasing means to be released and the second task execution right releasing means is released, the state of the released task is recorded in the task management information of the task Stored in the second plurality of ready queues in the second task execution right release state recording means and the CPU that has been in the task non-execution state by the second task execution right release means. Second task allocating means for allocating a task related to task information storage area information stored at the head of the ready queue having a higher priority among the tasks related to the task management information storage area information, and the second task allocating means 9. The second task execution means for causing the CPU to which the task is assigned to execute the task based on the task management information storage area information of the task, according to any one of claims 6 to 8. The described embedded system.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004143253A JP3893136B2 (en) | 2004-05-13 | 2004-05-13 | Embedded computer control program, recording medium recording the program, and embedded system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2004143253A JP3893136B2 (en) | 2004-05-13 | 2004-05-13 | Embedded computer control program, recording medium recording the program, and embedded system |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2005327007A true JP2005327007A (en) | 2005-11-24 |
| JP3893136B2 JP3893136B2 (en) | 2007-03-14 |
Family
ID=35473331
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2004143253A Expired - Fee Related JP3893136B2 (en) | 2004-05-13 | 2004-05-13 | Embedded computer control program, recording medium recording the program, and embedded system |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3893136B2 (en) |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007156976A (en) * | 2005-12-07 | 2007-06-21 | Hitachi Kokusai Electric Inc | Information processing system |
| WO2007081022A1 (en) * | 2006-01-16 | 2007-07-19 | Seiko Epson Corporation | Multi-processor system abd program for causing computer to execute multi-processor system control method |
| JP2010160597A (en) * | 2009-01-07 | 2010-07-22 | Nec Corp | System, method and program for controlling process execution |
| WO2010095358A1 (en) * | 2009-02-18 | 2010-08-26 | 日本電気株式会社 | Task allocation device, task allocation method, and recording medium storing task allocation program |
| JP2011186619A (en) * | 2010-03-05 | 2011-09-22 | Canon Inc | Processing device, processing allocation method, and program |
| JP2021174367A (en) * | 2020-04-28 | 2021-11-01 | 株式会社デンソー | Real-time arithmetic processing device |
| US20230342192A1 (en) * | 2022-04-21 | 2023-10-26 | Microsoft Technology Licensing, Llc | Distributed, decentralized traffic control for worker processes in limited-coordination environments |
| JP2024541019A (en) * | 2021-10-25 | 2024-11-06 | 上海▲けい▼朗智能科技有限公司 | Robot scheduling method, device, electronic device, and storage medium |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102915254B (en) * | 2011-08-02 | 2018-04-06 | 中兴通讯股份有限公司 | task management method and device |
-
2004
- 2004-05-13 JP JP2004143253A patent/JP3893136B2/en not_active Expired - Fee Related
Cited By (14)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007156976A (en) * | 2005-12-07 | 2007-06-21 | Hitachi Kokusai Electric Inc | Information processing system |
| US7979861B2 (en) | 2006-01-16 | 2011-07-12 | Seiko Epson Corporation | Multi-processor system and program for causing computer to execute controlling method of multi-processor system |
| WO2007081022A1 (en) * | 2006-01-16 | 2007-07-19 | Seiko Epson Corporation | Multi-processor system abd program for causing computer to execute multi-processor system control method |
| JP2010160597A (en) * | 2009-01-07 | 2010-07-22 | Nec Corp | System, method and program for controlling process execution |
| JP5545288B2 (en) * | 2009-02-18 | 2014-07-09 | 日本電気株式会社 | Task allocation device, task allocation method, and task allocation program |
| WO2010095358A1 (en) * | 2009-02-18 | 2010-08-26 | 日本電気株式会社 | Task allocation device, task allocation method, and recording medium storing task allocation program |
| US8897372B2 (en) | 2009-02-18 | 2014-11-25 | Nec Corporation | Task allocation device, task allocation method, and storage medium storing task allocation program |
| JP2011186619A (en) * | 2010-03-05 | 2011-09-22 | Canon Inc | Processing device, processing allocation method, and program |
| JP2021174367A (en) * | 2020-04-28 | 2021-11-01 | 株式会社デンソー | Real-time arithmetic processing device |
| JP7322797B2 (en) | 2020-04-28 | 2023-08-08 | 株式会社デンソー | Real-time processor |
| JP2024541019A (en) * | 2021-10-25 | 2024-11-06 | 上海▲けい▼朗智能科技有限公司 | Robot scheduling method, device, electronic device, and storage medium |
| JP7728974B2 (en) | 2021-10-25 | 2025-08-25 | 上海▲けい▼朗智能科技有限公司 | Robot scheduling method, device, electronic device, and storage medium |
| US20230342192A1 (en) * | 2022-04-21 | 2023-10-26 | Microsoft Technology Licensing, Llc | Distributed, decentralized traffic control for worker processes in limited-coordination environments |
| US12498969B2 (en) * | 2022-04-21 | 2025-12-16 | Microsoft Technology Licensing, Llc. | Distributed, decentralized traffic control for worker processes in limited-coordination environments |
Also Published As
| Publication number | Publication date |
|---|---|
| JP3893136B2 (en) | 2007-03-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP3425502A1 (en) | Task scheduling method and device | |
| JP4345630B2 (en) | Information processing apparatus, interrupt processing control method, and computer program | |
| JP2009265963A (en) | Information processing system and task execution control method | |
| US9588808B2 (en) | Multi-core system performing packet processing with context switching | |
| JP2013506179A (en) | Execution management system combining instruction threads and management method | |
| WO2017070900A1 (en) | Method and apparatus for processing task in a multi-core digital signal processing system | |
| CN101310257A (en) | Multiprocessor system and program for causing computer to execute control method of multiprocessor system | |
| JP2010529533A (en) | System including a plurality of processors and method of operating the same | |
| JP2022509170A (en) | Ligamentous laxity-aware type dynamic priority change in the processor | |
| WO2018084024A1 (en) | Vehicle control device | |
| CN100419688C (en) | Interrupt control device and control method | |
| JP3893136B2 (en) | Embedded computer control program, recording medium recording the program, and embedded system | |
| JP2009223842A (en) | Virtual machine control program and virtual machine system | |
| JP2006099332A (en) | Information processing apparatus, process control method, and computer program | |
| US20030018682A1 (en) | Computer system and computer-readable record medium | |
| US7590990B2 (en) | Computer system | |
| US20130247065A1 (en) | Apparatus and method for executing multi-operating systems | |
| US9372724B2 (en) | System and method for conditional task switching during ordering scope transitions | |
| WO2020008757A1 (en) | Method of accessing device in virtualized environment | |
| KR20070090649A (en) | Apparatus and method for providing cooperative scheduling in a multicore system | |
| JP2008225641A (en) | Computer system, interrupt control method and program | |
| WO2023231768A1 (en) | Multi-core processor and related inter-core communication method | |
| JP7054688B2 (en) | Synchronous control system and synchronous control method | |
| JP2013041361A (en) | Resource arbitration system and resource arbitration method | |
| JP4017005B2 (en) | Arithmetic unit |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20060418 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20060515 |
|
| 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: 20061121 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20061208 |
|
| 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: 20101215 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111215 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121215 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121215 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20141215 Year of fee payment: 8 |
|
| S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20141215 Year of fee payment: 8 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| LAPS | Cancellation because of no payment of annual fees |