JP2012164050A - Information processing device, task management method and program - Google Patents

Information processing device, task management method and program Download PDF

Info

Publication number
JP2012164050A
JP2012164050A JP2011022496A JP2011022496A JP2012164050A JP 2012164050 A JP2012164050 A JP 2012164050A JP 2011022496 A JP2011022496 A JP 2011022496A JP 2011022496 A JP2011022496 A JP 2011022496A JP 2012164050 A JP2012164050 A JP 2012164050A
Authority
JP
Japan
Prior art keywords
task
information
processor
executed
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.)
Pending
Application number
JP2011022496A
Other languages
Japanese (ja)
Inventor
Takateru Kyogoku
貴輝 京極
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2011022496A priority Critical patent/JP2012164050A/en
Publication of JP2012164050A publication Critical patent/JP2012164050A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce overhead required to maintain cache coherency while keeping a real-time property.SOLUTION: An information processing device performs following steps; reading processor information of a task executable on a plurality of processors from a storage device in which priority information of a task is stored in association with processor information showing a processor which has executed a task lately, executes one immediately or is executing one, for each task; and determining whether or not the read processor information matches the processor information showing one processor according to the priority information, and if it is determined to match, a task associated with the processor information determined to match is determined as the task to be executed by the one processor next among the plurality of processors.

Description

本発明は、情報処理装置、タスク管理方法、及びプログラムに関する。   The present invention relates to an information processing apparatus, a task management method, and a program.

近年、組込みシステムにおいて、性能の向上と消費電力の抑制を同時に満足させる方法として、マルチプロセッサの搭載が増加している。組込みシステムにおいて消費電力の抑制は、組込みシステムの稼働時間に直接に結びついている。これを満足させつつ組込みシステムの性能の向上を図るには、組込みシステムのクロック周波数を上げるよりも、プロセッサ数を増加させた方が有利である。このようなことから、マルチプロセッサに対応した組込み用のリアルタイムオペレーティングシステム(リアルタイムOS)の要求が高まっている。
これまでの組込みシステムでも、異種、或いは同種のプロセッサを複数搭載する組込みシステムは珍しくない。しかしながら、これらは、プロセッサ間が疎な関係であるものが大多数であり、プロセッサ間が密な関係である組込みシステムについては、近年になってから要求が高まってきている。
In recent years, mounting of multiprocessors is increasing as a method for simultaneously satisfying improvement in performance and suppression of power consumption in embedded systems. The suppression of power consumption in an embedded system is directly related to the operating time of the embedded system. In order to improve the performance of the embedded system while satisfying this, it is more advantageous to increase the number of processors than to increase the clock frequency of the embedded system. For this reason, there is an increasing demand for an embedded real-time operating system (real-time OS) that supports multiprocessors.
Even in conventional embedded systems, an embedded system in which a plurality of different or similar processors are mounted is not uncommon. However, most of them have a sparse relationship between processors, and the demand for an embedded system having a close relationship between processors has increased in recent years.

実際、このようなプロセッサを制御する組込み用のOSを見ても、TOPPERS/FMP(いわゆるTOPPERSプロジェクトであり、非特許文献1参照。)やSMP/AMP T−Kernel(T−Engineフォーラム)といったものは、近時、議論が活発化している。
一方、密な結合に対応するマルチプロセッサに対応するOSについては、近年に始まった話ではなく、コンピュータ科学の黎明期から研究が行われてきた。現今の汎用コンピュータにおいても、マルチプロセッサに対応した汎用的なOS(例えば、Linux(登録商標)、Windows(登録商標))を、誰でも気軽に利用することができるようになっている。また、マルチプロセッサに関する技術も開示されている(特許文献1、特許文献2参照)。
In fact, even if you look at the embedded OS that controls such processors, TOPPERS / FMP (so-called TOPPERS project, see Non-Patent Document 1) and SMP / AMP T-Kernel (T-Engine Forum) Recently, discussions have become active.
On the other hand, the OS corresponding to the multiprocessor corresponding to the tight coupling is not a story started in recent years, but has been studied since the dawn of computer science. Even in today's general-purpose computers, anyone can easily use a general-purpose OS (for example, Linux (registered trademark) or Windows (registered trademark)) compatible with multiprocessors. Also, a technique related to a multiprocessor is disclosed (see Patent Document 1 and Patent Document 2).

特許第3444505号公報Japanese Patent No. 3444505 特開平9−305553号公報JP-A-9-305553

本田晋也、高田広章"ITRON仕様OSの機能分散マルチプロセッサ拡張"、「電子情報通信学会論文誌D Vol.J91−D No.4 934−944頁」、(社)電子情報通信学会、2008年Junya Honda, Hiroaki Takada “Functional Distributed Multiprocessor Extension of ITRON Specification OS”, “Electronic Information and Communication Society Transactions D Vol.

しかしながら、組込み用のリアルタイムOSでは、組込みシステム全体のリアルタイム性を保証しなければならないという命題を持つ。
ここでリアルタイムとは、厳密には、全ての実行時間が予測可能であることを示し、そのためにOSは、自身の処理に要する最悪時の実行時間を保証する。また、キャッシュ等の実行時間の予測を困難にする技術の導入につれ、近年ではリアルタイムの意味合いが緩くなりつつもあるが、優先順位に従った厳格な実行やOSでの占有時間の極小化など、リアルタイム性の高いOSが要求されている。
However, the embedded real-time OS has a proposition that the real-time property of the entire embedded system must be guaranteed.
Here, strictly speaking, real time indicates that all execution times can be predicted, and therefore the OS guarantees the worst-case execution time required for its own processing. In addition, with the introduction of technology that makes it difficult to predict execution time, such as caches, the meaning of real-time is becoming loose in recent years, but strict execution according to priority and minimization of the occupation time in the OS, etc. An OS with a high real-time property is required.

このようなリアルタイム性の要求により、これまで汎用的なOSで培われた特許文献1、特許文献2に記載の発明を組込み用のリアルタイムOSで利用できないという問題がある。
実際に特許文献1に記載の発明では、リアルタイム性を鑑みておらず、リアルタイム性を保ちつつ、組込み型のリアルタイムOSでのキャッシュコヒーレンシの維持にかかるオーバヘッドを削減することができない。
Due to such a requirement for real-time property, there is a problem that the inventions described in Patent Document 1 and Patent Document 2 that have been cultivated in general-purpose OSs cannot be used in an embedded real-time OS.
Actually, the invention described in Patent Document 1 does not consider the real-time property and cannot reduce the overhead for maintaining the cache coherency in the embedded real-time OS while maintaining the real-time property.

本発明はこのような問題点に鑑みなされたもので、リアルタイム性を保ちつつ、キャッシュコヒーレンシの維持にかかるオーバヘッドを低減することを目的とする。   The present invention has been made in view of such problems, and an object thereof is to reduce the overhead required for maintaining cache coherency while maintaining real-time performance.

そこで、本発明に係る情報処理装置は、記憶装置と複数のプロセッサとを有する情報処理装置であって、タスクの優先情報と前記タスクを直近に実行した、直近に実行する、或いは実行しているプロセッサを示すプロセッサ情報とがタスクごとに関連付けられて記憶されている前記記憶装置から、前記複数のプロセッサで実行可能なタスクのプロセッサ情報を読み出す読出手段と、前記複数のプロセッサのうちの一のプロセッサで次に実行されるタスクとして、前記読出手段で読み出されたプロセッサ情報が前記一のプロセッサを示すプロセッサ情報と合致するか否かを優先情報に従って判断し、合致すると判断したとき、合致すると判断したプロセッサ情報に関連付けられたタスクを決定する決定手段と、を有することを特徴とする。   Therefore, an information processing apparatus according to the present invention is an information processing apparatus having a storage device and a plurality of processors, and the task priority information and the task are executed most recently, or are most recently executed or executed. Reading means for reading processor information of a task executable by the plurality of processors from the storage device in which processor information indicating the processor is stored in association with each task, and one processor of the plurality of processors Then, as a task to be executed next, it is determined according to priority information whether the processor information read by the reading means matches the processor information indicating the one processor. And determining means for determining a task associated with the processor information.

本発明によれば、リアルタイム性を保ちつつ、キャッシュコヒーレンシの維持にかかるオーバヘッドを低減することができる。   According to the present invention, it is possible to reduce overhead associated with maintaining cache coherency while maintaining real-time performance.

リアルタイムOSの構成の一例を示す図である。It is a figure which shows an example of a structure of real-time OS. 情報処理装置のハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions of information processing apparatus. テーブルの一例を示す図である。It is a figure which shows an example of a table. 実行可能タスク群におけるタスクの関係の一例を示す図である。It is a figure which shows an example of the relationship of the task in an executable task group. タスクスイッチ処理に係るフローチャートの一例を示す図である。It is a figure which shows an example of the flowchart which concerns on a task switch process. タスクスイッチ処理に係るフローチャートの一例を示す図である。It is a figure which shows an example of the flowchart which concerns on a task switch process. テーブルの一例を示す図である。It is a figure which shows an example of a table. 実行可能タスク群におけるタスクの関係の一例を示す図である。It is a figure which shows an example of the relationship of the task in an executable task group. タスクスイッチ処理に係るフローチャートの一例を示す図である。It is a figure which shows an example of the flowchart which concerns on a task switch process. テーブルの一例を示す図である。It is a figure which shows an example of a table. 実行可能タスク群におけるタスクの関係の一例を示す図である。It is a figure which shows an example of the relationship of the task in an executable task group.

以下、本発明の実施形態について図面に基づいて説明する。なお、実施形態は、本発明を限定するものではなく、また、実施形態で説明されている全ての構成が本発明の課題を解決するための手段に必須であるとは限らない。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. The embodiments do not limit the present invention, and all the configurations described in the embodiments are not necessarily essential to the means for solving the problems of the present invention.

<第1の実施形態>
図1は、本実施形態に係るマルチプロセッサに対応した組込み用のリアルタイムOSの構成の一例(OS101)を示す図である。
OS101は、優先順位に基づくプリエンプティブスケジューリング方式(プリエンプティブマルチタスク)のリアルタイムOSであり、タスク単位で負荷を各プロセッサに分散させることでプロセッサ102を管理する。プロセッサ102は、プロセッサユニット「PU0」、「PU1」、「PU2」等、複数のプロセッサユニットを含んで構成される。各プロセッサユニットは、それぞれ必要な初期化が行われた後やスケジューリングポイント毎に、タスク実行判断部105により決定(選定)されたタスクに処理の対象を切替えてその処理を行う。
<First Embodiment>
FIG. 1 is a diagram showing an example (OS 101) of a configuration of an embedded real-time OS corresponding to the multiprocessor according to the present embodiment.
The OS 101 is a real-time OS based on a priority based preemptive scheduling method (preemptive multitasking), and manages the processor 102 by distributing a load to each processor in units of tasks. The processor 102 includes a plurality of processor units such as processor units “PU0”, “PU1”, and “PU2”. Each processor unit performs processing by switching the processing target to a task determined (selected) by the task execution determination unit 105 after necessary initialization is performed or for each scheduling point.

OS101は、OS101の仕様情報に従って実行可能タスク群103を管理する。実行可能タスクとは、その時点でそのタスクが、最大の優先順位を有している場合、割込み処理が発生しない限りプロセッサ上で実行されるタスクである。ここでは、実行可能タスクの全てをまとめて実行可能タスク群103と称する。
ここで、一般の組込み用のリアルタイムOSは、実行可能タスク群を優先順位の順に、同一の優先順位内では先着順(タスクがリアルタイムOSに到着した順)にタスクを管理する。また、一般の組込み用のリアルタイムOSは、スケジューリングポイント毎に、最大の優先順位かつ先頭のタスクを1つ抽出してプロセッサ上で動作させることでリアルタイム性の一翼を実現している。
The OS 101 manages the executable task group 103 according to the specification information of the OS 101. An executable task is a task that is executed on a processor unless interrupt processing occurs when the task has the highest priority at that time. Here, all the executable tasks are collectively referred to as an executable task group 103.
Here, the general embedded real-time OS manages the tasks in the order of priority of the executable task group, and the first-come-first-served order (the order in which the tasks arrived at the real-time OS) within the same priority order. In addition, a general embedded real-time OS realizes one part of real-time performance by extracting one task with the highest priority and the top task for each scheduling point and operating it on the processor.

実行ヒント情報104は、実行可能タスク群103の中のタスクが前回の実行時にプロセッサ102のどのプロセッサユニットで実行されたか等を示すプロセッサ情報の一例である。
タスク実行判断部105は、プロセッサ102のプロセッサユニットで次回に実行される(動作させる)タスクを決定する。本実施形態では、タスク実行判断部105は、各スケジューリングポイントにおいて、この時点での実行可能タスク群103の最大の優先順位をもつタスクのみを対象とする。そして、タスク実行判断部105は、対象としたタスクの先着順に実行ヒント情報104を参照する。
The execution hint information 104 is an example of processor information indicating in which processor unit of the processor 102 the task in the executable task group 103 was executed at the previous execution.
The task execution determination unit 105 determines a task to be executed (operated) next time in the processor unit of the processor 102. In the present embodiment, the task execution determination unit 105 targets only the task having the highest priority of the executable task group 103 at this time point at each scheduling point. Then, the task execution determination unit 105 refers to the execution hint information 104 in the order of arrival of the target tasks.

例えば、タスク実行判断部105は、プロセッサ102のうちの対象としたプロセッサユニットと対象としたタスクを前回に実行したプロセッサユニットとが一致するか否かを、実行ヒント情報104をもとに判断する。
タスク実行判断部105は、一致すると判断した場合、対象としたプロセッサユニットで次回に実行されるタスクとして、一致すると判断した実行ヒント情報104のタスクを決定する。他方、タスク実行判断部105は、一致しないと判断した場合、一致すると判断するまで、対象としたタスクの実行ヒント情報104を順次に参照して同様に判断を行う。
また、タスク実行判断部105は、実行可能タスク群103のうちの対象としたタスクに、対象としたプロセッサユニットで前回に実行されたタスクがないと判断したとする。この場合、タスク実行判断部105は、最大の優先順位のタスクのうちから先頭のタスク(最も先にOS101に到着したタスク)を次回に実行されるタスクとして決定する。
For example, the task execution determination unit 105 determines whether the target processor unit in the processor 102 matches the processor unit that previously executed the target task based on the execution hint information 104. .
If the task execution determination unit 105 determines that they match, the task execution determination unit 105 determines the task of the execution hint information 104 determined to match as the task to be executed next by the target processor unit. On the other hand, if the task execution determination unit 105 determines that they do not match, the task execution determination unit 105 sequentially determines the target task execution hint information 104 until it determines that they match.
Further, it is assumed that the task execution determination unit 105 determines that the target task in the executable task group 103 does not have a task executed previously in the target processor unit. In this case, the task execution determination unit 105 determines the first task (the task that has arrived at the OS 101 first) among the tasks with the highest priority as the task to be executed next time.

なお、詳細を示さないOS101の構成については、一般の組込みOSの構成と同様である。
本実施形態では、一般の組込みOSと同様に、リアルタイム性を実現するために、実行中のタスクが別のタスクの状態へ遷移する、より高い優先順位のタスクが実行可能な状態に遷移する、割込み処理が終了する等のタイミングをスケジューリングポイントとして、次回に実行されるタスクを決定する。
なお、プロセッサユニットの数は、限定されるものではなく、2つ以上が好適である。
The configuration of the OS 101 not shown in detail is the same as the configuration of a general embedded OS.
In the present embodiment, in order to realize real-time performance, as in a general embedded OS, a task being executed transitions to a state of another task, and a task having a higher priority transitions to a state where it can be executed. A task to be executed next time is determined by using a timing such as the end of the interrupt processing as a scheduling point.
The number of processor units is not limited, and two or more processor units are preferable.

