JP5262418B2 - Task scheduling apparatus and task scheduling method - Google Patents

Task scheduling apparatus and task scheduling method Download PDF

Info

Publication number
JP5262418B2
JP5262418B2 JP2008210535A JP2008210535A JP5262418B2 JP 5262418 B2 JP5262418 B2 JP 5262418B2 JP 2008210535 A JP2008210535 A JP 2008210535A JP 2008210535 A JP2008210535 A JP 2008210535A JP 5262418 B2 JP5262418 B2 JP 5262418B2
Authority
JP
Japan
Prior art keywords
task
message
priority
unit
executed
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.)
Expired - Fee Related
Application number
JP2008210535A
Other languages
Japanese (ja)
Other versions
JP2010049314A (en
Inventor
悟 江尻
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP2008210535A priority Critical patent/JP5262418B2/en
Publication of JP2010049314A publication Critical patent/JP2010049314A/en
Application granted granted Critical
Publication of JP5262418B2 publication Critical patent/JP5262418B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Telephonic Communication Services (AREA)

Description

本発明は、タスク間で行われるメッセージの送信をスケジューリングするためのタスクスケジューリング装置およびタスクスケジューリング方法に関する。   The present invention relates to a task scheduling apparatus and a task scheduling method for scheduling transmission of messages performed between tasks.

リアルタイムオペレーティングシステム(RTOS)等のオペレーティングシステム(OS)では、複数のタスクが管理される。また、これらのタスク間では、データや制御信号などのメッセージの送受信が行われる。   In an operating system (OS) such as a real-time operating system (RTOS), a plurality of tasks are managed. In addition, messages such as data and control signals are transmitted and received between these tasks.

このメッセージを送受信するタスク間通信方法は、以下のように行われる。   The inter-task communication method for transmitting and receiving this message is performed as follows.

各タスクは、メッセージを蓄えるためのメッセージ受信キューを有する。また、各タスクには、優先度が予め設定される。タスクは、優先度が最も高い順に実行され、実行中のタスクは、自タスクのメッセージ受信キュー内のメッセージを、送信先のメッセージ受信キューに送信する。このとき、タスクは、予め定められたバースト量単位でメッセージを送信していき、自タスクのメッセージ受信キュー内の全てのメッセージを送信すると、次に優先度が高いタスクがメッセージの送信を行う。   Each task has a message reception queue for storing messages. Each task is preset with a priority. The tasks are executed in the order of the highest priority, and the task being executed transmits the message in the message reception queue of its own task to the destination message reception queue. At this time, the task transmits a message in a predetermined burst amount unit, and when all the messages in the message reception queue of its own task are transmitted, the task having the next highest priority transmits the message.

図7は、このタスク間通信方法を実現する情報処理装置の構成を示したブロック図である。図7において、情報処理装置は、OS部50と、アプリケーション部60とを含む。OS部50は、OSにて実現され、レディーキュー管理部51と、ディスパッチ部52と、スケジューリング部53とを含む。また、アプリケーション部60は、アプリケーションプログラムにて実現され、複数のタスクを含む。   FIG. 7 is a block diagram showing a configuration of an information processing apparatus that realizes the inter-task communication method. In FIG. 7, the information processing apparatus includes an OS unit 50 and an application unit 60. The OS unit 50 is realized by an OS, and includes a ready queue management unit 51, a dispatch unit 52, and a scheduling unit 53. The application unit 60 is realized by an application program and includes a plurality of tasks.

レディーキュー管理部51は、タスクを優先度の高い順にキューイングするための優先度別キュー(以下、レディーキューと称する)を管理する。キューイングとは、メッセージ受信キュー内のメッセージを、送信先の処理の完了を待たずに、順次送信する処理である。   The ready queue manager 51 manages a priority queue (hereinafter referred to as a ready queue) for queuing tasks in descending order of priority. Queuing is a process of sequentially transmitting messages in the message reception queue without waiting for the completion of the destination process.

ディスパッチ部52は、実行可能なタスクにディスパッチを行う。なお、ディスパッチとは、CPUの処理能力を割り当てる処理である。   The dispatch unit 52 dispatches to an executable task. The dispatch is a process for assigning CPU processing capacity.

スケジューリング部53は、アプリケーション部60から通知された各タスクの優先度を、レディーキュー管理部51を介してレディーキューに登録し、その登録内容に応じてタスクを起動する。また、スケジューリング部53は、ディスパッチ部52に、その起動したタスクに対するディスパッチを指示する。   The scheduling unit 53 registers the priority of each task notified from the application unit 60 in the ready queue via the ready queue management unit 51, and activates the task according to the registered content. In addition, the scheduling unit 53 instructs the dispatch unit 52 to dispatch the started task.

このようなタスク間通信方法では、優先度の高いタスクが自タスクのメッセージ受信キュー内のメッセージを全て送信しないと、他のタスクがメッセージを送信することができなかった。   In such an inter-task communication method, if a task with high priority does not transmit all messages in the message reception queue of its own task, other tasks cannot transmit messages.

このため、メッセージ受信キューに輻輳が発生すると、そのメッセージ受信キューがメッセージを蓄えることができなくなるという問題が発生する。例えば、メッセージが突発的に大量発生した場合など、送信先のタスクのメッセージ受信キューに蓄えることが可能なメッセージの量より多いメッセージが送信されると、そのメッセージ受信キューがメッセージを蓄えることができなくなる。この蓄えることができなかったメッセージは、破棄される。   For this reason, when congestion occurs in the message reception queue, there arises a problem that the message reception queue cannot store messages. For example, when a large number of messages occur suddenly, if more messages are sent than can be stored in the message reception queue of the destination task, the message reception queue can store the messages. Disappear. Messages that could not be stored are discarded.

このような問題は、タスク間で行われるキューイングに限らず、一般的なキューイングでも生じる。例えば、特許文献1に記載のキュー制御装置でも発生する。   Such a problem occurs not only in queuing performed between tasks but also in general queuing. For example, it also occurs in the queue control device described in Patent Document 1.

このキュー制御装置には、送受信用のポートごとに、モジュールが対応付けられている。また、各モジュールは、受信側優先制御キュー部と、送信先ポート用キュー部と、送信側キュー部とを含む。   In this queue control device, a module is associated with each transmission / reception port. Each module includes a reception-side priority control queue unit, a transmission destination port queue unit, and a transmission-side queue unit.

受信側優先制御キュー部は、自己のモジュールに対応するポートが受信したデータを蓄える。送信先ポート用キュー部は、受信側優先制御キュー部に蓄えられたデータを、そのデータを送信するポートの送信側キュー部に送信する。送信側キュー部は、送信先ポート用キュー部から受信したデータを一時的に蓄え、その蓄えたメッセージを送信先の装置に送信する。   The reception-side priority control queue unit stores data received by a port corresponding to its own module. The transmission destination port queue unit transmits the data stored in the reception-side priority control queue unit to the transmission-side queue unit of the port that transmits the data. The transmission side queue unit temporarily stores the data received from the transmission destination port queue unit, and transmits the stored message to the transmission destination device.

ここで、送信側キュー部に蓄えられる量より多いデータが送信先ポート用キュー部から送信されると、送信側キュー部では、その送信されたデータを蓄えることができなくなる。   Here, if more data than the amount stored in the transmission side queue unit is transmitted from the transmission destination port queue unit, the transmission side queue unit cannot store the transmitted data.

このキュー制御装置では、この問題を解決するために、送信側キュー部は、自己に蓄えられたデータの量が予め定められた第一値を超えると、送信先ポート用キュー部によるデータの送信を停止する。また、送信側キュー部は、自己に蓄えられたデータの量が予め定められた第二値を下回ると、送信先ポート用キュー部によるデータの送信を再開する。   In this queue control apparatus, in order to solve this problem, when the amount of data stored in the transmission side queue unit exceeds a predetermined first value, data transmission by the transmission destination port queue unit is performed. To stop. In addition, when the amount of data stored in the transmission side queue unit falls below a predetermined second value, the transmission side queue unit resumes data transmission by the transmission destination port queue unit.

これにより、送信側キュー部では、データを蓄えることができなくなる前に、新たにデータが送信されてくるのを防ぐことが可能になるので、メッセージ受信キューがメッセージを蓄えることができなくなるという問題を解決することができる。
特開2001−244981号公報
This makes it possible for the sending queue unit to prevent new data from being sent before it becomes impossible to store data, so that the message reception queue cannot store messages. Can be solved.
Japanese Patent Laid-Open No. 2001-244981

特許文献1に記載のキュー制御装置では、送信先ポート用キュー部と、送信側キュー部とは、互いに独立してデータを送信することができる。しかしながら、タスク間でメッセージの送受信が行われるタスク間通信では、上述のように、優先度の高いタスクが自タスクのメッセージ受信キュー内のメッセージを全て送信しないと、他のタスクは、メッセージを送信することができなかった。このため、特許文献1に記載の発明を、タスク間通信方法に適応すると、以下の問題が生じる。   In the queue control device described in Patent Literature 1, the transmission destination port queue unit and the transmission side queue unit can transmit data independently of each other. However, in inter-task communication in which messages are sent and received between tasks, as described above, if a task with a high priority does not send all the messages in its own message reception queue, other tasks send messages. I couldn't. For this reason, when the invention described in Patent Document 1 is applied to the inter-task communication method, the following problems occur.

つまり、タスク間通信では、送信先のタスクのメッセージ受信キューが第一値を超えたときに、送信元のタスクによるメッセージの送信を停止しても、送信先のタスクは、送信元のタスクより優先度が低いために、実行されない。したがって、送信先のタスクは、自タスクのメッセージ受信キュー内のメッセージを送信することができないので、送信先のタスクのメッセージ受信キューが第二値を下回ることがない。   In other words, in inter-task communication, if the message reception queue of the destination task exceeds the first value, the destination task will be sent from the source task even if the source task stops sending messages. Not executed due to low priority. Therefore, since the task at the transmission destination cannot transmit the message in the message reception queue of its own task, the message reception queue of the task at the transmission destination does not fall below the second value.

このため、タスク間でメッセージの送受信が行われる場合には、メッセージ受信キューがメッセージを蓄えることができなくなり、そのメッセージが破棄されるという問題を解決することができない。   For this reason, when messages are transmitted and received between tasks, the message reception queue cannot store messages, and the problem that the messages are discarded cannot be solved.

本発明の目的は、上記の課題である、タスク間でメッセージの送受信を行う場合に、メッセージが破棄されるという問題を解決するタスクスケジューリング装置およびタスクスケジューリング方法を提供することである。   An object of the present invention is to provide a task scheduling apparatus and a task scheduling method that solve the above-described problem that a message is discarded when a message is transmitted and received between tasks.

本発明によるタスクスケジューリング装置は、複数のタスクを優先度の高いタスクから順に実行するタスクスケジューリング装置であって、各タスクの識別情報を、該タスクの優先度と対応付けて記憶する優先度記憶手段と、各タスクに対応し、該タスク用のメッセージを蓄える複数のメッセージ記憶手段と、前記優先度記憶手段内の識別情報のうち、最も高い優先度に対応する識別情報にて特定されるタスクを実行する制御手段と、実行中のタスクに対応するメッセージ記憶手段内のメッセージを、該メッセージの送信先のメッセージ記憶手段に送信する転送手段と、前記送信先のメッセージ記憶手段内のメッセージの量が予め定められた第一閾値以上であるか否かを判断する判断手段と、前記判断手段にて前記メッセージの量が前記第一閾値以上であると判断された場合、前記転送手段による前記メッセージの送信を停止し、かつ、前記優先度記憶手段内の、前記送信先のメッセージ記憶手段に対応するタスクの優先度を、前記実行中のタスクの優先度より高い優先度に変更し、その後、前記実行中のタスクを終了する管理手段と、を含む。   A task scheduling apparatus according to the present invention is a task scheduling apparatus that executes a plurality of tasks in order from a task with a higher priority, and stores priority identification means for storing identification information of each task in association with the priority of the task. A plurality of message storage means corresponding to each task and storing messages for the task, and a task identified by the identification information corresponding to the highest priority among the identification information in the priority storage means. Control means for executing, transfer means for sending a message in the message storage means corresponding to the task being executed to the message storage means of the destination of the message, and the amount of messages in the message storage means of the destination Determining means for determining whether or not a predetermined first threshold value or more; and determining the amount of the message by the determining means When it is determined that the value is greater than or equal to the value, the transmission of the message by the transfer unit is stopped, and the priority of the task corresponding to the message storage unit of the transmission destination in the priority storage unit is executed. Management means for changing the priority to a priority higher than that of the middle task and then terminating the task being executed.

また、本発明によるタスクスケジューリング方法は、複数のタスクの識別情報のそれぞれを、該タスクの優先度と対応付けて記憶する優先度記憶手段と、各タスクに対応し、該タスク用のメッセージを蓄える複数のメッセージ記憶手段と、を含むタスクスケジューリング装置によるスケジューリング方法であって、前記優先度記憶手段内の識別情報のうち、最も高い優先度に対応する識別情報にて特定されるタスクを実行し、実行中のタスクに対応するメッセージ記憶手段内のメッセージを、該メッセージの送信先のメッセージ記憶手段に送信し、前記送信先のメッセージ記憶手段内のメッセージの量が予め定められた第一閾値以上であるか否かを判断し、前記メッセージの量が前記第一閾値以上であると判断された場合、前記メッセージの送信を停止し、かつ、前記優先度記憶手段内の、前記送信先のメッセージ記憶手段に対応するタスクの優先度を、前記実行中のタスクの優先度より高い優先度に変更し、前記実行中のタスクを終了する。   The task scheduling method according to the present invention also stores a priority storage means for storing each piece of identification information of a plurality of tasks in association with the priority of the task, and stores a message for the task corresponding to each task. A scheduling method by a task scheduling device including a plurality of message storage means, and executing a task specified by the identification information corresponding to the highest priority among the identification information in the priority storage means, A message in the message storage means corresponding to the task being executed is transmitted to the message storage means of the transmission destination of the message, and the amount of messages in the message storage means of the transmission destination is a predetermined first threshold value or more And if it is determined that the amount of the message is greater than or equal to the first threshold, The priority of the task corresponding to the message storage means of the transmission destination in the priority storage means is changed to a priority higher than the priority of the task being executed, End the task.

本発明によれば、タスク間でメッセージの送受信が行われる場合に、メッセージが破棄されることを抑制することが可能になる。   ADVANTAGE OF THE INVENTION According to this invention, when transmitting / receiving a message between tasks, it becomes possible to suppress that a message is discarded.

以下、本発明の実施形態について図面を参照して説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図1は、本発明の一実施形態の情報処理装置の構成を示したブロック図である。図1において、情報処理装置100は、記憶部101と、情報処理部102とを含む。   FIG. 1 is a block diagram showing a configuration of an information processing apparatus according to an embodiment of the present invention. In FIG. 1, the information processing apparatus 100 includes a storage unit 101 and an information processing unit 102.

記憶部101は、レディーキュー111と、メッセージ(MSG)受信キュー112とを含む。   The storage unit 101 includes a ready queue 111 and a message (MSG) reception queue 112.

レディーキュー111は、優先度記憶手段の一例である。レディーキュー111は、複数のタスクのそれぞれの識別情報を、そのタスクの優先度と対応付けて記憶する。   The ready queue 111 is an example of a priority storage unit. The ready queue 111 stores the identification information of each of the plurality of tasks in association with the priority of the task.

メッセージ受信キュー112は、複数ある。メッセージ受信キュー112のそれぞれは、複数のタスクのいずれかに対応する。メッセージ受信キュー112は、自キュー(メッセージ受信キュー112)に対応するタスク用のメッセージを蓄える。   There are a plurality of message reception queues 112. Each of the message reception queues 112 corresponds to one of a plurality of tasks. The message reception queue 112 stores messages for tasks corresponding to the own queue (message reception queue 112).

情報処理部102は、例えば、CPUであり、CPUにて読み取り可能な記録媒体からOSおよびアプリケーションプログラムを読み取り、その読み取ったOSおよびアプリケーションプログラムを実行する。なお、記録媒体は、記憶部101でもよいし、記憶部101とは別でもよい。   The information processing unit 102 is, for example, a CPU, reads an OS and an application program from a recording medium readable by the CPU, and executes the read OS and application program. Note that the recording medium may be the storage unit 101 or may be different from the storage unit 101.

図2は、情報処理部102の構成例を示したブロック図である。図2において、情報処理部102は、OS部1と、アプリケーション部11とを含む。   FIG. 2 is a block diagram illustrating a configuration example of the information processing unit 102. In FIG. 2, the information processing unit 102 includes an OS unit 1 and an application unit 11.

OS部1は、制御手段の一例であり、情報処理部102がOSを実行することで実現される。OS部1は、システムコール処理部2と、レディーキュー管理部3と、スケジューリング部4と、ディスパッチ部5と、メッセージ受信キュー管理部6とを含む。   The OS unit 1 is an example of a control unit, and is realized by the information processing unit 102 executing the OS. The OS unit 1 includes a system call processing unit 2, a ready queue management unit 3, a scheduling unit 4, a dispatch unit 5, and a message reception queue management unit 6.

システムコール処理部2は、アプリケーション部11からシステムコールを受信する。システムコールには、タスクの優先度を変更する変更システムコール、新規のタスクを登録する登録システムコール、メッセージの送信先のメッセージ受信キュー112に蓄えられているメッセージの量を測定する測定システムコール、メッセージの送信元のメッセージ受信キュー112に蓄えられているメッセージの量を測定する監視システムコール、および、実行中のタスクを終了する終了システムコールなどがある。以下、その蓄えられているメッセージの量を滞留量と称する。   The system call processing unit 2 receives a system call from the application unit 11. The system call includes a change system call for changing the priority of the task, a registration system call for registering a new task, a measurement system call for measuring the amount of messages stored in the message reception queue 112 of the message destination, There are a monitoring system call for measuring the amount of messages stored in the message reception queue 112 of the message transmission source, an end system call for terminating the task being executed, and the like. Hereinafter, the amount of the stored message is referred to as a staying amount.

レディーキュー管理部3は、記憶部101内のレディーキュー111を管理する。具体的には、レディーキュー管理部3は、レディーキュー111内の情報の変更や削除、および、レディーキュー111への識別情報および優先度の登録などを行う。より具体的には、システムコール処理部2が変更システムコールを受信すると、レディーキュー管理部3は、その変更システムコールに従って、レディーキュー111内のタスクの優先度を変更する。また、システムコール処理部2が登録システムコールを受信すると、その登録システムコールに従って、識別情報および優先度を対応付けてレディーキュー111に登録する。さらに、システムコール処理部2が終了システムコールを受信すると、レディーキュー管理部3は、その終了システムコールに従って、レディーキュー111内の情報を削除する。   The ready queue management unit 3 manages the ready queue 111 in the storage unit 101. Specifically, the ready queue management unit 3 changes or deletes information in the ready queue 111 and registers identification information and priority in the ready queue 111. More specifically, when the system call processing unit 2 receives the changed system call, the ready queue management unit 3 changes the priority of the task in the ready queue 111 according to the changed system call. Further, when the system call processing unit 2 receives the registration system call, the identification information and the priority are associated with each other and registered in the ready queue 111 according to the registration system call. Further, when the system call processing unit 2 receives the end system call, the ready queue management unit 3 deletes the information in the ready queue 111 according to the end system call.

スケジューリング部4は、レディーキュー111内の識別情報が特定するタスクを、優先度の高いタスクから順に起動する。具体的には、スケジューリング部4は、レディーキュー111内の最も高い優先度のタスクを起動し、その後、システムコール処理部2が終了システムコールを受信すると、その起動したタスクを終了する。そして、スケジューリング部4は、レディーキュー111内の最も高い優先度のタスクを起動する。   The scheduling unit 4 starts the tasks specified by the identification information in the ready queue 111 in order from the task with the highest priority. Specifically, the scheduling unit 4 activates the task with the highest priority in the ready queue 111, and then terminates the activated task when the system call processing unit 2 receives the termination system call. Then, the scheduling unit 4 activates the task with the highest priority in the ready queue 111.

ディスパッチ部5は、スケジューリング部4で起動されたタスクにディスパッチを行う。これにより、OS部1がレディーキュー111内の識別情報のうち、最も高い優先度と対応付けられた識別情報のタスクを実行することになる。   The dispatch unit 5 dispatches tasks started by the scheduling unit 4. As a result, the OS unit 1 executes the task of the identification information associated with the highest priority among the identification information in the ready queue 111.

メッセージ受信キュー管理部6は、メッセージ受信キュー112のそれぞれの滞留量を監視する。より具体的には、システムコール処理部2が測定システムコールまたは監視システムコールを受信すると、メッセージ受信キュー管理部6は、その測定システムコールまたは監視システムコールに従って、メッセージ受信キュー112の滞留量を監視する。   The message reception queue management unit 6 monitors each staying amount in the message reception queue 112. More specifically, when the system call processing unit 2 receives the measurement system call or the monitoring system call, the message reception queue management unit 6 monitors the staying amount of the message reception queue 112 according to the measurement system call or the monitoring system call. To do.

アプリケーション部11は、情報処理部102がアプリケーションプログラムを実行することで実現される。   The application unit 11 is realized by the information processing unit 102 executing an application program.

図3は、アプリケーション部11の構成例を示したブロック図である。図3において、アプリケーション部11は、タスクAないしCを含む。タスクAないしCは、全て同じ構成を有するものとする。以下では、タスクBを例として説明し、タスクAおよびCの説明は省略する。また、タスクBが実行中のタスクであるとしている。   FIG. 3 is a block diagram illustrating a configuration example of the application unit 11. In FIG. 3, the application unit 11 includes tasks A to C. Tasks A to C all have the same configuration. Hereinafter, task B will be described as an example, and descriptions of tasks A and C will be omitted. Further, it is assumed that task B is a task being executed.

タスクBは、メッセージ転送部12と、送信先タスクメッセージ受信キュー輻輳検出部13と、自タスクメッセージ受信キュー輻輳復旧検出部14と、スケジューラ管理部15とを含む。   Task B includes a message transfer unit 12, a destination task message reception queue congestion detection unit 13, a self-task message reception queue congestion recovery detection unit 14, and a scheduler management unit 15.

メッセージ転送部12は、転送手段の一例である。メッセージ転送部12は、自タスク(タスクB)に対応するメッセージ受信キュー112内のメッセージを、そのメッセージの送信先のメッセージ受信キュー112に送信する。   The message transfer unit 12 is an example of a transfer unit. The message transfer unit 12 transmits the message in the message reception queue 112 corresponding to its own task (task B) to the message reception queue 112 that is the destination of the message.

送信先タスクメッセージ受信キュー輻輳検出部(以下、輻輳検出部と略す)13は、判断手段の一例である。輻輳検出部13は、メッセージ転送部12が送信するメッセージの送信先のメッセージ受信キュー112の滞留量を監視する。具体的には、輻輳検出部13は、定期的に、その送信先のメッセージ受信キュー112の滞留量を測定する測定システムコールをOS部1に発行し、その応答情報に基づいて滞留量を監視する。   The destination task message reception queue congestion detection unit (hereinafter abbreviated as congestion detection unit) 13 is an example of a determination unit. The congestion detection unit 13 monitors the amount of stay in the message reception queue 112 that is the transmission destination of the message transmitted by the message transfer unit 12. Specifically, the congestion detection unit 13 periodically issues a measurement system call for measuring the staying amount of the message reception queue 112 of the transmission destination to the OS unit 1 and monitors the staying amount based on the response information. To do.

輻輳検出部13は、その滞留量が予め定められた輻輳発生閾値以上か否かを判断する。なお、輻輳発生閾値は、第一閾値の一例である。   The congestion detection unit 13 determines whether the staying amount is equal to or greater than a predetermined congestion occurrence threshold. The congestion occurrence threshold is an example of a first threshold.

自タスクメッセージ受信キュー輻輳復旧検出部(以下、復旧検出部と略す)14は、判定手段の一例である。復旧検出部14は、自タスクに対応するメッセージ受信キュー112の滞留量を測定する。具体的には、復旧検出部14は、定期的に、自タスクのメッセージ受信キュー112の滞留量を測定する監視システムコールをOS部1に発行し、その応答情報に基づいて滞留量を監視する。   The own task message reception queue congestion recovery detection unit (hereinafter abbreviated as a recovery detection unit) 14 is an example of a determination unit. The recovery detection unit 14 measures the staying amount of the message reception queue 112 corresponding to the own task. Specifically, the recovery detection unit 14 periodically issues a monitoring system call for measuring the staying amount of the message reception queue 112 of its own task to the OS unit 1 and monitors the staying amount based on the response information. .

復旧検出部14は、予め定められた輻輳復旧閾値以上であった滞留量が、その輻輳復旧閾値を下回ったか否かを判断する。なお、輻輳復旧閾値は、第二閾値の一例であり、輻輳発生閾値より小さい。   The recovery detection unit 14 determines whether the staying amount that is equal to or greater than a predetermined congestion recovery threshold is less than the congestion recovery threshold. The congestion recovery threshold is an example of a second threshold and is smaller than the congestion occurrence threshold.

スケジューラ管理部15は、輻輳検出部13にて滞留量が輻輳発生閾値以上であると判断されると、メッセージ転送部12によるメッセージの送信を停止する。スケジューラ管理部15は、そのメッセージの送信先のメッセージ受信キュー112に対応するタスクの優先度を、自タスクの優先度より高い優先度に変更するための変更システムコールをOS部1に発行して、そのメッセージの送信先のメッセージ受信キュー112に対応するタスクの優先度を、自タスクの優先度より高い優先度に変更する。そして、スケジューラ管理部15は、終了システムコールをOS部1に発行して、自タスクを終了する。   When the congestion detection unit 13 determines that the staying amount is equal to or greater than the congestion occurrence threshold, the scheduler management unit 15 stops the message transmission by the message transfer unit 12. The scheduler management unit 15 issues a change system call to the OS unit 1 to change the priority of the task corresponding to the message reception queue 112 of the message transmission destination to a higher priority than the priority of the own task. Then, the priority of the task corresponding to the message reception queue 112 of the transmission destination of the message is changed to a priority higher than the priority of the own task. Then, the scheduler management unit 15 issues an end system call to the OS unit 1 and ends its own task.

また、スケジューラ管理部15は、復旧検出部14にて滞留量が輻輳復旧閾値を下回ったと判断されると、終了システムコールをOS部1に発行して、自タスクの識別情報をレディーキュー111から削除して、自タスクを終了する。   Further, when the recovery detection unit 14 determines that the staying amount has fallen below the congestion recovery threshold, the scheduler management unit 15 issues an end system call to the OS unit 1 and sends identification information of its own task from the ready queue 111. Delete and end your task.

次に動作を説明する。   Next, the operation will be described.

図4は、情報処理装置100の基本的な動作を説明するための説明図である。なお、タスクAは、情報処理装置100の外部からメッセージを受信するタスクである。タスクCは、情報処理装置100の外部にメッセージを送信するタスクである。また、レディーキュー111内は、空であるとする。   FIG. 4 is an explanatory diagram for explaining a basic operation of the information processing apparatus 100. Task A is a task for receiving a message from outside the information processing apparatus 100. Task C is a task that transmits a message to the outside of the information processing apparatus 100. In addition, it is assumed that the ready queue 111 is empty.

情報処理装置100が外部から受信したメッセージは、タスクAのメッセージ受信キュー112に記憶される。OS部1のスケジューリング部4は、そのメッセージがメッセージ受信キュー112に記憶されたことを契機に、タスクAの識別情報およびタスクA用の優先度を対応付けてレディーキュー111に登録する。   A message received from the outside by the information processing apparatus 100 is stored in the message reception queue 112 of the task A. When the message is stored in the message reception queue 112, the scheduling unit 4 of the OS unit 1 registers the task A identification information and the priority for task A in the ready queue 111 in association with each other.

続いて、OS部1は、レディーキュー111内の最も高い優先度に対応するタスクを実行する。具体的には、OS部1のスケジューリング部4は、レディーキュー111内の最も高い優先度に対応する識別情報にて特定されるタスクを起動し、その識別情報をディスパッチ部5に通知する。ディスパッチ部5は、その識別情報を受信すると、その識別情報が特定するタスクにディスパッチを行う。   Subsequently, the OS unit 1 executes a task corresponding to the highest priority in the ready queue 111. Specifically, the scheduling unit 4 of the OS unit 1 activates the task specified by the identification information corresponding to the highest priority in the ready queue 111 and notifies the dispatch unit 5 of the identification information. When receiving the identification information, the dispatch unit 5 dispatches to the task specified by the identification information.

これにより、タスクAが実行される。タスクAのメッセージ転送部12は、自タスクのメッセージ受信キュー112内のメッセージを、タスクBのメッセージ受信キュー112に送信する。タスクBのメッセージ受信キュー112は、そのメッセージを受信すると、そのメッセージを記憶する。   Thereby, task A is executed. The message transfer unit 12 of the task A transmits the message in the message reception queue 112 of the own task to the message reception queue 112 of the task B. When the message reception queue 112 of task B receives the message, the message is stored.

また、OS部1のスケジューリング部4は、そのメッセージがタスクBのメッセージ受信キュー112に記憶されたことを契機に、タスクBの識別情報およびタスクB用の優先度を対応付けてレディーキュー111に記憶する。   Further, the scheduling unit 4 of the OS unit 1 associates the identification information of task B with the priority for task B in the ready queue 111 when the message is stored in the message reception queue 112 of task B. Remember.

そして、メッセージ転送部12は、タスクAのメッセージ受信キュー112内のメッセージを全て送信すると、メッセージの送信が完了したことを示す完了報告をスケジューラ管理部15に通知する。スケジューラ管理部15は、完了報告を受信すると、終了システムコールを生成し、その終了システムコールを、システムコール処理部2を介して、OS部1のスケジューリング部4に送信する。なお、終了システムコールは、自タスクの識別情報を含む。   When the message transfer unit 12 transmits all the messages in the message reception queue 112 of task A, the message transfer unit 12 notifies the scheduler management unit 15 of a completion report indicating that the message transmission is completed. Upon receiving the completion report, the scheduler management unit 15 generates a termination system call and transmits the termination system call to the scheduling unit 4 of the OS unit 1 via the system call processing unit 2. The end system call includes identification information of the own task.

スケジューリング部4は、終了システムコールを受信すると、終了システムコール内の識別情報にて特定されるタスクを終了する終了処理を行う。具体的には、スケジューリング部4は、終了システムコールをレディーキュー管理部3に通知する。レディーキュー管理部3は、終了システムコールを受信すると、その終了システムコール内の識別情報と、その識別情報に対応する優先度を削除する。レディーキュー管理部3は、識別情報および優先度を削除したことを示す削除報告をスケジューリング部4に送信する。スケジューリング部4は、削除報告を受信すると、実行中のタスクを終了する。   When the scheduling unit 4 receives the termination system call, the scheduling unit 4 performs termination processing to terminate the task specified by the identification information in the termination system call. Specifically, the scheduling unit 4 notifies the ready queue management unit 3 of the end system call. When receiving the termination system call, the ready queue management unit 3 deletes the identification information in the termination system call and the priority corresponding to the identification information. The ready queue management unit 3 transmits a deletion report indicating that the identification information and the priority have been deleted to the scheduling unit 4. When receiving the deletion report, the scheduling unit 4 ends the task being executed.

これにより、タスクAが終了される。その後、OS部1は、レディーキュー111内の最も高い優先度に対応するタスクBを実行する。   Thereby, the task A is completed. Thereafter, the OS unit 1 executes task B corresponding to the highest priority in the ready queue 111.

タスクBのメッセージ転送部12は、自タスクのメッセージ受信キュー112内のメッセージを、タスクCのメッセージ受信キュー112に送信する。タスクCのメッセージ受信キュー112は、そのメッセージを受信すると、そのメッセージを記憶する。   The message transfer unit 12 of the task B transmits the message in the message reception queue 112 of the own task to the message reception queue 112 of the task C. When the message reception queue 112 of task C receives the message, it stores the message.

OS部1のスケジューリング部4は、そのメッセージがタスクCのメッセージ受信キュー112に記憶されたことを契機に、タスクCの識別情報およびタスクC用の優先度を対応付けてレディーキュー111に記憶する。   The scheduling unit 4 of the OS unit 1 stores the identification information of the task C and the priority for the task C in the ready queue 111 in association with the message stored in the message reception queue 112 of the task C. .

ここで、スケジューリング部4は、情報処理装置100の外部からメッセージを受信する受信処理が、情報処理装置100の外部にメッセージを送信する送信処理より高い優先度で実行されるようにスケジューリングする。具体的には、スケジューリング部4は、優先度が高いほうから順にタスクA、タスクBおよびタスクCとなるように、識別情報および優先度をレディーキュー111に記憶する。   Here, the scheduling unit 4 performs scheduling so that the reception process for receiving a message from the outside of the information processing apparatus 100 is executed with a higher priority than the transmission process for transmitting a message to the outside of the information processing apparatus 100. Specifically, the scheduling unit 4 stores the identification information and the priority in the ready queue 111 so that the task A, the task B, and the task C are in order from the highest priority.

次に、タスクBのメッセージ受信キュー112に輻輳が発生した場合における情報処理装置100の動作について説明する。具体的には、情報処理装置100が通常状態(状態α)の場合に、タスクBのメッセージ受信キュー112で発生した輻輳が検出され、情報処理装置100が輻輳状態(状態β)に遷移する。その後、タスクBのメッセージ受信キュー112で発生した輻輳が復旧され、情報処理装置100が通常状態(状態γ)に遷移するまでの動作を説明する。   Next, the operation of the information processing apparatus 100 when congestion occurs in the task B message reception queue 112 will be described. Specifically, when the information processing apparatus 100 is in a normal state (state α), congestion that has occurred in the message reception queue 112 of task B is detected, and the information processing apparatus 100 transitions to a congestion state (state β). After that, the operation until the congestion generated in the message reception queue 112 of task B is recovered and the information processing apparatus 100 transitions to the normal state (state γ) will be described.

図5は、それらの状態における、メッセージ受信キュー112のそれぞれの滞留量、および、実行権を有するタスクを示した説明図である。図6は、それらの状態における、レディーキュー111内の情報を示した説明図である。なお、図5では、メッセージ受信キュー112を、受信キューと略している。また、図6において、優先度は、[0]が最も高く、数字が大きくなるに従って小さくなるものとする。   FIG. 5 is an explanatory diagram showing the respective retention amounts of the message reception queue 112 and tasks having execution rights in those states. FIG. 6 is an explanatory diagram showing information in the ready queue 111 in these states. In FIG. 5, the message reception queue 112 is abbreviated as a reception queue. In FIG. 6, the priority is highest for [0] and decreases as the number increases.

状態αでは、タスクAが実行されている。また、タスクAおよびBのそれぞれのメッセージ受信キュー112にメッセージが蓄えられている。さらに、レディーキュー111には、タスクAの識別情報(タスクA1)と、タスクBの識別情報(タスクB1)とが記憶される。また、タスクAの優先度は、タスクBの優先度より高い。そして、タスクAのメッセージ転送部12がタスクAのメッセージ受信キュー112内のメッセージを、タスクBのメッセージ受信キュー112に送信している。   In state α, task A is being executed. Messages are stored in the message reception queues 112 of tasks A and B, respectively. Further, the ready queue 111 stores task A identification information (task A1) and task B identification information (task B1). The priority of task A is higher than the priority of task B. Then, the message transfer unit 12 of task A transmits the message in the message reception queue 112 of task A to the message reception queue 112 of task B.

タスクAの輻輳検出部13は、定期的に、タスクBのメッセージ受信キュー112の滞留量を測定する測定システムコールを生成し、その測定システムコールを、システムコール処理部2を介して、メッセージ受信キュー管理部6に送信する。   The congestion detection unit 13 of task A periodically generates a measurement system call that measures the staying amount of the message reception queue 112 of task B, and receives the measurement system call via the system call processing unit 2. The data is transmitted to the queue management unit 6.

メッセージ受信キュー管理部6は、測定システムコールを受信すると、タスクBのメッセージ受信キュー112の滞留量を確認する。メッセージ受信キュー管理部6は、その確認した滞留量を示す情報を、測定システムコールの応答情報として生成し、その応答情報を、システムコール処理部2を介してタスクAの輻輳検出部13に送信する。   When the message reception queue management unit 6 receives the measurement system call, the message reception queue management unit 6 checks the staying amount of the message reception queue 112 of task B. The message reception queue management unit 6 generates information indicating the confirmed staying amount as response information of the measurement system call, and transmits the response information to the congestion detection unit 13 of the task A via the system call processing unit 2. To do.

輻輳検出部13は、応答情報を受信すると、その応答情報にて示される滞留量が輻輳発生閾値以上か否かを判断する。輻輳検出部13は、滞留量が輻輳発生閾値未満であると、動作を終了する。一方、輻輳検出部13は、滞留量が輻輳発生閾値以上であると、タスクBのメッセージ受信キュー112で輻輳が発生したと判断する。これにより、情報処理装置100が輻輳検出状態に遷移する。   When the congestion detection unit 13 receives the response information, the congestion detection unit 13 determines whether the staying amount indicated by the response information is equal to or greater than the congestion occurrence threshold. The congestion detection unit 13 ends the operation when the staying amount is less than the congestion occurrence threshold. On the other hand, the congestion detection unit 13 determines that congestion has occurred in the message reception queue 112 of the task B when the staying amount is equal to or greater than the congestion occurrence threshold. As a result, the information processing apparatus 100 transitions to the congestion detection state.

輻輳検出状態では、輻輳検出部13は、滞留量が輻輳発生閾値以上である旨をスケジューラ管理部15に通知する。スケジューラ管理部15は、その旨を受信すると、メッセージ転送部12にメッセージの送信の停止を指示して、メッセージ転送部12によるメッセージの送信を停止する。   In the congestion detection state, the congestion detection unit 13 notifies the scheduler management unit 15 that the staying amount is equal to or greater than the congestion occurrence threshold. When the scheduler manager 15 receives the message, the scheduler manager 15 instructs the message transfer unit 12 to stop the message transmission, and stops the message transfer by the message transfer unit 12.

スケジューラ管理部15は、タスクBの優先度を変更する変更システムコールを生成し、その変更システムコールを、システムコール処理部2およびスケジューリング部4を介して、レディーキュー管理部3に通知する。変更システムコールは、タスクAの優先度より高いタスクBの優先度と、タスクBの識別情報(タスクB1)を含む。   The scheduler management unit 15 generates a changed system call for changing the priority of the task B, and notifies the ready queue management unit 3 of the changed system call via the system call processing unit 2 and the scheduling unit 4. The change system call includes the priority of the task B higher than the priority of the task A and the identification information (task B1) of the task B.

レディーキュー管理部3は、変更システムコールを受信すると、レディーキュー111内の、その変更システムコールに含まれる識別情報に対応するタスクBの優先度を、その変更システムコールに含まれる優先度に変更する。これにより、タスクBの優先度がタスクAより高くなる。その後、レディーキュー管理部3は、優先度の変更が終了したことを示す情報を、変更システムコールの応答情報として生成し、その応答情報を、スケジューリング部4およびシステムコール処理部2を介して、タスクAのスケジューラ管理部15に送信する。   When the ready queue manager 3 receives the changed system call, the ready queue manager 3 changes the priority of the task B corresponding to the identification information included in the changed system call in the ready queue 111 to the priority included in the changed system call. To do. As a result, the priority of task B is higher than that of task A. Thereafter, the ready queue management unit 3 generates information indicating that the priority change has been completed as response information of the changed system call, and the response information is transmitted via the scheduling unit 4 and the system call processing unit 2. It is transmitted to the scheduler manager 15 of task A.

スケジューラ管理部15は、その応答情報を受信すると、タスクAを登録する登録システムコールを生成し、その登録システムコールを、システムコール処理部2およびスケジューリング部4を介して、レディーキュー管理部3に通知する。なお、登録システムコールは、タスクA用の優先度と、タスクAの識別情報(タスクA2)とを含む。   Upon receiving the response information, the scheduler management unit 15 generates a registration system call for registering the task A, and sends the registration system call to the ready queue management unit 3 via the system call processing unit 2 and the scheduling unit 4. Notice. The registered system call includes the priority for task A and task A identification information (task A2).

レディーキュー管理部3は、登録システムコールを受信すると、登録システムコール内の優先度および識別情報を対応付けて、レディーキュー111に登録する。これは、タスクAのメッセージ受信キュー112に残存したメッセージを後で送信するためである。   When receiving the registration system call, the ready queue management unit 3 associates the priority and identification information in the registration system call and registers them in the ready queue 111. This is because the message remaining in the message reception queue 112 of task A is transmitted later.

その後、レディーキュー管理部3は、タスクAの登録が終了したことを示す情報を、登録システムコールの応答情報として生成し、その応答情報を、スケジューリング部4およびシステムコール処理部2を介して、タスクAのスケジューラ管理部15に送信する。   Thereafter, the ready queue management unit 3 generates information indicating that the registration of the task A is completed as response information of the registration system call, and the response information is transmitted via the scheduling unit 4 and the system call processing unit 2. It is transmitted to the scheduler manager 15 of task A.

スケジューラ管理部15は、その応答情報を受信すると、タスクAを終了する終了システムコールを生成し、その終了システムコールを、システムコール処理部2を介してスケジューリング部4に通知する。なお、終了システムコールは、タスクAの識別情報(タスクA1)を含む。   Upon receiving the response information, the scheduler management unit 15 generates a termination system call that terminates the task A, and notifies the scheduling unit 4 of the termination system call via the system call processing unit 2. The end system call includes task A identification information (task A1).

スケジューリング部4は、終了システムコールを受信すると、終了システムコール内の識別情報にて特定されるタスクを終了する終了処理を行う。これにより、タスクAが終了される。   When the scheduling unit 4 receives the termination system call, the scheduling unit 4 performs termination processing to terminate the task specified by the identification information in the termination system call. Thereby, the task A is completed.

OS部1が、レディーキュー111内の最も高い優先度に対応する識別情報が特定するタスクを実行する。今、タスクBの優先度がタスクAの優先度より高いので、タスクBが実行される。これにより、情報処理装置100が状態βに遷移する。   The OS unit 1 executes a task specified by the identification information corresponding to the highest priority in the ready queue 111. Now, since the priority of task B is higher than the priority of task A, task B is executed. As a result, the information processing apparatus 100 transitions to the state β.

状態βでは、タスクBのメッセージ転送部12が、タスクBのメッセージ受信キュー112内のメッセージを、タスクCのメッセージ受信キュー112に送信する。   In the state β, the message transfer unit 12 of task B transmits the message in the message reception queue 112 of task B to the message reception queue 112 of task C.

また、タスクBの復旧検出部14は、定期的に、タスクBのメッセージ受信キュー112の滞留量を測定する監視システムコールを生成し、その監視システムコールを、システムコール処理部2を介して、メッセージ受信キュー管理部6に送信する。   In addition, the task B recovery detection unit 14 periodically generates a monitoring system call for measuring the staying amount of the task B message reception queue 112, and sends the monitoring system call via the system call processing unit 2. The message is sent to the message reception queue management unit 6.

メッセージ受信キュー管理部6は、監視システムコールを受信すると、タスクBのメッセージ受信キュー112の滞留量を確認する。メッセージ受信キュー管理部6は、その確認した滞留量を示す情報を、監視システムコールの応答情報として生成し、その応答情報を、システムコール処理部2を介してタスクAの復旧検出部14に送信する。   When the message reception queue management unit 6 receives the monitoring system call, the message reception queue management unit 6 checks the staying amount of the message reception queue 112 of task B. The message reception queue management unit 6 generates information indicating the confirmed staying amount as response information of the monitoring system call, and transmits the response information to the recovery detection unit 14 of the task A via the system call processing unit 2. To do.

復旧検出部14は、応答情報を受信すると、その応答情報に基づいて、タスクBのメッセージ受信キュー112の滞留量が輻輳復旧閾値を下回ったか否かを判断する。例えば、復旧検出部14は、一つ前の応答情報が示す滞留量を保持し、その保持している滞留量が輻輳復旧閾値以上であり、新たに受信した応答情報が示す輻輳復旧閾値未満であると、タスクBのメッセージ受信キュー112の滞留量が輻輳復旧閾値を下回ったと判断する。   Upon receiving the response information, the recovery detection unit 14 determines whether or not the staying amount in the message reception queue 112 of task B is below the congestion recovery threshold based on the response information. For example, the recovery detection unit 14 holds the staying amount indicated by the previous response information, the staying amount being held is equal to or greater than the congestion recovery threshold, and is less than the congestion recovery threshold indicated by the newly received response information. If there is, it is determined that the staying amount of the message reception queue 112 of task B is below the congestion recovery threshold.

復旧検出部14は、メッセージ受信キュー112の滞留量が輻輳復旧閾値を下回っていないと判断すると、動作を終了する。一方、復旧検出部14は、メッセージ受信キュー112の滞留量が輻輳復旧閾値を下回ったと判断すると、タスクBのメッセージ受信キュー112の輻輳が復旧したと判断する。これにより、情報処理装置100が輻輳復旧状態であると判断する。   When the recovery detection unit 14 determines that the amount of stay in the message reception queue 112 is not less than the congestion recovery threshold, the operation ends. On the other hand, when the recovery detection unit 14 determines that the amount of stay in the message reception queue 112 is below the congestion recovery threshold, the recovery detection unit 14 determines that the congestion of the message reception queue 112 of task B has been recovered. Thereby, it is determined that the information processing apparatus 100 is in the congestion recovery state.

輻輳復旧状態では、復旧検出部14は、滞留量が輻輳復旧閾値を下回った旨をスケジューラ管理部15に通知する。スケジューラ管理部15は、その旨を受信すると、メッセージ転送部12にメッセージの送信の停止を指示して、メッセージ転送部12によるメッセージの送信を停止する。   In the congestion recovery state, the recovery detection unit 14 notifies the scheduler management unit 15 that the staying amount has fallen below the congestion recovery threshold. When the scheduler manager 15 receives the message, the scheduler manager 15 instructs the message transfer unit 12 to stop the message transmission, and stops the message transfer by the message transfer unit 12.

スケジューラ管理部15は、タスクBを登録する登録システムコールを生成し、その登録システムコールを、システムコール処理部2およびスケジューリング部4を介して、レディーキュー管理部3に通知する。なお、登録システムコールは、タスクB用の優先度と、タスクBの識別情報(タスクB2)とを含む。   The scheduler management unit 15 generates a registration system call for registering task B, and notifies the ready queue management unit 3 of the registration system call via the system call processing unit 2 and the scheduling unit 4. The registered system call includes the priority for task B and the identification information (task B2) of task B.

レディーキュー管理部3は、登録システムコールを受信すると、登録システムコール内の優先度および識別情報を対応付けて、レディーキュー111に登録する。その後、レディーキュー管理部3は、タスクBの登録が終了したことを示す情報を、登録システムコールの応答情報として生成し、その応答情報を、スケジューリング部4およびシステムコール処理部2を介して、タスクBのスケジューラ管理部15に送信する。   When receiving the registration system call, the ready queue management unit 3 associates the priority and identification information in the registration system call and registers them in the ready queue 111. Thereafter, the ready queue management unit 3 generates information indicating that the registration of the task B is completed as response information of the registration system call, and the response information is transmitted via the scheduling unit 4 and the system call processing unit 2. It is transmitted to the scheduler manager 15 of task B.

スケジューラ管理部15は、その応答情報を受信すると、タスクBを終了する終了システムコールを生成し、その終了システムコールを、システムコール処理部2を介してスケジューリング部4に通知する。なお、終了システムコールは、タスクBの識別情報(タスクB1)を含む。   When the scheduler management unit 15 receives the response information, the scheduler management unit 15 generates a termination system call that terminates the task B, and notifies the scheduling unit 4 of the termination system call via the system call processing unit 2. The end system call includes task B identification information (task B1).

スケジューリング部4は、終了システムコールを受信すると、終了システムコール内の識別情報にて特定されるタスクを終了する終了処理を行う。これにより、タスクBが終了される。   When the scheduling unit 4 receives the termination system call, the scheduling unit 4 performs termination processing to terminate the task specified by the identification information in the termination system call. Thereby, the task B is completed.

その後、OS部1が、レディーキュー111内の最も高い優先度に対応する識別情報が特定するタスクを実行する。今、タスクAの優先度が最も高いので、タスクAが実行される。これにより、情報処理装置100が状態γに遷移する。   Thereafter, the OS unit 1 executes a task specified by the identification information corresponding to the highest priority in the ready queue 111. Since task A has the highest priority now, task A is executed. As a result, the information processing apparatus 100 transitions to the state γ.

状態γでは、タスクAのメッセージ転送部12が、タスクAのメッセージ受信キュー112内のメッセージを、タスクAのメッセージ受信キュー112に送信する。   In the state γ, the message transfer unit 12 of task A transmits the message in the message reception queue 112 of task A to the message reception queue 112 of task A.

次に効果を説明する。   Next, the effect will be described.

本実施形態では、メッセージ転送部12は、実行中のタスクに対応するメッセージ受信キュー112内のメッセージを、送信先のメッセージ受信キュー112に送信する。輻輳検出部13は、送信先のメッセージ受信キュー112の滞留量が輻輳発生閾値以上か否かを判断する。スケジューラ管理部15は、輻輳検出部13にて滞留量が輻輳発生閾値以上であると判断されると、メッセージ転送部12によるメッセージの送信を停止し、かつ、レディーキュー111内の、送信先のメッセージ受信キュー112に対応するタスクの優先度を、実行中のタスクの優先度より高い優先度に変更する。そして、スケジューラ管理部15は、その実行中のタスクを終了する。   In the present embodiment, the message transfer unit 12 transmits a message in the message reception queue 112 corresponding to the task being executed to the message reception queue 112 as a transmission destination. The congestion detection unit 13 determines whether or not the staying amount of the message reception queue 112 of the transmission destination is equal to or greater than a congestion occurrence threshold. When the congestion detection unit 13 determines that the staying amount is equal to or greater than the congestion occurrence threshold, the scheduler management unit 15 stops the message transmission by the message transfer unit 12, and the transmission destination in the ready queue 111 The priority of the task corresponding to the message reception queue 112 is changed to a priority higher than the priority of the task being executed. Then, the scheduler management unit 15 ends the task being executed.

この場合、送信先のメッセージ受信キュー112の滞留量が輻輳発生閾値以上になると、その送信先のメッセージ受信キュー112に対応するタスクの優先度が、実行中のタスクの優先度より高い優先度に変更される。また、その実行中のタスクが終了される。   In this case, when the retention amount of the message reception queue 112 of the transmission destination becomes equal to or more than the congestion occurrence threshold, the priority of the task corresponding to the message reception queue 112 of the transmission destination becomes higher than the priority of the task being executed. Be changed. In addition, the task being executed is terminated.

したがって、送信先のメッセージ受信キュー112がメッセージを蓄えられなくなる前に、その送信先のメッセージ受信キュー112に対応するタスクを実行することが可能になる。よって、メッセージ受信キュー112がメッセージを蓄えることができなくなることを抑制することが可能になるので、メッセージが破棄されることを抑制することが可能になる。   Therefore, it becomes possible to execute a task corresponding to the message reception queue 112 of the transmission destination before the message reception queue 112 of the transmission destination can no longer store the message. Therefore, since it becomes possible to suppress that the message reception queue 112 cannot accumulate | store a message, it becomes possible to suppress that a message is discarded.

また、本実施形態では、復旧検出部14は、実行中のタスクに対応するメッセージ受信キュー112内の滞留量が、輻輳発生閾値より小さい輻輳復旧閾値を下回ったか否かを判断する。スケジューラ管理部15は、復旧検出部14にて滞留量が輻輳復旧閾値を下回ったと判断された場合、優先度を変更しタスクの識別情報をレディーキューから削除して、実行中のタスクを終了する。   Further, in the present embodiment, the recovery detection unit 14 determines whether or not the staying amount in the message reception queue 112 corresponding to the task being executed is below a congestion recovery threshold value that is smaller than the congestion occurrence threshold value. If the recovery detection unit 14 determines that the staying amount has fallen below the congestion recovery threshold, the scheduler management unit 15 changes the priority, deletes the task identification information from the ready queue, and terminates the task being executed. .

この場合、メッセージ受信キュー112の輻輳が復旧された場合に、元の優先度に従ってタスクを実行することが可能になる。   In this case, when the congestion of the message reception queue 112 is recovered, the task can be executed according to the original priority.

以上説明した各実施形態において、図示した構成は単なる一例であって、本発明はその構成に限定されるものではない。   In each embodiment described above, the illustrated configuration is merely an example, and the present invention is not limited to the configuration.

例えば、タスクAないしCは、アプリケーションプログラムにて実現されていたが、ミドルウェア、ファームウェアおよびドライバなどにて実現されてもよい。   For example, the tasks A to C are realized by an application program, but may be realized by middleware, firmware, a driver, or the like.

本発明の一実施形態の情報処理装置の構成を示したブロック図である。It is the block diagram which showed the structure of the information processing apparatus of one Embodiment of this invention. 情報処理部の構成例を示したブロック図である。It is the block diagram which showed the structural example of the information processing part. アプリケーション部の構成例を示したブロック図である。It is the block diagram which showed the structural example of the application part. 情報処理装置の基本的な動作を説明するための説明図である。It is explanatory drawing for demonstrating the basic operation | movement of information processing apparatus. 各状態におけるメッセージ受信キューの滞留量を示した説明図である。It is explanatory drawing which showed the retention amount of the message reception queue in each state. 各状態におけるレディーキュー内の情報を示した説明図である。It is explanatory drawing which showed the information in the ready queue in each state. 関連技術の情報処理装置の構成を示したブロック図である。It is the block diagram which showed the structure of the information processing apparatus of related technology.

符号の説明Explanation of symbols

1 OS部
2 システムコール処理部
3 レディーキュー管理部
4 スケジューリング部
5 ディスパッチ部
6 メッセージ受信キュー管理部
11 アプリケーション部
12 メッセージ転送部
13 送信先タスクメッセージ受信キュー輻輳検出部
14 自タスクメッセージ受信キュー輻輳復旧検出部
100 情報処理装置
101 記憶部
102 情報処理部
111 レディーキュー
112 メッセージ受信キュー
DESCRIPTION OF SYMBOLS 1 OS part 2 System call processing part 3 Ready queue management part 4 Scheduling part 5 Dispatch part 6 Message reception queue management part 11 Application part 12 Message transfer part 13 Destination task message reception queue congestion detection part 14 Self task message reception queue congestion recovery Detection unit 100 Information processing apparatus 101 Storage unit 102 Information processing unit 111 Ready queue 112 Message reception queue

Claims (4)

複数のタスクを優先度の高いタスクから順に実行するタスクスケジューリング装置であって、
前記複数のタスクと、
各タスクの識別情報を、該タスクの優先度と対応付けて記憶する優先度記憶手段と、
各タスクに対応し、該タスク用のメッセージを蓄える複数のメッセージ記憶手段と、
前記優先度記憶手段内の識別情報のうち、最も高い優先度に対応する識別情報にて特定されるタスクを実行する制御手段と、を含み、
各タスクは、
自タスクが実行中の場合、自タスクである実行中のタスクに対応するメッセージ記憶手段内のメッセージを、該メッセージの送信先のメッセージ記憶手段に送信する転送手段と、
自タスクが実行中の場合、前記送信先のメッセージ記憶手段内のメッセージの量が予め定められた第一閾値以上であるか否かを判断する判断手段と、を含み、
前記タスクスケジューリング装置は、前記判断手段にて前記メッセージの量が前記第一閾値以上であると判断された場合、前記転送手段による前記メッセージの送信を停止し、かつ、前記優先度記憶手段内の、前記送信先のメッセージ記憶手段に対応するタスクの優先度を、前記実行中のタスクの優先度より高い優先度に変更して、前記実行中のタスクを終了する管理手段と、を含むタスクスケジューリング装置。
A task scheduling device that executes a plurality of tasks in order from a task with a higher priority,
The plurality of tasks;
Priority storage means for storing identification information of each task in association with the priority of the task;
A plurality of message storage means corresponding to each task and storing messages for the task;
Control means for executing a task specified by the identification information corresponding to the highest priority among the identification information in the priority storage means ,
Each task is
When the own task is being executed, a transfer means for sending a message in the message storage means corresponding to the executing task that is the own task to the message storage means that is the destination of the message;
A determination means for determining whether or not the amount of messages in the message storage means of the transmission destination is equal to or more than a predetermined first threshold when the own task is being executed ;
The task scheduling apparatus stops transmission of the message by the transfer unit when the determination unit determines that the amount of the message is equal to or greater than the first threshold, and stores the message in the priority storage unit Management means for changing the priority of the task corresponding to the message storage means of the transmission destination to a priority higher than the priority of the task being executed, and ending the task being executed apparatus.
請求項1に記載のタスクスケジューリング装置において、
各タスクは、自タスクが実行中の場合、自タスクである実行中のタスクに対応するメッセージ記憶手段内のメッセージの量が、前記第一閾値より小さい第二閾値を下回ったか否かを判断する判定手段を含み、
前記管理手段は、前記判定手段にて前記メッセージの量が前記第二閾値を下回ったと判断された場合、前記優先度を変更したタスクの識別情報を前記優先度記憶手段から削除して、前記実行中のタスクを終了する、タスクスケジューリング装置。
The task scheduling apparatus according to claim 1,
Each task determines whether or not the amount of messages in the message storage means corresponding to the task that is being executed is lower than a second threshold value that is smaller than the first threshold value , when the task is being executed. Including determination means,
When the determination unit determines that the amount of the message is lower than the second threshold, the management unit deletes the identification information of the task whose priority has been changed from the priority storage unit, and executes the execution A task scheduling device that terminates a task in progress.
複数のタスクの識別情報のそれぞれを、該タスクの優先度と対応付けて記憶する優先度記憶手段と、各タスクに対応し、該タスク用のメッセージを蓄える複数のメッセージ記憶手段と、前記複数のタスクと、を含むタスクスケジューリング装置によるスケジューリング方法であって、
前記優先度記憶手段内の識別情報のうち、最も高い優先度に対応する識別情報にて特定されるタスクを実行し、
各タスクが、実行中の場合、自タスクである実行中のタスクに対応するメッセージ記憶手段内のメッセージを、該メッセージの送信先のメッセージ記憶手段に送信し、
各タスクが、実行中の場合、前記送信先のメッセージ記憶手段内のメッセージの量が予め定められた第一閾値以上であるか否かを判断し、
前記メッセージの量が前記第一閾値以上であると判断された場合、前記メッセージの送信を停止し、かつ、前記優先度記憶手段内の、前記送信先のメッセージ記憶手段に対応するタスクの優先度を、前記実行中のタスクの優先度より高い優先度に変更し、
前記実行中のタスクを終了する、タスクスケジューリング方法。
The respective identification information of a plurality of tasks, the priority storage means for storing in association with the priority of the task corresponding to each task, and a plurality of message storage for storing the message for the task, wherein the plurality of A task scheduling method including a task , and a scheduling method comprising:
Of the identification information in the priority storage means, execute the task specified by the identification information corresponding to the highest priority,
When each task is being executed, the message in the message storage means corresponding to the task being executed that is the own task is transmitted to the message storage means that is the destination of the message,
When each task is being executed, it is determined whether or not the amount of messages in the destination message storage means is greater than or equal to a predetermined first threshold;
If it is determined that the amount of the message is equal to or greater than the first threshold, the priority of a task corresponding to the destination message storage unit in the priority storage unit is stopped. To a higher priority than the priority of the task being executed,
A task scheduling method for ending the task being executed.
請求項3に記載のタスクスケジューリング方法において、
各タスクが、実行中の場合、自タスクである実行中のタスクに対応するメッセージ記憶手段内のメッセージの量が、前記第一閾値より小さい第二閾値を下回ったか否かを判断し、
前記メッセージの量が前記第二閾値を下回ったと判断された場合、前記優先度を変更したタスクの識別情報を前記優先度記憶手段から削除し、
前記実行中のタスクを終了する、タスクスケジューリング方法。
The task scheduling method according to claim 3, wherein
If each task is running , determine whether the amount of messages in the message storage means corresponding to the running task that is its own task is below a second threshold value that is smaller than the first threshold value,
If it is determined that the amount of the message has fallen below the second threshold, the task identification information that has changed the priority is deleted from the priority storage means,
A task scheduling method for ending the task being executed.
JP2008210535A 2008-08-19 2008-08-19 Task scheduling apparatus and task scheduling method Expired - Fee Related JP5262418B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008210535A JP5262418B2 (en) 2008-08-19 2008-08-19 Task scheduling apparatus and task scheduling method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008210535A JP5262418B2 (en) 2008-08-19 2008-08-19 Task scheduling apparatus and task scheduling method

Publications (2)

Publication Number Publication Date
JP2010049314A JP2010049314A (en) 2010-03-04
JP5262418B2 true JP5262418B2 (en) 2013-08-14

Family

ID=42066368

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008210535A Expired - Fee Related JP5262418B2 (en) 2008-08-19 2008-08-19 Task scheduling apparatus and task scheduling method

Country Status (1)

Country Link
JP (1) JP5262418B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9189529B2 (en) * 2013-02-14 2015-11-17 Ab Initio Technology Llc Queue monitoring and visualization
JP6331555B2 (en) * 2014-03-26 2018-05-30 日本電気株式会社 Message exchange device, message exchange method, and computer program
JP7259435B2 (en) * 2019-03-18 2023-04-18 株式会社リコー Terminal device, information processing system, and information processing method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3082297B2 (en) * 1991-04-30 2000-08-28 日本電気株式会社 Task control method
JPH0793168A (en) * 1993-09-21 1995-04-07 Fuji Electric Co Ltd Task management system
JP3245500B2 (en) * 1994-04-28 2002-01-15 エヌイーシーマイクロシステム株式会社 Event management method in multi-programming
JPH11237993A (en) * 1998-02-20 1999-08-31 Matsushita Electric Ind Co Ltd Method and device for controlling task priority

Also Published As

Publication number Publication date
JP2010049314A (en) 2010-03-04

Similar Documents

Publication Publication Date Title
US10884786B2 (en) Switch device, switching method, and computer program product
US7676610B2 (en) Device and method for optimization of target host device process handling according to the status and the priority of the target host device process
CN100504791C (en) Method and device for mutual repulsion access of multiple CPU to critical resources
US8949566B2 (en) Locking access to data storage shared by a plurality of compute nodes
CN107451012B (en) Data backup method and stream computing system
US8402190B2 (en) Network adaptor optimization and interrupt reduction
US10592317B2 (en) Timeout processing for messages
JP6287451B2 (en) Data receiving apparatus, data receiving apparatus control method, and data transmitting / receiving system having data transmitting apparatus and data receiving apparatus
EP2811402A1 (en) Transaction resuming program, information processing apparatus and transaction resuming method
US20170235685A1 (en) I/o processing system including dynamic missing interrupt and input/output detection
JP5262418B2 (en) Task scheduling apparatus and task scheduling method
US5737240A (en) Programmable hardware mailbox message technique and system
US10305772B2 (en) Using a single work item to send multiple messages
JP2014096162A (en) Interface conversion device and interface conversion method
WO2017107083A1 (en) Data sending method and receiving method, apparatus and system
JPH11237993A (en) Method and device for controlling task priority
WO2010061482A1 (en) Testing apparatus, serial transmission system, program, and recording medium
CN117593172B (en) Process management method, device, medium and equipment
CN112152938B (en) Method for determining round trip delay in cloud virtual environment
CN114979169B (en) Network resource pushing method and device, storage medium and electronic equipment
CN116414585A (en) Service data recovery method and device, electronic equipment and storage medium
JP2007323256A (en) Interruption control method and information processor
JP6126259B1 (en) Monitoring device, monitoring method, and program
CN116339205A (en) Diagnostic information synchronization method, device, electronic equipment and storage medium
CN115776475A (en) Message processing method and device, electronic equipment and computer storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110714

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121114

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121127

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130128

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: 20130402

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130415

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 5262418

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees