JP2006085386A - Information processor and method, and program - Google Patents
Information processor and method, and program Download PDFInfo
- Publication number
- JP2006085386A JP2006085386A JP2004268788A JP2004268788A JP2006085386A JP 2006085386 A JP2006085386 A JP 2006085386A JP 2004268788 A JP2004268788 A JP 2004268788A JP 2004268788 A JP2004268788 A JP 2004268788A JP 2006085386 A JP2006085386 A JP 2006085386A
- Authority
- JP
- Japan
- Prior art keywords
- processing
- level
- unit
- processor
- sub
- 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.)
- Withdrawn
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
Description
本発明は、情報処理装置および方法、並びにプログラムに関し、特に、メインプロセスのリアルタイム性を保証しつつ、サブプロセスを可能な限り高速で処理することができる、情報処理装置および方法、並びにプログラムに関する。 The present invention relates to an information processing apparatus, method, and program, and more particularly, to an information processing apparatus, method, and program capable of processing a sub-process as fast as possible while guaranteeing real-time performance of a main process.
近年、複数のプロセッサで構成されるマルチプロセッサシステムが普及してきている。マルチプロセッサシステムは、例えば、1つのメインプロセッサ(MCPU : Main Central Processing Unit)と、複数のサブプロセッサ(SCPU : Sub Central Processing Unit)とがバスを介して相互に接続されて構成される。なお、このバスには、MCPUとSCPUとの他、メインメモリ等が接続されることもある。 In recent years, multiprocessor systems composed of a plurality of processors have become widespread. The multiprocessor system is configured, for example, by connecting one main processor (MCPU: Main Central Processing Unit) and a plurality of sub processors (SCPU: Sub Central Processing Unit) via a bus. In addition to the MCPU and SCPU, a main memory or the like may be connected to this bus.
このように、マルチプロセッサシステは、複数のプロセッサを有するので、複数のプロセス(例えば、特許文献1参照)のそれぞれを並列して処理することが容易にできる。例えば、マルチプロセッサシステムは、所定のソフトウエアを1以上実行することで、メインプロセスとして図1に示されるようなメインプロセス処理部1を構築し、サブプロセスとして同図に示されるようなサブプロセス処理部2を構築することが容易にできる。そして、マルチプロセッサシステムは、構築されたメインプロセス処理部1とサブプロセス処理部2とのそれぞれの処理を並列して個別に実行することが容易にできる。
Thus, since the multiprocessor system has a plurality of processors, each of a plurality of processes (for example, refer to Patent Document 1) can be easily processed in parallel. For example, the multiprocessor system constructs a main
即ち、図1は、従来のマルチプロセッサシステムにより構築されてその処理が実行される、メインプロセスとサブプロセスとを含むソフトウエアシステムの構成例を示す機能ブロック図である。 That is, FIG. 1 is a functional block diagram showing a configuration example of a software system including a main process and a sub-process that is constructed by a conventional multiprocessor system and executes its processing.
図1の例のメインプロセス処理部1は、ソフトウエアモジュール(機能ブロック)である機能処理部11乃至13のそれぞれがその順番に配置されて構築される。機能処理部11乃至13のそれぞれは、前段から入力されたデータに対して所定の処理を施して、処理が施されたデータを後段に出力する。即ち、このような機能処理部11乃至13のそれぞれの処理がその順番に実行されて、その結果として、最終段の機能処理部13から出力されるデータが、メインプロセス処理部1の最終的な出力データとして外部に出力されることになる。
The main
同様に、図1の例のサブプロセス処理部2は、ソフトウエアモジュール(機能ブロック)である機能処理部21乃至23のそれぞれがその順番に配置されて構築される。機能処理部21乃至23のそれぞれは、前段から入力されたデータに対して所定の処理を施して、処理が施されたデータを後段に出力する。即ち、このような機能処理部21乃至23のそれぞれの処理がその順番に実行されて、その結果として、最終段の機能処理部23から出力されるデータが、サブプロセス処理部2の最終的な出力データとして外部に出力されることになる。
Similarly, the
なお、ここでは例えば、メインプロセス処理部1のようなメインプロセスとは、リアルタイム性の保証が必要となるプロセスを指す。これに対して、サブプロセスとは、その保証が不要なプロセスを指す。リアルタイム性とは、所定の処理単位のデータに対するプロセスの全処理が所定の単位時間内に完了する、という性質を指す。
Here, for example, a main process such as the main
以上説明したようなメインプロセスとサブプロセスとのそれぞれの処理が並列して実行される場合、「メインプロセスに影響が無い範囲で、即ち、メインプロセスのリアルタイム性を保証しつつ、サブプロセスを可能な限り高速で(Best effort modeで)実行させたい」という要望が多数のユーザから近年挙げられている。
しかしながら、図1に示されるように、サブプロセスをメインプロセスと完全に独立してフリーランで走らせるという手法(以下、第1の従来の手法と称する)が利用された場合、サブプロセスの処理速度の最高速度が非常に高いときには、サブプロセスの処理速度が最高速度に到達する前に、プロセッサ全体の使用率が100% になってしまうことが多々ある。また、プロセッサ全体の使用率が100%になる前に、サブプロセスの処理速度が最高速度に到達するときでも、その最高速度がある程度高い値であるときには、プロセッサ全体の使用率は100% にならないまでも高率になってしまうことが多々ある。即ち、第1の従来の手法が利用された場合には、プロセッサが過負荷状態になってしまうことが多々ある。 However, as shown in FIG. 1, when the technique of running the subprocess in a free run completely independently of the main process (hereinafter referred to as the first conventional technique) is used, the processing of the subprocess is performed. When the maximum speed is very high, the overall processor utilization often reaches 100% before the processing speed of the subprocess reaches the maximum speed. In addition, even when the processing speed of the sub-process reaches the maximum speed before the usage rate of the entire processor reaches 100%, the usage rate of the entire processor does not reach 100% if the maximum speed is a certain high value. Often become high rates. That is, when the first conventional method is used, the processor often becomes overloaded.
このようにしてプロセッサが過負荷状態になってしまうと、メインプロセスの優先度がサブプロセスの優先度よりたとえ高く設定されていたとしても、メインプロセスのリアルタイム性の保証を維持していくことが困難になる、という課題が発生してしまう。即ち、第1の従来の手法が利用された場合には、上述した要望に応えることは困難になってしまう、という課題が発生してしまう。 If the processor is overloaded in this way, the real-time guarantee of the main process can be maintained even if the priority of the main process is set higher than the priority of the sub-process. The problem of becoming difficult occurs. That is, when the first conventional method is used, there arises a problem that it becomes difficult to meet the above-mentioned demand.
また、特許文献1には、メインプロセスの処理として、リアルタイムデータを他の情報処理装置に転送するデータ転送処理が開示されており、また、サブプロセスの処理として、非リアルタイムデータを他の情報処理装置に転送するデータ転送処理が開示されている。そして、特許文献1には、次のような手法が開示されている。即ち、メインプロセスは、自分自身が使用する帯域を登録し、登録された帯域以下でデータ転送処理を行う。このデータ転送処理の全てが終了するまでの間は、登録された帯域は固定される。また、サブプロセスは、予め設定された最大帯域(例えば、プロセッサの上限値「%」)から、メインプロセスにより登録された帯域を減算し、その減算の結果得られる帯域以下でデータ転送処理を行う。即ち、サブプロセスもまた、メインプロセスのデータ転送処理の全てが終了するまでの間は、固定された帯域以下でデータ転送を行う。以上のような手法が、特許文献1には開示されている。以下、特許文献1に開示されたこの手法を、第2の従来の手法と称する。
このような第2の従来の手法が利用された場合、メインプロセスが実際に使用している帯域とは無関係に、予め登録された固定帯域に応じて、サブプロセスの使用帯域の上限も決定されることになる。即ち、サブプロセスの使用帯域の上限は、メインプロセスが実際に使用している帯域が少ない場合でも(プロセッサに余裕がある場合でも)、この固定帯域に依存して一定となる。換言すると、サブプロセスの処理の実際の最高速度は、プロセッサに余裕がある場合でも、この固定帯域に依存して一定となり、本来得られるはずの最高速度よりも低くなってしまうことが多々ある。 When such a second conventional method is used, the upper limit of the bandwidth used by the subprocess is also determined according to the fixed bandwidth registered in advance, regardless of the bandwidth actually used by the main process. Will be. In other words, the upper limit of the bandwidth used by the sub-process is constant depending on the fixed bandwidth even when the bandwidth actually used by the main process is small (even if the processor has room). In other words, the actual maximum speed of sub-process processing is constant depending on this fixed bandwidth even when the processor has room, and often becomes lower than the maximum speed that should be originally obtained.
従って、第2の従来の手法が利用された場合には、メインプロセスのリアルタイム性の保証自体は可能になるが、サブプロセスを可能な限り高速で処理させることは困難になる、という課題が発生してしまう。即ち、上述した要望に応えることは困難になってしまう、という課題が発生してしまう。 Therefore, when the second conventional method is used, the real-time property of the main process itself can be guaranteed, but it is difficult to process the sub-process as fast as possible. Resulting in. In other words, there arises a problem that it becomes difficult to meet the above-described demand.
以上の内容をまとめると、特許文献1を含む従来の手法では上述した要望に充分応えることは困難である、という課題があった。
To summarize the above contents, there is a problem that it is difficult for the conventional method including
本発明は、このような状況に鑑みてなされたものであり、メインプロセスのリアルタイム性を保証しつつ、サブプロセスを可能な限り高速で処理できるようにするものである。 The present invention has been made in view of such a situation, and is capable of processing sub-processes as fast as possible while guaranteeing the real-time property of the main process.
本発明の情報処理装置は、所定の種類の品質を第1のレベル以上に確保する必要があるメインプロセスと、それ以外のサブプロセスとのそれぞれの処理を実行させるプロセッサを備える情報処理装置であって、プロセッサにより実行されるメインプロセスの処理内容を監視し、その監視結果に基づいて、その所定の種類の品質のレベルを測定する測定手段と、プロセッサの現在の使用率を検出する検出手段と、プロセッサの使用率の上限値を設定する設定手段と、検出手段により検出されたプロセッサの現在の使用率と、設定手段により設定されたプロセッサの使用率の上限値との間の第1の関係、および、その所定の種類の品質についての、測定手段により現時点またはその直前に測定された第2のレベルと、確保すべき第1のレベルとの間の第2の関係のうちの少なくとも一方に基づいて、プロセッサにより実行されるサブプロセスの処理速度を制御する制御手段とを備えることを特徴とする。 An information processing apparatus according to the present invention is an information processing apparatus including a processor that executes processes of a main process that needs to ensure a predetermined type of quality at a first level or higher and other sub-processes. Monitoring means for monitoring the processing content of the main process executed by the processor and measuring the level of the predetermined type of quality based on the monitoring result; and detecting means for detecting the current usage rate of the processor; First setting relationship between the setting means for setting the upper limit value of the processor usage rate, the current usage rate of the processor detected by the detecting means, and the upper limit value of the processor usage rate set by the setting means And a second level of the predetermined type of quality measured at or immediately before by the measuring means and a first level to be secured Second based on at least one of the relations, and a controlling means for controlling the processing rate of the sub-process to be executed by the processor.
制御手段は、第1の関係と第2の関係とに加えてさらに、測定手段によりこれまでに測定されてきたその所定の種類の品質のレベルの時間変化に基づいて、サブプロセスの処理速度を制御するようにすることができる。 In addition to the first relationship and the second relationship, the control means further controls the processing speed of the sub-process based on the temporal change in the predetermined type of quality level measured so far by the measuring means. Can be controlled.
サブプロセスは、プロセッサにより実行される複数の機能ブロックが所定の順番で配置され、かつ、複数の機能ブロックのうちの並んで配置される2つの機能ブロックの間にバッファが配置されて構成される。プロセッサは、複数の機能ブロックのうちの、最終段の機能ブロックを除く機能ブロックのそれぞれに対して、所定の単位量の処理に必要なデータが前段のバッファに記憶されているという第1の条件、および、そのデータを記憶させるための空き領域が所定の容量以上後段のバッファに確保されているという第2の条件が満たされた場合、他の機能ブロックとは独立して自立的に、前段のバッファからデータを読み出して所定の処理を施し、その処理が施されたデータを後段のバッファに書きこむことを開始させる。また、プロセッサは、複数の機能ブロックのうちの最終段の機能ブロックに対して、第1の条件に加えてさらに、前回の処理の開始時点から所定の処理間隔が経過したという第3の条件が満たされた場合、他の機能ブロックとは独立して自立的に、前段のバッファから所定のデータ量のデータを読み出して所定の処理を施し、その処理が施されたデータを、サブプロセスの出力データとして外部に出力することを開始させる。この間、制御手段は、所定のタイミング毎に、そのタイミングにおける第1の関係と第2の関係とのうちの少なくとも一方に基づいて所定の制御量を決定し、決定された制御量に応じて、第3の条件に含まれる処理間隔を更新させていくことで、サブプロセスの処理速度を制御するようにすることができる。 The sub-process is configured such that a plurality of functional blocks executed by the processor are arranged in a predetermined order, and a buffer is arranged between two functional blocks arranged side by side among the plurality of functional blocks. . The processor has a first condition that data required for a predetermined unit amount of processing is stored in a preceding buffer for each of the functional blocks excluding the last functional block among a plurality of functional blocks. When the second condition that a free space for storing the data is secured in a buffer at a later stage than a predetermined capacity is satisfied independently of other functional blocks, The data is read out from the buffer, a predetermined process is performed, and writing of the processed data to the subsequent buffer is started. In addition to the first condition, the processor further has a third condition that a predetermined processing interval has elapsed from the start of the previous process, with respect to the last function block of the plurality of function blocks. When satisfied, the data of a predetermined amount is read out from the buffer in the previous stage independently and independently from other function blocks and subjected to predetermined processing, and the processed data is output to the sub-process. Start outputting to the outside as data. During this time, the control means determines a predetermined control amount based on at least one of the first relationship and the second relationship at that timing for each predetermined timing, and according to the determined control amount, By updating the processing interval included in the third condition, the processing speed of the sub-process can be controlled.
制御手段は、第2のレベルと第1のレベルとの差分が所定の大きさ以上である場合、第1の関係を利用して制御量を決定し、その差分がその所定の大きさ未満である場合、第2の関係を利用して制御量を決定するようにすることができる。 When the difference between the second level and the first level is greater than or equal to a predetermined magnitude, the control means determines the control amount using the first relationship, and the difference is less than the predetermined magnitude. In some cases, the control amount can be determined using the second relationship.
メインプロセスの単位時間当たりのデータ処理量が上述した所定の種類の品質とされ、単位時間当たりにメインプロセスから出力すべきデータ量が、メインプロセスが確保すべき第1のレベルとされる。また、メインプロセスは、プロセッサにより実行される複数の機能ブロックが所定の順番で配置され、かつ、複数の機能ブロックのうちの並んで配置される2つの機能ブロックの間にバッファが配置されて構成される。プロセッサは、複数の機能ブロックのうちの最終段の機能ブロックに対して、単位時間毎に、その前段のバッファから第1のレベルに対応するデータ量のデータを読み出して所定の処理を施し、その処理が施されたデータを、メインプロセスの出力データとして外部に出力することを開始させる。この間、測定手段は、メインプロセスの最終段の機能ブロックにとっての前段のバッファの記憶データ量を監視し、単位時間毎に、その時点で監視されたバッファの記憶データ量を、上述した所定の種類の品質の第2のレベルとして測定するようにすることができる。 The amount of data processed per unit time of the main process is the above-mentioned predetermined type of quality, and the amount of data to be output from the main process per unit time is the first level that the main process should secure. The main process includes a plurality of functional blocks executed by the processor in a predetermined order, and a buffer arranged between two functional blocks arranged side by side among the plurality of functional blocks. Is done. The processor reads out the data amount corresponding to the first level from the buffer at the previous stage for each unit time for the last functional block of the plurality of functional blocks, performs a predetermined process, It starts to output the processed data to the outside as output data of the main process. During this time, the measuring means monitors the amount of data stored in the preceding buffer for the last functional block of the main process, and the amount of data stored in the buffer monitored at that time for each unit time is determined according to the predetermined type described above. Can be measured as a second level of quality.
本発明の情報処理方法は、所定の種類の品質を第1のレベル以上に確保する必要があるメインプロセスと、それ以外のサブプロセスとのそれぞれの処理を並列的に実行させるプロセッサを備える情報処理装置の情報処理方法であって、プロセッサにより実行されるメインプロセスの処理内容を監視し、その監視結果に基づいて、その所定の種類の品質のレベルを測定する測定ステップと、プロセッサの現在の使用率を検出する検出ステップと、プロセッサの使用率の上限値を設定する設定ステップと、検出ステップの処理により検出されたプロセッサの現在の使用率と、設定ステップの処理により設定されたプロセッサの使用率の上限値との間の第1の関係、および、その所定の種類の品質についての、測定ステップの処理により現時点またはその直前に測定された第2のレベルと、確保すべき第1のレベルとの間の第2の関係のうちの少なくとも一方に基づいて、プロセッサにより実行されるサブプロセスの処理速度を制御する制御ステップとを含むことを特徴とする。 An information processing method according to the present invention is an information processing system including a processor that executes in parallel each process of a main process that needs to ensure a predetermined type of quality at a first level or higher and other sub-processes. An information processing method for an apparatus, comprising: a measuring step for monitoring a processing content of a main process executed by a processor, and measuring a level of a predetermined type of quality based on the monitoring result; and a current use of the processor A detection step for detecting the rate, a setting step for setting an upper limit value of the processor usage rate, a current usage rate of the processor detected by the processing of the detection step, and a processor usage rate set by the processing of the setting step The first relationship between the upper limit of the current value and the processing of the measurement step for that predetermined type of quality Control for controlling the processing speed of the sub-process executed by the processor based on at least one of the second relationship between the second level measured immediately before and the first level to be secured And a step.
本発明のプログラムは、所定の種類の品質を第1のレベル以上に確保する必要があるメインプロセスと、それ以外のサブプロセスとのそれぞれの処理を並列的に実行させるプロセッサを備えるコンピュータに実行させるプログラムであって、プロセッサにより実行されるメインプロセスの処理内容を監視し、その監視結果に基づいて、その所定の種類の品質のレベルを測定する測定ステップと、プロセッサの現在の使用率を検出する検出ステップと、プロセッサの使用率の上限値を設定する設定ステップと、検出ステップの処理により検出されたプロセッサの現在の使用率と、設定ステップの処理により設定されたプロセッサの使用率の上限値との間の第1の関係、および、その所定の種類の品質についての、測定ステップの処理により現時点またはその直前に測定された第2のレベルと、確保すべき第1のレベルとの間の第2の関係のうちの少なくとも一方に基づいて、プロセッサにより実行されるサブプロセスの処理速度を制御する制御ステップとを含むことを特徴とする。 The program of the present invention is executed by a computer including a processor that executes in parallel each process of a main process that needs to ensure a predetermined type of quality at a first level or higher and other sub-processes. A program that monitors the processing contents of a main process executed by the processor and, based on the monitoring result, measures the level of the predetermined type of quality and detects the current usage rate of the processor. A detection step, a setting step for setting an upper limit value of the processor usage rate, a current processor usage rate detected by the processing of the detection step, and an upper limit value of the processor usage rate set by the processing of the setting step The first relationship between the two and the current quality of the predetermined type Alternatively, the processing speed of the subprocess executed by the processor is controlled based on at least one of the second relationship between the second level measured immediately before and the first level to be secured. And a control step.
本発明の情報処理装置および方法、並びにプログラムにおいては、所定の種類の品質を第1のレベル以上に確保する必要があるメインプロセスと、それ以外のサブプロセスとのそれぞれの処理が並列的にプロセッサにより実行される場合に、サブプロセスの処理速度が制御される。詳細には、プロセッサにより実行されるメインプロセスの処理内容が監視され、その監視結果に基づいてその所定の種類の品質のレベルが測定される。また、プロセッサの現在の使用率が検出される。さらに、プロセッサの使用率の上限値が設定される。そして、検出されたプロセッサの現在の使用率と、設定されたプロセッサの使用率の上限値との間の第1の関係、および、その所定の種類の品質についての、現時点またはその直前に測定された第2のレベルと、確保すべき第1のレベルとの間の第2の関係のうちの少なくとも一方に基づいて、プロセッサにより実行されるサブプロセスの処理速度が制御される。 In the information processing apparatus, method, and program according to the present invention, the processing of the main process that needs to ensure a predetermined type of quality at the first level or higher and the other sub-processes are processed in parallel. When this is executed, the processing speed of the subprocess is controlled. Specifically, the processing content of the main process executed by the processor is monitored, and the level of the predetermined type of quality is measured based on the monitoring result. Also, the current usage rate of the processor is detected. Further, an upper limit value of the processor usage rate is set. And a first relationship between the detected processor current utilization and the set processor utilization upper limit, and the predetermined type of quality, measured at or immediately before The processing speed of the sub-process executed by the processor is controlled based on at least one of the second relationships between the second level and the first level to be secured.
以上のごとく、本発明によれば、リアルタイム性の保証が必要なメインプロセスと、それ以外のサブプロセスとの並列処理を実行することができる。特に、所定の種類の品質を第1のレベル以上に確保することでリアルタイム性を保証しつつ、サブプロセスを可能な限り高速で処理することができる。 As described above, according to the present invention, it is possible to execute parallel processing between a main process that requires real-time guarantee and other sub-processes. In particular, the sub-process can be processed as fast as possible while ensuring real-time performance by ensuring a predetermined type of quality at or above the first level.
以下に本発明の実施の形態を説明するが、請求項に記載の構成要件と、発明の実施の形態における具体例との対応関係を例示すると、次のようになる。この記載は、請求項に記載されている発明をサポートする具体例が、発明の実施の形態に記載されていることを確認するためのものである。従って、発明の実施の形態中には記載されているが、構成要件に対応するものとして、ここには記載されていない具体例があったとしても、そのことは、その具体例が、その構成要件に対応するものではないことを意味するものではない。逆に、具体例が構成要件に対応するものとしてここに記載されていたとしても、そのことは、その具体例が、その構成要件以外の構成要件には対応しないものであることを意味するものでもない。 Embodiments of the present invention will be described below. Correspondences between constituent elements described in the claims and specific examples in the embodiments of the present invention are exemplified as follows. This description is to confirm that specific examples supporting the invention described in the claims are described in the embodiments of the invention. Therefore, even though there are specific examples that are described in the embodiment of the invention but are not described here as corresponding to the configuration requirements, the specific examples are not included in the configuration. It does not mean that it does not correspond to a requirement. On the contrary, even if a specific example is described here as corresponding to a configuration requirement, this means that the specific example does not correspond to a configuration requirement other than the configuration requirement. not.
さらに、この記載は、発明の実施の形態に記載されている具体例に対応する発明が、請求項に全て記載されていることを意味するものではない。換言すれば、この記載は、発明の実施の形態に記載されている具体例に対応する発明であって、この出願の請求項には記載されていない発明の存在、すなわち、将来、分割出願されたり、補正により追加される発明の存在を否定するものではない。 Further, this description does not mean that all the inventions corresponding to the specific examples described in the embodiments of the invention are described in the claims. In other words, this description is an invention corresponding to the specific example described in the embodiment of the invention, and the existence of an invention not described in the claims of this application, that is, in the future, a divisional application will be made. Nor does it deny the existence of an invention added by amendment.
本発明によれば、情報処理装置が提供される。この情報処理装置(例えば、図2の情報処理装置)は、所定の種類の品質を第1のレベル以上確保する必要があるメインプロセス(例えば、図4のメインプロセス処理部131や図7のメインプロセス処理部172)と、それ以外のサブプロセス(例えば、図4のサブプロセス処理部132や図7のサブプロセス処理部173)とのそれぞれの処理を並列的に実行させるプロセッサ(例えば、図2と図3のCPU101)を備える情報処理装置である。詳細には、この情報処理装置は、前記プロセッサにより実行される前記メインプロセスの処理内容を監視し、その監視結果に基づいて、前記所定の種類の品質のレベル(例えば、図4の品質保証余裕度や図7の出力バッファレベルLevel)を測定する測定手段(例えば、図4の品質判定部144や図7の品質判定部190)と、前記プロセッサの現在の使用率を検出する検出手段(例えば、図4のCPU使用率検出部134や図7のOS161)と、前記プロセッサの使用率の上限値を設定する設定手段(例えば、図4のCPU使用率上限値設定部133や図7のパワー制御162)と、前記検出手段により検出された前記プロセッサの現在の使用率(例えば、図5の現在のCPU使用率X)と、前記設定手段により設定された前記プロセッサの使用率の上限値(例えば、図5のCPU使用率の上限値CPU_Limit(=P))との間の第1の関係(例えば、図5の関係)、および、前記所定の種類の品質についての、前記測定手段により現時点またはその直前に測定された第2のレベル(例えば、図8の丸印で示される出力バッファレベルLevelの各値)と、確保すべき前記第1のレベル(例えば、図8の白抜き矢印で示されるバッファ残量下限値である1)との間の第2の関係のうちの少なくとも一方に基づいて、前記プロセッサにより実行される前記サブプロセスの処理速度を制御する制御手段(例えば、図4の処理速度制御部154や図7の処理速度制御部200)とを備えることを特徴とする。
According to the present invention, an information processing apparatus is provided. The information processing apparatus (for example, the information processing apparatus in FIG. 2) is a main process (for example, the main
この情報処理装置において、前記制御手段は、前記第1の関係と前記第2の関係とに加えてさらに、前記測定手段によりこれまでに測定されてきた前記所定の種類の品質のレベルの時間変化(例えば、図8に示されるような出力バッファレベルLevelのレベルの時間変化)に基づいて、前記サブプロセスの処理速度を制御するようにすることができる。 In this information processing apparatus, in addition to the first relationship and the second relationship, the control unit further changes the level of the predetermined type of quality measured so far by the measuring unit. The processing speed of the sub-process can be controlled based on (for example, the time change of the level of the output buffer level Level as shown in FIG. 8).
この情報処理装置において、前記サブプロセス(例えば、図7のサブプロセス処理部173)は、前記プロセッサにより実行される複数の機能ブロックが所定の順番で配置され(例えば、図7に示されるように、DeMux部191、デコード部193、サンプリングレートコンバート処理部195、エンコード部197、および、Mux部199がその順番で配置され)、かつ、複数の前記機能ブロックのうちの並んで配置される2つの機能ブロックの間にバッファ(例えば、図7の入力段リングバッファ192、ワークエリアフレームバッファ194、ワークエリアフレームバッファ196、および出力段リングバッファ198)が配置されて構成され、前記プロセッサは、複数の前記機能ブロックのうちの最終段の機能ブロックを除く機能ブロックのそれぞれに対して、所定の単位量(例えば、図7の例では、動画像データが処理対象とされているので、例えばフレーム単位)の処理に必要なデータが入力段のバッファに記憶されているという第1の条件、および、そのデータを記憶させるための空き領域が所定の容量以上だけ後段のバッファに確保されているという第2の条件が満たされた場合、他の機能ブロックとは独立して自立的に、前段の前記バッファからデータを読み出して所定の処理を施し、その処理が施された前記データを後段の前記バッファに書きこむことを開始させ、前記プロセッサは、複数の前記機能ブロックのうちの最終段の前記機能ブロック(例えば、図7のMux部199)に対して、前記第1の条件に加えてさらに、前回の処理の開始時点から所定の処理間隔(例えば、図20に示される書き込み間隔t_period[t])が経過したという第3の条件が満たされた場合、他の機能ブロックとは独立して自立的に、前段のバッファから所定のデータ量(例えば、図20に示されるHDD書き込みデータ量W_BK)のデータを読み出して所定の処理を施し、その処理が施された前記データを、前記サブプロセスの出力データとして外部(例えば、図7のストリームマネージャ171)に出力することを開始させ、前記制御手段は、所定のタイミング(例えば、図7のビデオカード201からの割り込みVideo Frameのタイミング)毎に、そのタイミングにおける前記第1の関係と前記第2の関係とのうちの少なくとも一方に基づいて制御量(例えば、総合制御量Gs)を決定し、決定された前記制御量に応じて、前記第3の条件に含まれる前記処理間隔を更新させていくことで、前記サブプロセスの処理速度を制御するようにすることができる。
In this information processing apparatus, the subprocess (for example, the
前記制御手段は、前記第2のレベルと前記第1のレベルとの差分が所定の大きさ以上である場合、前記第1の関係を利用して前記制御量を決定し(例えば後述するように、総合制御量Gsが、第2の関係を示す出力バッファレベル制御量Gbと、第1の関係を示すCPU使用率制御量Gcとの積として求められる際、出力バッファの現在の第2のレベルLevelが2以上である場合、即ち、出力バッファの現在の第2のレベルLevelと、第1のレベルである1(図8参照)との差分が1以上となった場合、CPU使用率制御量Gcをそのまま総合制御量Gsとして決定し)、前記差分が前記大きさ未満である場合、前記第2の関係を利用して前記制御量を決定する(出力バッファの現在の第2のレベルLevelが2未満である場合、即ち、出力バッファの現在の第2のレベルLevelと、第1のレベルである1との差分が1未満となった場合、出力バッファレベル制御量Gbをそのまま総合制御量Gsとして決定する)ようにすることができる。
When the difference between the second level and the first level is greater than or equal to a predetermined magnitude, the control means determines the control amount using the first relationship (for example, as described later) When the total control amount Gs is obtained as the product of the output buffer level control amount Gb indicating the second relationship and the CPU usage rate control amount Gc indicating the first relationship, the current second level of the output buffer When the level is 2 or more, that is, when the difference between the current second level Level of the output buffer and the first level 1 (see FIG. 8) is 1 or more, the CPU usage rate control amount Gc is determined as the total control amount Gs), and when the difference is less than the magnitude, the control amount is determined using the second relationship (the current second level Level of the output buffer is If less than 2, ie the current second level Level of the output buffer Can
前記メインプロセス(例えば、図7のメインプロセス処理部172)の単位時間(例えば、図7のビデオカード201からの割り込みVide Frameの間隔に対応する時間)当たりのデータ処理量が前記所定の種類の品質とされ、前記単位時間当たりに前記メインプロセスから出力すべきデータ量(例えば、図7のメインプロセス処理部172が1倍速で動作している場合、1フレーム分のデータ量)が、前記メインプロセスが確保すべき前記第1のレベルとされ、前記メインプロセスは、前記プロセッサにより実行される複数の機能ブロックが所定の順番で配置され(例えば、図7に示されるように、DeMux部181、デコード部183、ノイズ除去部185、画像処理部187、および出力制御部189がその順番で配置され)、複数の前記機能ブロックのうちの並んで配置される2つの機能ブロックの間にバッファ(例えば、図7の入力段リングバッファ182、ワークエリアフレームバッファ184,186、および、出力段フレームバッファ188)が配置されて構成され、前記プロセッサは、複数の前記機能ブロックのうちの最終段の機能ブロック(例えば、図7の出力制御部189)に対して、前記単位時間毎に、入力段のバッファから前記第1のレベルに対応するデータ量のデータを読み出して所定の処理を施し、その処理が施された前記データを、前記メインプロセスの出力データとして外部に出力することを開始させ(例えば、図7のビデオカード201からの割り込みVideo Frameのタイミングで、1フレーム分のデータを出力段フレームバッファ188から読み出して、ビデオドライバ167−2に出力することを開始させ)、前記測定手段は、前記メインプロセスの前記最終段の機能ブロックにとっての入力段の前記バッファ(例えば、図7の出力段フレームバッファ188)の記憶データ量を監視し、前記単位時間毎に、その時点で監視された前記バッファの記憶データ量(例えば、図7の出力バッファレベルLevel)を、前記所定の種類の品質の第2のレベルとして測定するようにすることができる。
The data processing amount per unit time (for example, the time corresponding to the interval of the interrupt video frame from the
本発明によれば、情報処理方法が提供される。この情報処理方法は、所定の種類の品質を第1のレベル以上に確保することが必要なメインプロセス(例えば、図4のメインプロセス処理部131や図7のメインプロセス処理部172)と、それ以外のサブプロセス(例えば、図4のサブプロセス処理部132や図7のサブプロセス処理部173)とのそれぞれの処理を並列的に実行させるプロセッサ(例えば、図2や図3のCPU101)を備える情報処理装置(例えば、図2の情報処理装置)の情報処理方法である。この情報処理方法は、前記プロセッサにより実行される前記メインプロセスの処理内容を監視し、その監視結果に基づいて、前記所定の種類の品質のレベルを測定する測定ステップ(例えば、図7の品質判定部190の処理)と、前記プロセッサの現在の使用率を検出する検出ステップ(例えば、図7のOS161の処理)と、前記プロセッサの使用率の上限値を設定する設定ステップ(例えば、図7のパワー制御162の処理)と、前記検出ステップの処理により検出された前記プロセッサの現在の使用率と、前記設定ステップの処理により設定された前記プロセッサの使用率の上限値との間の第1の関係、および、前記所定の種類の品質についての、前記測定ステップの処理により現時点またはその直前に測定された第2のレベルと、確保すべき前記第1のレベルとの間の第2の関係のうちの少なくとも一方に基づいて、前記プロセッサにより実行される前記サブプロセスの処理速度を制御する制御ステップ(例えば、図7の処理速度制御部200とMux部199との間で行われる処理であって、具体的には例えば、図22の「速度制御処理」とを含むことを特徴とする。
According to the present invention, an information processing method is provided. This information processing method includes a main process (for example, the main
本発明によれば、プログラムが提供される。このプログラムは、所定の種類の品質が第1のレベル以上となる保証が必要なメインプロセス(例えば、図4のメインプロセス処理部131や図7のメインプロセス処理部172)と、それ以外のサブプロセス(例えば、図4のサブプロセス処理部132や図7のサブプロセス処理部173)とのそれぞれの処理を並列的に実行させるプロセッサ(例えば、図2や図3のCPU101)を備えるコンピュータ(例えば、図2の構成のコンピュータ)に実行させるプログラムであって、上述した本発明の情報処理方法に対応するプログラムである。
According to the present invention, a program is provided. This program includes a main process (for example, the main
また、本発明によれば、記録媒体が提供される。この記録媒体は、上述した本発明のプログラムを記憶していることを特徴とする。 According to the present invention, a recording medium is provided. This recording medium stores the above-described program of the present invention.
次に、図面を参照して、本発明の実施の形態について説明する。 Next, embodiments of the present invention will be described with reference to the drawings.
図2は、本発明が適用される情報処理装置の一構成例を示している。 FIG. 2 shows a configuration example of an information processing apparatus to which the present invention is applied.
図2において、CPU(Central Processing Unit)101は、ROM(Read Only Memory)102に記録されているプログラム、または記憶部108からRAM(Random Access Memory)103にロードされたプログラムに従って各種の処理を実行する。具体的には例えば、CPU101は、後述する図6の構成の各種プログラムを実行することができる。RAM103にはまた、CPU101が各種の処理を実行する上において必要なデータなども適宜記憶される。
In FIG. 2, a CPU (Central Processing Unit) 101 executes various processes according to a program recorded in a ROM (Read Only Memory) 102 or a program loaded from a
CPU101、ROM102、およびRAM103は、バス104を介して相互に接続されている。このバス104にはまた、入出力インタフェース105も接続されている。
The
入出力インタフェース105には、入力部106、出力部107、記憶部108、および、通信部109が接続されている。
An
入力部106は、例えば、キーボード、受光部を含むリモートコントローラ、マウスなどの入力機器で構成される。出力部107は、例えば、後述する図7のビデオカード201やモニタ202等からなる表示部単体、図示せぬサウンドカードやスピーカ等からなる音声出力部単体、または、それらの組合せで構成される。記憶部108は、例えば、後述する図7のHDD(Hard Disk Drive)203等で構成される。通信部109は、例えばモデム、ターミナルアダプタ、無線通信機器等より構成される。係る構成の通信部109は、図示せぬネットワークを介する図示せぬ他の情報処理装置との間の通信を制御する。
The
入出力インタフェース105にはまた、必要に応じてドライブ110が接続され、磁気ディスク、光ディスク、光磁気ディスク、或いは半導体メモリなどよりなるリムーバブル記録媒体111が適宜装着され、それらから読み出されたコンピュータプログラム、具体的には例えば、後述する図6の構成のプログラム等が、必要に応じて記憶部108にインストールされる。
A
係る図2の構成の情報処理装置が上述したマルチプロセッサシステムとして構成される場合、CPU101は、例えば図3のように構成される。即ち、図3は、CPU101の詳細な構成例を示すブロック図である。
When the information processing apparatus configured as shown in FIG. 2 is configured as the multiprocessor system described above, the
図3の例のCPU101は、1つのMCPU121とn個(nは、1以上の任意の整数値)のSCPU123−1乃至123−nとのそれぞれがバス122を介して相互に接続されて構成される。
The
なお、本実施の形態の図3のCPU101は1つのチップで構成されているが、MCPU121およびSCPU123−1乃至123−nは、1つのチップで構成する必要は特になく、複数チップで構成してもよい。具体的には例えば、MCPU121およびSCPU123−1乃至123−nのそれぞれは、相異なる1つのチップで構成されて、図2のバス104にそれぞれ個別に接続されてもよい。
Note that the
かかる図3の構成のCPU101は、複数のプロセスのそれぞれの処理を並列して実行することが容易にできる。例えば、CPU101は、従来の所定のソフトウエアを1以上実行することで、図1に示されるような、メインプロセス処理部1とサブプロセス処理部2とのそれぞれを構築し、構築されたメインプロセス処理部1とサブプロセス処理部2とのそれぞれの処理を並列して実行することが当然ながらできる。
The
しかしながら、CPU101が、図1のメインプロセス処理部1とサブプロセス処理部2との処理を単に実行した場合、[発明が解決しようとする課題]で上述した課題が当然ながら発生してしまうことになる。
However, when the
そこで、本発明人は、次のような新たな第1の手法と第2の手法とを発明した。 Therefore, the present inventors have invented the following new first method and second method.
即ち、本発明人が発明した第1の手法とは、現在のCPU使用率に基づいて、サブプロセス処理部2の処理速度をCPU使用率の上限値を超えない範囲で制御する、という手法である。なお、現在のCPU使用率と、CPU使用率の上限値との詳細については、図5を参照して後述する。
That is, the first method invented by the present inventors is a method of controlling the processing speed of the
しかしながら、第1の手法で利用されるCPU使用率は一定時間内の平均から求められるため、そのCPU使用率を単に利用してサブプロセス処理部2の処理速度を制御した場合にその応答が遅くなる、という欠点が存在する。この欠点のため、メインプロセス処理部1のリアルタイム性の保証が維持できなくなることもある。即ち、第1の手法を単に利用しただけでは、従来の課題を充分に解決できるとは言い難い。
However, since the CPU usage rate used in the first method is obtained from an average over a certain period of time, the response is slow when the processing speed of the
このような第1の手法に対して本発明人が発明した第2の手法とは、メインプロセス処理部1の所定の種類の品質のレベルに基づいて、リアルタイム性の保証ができるか否かを判定し、即ち、リアルタイム性を保証する上で、メインプロセス処理部1の現在の処理の進捗で充分間に合っているのか否かを判定し、その判定結果に基づいてサブプロセス処理部2の処理速度を制御する、という手法である。
The second method invented by the present inventor with respect to such a first method is whether or not real-time performance can be guaranteed based on a predetermined type of quality level of the main
即ち、繰り返しになるが、リアルタイム性とは、所定の処理単位のデータに対するメインプロセス処理部1の全処理が所定の単位時間内に完了する、という性質を指す。従って、例えば、その単位時間当たりにおけるメインプロセス処理部1の処理量(平均処理速度に相当)は、メインプロセス処理部1の品質の1つの種類であると定義すれば、定義された種類の品質のレベルに基づいて、リアルタイム性の保証ができるか否かを判定することができる。詳細には、この場合、メインプロセス処理部1がリアルタイム性を保証するために確保すべき品質のレベルとは、単位時間当たりのプロセス処理部1の処理量が、上述した処理単位に対応するデータ量であることを指す。この場合、単位時間当たりの現在のメインプロセス処理部1の処理量が、このレベル以上である場合にはリアルタイム性の保証ができると判定できる一方、このレベル未満である場合にはリアルタイム性の保証ができないと判定できる。そこで例えば、このようにしてリアルタイム性が保証できると判定された場合には、サブプロセス処理部2の処理速度を上げる。これに対して、リアルタイム性が保証できないと判定された場合には、サブプロセス処理部2の処理速度を下げる。以上のような手法が、本発明人が発明した第2の手法の一例である。
That is, although it is repeated, the real-time property refers to the property that all processing of the main
このように、第2の手法では、メインプロセス処理部1のリアルタイム性の保証自体は可能になる。
As described above, in the second method, it is possible to guarantee the real-time property of the main
しかしながら、第2の手法では、現在のCPU使用率が把握できないという欠点が存在する。この欠点のため、第2の手法では、サブプロセス処理部2が可能な限り最速で処理を行っているのか否かを把握できない。即ち、サブプロセス処理部2が可能な限り最速で処理を行っていない状況も発生し得る。このため、第2の手法を単に利用しただけでは、従来の課題を充分に解決できるとは言い難い。
However, the second method has a drawback that the current CPU usage rate cannot be grasped. Due to this drawback, the second method cannot determine whether or not the
そこで、本発明人は、従来の課題を充分に解決することを目的として、この第1の手法と第2の手法との両者の欠点を補うことが可能な次のような第3の手法をさらに発明した。 Therefore, the present inventor has made the following third method capable of compensating for the disadvantages of both the first method and the second method with the aim of sufficiently solving the conventional problems. Further invented.
即ち、本発明人が発明した第3の手法とは、上述した図1の代わりに、例えば、図4に示されるようなメインプロセス処理部131とサブプロセス処理部132とを構築し、構築されたメインプロセス処理部131とサブプロセス機能処理部141とのそれぞれの処理を並列して実行する、という手法を指す。
That is, the third method invented by the present inventors is constructed by constructing, for example, a main
即ち、図4は、本発明の情報処理装置により構築されてその処理が実行される、メインプロセスとサブプロセスとを含むソフトウエアシステムの構成例を示す機能ブロック図である。換言すると、図4は、本発明が適用されるソフトウエアシステムの構成例を示す機能ブロック図である。 That is, FIG. 4 is a functional block diagram showing a configuration example of a software system including a main process and a sub-process, which is constructed by the information processing apparatus of the present invention and executes its processing. In other words, FIG. 4 is a functional block diagram showing a configuration example of a software system to which the present invention is applied.
別言すると、本発明の情報処理装置とは、例えば、図4に示されるメインプロセス処理部131とサブプロセス処理部132とを構築し、構築されたメインプロセス処理部131とサブプロセス機能処理部132とのそれぞれの処理を並列して実行することが可能な装置であれば足り、その構成は上述した図2や図3の構成に特に限定されない。
In other words, the information processing apparatus of the present invention, for example, constructs the main
図4に示されるように、このソフトウエアシステムは、例えば、メインプロセス処理部131、サブプロセス処理部132、CPU使用率上限値設定部133、および、CPU使用率検出部134から構成される。
As shown in FIG. 4, this software system includes, for example, a main
メインプロセス処理部131のうちの従来のメインプロセスに相当する部分は、ソフトウエアモジュール(機能ブロック)である機能処理部141乃至143のそれぞれがその順番に配置されて構築される。機能処理部141乃至143のそれぞれは、前段から入力されたデータに対して所定の処理を施して、処理が施されたデータを後段に出力する。即ち、このような機能処理部141乃至143のそれぞれの処理がその順番に実行されて、その結果として、最終段の機能処理部143から出力されるデータが、メインプロセス処理部131の最終的な出力データとして外部に出力されることになる。
The portion corresponding to the conventional main process in the main
このように、機能処理部141乃至143のそれぞれは、上述した図1の機能処理部11乃至13のそれぞれと基本的に同様の機能と構成を有している。換言すると、図4の例では、従来の図1のメインプロセス処理部1との対比を明確にすることを目的として、3つの機能処理部141乃至143がメインプロセス処理部131に設けられているだけである。従って、当然ながら、本発明においては、メインプロセスを構成する機能ブロックの個数やその接続形態(処理の順番)は、後述する図7に示されるように、図4の例に特に限定されない。即ち、本発明においては、任意の個数の機能ブロックが任意の接続形態で接続されて、メインプロセスを構成することが可能である。
As described above, each of the
本発明のメインプロセス処理部131には、このような機能処理部141乃至143からなるメインプロセスの他さらに、品質判定部144が設けられている。この品質判定部144は、上述した本発明の第2の手法のうちの少なくとも一部に対応する処理を実行する。
The main
即ち、品質判定部144は、機能処理部141乃至143からなるメインプロセスの処理内容を監視し、その監視結果に基づいて、所定の種類、例えば上述したように定義した種類の品質のレベルを測定する。
That is, the
ここでは、例えば、品質判定部144は、所定の種類の品質について、リアルタイム性を保証するための限界レベルである第1のレベルに対する、現在の処理マージンに関する第2のレベルを測定し、それを品質保証余裕度として後述する処理速度制御部154に供給する。
Here, for example, the
品質保証余裕度とは、所定の単位量のデータに対するメインプロセス処理部131の処理の進捗度合いを示すパラメータ値、即ち、リアルタイム性を保証する上で、メインプロセス処理部131の処理の現在の進捗状態でどの程度間に合っているのかを示すパラメータ値であると言える。或いは、メインプロセス処理部131の現時点までの処理履歴と同様の処理が引き続き実行された場合に(これまでの平均処理速度のまま処理が引き続き実行された場合)、リアルタイム性をどの程度保証できるのかを示すパラメータ値であると言える。
The quality assurance margin is a parameter value indicating the degree of progress of processing of the main
なお、品質保証余裕度(品質レベル)の具体例については、図7を参照して後述する。 A specific example of the quality assurance margin (quality level) will be described later with reference to FIG.
以上説明したように、品質判定部144は、結局、上述した本発明の第2の手法の一部として、品質レベル(品質保証余裕度)を決定する。即ち、品質判定部144は、機能処理部141乃至143の処理内容を監視し、その監視結果に基づいて品質保証余裕度を決定し、サブプロセス処理部132に提供する。
As described above, the
サブプロセス処理部132のうちの従来のサブプロセスに相当する部分は、ソフトウエアモジュール(機能ブロック)である機能処理部151乃至153のそれぞれがその順番に配置されて構築される。機能処理部151乃至153のそれぞれは、前段から入力されたデータに対して所定の処理を施して、処理が施されたデータを後段に出力する。即ち、このような機能処理部151乃至153のそれぞれの処理がその順番に実行されて、その結果として、最終段の機能処理部153から出力されるデータが、サブプロセス処理部132の最終的な出力データとして外部に出力されることになる。
The portion corresponding to the conventional sub-process in the
このように、機能処理部151乃至153のそれぞれは、上述した図1の機能処理部21乃至23のそれぞれと基本的に同様の機能と構成を有している。換言すると、図4の例では、従来の図1のサブプロセス処理部2との対比を明確にすることを目的として、3つの機能処理部151乃至153がサブプロセス処理部132に設けられているだけである。従って、当然ながら、本発明では、サブプロセスを構成する各機能ブロックの個数やその接続形態(処理の順番)は、後述する図7に示されるように、図4の例に特に限定されない。即ち、本発明においては、メインプロセスとは完全に独立して、任意の個数の機能ブロックが任意の接続形態で接続されて、サブプロセスを構成することが可能である。
As described above, each of the
本発明のサブプロセス処理部132には、このような機能処理部151乃至153からなるサブプロセスの他さらに、処理速度制御部154が設けられている。この処理速度制御部154は、機能処理部151乃至153からなるサブプロセスに対して、上述した本発明の第1の手法と第2の手法とを組み合わせた処理速度制御を施す。
The
詳細には、図4に示されるように、処理速度制御部154には、第2の手法で利用される品質保証余裕度(品質レベル)が品質判定部144から供給される。処理速度制御部154にはまた、上述した第1の手法で利用される現在のCPU使用率がCPU使用率検出部134から供給される他、CPU使用率の上限値がCPU使用率上限値設定部133から供給され、かつ、図示せぬ外部から処理速度制御範囲が供給される。
Specifically, as shown in FIG. 4, the quality assurance margin (quality level) used in the second method is supplied from the
そこで、処理速度制御部154は、品質保証余裕度、CPU使用率の上限値、現在のCPU使用率、および、処理速度制御範囲に基づいて、機能処理部151乃至機能処理部153からなるサブプロセスの処理速度を制御する。
Accordingly, the processing
即ち、処理速度制御部154は、処理速度制御範囲内で、かつCPU使用率の上限値を超えない範囲で、現在のCPU使用率と現在の品質保証余裕度とに応じてサブプロセスの処理速度の設定を更新していくことで、サブプロセスの処理速度を制御する。なお、CPU使用率の上限値を超えない範囲とは、CPU使用率の上限値が一瞬たりとも越えない範囲を指すのではなく、例えば、CPU使用率が上限値を越えるようなオーバーシュートが短期間あっても、その後、その上限値以下で安定するような範囲を指す。
In other words, the processing
以上説明したメインプロセス処理部131とサブプロセス処理部132の他、図4のソフトウエアシステムには、上述したように、CPU使用率上限値設定部133とCPU使用率検出部134とがさらに設けられている。CPU使用率上限値設定部133は、CPU使用率の上限値を設定し、処理速度制御部154に供給する。CPU使用率検出部134は、現在のCPU使用率を検出(演算)し、処理速度制御部154に供給する。
In addition to the main
ここで、図5を参照して、現在のCPU使用率と、CPU使用率の上限値とについてそれぞれ説明する。即ち、図5は、図3のMCPU121およびSCPU123−1乃至SCPU123−n(以下、これらをまとめて各プロセッサと称する)のうちの所定の1つ(以下図5の説明では、着目プロセッサと称する)についての、現在のCPU使用率と、CPU使用率の上限値とのそれぞれを模式的に示した図である。
Here, the current CPU usage rate and the upper limit value of the CPU usage rate will be described with reference to FIG. 5 is a predetermined one of the
図5において、CPU_Maxとは、着目プロセッサの最大使用率を示している。なお、図5の例では、最大使用率CPU_Maxは1とされている。 In FIG. 5, CPU_Max represents the maximum usage rate of the processor of interest. In the example of FIG. 5, the maximum usage rate CPU_Max is 1.
CPU_Limitとは、着目プロセッサのCPU使用率の上限値を示している。着目プロセッサのCPU使用率の上限値CPU_Limitは、図5に示されるように最大使用率CPU_Limit以下の範囲で、図4のCPU使用率上限値設定部133により設定される。即ち、図5の例では、CPU使用率の上限値CPU_Limitとして、0乃至1の間の任意の値が設定される。CPU使用率の上限値CPU_Limitが0に設定されるとは、着目プロセッサの使用禁止の設定を意味している。即ち、CPU使用率上限値設定部133は、各プロセッサのうちの幾つかのCPU使用率の上限値CPU_Limitを0に設定することで、使用できるプロセッサの数を制限することができる。なお、以下の説明では、CPU使用率の上限値CPU_Limitは、図5に示されるように、CPU使用率の上限値Pと記述されることもある。即ち、本明細書では、CPU_Limit=Pとされる。
CPU_Limit indicates the upper limit value of the CPU usage rate of the processor of interest. The upper limit value CPU_Limit of the CPU usage rate of the processor of interest is set by the CPU usage upper limit
また、図5において、Xは、図4のCPU使用率検出部134により検出(算出)される着目プロセッサの現在のCPU使用率を示している。図5に示されるように、各プロセッサとも、現在のCPU使用率Xが、CPU使用率の上限値CPU_Limitを超えないように制御されることになる。
In FIG. 5, X represents the current CPU usage rate of the processor of interest detected (calculated) by the CPU usage
また、図5において、αは、着目プロセッサの現在のCPU使用率Xの、CPU使用率の上限値CPU_Limitに対する余裕度を示している。即ち、この余裕度αが小さい程、着目プロセッサの負荷が重いことになる。 In FIG. 5, α indicates a margin of the current CPU usage rate X of the processor of interest with respect to the upper limit value CPU_Limit of the CPU usage rate. That is, the smaller the margin α is, the heavier the load on the processor of interest is.
このように、図4のCPU使用率検出部134により検出された各プロセッサのそれぞれの現在のCPU使用率Xは、CPU使用率上限値設定部133により設定されたCPU使用率の上限値CPU_Limitを超えないように制御される。
As described above, the current CPU usage rate X of each processor detected by the CPU usage
次に、上述した図4のソフトウエアシステムの具体例として、オーディオ(Audio)/ビデオ(Video)の処理を行うソフトウエアシステム(以下、AVシステムと称する)について説明する。具体的には例えば、図4のメインプロセス処理部131が、MPEG(Moving Picture Experts GroUp)2 ストリームのうちのビデオの再生処理を行い、サブプロセス処理部132が、MPEG2 ストリームのうちのビデオのレート変換処理を行うことを特徴とするAVシステムの例について説明する。
Next, as a specific example of the above-described software system of FIG. 4, a software system (hereinafter referred to as an AV system) that performs audio / video processing will be described. Specifically, for example, the main
このような、AVシステムを構築し、その処理を実行するために必要なソフトウエアの構成例が図6に示されている。即ち、図6は、本発明の情報処理装置が実行するソフトウエア、即ち、例えば本実施の形態では図2と図3の構成の情報処理装置が実行するソフトウエアの構成例を示している。 FIG. 6 shows a configuration example of software necessary for constructing such an AV system and executing the processing. That is, FIG. 6 shows a configuration example of software executed by the information processing apparatus of the present invention, that is, for example, software executed by the information processing apparatus having the configuration shown in FIGS. 2 and 3 in this embodiment.
図6に示されるように、本発明のソフトウエアは、OS(Kernel)161乃至システムサービス166、並びに、ドライバ167−1乃至ドライバ167−m(mは、任意の整数値)から構成されている。
As shown in FIG. 6, the software of the present invention is composed of an OS (Kernel) 161 through a
OS161は、例えば図3のMCPU121に搭載される。即ち、OS161は、MCPU121により実行される。OS161は、各SCPU123−1乃至123−nが実行するプログラムのロード、メモリ管理、並びに、各SCPU123−1乃至123−n間の同期、排他、および、メッセージ通信などの基本的な制御のうちの少なくとも一部を行う。少なくとも一部と記述したのは、このような基本的な制御のうちの幾つかの制御が、後述するシステムサービス166により実行されることもあるからである。
The
また、OS161は、各プロセッサ(MCPU121およびSCPU123−1乃至123−n)のタスク(各機能ブロックの処理)のスケジューリングを行う。即ち、OS161は、タスクの優先順位やタスクが起動してからの経過時間などを考慮し、空いているプロセッサへ対応するタスクを割り当てる。なお、タスクのスケジューリングの具体例については、図15を参照して後述する。
The
さらに、OS161は、外部デバイスに対するドライバ167−1乃至167−mの管理も行う。
Furthermore, the
さらにまた、OS161は、後述するシステムサービス166からの依頼を受けて、各プロセッサ(MCPU121およびSCPU123−1乃至123−n)のそれぞれについての現在のCPU使用率Xを演算(検出)して、その演算結果を通知する。即ち、OS161のうちの一部が、図4のCPU使用率検出部134に対応する。
Further, the
パワー制御162は、例えば図3のMCPU121に搭載される。即ち、パワー制御162は、MCPU121により実行される。パワー制御162は、システム全体の消費電力を下げるためのパワーセーブ制御を行う。ここで言うシステムとは、例えば図2の情報処理装置全体を指す。
The power control 162 is mounted on, for example, the
詳細には、パワー制御162は、後述するアプリケーション165が実行可能で、かつシステム全体の消費電力を下げるように、各プロセッサ(MCPU121およびSCPU123−1乃至SCPU123−n)のそれぞれのCPU使用率の上限値P(=CPU_Limit)を最適な値に設定する。即ち、パワー制御162のうちの少なくとも一部は、図4のCPU使用率上限値設定部133に対応する。
Specifically, the power control 162 can execute an
なお、パワー制御162は、本発明のソフトウエアにとって必須なソフトウエアではない。即ち、パワー制御162は、図6の例ではソフトウエアとして構成されているが、ハードウエアで構成してもよい。 The power control 162 is not essential software for the software of the present invention. That is, the power control 162 is configured as software in the example of FIG. 6, but may be configured as hardware.
AVライブラリ163は、AVシステムの処理に必要な各種ソフトウエアモジュール(機能ブロック)、例えば上述した図4の例では、機能処理部141乃至143および機能処理部151乃至153のそれぞれを個別に格納している。
The
具体的には例えば、ここでのメインプロセスの処理とは、上述したように、MPEG2 ストリームのうちのビデオの再生処理である。従って、このようなビデオの再生処理を実現するために必要な各タスクのそれぞれに対応するソフトウエアモジュール(機能ブロック)が、AVライブラリ163に個別に格納されている。より具体的には例えば後述する図7に示される、DeMux部181、デコード部183、ノイズ除去部185、画像処理部187、および、出力制御部189のそれぞれが、AVライブラリ163に個別に格納されている。
Specifically, for example, the processing of the main process here is the playback processing of the video in the MPEG2 stream as described above. Accordingly, software modules (functional blocks) corresponding to the respective tasks necessary for realizing such video playback processing are individually stored in the
また例えば、ここでのサブプロセス処理とは、上述したように、MPEG2 ストリームのうちのビデオのレート変換処理である。従って、このようなビデオのレート変換処理を実現するために必要な各タスクのそれぞれに対応するソフトウエアモジュール(機能ブロック)が、AVライブラリ163に個別に格納されている。より具体的には例えば、後述する図7に示される、DeMux部191、デコード部193、サンプリングレートコンバート処理部195、エンコード部197、および、Mux部199のそれぞれが、AVライブラリ163に個別に格納されている。
Further, for example, the sub-process processing here is rate conversion processing of video in the MPEG2 stream as described above. Accordingly, software modules (functional blocks) corresponding to the respective tasks necessary for realizing such video rate conversion processing are individually stored in the
さらに例えば、MPEG2ストリームの転送を制御する後述する図7のストリームマネージャ171、上述した図4の品質判定部144に対応する図7の品質判定部190、および、図4の処理速度制御部154に対応する図7の処理速度制御部200も、AVライブラリ163に個別に格納されている。
Further, for example, a
なお、AVライブラリ163に格納されている各機能ブロック単体の具体的な説明については、図7を参照して後述する。
A specific description of each functional block stored in the
AVシステム制御164は、AVライブラリ163に個別に格納されている各機能ブロックのそれぞれを、例えば、上述した図4または後述する図7に示されるように配置することで、図4または図7に示される構成のAVシステムを構築する。このとき、AVシステム制御164は、必要に応じて、2つの機能ブロックの間にバッファを配置する。このバッファの具体例については、図7を参照して後述する。
The
そして、AVシステム制御164は、後述するアプリケーション165から発行される各種コマンドに基づいて、構築されたAVシステムの動作を制御する。なお、AVシステムの動作の詳細な説明については、図7を参照して後述する。
The
アプリケーション165は、AVシステム制御164等に各種コマンドを発行することで、図4や図7のAVシステムを統括的に制御するアプリケーションソフトウエアである。
The
システムサービス166は、一般的なプロセスの起動、消滅、通信制御、および管理等を実行する。本実施の形態では例えば、システムサービス166は、上述したように、OS161から現在のCPU使用率Xを取得するとともに、パワー制御162により設定されたCPU使用率の上限値Pを取得し、上述した図4の処理速度制御部154や後述する図7の処理速度制御部200に供給する。
The
ドライバ167−1乃至167−mのそれぞれは、サウンドカード、ビデオカード、HDD等の外部デバイス(ハードウエア)と、図6の構成のソフトウエアとの間でやり取りされるデータの転送制御を行う。 Each of the drivers 167-1 to 167-m performs transfer control of data exchanged between an external device (hardware) such as a sound card, a video card, and an HDD and software having the configuration shown in FIG.
例えば、ドライバ167−1は、後述する図7に示されるように、図2の記憶部108に含まれるHDD203(ハードウエア)と、ストリームマネージャ171(ソフトウエア)との間でやり取りされるデータの転送制御を行う。従って、以下、ドライバ167−1を、他のドライバと区別するために、HDDドライバ167−1と称する。
For example, as shown in FIG. 7 to be described later, the driver 167-1 transmits data exchanged between the HDD 203 (hardware) and the stream manager 171 (software) included in the
また例えば、ドライバ167−2は、後述する図7に示されるように、図2の出力部107に含まれるビデオカード201(ハードウエア)と、出力制御部189(ソフトウエア)との間でやり取りされるデータの転送制御を行う。従って、以下、ドライバ167−2を、他のドライバと区別するために、ビデオドライバ167−2と称する。
For example, the driver 167-2 exchanges between the video card 201 (hardware) included in the
次に、図7を参照して、係る図6の構成を有する本発明のソフトウエアにより実現されるAVシステムの構成例について説明する。即ち、図7は、MPEG2 ストリームのうちのビデオの再生処理がメインプロセスの処理とされ、かつ、MPEG2 ストリームのうちのビデオのレート変換処理がサブプロセスの処理とされた場合における、本発明が適用されるAVシステムの構成例を示している。 Next, a configuration example of an AV system realized by the software of the present invention having the configuration of FIG. 6 will be described with reference to FIG. That is, FIG. 7 shows the case where the present invention is applied in the case where the video playback process of the MPEG2 stream is the main process process and the video rate conversion process of the MPEG2 stream is the subprocess process. The example of a structure of the AV system used is shown.
上述したように、図6のAVシステム制御164は、DeMux部181等の図7に示される各種機能ブロックをAVライブラリ163から抽出し、図7に示されるように配置する。このとき、AVシステム制御部164は、メインプロセスとサブプロセスとのそれぞれを構成する機能ブロックのうちの所定の2つの間に、バッファを配置する。すると、図7に示されるような、メインプロセス処理部(再生部)172と、サブプロセス処理部(レート変換記録部)173とのそれぞれが構築される。
As described above, the
詳細には、図7に示されるように、DeMux部181乃至出力制御部189がその順番に配置されて接続されることでメインプロセスが構築され、このメインプロセスに品質判定部190が接続されることで、メインプロセス処理部172が構築される。
Specifically, as shown in FIG. 7, a main process is constructed by arranging and connecting the
即ち、DeMux部181、デコード部183、ノイズ除去部185、画像処理部187、および出力制御部189のそれぞれは、ブロックの個数は一致しないが図4の機能処理部141乃至143に対応する機能ブロックであり、図6のAVライブラリ163から抽出された後その順番で配置される。
That is, the
そして、DeMux部181とデコード部183との間には入力段リングバッファ182(以下、単にバッファ182と称する)が配置されて接続される。デコード部183とノイズ除去部185との間にはワークエリアフレームバッファ184(以下、単にバッファ184と称する)が配置されて接続される。ノイズ除去部185と画像処理部187との間にはワークエリアフレームバッファ186(以下、単にバッファ186と称する)が配置されて接続される。画像処理部187と出力制御部189との間には出力段フレームバッファ188(以下、単にバッファ188と称する)が配置されて接続される。
An input stage ring buffer 182 (hereinafter simply referred to as buffer 182) is disposed and connected between the
即ち、DeMux部181乃至出力制御部189がその順番に並んで接続される。
That is, the
そして、入力段のDeMux部181には、AVライブラリ163から抽出されたストリームマネージャ171が接続され、かつ、出力段の出力制御部189にはビデオドライバ167−2が接続される。
A
これにより、DeMux部181乃至出力制御部189からなるメインプロセスが構築される。
Thereby, a main process including the
さらに、このようにして構築されたメインプロセスの品質レベル(品質保証余裕度)を判定(測定)する品質判定部190が、AVライブラリ163から抽出される。そして、この品質判定部190が、メインプロセスのうちのバッファ188に接続され、かつ、サブプロセス処理部173の処理速度制御部200に接続されることで、メインプロセス処理部172が構築される。
Furthermore, a
このようにして、図4のメインプロセス処理部131に対応する図7のメインプロセス処理部172が構築される。即ち、図7のDeMux部181乃至出力制御部189からなるメインプロセスが、図4の機能処理部141乃至143からなるメインプロセスに対応する。図7の品質判定部190が図4の品質判定部144に対応する。
In this way, the main
また、図7に示されるように、DeMux部191乃至Mux部199がその順番に配置されて接続されることでサブプロセスが構築され、さらに、そのサブプロセスに処理速度制御部200が接続されることで、サブプロセス処理部173が構築される。
Further, as shown in FIG. 7, the
即ち、DeMux部191、デコード部193、サンプリングレートコンバート処理部1955、エンコード部197、およびMux部199のそれぞれは、ブロックの個数は一致しないが図4の機能処理部151乃至153に対応する機能ブロックであり、図6のAVライブラリ163から抽出された後その順番で配置される。
That is, each of the
そして、DeMux部191とデコード部193との間には入力段リングバッファ192(以下、単にバッファ192と称する)が配置されて接続される。デコード部193とサンプリングレートコンバート処理部195との間にはワークエリアフレームバッファ194(以下、単にバッファ194と称する)が配置されて接続される。サンプリングレートコンバート処理部195とエンコード部197との間にはワークエリアフレームバッファ196(以下、単にバッファ196と称する)が配置されて接続される。エンコード部197とMux部199との間には出力段リングバッファ198(以下、単にバッファ198と称する)が配置されて接続される。
An input stage ring buffer 192 (hereinafter simply referred to as a buffer 192) is disposed and connected between the
即ち、DeMux部191乃至Mux部199がその順番に並んで接続される。
That is, the
そして、入力段のDeMux部191と出力段のMux部199とのそれぞれには、ストリームマネージャ171が接続される。
A
これにより、DeMux部191乃至Mux部199からなるサブプロセスが構築される。
Thereby, a sub-process including the
さらに、このようにして構築されたサブプロセスの処理速度を制御する処理速度制御部200が、AVライブラリ163から抽出される。そして、この処理速度制御部200が、サブプロセスのうちのMux部199に接続され、さらに、システムサービス166、ビデオドライバ167−2、および、上述したメインプロセス処理部172の品質判定部190のそれぞれに接続されることで、サブプロセス処理部173が構築される。
Further, the processing
このようにして、図4のサブプロセス処理部132に対応する図7のサブプロセス処理部173が構築される。即ち、図7のDeMux部191乃至Mux部199からなるサブプロセスが、図4の機能処理部151乃至153からなるサブプロセスに対応する。図7の処理速度制御部200が図4の処理速度制御部154に対応する。
In this way, the
さらに、図6のAVシステム制御164はストリームマネージャ171をHDDドライバ167−1を介してHDD203に接続する。同様に、AVシステム制御164は、出力制御部189をビデオドライバ167−2を介してビデオカード201に接続する。
Furthermore, the
また、AVシステム制御164は、処理速度制御部200に対して、図4のCPU使用率検出部134に対応する図6のOS161と、図4のCPU使用率上限値設定部133に対応する図6のパワー制御162のそれぞれを、システムサービス166を介して接続する。
Further, the
このようにして、AVシステム制御164により図7のAVシステムが構築される。 In this way, the AV system shown in FIG.
次に、AVシステム制御164は、このようにして構築された図7のAVシステムの動作を、アプリケーション165からの各種コマンドに基づいて制御する。
Next, the
以下、メインプロセス処理部172とサブプロセス処理部173とのそれぞれの動作を、それらに含まれる各機能ブロックの機能を適宜説明しつつ、その順番に個別に説明していく。
Hereinafter, the operations of the main
最初に、メインプロセス処理部172の動作について説明する。
First, the operation of the main
メインプロセス処理部172においては、最終出力段である出力制御部189のみが、ビデオカード201からのビデオドライバ167−2を介する割り込みVideo frameのタイミングに同期して処理を行い、それ以外のブロックは、後段のバッファの空き具合に応じて処理を行う。
In the main
また、本実施の形態では、最終出力段である出力制御部189のみが3フレーム構成で処理を行い、それ以外は2フレーム構成で処理を行う。このため、最終出力段である出力制御部189の前段のバッファ188は、3フレーム分のデータが記憶可能なように構成されている。これに対して、バッファ184とバッファ186は、2フレーム分のデータが記憶可能なように構成されている。
In the present embodiment, only the
ストリームマネージャ171は、HDD203に蓄積されているMPEG2ストリームデータをHDDドライバ167−1を介して読み出し、メインプロセス処理部172のDeMux部181に供給する。
The
すると、DeMux部181乃至出力制御部189からなるメインプロセスは、次のような処理を実行する。
Then, the main process including the
即ち、DeMux部181は、供給されたMPEG2ストリームデータをフレーム単位で、圧縮符号化ビデオデータと圧縮符号化オーディオデータとのそれぞれに分離し、そのうちの圧縮符号化ビデオデータをバッファ182に記憶させる。
That is, the
デコード部183は、1フレーム分の圧縮符号化ビデオデータをバッファ182から読み出して、MPEG2方式に従った復号処理を施し、その結果得られる1フレーム分のビデオデータをバッファ184に記憶させる。
The
ノイズ除去部185は、1フレーム分のビデオデータをバッファ184から読み出して、ノイズ除去処理を施した後、バッファ186に記憶させる。
The
画像処理部187は、1フレーム分のビデオデータをバッファ186から読み出して、例えば輝度調整や色相調整といった各種画像処理を施した後、バッファ188に記憶させる。
The
出力制御部189は、ビデオカード201からの割り込みVideo Frameのタイミング毎に、1フレーム分のビデオデータをバッファ188から読み出して、その1フレーム分のビデオデータに対応するビデオ信号を、ビデオドライバ167−2とビデオカード201とを介してモニタ202に供給する。
The
すると、モニタ202は、供給された1フレーム分のビデオ信号に対応する映像、即ち、対応するフレームを表示する。 Then, the monitor 202 displays a video corresponding to the supplied video signal for one frame, that is, a corresponding frame.
このように、DeMux部181乃至出力制御部189からなるメインプロセスにおいては、最終出力段である出力制御部189が、割り込みVideo Frameのタイミングに同期する形で、例えば1フレーム分のビデオデータをビデオドライバ167−2に転送する。
As described above, in the main process including the
このため、メインプロセスのリアルタイム性の保証が、モニタ202に表示される映像の品質(映像が途切れることなく適切な画質で表示されること)に重要な影響を及ぼす。また、メインプロセスのリアルタイム性の保証は、出力制御部189の前段のバッファ188に記憶されているデータ量に依存することになる。即ち、必要最低限のデータ量のビデオデータがバッファ188に記憶されていないと、リアルタイム性の保証は困難になる。
For this reason, the guarantee of the real-time property of the main process has an important influence on the quality of the video displayed on the monitor 202 (the video is displayed with an appropriate image quality without interruption). In addition, the real-time guarantee of the main process depends on the amount of data stored in the
そこで、本実施の形態では、上述したように割り込みVideo frameのタイミングで1フレーム分のビデーデータが出力されるので、図7の例では、その割り込みVideo frameタイミング時点でバッファ188に蓄積されているビデオデータのデータ量をフレーム単位で表した値が、品質保証余裕度(品質レベル)として利用される。即ち、図7の例では、Kフレーム分(Kは、バッファ188においては0乃至3のうちの何れかの値)のビデオデータがバッファ188に蓄積されている場合、その値Kが、品質保証余裕度として利用される。以下、図7の例で利用されるこの品質保証余裕度(値K)を、出力バッファレベルLevelと称する。即ち、図7の例では、品質判定部190は、バッファ188の記憶データ量を監視することで、そのバッファレベルLevelを検出して、サブプロセス処理部173の処理速度制御部200に供給する。
Therefore, in the present embodiment, as described above, the video data for one frame is output at the timing of the interrupt video frame. Therefore, in the example of FIG. 7, the video stored in the
この場合、図7の例では、バッファ188の最大記憶容量は3フレーム分のデータ量とされているので、出力バッファレベルLevelは、上述したように0乃至3の値Kを取ることになる。
In this case, in the example of FIG. 7, since the maximum storage capacity of the
このとき、出力バッファレベルLevelの値が1(K=1)であることが、1フレーム分のビデオデータを出力制御部189が出力可能な最低条件、即ち、リアルタイム性が保証される最低条件となる。また、出力バッファレベルLevelの値が0(K=0)であることとは、バッファ188が破綻したこと、即ち、リアルタイム性の保証が不可能になったことを示す。従って、出力バッファレベルLevelの値が0になってしまったときには、1つ前のフレームデータを繰り返し出力するなどの所定のエラー処理の実行が必要となる。
At this time, the value of the output buffer level Level is 1 (K = 1) that the
なお、メインプロセスのバッファ188の最大記憶容量は、3フレーム分に特に限定されることは無く、Qフレーム分(Qは、1以上の任意の整数値)とすることができる。この場合、出力バッファレベルLevelは、0乃至Qの値を取ることになる。
The maximum storage capacity of the
ただし、メインプロセスのバッファ188の最大記憶容量を多く取れば取る程、システム(図2の情報処理装置)全体としては安全になるが、システムディレイ量やメモリ使用量の増加を招くといった弊害もまた発生する。従って、このような弊害を考慮すると、メインプロセスのバッファ188の最大記憶容量は、本実施の形態のように3フレーム分程度が好適である。
However, the larger the maximum storage capacity of the
換言すると、図7の例では例えば、ビデオカード201からの割り込みVide Frameの間隔に対応する時間が単位時間とされて、その単位時間当たりのメインプロセス処理部172のデータ処理量が、品質の1つの種類として利用されている。そして、例えば、この単位時間当たりにメインプロセス処理部172から出力すべき1フレーム分のデータ量(1倍速の場合)が、メインプロセス処理部172のリアルタイム性の保証を確保するために最低限必要な第1のレベルとされている。
In other words, in the example of FIG. 7, for example, the time corresponding to the interval of the interrupt Vide Frame from the
このような状態で、品質判定部190は、バッファ188の記憶データ量を監視し、上述した単位時間毎に、その時点で監視されたバッファの記憶データ量、即ち例えば図7の出力バッファレベルLevelを、上述した種類の品質の第2のレベルとして測定し、処理速度制御部200に供給する。
In such a state, the
これにより、詳細については後述するが、処理速度制御部200は、現在のCPU使用率XとCPU使用率の上限値との間の第1の関係に加えてさらに、上述した第1のレベルと、品質判定部190から供給される第2のレベル(出力バッファレベルLevel)との間の第2の関係に基づいて、サブプロセス処理部173の処理速度を制御することが可能になる。
Thereby, although details will be described later, the processing
以上、メインプロセス処理部172の動作例について説明した。次に、サブプロセス処理部173の動作例について説明する。
The operation example of the main
サブプロセス処理部173においては、最終出力段であるMux部199のみが、所定の時間間隔で処理を行い、それ以外のブロックは、後段のバッファの空き具合に応じて処理を行う。従って、詳細については後述するが、所定のタイミング毎に、Mux部199で利用される時間間隔が処理速度制御部200の制御により更新されていくことで、サブプロセス処理部173全体の処理速度が制御されることになる。
In the
また、本実施の形態では、最終出力段であるMux部199以外は2フレーム構成で処理を行う。このため、バッファ194とバッファ196は、2フレーム分のデータが記憶可能なように構成されている。
In the present embodiment, processing is performed with a two-frame configuration except for the
ストリームマネージャ171は、HDD203に蓄積されているMPEG2ストリームデータをHDDドライバ167−1を介して読み出し、サブプロセス処理部173のDeMux部191に供給する。
The
すると、DeMux部191乃至MUX部199からなるサブプロセスは、次のような処理を実行する。
Then, the sub-process including the
即ち、DeMux部191は、供給されたMPEG2ストリームデータをフレーム単位で、圧縮符号化ビデオデータと圧縮符号化オーディオデータとのそれぞれに分離し、そのうちの圧縮符号化ビデオデータをバッファ192に記憶させる。
That is, the
デコード部193は、1フレーム分の圧縮符号化ビデオデータをバッファ192から読み出して、MPEG2方式に従った復号処理を施し、その結果得られる1フレーム分のビデオデータをバッファ194に記憶させる。
The
サンプリングレートコンバート処理部195は、1フレーム分のビデオデータをバッファ194から読み出して、サンプリングレートコンバート処理を施した後、バッファ196に記憶させる。
The sampling rate
エンコード部197は、1フレーム分の圧縮符号化ビデオデータをバッファ196から読み出して、MPEG2方式に従った圧縮符号化処理を施し、その結果得られる1フレーム分の圧縮符号化ビデオデータをバッファ198に記憶させる。このとき、エンコード部197は、1フレーム分のビデオデータに対して圧縮符号化処理を施す前に、その出力段のバッファ198の空き容量を確認し、その空き容量が規定量に足りなければ一定時間その処理を待機(Wait)する。
The
Mux部199は、HDD203の書き込み処理速度に対応した所定のデータ量の圧縮符号化ビデオデータをバッファ198から読み出し、図示せぬ機能ブロック等から供給される圧縮符号化オーディオデータと多重処理を行った上で、ストリームマネージャ171とHDDドライバ167−1とを介してHDD203へ書き込む。
The
このとき、エンコード部197の処理を、ビデオカード201からの割り込みVideo frameのタイミングに同期させて1フレームずつ処理させた場合には、処理速度は1倍速となる。
At this time, when the processing of the
ただし、本実施の形態では、エンコード部197の処理を、割り込みVideo frameのタイミングとは非同期に行わせ、MUX部199からHDD203への書き込み速度を処理速度制御部200により制御させる。これにより、サブプロセス処理部173の最高処理速度、即ち、HDD203への最高書き込み速度を越えない範囲(図4の処理速度制御範囲に対応)内で、その処理速度は動的に変更される。
However, in this embodiment, the processing of the
即ち、処理速度制御部200は、品質判定部190から供給される出力バッファレベルLevel、システムサービス166から供給される現在のCPU使用率XおよびCPU使用率の上限値P、並びに、処理速度制御範囲(HDD203への最高書き込み速度を越えない範囲)に基づいて、MUX部199からHDD203への書き込み速度を制御する制御量(以下、図7の記述に併せて、制御量Gsと称する)を可変設定し、その制御量GsをMux部199に供給する。この制御量Gsは、ビデオカード201からの割り込みVideo Frameのタイミング毎に、処理速度制御部200により再設定され(更新され)、Mux部199に順次供給される。即ち、Mux部199には、割り込みVideo Frameのタイミング毎に値が順次更新される制御量Gsが入力される。
That is, the processing
そこで、Mux部199は、この割り込みVideo Frameのタイミング毎に値が更新されていく制御量Gsに応じて、自分自身の処理の時間間隔も更新していくことで、HDD203への書き込み速度を変更する。
Therefore, the
以下、処理速度制御部200により設定されて、Mux部199に供給される制御量Gsの詳細について説明していく。
Hereinafter, details of the control amount Gs set by the processing
上述したように、本実施の形態では、CPU使用率の上限値を超えない範囲で現在のCPU使用率Xに基づいてサブプロセスの処理速度を制御するという本発明の第1の手法と、品質保証余裕度(図7の例では、出力バッファレベルLevel)に基づいてサブプロセスの処理速度を制御するという本発明の第2の手法とが組み合わされた本発明の第3の手法により、サブプロセス処理部173の処理速度が制御される。
As described above, in the present embodiment, the first method of the present invention that controls the processing speed of the sub-process based on the current CPU usage rate X within the range not exceeding the upper limit value of the CPU usage rate, and the quality By the third method of the present invention combined with the second method of the present invention of controlling the processing speed of the subprocess based on the guarantee margin (the output buffer level Level in the example of FIG. 7), the subprocess The processing speed of the
従って、制御量Gsとは、結局、本発明の第1の手法に対応する制御量、即ち、現在のCPU使用率Xに応じて値が変化する制御量(以下、CPU使用率制御量Gcと称する)と、本発明の第2の手法に対応する制御量、即ち、出力バッファレベルLevelに応じて値が変化する制御量(以下、出力バッファレベル制御量Gbと称する)とを組み合わせた制御量を指す。なお、以下、制御量Gsを総合制御量Gsと称する。即ち、総合制御量Gsは、例えば次の式(1)により示される。 Therefore, the control amount Gs is a control amount corresponding to the first method of the present invention, that is, a control amount whose value changes according to the current CPU usage rate X (hereinafter referred to as CPU usage rate control amount Gc). And a control amount corresponding to the second method of the present invention, that is, a control amount whose value changes according to the output buffer level Level (hereinafter referred to as an output buffer level control amount Gb). Point to. Hereinafter, the control amount Gs is referred to as a comprehensive control amount Gs. That is, the total control amount Gs is expressed by the following equation (1), for example.
Gs = f(Gb,Gc) ・・・(1) Gs = f (Gb, Gc) (1)
式(1)において、f(Gb,Gc)は、出力バッファレベル制御量GbとCPU使用率制御量Gcとのそれぞれを入力パラメータとする所定の関数を示している。この関数f(Gb,Gc)は、任意の関数で構わないが、本実施の形態では、次の式(2)に示される関数f(Gb,Gc)が利用されるとする。即ち、本実施の形態では、総合制御量Gsは、次の式(2)により示されるとする。 In Expression (1), f (Gb, Gc) represents a predetermined function using the output buffer level control amount Gb and the CPU usage rate control amount Gc as input parameters. The function f (Gb, Gc) may be an arbitrary function, but in the present embodiment, it is assumed that the function f (Gb, Gc) represented by the following equation (2) is used. That is, in the present embodiment, it is assumed that the total control amount Gs is expressed by the following equation (2).
Gs = f(Gb,Gc) = Gb × Gc ・・・(2) Gs = f (Gb, Gc) = Gb × Gc (2)
以下、この総合制御量Gsの演算に必要な出力バッファレベル制御量GbとCPU使用率制御量Gcとのそれぞれについて、その順番に個別に説明していく。 Hereinafter, each of the output buffer level control amount Gb and the CPU usage rate control amount Gc necessary for calculating the total control amount Gs will be described individually in that order.
初めに、出力バッファレベル制御量Gbについて説明する。 First, the output buffer level control amount Gb will be described.
図8は、図7のメインプロセス処理部172のバッファ188における出力バッファレベルLevelの時間推移の例を示している。図8において、縦軸は、出力バッファレベルLevelを示しており、横軸は時間軸を示している。横軸の1マスは、図7のビデオカード201からの割り込みVideo Frameの時間間隔に対応している。
FIG. 8 shows an example of time transition of the output buffer level Level in the
上述したように、例えば本実施の形態では、バッファ188の最大記憶容量は3フレーム分のデータ容量であることから、出力バッファレベルLevelが取り得る範囲は0乃至3の範囲になる。また、出力バッファレベルLevelの値が1であることが、1フレーム分のビデオデータを出力制御部189が出力可能な最低条件、即ち、リアルタイム性を保証するために最低限必要なバッファ188の残量になる。このことが、図8においては、出力バッファレベルLevelの値が1であることを示す白抜き矢印、即ち、「バッファ残量下限値」と記された白抜き矢印により示されている。
As described above, in the present embodiment, for example, the maximum storage capacity of the
図8において、リアルタイム性を保証するという観点に立つと、点線の区間は、メインプロセス処理部172の処理速度が充分間に合っている区間を示し、また、実線の区間は、メインプロセス処理部172の処理速度が間に合っていない区間を示している。
In FIG. 8, from the viewpoint of guaranteeing real-time performance, a dotted line section indicates a section in which the processing speed of the main
図8に示されるように、出力バッファレベルLevelの値がたとえ同じ2となるタイミングであっても、これまでの時間変化の推移の違いにより、メインプロセス処理部172の処理速度が充分間に合っている区間に属するタイミングであると判定されたり、メインプロセス処理部172の処理速度が間に合っていない区間に属するタイミングであると判定されることになる。即ち、出力バッファレベルLevelが減少方向に推移している場合、出力バッファレベルLevelが2となるタイミングは、メインプロセス処理部172の処理速度が間に合っていない区間に属すると判定されることになる。これに対して、出力バッファレベルLevelが増加方向に推移している場合、出力バッファレベルLevelが2となるタイミングは、メインプロセス処理部172の処理速度が充分間に合っている区間に属すると判定されることになる。
As shown in FIG. 8, the processing speed of the main
従って、出力バッファレベル制御量Gbは、出力バッファレベルLevelの現在値だけを用いて単に設定されるのではなく、それに加えてさらに、出力バッファレベルLevelの時間変化のこれまでの推移も用いて設定されると好適である。 Therefore, the output buffer level control amount Gb is not simply set using only the current value of the output buffer level Level. In addition, the output buffer level control amount Gb is also set using the transition of the output buffer level Level over time. Is preferred.
換言すると、出力バッファレベル制御量Gbの設定手法は、出力バッファレベルLevelの現在値と、出力バッファレベルLevelの時間変化のこれまでの経緯とに基づいて設定する設定手法であれば、特に限定されず、様々な設定手法を採用することが可能である。 In other words, the setting method of the output buffer level control amount Gb is not particularly limited as long as it is a setting method that is set based on the current value of the output buffer level Level and the history of the temporal change in the output buffer level Level. It is possible to adopt various setting methods.
具体的には例えば、本実施の形態では、出力バッファレベル制御量Gbの設定手法として次のような手法が採用されているとする。 Specifically, for example, in the present embodiment, it is assumed that the following method is adopted as a method for setting the output buffer level control amount Gb.
即ち、出力バッファ残量レベルLevelの現在値のそれぞれについて、その現在値に至るまでの出力バッファ残量レベルLevelの時間変化の推移(以下、レベル変化と称する)の各パターンのそれぞれに対して、所定のIndex値を予め付与しておく。そして、Index値と出力バッファレベル制御量Gbとの対応関係を示すテーブルを処理速度制御部200に予め保持させておく。この状態で、処理速度制御部200は、ビデオカード201からの割り込みVideo Frameのタイミング毎に品質判定部190から順次供給されてくる出力バッファ残量レベルLevelの値を順次取得し、2以上の取得値から対応するIndex値を決定する。そして、処理速度制御部200は、予め保持されたテーブルを参照して、決定されたIndex値に対応する出力バッファレベル制御量Gbを設定する。本実施の形態では、このような設定手法が、出力バッファレベル制御量Gbの設定手法として採用されているとする。
That is, for each of the current values of the output buffer remaining amount level Level, for each pattern of the time change of the output buffer remaining amount level Level until the current value (hereinafter referred to as level change), A predetermined index value is assigned in advance. Then, a table indicating the correspondence relationship between the Index value and the output buffer level control amount Gb is held in the processing
具体的には例えば、処理速度制御部200は、図9乃至図14に示されるような関係に従って、Index値を決定する。
Specifically, for example, the processing
即ち、図9は、出力バッファ残量レベルLevelの現在値が0の場合における、レベル変化の各パターンのそれぞれとIndex値との関係の例を示している。例えば、図9において、出力バッファ残量レベルLevelの前回の値と現在値とが共に0の場合、即ち、出力バッファ残量レベルLevelの値が0から0に変化した場合(変化がない場合)、Index値は000に設定されることになる。 That is, FIG. 9 shows an example of the relationship between each level change pattern and the Index value when the current value of the output buffer remaining amount level Level is zero. For example, in FIG. 9, when both the previous value and the current value of the output buffer remaining amount level Level are 0, that is, when the value of the output buffer remaining amount level Level changes from 0 to 0 (when there is no change). , The Index value is set to 000.
同様に、図10乃至図12のそれぞれは、出力バッファ残量レベルLevelの現在値が1の場合における、レベル変化の各パターンのそれぞれとIndex値との関係の例を示している。なお、図11と図12に示される、N_slpは、出力バッファ残量レベルLevelの値が2に変化してから1に変化するまでの回数を示している。以下、この値N_slpを、レベル2継続回数N_slpと称する。このレベル2継続回数N_slpの大きさによってレベル変化の変動速度が判別可能になる。即ち、図11と図12には、レベル2継続回数N_slpの値が1,2,8のそれぞれに対応するIndex値しか示されていないが、実際には、レベル2継続回数N_slpが取り得る各値のそれぞれに対して一意のIndex値が対応付けられている。
Similarly, each of FIGS. 10 to 12 shows an example of the relationship between each level change pattern and the Index value when the current value of the output buffer remaining amount level Level is 1. 11 and 12, N_slp indicates the number of times from when the value of the output buffer remaining amount level Level changes to 2 until it changes to 1. Hereinafter, this value N_slp is referred to as
また、図13は、出力バッファ残量レベルLevelの現在値が2の場合における、レベル変化の各パターンのそれぞれとIndex値との関係の例を示している。図14は、出力バッファ残量レベルLevelの現在値が3の場合における、レベル変化の各パターンのそれぞれとIndex値との関係の例を示している。 FIG. 13 shows an example of the relationship between each level change pattern and the Index value when the current value of the output buffer remaining amount level Level is 2. FIG. 14 shows an example of the relationship between each pattern of level change and the Index value when the current value of the output buffer remaining amount level Level is 3.
なお、ここでは理解を容易なものとするために、Index値は、図9乃至図14のような図面に基づいて決定されるとしたが、実際には、例えば後述する図23の「Index値およびUp制御ホールドフラグ生成処理」が実行されて決定される。 Here, in order to facilitate understanding, the Index value is determined based on drawings such as FIG. 9 to FIG. 14, but in actuality, for example, “Index value of FIG. And “Up control hold flag generation process” are executed and determined.
図7の処理速度制御部200は、このようにしてIndex値を決定すると、例えば後述する図19のテーブルを参照して、そのIndex値に対応する出力バッファレベル制御量Gbを設定する。
When the index value is determined in this way, the processing
以上、出力バッファレベル制御量Gbについて説明した。次に、CPU使用率制御量Gcについて説明する。 The output buffer level control amount Gb has been described above. Next, the CPU usage rate control amount Gc will be described.
上述したように、CPU使用率制御量Gcは、現在のCPU使用率Xにより決定される。そこで、初めに、現在のCPU使用率Xについて再度(ただしより詳しく)説明する。 As described above, the CPU usage rate control amount Gc is determined by the current CPU usage rate X. First, the current CPU usage rate X will be explained again (but in more detail).
上述したように、図7のメインプロセス処理部172とサブプロセス処理部173とのそれぞれを構成する各機能ブロックのそれぞれの処理は、各プロセッサ(図3のMCPU121およびSCPU123−1乃至SCPU123−n)のうちの何れかにより実行される。
As described above, the processing of each functional block constituting each of the main
即ち、メインプロセスおよびサブプロセス内の各タスク(対応する機能ブロックの処理)のプロセッサへの割り当てのスケジューリングは、タスクの起動時に設定された優先度と、そのタスクが起動してからの経過時間の長さとを考慮し、空いているプロセッサに対して、各プロセッサへの割り当て量がなるべく均一になるように、図6のOS161により実行される。
In other words, the scheduling of the assignment of each task (processing of the corresponding functional block) in the main process and sub-process to the processor is based on the priority set at the time of starting the task and the elapsed time since the task was started. Considering the length, it is executed by the
具体的には例えば、図3のCPU101がMCPU121と4個のSCPU123−1乃至123−4とで構成されている場合には、図15に示されるようにスケジューリングされることになる。即ち、図15においては、各プロセッサ(MCPU121と4個のSCPU123−1乃至123−4)のそれぞれに対する、図7のAVシステムの各タスクの割り当てのスケジューリングの例が上から順番にそれぞれ示されている。なお、図15の各プロセッサのスケジューリング例において、白色の範囲は、メインプロセス処理部172のタスク、即ち、DeMux部181乃至出力制御部189のうちの所定の1つの処理を示している。これに対して、灰色の範囲は、サブプロセス処理部173のタスク、即ち、DeMux部191乃至Mux部199のうちの所定の1つの処理を示している。
Specifically, for example, when the
図15に示されるように、この例では、メインプロセス処理部172とサブプロセス処理部173とのうちの、デコード部183,193や画像処理部187といったCPU負荷の重い機能ブロックの処理(タスク)は全て、SCPU123−1乃至123−4で行われ、その他の負荷の軽いシステム制御系の機能ブロック、例えば、DeMux部181,191およびMux部199といった機能ブロックの処理(タスク)は、MCPU121で行われるように、スケジューリングされている。
As shown in FIG. 15, in this example, processing (tasks) of a function block with a heavy CPU load such as the
このような図15の例のようにスケジューリングされた場合には、サブプロセス処理部173の処理速度が上昇すると、SCPU123−1乃至123−4側の負荷による制約が支配的になり、MCPU121の負荷はシステム全体(図2の構成の情報処理装置全体)から見て支配的ではなくなる。
In the case of such scheduling as in the example of FIG. 15, when the processing speed of the
従って、本実施の形態においては、現在のCPU使用率Xとして、MCPU121のCPU使用率は採用せず、SCPU123−1乃至123−4のそれぞれのCPU使用率のみを採用するとする。ただし、現在のCPU使用率Xとして、MCPU121のCPU使用率を含める場合或いはそれ単体で使用する場合についても、基本的な考え方は以下の説明と同様である。
Therefore, in the present embodiment, as the current CPU usage rate X, the CPU usage rate of the
SCPU123−1乃至123−4のそれぞれの現在のCPU使用率(以下、最終的に使用される現在のCPU使用率Xと区別するために、CPU使用率X1乃至X4のそれぞれと称する)は、対応するプロセッサがタスクを処理している占有サイクル数と、動作周波数とに基づいて、図6のOS161によって計算される。そして、上述したように、現在の各CPU使用率X1乃至X4のそれぞれは、図6と図7のシステムサービス166がOS161に問い合わることで、OS161からシステムサービス166を介して処理速度制御部200に通知される。なお、システムサービス166を介さずに、OS161から処理速度制御部200に直接CPU使用率X1乃至X4が通知されることもあるし、或いは、OS161から他の機能ブロックを介して処理速度制御部200にCPU使用率X1乃至X4が通知されることもある。
The current CPU usage rate of each of the SCPUs 123-1 to 123-4 (hereinafter referred to as the CPU usage rates X1 to X4 in order to be distinguished from the current CPU usage rate X finally used) 6 is calculated by the
何れにしても、CPU使用率X1乃至X4が処理速度制御部200に通知されると、例えば本実施の形態では、処理速度制御部200は、次の式(3)の演算を行うことで、現在のCPU使用率Xを求める。即ち、本実施の形態では、現在のCPU使用率Xとは、SCPU123−1乃至123−4のそれぞれの現在のCPU使用率X1乃至X4の平均値である。
In any case, when the CPU usage rates X1 to X4 are notified to the processing
X = (X1 + X2 + X3 +X4)/4 ・・・(3) X = (X1 + X2 + X3 + X4) / 4 (3)
具体的には例えばいま、SCPU123−1乃至123−4のそれぞれの現在のCPU使用率X1乃至X4のそれぞれが、図16に示されるように、75%、15%、40%、および60%のそれぞれであるとする。即ち、図16は、各プロセッサの現在のCPU使用率の例と、図6と図7のパワー制御162によるCPU使用率の上限値の設定例とを示している。 Specifically, for example, the current CPU usage rates X1 to X4 of the SCPUs 123-1 to 123-4 are 75%, 15%, 40%, and 60% as shown in FIG. Suppose that each is. That is, FIG. 16 shows an example of the current CPU usage rate of each processor and an example of setting the upper limit value of the CPU usage rate by the power control 162 of FIGS. 6 and 7.
この場合、現在のCPU使用率Xは、次の式(4)に示されるように0.65になる。 In this case, the current CPU usage rate X is 0.65 as shown in the following equation (4).
X = (0.75+0.15+0.4+0.6)/4 = 0.65 ・・・(4) X = (0.75 + 0.15 + 0.4 + 0.6) / 4 = 0.65 (4)
以上、現在のCPU使用率Xについて説明した。次に、現在のCPU使用率Xに基づいて決定されるCPU使用率制御量Gcについて説明する。 This completes the description of the current CPU usage rate X. Next, the CPU usage rate control amount Gc determined based on the current CPU usage rate X will be described.
例えば、現在のCPU使用率X(0<= X <= 1)を入力パラメータとする速度制御量評価関数Y(X)を次の式(5)乃至式(7)のように定義するとする。 For example, it is assumed that the speed control amount evaluation function Y (X) using the current CPU usage rate X (0 <= X <= 1) as an input parameter is defined as the following equations (5) to (7).
Y(X)= K/P×X − K ・・・(5)
ただし、Up制御ホールドフラグが1、かつ Y(X) < 0 のときには、Y(X)=0 ・・・(6)
また、0<= Y(X) < q のときには、Y(X) = q ・・・(7)
Y (X) = K / P × X − K (5)
However, when the Up control hold flag is 1 and Y (X) <0, Y (X) = 0 (6)
When 0 <= Y (X) <q, Y (X) = q (7)
式(5)において、Kは、システム(図2の情報処理装置)として決定される定数を示している。Pは、上述したようにCPU使用率の上限値を示しており、例えば本実施の形態では、SCPU123−1乃至123−4とも同一の値が設定されているとする。具体的には例えば、図16の例では、SCPU使用率の上限目標値(SCPU_Limit)である80%に対応する0.8が、式(5)のPに代入されることになる。 In Expression (5), K represents a constant determined as the system (information processing apparatus in FIG. 2). As described above, P indicates the upper limit value of the CPU usage rate. For example, in the present embodiment, it is assumed that the same value is set for each of the SCPUs 123-1 to 123-4. Specifically, for example, in the example of FIG. 16, 0.8 corresponding to 80%, which is the upper limit target value (SCPU_Limit) of the SCPU usage rate, is substituted into P in Expression (5).
また、Up制御ホールドフラグとは、サブプロセスの処理速度を上げる方向(以下、Up方向と称する)の速度制御を禁止させるフラグである。即ち、Up制御ホールドフラグが立っている場合(1の場合)、サブプロセスのUp方向の速度制御は禁止される。これに対して、Up制御ホールドフラグが0の場合、サブプロセスのUp方向の速度制御が許可される。 The Up control hold flag is a flag that prohibits speed control in the direction of increasing the processing speed of the sub-process (hereinafter referred to as Up direction). That is, when the Up control hold flag is set (in the case of 1), the speed control in the Up direction of the sub-process is prohibited. On the other hand, when the Up control hold flag is 0, speed control in the Up direction of the subprocess is permitted.
また、式(7)における、qは、サブプロセスの処理速度を下げる方向(以下、Down方向と称する)の速度制御を行う場合に、速度の下げ量を増やすための重み値を示している。即ち、詳細については後述するが、速度制御量評価関数Y(X)の出力値が0になった場合とは、現在のCPU使用率XがCPU使用率の上限値Pに到達してしまったことを意味している。この場合、可能な限り素早くサブプロセスの処理速度を下げて、現在のCPU使用率Xを下げる必要がある。そこで、本実施の形態では、現在のCPU使用率XがCPU使用率の上限値P以上になった場合には、サブプロセスのDown方向の速度制御が行われる。このようなサブプロセスのDown方向の速度制御が行われる場合に、その速度の下げ量を増やすための重み値として、本実施の形態では値qが利用されるのである。 In Expression (7), q represents a weight value for increasing the speed reduction amount when performing speed control in the direction of lowering the processing speed of the sub-process (hereinafter referred to as the Down direction). That is, although details will be described later, when the output value of the speed control amount evaluation function Y (X) becomes 0, the current CPU usage rate X has reached the upper limit value P of the CPU usage rate. It means that. In this case, it is necessary to reduce the current CPU usage X by reducing the processing speed of the subprocess as quickly as possible. Therefore, in the present embodiment, when the current CPU usage rate X becomes equal to or higher than the upper limit value P of the CPU usage rate, the speed control in the down direction of the sub-process is performed. When such sub-process speed control in the down direction is performed, the value q is used as a weight value for increasing the speed reduction amount in the present embodiment.
図7の処理速度制御部200は、このような速度制御量評価関数Y(X)の出力値を演算し、その出力値を用いて、CPU使用率制御量Gcを設定することができる。
The processing
換言すると、CPU使用率制御量Gcの設定手法は、現在のCPU使用率XとCPU使用率の上限値Pとに基づいて設定する設定手法であれば、特に限定されず、様々な設定手法を採用することが可能であり、そのような様々な設定手法のうちの一例が、速度制御量評価関数Y(X)を用いる設定手法であると言える。 In other words, the setting method of the CPU usage rate control amount Gc is not particularly limited as long as it is a setting method that is set based on the current CPU usage rate X and the upper limit value P of the CPU usage rate. It can be adopted, and it can be said that an example of such various setting methods is a setting method using the speed control amount evaluation function Y (X).
さらに、速度制御量評価関数Y(X)を用いるCPU使用率制御量Gcの設定手法も、速度制御量評価関数Y(X)さえ用いれば任意の手法で構わない。ただし、本実施の形態では例えば、速度制御量評価関数Y(X)の出力値をそのままCPU使用率制御量Gcとして設定する手法が採用されているとする。 Furthermore, the CPU usage rate control amount Gc setting method using the speed control amount evaluation function Y (X) may be any method as long as the speed control amount evaluation function Y (X) is used. However, in this embodiment, for example, it is assumed that a method of setting the output value of the speed control amount evaluation function Y (X) as it is as the CPU usage rate control amount Gc is adopted.
なお、図17には、速度制御量評価関数Y(X)の形、即ち、CPU使用率制御量Gcの形(グラフ)が示されている。また、図18には、現在のCPU使用率Xに応じて可変する速度制御量評価関数Y(X)の出力値、即ち、CPU使用率制御量Gcの値の時間変化の推移例が示されている。即ち、図18において、上側の図は、現在のCPU使用率Xの時間変化の推移例を示しており、下側の図は、上側の図に対応する、速度制御量評価関数Y(X)の出力値、即ち、CPU使用率制御量Gcの時間変化の推移例を示している。このため、図18の上側の図の縦軸は現在のCPU使用率Xを示し、図18の下側の縦軸は速度制御量評価関数Y(X)、即ち、CPU使用率制御量Gcを示し、かつ、図18の両図とも、その横軸は同一の時間軸を示している。 FIG. 17 shows the form of the speed control amount evaluation function Y (X), that is, the form (graph) of the CPU usage rate control amount Gc. Further, FIG. 18 shows an example of transition of the time change of the output value of the speed control amount evaluation function Y (X) that changes according to the current CPU usage rate X, that is, the value of the CPU usage rate control amount Gc. ing. That is, in FIG. 18, the upper diagram shows a transition example of the current CPU usage rate X over time, and the lower diagram shows the speed control amount evaluation function Y (X) corresponding to the upper diagram. , That is, a transition example of the time change of the CPU usage rate control amount Gc is shown. Therefore, the vertical axis in the upper diagram of FIG. 18 indicates the current CPU usage rate X, and the lower vertical axis in FIG. 18 indicates the speed control amount evaluation function Y (X), that is, the CPU usage rate control amount Gc. In both figures of FIG. 18, the horizontal axis indicates the same time axis.
図18に示されるように、現在のCPU使用率XがCPU使用率の上限値Pに到達するまでは、CPU使用率制御量Gcは負の値を取る。従って、CPU使用率制御量Gcが負の値である場合とは、現在のCPU使用率Xにまだ余裕があることを示しており、その余裕の度合がCPU使用率制御量Gcの絶対値で示されることになる。そこで、本実施の形態では、CPU使用率制御量Gcが負の値である場合、サブプロセス処理のUp方向の速度制御が行われる。このとき、速度の上げ量は、CPU使用率制御量Gcの絶対値に応じて設定される。 As shown in FIG. 18, the CPU usage rate control amount Gc takes a negative value until the current CPU usage rate X reaches the upper limit value P of the CPU usage rate. Therefore, the case where the CPU usage rate control amount Gc is a negative value indicates that the current CPU usage rate X still has a margin, and the degree of the margin is the absolute value of the CPU usage rate control amount Gc. Will be shown. Therefore, in the present embodiment, when the CPU usage rate control amount Gc is a negative value, the speed control in the Up direction of the sub-process process is performed. At this time, the speed increase amount is set according to the absolute value of the CPU usage rate control amount Gc.
これに対して、上述したように、CPU使用率制御量Gcが0以上の場合とは、現在のCPU使用率XがCPU使用率の上限値P以上になったことを示しており、可能な限り素早くサブプロセスの処理速度を下げで、現在のCPU使用率Xを下げる必要がある。そこで、本実施の形態では、CPU使用率制御量Gcが0または正値である場合、サブプロセス処理のDown方向の速度制御が行われる。このとき、速度の下げ量は、CPU使用率制御量Gcの絶対値に応じて設定される。このCPU使用率制御量Gcの絶対値を増やすために、即ち、速度の下げ量を増やすために、上述した重み値qが利用されるのである。 On the other hand, as described above, the case where the CPU usage rate control amount Gc is equal to or greater than 0 indicates that the current CPU usage rate X is equal to or greater than the upper limit value P of the CPU usage rate. It is necessary to reduce the current CPU usage X by reducing the processing speed of the subprocess as quickly as possible. Therefore, in this embodiment, when the CPU usage rate control amount Gc is 0 or a positive value, the speed control in the down direction of the sub-process process is performed. At this time, the speed reduction amount is set according to the absolute value of the CPU usage rate control amount Gc. In order to increase the absolute value of the CPU usage rate control amount Gc, that is, to increase the speed reduction amount, the weight value q described above is used.
ところで、現在のCPU使用率Xは、一定時間の平均値により求められる。従って、上述したように、このような現在のCPU使用率Xを単に用いる第1の手法を利用してサブプロセスの処理速度制御が行われた場合、即ち、CPU使用率制御量Gcを単に用いてサブプロセスの処理速度制御が行われた場合、実時間としての応答速度は悪くなり、メインプロセスの所定の品質のレベルが瞬間的に悪くなったとしても、即ち、例えば本実施の形態では出力バッファレベルLevelが0になったとしても、その瞬間ではそのことを判別して、制御に反映させることができないという課題が発生してしまう。 By the way, the current CPU usage rate X is obtained by an average value over a certain period of time. Therefore, as described above, when the processing speed control of the sub-process is performed using the first method that simply uses the current CPU usage rate X, that is, the CPU usage rate control amount Gc is simply used. When the processing speed control of the sub-process is performed, the response speed as the real time is deteriorated, and even if the predetermined quality level of the main process is instantaneously deteriorated, that is, for example, in the present embodiment, output is performed. Even if the buffer level Level becomes 0, there is a problem in that it cannot be determined at that moment and reflected in the control.
そこで、この課題を解決するために、本実施の形態では上述したように、現在のCPU使用率Xの他にさらに、メインプロセスの品質保証余裕度(品質レベル)、即ち、例えば本実施の形態では出力バッファレベルLevelを用いて、サブプロセスの処理速度制御が行われるのである。 Therefore, in order to solve this problem, as described above in this embodiment, in addition to the current CPU usage rate X, the quality assurance margin (quality level) of the main process, that is, for example, this embodiment Then, the processing speed control of the sub-process is performed using the output buffer level Level.
即ち、本実施の形態では、以上説明したようにして、出力バッファレベル制御量GbとCPU使用率制御量Gcとのそれぞれが設定されると、出力バッファレベル制御量GbとCPU使用率制御量Gcとのそれぞれが上述した式(2)に代入されて、総合制御量Gsが求められる。即ち、出力バッファレベル制御量GbとCPU使用率制御量Gcとの積が、総合制御量Gsとして設定される。そして、この総合制御量Gsに基づいてサブプロセスの処理速度制御が行われるのである。 That is, in the present embodiment, as described above, when the output buffer level control amount Gb and the CPU usage rate control amount Gc are set, the output buffer level control amount Gb and the CPU usage rate control amount Gc are set. Are substituted into the above-described equation (2) to obtain the total control amount Gs. That is, the product of the output buffer level control amount Gb and the CPU usage rate control amount Gc is set as the total control amount Gs. Then, the processing speed control of the sub-process is performed based on the total control amount Gs.
なお、実際には、例えば図19に示されるようなテーブルが図7の処理速度制御部200に予め保持されており、処理速度制御部200は、このテーブルを参照して、出力バッファレベル制御量GbとCPU使用率制御量Gcとのそれぞれを設定する。
In practice, for example, a table as shown in FIG. 19 is held in advance in the processing
なお、図19のテーブルにおいて、出力バッファレベル制御量の項目に示されている△は、図7のHDD203の性能や各種ライブラリの処理能力に応じて、システム(図2の情報処理装置)として決定される固定値である。
In the table of FIG. 19, Δ shown in the item of output buffer level control amount is determined as the system (information processing apparatus of FIG. 2) according to the performance of the
また、図19のテーブルにおいては、出力バッファレベルLevelの現在値が0または1の場合、現在のCPU使用率Xに依存せずに、出力バッファレベルLevelに基づいてサブプロセスのDown方向の速度制御が行われる。このため、出力バッファレベルLevelの現在値が0または1の場合、CPU使用率制御量Gcは強制的に1に設定される。 Further, in the table of FIG. 19, when the current value of the output buffer level Level is 0 or 1, the sub process speed control in the down direction is performed based on the output buffer level Level without depending on the current CPU usage rate X. Is done. For this reason, when the current value of the output buffer level Level is 0 or 1, the CPU usage rate control amount Gc is forcibly set to 1.
これに対して、図19のテーブルにおいては、出力バッファレベルLevelの現在値が2または3の場合、出力バッファレベルLevelに依存せずに、現在のCPU使用率Xに基づいてサブプロセスのUp方向またはDown方向の速度制御が行われる。このため、出力バッファレベルLevelの現在値が0または1の場合、出力バッファレベル制御量Gcは強制的に1に設定される。 On the other hand, in the table of FIG. 19, when the current value of the output buffer level Level is 2 or 3, the up direction of the subprocess based on the current CPU usage rate X without depending on the output buffer level Level. Or speed control in the down direction is performed. Therefore, when the current value of the output buffer level Level is 0 or 1, the output buffer level control amount Gc is forcibly set to 1.
このように、設計者等は、このようなテーブルを予め作成して処理速度制御部200に保持させておくことで、所定のパターンでは特例を設ける等、総合制御量Gsの細かい設定を行うことが可能になる。即ち、処理速度制御部200に保持されるテーブルは、当然ながら図19の例に限定されず、設計者等が自在に作成できる任意のテーブルで構わない。
In this way, designers and the like make fine settings of the total control amount Gs, such as providing a special case in a predetermined pattern by creating such a table in advance and holding it in the processing
以上、図7の処理速度制御部200により設定されて、Mux部199に供給される総合制御量Gsの詳細について説明した。
The details of the total control amount Gs set by the processing
次に、この総合制御量Gsを用いるサブプロセスの速度制御手法の例について説明する。 Next, an example of a sub-process speed control method using the total control amount Gs will be described.
上述したように、図7のサブプロセス処理部173のうちの、デコード部193、サンプリングレートコンバート処理部195、および、エンコード部197といった機能ブロックは、次の第1の条件と第2の条件とが満たされた場合、他の機能ブロックとは独立して処理を開始する。第1の条件とは、所定の単位量の処理に必要なデータ、例えば本実施の形態では、処理すべき1フレーム分のデータ(入力データ)が前段のバッファに格納されているという条件である。第2の条件とは、処理後のそのデータ(出力データ)を記憶させるための空き領域が所定の容量以上後段のバッファに確保されているという条件である。このため、DeMux部191乃至エンコード部197においては、ビデオカード201からの割り込みVideo Frameのタイミングとは非同期に、N倍速(Nは、1以上の任意の整数値)で処理がおこなわれる。なお、1倍速とは、ビデオカード201からの割り込みVideo Frameの間隔に1フレーム分の処理が行われる速度を指す。
As described above, the functional blocks such as the
ただし、最終段のMux部199では、上述した第1の条件に加えてさらに、前回のHDD203への書き込み処理の開始時点から、HDD203への書き込み間隔が経過したという第3の条件が満たされると、今回のHDD203への書き込み処理を開始する。この第3の条件に含まれるHDD203への書き込み間隔は、処理速度制御部200から供給される総合制御量Gsに応じて逐次更新される。このため、HDD203への書き込み間隔が逐次更新されていくことで、最集段のMux部199の処理間隔が制御され、その結果として、サブプロセス処理部173全体の処理速度が制御されることになる。
However, in the
即ち、最終段のMux部199は、所定のタイミング毎に処理速度制御部200から供給されてくる総合制御量Gsの更新値に基づいて、HDD203への書き込み間隔を再設定(更新)する。これにより、HDD203への書き込み間隔が逐次更新され、その結果として、サブプロセス処理部173の処理速度が制御される。
That is, the
以上の手法が、総合制御量Gsを用いるサブプロセスの速度制御手法の一例である。 The above method is an example of a sub-process speed control method using the total control amount Gs.
なお、HDD203への書き込み間隔の設定手法は、総合制御量Gsを用いる手法であれば特に限定されず、様々な手法を適用することができる。ただし、本実施の形態では、HDD203への書き込み間隔の設定手法として、例えば次のような手法が採用されているとする。
Note that the method for setting the writing interval to the
即ち、総合制御量Gsは、ビデオカード201の割り込みVideo Frameのタイミングと略同一のタイミングで、処理速度制御部200からMux部199に供給されてくる。そこで、Mux部199は、総合制御量Gsが供給される毎に、即ち、ビデオカード201の割り込みVideo Frameのタイミングと略同一のタイミングで、HDD203への書き込み間隔の設定を更新していく、という手法が本実施の形態では採用されている。
That is, the total control amount Gs is supplied from the processing
詳細には、ビデオカード201の割り込みVideo Frameのt回目のタイミングと略同一のタイミングを時刻tと記述し、かつ、その時刻tにおけるHDD203への書き込み間隔をt_period[t](秒)と記述すると、Mux部199は、次のようにして書き込み間隔t_period[t]の設定を更新していく。
More specifically, if the timing substantially the same as the t-th timing of the interrupt Video Frame of the
即ち、Mux部199は、t=0における書き込み間隔t_period[0]の設定、即ち、初期設定として、次の式(8)を演算する。
That is, the
t_period[0] = t_target ・・・(8) t_period [0] = t_target (8)
式(8)において、t_targetは、初期書き込み間隔を示している。具体には例えば、初期書き込み間隔t_targetは、次の式(9)により示される。 In Expression (8), t_target represents an initial write interval. Specifically, for example, the initial write interval t_target is expressed by the following equation (9).
t_target = W_BK/Rate_Application_Normal ・・・(9) t_target = W_BK / Rate_Application_Normal (9)
式(9)において、W_BKは、HDD203に対して1回に書き込むデータ(ブロック)の単位(Byte)を示しており、システム(図2の情報処理装置)として設定される値であって、通常は固定値である。以下、W_BKを、HDD書き込みデータ量W_BKと称する。
In Expression (9), W_BK represents a unit (Byte) of data (block) to be written to the
また、式(9)において、Rate_Application_Normalは、サブプロセス処理部173の処理速度、即ち、単位時間(1秒間)あたりのデータ処理量の初期値(bps)を示しており、システム(図2の情報処理装置)として設定される値であって、通常は固定値である。
In Expression (9), Rate_Application_Normal indicates the processing speed of the
このようにして書き込み間隔t_period[0]の初期設定がなされた場合、それ以降、総合制御量Gsが供給される毎に、Mux部199は、次の式(10)と式(11)とをその順番で順次演算していくことで、書き込み間隔t_period[t]の設定を更新していく。即ち、Mux部199は、初めに式(10)を演算し、次に、その演算結果である式(10)の左辺の値t_period[t]を、式(11)の右辺に代入して式(11)を演算し、その演算結果である式(11)の左辺の値t_period[t]を、最終的な書き込み間隔として設定する。
When the write interval t_period [0] is initially set in this way, the
t_period[t] = Max (t_period[t-1] + Gs, tmin) ・・・(10)
t_period[t] = Min (t_period[t], tmax) ・・・(11)
t_period [t] = Max (t_period [t-1] + Gs, tmin) (10)
t_period [t] = Min (t_period [t], tmax) (11)
式(10)において、t_period[t-1]は、更新前の書き込み間隔、即ち、ビデオカード201の割り込みVideo Frameのt-1回目のタイミング(前回の割り込みVideo Frameのタイミング)と略同一の時刻t-1に設定された書き込み間隔を示している。t_minは、書き込み間隔の最小値を示しており、HDD203自体の書き込み最大レートを越えない範囲で予め設定される固定値である。また、Max (t_period[t-1] + Gs, tmin)は、t_period[t-1] + Gsとtminとのうちの最大値を出力する関数である。
In Expression (10), t_period [t−1] is substantially the same time as the writing interval before update, that is, the timing of the interrupt video frame t−1 of the video card 201 (timing of the previous interrupt video frame). The write interval set to t-1 is shown. t_min indicates the minimum value of the writing interval, and is a fixed value set in advance within a range not exceeding the maximum writing rate of the
式(11)において、t_maxは、書き込み間隔の最大値を示しており、予め設定される固定値である。なお、書き込み間隔t_period[t]がその最大値t_max 以上になったときには、サブプロセス処理部173全体の処理が一時停止する。また、Min (t_period[t], tmax)は、t_period[t]とtmaxとのうちの最小値を出力する関数である。
In Expression (11), t_max represents the maximum value of the write interval, and is a fixed value set in advance. Note that when the writing interval t_period [t] becomes equal to or greater than the maximum value t_max, processing of the entire
即ち、Mux部199は、初めに、更新前の書き込み間隔t_period[t-1]に総合制御量Gsの値を加算した値を、とりあえずの書き込み間隔t_period[t]として設定する。次に、Mux部199は、とりあえずの書き込み間隔t_period[t]とその最小値Minとを比較し、とりあえずの書き込み間隔t_period[t]がその最小値t_minより小さい場合、とりあえずの書き込み間隔t_period[t]を最小値t_minに変更する。ここまでの一連の処理が、式(10)の演算処理である。
That is, the
次に、Mux部199は、とりあえずの書き込み間隔t_period[t]とその最大値t_maxとを比較し、とりあえずの書き込み間隔t_period[t]がその最大値t_maxより小さい場合、とりあえずの書き込み間隔t_period[t]を最終的な(正式な)書き込み間隔t_period[t]として設定する。これに対して、とりあえずの書き込み間隔t_period[t]がその最大値t_max以上の場合、最大値t_maxを最終的な書き込み間隔t_period[t]として設定する。
Next, the
このようにして、書き込み間隔t_period[t]は、t_min <= t_period <= t_maxの範囲で可変設定される。即ち、t_min < t_period < t_maxの範囲内においては、書き込み間隔t_period[t]は、更新前の書き込み間隔t_period[t-1]に総合制御量Gsの値が加算された値に更新されていく。そして、書き込み間隔t_period[t]が延長方向に更新されていき、その最大値t_max以上になると、書き込み間隔t_period[t]はその最大値t_maxにホールドされる。逆に、書き込み間隔t_period[t]が短縮方向に更新されていき、その最小値t_max以下になると、書き込み間隔t_period[t]はその最小値t_minにホールドされる。 In this way, the write interval t_period [t] is variably set within the range of t_min ≦ t_period ≦ t_max. That is, within the range of t_min <t_period <t_max, the write interval t_period [t] is updated to a value obtained by adding the value of the total control amount Gs to the write interval t_period [t−1] before update. Then, when the write interval t_period [t] is updated in the extending direction and becomes equal to or greater than the maximum value t_max, the write interval t_period [t] is held at the maximum value t_max. Conversely, when the write interval t_period [t] is updated in the shortening direction and becomes equal to or less than the minimum value t_max, the write interval t_period [t] is held at the minimum value t_min.
以上のようなHDD203への書き込み間隔の設定手法が、本実施の形態で採用されている手法である。
The method for setting the writing interval to the
Mux部199は、このような手法を利用して書き込み間隔t_period[t]を設定すると、図20に示されるように、前回の書き込み(Write)からの時間経過が、その書き込み間隔t_period[t]を超えたタイミングで、HDD書き込みデータ量W_BKのデータをその前段のバッファ198から読み出して、ストリームマネージャ171とHDDドライバ167−1とを介してHDD203に書き込む(Writeする)。
When the
この書き込み間隔t_period[t]は、上述したように、また、図20に示されるように、総合制御量Gsの値によって動的に変化する。詳細には、総合制御量 Gsとして負の値が設定されている場合には、書き込み間隔t_period[t]は短くなる。即ち、サブプロセス処理部173の処理速度は加速される。これに対して、総合制御量Gsとして正の値が設定されている場合には、書き込み間隔t_period[t]は長くなる。即ち、サブプロセス処理部173の処理速度は減速される。
As described above and as shown in FIG. 20, the writing interval t_period [t] dynamically changes depending on the value of the total control amount Gs. Specifically, when a negative value is set as the total control amount Gs, the write interval t_period [t] is shortened. That is, the processing speed of the
ただし、MUX部199は、HDD書き込みデータ量W_BK以上のデータがその前段のバッファ198にストアされていなかった場合、または、その後段のストリームマネージャ171にデータを書き込めなかった場合は、バッファ198からのデータの読み出しを中止する。即ち、サブプロセス処理部173全体の処理が一時停止する。
However, the
なお、このような場合であって、さらに、t_period[t-1] < t_period[t] であった場合には、例えば本実施の形態では、Mux部199は、書き込み間隔t_period[t] の設定値を、更新前の書き込み間隔t_period[t-1] に置き換える。
In such a case, and when t_period [t-1] <t_period [t], for example, in this embodiment, the
また、例えば本実施の形態では、サブプロセス処理部173全体の処理が一時停止してから再開するまでの回数(フレーム数)として、N_suspendという値(以下、再開設定回数と称する)が予め設定されている。そこで、サブプロセス処理部173全体の処理が一時停止した後も、Mux部199は、書き込み間隔t_period[t]の設定の更新を繰り返し行うとともに、サブプロセス処理部173全体の処理が一時停止を開始してからの回数(フレーム数)をカウントしていく。そして、Mux部199は、再開設定回数N_suspend以上の間隔が空いた状態で、かつ、設定更新後の書き込み間隔t_period[t]の値がその最大値t_max より小さくなった場合、サブプロセス処理部173全体の処理の一時停止を解除し、その処理を再開させる。
Further, for example, in the present embodiment, a value N_suspend (hereinafter referred to as a restart setting number) is set in advance as the number of times (number of frames) from when the processing of the entire
以上、図20を参照して説明したで手法が、総合制御量Gsを用いるサブプロセスの速度制御手法の一例である。即ち、図20は、本発明が適用されるサブプロセスの速度制御手法の一例を示している。 The method described above with reference to FIG. 20 is an example of a sub-process speed control method using the total control amount Gs. That is, FIG. 20 shows an example of a sub-process speed control method to which the present invention is applied.
次に、図21のアローチャートを参照して、サブプロセス処理部173の上述した動作のうちの、Mux部199、Mux部199の前段のエンコード部197およびバッファ198、並びに、Mux部199の後段のストリームマネージャ171のそれぞれの動作の詳細例について説明する。
Next, referring to the arrow chart of FIG. 21, of the above-described operations of the
上述したように、エンコード部197とその後段のバッファ198との間の処理は、MUX部199側の処理とは非同期で行われる。
As described above, the processing between the
詳細には例えば、図21のステップS1において、エンコード部197は、Mux部199側の処理とは独立して自立的に、バッファ198の空き確認を行う。即ち、エンコード部197は、1フレーム分の出力データを書き込む空き領域がバッファ198に存在するか否かを確認する。
More specifically, for example, in step S1 of FIG. 21, the
例えばこのステップS1の時点で、バッファ198に空き領域が存在しなければ、ステップS2において、バッファ198は、NGの応答、即ち、空き領域が存在しないという応答をエンコード部197に送信する。
For example, if there is no free area in the
すると、ステップS3において、エンコード部197は、一定時間その処理を待機(Wait)する。そして、Mux部199側の処理とは独立して自立的に一定時間Waitすると、ステップS4において、エンコード部197は、バッファ198に対して空き確認を行う。
Then, in step S3, the
例えばこのステップS4の時点までに、Mux部199によりデータが読み出されてバッファ198に空き領域ができた場合には、ステップS5において、バッファ198は、Readyの応答、即ち、空き領域が存在するという応答をエンコード部197に送信する。
For example, if data is read by the
すると、ステップS6において、エンコード部197は、1フレーム分の処理を実行する。即ち、エンコード部197は、その前段のバッファ196から1フレーム分のビデオデータを読み出して、MPEG2方式に従った圧縮符号化処理を施す。そして、エンコード部197は、ステップS6の処理の結果得られる1フレーム分の圧縮符号化ビデオデータ(Data)をバッファ198に書き込む。
Then, in step S6, the
その後、ステップS8において、バッファ198は、Readyの応答、即ち、データが正常に書き込めたという応答をエンコード部197に送信すると、Mux部199側の処理とは独立して自立的に、上述したステップS1乃至S8の処理が繰り返される。
After that, in step S8, when the
このようなエンコード部197とバッファ198との間の処理とは独立して自立的に、バッファ198、Mux部199、および、ストリームマネージャ171の間では、次のような処理が実行される。
Independently of the processing between the
即ち、ステップS11において、Mux部199は、HDD書き込みデータ量W_BK分のデータの読み出し(Read)の要求を、バッファ198に対して送信する。
That is, in step S <b> 11, the
ステップS12において、バッファ198が、Readyの応答、即ち、そのRead要求に応えることが可能であるという応答を送信してくると、Mux部199は、HDD書き込みデータ量W_BK分のデータをバッファ198から読み出す。
In step S12, when the
そして、ステップS13において、Mux部199は、HDD書き込みデータ量W_BK分のデータをストリームマネージャ171を介してHDD203に書き込む(Writeする)。
In step S13, the
ステップS14において、ストリームマネージャ171が、Readyの応答、即ち、Writeが正常に行われたという応答を送信してくると、ステップS15において、Mux部199は、その直前に設定された書き込み間隔t_period[t]分の時間だけその処理を待機(Wait)する。
In step S14, when the
そして、書き込み間隔t_period[t]分の時間が経過した時点で、処理はステップS16に進む。即ち、ステップS16において、Mux部199は、HDD書き込みデータ量W_BK分のデータのRead要求を、バッファ198に対して送信する。
Then, when the time corresponding to the writing interval t_period [t] has elapsed, the process proceeds to step S16. That is, in step S <b> 16, the
ステップS17において、バッファ198がReadyの応答を送信してくると、Mux部199は、HDD書き込みデータ量W_BK分のデータをバッファ198から読み出す。
In step S <b> 17, when the
そして、ステップS18において、Mux部199は、HDD書き込みデータ量W_BK分のデータをストリームマネージャ171を介してHDD203にWriteする。
In step S18, the
ステップS19において、ストリームマネージャ171が、Readyの応答を送信してくると、ステップS20において、Mux部199は、その直前に設定された書き込み間隔t_period[t]分の時間だけWaitする。
In step S19, when the
そして、書き込み間隔t_period[t]分の時間が経過した時点で、処理はステップS21に進む。即ち、ステップS21において、Mux部199は、HDD書き込みデータ量W_BK分のデータのRead要求を、バッファ198に対して送信する。
Then, when the time corresponding to the writing interval t_period [t] has elapsed, the process proceeds to step S21. That is, in step S <b> 21, the
この時点で例えばバッファ198にHDD書き込みデータ量W_BK分のデータが蓄積されていない場合には、ステップS22において、バッファ198はNGの応答をMux部199に送信する。このような場合、ステップS23において、Mux部199は、上述したように、書き込み間隔t_period[t]を、前回の値、即ち、前回の書き込み間隔t_period[t-1]に置き換える。そして、ステップS24において、Mux部199は、ステップS23の処理で前回の値に置き換えられた書き込み間隔t_period[t]分の時間だけWaitする。
At this time, for example, if the HDD write data amount W_BK is not stored in the
そして、書き込み間隔t_period[t]分の時間が経過した時点で、処理はステップS25に進む。即ち、ステップS25において、Mux部199は、HDD書き込みデータ量W_BK分のデータのRead要求を、バッファ198に対して送信する。
Then, when the time corresponding to the writing interval t_period [t] has elapsed, the process proceeds to step S25. That is, in step S <b> 25, the
ステップS26において、バッファ198がReadyの応答を送信してくると、Mux部199は、HDD書き込みデータ量W_BK分のデータをバッファ198から読み出す。
In step S <b> 26, when the
そして、ステップS27において、Mux部199は、HDD書き込みデータ量W_BK分のデータをストリームマネージャ171を介してHDD203にWriteする。正常にWriteが行われると、ステップS28において、ストリームマネージャ171が、Readyの応答をMux部199に送信する。
In step S27, the
その後、上述した一連の処理が、バッファ198、Mux部199、および、ストリームマネージャ171の間で、エンコード部197とバッファ198との間の処理とは独立して自立的に繰り返されていく。
Thereafter, the above-described series of processing is autonomously repeated independently of the processing between the
以上、図21のアローチャートを参照して、サブプロセス処理部173の動作のうちの、エンコード部197とバッファ198との間の動作(処理)と、Mux部199側の処理、即ち、バッファ198、Mux部199、および、ストリームマネージャ171の間の動作(処理)
とのそれぞれの詳細について説明した。
21, the operation (processing) between the
And explained the details of each.
次に視点を変えて、図22のフローチャートを参照して、サブプロセス処理部173の動作(処理)のうちの、処理速度制御部200とMux部199との間で行われる処理、即ち、上述した図20に示される書き込み間隔t_period[t]の設定を更新していくことでサブプロセス処理部173全体の処理速度を制御する処理(以下、速度制御処理と称する)の詳細についてさらに説明する。
Next, referring to the flowchart of FIG. 22 from a different viewpoint, the processing performed between the processing
即ち、図22は、「速度制御処理」の一例を示すフローチャートである。 That is, FIG. 22 is a flowchart showing an example of “speed control processing”.
上述したように、この「速度制御処理」は、ビデオカード201からの割り込みVideo frameのタイミング毎に逐次実行される。
As described above, this “speed control process” is sequentially executed for each interrupt video frame timing from the
このため、最初のステップS41において、処理速度制御部200は、フレームカウンタ値N_countの更新を行う。即ち、ステップS1において、N_Count = N_count + 1が演算される。
For this reason, in the first step S41, the processing
ステップS42において、処理速度制御部200は、品質判定部190から供給される出力バッファレベルLevelの現在値を取得して、出力バッファレベルLevelの現在値と、出力バッファレベルLevelのこれまでの時間変化の推移とに基づいて、上述したIndex値を決定するとともに、上述したUp制御ホールドフラグの値(0または1)を決定する。
In step S42, the processing
以下、このようなステップS42の処理を「Index値およびUp制御ホールドフラグ生成処理」と称する。この「Index値およびUp制御ホールドフラグ生成処理」の詳細例については、図23のフローチャートを参照して後述する。 Hereinafter, such processing in step S42 is referred to as “index value and up control hold flag generation processing”. A detailed example of the “index value and up control hold flag generation process” will be described later with reference to the flowchart of FIG.
ステップS43において、処理速度制御部200は、ステップS42の処理で決定されたIndex値に該当する出力バッファレベル制御量Gbの値を、例えば上述した図19等のテーブルを参照して設定する。
In step S43, the processing
ステップS44において、処理速度制御部200は、現在のCPU使用率Xの値をシステムサービス166から取得する。このとき、処理速度制御部200はまた、CPU使用率の上限値Pの値もシステムサービス166から取得する。
In step S <b> 44, the processing
ステップS45において、処理速度制御部200は、現在のCPU使用率X(および、CPU使用率の上限値P)を入力パラメータとする上述した式(5)乃至式(7)で示される速度制御量評価関数Y(X)から、CPU制御量Gcを設定する。なお、上述したように、本実施の形態では、速度制御量評価関数Y(X)の出力値がそのままCPU制御量Gcに設定される。なお、上述した式(6)等に示されるように、速度制御量評価関数Y(X)の出力値は、Up制御ホールドフラグを考慮して算出される。
In step S45, the processing
ステップS46において、処理速度制御部200は、総合制御量Gs(=Gc×Gb)を設定し、その設定値をMux部199に通知する。
In step S46, the processing
すると、ステップS47において、Mux部199は、HDD203へのとりあえずの書き込み間隔t_period(上述したt_period[t]に相当)として、前回の「速度制御処理」で設定された書き込み間隔t_period_pre(上述したt_period[t-1]に相当)を設定する。即ち、ステップS47において、t_period=t_period_preが演算される。
Then, in step S47, the
ステップS48において、Mux部199は、HDD203へのとりあえずの書き込み間隔t_periodとして、ステップS47の処理で設定された書き込み間隔t_period(即ち、前回の書き込み間隔t_period_pre)に対して、ステップS46の処理で設定された総合制御量Gsの値を加算した値を設定する。即ち、ステップS48において、t_period=t_period+Gsが演算される。
In step S48, the
ステップS49において、Mux部199は、t_period>t_minであるか否かを判定する。
In step S49, the
Mux部199は、ステップS49において、t_period>t_minではないと判定した場合、即ち、HDD203へのとりあえずの書き込み間隔t_periodがその最小値t_min以下の場合、ステップS50において、HDD203への正式な書き込み間隔t_periodとして、その最小値t_minを設定する。即ち、ステップS50において、t_period=t_minが演算される。換言すると、サブプロセス処理部173の処理速度が速度上限値(最高値)に設定されることになる。これにより、「速度制御処理」は終了となる。
If the
これに対して、ステップS49において、t_period>t_minであると判定された場合、即ち、HDD203へのとりあえずの書き込み間隔t_periodがその最小値t_minより大きい場合、処理はステップS51に進む。
On the other hand, if it is determined in step S49 that t_period> t_min, that is, if the temporary write interval t_period to the
このように、ステップS47乃至S50の処理は、上述した式(10)の演算処理に相当する。 As described above, the processing in steps S47 to S50 corresponds to the calculation processing of the above-described equation (10).
ステップS51において、Mux部199は、t_period<t_maxであるか否かを判定する。
In step S51, the
Mux部199は、ステップS51において、t_period<t_maxではないと判定した場合、即ち、HDD203へのとりあえずの書き込み間隔t_periodがその最大値t_max以上の場合、ステップS52において、HDD203への正式な書き込み間隔t_periodとして、その最大値t_maxを設定する。即ち、ステップS50において、t_period=t_maxが演算される。
If the
そして、ステップS53において、サブプロセス処理部173は、そのサブプロセス処理の一時中断を行う。サブプロセス処理の一時中断とは、サブプロセス内の各タスク、即ち、デコード部193等のサブプロセスを構成する各機能ブロックの処理が、現在処理中の1フレーム分のデータが後段のバッファに書き込まれた時点で中断されることを指す。これにより、「速度制御処理」は終了となる。
In step S53, the sub
これに対して、ステップS51おいて、t_period<t_maxであると判定された場合、即ち、HDD203へのとりあえずの書き込み間隔t_periodがその最大値t_maxより小さい場合、処理はステップS54に進められる。
On the other hand, if it is determined in step S51 that t_period <t_max, that is, if the writing interval t_period for the time being to the
ステップS54において、Mux部199は、Mux部199自身のデータ読み出し時の前段のバッファ198の残量不足か、または、Mux部199からストリームマネージャ171を介するHDD203への書き込み不良が発生しているか否かを判定する。
In step S54, the
Mux部199のデータ読み出し時の前段のバッファ198の残量不足と、Mux部199からストリームマネージャ171を介するHDD203への書き込み不良との何れもが発生していない場合、ステップS54においてNOであると判定されて、処理はステップS56に進む。
If neither the remaining amount of the
ステップS56において、Mux部199は、HDD203への正式な書き込み間隔を、前回の書き込み間隔t_periodo_preから、ステップS48の処理で設定されたHDD203へのとりあえずの書き込み間隔t_periodに更新する。即ち、ステップS56において、HDD203へのとりあえずの書き込み間隔t_periodが、HDD203への正式な書き込み間隔として設定されるのである。
In step S56, the
このように、ステップS51,S52,S56の処理は、上述した式(11)の演算処理に相当する。 As described above, the processes in steps S51, S52, and S56 correspond to the arithmetic process of the above-described equation (11).
これに対して、Mux部199のデータ読み出し時の前段のバッファ198の残量不足と、Mux部199からストリームマネージャ171を介するHDD203への書き込み不良とのうちの少なくとも一方が発生している場合、ステップS54においてYESであると判定されて、処理はステップS55に進む。
On the other hand, when at least one of the shortage of the remaining
ステップS55において、Mux部199は、t_period=Min(t_period,t_period_pre)の演算を行う。即ち、Mux部199は、t_period_pre< t_period であったときには、HDD203へのとりあえずの書き込み間隔t_periodの設定値(ステップS48の処理で設定された値)を、更新前の書き込み間隔t_period_pre に置き換える。
In step S55, the
そして、ステップS56において、Mux部199は、HDD203への正式な書き込み間隔を、前回の書き込み間隔t_periodo_preから、ステップS55の処理で設定されたHDD203へのとりあえずの書き込み間隔t_periodに更新する。即ち、ステップS56において、HDD203へのとりあえずの書き込み間隔t_periodが、HDD203への正式な書き込み間隔として設定されるのである。ただし、ステップS55において、HDD203へのとりあえずの書き込み間隔t_period[t] の設定値が更新前の書き込み間隔t_period_pre に既に置き換えられている場合には、HDD203への正式な書き込み間隔は、結局、更新前の書き込み間隔t_period_preのまま更新されないことになる。
In step S56, the
ステップS57において、Mux部199は、上述した再開設定回数N_suspend以上サブプロセス処理部173全体の処理が一時中断しているか否かを判定する。
In step S57, the
サブプロセス処理部173全体の処理が一時中断されていない場合、或いは、サブプロセス処理部173全体の処理が一時中断されているが、その一時中断開始からの回数(フレーム数、即ち、ステップS41の処理で更新されるフレームカウンタ値N_Countの増加数)が再開設定回数N_suspendを超えていない場合、ステップS57においてNOであると判定されて、「速度制御処理」は終了となる。
When the processing of the entire
これに対して、サブプロセス処理部173全体の処理が一時中断されており、その一時中断開始からの回数が再開設定回数N_suspend以上になった場合、ステップS57においてYESであると判定されて、処理はステップS58に進む。
On the other hand, when the processing of the entire
ステップS58において、サブプロセス処理部173は、その処理を再開させる。これにより、「速度制御処理」は終了となる。
In step S58, the
以上、図22のフローチャートを参照して「速度制御処理」の一例について説明した。 Heretofore, an example of the “speed control process” has been described with reference to the flowchart of FIG.
次に、図23のフローチャートを参照して、この例の「速度制御処理」のうちのステップS42の「Index値およびUp制御ホールドフラグ生成処理」の一例について説明する。即ち、図23のフローチャートは、上述した図9乃至図14の関係で示されるIndex値を決定するための「Index値およびUp制御ホールドフラグ生成処理」の一例を示している。 Next, an example of the “index value and up control hold flag generation process” in step S42 in the “speed control process” of this example will be described with reference to the flowchart of FIG. That is, the flowchart of FIG. 23 shows an example of “Index value and Up control hold flag generation processing” for determining the Index value shown in the relationship of FIGS. 9 to 14 described above.
ステップS71において、処理速度制御部200は、1つ前の出力バッファレベルの値を保持する。即ち、直前の「Index値およびUp制御ホールドフラグ生成処理」において現在の出力バッファレベルLevelの値として取得された値が、1つ前の出力バッファレベルLevel_preとして設定される(Level_pre=Level)。
In step S71, the processing
ステップS72において、処理速度制御部200は、現在の出力バッファレベルLevelの値(0乃至3のうちのいずれかの値)を品質判定部190から取得する。
In step S <b> 72, the processing
ステップS73において、処理速度制御部200は、現在の出力バッファレベルLevelと1つ前の出力バッファレベルLevel_preとが同じ値であるか否かを判定する。
In step S73, the processing
処理速度制御部200は、ステップS73において、現在の出力バッファレベルLevelと1つ前の出力バッファレベルLevel_preとが同じ値であると判定した場合、即ち、出力バッファレベルLevelの値が変化しなかった場合、ステップS74において、現在の出力バッファレベルLevelの値は2であるか否かを判定する。
When the processing
ステップS74において、現在の出力バッファレベルLevelの値は2ではないと判定された場合、即ち、現在の出力バッファレベルLevelの値が1つ前の出力バッファレベルLevel_preと同一値であって、0,1,3のうちの何れかの値である場合、処理はステップS75に進む。 If it is determined in step S74 that the current output buffer level Level is not 2, that is, the current output buffer level Level is the same value as the previous output buffer level Level_pre, and 0, If the value is any one of 1 and 3, the process proceeds to step S75.
ステップS75において、処理速度制御部200は、「Index=Level×100」の演算を行い、その演算結果IndexをIndex値として決定する。これにより、「Index値およびUp制御ホールドフラグ生成処理」は終了となる。
In step S75, the processing
これに対して、ステップS74において、現在の出力バッファレベルLevelの値は2であると判定された場合、即ち、現在の出力バッファレベルLevelの値が1つ前の出力バッファレベルLevel_preと同一値であって、2である場合、処理はステップS76に進む。 On the other hand, if it is determined in step S74 that the current output buffer level Level is 2, that is, the current output buffer level Level is the same value as the previous output buffer level Level_pre. If it is 2, the process proceeds to step S76.
ステップS76において、処理速度制御部200は、「N_slp=Min(N_slp,16)」を演算する。
In step S76, the processing
N_slpとは、上述したように、出力バッファ残量レベルLevelの値が2に変化してから1に変化するまでの回数(以下、レベル2継続回数と称する)である。また、ステップS73の処理でYESであると判定され、かつ、ステップS74の処理でYESであると判定されて、処理がステップS76に進む場合とは、出力バッファ残量レベルLevelの値が2回以上連続して2を維持していることを意味している。そこで、ステップS76において、レベル2継続回数N_slpの値が、前回のレベル2継続回数N_slpに対して1だけ加えられた値に更新される。即ち、「N_slp=N_slp+1」が演算される。ただし、この例では、レベル2継続回数N_slpの最大値は例えば16に予め設定されている。そこで、さらにステップS76において、更新されたレベル2継続回数N_slpの値が16未満の場合には、更新されたレベル2継続回数N_slpの値が正式なレベル2継続回数N_slpとして設定される。これに対して、更新されたレベル2継続回数N_slpの値が16以上の場合には、強制的に16がレベル2継続回数N_slpとして設定されるのである。即ち、「N_slp=Min(N_slp,16)」が演算されるのである。
As described above, N_slp is the number of times until the value of the output buffer remaining amount level Level changes from 2 to 1 (hereinafter referred to as
ステップS77において、処理速度制御部200は、「N_hold=N_hold+1」を演算する。
In step S77, the processing
N_holdとは、Up制御ホールドフラグ(以下、Hdと記述する)が1に設定されてから(立ってから)現在までの回数(フレーム数)、即ち、サブプロセス処理部173のUp方向の速度制御が禁止(ホールド)されてから現在に至るまでの回数を示している。以下、この回数N_holdを、Up制御ホールド継続回数N_holdと称する。
N_hold is the number of times (number of frames) from when the Up control hold flag (hereinafter referred to as Hd) is set to 1 (from the standing) to the present time, that is, speed control in the Up direction of the
即ち、詳細についてはステップS81の説明として後述するが、出力バッファ残量レベルLevelの値が2以外の値から2に変化すると、Up制御ホールドフラグHdが1に設定されて、サブプロセス処理部173のUp方向の速度制御の禁止が開始される。そして、サブプロセス処理部173のUp方向の速度制御の禁止は、出力バッファ残量レベルLevelの値が2を維持している限り、引き続き実行されることになる。ただし、あまりに長い期間、サブプロセス処理部173のUp方向の速度制御の禁止が続くと、いわゆる無制御状態になってしまう。そこで、例えば本実施の形態では、サブプロセス処理部173のUp方向の速度制御の禁止期間の最大回数(長さ)が、ホールドレングスHd_lengthとして予め設定されている。このため、サブプロセス処理部173のUp方向の速度制御が禁止されてから現在に至るまでの回数が、ホールドレングスHd_lengthを超えていないか否か(小さい値か否か)を判定するために、Up制御ホールド継続回数N_holdが定義されているのである。
That is, details will be described later in the description of step S81. When the value of the output buffer remaining amount level Level changes from a value other than 2 to 2, the Up control hold flag Hd is set to 1, and the
このような判定処理、即ち、Up制御ホールド継続回数N_holdはホールドレングスHd_lengthより小さい値か否かという判定処理が、Up制御ホールド継続回数N_holdの更新を行うステップS77の処理に続くステップS78の処理として、処理速度制御部200により実行される。
Such a determination process, that is, a determination process of whether or not the Up control hold continuation count N_hold is smaller than the hold length Hd_length is a process of Step S78 following the process of Step S77 in which the Up control hold continuation count N_hold is updated. The processing
ステップS78において、Up制御ホールド継続回数N_holdはホールドレングスHd_lengthより小さい値であると判定された場合、ステップS75において、「Index=Level×100」が演算されて、その演算結果IndexがIndex値として決定される。これにより、「Index値およびUp制御ホールドフラグ生成処理」は終了となる。この場合、Up制御ホールドフラグHdは立ったまま(1のまま)である。このため、サブプロセス処理部173のUp方向の速度制御の禁止が引き続き実行されることになる。
In Step S78, when it is determined that the Up control hold continuation count N_hold is smaller than the hold length Hd_length, “Index = Level × 100” is calculated in Step S75, and the calculation result Index is determined as the Index value. Is done. Thereby, the “index value and up control hold flag generation process” is completed. In this case, the Up control hold flag Hd remains standing (still 1). For this reason, prohibition of speed control in the Up direction of the
これに対して、ステップS78において、Up制御ホールド継続回数N_holdはホールドレングスHd_lengthより小さい値ではないと判定された場合、即ち、Up制御ホールド継続回数N_holdがホールドレングスHd_lengthを超えた場合、処理はステップS79に進む。 On the other hand, if it is determined in step S78 that the Up control hold continuation count N_hold is not smaller than the hold length Hd_length, that is, if the Up control hold continuation count N_hold exceeds the hold length Hd_length, the process proceeds to Step S78. Proceed to S79.
ステップS79において、処理速度制御部200は、Up制御ホールドフラグHdを0に設定し(Hd=0を演算し)、かつ、Up制御ホールド継続回数N_holdを0に初期設定する(N_hold=0を演算する)。その後、ステップS79において、「Index=Level×100」が演算されて、その演算結果IndexがIndex値として決定される。これにより、「Index値およびUp制御ホールドフラグ生成処理」は終了となる。この場合、上述したステップS79の処理でUp制御ホールドフラグHdは降ろされる(0に設定される)ので、サブプロセス処理部173のUp方向の速度制御の禁止が解除されることになる。即ち、サブプロセス処理部173のUp方向の速度制御が再開されることになる。
In step S79, the processing
以上、ステップS73においてYESであると判定された場合、即ち、現在の出力バッファレベルLevelと1つ前の出力バッファレベルLevel_preとが同じ値である場合のそれ以降の処理について説明した。 In the above, the process after that when it is determined as YES in step S73, that is, when the current output buffer level Level and the previous output buffer level Level_pre have the same value has been described.
次に、ステップS73においてNOであると判定された場合、即ち、現在の出力バッファレベルLevelと1つ前の出力バッファレベルLevel_preとが違う値である場合、換言すると、出力バッファレベルLevelの値が変化した場合のそれ以降の処理について説明する。 Next, if it is determined as NO in step S73, that is, if the current output buffer level Level is different from the previous output buffer level Level_pre, in other words, the value of the output buffer level Level is The subsequent processing in the case of change will be described.
即ち、ステップS73においてNOであると判定されると、処理はステップS80に進む。ステップS80において、処理速度制御部200は、現在の出力バッファレベルLevelの値は2であるか否かを判定する。
That is, if it is determined as NO in step S73, the process proceeds to step S80. In step S80, the processing
ステップS80において現在の出力バッファレベルLevelの値は2ではないと判定された場合、即ち、現在の出力バッファレベルLevelの値が、1つ前の出力バッファレベルLevel_preとは異なる値であって、0,1,3のうちの何れかの値である場合、処理はステップS81に進む。 When it is determined in step S80 that the current output buffer level Level is not 2, that is, the current output buffer level Level is different from the previous output buffer level Level_pre and is 0. , 1, or 3, the process proceeds to step S81.
ステップS81において、処理速度制御部200は、レベル2継続回数N_slpを0に初期設定し(N_slp=0を演算し)、Up制御ホールドフラグHdを降ろし(Hd=0を演算し)、かつ、Up制御ホールド継続回数N_holdを0に初期設定する(N_hold=0を演算する)。
In step S81, the processing
これに対して、ステップS80において現在の出力バッファレベルLevelは2であると判定された場合、即ち、現在の出力バッファレベルLevelが1つ前の出力バッファレベルLevel_preとは異なる値であって、2である場合とは、上述したように、サブプロセス処理部173のUp方向の速度制御の禁止が行われることを意味している。そこで、ステップS80において現在の出力バッファレベルLevelは2であると判定された場合、処理はステップS82に進み、次のような処理が実行される。
On the other hand, if it is determined in step S80 that the current output buffer level Level is 2, that is, the current output buffer level Level is different from the previous output buffer level Level_pre, and 2 This case means that the speed control in the Up direction of the
即ち、ステップS82において、処理速度制御部200は、レベル2継続回数N_slpを1に設定し(N_slp=1を演算し)、Up制御ホールドフラグHdを立たせ(Hd=1を演算し)、かつ、Up制御ホールド継続回数N_holdを1に設定する(N_hold=1を演算する)。
That is, in step S82, the processing
以上のようなステップS81またはS82の処理に引き続いて、ステップS83において次のような処理が実行される。 Subsequent to the processing in step S81 or S82 as described above, the following processing is executed in step S83.
即ち、ステップS83において、処理速度制御部200は、現在の出力バッファレベルLevelの値が1つ前の出力バッファレベルLevel_preの値より上昇(Up)したか否かを判定する。
That is, in step S83, the processing
ステップS83において、現在の出力バッファレベルLevelの値が1つ前の出力バッファレベルLevel_preの値よりUpしたと判定された場合、処理はステップS84に進む。 If it is determined in step S83 that the current output buffer level Level value is higher than the previous output buffer level Level_pre value, the process proceeds to step S84.
ステップS84において、処理速度制御部200は、「Index=Level×100+(Level−Level_pre)+19」の演算を行い、その演算結果IndexをIndex値として決定する。これにより、「Index値およびUp制御ホールドフラグ生成処理」は終了となる。
In step S84, the processing
これに対して、ステップS83において、現在の出力バッファレベルLevelの値が1つ前の出力バッファレベルLevel_preの値よりUpしていないと判定された場合、即ち、現在の出力バッファレベルLevelの値が1つ前の出力バッファレベルLevel_preの値より下降(Down)した場合、処理はステップS85に進む。 On the other hand, if it is determined in step S83 that the current output buffer level Level is not higher than the previous output buffer level Level_pre, that is, the current output buffer level Level is If the output buffer level Level_pre is lowered (Down), the process proceeds to step S85.
ステップS85において、処理速度制御部200は、現在の出力バッファレベルLevelの値は1かつ出力バッファレベルLevel_preの値は2であるか否かを判定する。
In step S85, the processing
ステップS85において、現在の出力バッファレベルLevelの値は1かつ1つ前の出力バッファレベルLevel_preの値は2ではないと判定された場合、即ち、出力バッファレベルLevelの変化パターンが「2→1」以外のDownパターンである場合、処理はステップS86に進む。 If it is determined in step S85 that the current output buffer level Level is 1 and the previous output buffer level Level_pre is not 2, that is, the change pattern of the output buffer level Level is “2 → 1”. If it is a Down pattern other than, the process proceeds to step S86.
ステップS86において、処理速度制御部200は、「Index=Level×100+(4−Level_pre)」の演算を行い、その演算結果IndexをIndex値として決定する。これにより、「Index値およびUp制御ホールドフラグ生成処理」は終了となる。
In step S86, the processing
これに対して、ステップS85において、現在の出力バッファレベルLevelの値は1かつ1つ前の出力バッファレベルLevel_preの値は2であると判定された場合、即ち、出力バッファレベルLevelの変化パターンが「2→1」である場合、処理はステップS87に進む。 On the other hand, if it is determined in step S85 that the current output buffer level Level is 1 and the previous output buffer level Level_pre is 2, that is, the change pattern of the output buffer level Level is If “2 → 1”, the process proceeds to step S87.
ステップS87において、処理速度制御部200は、「Index=Level×100+N_slp+1」の演算を行い、その演算結果IndexをIndex値として決定する。これにより、「Index値およびUp制御ホールドフラグ生成処理」は終了となる。
In step S87, the processing
以上、図22のフローチャートを参照して、処理速度制御部200とMux部199との間で実行される「速度制御処理」の一例について説明し、その後、図23のフローチャートを参照して、その「速度制御処理」のうちのステップS42の「Index値およびUp制御ホールドフラグ生成処理」の詳細例について説明した。
The example of the “speed control process” executed between the processing
このような図22と図23のフローチャートに従って「速度制御処理」が実際に実行された場合の処理結果が、図24乃至図26に示されている。ただし、図24乃至図26は、速度制御量評価関数Y(X)において、K = △×16 ,q = △/4 とされ、Y(X) = △ (20X - 16)とされた場合の「速度制御処理」の処理結果を示している。 The processing results when the “speed control processing” is actually executed according to the flowcharts of FIGS. 22 and 23 are shown in FIGS. However, in FIGS. 24 to 26, in the speed control amount evaluation function Y (X), K = Δ × 16, q = Δ / 4, and Y (X) = Δ (20X−16). The processing result of “speed control processing” is shown.
図24乃至図26において、図中上から1番目の図は、CPU使用率Xの時間推移を示している。即ち、横軸は時間軸(time)を示しており、縦軸はCPU使用率Xを示している。同図に示されるように、CPU使用率の上限値Pは0.8に設定されている。また、時間帯Tuは、現在のCPU使用率XがCPU使用率の上限値P以上となっている時間帯を示している。 24 to 26, the first chart from the top in the figure shows the time transition of the CPU usage rate X. FIG. That is, the horizontal axis indicates the time axis (time), and the vertical axis indicates the CPU usage rate X. As shown in the figure, the upper limit P of the CPU usage rate is set to 0.8. Further, the time zone Tu indicates a time zone in which the current CPU usage rate X is equal to or higher than the upper limit value P of the CPU usage rate.
図24乃至図26において、図中上から2番目の図は、図7のメインプロセス処理部172のバッファ188における出力バッファレベルLevelの時間推移を示している。即ち、図中上から2番目の図は、上述した図8に対応する実際の処理結果を示す図である。従って、図8と同様に、縦軸は、出力バッファレベルLevelを示しており、また、横軸は他の図と同一の時間軸を示している。横軸の1マスは、図7のビデオカード201からの割り込みVideo Frameの時間間隔に対応している。また、下方に示される括弧書きの3桁の数値、例えば(300)は、図23の「Index値およびUp制御ホールドフラグ生成処理」により実際に決定されたIndex値を示している。
24 to 26, the second diagram from the top in the figure shows the time transition of the output buffer level Level in the
図24乃至図26において、図中上から3番目の図は、Up制御ホールドフラグHdの時間推移を示している。即ち、縦軸がUp制御ホールドフラグHdを示しており、同図に示されるように、図中上側のレベルが1とされ、下側のレベルが0とされている。横軸は他の図と同一の時間軸を示している。 24 to 26, the third diagram from the top in the figure shows the time transition of the Up control hold flag Hd. That is, the vertical axis represents the Up control hold flag Hd, and as shown in the figure, the upper level is 1 and the lower level is 0. The horizontal axis shows the same time axis as the other figures.
図24乃至図26において、図中上から3番目と4番目の図の間には、総合制御量Gsが示されている。各タイミング(割り込みVideo Frameのタイミング)における総合制御量Gsのそれぞれの上方に示される各矢印(ベクトル)は、そのタイミングにおける、図7のサブプロセス処理部173の処理速度制御の方向と制御量とを示している。即ち、上向きの矢印は、サブプロセス処理部173の処理速度制御の方向がUp方向であることを示している。これに対して、下向きの矢印は、サブプロセス処理部173の処理速度制御の方向がDown方向であることを示している。また、上向きの矢印と下向きの矢印ともに、その長さが、サブプロセス処理部173の処理速度制御の制御量を示している。即ち、矢印が長いほど、制御量が大きい(加速または減速の割合が大きくなるように制御する)ことを示している。
24 to 26, the total control amount Gs is shown between the third and fourth diagrams from the top in the drawing. Each arrow (vector) shown above each of the total control amount Gs at each timing (interrupt video frame timing) indicates the direction and control amount of the processing speed control of the
図24乃至図26において、図中上から4番目の図、即ち、図中一番下の図は、図7のHDD203への書き込み間隔t_periodの時間推移を示している。即ち、縦軸がHDD203への書き込み間隔t_periodを示しており、横軸が他の図と同一の時間軸を示している。
24 to 26, the fourth diagram from the top in the diagram, that is, the bottom diagram in the diagram, shows the time transition of the write interval t_period to the
図25と図26とからわかるように、本発明のサブプロセス処理部173の処理速度制御では、品質レベルを示す出力バッファレベルLevelの値が、リアルタイム性を保証するための最低限の値である1になると、即座に、サブプロセス処理部173のDown方向の処理速度制御が行われる。その結果、その制御の出力であるHDD23への書き込み間隔t_periodも、延長方向に高応答で推移していく。即ち、サブプロセス処理部173の実際の処理速度もDown方向に高応答で推移していく。本発明のサブプロセス処理部173の処理速度制御では、CPU使用率Xのみならず、出力バッファレベルLevelも用いているからである。
As can be seen from FIGS. 25 and 26, in the processing speed control of the
即ち、出力バッファレベルLevelを用いずに、サブプロセス処理部173の処理速度制御が仮に行われた場合、上述したようにCPU使用率Xは応答が遅いので、出力バッファレベルLevelの値が最低限の1になった時点でも、CPU使用率XがCPU使用率の上限値Pを超えていないときも多々あり、そのようなときには、サブプロセス処理部173のUp方向の処理速度制御がそのまま行われてしまう。即ち、サブプロセス処理部173の処理速度はさらに高速となってしまう。それに伴い、メインプロセス処理部172の処理速度はその分だけ下がり、出力バッファレベルLevelの値が最低限の1を下回り0になってしまう恐れもある。即ち、メインプロセス処理部172のリアルタイム性が確保できなくなってしまう恐れもある。
That is, if the processing speed control of the
これに対して、本発明のサブプロセス処理部173の処理速度制御では、CPU使用率Xと出力バッファレベルLevelとが併用されているので、出力バッファレベルLevelの値が最低限の1になった場合でも、ほぼその時点で即座に、サブプロセス処理部173のDown方向の処理速度制御が開始される。その結果、サブプロセス処理部173の実際の処理速度もDown方向に高応答で推移していき、それに伴い、メインプロセス部172の処理速度もその分だけ上がり、出力バッファレベルLevelの値を1以上に維持していくことが可能になる。即ち、メインプロセス部172のリアルタイム性の保証を維持していくことが可能になる。
On the other hand, in the processing speed control of the
さらに、図24乃至図26からわかるように、本発明のサブプロセス処理部173の処理速度制御では、現在のCPU使用率XがCPU使用率の上限値Pを超えた場合にも、ほぼその時点で即座に、サブプロセス処理部173のDown方向の処理速度制御が行われる。その結果、その制御の出力であるHDD23への書き込み間隔t_periodも、延長方向に高応答で推移していく。即ち、サブプロセス処理部173の実際の処理速度もDown方向に高応答で推移していく。本発明のサブプロセス処理部173の処理速度制御では、出力バッファレベルLevelのみならず、CPU使用率Xも用いているからである。
Further, as can be seen from FIG. 24 to FIG. 26, in the processing speed control of the
即ち、CPU使用率Xを用いずに、サブプロセス処理部173の処理速度制御が仮に行われた場合、出力バッファレベルLevelが一定の条件さえ満たしてさえいれば、サブプロセス処理部173のUp方向の処理速度制御がそのまま行われてしまう。即ち、サブプロセス処理部173の処理速度はさらに高速となってしまう。その結果、CPU使用率Xは、CPU使用率の上限値Pを超えて益々上がっていってしまう。
That is, if the processing speed control of the
これに対して、本発明のサブプロセス処理部173の処理速度制御では、CPU使用率Xと出力バッファレベルLevelとが併用されているので、CPU使用率XがCPU使用率の上限値Pを超えた場合、ほぼその時点で即座に、Down方向の処理速度制御が行われる。その結果、サブプロセス処理部173の実際の処理速度もDown方向に高応答で推移していくので、CPU使用率Xを、CPU使用率の上限値P未満まで下げることが可能になる。
On the other hand, in the processing speed control of the
さらにまた、図24乃至図26からわかるように、現在のCPU使用率XがCPU使用率の上限値P未満で余裕があり、かつ、現在の出力バッファレベルLevelの値とこれまでの出力バッファレベルLevelの時間変化の推移とから、メインプロセス処理部173のリアルタイム性が確保できると判断される場合には、本発明のサブプロセス処理部173の処理速度制御では、Up方向の処理速度制御が行われ、その結果、サブプロセス処理部173の処理を可能な限り高速に(Best effortで)実行させることが可能になる。
Furthermore, as can be seen from FIGS. 24 to 26, the current CPU usage rate X is less than the upper limit value P of the CPU usage rate and there is a margin, and the current output buffer level Level value and the output buffer level so far When it is determined that the real-time property of the main
以上、本発明のサブプロセス処理部173の処理速度制御について説明してきたが、次のような処理速度制御がサブプロセスに対して施されば、本発明のサブプロセス処理部173の処理速度制御と全く同様の効果を奏することが可能になる。即ち、メインプロセス処理のリアルタイム性を確保したままで、サブプロセスを可能な限り高速で処理することが可能になる。
The processing speed control of the
即ち、このような効果を奏することが可能な本発明の処理速度制御とは、所定の種類の品質を第1のレベル以上に確保する必要があるメインプロセスと、それ以外のサブプロセスとのそれぞれの処理が所定のプロセッサで実行される場合、そのプロセッサの現在の使用率とそのプロセッサの使用率の上限値との関係、および、その種類の品質の現在の第2のレベルと確保すべき第1のレベルとの関係に基づいて、サブプロセスの処理速度を制御する、という制御である。 In other words, the processing speed control of the present invention capable of exhibiting such an effect means that each of a main process that needs to ensure a predetermined type of quality at a first level or higher and other sub-processes. When the process is executed by a predetermined processor, the relationship between the current usage rate of the processor and the upper limit value of the usage rate of the processor, and the current second level of the quality of the type In this control, the processing speed of the sub-process is controlled based on the relationship with the level of 1.
さらに、そのプロセッサの現在の使用率とそのプロセッサの使用率の上限値との関係、および、その種類の品質の現在の第2のレベルと確保すべき第1のレベルとの関係に加えてさらに、その種類の品質のこれまでのレベル変化の時間推移に基づいて、サブプロセスの処理速度を制御すると好適である。なぜならば、その種類の品質の現在の第2のレベルが同一レベルであっても、その種類の品質のこれまでのレベル変化の時間推移のパターンに応じて、その制御方向(Up方向またはDown方向)や制御量を異なるように細かく設定して制御することができるからである。 In addition to the relationship between the current usage rate of the processor and the upper limit value of the processor usage rate, and the relationship between the current second level of the type of quality and the first level to be secured It is preferable to control the processing speed of the sub-process based on the time transition of the level change of the kind of quality so far. This is because even if the current second level of the quality of the type is the same level, the control direction (Up direction or Down direction) depends on the time transition pattern of the level change of the type so far. ) And the control amount can be finely set differently and controlled.
ところで、上述した一連の処理もソフトウエアにより実行させる場合には、そのソフトウエアを構成するプログラムが、専用のハードウエアに組み込まれているコンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行することが可能な、例えば汎用のパーソナルコンピュータなどに、ネットワークや記録媒体からインストールされる。 By the way, when the above-described series of processing is also executed by software, various programs can be installed by installing a computer in which dedicated software is installed or various programs. For example, a general-purpose personal computer that can execute the function is installed from a network or a recording medium.
このようなプログラムを含む記録媒体は、図2に示されるように、装置本体とは別に、ユーザにプログラムを提供するために配布される、プログラムが記録されている磁気ディスク(フロッピディスクを含む)、光ディスク(CD-ROM(Compact Disk-Read Only Memory),DVD(Digital Versatile Disk)を含む)、光磁気ディスク(MD(Mini-Disk)を含む)、もしくは半導体メモリなどよりなるリムーバブル記録媒体(パッケージメディア)111により構成されるだけでなく、装置本体に予め組み込まれた状態でユーザに提供される、プログラムが記録されているROM102や、記憶部108に含まれるハードディスクなどで構成される。
As shown in FIG. 2, the recording medium including such a program is distributed to provide a program to the user separately from the apparatus main body, and a magnetic disk (including a floppy disk) on which the program is recorded. , Removable recording media (packages) consisting of optical disks (including compact disk-read only memory (CD-ROM), DVD (digital versatile disk)), magneto-optical disks (including MD (mini-disk)), or semiconductor memory (Media) 111, but also a
なお、本明細書において、記録媒体に記録されるプログラムを記述するステップは、その順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。 In the present specification, the step of describing the program recorded on the recording medium is not limited to the processing performed in time series along the order, but is not necessarily performed in time series, either in parallel or individually. The process to be executed is also included.
また、本明細書において、システムとは、複数の装置や処理部(ソフトウエアモジュール含む)により構成される装置全体または一部分を表すものである。 Further, in the present specification, the system represents the entire apparatus or a part of a plurality of apparatuses and processing units (including software modules).
101 CPU, 108 記憶部, 111 リムーバブル記録媒体, 121 MCPU, 123−1乃至123−n SCPU, 131 メインプロセス処理部, 132 サブプロセス処理部, 133 CPU使用率上限値設定部, 134 CPU使用率検出部, 141乃至143 機能処理部, 144 品質判定部, 151乃至153 機能処理部, 154 処理速度制御部, 161 OS(CPU使用率検出部), 162 パワー制御(CPU使用率上限値設定部), 172 メインプロセス処理部(再生部), 173 サブプロセス処理部(レート変換記録部), 181 DeMux部, 182 入力段リングバッファ, 183 デコード部, 184 ワークエリアフレームバッファ, 185 ノイズ除去部, 186 ワークエリアフレームバッファ, 187 画像処理部, 188 出力段フレームバッファ, 189 出力制御部, 190 品質判定部, 191 DeMux部, 192 入力段リングバッファ, 193 デコード部, 194 ワークエリアフレームバッファ, 195 サンプリングレートコンバート処理部, 196 ワークエリアフレームバッファ, 197 エンコード部, 198 出力段リングバッファ, 199 Mux部, 200 処理速度制御部 101 CPU, 108 storage unit, 111 removable recording medium, 121 MCPU, 123-1 to 123-n SCPU, 131 main process processing unit, 132 sub-process processing unit, 133 CPU usage rate upper limit setting unit, 134 CPU usage rate detection Unit, 141 to 143 function processing unit, 144 quality judgment unit, 151 to 153 function processing unit, 154 processing speed control unit, 161 OS (CPU usage rate detection unit), 162 power control (CPU usage rate upper limit value setting unit), 172 Main process processing unit (reproducing unit), 173 Sub process processing unit (rate conversion recording unit), 181 DeMux unit, 182 Input stage ring buffer, 183 Decoding unit, 184 Work area frame buffer, 185 Noise removal unit, 186 Work area Frame buffer, 187 strokes Image processing unit, 188 output stage frame buffer, 189 output control unit, 190 quality judgment unit, 191 DeMux unit, 192 input stage ring buffer, 193 decoding unit, 194 work area frame buffer, 195 sampling rate conversion processing unit, 196 work area Frame buffer, 197 encoding unit, 198 output stage ring buffer, 199 Mux unit, 200 processing speed control unit
Claims (7)
前記プロセッサにより実行される前記メインプロセスの処理内容を監視し、その監視結果に基づいて、前記所定の種類の品質のレベルを測定する測定手段と、
前記プロセッサの現在の使用率を検出する検出手段と、
前記プロセッサの使用率の上限値を設定する設定手段と、
前記検出手段により検出された前記プロセッサの現在の使用率と、前記設定手段により設定された前記プロセッサの使用率の上限値との間の第1の関係、および、前記所定の種類の品質についての、前記測定手段により現時点またはその直前に測定された第2のレベルと、確保すべき前記第1のレベルとの間の第2の関係のうちの少なくとも一方に基づいて、前記プロセッサにより実行される前記サブプロセスの処理速度を制御する制御手段と
を備えることを特徴とする情報処理装置。 In an information processing apparatus including a processor that executes in parallel each process of a main process that needs to ensure a predetermined type of quality at a first level or higher and other sub-processes,
Measuring means for monitoring the processing content of the main process executed by the processor and measuring the level of the predetermined type of quality based on the monitoring result;
Detecting means for detecting a current usage rate of the processor;
Setting means for setting an upper limit value of the usage rate of the processor;
A first relationship between the current usage rate of the processor detected by the detection means and an upper limit value of the usage rate of the processor set by the setting means, and the quality of the predetermined type , Executed by the processor based on at least one of a second relationship between the second level measured at or immediately before by the measuring means and the first level to be secured An information processing apparatus comprising: control means for controlling a processing speed of the sub-process.
ことを特徴とする請求項1に記載の情報処理装置。 In addition to the first relationship and the second relationship, the control means further includes the sub-class based on a time change of the predetermined type of quality level measured so far by the measuring means. The information processing apparatus according to claim 1, wherein the processing speed of the process is controlled.
前記プロセッサにより実行される複数の機能ブロックが所定の順番で配置され、かつ、複数の前記機能ブロックのうちの並んで配置される2つの機能ブロックの間にバッファが配置されて構成され、
前記プロセッサは、複数の前記機能ブロックのうちの、最終段の機能ブロックを除く機能ブロックのそれぞれに対して、
所定の単位量の処理に必要なデータが前段のバッファに記憶されているという第1の条件、および、そのデータを記憶させるための空き領域が所定の容量以上だけ後段のバッファに確保されているという第2の条件が満たされた場合、他の機能ブロックとは独立して自立的に、前段の前記バッファからデータを読み出して所定の処理を施し、その処理が施された前記データを後段の前記バッファに書きこむことを開始させ、
前記プロセッサは、複数の前記機能ブロックのうちの、最終段の前記機能ブロックに対して、
前記第1の条件に加えてさらに、前回の処理の開始時点から所定の処理間隔が経過したという第3の条件が満たされた場合、他の機能ブロックとは独立して自立的に、前段のバッファから所定のデータ量のデータを読み出して所定の処理を施し、その処理が施された前記データを、前記サブプロセスの出力データとして外部に出力することを開始させ、
前記制御手段は、
所定のタイミング毎に、そのタイミングにおける前記第1の関係と前記第2の関係のうちの少なくとも一方に基づいて制御量を決定し、決定された前記制御量に応じて、前記第3の条件に含まれる前記処理間隔を更新させていくことで、前記サブプロセスの処理速度を制御する
ことを特徴とする請求項1に記載の情報処理装置。 The sub-process is
A plurality of functional blocks executed by the processor are arranged in a predetermined order, and a buffer is arranged between two functional blocks arranged side by side among the plurality of functional blocks.
The processor, for each of the functional blocks of the plurality of functional blocks, excluding the final functional block,
The first condition that data necessary for processing of a predetermined unit amount is stored in the preceding buffer, and a free area for storing the data is secured in the subsequent buffer by a predetermined capacity or more. When the second condition is satisfied, the data is read out from the buffer at the preceding stage independently of the other functional blocks and subjected to predetermined processing, and the processed data is read from the subsequent stage. Start writing to the buffer,
The processor, with respect to the last functional block of the plurality of functional blocks,
In addition to the first condition, when the third condition that a predetermined processing interval has elapsed from the start time of the previous process is satisfied, independently of the other functional blocks, Read a predetermined amount of data from the buffer, perform a predetermined process, start to output the processed data to the outside as the output data of the sub-process,
The control means includes
At each predetermined timing, a control amount is determined based on at least one of the first relationship and the second relationship at that timing, and according to the determined control amount, the third condition is satisfied. The information processing apparatus according to claim 1, wherein the processing speed of the sub-process is controlled by updating the included processing interval.
ことを特徴とする請求項3に記載の情報処理装置。 When the difference between the second level and the first level is greater than or equal to a predetermined magnitude, the control means determines the control amount using the first relationship, and the difference is greater than the magnitude. 4. The information processing apparatus according to claim 3, wherein the control amount is determined using the second relationship when the value is less than the predetermined value.
前記単位時間当たりに前記メインプロセスから出力すべきデータ量が、前記メインプロセスが確保すべき前記第1のレベルとされ、
前記メインプロセスは、前記プロセッサにより実行される複数の機能ブロックが所定の順番で配置され、かつ、複数の前記機能ブロックのうちの並んで配置される2つの機能ブロックの間にバッファが配置されて構成され、
前記プロセッサは、複数の前記機能ブロックのうちの最終段の機能ブロックに対して、
前記単位時間毎に、前段のバッファから前記第1のレベルに対応するデータ量のデータを読み出して所定の処理を施し、その処理が施された前記データを、前記メインプロセスの出力データとして外部に出力することを開始させ、
前記測定手段は、前記メインプロセスの最終段の前記機能ブロックにとっての前段の前記バッファの記憶データ量を監視し、前記単位時間毎に、その時点で監視された前記バッファの記憶データ量を、前記所定の種類の品質の前記第2のレベルとして測定する
ことを特徴とする請求項3に記載の情報処理装置。 The amount of data processing per unit time of the main process is the predetermined type of quality,
The amount of data to be output from the main process per unit time is the first level that the main process should secure,
In the main process, a plurality of functional blocks executed by the processor are arranged in a predetermined order, and a buffer is arranged between two functional blocks arranged side by side among the plurality of functional blocks. Configured,
The processor, for the last functional block of the plurality of functional blocks,
For each unit time, data of a data amount corresponding to the first level is read from the buffer in the previous stage and subjected to predetermined processing, and the processed data is externally output as output data of the main process. Start to output,
The measuring means monitors the amount of data stored in the buffer in the previous stage for the functional block in the final stage of the main process, and the amount of data stored in the buffer monitored at that time is calculated for each unit time. The information processing apparatus according to claim 3, wherein measurement is performed as the second level of a predetermined type of quality.
前記プロセッサにより実行される前記メインプロセスの処理内容を監視し、その監視結果に基づいて、前記所定の種類の品質のレベルを測定する測定ステップと、
前記プロセッサの現在の使用率を検出する検出ステップと、
前記プロセッサの使用率の上限値を設定する設定ステップと、
前記検出ステップの処理により検出された前記プロセッサの現在の使用率と、前記設定ステップの処理により設定された前記プロセッサの使用率の上限値との間の第1の関係、および、前記所定の種類の品質についての、前記測定ステップの処理により現時点またはその直前に測定された第2のレベルと、確保すべき前記第1のレベルとの間の第2の関係のうちの少なくとも一方に基づいて、前記プロセッサにより実行される前記サブプロセスの処理速度を制御する制御ステップと
を含むことを特徴とする情報処理方法。 In an information processing method of an information processing apparatus including a processor that executes in parallel each processing of a main process that needs to ensure a predetermined predetermined type of quality at a first level or higher and other sub-processes ,
A measurement step of monitoring the processing content of the main process executed by the processor and measuring the level of the predetermined type of quality based on the monitoring result;
A detecting step of detecting a current usage rate of the processor;
A setting step for setting an upper limit value of the usage rate of the processor;
The first relationship between the current usage rate of the processor detected by the processing of the detection step and the upper limit value of the usage rate of the processor set by the processing of the setting step, and the predetermined type On the basis of at least one of a second level between the second level measured at or immediately before by the processing of the measuring step and the first level to be secured, A control step of controlling a processing speed of the sub-process executed by the processor.
前記プロセッサにより実行される前記メインプロセスの処理内容を監視し、その監視結果に基づいて、前記所定の種類の品質のレベルを測定する測定ステップと、
前記プロセッサの現在の使用率を検出する検出ステップと、
前記プロセッサの使用率の上限値を設定する設定ステップと、
前記検出ステップの処理により検出された前記プロセッサの現在の使用率と、前記設定ステップの処理により設定された前記プロセッサの使用率の上限値との間の第1の関係、および、前記所定の種類の品質についての、前記測定ステップの処理により現時点またはその直前に測定された第2のレベルと、確保すべき前記第1のレベルとの間の第2の関係のうちの少なくとも一方に基づいて、前記プロセッサにより実行される前記サブプロセスの処理速度を制御する制御ステップと
を含むことを特徴とするプログラム。 A program to be executed by a computer having a processor for executing in parallel each process of a main process that needs to ensure a predetermined type of quality at a first level or higher and other sub-processes,
A measurement step of monitoring the processing content of the main process executed by the processor and measuring the level of the predetermined type of quality based on the monitoring result;
A detecting step of detecting a current usage rate of the processor;
A setting step for setting an upper limit value of the usage rate of the processor;
The first relationship between the current usage rate of the processor detected by the processing of the detection step and the upper limit value of the usage rate of the processor set by the processing of the setting step, and the predetermined type On the basis of at least one of a second level between the second level measured at or immediately before by the processing of the measuring step and the first level to be secured, A control step of controlling a processing speed of the sub-process executed by the processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004268788A JP2006085386A (en) | 2004-09-15 | 2004-09-15 | Information processor and method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004268788A JP2006085386A (en) | 2004-09-15 | 2004-09-15 | Information processor and method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006085386A true JP2006085386A (en) | 2006-03-30 |
Family
ID=36163854
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004268788A Withdrawn JP2006085386A (en) | 2004-09-15 | 2004-09-15 | Information processor and method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006085386A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008083989A (en) * | 2006-09-27 | 2008-04-10 | Sony Corp | Data management system |
JP2011003052A (en) * | 2009-06-19 | 2011-01-06 | Mitsubishi Electric Corp | Data processing apparatus, control method and program |
WO2011061878A1 (en) * | 2009-11-18 | 2011-05-26 | 日本電気株式会社 | Multicore system, multicore system control method and program stored in a non-transient readable medium |
JP2012056694A (en) * | 2010-09-08 | 2012-03-22 | Toshiba Elevator Co Ltd | Evacuation operation system for elevator |
WO2012095982A1 (en) * | 2011-01-13 | 2012-07-19 | 富士通株式会社 | Multi-core processor system and scheduling method |
CN113590448A (en) * | 2021-08-04 | 2021-11-02 | 特瓦特能源科技有限公司 | CPU utilization rate simulation method and device and electronic equipment |
-
2004
- 2004-09-15 JP JP2004268788A patent/JP2006085386A/en not_active Withdrawn
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008083989A (en) * | 2006-09-27 | 2008-04-10 | Sony Corp | Data management system |
JP2011003052A (en) * | 2009-06-19 | 2011-01-06 | Mitsubishi Electric Corp | Data processing apparatus, control method and program |
WO2011061878A1 (en) * | 2009-11-18 | 2011-05-26 | 日本電気株式会社 | Multicore system, multicore system control method and program stored in a non-transient readable medium |
CN102667745A (en) * | 2009-11-18 | 2012-09-12 | 日本电气株式会社 | Multicore system, multicore system control method and program stored in a non-transient readable medium |
JP5382133B2 (en) * | 2009-11-18 | 2014-01-08 | 日本電気株式会社 | Multi-core system, control method and program for multi-core system |
US8892230B2 (en) | 2009-11-18 | 2014-11-18 | Nec Corporation | Multicore system, control method of multicore system, and non-transitory readable medium storing program |
JP2012056694A (en) * | 2010-09-08 | 2012-03-22 | Toshiba Elevator Co Ltd | Evacuation operation system for elevator |
WO2012095982A1 (en) * | 2011-01-13 | 2012-07-19 | 富士通株式会社 | Multi-core processor system and scheduling method |
CN113590448A (en) * | 2021-08-04 | 2021-11-02 | 特瓦特能源科技有限公司 | CPU utilization rate simulation method and device and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4519082B2 (en) | Information processing method, moving image thumbnail display method, decoding device, and information processing device | |
US7146513B2 (en) | System for adjusting a clock frequency based on comparing a required process times and a worst case execution times and adjusting a voltage and clock frequency based on a number of ready state application tasks | |
CN100430897C (en) | Method for reducing energy consumption of buffered applications using simultaneous multi-threaded processor | |
US7787747B2 (en) | Playback apparatus, Playback method, recording medium, and program | |
JPWO2008129786A1 (en) | Multiprocessor control device, control method thereof, and integrated circuit | |
TWI507992B (en) | Synchronized media processing | |
US6944229B2 (en) | Apparatus and method for MPEG decoding using dynamic frequency and voltage scaling | |
WO2002069174A1 (en) | Method for executing parallel process, and multi-processor computer | |
WO2000077599A1 (en) | Information processing system, information processing method, method and apparatus for task assignment, and medium storing program | |
US6141709A (en) | Peripheral circuitry for providing video I/O capabilities to a general purpose host computer | |
CN105409229B (en) | Information processing apparatus and information processing method | |
US20050278473A1 (en) | Method and apparatus for processing data in a processing unit being a thread in a multithreading environment | |
JP3802521B2 (en) | Encoding apparatus, encoding control method, and encoding control program | |
JP2006085386A (en) | Information processor and method, and program | |
KR101457561B1 (en) | Method and apparatus for data transmission, method and apparatus for performing task | |
CN112817758A (en) | Resource consumption dynamic control method, system, storage medium and equipment | |
JP2008276666A (en) | Information processor and processing method, and program | |
JP4728083B2 (en) | Media processing device | |
CN111225268A (en) | Video data transmission method and terminal | |
CN111629233B (en) | Audio and video transcoding method and device | |
JP3830133B2 (en) | Power control apparatus and method, and power control program | |
JP3975795B2 (en) | Task management apparatus, method and program | |
JP2009193206A (en) | Resource management program, resource management method and resource management device | |
JP2000092471A (en) | Video server device and its band managing method, and recording medium where band managing program is recorded | |
JP2022065555A (en) | Information processing device, deployment unit deployment method, and deployment unit deployment program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20071204 |