また、実行ヒント情報104は、実行可能タスク群103のタスクの情報として示したが、これに限られるものではない。即ち、実行可能タスク群103のタスクの情報を管理することができる構成を適宜採用できる。例えば、実行ヒント情報104は、OS101に存在する全てのタスクであったり、休止中でない全てのタスクであったり等、実行可能タスク群103のタスクを包含するタスクについて管理するものであってもよい。
また、説明の便宜上、実行ヒント情報104は、それ単体の情報として示したが、これに限られるものではない。例えば、実行ヒント情報104は、全てのタスクについて管理を行うタスク管理情報の一部であってもよい。また、例えば、実行ヒント情報104は、表の形式ではなくリストの形式であってもよい。
また、実行ヒント情報104は、実行可能タスク群103が変更される度に追加や削除が行われるものであってもよい。また、実行ヒント情報104は、上述した構成を適宜に組み合わせた構成であってもよい。
Further, although the execution hint information 104 is shown as task information of the executable task group 103, it is not limited to this. That is, a configuration capable of managing task information of the executable task group 103 can be adopted as appropriate. For example, the execution hint information 104 may manage tasks including the tasks of the executable task group 103 such as all tasks existing in the OS 101 or all tasks that are not suspended. .
Further, for convenience of explanation, the execution hint information 104 is shown as single information, but is not limited thereto. For example, the execution hint information 104 may be part of task management information for managing all tasks. For example, the execution hint information 104 may be in a list format instead of a table format.
Further, the execution hint information 104 may be added or deleted each time the executable task group 103 is changed. Further, the execution hint information 104 may be configured by appropriately combining the above-described configurations.

図2は、組込みシステムに含まれるOS101を有する情報処理装置(コンピュータ)のハードウェア構成の一例を示す図である。
情報処理装置は、プロセッサユニット201、プロセッサユニット202、キャッシュコヒーレント機構203、ROM(Read Only Memory)204、RAM(Random Access Memory)205、バス206等を有する。なお、プロセッサユニット201は、プロセッサ番号「PU0」のプロセッサユニットであり、プロセッサユニット202は、プロセッサ番号「PU1」のプロセッサユニットである。
なお、OS101は、複数のプロセッサユニット(プロセッサユニット201、プロセッサユニット202等)、キャッシュコヒーレント機構203、ROM204、RAM205、バス206のハードウェア上で動作する。また、複数のプロセッサユニットの各々でキャッシュを介して行われたデータ操作は、同一のアドレスに対するデータ操作の場合、キャッシュコヒーレント機構203によって一意性が保たれる。
FIG. 2 is a diagram illustrating an example of a hardware configuration of an information processing apparatus (computer) having the OS 101 included in the embedded system.
The information processing apparatus includes a processor unit 201, a processor unit 202, a cache coherent mechanism 203, a ROM (Read Only Memory) 204, a RAM (Random Access Memory) 205, a bus 206, and the like. The processor unit 201 is a processor unit having a processor number “PU0”, and the processor unit 202 is a processor unit having a processor number “PU1”.
The OS 101 operates on the hardware of a plurality of processor units (processor unit 201, processor unit 202, etc.), cache coherent mechanism 203, ROM 204, RAM 205, and bus 206. Further, the data operation performed via the cache in each of the plurality of processor units is kept unique by the cache coherent mechanism 203 in the case of data operation on the same address.

OS101のプログラム(コード)及びOS101の動作の用に供するデータは、ROM204、RAM205の何れかに配置され、プロセッサユニット201やプロセッサユニット202により実行される。OS101のプログラムが実行されることにより、OS101の機能、後述するフローチャートに係る処理が実現される。
なお、本実施形態の情報処理装置のハードウェア構成は、上述のハードウェア構成に限られるものではない。
例えば、プロセッサユニットとキャッシュコヒーレント機構203との接続方法が異なっていてもよい。例えば、プロセッサユニットとキャッシュコヒーレント機構203とがバス206を介して接続されていてもよい。
また、上述したデバイスとは異なる他のデバイス(ハードディスク等)をバス206に接続して他のデバイスを自由に組み合わせてもよい。
The OS 101 program (code) and data used for the operation of the OS 101 are arranged in either the ROM 204 or the RAM 205 and are executed by the processor unit 201 or the processor unit 202. By executing the program of the OS 101, the function of the OS 101 and processing according to a flowchart described later are realized.
Note that the hardware configuration of the information processing apparatus according to the present embodiment is not limited to the hardware configuration described above.
For example, the connection method between the processor unit and the cache coherent mechanism 203 may be different. For example, the processor unit and the cache coherent mechanism 203 may be connected via the bus 206.
Further, another device (hard disk or the like) different from the above-described devices may be connected to the bus 206 to freely combine other devices.

次に、実行ヒント情報104について図3を参照して説明する。
図3は、ある時点でのタスクと、そのタスクの優先順位と、そのタスクが前回に実行されたプロセッサユニットを示す情報(実行ヒント情報104)とがタスクごとに関連付けられたテーブルの一例を示す図である。テーブルは、RAM205等の記憶装置に格納されている。
taskAについては、優先順位が「1」であり、実行ヒント情報104が「PU1」であることが示されている。同様に、taskBについては優先順位「1」、実行ヒント情報104「PU1」であり、taskCについては優先順位「1」、実行ヒント情報104「PU0」であることが示されている。また、同様に、taskDについては優先順位「3」、実行ヒント情報104「PU1」であり、taskEについては優先順位「3」、実行ヒント情報104「PU0」であることが示されている。
Next, the execution hint information 104 will be described with reference to FIG.
FIG. 3 shows an example of a table in which tasks at a certain point in time, priority of the tasks, and information (execution hint information 104) indicating the processor unit in which the task was executed last time are associated for each task. FIG. The table is stored in a storage device such as the RAM 205.
For taskA, the priority is “1”, and the execution hint information 104 is “PU1”. Similarly, it is indicated that priority is “1” and execution hint information 104 “PU1” for taskB, and priority “1” and execution hint information 104 “PU0” are for taskC. Similarly, it is indicated that taskD has priority “3” and execution hint information 104 “PU1”, and taskE has priority “3” and execution hint information 104 “PU0”.

ここでは、実行ヒント情報104の初期値、即ち最初にタスクが実行可能になった際の情報については詳述していない。これは、どのような初期値であっても本実施形態を実施可能であるからである。
例えば、実際に動作はしていないが、ある特定のプロセッサユニットを示す情報を初期値として実施した場合、最初にそのプロセッサユニットで実行される可能性が高くなる。また、例えば、実際のプロセッサユニットでない情報を初期値とした場合、どのプロセッサユニットで実行されるかが不定になるだけである。
なお、テーブルのデータ構造は、図3及び上述の内容に限られるものではない。
Here, the initial value of the execution hint information 104, that is, information when the task is first executable is not described in detail. This is because the present embodiment can be implemented with any initial value.
For example, in the case where information indicating a specific processor unit is used as an initial value although no actual operation is performed, there is a high possibility that it will be executed first by that processor unit. Further, for example, when information that is not an actual processor unit is set as an initial value, it is only undefined which processor unit is executed.
The data structure of the table is not limited to that shown in FIG.

次に、実行可能タスク群103について図4を参照して説明する。
図4は、ある時点での実行可能タスク群103におけるタスクの関係の一例を示す図である。実行可能となったタスクの情報(タスク情報)は、優先順位の順に、同一の優先順位内では先着順に実行可能タスク群103としてリストに登録されて管理される。なお、リストは、優先順位ごとに設けられ、RAM205等の記憶装置に記憶されている。
ここで、リスト401には、優先順位「1」の実行可能タスクを示すタスク情報が含まれ、リスト402には、優先順位「2」の実行可能タスクを示すタスク情報が含まれ、リスト403には、優先順位「3」の実行可能タスクを示すタスク情報が含まれる。
Next, the executable task group 103 will be described with reference to FIG.
FIG. 4 is a diagram illustrating an example of a task relationship in the executable task group 103 at a certain point in time. Information on tasks that can be executed (task information) is registered and managed in the list as an executable task group 103 in the order of priority in the order of arrival within the same priority. The list is provided for each priority order and is stored in a storage device such as the RAM 205.
Here, the list 401 includes task information indicating executable tasks having a priority “1”, and the list 402 includes task information indicating executable tasks having a priority “2”. Includes task information indicating an executable task having a priority “3”.

例えば、図3に示すタスクの全てが実行可能である場合、実行可能タスク群103におけるタスクの関係は、図4に示すものになる。
このとき、実行可能タスク群103の最大の優先順位は「1」であり、リスト401に登録(接続)されたタスクtaskA、taskB、taskCが次回に実行されるタスクの対象となり、また、この順序で、次回に実行されるタスクの適否の判定が行われる。即ち、優先順位、及び接続の順序(先着順と等価である。)は、タスクの割り当ての優先度合いを示す優先情報の一例である。
なお、実行可能タスク群103のデータ構造は、図4及び上述の内容に限られるものではない。
For example, when all of the tasks shown in FIG. 3 can be executed, the relationship of the tasks in the executable task group 103 is as shown in FIG.
At this time, the maximum priority of the executable task group 103 is “1”, and the tasks taskA, taskB, and taskC registered (connected) in the list 401 are the targets of the task to be executed next time. Thus, the suitability of the task to be executed next time is determined. That is, the priority order and the connection order (equivalent to the first-come-first-served basis) are examples of priority information indicating the priority of task assignment.
The data structure of the executable task group 103 is not limited to that shown in FIG.

次に、タスク実行判断部105の動作について図5を参照して説明する。また、実行ヒント情報104が図3に示すものであり、実行可能タスク群103が図4に示すものである場合のタスク実行判断部105の挙動を合わせて説明する。
図5は、タスク実行判断部105におけるタスクスイッチ処理に係るフローチャートの一例を示す図である。タスクスイッチ処理は、各プロセッサユニットにおいてスケジューリングポイントで開始される。なお、タスクスイッチ処理が実行されているプロセッサユニットを実行プロセッサユニットと称する。
Next, the operation of the task execution determination unit 105 will be described with reference to FIG. The behavior of the task execution determination unit 105 when the execution hint information 104 is as shown in FIG. 3 and the executable task group 103 is as shown in FIG. 4 will be described together.
FIG. 5 is a diagram illustrating an example of a flowchart relating to task switching processing in the task execution determination unit 105. Task switch processing is started at a scheduling point in each processor unit. A processor unit on which task switch processing is executed is referred to as an execution processor unit.

S501では、タスク実行判断部105は、実行可能タスク群103として登録されているタスクのうちの最大の優先順位(規定の優先情報よりも高い優先情報を表す一例である。)のタスクのタスク情報を含むリストの先頭のタスク情報を変数tmpに保持する。
S502では、タスク実行判断部105は、tmpにタスク情報が存在するか否かを判断する。このとき、タスク実行判断部105は、タスク情報が存在しないと判断した場合、S507の処理を行い、他方、タスク情報が存在すると判断した場合、S503の処理を行う。
In step S <b> 501, the task execution determination unit 105 is task information of a task having the highest priority among tasks registered as the executable task group 103 (an example representing priority information higher than prescribed priority information). Is stored in a variable tmp.
In step S502, the task execution determination unit 105 determines whether task information exists in tmp. At this time, if the task execution determination unit 105 determines that the task information does not exist, the task execution determination unit 105 performs the process of S507. If the task execution determination unit 105 determines that the task information exists, the task execution determination unit 105 performs the process of S503.

S503では、タスク実行判断部105は、tmpのタスク情報に対応する実行ヒント情報104をテーブルから読出し、読出した実行ヒント情報104と実行プロセッサユニットを示すプロセッサ番号とが同一であるか否か(合致するか否か)を判断する。このとき、タスク実行判断部105は、同一であると判断した場合、S504の処理を行い、他方、異なると判断した場合、S506の処理を行う。
S504では、タスク実行判断部105は、tmpのタスク情報のタスクを実行プロセッサユニットで次回に実行されるタスクとして決定したことを示す情報をRAM205等の記憶装置に記憶し、S505の処理を行う。
In step S503, the task execution determination unit 105 reads the execution hint information 104 corresponding to the task information of tmp from the table, and determines whether or not the read execution hint information 104 and the processor number indicating the execution processor unit are the same (match). Or not). At this time, if the task execution determination unit 105 determines that they are the same, the task execution determination unit 105 performs the process of S504.
In S504, the task execution determining unit 105 stores information indicating that the task of the task information of tmp is determined as the task to be executed next by the execution processor unit in the storage device such as the RAM 205, and performs the process of S505.

S505では、タスク実行判断部105は、tmpのタスク情報に対応する実行ヒント情報104を、実行プロセッサユニットを示すプロセッサ番号に修正し、タスクスイッチ処理を終了する。
S506では、タスク実行判断部105は、tmpのタスク情報を実行可能タスク群103の該当リストの次のタスク情報に変更し、S502の処理を行う。
S507では、タスク実行判断部105は、実行可能タスク群103の最大の優先順位のリストの先頭のタスク情報のタスクを次回に実行されるタスクとして決定したことを示す情報をRAM205等の記憶装置に記憶する。更に、タスク実行判断部105は、tmpに前記タスク情報を保持し、S505の処理を行う。
In step S505, the task execution determination unit 105 corrects the execution hint information 104 corresponding to the task information of tmp to the processor number indicating the execution processor unit, and ends the task switch process.
In S506, the task execution determination unit 105 changes the task information of tmp to the next task information in the corresponding list of the executable task group 103, and performs the process of S502.
In step S <b> 507, the task execution determination unit 105 stores in the storage device such as the RAM 205 information indicating that the task of the top task information in the list of the highest priority of the executable task group 103 has been determined as the next task to be executed. Remember. Further, the task execution determination unit 105 holds the task information in tmp, and performs the process of S505.

以下では、タスクスイッチ処理がプロセッサユニット201で起動され、実行ヒント情報104が図3に示すものであり、実行可能タスク群103が図4に示すものである場合を例に挙げて上述の処理をより詳細に説明する。
まず、S501では、最大の優先順位のタスク情報を含むリストとしてリスト401が特定され、tmpにはリスト401の先頭のタスク情報「taskA」が保持される。次に、S502では、tmpに「taskA」が存在するので、続いてS503の処理が行われる。
S503では、「taskA」に対応する実行ヒント情報104が、「PU1」であり、プロセッサユニット201を示すプロセッサ番号「PU0」と異なるので、続いてS506の処理が行われる。S506では、tmpのタスク情報が「taskA」の次の(2番目の)「taskB」に変更され、S502の処理が行われる。
In the following, the task switching process is started by the processor unit 201, the execution hint information 104 is as shown in FIG. 3, and the executable task group 103 is as shown in FIG. This will be described in more detail.
First, in S501, the list 401 is specified as a list including task information with the highest priority, and the first task information “taskA” of the list 401 is held in tmp. Next, in S502, since “taskA” exists in tmp, the processing in S503 is subsequently performed.
In S503, since the execution hint information 104 corresponding to “taskA” is “PU1” and is different from the processor number “PU0” indicating the processor unit 201, the processing of S506 is subsequently performed. In S506, the task information of tmp is changed to “taskB” (second) after “taskA”, and the process of S502 is performed.

tmpに「taskB」が保持されている場合、S502、S503、S506の処理が同様に行われる。そして、S506では、tmpに「taskB」の次の「taskC」が保持される。
tmpのタスク情報が「taskC」である場合、S502の処理が同様に行わる。そして、S503では、「taskC」に対応する実行ヒント情報104が「PU0」であるので、実行プロセッサユニットを示すプロセッサ番号「PU0」と合致し、S504の処理が行われる。
S504では、次回に実行されるタスクが「taskC」と決定され、S505の処理が行われる。S505では、「taskC」に対応する実行ヒント情報104が「PU0」であるので値は変更されない。
When “taskB” is held in tmp, the processes of S502, S503, and S506 are similarly performed. In step S506, “taskC” next to “taskB” is held in tmp.
When the task information of tmp is “taskC”, the process of S502 is performed in the same manner. In S503, since the execution hint information 104 corresponding to “taskC” is “PU0”, it matches the processor number “PU0” indicating the execution processor unit, and the process of S504 is performed.
In S504, the task to be executed next time is determined as “taskC”, and the processing in S505 is performed. In S505, since the execution hint information 104 corresponding to “taskC” is “PU0”, the value is not changed.

ここで、タスクスイッチ処理では、次回に実行されると決定したタスクの実行ヒント情報104がS505において書き換えられている。この書き換えは、他の処理時に行うことも可能であり、また、tmpに保持されているタスク情報で行われなくてもよい。
例えば、あるタスクの実行中に、スケジューリングポイントが発生してタスクスイッチ処理が行われる可能性がある時点(或いは確実に行われる時点)で、まさに当該タスクを実行しているプロセッサユニットのプロセッサ番号を実行ヒント情報104としてもよい。即ち、実行ヒント情報104には、タスクが直近に実行されるプロセッサユニットのプロセッサ番号、タスクが実行されているプロセッサユニットのプロセッサ番号、及びタスクが直近に実行されたプロセッサユニットのプロセッサ番号の何れが格納されてもよい。
上述した構成によれば、マルチプロセッサに対応したリアルタイムOSにおいて、リアルタイム性を維持しつつ、キャッシュコヒーレンシの維持によるオーバヘッドを低減することが可能となる。
Here, in the task switching process, the task execution hint information 104 determined to be executed next time is rewritten in S505. This rewriting can be performed at the time of other processing, and does not have to be performed with the task information held in tmp.
For example, when a scheduling point occurs during task execution and task switch processing may be performed (or when it is surely performed), the processor number of the processor unit that is executing the task is set. The execution hint information 104 may be used. That is, the execution hint information 104 includes any of the processor number of the processor unit in which the task is executed most recently, the processor number of the processor unit in which the task is executed, and the processor number of the processor unit in which the task is executed most recently. It may be stored.
According to the configuration described above, it is possible to reduce overhead due to maintenance of cache coherency while maintaining real-time performance in a real-time OS compatible with a multiprocessor.

<第2の実施形態>
第2の実施形態は、第1の実施形態と比して、キャッシュコヒーレンシの維持にかかるオーバヘッドを相対的に低減することを可能にしている。よって、本実施形態のリアルタイム性については、第1の実施形態のリアルタイム性よりも劣ることがある。なお、本実施形態では、第1の実施形態と同一の構成については同一の符号を用いて説明を適宜省略する。
<Second Embodiment>
The second embodiment makes it possible to relatively reduce the overhead for maintaining cache coherency as compared with the first embodiment. Therefore, the real-time property of the present embodiment may be inferior to the real-time property of the first embodiment. In the present embodiment, the same components as those in the first embodiment are denoted by the same reference numerals, and description thereof is omitted as appropriate.

本実施形態のタスク実行判断部105の動作について図6を参照して説明する。
図6は、タスク実行判断部105におけるタスクスイッチ処理に係るフローチャートの一例を示す図である。
S601では、タスク実行判断部105は、実行可能タスク群103として登録されているタスクのうちの最大の優先順位のタスクのタスク情報を含むリストの先頭のタスク情報をtmpに保持する。更に、タスク実行判断部105は、処理したタスクの数を保持する変数cntの値を「0」とし、S602の処理を行う。
The operation of the task execution determination unit 105 of this embodiment will be described with reference to FIG.
FIG. 6 is a diagram illustrating an example of a flowchart relating to task switching processing in the task execution determination unit 105.
In step S <b> 601, the task execution determination unit 105 holds the task information at the head of the list including the task information of the task with the highest priority among the tasks registered as the executable task group 103 in tmp. Further, the task execution determination unit 105 sets the value of the variable cnt that holds the number of processed tasks to “0”, and performs the process of S602.

S602では、タスク実行判断部105は、tmpにタスク情報が存在し、かつ、cntの値が規定数の一例であるプロセッサユニットの数よりも少ないか否かを判断する。このとき、タスク実行判断部105は、両方の条件を満たすと判断した場合、S603の処理を行い、他方、両方の条件の少なくとも一方が満たされないと判断した場合、S607の処理を行う。
S603では、タスク実行判断部105は、tmpのタスク情報に対応する実行ヒント情報104をテーブルから読出し、読出した実行ヒント情報104と実行プロセッサユニットを示すプロセッサ番号とが同一であるか否かを判断する。このとき、タスク実行判断部105は、同一であると判断した場合、S604の処理を行い、他方、異なると判断した場合、S606の処理を行う。
In step S602, the task execution determination unit 105 determines whether task information exists in tmp and whether the value of cnt is smaller than the number of processor units, which is an example of a specified number. At this time, if the task execution determination unit 105 determines that both conditions are satisfied, the task execution determination unit 105 performs the process of S603. If the task execution determination unit 105 determines that at least one of both conditions is not satisfied, the task execution determination unit 105 performs the process of S607.
In step S603, the task execution determination unit 105 reads the execution hint information 104 corresponding to the task information of tmp from the table, and determines whether or not the read execution hint information 104 and the processor number indicating the execution processor unit are the same. To do. At this time, if the task execution determination unit 105 determines that they are the same, the task execution determination unit 105 performs the process of S604. If determined different, the task execution determination unit 105 performs the process of S606.

S604では、タスク実行判断部105は、tmpのタスク情報のタスクを実行プロセッサユニットで次回に実行されるタスクとして決定したことを示す情報をRAM205等の記憶装置に記憶し、S605の処理を行う。
S605では、タスク実行判断部105は、tmpのタスク情報に対応する実行ヒント情報104を、実行プロセッサユニットを示すプロセッサ番号に修正し、タスクスイッチ処理を終了する。
In S604, the task execution determination unit 105 stores information indicating that the task of the task information of tmp is determined as the task to be executed next by the execution processor unit in a storage device such as the RAM 205, and performs the process of S605.
In step S605, the task execution determination unit 105 corrects the execution hint information 104 corresponding to the task information of tmp to the processor number indicating the execution processor unit, and ends the task switch process.

S606では、タスク実行判断部105は、tmpのタスク情報を実行可能タスク群103の該当リストの次のタスク情報に変更する。ただし、その優先順位のリストの終端である場合は、タスク実行判断部105は、次に高い優先順位のリストの先頭のタスク情報に変更する。更に、タスク実行判断部105は、cntの値に「1」を加算し、S602の処理を行う。
S607では、タスク実行判断部105は、実行可能タスク群103の最大の優先順位のリストの先頭のタスク情報のタスクを次回に実行されるタスクとして決定したことを示す情報をRAM205等の記憶装置に記憶する。更に、タスク実行判断部105は、tmpに前記タスク情報を保持し、S605の処理を行う。
In step S <b> 606, the task execution determination unit 105 changes the task information of tmp to the next task information in the corresponding list of the executable task group 103. However, if it is the end of the priority list, the task execution determination unit 105 changes the task information to the head of the next highest priority list. Further, the task execution determination unit 105 adds “1” to the value of cnt and performs the process of S602.
In step S <b> 607, the task execution determination unit 105 stores information indicating that the task of the top task information in the list of the highest priority of the executable task group 103 is determined as a task to be executed next in a storage device such as the RAM 205. Remember. Further, the task execution determination unit 105 holds the task information in tmp, and performs the process of S605.

以下では、タスクスイッチ処理がプロセッサユニット201で起動され、実行ヒント情報104が図7に示すものであり、実行可能タスク群103が図8に示すものである場合を例に挙げて上述の処理をより詳細に説明する。なお、情報処理装置は、プロセッサユニット201及びプロセッサユニット202を有し、プロセッサユニットの総数が「2」であるものとする。
まず、S601では、最大の優先順位のタスク情報を含むリストとしてリスト801が特定され、tmpにはリスト801のタスク情報「taskA」が保持され、cntには「0」が保持される。次に、S602では、tmpに「taskA」が存在し、cntが「0」であるので、両方の条件が満たされ、続いてS603の処理が行われる。
In the following, the task switching process is started by the processor unit 201, the execution hint information 104 is as shown in FIG. 7, and the executable task group 103 is as shown in FIG. This will be described in more detail. It is assumed that the information processing apparatus includes a processor unit 201 and a processor unit 202, and the total number of processor units is “2”.
First, in S601, the list 801 is specified as a list including task information with the highest priority, task information “taskA” of the list 801 is held in tmp, and “0” is held in cnt. Next, in S602, since “taskA” exists in tmp and cnt is “0”, both conditions are satisfied, and then the processing in S603 is performed.

S603では、「taskA」に対応する実行ヒント情報104が、「PU1」であり、プロセッサユニット201を示すプロセッサ番号「PU0」と異なるので、続いてS606の処理が行われる。S606では、リスト801の「taskA」が末尾(リスト801の終端)であるので、次の優先順位のリスト802が対象とされ、tmpにはリスト802の先頭の「taskB」が保持される。そして、cntには「1」が保持され、S602の処理が行われる。
tmpに「taskB」が保持されている場合、S602の処理が同様に行われる。そして、S603では、「taskB」に対応する実行ヒント情報104が「PU0」であるので、実行プロセッサユニットを示すプロセッサ番号「PU0」と合致し、S604の処理が行われる。S604では、次回に実行されるタスクがtaskBと決定され、S605の処理が行われる。S605では、「taskB」に対応する実行ヒント情報104が「PU0」であるので値は変更されない。
In S603, since the execution hint information 104 corresponding to “taskA” is “PU1” and is different from the processor number “PU0” indicating the processor unit 201, the processing of S606 is subsequently performed. In S606, since “taskA” in the list 801 is the end (end of the list 801), the next priority list 802 is targeted, and the first “taskB” in the list 802 is held in tmp. Then, “1” is held in cnt, and the process of S602 is performed.
When “taskB” is held in tmp, the process of S602 is performed in the same manner. In S603, since the execution hint information 104 corresponding to “taskB” is “PU0”, it matches the processor number “PU0” indicating the execution processor unit, and the process of S604 is performed. In S604, the task to be executed next time is determined to be taskB, and the process of S605 is performed. In S605, since the execution hint information 104 corresponding to “taskB” is “PU0”, the value is not changed.

ここで、詳細な当てはめは省略するが、上述の例を第1の実施形態のタスクスイッチ処理で行うと、taskAが次回に実行されるタスクと決定される。
上述の内容を踏まえ、第1の実施形態と第2の実施形態とを比較すると、第1の実施形態の方が優先順位順の実行が守られることでリアルタイム性が高いといえる。しかしながら、第1の実施形態では、taskAが実行されるプロセッサユニットは、前回に実行されたプロセッサユニットと異なるので、データ操作時にキャッシュコヒーレンシの維持にかかるオーバヘッドが大きくなる可能性がある。
Here, although detailed fitting is omitted, when the above example is performed in the task switching process of the first embodiment, taskA is determined as a task to be executed next time.
When the first embodiment and the second embodiment are compared based on the above-described contents, it can be said that the first embodiment has higher real-time performance because execution in the priority order is protected. However, in the first embodiment, the processor unit on which taskA is executed is different from the processor unit that was executed last time, and thus there is a possibility that the overhead for maintaining cache coherency during data operations may increase.

なお、本実施形態のタスクスイッチ処理が、第1の実施形態に示す図3、図4の条件で行われると、次回に実行されるタスクとしては、taskAが決定される。
上述した構成によれば、第1の実施形態に比して、リアルタイム性の実現に劣るもののキャッシュコヒーレンシの維持にかかるオーバヘッドをより低減するマルチプロセッサに対応したリアルタイムOSを実現できる。
付言するならば、本実施形態に係るその他の構成及び動作については、第1の実施形態と同様である。
Note that when the task switch processing of this embodiment is performed under the conditions of FIGS. 3 and 4 shown in the first embodiment, taskA is determined as the task to be executed next time.
According to the configuration described above, it is possible to realize a real-time OS corresponding to a multiprocessor that reduces the overhead required for maintaining cache coherency, although it is inferior to real-time performance compared to the first embodiment.
In other words, other configurations and operations according to the present embodiment are the same as those of the first embodiment.

<第3の実施形態>
第3の実施形態は、第1及び第2の実施形態と比して、リアルタイム性を相対的に向上させる構成を有する。なお、本実施形態では、第1の実施形態と同一の構成については同一の符号を用いて説明を適宜省略する。
<Third Embodiment>
The third embodiment has a configuration that improves the real-time property relative to the first and second embodiments. In the present embodiment, the same components as those in the first embodiment are denoted by the same reference numerals, and description thereof is omitted as appropriate.

本実施形態のタスク実行判断部105の動作について図9を参照して説明する。
図9は、タスク実行判断部105におけるタスクスイッチ処理に係るフローチャートの一例を示す図である。
S901では、タスク実行判断部105は、実行可能タスク群103として登録されているタスクのうちの最大の優先順位のタスクのタスク情報を含むリストの先頭のタスク情報をtmpに保持する。更に、タスク実行判断部105は、処理したタスクの数を保持する変数cntの値を「0」とし、S902の処理を行う。
The operation of the task execution determination unit 105 of this embodiment will be described with reference to FIG.
FIG. 9 is a diagram illustrating an example of a flowchart relating to task switching processing in the task execution determination unit 105.
In step S <b> 901, the task execution determination unit 105 holds the task information at the head of the list including the task information of the task with the highest priority among the tasks registered as the executable task group 103 in tmp. Further, the task execution determination unit 105 sets the value of the variable cnt that holds the number of processed tasks to “0”, and performs the process of S902.

S902では、タスク実行判断部105は、tmpにタスク情報が存在し、かつ、cntの値がプロセッサユニットの数よりも少ないか否かを判断する。このとき、タスク実行判断部105は、両方の条件を満たすと判断した場合、S903の処理を行い、他方、両方の条件を満たさないと判断した場合、S907の処理を行う。
S903では、タスク実行判断部105は、tmpのタスク情報に対応する実行ヒント情報104をテーブルから読出し、読出した実行ヒント情報104と実行プロセッサユニットを示すプロセッサ番号とが同一であるか否か(合致するか否か)を判断する。このとき、タスク実行判断部105は、同一であると判断した場合、S904の処理を行い、他方、異なると判断した場合、S906の処理を行う。
In step S902, the task execution determination unit 105 determines whether task information exists in tmp and whether the value of cnt is smaller than the number of processor units. At this time, if the task execution determining unit 105 determines that both conditions are satisfied, the process of S903 is performed, and if it is determined that both conditions are not satisfied, the process of S907 is performed.
In step S903, the task execution determination unit 105 reads the execution hint information 104 corresponding to the task information of tmp from the table, and determines whether or not the read execution hint information 104 and the processor number indicating the execution processor unit are the same (match). Or not). At this time, if the task execution determination unit 105 determines that they are the same, the task execution determination unit 105 performs the process of S904, and if determined to be different, performs the process of S906.

S904では、タスク実行判断部105は、tmpのタスク情報のタスクを実行プロセッサユニットで次回に実行されるタスクとして決定したことを示す情報をRAM205等の記憶装置に記憶し、S905の処理を行う。
S905では、タスク実行判断部105は、tmpのタスク情報に対応する実行ヒント情報104を、実行プロセッサユニットを示すプロセッサ番号に修正し、タスクスイッチ処理を終了する。
In step S904, the task execution determination unit 105 stores information indicating that the task in the task information of tmp is determined as a task to be executed next by the execution processor unit in a storage device such as the RAM 205, and performs the processing in step S905.
In step S905, the task execution determination unit 105 corrects the execution hint information 104 corresponding to the task information of tmp to the processor number indicating the execution processor unit, and ends the task switch process.

S906では、タスク実行判断部105は、tmpのタスクを実行可能タスク群103の該当リストの次のタスク情報に変更し、cntの値に「1」を加算し、S902の処理を行う。
S907では、タスク実行判断部105は、実行可能タスク群103の最大の優先順位のリストの先頭のタスク情報のタスクを次回に実行されるタスクとして決定したことを示す情報をRAM205等の記憶装置に記憶する。更に、タスク実行判断部105は、tmpに前記タスク情報を保持し、S905の処理を行う。
In S906, the task execution determination unit 105 changes the task of tmp to the next task information in the corresponding list of the executable task group 103, adds “1” to the value of cnt, and performs the process of S902.
In step S907, the task execution determination unit 105 stores information indicating that the task of the top task information in the list of the highest priority of the executable task group 103 is determined as a task to be executed next in a storage device such as the RAM 205. Remember. Further, the task execution determination unit 105 holds the task information in tmp, and performs the process of S905.

以下では、タスクスイッチ処理がプロセッサユニット201で起動され、実行ヒント情報104が図10に示すものであり、実行可能タスク群103が図11に示すものである場合を例に挙げて上述の処理をより詳細に説明する。なお、情報処理装置は、プロセッサユニット201及びプロセッサユニット202を有し、プロセッサユニットの総数が「2」であるものとする。
まず、S901では、最大の優先順位のタスク情報を含むリストとしてリスト1101が特定され、tmpにはリスト1101のタスク情報「taskA」が保持され、cntには「0」が保持される。次に、S902では、tmpに「taskA」が存在し、cntが「0」であるので、両方の条件が満たされ、S903の処理が行われる。
In the following, the task switching process is started by the processor unit 201, the execution hint information 104 is as shown in FIG. 10, and the executable task group 103 is as shown in FIG. This will be described in more detail. It is assumed that the information processing apparatus includes a processor unit 201 and a processor unit 202, and the total number of processor units is “2”.
First, in S901, the list 1101 is specified as a list including task information with the highest priority, task information “taskA” of the list 1101 is held in tmp, and “0” is held in cnt. Next, in S902, since “taskA” exists in tmp and cnt is “0”, both conditions are satisfied, and the processing in S903 is performed.

S903では、「taskA」に対応する実行ヒント情報104が、「PU1」であり、プロセッサユニット201を示すプロセッサ番号「PU0」と異なるので、続いてS906の処理が行われる。S906では、tmpには「taskB」が保持され、cntには「1」が保持され、続いてS902の処理が行われる。
tmpに「taskB」が保持されている場合、S902の処理が同様に行われる。そして、S903では、「taskB」に対応する実行ヒント情報104が「PU0」であるので、実行プロセッサユニットを示すプロセッサ番号と合致し、S904の処理が行われる。S904では、次回に実行されるタスクがtaskBとなり、S905の処理が行われる。S905では、「taskB」に対応する実行ヒント情報104が「PU0」であるので値は変更されない。
In S903, since the execution hint information 104 corresponding to “taskA” is “PU1” and is different from the processor number “PU0” indicating the processor unit 201, the processing of S906 is subsequently performed. In S906, “taskB” is held in tmp, “1” is held in cnt, and then the processing in S902 is performed.
When “taskB” is held in tmp, the process of S902 is performed in the same manner. In S903, since the execution hint information 104 corresponding to “taskB” is “PU0”, it matches the processor number indicating the execution processor unit, and the process of S904 is performed. In S904, the task to be executed next time is taskB, and the processing in S905 is performed. In S905, since the execution hint information 104 corresponding to “taskB” is “PU0”, the value is not changed.

ここで、詳細な当てはめは省略するが、上述の例を第1の実施形態のタスクスイッチ処理で行うと、taskBが次回に実行されるタスクと決定され、第2の実施形態のタスクスイッチ処理で行うと、taskBが次回に実行されるタスクと決定される。
また、本実施形態のタスクスイッチ処理が、第1の実施形態に示す図3、図4に示す条件で行われると、次回に実行されるタスクはtaskAと決定され、第2の実施形態に示す図7、図8の条件で行われると、次回に実行されるタスクはtaskAと決定される。
上述した構成によれば、第1、及び第2の実施形態に比して、リアルタイム性をより向上させるマルチプロセッサに対応したリアルタイムOSを実現できる。
付言するならば、本実施形態に係るその他の構成及び動作については、第1の実施形態と同様である。
Here, although detailed fitting is omitted, when the above example is performed in the task switch process of the first embodiment, taskB is determined as the task to be executed next time, and the task switch process of the second embodiment is performed. If done, taskB is determined as the task to be executed next time.
Further, when the task switch processing of the present embodiment is performed under the conditions shown in FIGS. 3 and 4 shown in the first embodiment, the task to be executed next is determined as taskA, which is shown in the second embodiment. When performed under the conditions of FIGS. 7 and 8, the task to be executed next time is determined as taskA.
According to the configuration described above, it is possible to realize a real-time OS corresponding to a multiprocessor that improves the real-time property as compared with the first and second embodiments.
In other words, other configurations and operations according to the present embodiment are the same as those of the first embodiment.

<その他の実施形態>
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(又はCPUやMPU等)がプログラムを読み出して実行する処理である。
<Other embodiments>
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, etc.) of the system or apparatus reads the program. It is a process to be executed.

上述した実施形態の構成によれば、リアルタイム性を保ちつつ、キャッシュコヒーレンシの維持にかかるオーバヘッドを低減することができる。   According to the configuration of the above-described embodiment, it is possible to reduce overhead for maintaining cache coherency while maintaining real-time performance.

以上、本発明の好ましい実施形態について詳述したが、本発明は係る特定の実施形態に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形・変更が可能である。   The preferred embodiments of the present invention have been described in detail above, but the present invention is not limited to such specific embodiments, and various modifications can be made within the scope of the gist of the present invention described in the claims.・ Change is possible.

101 OS、102 プロセッサ、103 実行可能タスク群、104 実行ヒント情報、105 タスク実行判断部 101 OS, 102 processor, 103 executable task group, 104 execution hint information, 105 task execution determination unit

Claims (8)

記憶装置と複数のプロセッサとを有する情報処理装置であって、
タスクの優先情報と前記タスクを直近に実行した、直近に実行する、或いは実行しているプロセッサを示すプロセッサ情報とがタスクごとに関連付けられて記憶されている前記記憶装置から、前記複数のプロセッサで実行可能なタスクのプロセッサ情報を読み出す読出手段と、
前記複数のプロセッサのうちの一のプロセッサで次に実行されるタスクとして、前記読出手段で読み出されたプロセッサ情報が前記一のプロセッサを示すプロセッサ情報と合致するか否かを優先情報に従って判断し、合致すると判断したとき、合致すると判断したプロセッサ情報に関連付けられたタスクを決定する決定手段と、
を有することを特徴とする情報処理装置。
An information processing apparatus having a storage device and a plurality of processors,
From the storage device in which the priority information of the task and the processor information indicating the processor which has executed the task most recently, or which has been executed or is being executed are associated and stored for each task, the plurality of processors Reading means for reading processor information of executable tasks;
As a task to be executed next by one of the plurality of processors, it is determined according to priority information whether or not the processor information read by the reading means matches the processor information indicating the one processor. Determining means for determining a task associated with the processor information determined to match when determined to match;
An information processing apparatus comprising:
前記決定手段は、前記読出手段で読み出されたプロセッサ情報の全てが合致しないと判断したとき、読み出されたプロセッサ情報に関連付けられたタスクのうち最も優先情報が高いタスクを前記次に実行されるタスクとして決定することを特徴とする請求項1に記載の情報処理装置。   When the determining unit determines that all of the processor information read by the reading unit does not match, the task having the highest priority information among the tasks associated with the read processor information is executed next. The information processing apparatus according to claim 1, wherein the information processing apparatus is determined as a task. 前記読出手段は、前記複数のプロセッサで実行可能なタスクのうち、規定の優先情報よりも高い優先情報のタスクのプロセッサ情報を読み出すことを特徴とする請求項2に記載の情報処理装置。   The information processing apparatus according to claim 2, wherein the reading unit reads processor information of a task having priority information higher than prescribed priority information among tasks executable by the plurality of processors. 前記記憶装置に記憶されているタスクの優先情報は、前記タスクの優先順位と前記タスクの先着順とを示す情報であり、
前記規定の優先情報よりも高い優先情報は、最大の優先順位の優先情報であり、
前記読出手段は、前記複数のプロセッサで実行可能なタスクのうち、最大の優先順位のタスクのプロセッサ情報を読み出し、
前記決定手段は、前記次に実行されるタスクとして、前記読出手段で読み出されたプロセッサ情報が前記一のプロセッサを示すプロセッサ情報と合致するか否かを先着順に従って判断し、合致すると判断したとき、合致すると判断したプロセッサ情報に関連付けられたタスクを決定し、
前記決定手段は、前記読出手段で読み出されたプロセッサ情報の全てが合致しないと判断したとき、読み出されたプロセッサ情報に関連付けられたタスクのうち先頭の先着順のタスクを前記次に実行されるタスクとして決定することを特徴とする請求項3に記載の情報処理装置。
The task priority information stored in the storage device is information indicating the priority order of the tasks and the first-come-first-served order of the tasks,
Priority information higher than the prescribed priority information is priority information with the highest priority,
The reading means reads processor information of a task having the highest priority among tasks that can be executed by the plurality of processors,
The determining means determines whether the processor information read by the reading means matches the processor information indicating the one processor according to the first-come-first-served basis as the next task to be executed, and determines that they match. When determining the task associated with the processor information that is determined to match,
When the determination unit determines that all of the processor information read by the reading unit does not match, the task in the first-come-first-served basis among the tasks associated with the read processor information is executed next. The information processing apparatus according to claim 3, wherein the information processing apparatus is determined as a task.
前記読出手段は、前記複数のプロセッサで実行可能なタスクのうち、優先情報が高いものからの規定数に含まれるタスクのプロセッサ情報を読み出すことを特徴とする請求項2に記載の情報処理装置。   3. The information processing apparatus according to claim 2, wherein the reading unit reads processor information of a task included in a prescribed number from tasks having high priority information among tasks executable by the plurality of processors. 前記読出手段は、前記複数のプロセッサで実行可能なタスクのうち、規定の優先情報よりも高い優先情報のタスクであり、かつ優先情報が高いものからの規定数に含まれるタスクのプロセッサ情報を読み出すことを特徴とする請求項2に記載の情報処理装置。   The reading means reads processor information of a task included in a specified number from a task having priority information higher than specified priority information and having higher priority information among tasks executable by the plurality of processors. The information processing apparatus according to claim 2. 記憶装置と複数のプロセッサとを有する情報処理装置における、前記複数のプロセッサのうちの一のプロセッサで次に実行されるタスクを管理するタスク管理方法であって、
前記記憶装置には、タスクの優先情報と前記タスクを直近に実行した、直近に実行する、或いは実行しているプロセッサを示すプロセッサ情報とがタスクごとに関連付けられて記憶され、
前記記憶装置に記憶されている前記複数のプロセッサで実行可能な複数のタスクのうち最も優先情報の高いタスクのプロセッサ情報が前記一のプロセッサを示すプロセッサ情報と合致するか否かを判断する工程と、
前記工程で合致すると判断されたとき、前記次に実行されるタスクとして前記最も優先情報の高いタスクを決定する工程と、
前記工程で合致しないと判断されたとき、前記複数のタスクのうち2番目に優先情報の高いタスクのプロセッサ情報が前記一のプロセッサを示すプロセッサ情報と合致するか否かを判断する工程と、
を有することを特徴とするタスク管理方法。
A task management method for managing a task to be executed next in one of the plurality of processors in an information processing apparatus having a storage device and a plurality of processors,
In the storage device, priority information of a task and processor information indicating a processor that has executed the task most recently, or that has been executed recently, or an executing processor are stored in association with each task,
Determining whether processor information of a task having the highest priority information among a plurality of tasks executable by the plurality of processors stored in the storage device matches processor information indicating the one processor; ,
Determining the task with the highest priority information as the next task to be executed when it is determined to match in the step;
A step of determining whether or not processor information of a task having the second highest priority information among the plurality of tasks matches processor information indicating the one processor when it is determined not to match in the step;
A task management method characterized by comprising:
記憶装置と複数のプロセッサとを有するコンピュータを、
タスクの優先情報と前記タスクを直近に実行した、直近に実行する、或いは実行しているプロセッサを示すプロセッサ情報とがタスクごとに関連付けられて記憶されている前記記憶装置から、前記複数のプロセッサで実行可能なタスクのプロセッサ情報を読み出す読出手段と、
前記複数のプロセッサのうちの一のプロセッサで次に実行されるタスクとして、前記読出手段で読み出されたプロセッサ情報が前記一のプロセッサを示すプロセッサ情報と合致するか否かを優先情報に従って判断し、合致すると判断したとき、合致すると判断したプロセッサ情報に関連付けられたタスクを決定する決定手段と、
して機能させるプログラム。
A computer having a storage device and a plurality of processors,
From the storage device in which the priority information of the task and the processor information indicating the processor which has executed the task most recently, or which has been executed or is being executed are associated and stored for each task, the plurality of processors Reading means for reading processor information of executable tasks;
As a task to be executed next by one of the plurality of processors, it is determined according to priority information whether or not the processor information read by the reading means matches the processor information indicating the one processor. Determining means for determining a task associated with the processor information determined to match when determined to match;
Program to make it work.
JP2011022496A 2011-02-04 2011-02-04 Information processing device, task management method and program Pending JP2012164050A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011022496A JP2012164050A (en) 2011-02-04 2011-02-04 Information processing device, task management method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011022496A JP2012164050A (en) 2011-02-04 2011-02-04 Information processing device, task management method and program

Publications (1)

Publication Number Publication Date
JP2012164050A true JP2012164050A (en) 2012-08-30

Family

ID=46843395

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011022496A Pending JP2012164050A (en) 2011-02-04 2011-02-04 Information processing device, task management method and program

Country Status (1)

Country Link
JP (1) JP2012164050A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014078215A (en) * 2012-09-20 2014-05-01 Nec Corp Schedule system, schedule method, schedule program, and operating system
WO2014188643A1 (en) * 2013-05-24 2014-11-27 日本電気株式会社 Scheduling system, scheduling method, and recording medium
CN113723936A (en) * 2021-10-12 2021-11-30 国网安徽省电力有限公司宿州供电公司 Power engineering quality supervision and management method and system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03113563A (en) * 1989-09-28 1991-05-14 Hitachi Ltd Multiprocessor scheduling method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03113563A (en) * 1989-09-28 1991-05-14 Hitachi Ltd Multiprocessor scheduling method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014078215A (en) * 2012-09-20 2014-05-01 Nec Corp Schedule system, schedule method, schedule program, and operating system
WO2014188643A1 (en) * 2013-05-24 2014-11-27 日本電気株式会社 Scheduling system, scheduling method, and recording medium
CN113723936A (en) * 2021-10-12 2021-11-30 国网安徽省电力有限公司宿州供电公司 Power engineering quality supervision and management method and system
CN113723936B (en) * 2021-10-12 2023-11-14 国网安徽省电力有限公司宿州供电公司 Quality supervision and management method and system for electric power engineering

Similar Documents

Publication Publication Date Title
JP6961686B2 (en) GPU remote communication using trigger operation
EP2894542B1 (en) Estimating scalability of a workload
US10025686B2 (en) Generating and communicating platform event digests from a processor of a system
US8863117B2 (en) Optimizing a file system interface in a virtualized computing environment
EP2972834B1 (en) Systems and methods of executing multiple hypervisors
US20140067988A1 (en) On-Demand Caching in a WAN Separated Distributed File System or Clustered File System Cache
US10635337B2 (en) Dynamic configuration of compressed virtual memory
CN106575220B (en) Multiple clustered VLIW processing cores
US20130036426A1 (en) Information processing device and task switching method
US20210192046A1 (en) Resource Management Unit for Capturing Operating System Configuration States and Managing Malware
US20130054857A1 (en) Reducing latency at a network interface card
US10318456B2 (en) Validation of correctness of interrupt triggers and delivery
JP2012164050A (en) Information processing device, task management method and program
Ho et al. Enhancing an x86_64 multi-core architecture with data-flow execution support
US11526380B2 (en) Resource management unit for capturing operating system configuration states and offloading tasks
US9330005B2 (en) Interface and method for inter-thread communication
CN110908644B (en) Configuration method and device of state node, computer equipment and storage medium
US11256543B2 (en) Processor and instruction scheduling method
JP6227151B2 (en) A scalable mechanism for executing monitoring instructions for writing to addresses
US20120017030A1 (en) Optimizing a file system interface in a virtualized computing environment
US9311225B2 (en) DMA channels
US20100241675A1 (en) Breaking a circular reference between parent and child objects
US8806078B2 (en) Information processing device and program product
US20210191776A1 (en) Resource Management Unit for Capturing Operating System Configuration States and Memory Management
US11093401B2 (en) Hazard prediction for a group of memory access instructions using a buffer associated with branch prediction

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140204

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141003

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141021

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141211

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150303