JP6845751B2 - Task management device, task management method and task management program - Google Patents
Task management device, task management method and task management program Download PDFInfo
- Publication number
- JP6845751B2 JP6845751B2 JP2017117374A JP2017117374A JP6845751B2 JP 6845751 B2 JP6845751 B2 JP 6845751B2 JP 2017117374 A JP2017117374 A JP 2017117374A JP 2017117374 A JP2017117374 A JP 2017117374A JP 6845751 B2 JP6845751 B2 JP 6845751B2
- Authority
- JP
- Japan
- Prior art keywords
- task
- processing
- database construction
- task management
- priority
- 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.)
- Active
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Management Or Editing Of Information On Record Carriers (AREA)
Description
本発明は、タスク管理装置、タスク管理方法およびタスク管理プログラムに関し、特に、外部装置から受信した情報に基づいてデータベースを構築する装置のタスクを管理するタスク管理装置、タスク管理方法およびタスク管理プログラムに用いて好適なものである。 The present invention relates to a task management device, a task management method and a task management program, and particularly to a task management device, a task management method and a task management program that manages tasks of a device that constructs a database based on information received from an external device. It is suitable for use.
従来、楽曲が記録された楽曲データが記憶されたメディア(例えば、スマートフォンやタブレット端末等)を車載機に接続し、車載機から所望の楽曲を指定して再生させることを可能にしたシステムがある。この種のシステムでは、車載機は、車載機において楽曲を検索可能とするために、メディアから、楽曲の楽曲名やアーティスト名等の付加情報を取得し、付加情報に基いてデータベースを構築するものがある。 Conventionally, there is a system in which a medium (for example, a smartphone, a tablet terminal, etc.) in which music data in which music is recorded is connected to an in-vehicle device, and a desired music can be specified and played from the in-vehicle device. .. In this type of system, the in-vehicle device acquires additional information such as the song name and artist name of the song from the media and builds a database based on the additional information so that the in-vehicle device can search for the music. There is.
なお、楽曲情報をメディアから取得し、ユーザが楽曲を選択すると、ユーザが選択した楽曲のアーティスト名を検索キーとして、そのアーティスト名に対応する楽曲を検索し、検索結果を表示部に表示するオーディオシステムが知られている(例えば、特許文献1参照)。 When music information is acquired from the media and the user selects a music, the music corresponding to the artist name is searched using the artist name of the music selected by the user as a search key, and the search result is displayed on the display unit. The system is known (see, for example, Patent Document 1).
上述した車載機のように、外部装置から受信した情報に基いてデータベースを構築する装置では、データベースの構築に関する処理は、CPU等の処理リソースに当該処理に係るタスクが割り当てられることによって行われる。従って、データベースの構築に関する処理の実行中に、当該処理と同じ処理リソースを使用する他処理を実行する必要が生じた場合、当該他処理に係るタスクの処理リソースの割り当てが、データベースの構築に係る処理が実行されていない場合と比較して減少し、当該他処理が完了するタイミングの遅延を招く。当該他処理が完了するタイミングの遅延を抑制するために、データベースの構築に関する処理に係るタスクについて固定的に優先度を低くした場合、データベースの構築が完了するタイミングが遅延してしまう。 In a device that builds a database based on information received from an external device, such as the in-vehicle device described above, processing related to database construction is performed by assigning a task related to the processing to a processing resource such as a CPU. Therefore, if it becomes necessary to execute another process that uses the same processing resource as the process during the execution of the process related to the database construction, the allocation of the process resource of the task related to the other process is related to the database construction. It decreases as compared with the case where the process is not executed, and causes a delay in the timing at which the other process is completed. If the priority is fixedly lowered for the tasks related to the processing related to the database construction in order to suppress the delay in the timing when the other processing is completed, the timing when the database construction is completed will be delayed.
本発明は、このような問題を解決するために成されたものであり、外部装置から受信した情報に基づいてデータベースの構築が行われる際に、データベースの構築が完了するタイミングの遅延を抑制した上で、データベースの構築に関する処理と同じ処理リソースを使用する他処理が発生した場合に、当該他処理が完了するタイミングを早くすることを目的とする。 The present invention has been made to solve such a problem, and when the database is constructed based on the information received from the external device, the delay in the timing of completing the database construction is suppressed. In the above, when another process that uses the same processing resource as the process related to database construction occurs, the purpose is to accelerate the timing when the other process is completed.
上記した課題を解決するために、本発明では、転送されてきたデータの記憶媒体への書き込みを、第1の処理リソースを使用して実行する書込制御部と、外部装置から受信した構築用情報に基づいてデータベースを生成すると共に、データベースを構成するデータを書込制御部に転送するデータベース構築処理を、第1の処理リソースとは異なる第2の処理リソースを使用して実行するデータベース構築部と、第2の処理リソースを使用して、データベース構築処理以外の処理である他処理を実行する処理実行部とを備えるタスク管理装置において、データベース構築処理が実行される間、データベース構築処理に係る一のタスクを第2の処理リソースに割り当てて実行させた後、書込制御部により当該一のタスクにおいて転送されたデータについての書き込みが完了した場合に、データベース構築処理に係る次のタスクの第2の処理リソースへの割り当てを試みる一方、書込制御部の書込速度のレベルを判定し、書込速度が速いレベルほど、データベース構築処理に係るタスクの第2の処理リソースへの割り当ての優先度を、第2の処理リソースを使用する他処理に係るタスクについての優先度に対して相対的に低くするようにした。 In order to solve the above-mentioned problems, in the present invention, there is a write control unit that executes writing of the transferred data to the storage medium using the first processing resource, and a construction unit received from an external device. Database construction unit that generates a database based on information and executes database construction processing that transfers the data that composes the database to the write control unit using a second processing resource that is different from the first processing resource. And, in a task management device including a process execution unit that executes other processes other than the database construction process by using the second processing resource, the database construction process is related to the database construction process while the database construction process is executed. After allocating one task to the second processing resource and executing it, when the writing of the data transferred in the one task is completed by the write control unit, the next task related to the database construction process is the first. While trying to allocate to the second processing resource, the write speed level of the write control unit is determined, and the faster the write speed, the higher the priority of allocating the task related to the database construction process to the second processing resource. The degree is set to be relatively low with respect to the priority for tasks related to other processes that use the second process resource.
データベース構築処理が実行されている場合において、データベース構築処理に係る一のタスクで書込制御部にデータが転送された後、書込制御部によりそのデータの書き込みが行われている期間は、データベース構築処理に係るタスクの第2の処理リソースへの割り当ては行われず、この期間は、他処理に係るタスクを第2の処理リソースに割り当てることが可能である。そして、書込制御部の書込速度が速いほど、書込制御部が書き込みを行う期間は短くなる。このため、書込速度が速い場合に、データベース構築処理に係るタスクの優先度を高くすると、書込制御部によりデータの書き込みが行われる期間が短い上に、さらに、書込制御部がデータの書き込みを行っていない期間、データベース構築処理に係るタスクに対して第2の処理リソースが優先的に割り当てられることになり、他処理が完了するタイミングの遅延を招く。これを踏まえ、上記のように構成した本発明によれば、書込速度が速いほど、データベース構築処理に係るタスクの第2の処理リソースへの割り当ての優先度が低くなるため、書込速度が速いほど、書込制御部がデータの書き込みを行っていない期間において、当該他の処理に係るタスクに対して第2の処理リソースが優先的に割り当てられることになり、当該他の処理が完了するタイミングを早くできる。さらに、上記のように構成した本発明によれば、書込速度が遅く、従って、書込制御部によりデータの書き込みが行われる期間が長く、このため、他処理に係るタスクに十分に第2の処理リソースが割り当てられる状況下では、データベース構築タスクの優先度が低くならないため、不要にデータベース構築処理に係るタスクの優先度が低くなることがなく、データベースの構築が完了するタイミングの遅延を抑制することができる。 When the database construction process is being executed, after the data is transferred to the write control unit in one task related to the database construction process, the database is written during the period when the data is written by the write control unit. The task related to the construction process is not assigned to the second processing resource, and the task related to the other process can be allocated to the second processing resource during this period. The faster the writing speed of the writing control unit, the shorter the writing period of the writing control unit. Therefore, when the writing speed is high and the priority of the task related to the database construction process is high, the period in which the data is written by the write control unit is short, and the write control unit further writes the data. During the period when writing is not performed, the second processing resource is preferentially allocated to the task related to the database construction processing, which causes a delay in the timing when other processing is completed. Based on this, according to the present invention configured as described above, the faster the writing speed, the lower the priority of allocating the task related to the database construction processing to the second processing resource, so that the writing speed becomes higher. The faster the speed, the more preferentially the second processing resource is allocated to the task related to the other processing during the period when the write control unit is not writing the data, and the other processing is completed. You can speed up the timing. Further, according to the present invention configured as described above, the writing speed is slow, and therefore the period in which the data is written by the writing control unit is long, so that the second task is sufficiently related to other processing. In the situation where the processing resources of the above are allocated, the priority of the database construction task does not become low, so the priority of the task related to the database construction processing does not become low unnecessarily, and the delay of the timing when the database construction is completed is suppressed. can do.
(第1実施形態)
以下、本発明の第1実施形態を図面に基づいて説明する。図1は、本実施形態に係るタスク管理装置100を備える車載装置1の構成例を示す図である。車載装置1は、車両に搭載される装置であり、タスク管理装置100と、ディスプレイ200と、タッチパネル300と、音声処理装置400と、メディア再生装置500と、ラジオ受信装置600と、を備えている。
(First Embodiment)
Hereinafter, the first embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a diagram showing a configuration example of an in-vehicle device 1 including the
図1に示すように、タスク管理装置100は、集積回路10を備えている。この集積回路10には、電子部品として、CPU11(特許請求の範囲の「第2の処理リソース」に相当)、ROM12、RAM13、クロック回路14および入出力ポート15が実装されている。これら電子部品は、バス16を介して相互に信号通信可能である。
As shown in FIG. 1, the
CPU11は、中央演算処理装置であり、ROM12に記憶されたプログラムを読み出して実行することによって、タスク管理装置100の各部を制御する。なお、CPU11が実行するプログラムが格納される記憶媒体はROM12に限らず、タスク管理装置100が備える他の記憶媒体であってもよく、また、タスク管理装置100に接続された外部装置であってもよい。ROM12は、CPU11が実行するプログラム、プログラムに付随するデータ等を記憶する不揮発性メモリーである。RAM13は、CPU11のワークエリアが形成される揮発性メモリーである。
The
クロック回路14は、発振回路や、分周回路等を備え、所定の周波数のクロック信号をCPU11に出力する。後述するタスク管理部37は、クロック回路14から入力されるクロック信号に基づいて、タスクの時間管理等の各種計時処理を実行する。入出力ポート15は、後述する各種インターフェースとの間で信号を入出力するためのポートである。
The clock circuit 14 includes an oscillation circuit, a frequency dividing circuit, and the like, and outputs a clock signal having a predetermined frequency to the
図1に示すように、タスク管理装置100は、メモリー17(特許請求の範囲の「記憶媒体」に相当)を備える。本実施形態において、メモリー17は、ハードディスクである。ただし、メモリー17は、データを書き換え可能に記憶でき、後述する楽曲情報データベースDB1を記憶するのに十分な記憶容量を有する記憶媒体であればよい。例えば、メモリー17は、各種フラッシュメモリーであってもよい。メモリー17には、メモリーコントローラ18(特許請求の範囲の「第1の処理リソース」に相当)が接続される。メモリーコントローラ18は、メモリー17へのデータの書き込み、および、メモリー17からのデータの読み出しを実行する専用のコントローラであり、例えば、CPUや、ICチップにより構成される。メモリーコントローラ18は、メモリーインタフェース19を介して入出力ポート15に接続される。
As shown in FIG. 1, the
図1に示すように、タスク管理装置100は、通信モジュール20を備える。通信モジュール20は、外部装置が接続可能であり、接続された外部装置と所定の通信規格に従って通信する通信インタフェースである。本実施形態では、通信モジュール20に、外部装置として、車両に搭乗する搭乗者(以下、単に「ユーザ」という)が所有する携帯端末KT(例えば、スマートフォンや、タブレット端末。図2参照)が接続される。通信モジュール20と携帯端末KTとの間での通信に使用される通信規格は、無線通信に係る通信規格でも、有線通信に係る通信規格でもよい。無線通信に係る通信規格は、例えば、Bluetooth(登録商標)や、Wi−Fi(登録商標)である。有線通信に係る通信規格は、例えば、USBや、イーサネット(登録商標)である。通信モジュール20は、タスク管理装置100の通信モジュールインタフェース21を介して、入出力ポート15に接続される。
As shown in FIG. 1, the
ディスプレイ200は、車両のダッシュボードの中央部等に設けられた表示パネル(液晶表示パネルや、有機ELパネル等)である。ディスプレイ200は、ディスプレイインタフェース22を介して、入出力ポート15に接続される。タッチパネル300は、ディスプレイ200に重ねて配置されたタッチセンサーであり、ユーザによるタッチ操作を検出し、タッチ操作された位置を示す信号を出力する。タッチパネル300は、タスク管理装置100のタッチパネルインタフェース23を介して、入出力ポート15に接続される。
The
音声処理装置400は、D/Aコンバーターや、ボリューム、アンプ、車内スピーカー等を備え、入力された音声信号をD/A変換し、増幅した後、音声信号に基づく音声を車内スピーカーから出力する。音声処理装置400は、タスク管理装置100の音声処理装置インタフェース24を介して、入出力ポート15に接続される。例えば、CPU11は、メモリー17に記憶された動画ファイルに基づく動画の再生に際し、音声処理装置インタフェース24を介して、音声処理装置400に音声信号を出力して、音声処理装置400から音声を出力する。
The
メディア再生装置500は、CDを再生する装置である。メディア再生装置500は、収納されたCDから音声データを読み出し、CDから読み出した音声データに基づく音声信号を音声処理装置400に出力する。メディア再生装置500は、タスク管理装置100のメディア再生装置インタフェース25を介して、入出力ポート15に接続される。なお、メディア再生装置500が再生する対象とするメディアはCDに限らず、例えば、DVDや、MDであってもよい。
The
ラジオ受信装置600は、ユーザが選択したチャンネルのラジオ放送(AMラジオ放送や、FMラジオ放送)を受信し、受信したラジオ放送に基づく音声信号を音声処理装置400に出力する。ラジオ受信装置600は、タスク管理装置100のラジオ受信装置インタフェース26を介して、入出力ポート15に接続される。なお、ラジオ受信装置600が受信するラジオ放送は、アナログ放送に限らず、デジタル放送であってもよい。
The
図2は、本実施形態に係るタスク管理装置100の機能構成例を示すブロック図である。図2に示すように、本実施形態に係るタスク管理装置100は、その機能構成として、通信部30、データベース構築部31、メモリー制御部32(特許請求の範囲の「書込制御部」に相当)、メモリー関連処理実行部33(特許請求の範囲の「他処理実行部」に相当)、メディア関連処理実行部34(特許請求の範囲の「他処理実行部」に相当)、ラジオ関連処理実行部35(特許請求の範囲の「他処理実行部」に相当)、アクセス量検出部36およびタスク管理部37を備えている。
FIG. 2 is a block diagram showing a functional configuration example of the
機能ブロック30〜37のうち、データベース構築部31、メモリー関連処理実行部33、メディア関連処理実行部34、ラジオ関連処理実行部35、アクセス量検出部36およびタスク管理部37は、処理リソースとして、CPU11(第2の処理リソース)を使用して処理を実行する。すなわち、機能ブロック31、33〜37は、ROM12等の記憶媒体に記憶されたプログラムによる情報処理が、ハードウェア資源たるCPU11を用いて実行されることにより、その機能を発揮すると共に各種処理を実行する。
Of the
特に、タスク管理部37の機能は、タスク管理プログラムを例えばCD−ROMのような記録媒体に記録し、コンピュータに読み込ませることによって実現できるものである。上記プログラムを記録する記録媒体としては、CD−ROM以外に、フレキシブルディスク、ハードディスク、磁気テープ、光ディスク、光磁気ディスク、DVD、不揮発性メモリカード等を用いることができる。また、上記プログラムをインターネット等のネットワークを介してコンピュータにダウンロードすることによっても実現できる。
In particular, the function of the
一方、メモリー制御部32は、処理リソースとして、CPU11とは異なる処理リソースであるメモリーコントローラ18(第1の処理リソース)を使用して処理を実行する。すなわち、メモリー制御部32は、チップに実装された信号処理回路による信号処理や、所定の記憶媒体(例えば、メモリーコントローラ18に実装されたROM)に記憶されたプログラムによる情報処理が、ハードウェア資源たるCPUを用いて実行されることにより、その機能を発揮すると共に各種処理を実行する。また、通信部30は、処理リソースとして、通信モジュール20を使用して処理を実行する。通信部30は、通信モジュール20が備えるハードウェアと、ハードウェアを制御するプログラムとの協働で処理を実行する。
On the other hand, the
通信部30は、車両に搭乗する搭乗者(ユーザ)が所有する携帯端末KTが接続可能であり、接続された携帯端末KTと所定の通信規格に従って通信する。通信部30に携帯端末KTが接続された状態とは、携帯端末KTと通信部30との間で、使用する通信規格に従って通信リンクが確立し、携帯端末KTの特定のソフトウェアと、タスク管理装置100の特定のソフトウェアとの間でデータの送受信が可能な状態を意味する。
The
データベース構築部31は、通信部30に接続された携帯端末KTから、通信部30を介して、楽曲情報(特許請求の範囲の「構築用情報」、「付加情報」に相当)を受信する。そして、データベース構築部31は、受信した楽曲情報に基いて楽曲情報データベースDB1(特許請求の範囲の「データベース」に相当)を生成すると共に、楽曲情報データベースDB1を構成するデータをメモリー制御部32に転送するデータベース構築処理を実行する。上述したように、データベース構築部31は、処理リソースとして、CPU11を使用してデータベース構築処理を実行する。後に詳述するように、データベース構築処理は、タスク管理部37によって、当該処理に係るタスクがCPU11に割り当てられることによって実行される。以下、データベース構築部31の処理について詳述する。
The
データベース構築処理に先立って、通信部30に携帯端末KTが接続されると共に、携帯端末KTにインストールされている所定のアプリケーション(OSの一部であってもよい。)が立ち上げられる。当該所定のアプリケーションは、接続されたときに自動で立ち上がる構成でもよく、また、ユーザの指示によって立ち上がる構成でもよい。当該所定のアプリケーションが立ち上がると、携帯端末KTにおいて当該所定のアプリケーションを実行する機能ブロック(以下、「アプリケーション実行部」といい、符号として「KTa」を付す)と、データベース構築部31との間で論理的な通信経路(コネクション)が確立し、これら機能ブロック間でデータの送受信が可能な状態となる。
Prior to the database construction process, the mobile terminal KT is connected to the
データベース構築部31は、タッチパネル300に対して、データベース構築処理の開始を指示するタッチ操作があった場合、通信部30を介して、携帯端末KTのアプリケーション実行部KTaに対して、楽曲情報の送信を要求する楽曲情報送信要求通知を送信する。なお、ユーザの指示をトリガとして楽曲情報送信要求通知を送信するのではなく、携帯端末KTが通信部30に接続されたときに自動で楽曲情報送信要求通知を送信する構成でもよい。また、データベース構築部31が楽曲情報送信要求通知を送信するのではなく、携帯端末KTのアプリケーション実行部KTaが、携帯端末KTが通信部30に接続されたときに自動で楽曲情報を送信する構成でもよい。
When the
ここで、事前に、携帯端末KTの記憶領域には、携帯側データベースが記憶される。携帯側データベースとは、楽曲データ(特許請求の範囲の「音声データ」に相当)と、楽曲情報とを関連付けて記憶するデータベースである。楽曲データとは、所定の音声ファイルフォーマットの音声データである。本実施形態では、楽曲データには、演奏等をするアーティストがおり楽曲名が付されている楽曲が記録されている。楽曲情報とは、楽曲データに記録された楽曲の識別情報(以下、「楽曲ID」という。)や、アーティスト名、曲名、アルバム名、ジャンル等の、楽曲データに記録された楽曲に関する情報である。本実施形態では、楽曲情報には、楽曲IDと、アーティスト名と、曲名と、アルバム名と、ジャンルとが含まれているものとする。アーティスト名、曲名、アルバム名およびジャンルは、それぞれ、検索キーを利用した検索にメタデータとして使用できる情報である。 Here, the mobile-side database is stored in the storage area of the mobile terminal KT in advance. The mobile-side database is a database that stores music data (corresponding to "voice data" in the claims) and music information in association with each other. The music data is audio data in a predetermined audio file format. In the present embodiment, the music data includes a music in which there is an artist who plays and the music is given a music name. The music information is information about the music recorded in the music data, such as the identification information of the music recorded in the music data (hereinafter referred to as "music ID"), the artist name, the music name, the album name, the genre, and the like. .. In the present embodiment, it is assumed that the music information includes the music ID, the artist name, the music name, the album name, and the genre. The artist name, song name, album name, and genre are each information that can be used as metadata for a search using a search key.
携帯端末KTのアプリケーション実行部KTaは、楽曲情報送信要求通知を受信すると、携帯側データベースを参照し、携帯側データベースに楽曲データが記憶された楽曲のそれぞれについて、楽曲情報を送信する。 When the application execution unit KT of the mobile terminal KT receives the music information transmission request notification, it refers to the database on the mobile side and transmits music information for each of the music whose music data is stored in the database on the mobile side.
タスク管理装置100の通信部30は、携帯端末KTのアプリケーション実行部KTaが楽曲ごとに送信する楽曲情報を受信する。通信部30は、受信した楽曲情報を、順次、受信バッファー(不図示)に格納する。データベース構築部31は、受信バッファーに格納された楽曲情報を、順次、読み出し、データベース構築処理を実行する。なお、通信部30による楽曲情報の受信および楽曲情報の受信バッファーへの格納と、データベース構築部31によるデータベース構築処理とは、独立して非同期で行われる。
The
データベース構築処理において、データベース構築部31は、携帯端末KTのアプリケーション実行部KTaから受信した楽曲情報(=受信バッファーから読み出した楽曲情報)に基いて、RAM13のワークエリアに、楽曲情報データベースDB1を生成する処理を実行する。楽曲情報データベースDB1の生成は、当該データベースに、楽曲情報を有するレコードが、楽曲情報データベースDB1のデータ形式に従って、順次、追加されることによって行われる。データベース構築部31は、楽曲情報データベースDB1の生成と並行して、楽曲データベースDB1を構成するデータ(以下、「データベース構成データ」という。)を、順次、メモリー制御部32に転送する。このように、データベース構築処理では、楽曲情報データベースDB1の生成、および、データベース構成データの転送が実行される。携帯端末KTのアプリケーション実行部KTaから受信した全ての楽曲情報に基づく楽曲データベースDB1の生成、および、データベース構成データの転送が完了すると、データベース構築処理が完了する。
In the database construction process, the
メモリー制御部32は、データベース構築部31から転送されてきたデータのメモリー17への書き込みを、処理リソースとしてメモリーコントローラ18を使用して実行する。上述したように、データベース構築処理において、データベース構築部31は、データベース構成データをメモリー制御部32に転送する。メモリー制御部32は、データベース構築部31から転送されてきたデータベース構成データをメモリー17に書き込む。楽曲情報データベースDB1を構成する全てのデータベース構成データの書き込みが完了すると、メモリー17に、携帯端末KTのアプリケーション実行部KTaから受信した全ての楽曲情報に基づく楽曲情報データベースDB1が記憶された状態となり、楽曲情報データベースDB1の構築が完了する。
The
構築された楽曲情報データベースDB1は、以下の態様で使用される。すなわち、楽曲情報データベースDB1は、アーティスト名等を検索キーとする検索(例えば、アーティスト名を検索キーとする曲名の検索)に使用される。例えば、車載装置1は、ユーザの指示に応じて、楽曲情報データベースDB1を使用して、アーティスト名等を検索キーとする検索を実行する。検索キーは、例えば、ユーザに対して提供される所定のユーザインタフェースに入力される。本実施形態では、ユーザは、検索された楽曲のうちの任意の楽曲を、再生する楽曲として選択できる。車載装置1は、ユーザによって楽曲が選択された場合、携帯端末KTと通信し、ユーザに選択された楽曲の楽曲データをストリーミング再生等の手段により再生する。 The constructed music information database DB1 is used in the following aspects. That is, the music information database DB1 is used for a search using an artist name or the like as a search key (for example, a search for a music name using an artist name as a search key). For example, the in-vehicle device 1 uses the music information database DB1 to execute a search using an artist name or the like as a search key in response to a user's instruction. The search key is entered into, for example, a predetermined user interface provided to the user. In the present embodiment, the user can select any of the searched songs as the music to be played. When a music is selected by the user, the in-vehicle device 1 communicates with the mobile terminal KT and reproduces the music data of the music selected by the user by means such as streaming reproduction.
なお、後述するように、データベース構築処理は、当該処理に係るタスクがCPU11により繰り返し実行されることによって実行される。メモリー制御部32は、タスクごとに、各タスクで転送された分のデータベース構成データの書き込みを行う。
As will be described later, the database construction process is executed by repeatedly executing the task related to the process by the
メモリー関連処理実行部33は、メモリー関連処理を実行する。メモリー関連処理は、処理リソースとしてCPU11を使用する処理であって、メモリー17へのアクセスを伴う処理(=ソースとしてメモリー17を使用する処理)である。なお、上述したデータベース構築処理は、メモリー関連処理に含まれない。
The memory-related
メモリー関連処理は、例えば、以下である。すなわち、本実施形態では、事前にメモリー17に複数の動画ファイルが格納されたデータベースが記憶されている。メモリー関連処理実行部33は、ユーザ操作に応じて、適宜、複数の動画ファイルが格納されたデータベースを用いた動画の検索や、データベースに記憶された動画ファイルに基づく動画の再生等を実行する。データベースを用いた動画の検索や、動画ファイルに基づく動画の再生は、メモリー17へのアクセスを伴う処理であり、メモリー関連処理に相当する。
The memory-related processing is, for example, as follows. That is, in the present embodiment, a database in which a plurality of moving image files are stored in the
メディア関連処理実行部34は、メディア関連処理を実行する。メディア関連処理は、処理リソースとしてCPU11を使用する処理であって、メディア再生装置500へのアクセスを伴う処理(=ソースとしてメディア再生装置500を使用する処理)である。メディア関連処理実行部34は、ユーザ操作に応じて、適宜、制御データを生成してメディア再生装置500に送信し、メディア再生装置500にCDの再生の開始や、再生するトラックの早送り、巻き戻し、再生中のトラックの一時停止等を行わせる。ユーザ操作に応じて制御データを生成してメディア再生装置500を制御する処理は、メディア再生装置500へのアクセスを伴う処理であり、メディア関連処理に相当する。
The media-related
ラジオ関連処理実行部35は、ラジオ関連処理を実行する。ラジオ関連処理は、処理リソースとしてCPU11を使用する処理であって、ラジオ受信装置600へのアクセスを伴う処理(=ソースとしてラジオ受信装置600を使用する処理)である。ラジオ関連処理実行部35は、ユーザ操作に応じて、適宜、制御データを生成してラジオ受信装置600に送信し、ラジオ受信装置600にプリセットや、チャンネルの変更等を行わせる。ユーザ操作に応じて制御データを生成してラジオ受信装置600を制御する処理は、ラジオ受信装置600へのアクセスを伴う処理であり、ラジオ関連処理に相当する。
The radio-related
アクセス量検出部36は、メモリー17への同時アクセス量を検出する。メモリー17への同時アクセス量とは、生成されたタスク(実行状態でなくてもよい)のうち、メモリー17へのデータの書き込み、または、メモリー17からのデータの読み出しを伴う処理を実行するタスクの数を意味し、タスクの数が多いほど、同時アクセス量が大きい。同時アクセス量が大きいほど、メモリーコントローラ18の処理負荷が大きくなるため、1のタスクがメモリー制御部32にメモリー17へのデータの書き込みを要求した場合における書込速度(単位時間に書き込みことが可能なデータ量)が遅くなる。アクセス量検出部36が同時アクセス量を検出する方法はどのような方法であってもよい。例えば、同時アクセス量は、タスク管理装置100のOSの機能により提供される。
The access
タスク管理部37は、データベース構築部31によってデータベース構築処理が実行される間、データベース構築処理に係る一のタスクをCPU11に割り当てて実行させた後、メモリー制御部32により当該一のタスクにおいて転送されたデータについての書き込みが完了した場合に、データベース構築処理に係る次のタスクのCPU11への割り当てを試みる。その上で、タスク管理部37は、メモリー制御部32の書込速度のレベルを判定し、書込速度が速いレベルほど、データベース構築処理に係るタスクのCPU11への割り当ての優先度を低くする。また、タスク管理部37は、書込速度のレベルの判定に際し、アクセス量検出部36により検出された同時アクセス量を反映して書込速度のレベルを判定する。
While the database construction process is executed by the
以下、タスク管理部37の処理について詳述する。以下の説明において、データベース構築処理以外の処理であって、処理リソースとしてCPU11を使用する処理を、総称して、「他処理」と表現する。上述したメモリー関連処理、メディア関連処理およびラジオ関連処理は、それぞれ、「他処理」に含まれる。
Hereinafter, the processing of the
タスク管理部37は、タスク管理装置100のOSの機能により、優先度方式のマルチタスキングを実現する。タスク管理部37は、処理リソースとしてCPU11を使用する処理について、処理の開始に伴うタスクの生成、処理の終了に伴うタスクの消滅、タスクの状態の遷移を行って各タスクを管理する。なお、詳細は省略するが、タスクの生成、消滅や、タスクの状態の遷移は、CPU11に対して、OS、その他のシステムから入力される割込信号に基づいて、適切に実行される。周知のとおり、マルチタスキングでは、タスクの状態として、「実行状態」、「実行可能状態」および「待機状態」がある。
The
実行状態は、CPU11が割り当てられ、タスクが実行されている状態である。実行可能状態は、実行状態に遷移可能な状態(タスクを実行するために必要な条件が全て成立している状態)である一方、優先度の高い他のタスクが実行状態であり、当該他のタスクの状態が遷移するのを待機している状態である。待機状態は、入出力の完了待ち状態である等、タスクを実行するために必要な条件が成立しておらず、実行状態に遷移できない状態である。本実施形態では、入出力の完了待ち状態には、メモリー制御部32がデータベース構成データの書き込みを完了するのを待っている状態を含む。
The execution state is a state in which the
タスク管理部37は、タスクごとに優先度を付与し、タスクコントロールブロックによって各タスクに付与した優先度を管理する。タスク管理部37は、実行可能状態のタスクが複数ある場合、最も優先度が高いタスクを実行状態へ遷移し、当該最も優先度が高いタスク以外のタスクについて実行可能状態を維持する。
The
本実施形態に係るタスク管理部37は、データベース構築処理が開始された場合、データベース構築処理に係るタスク(以下、「データベース構築タスク」という。)について、以下の方法でタスクを管理する。すなわち、タスク管理部37は、データベース構築処理の開始に応じてデータベース構築タスクを生成し、当該タスクを実行可能状態とする。タスク管理部37は、他のタスクの優先度と比較して、データベース構築タスクの優先度が最も高い場合、データベース構築タスクを実行状態へ遷移する(=データベース構築タスクをCPU11に割り当てて実行させる)。データベース構築タスクが実行状態の間、CPU11は、タスクに対応する一定のプログラムを実行して、楽曲情報データベースDB1を生成する処理と、データベース構成データを転送する処理とを行う。当該プログラムが実行されると、所定量のデータベース構成データがメモリー制御部32に転送さると共に、データベース構築タスクは、入出力の完了待ち(この場合は、メモリー17への書き込みの完了待ち)状態となる。
When the database construction process is started, the
タスク管理部37は、割込信号に基づいて、データベース構築タスクが入出力の完了待ち状態となったことを検出すると、データベース構築タスクを待機状態へ遷移する。その後、タスク管理部37は、割込信号に基づいて、メモリー制御部32により、メモリー制御部32に対して転送された分のデータベース構成データの書き込みが完了したことを検出すると、データベース構築タスクを実行可能状態へと遷移する。すなわち、タスク管理部37は、メモリー制御部32によりデータベース構築処理に係る一のタスクにおいて転送されたデータベース構成データについての書き込みが完了した場合に、データベース構築処理に係る次のタスクのCPU11への割り当てを試みる。
When the
データベース構築処理が行われている間、タスク管理部37は、さらに、所定の周期で、以下で示す優先度設定処理を実行する。すなわち、優先度設定処理において、まず、タスク管理部37は、アクセス量検出部36により検出された同時アクセス量を取得する。なお、本実施形態では、アクセス量検出部36は、当該所定の周期で、同時アクセス量を検出する。同時アクセス量を取得した後、タスク管理部37は、メモリー制御部32の書込速度のレベルを判定する。本実施形態では、同時アクセス量が書込速度に影響を与えることを踏まえ、タスク管理部37は、アクセス量検出部36により検出された同時アクセス量に基づいて、書込速度のレベルを判定する。
While the database construction process is being performed, the
より詳細には、本実施形態では、書込速度のレベルとして、書込速度が速いことを示すレベル(以下、「高速レベル」という)と、書込速度が遅いことを示すレベル(以下、「低速レベル」という)との2つがある。そして、タスク管理部37は、取得した同時アクセス量が所定の閾値を下回る場合は、書込速度のレベルが高速レベルである判定し、当該所定の閾値以上の場合は、書込速度のレベルが低速レベルであると判定する。
More specifically, in the present embodiment, as the writing speed level, a level indicating that the writing speed is high (hereinafter, referred to as "high-speed level") and a level indicating that the writing speed is slow (hereinafter, "" There are two types (called "low speed level"). Then, the
書込速度のレベルを判定した後、タスク管理部37は、書込速度のレベルが高速レベルの場合、データベース構築タスクの優先度を、他処理に係るタスクの優先度に対して相対的に低くする。すなわち、タスク管理部37は、データベース構築タスクと、他処理に係るタスクとが共に実行可能状態の場合に、他処理に係るタスクが優先的に実行状態となる(=優先的にCPU11の割り当てが行われる)ような状態にする。一方、タスク管理部37は、書込速度のレベルが低速レベルの場合、データベース構築タスクの優先度を、他処理に係るタスクの優先度に対して相対的に高くする。すなわち、タスク管理部37は、データベース構築タスクと、他処理に係るタスクとが共に実行可能状態の場合に、データベース構築タスクが優先的に実行状態となる(=優先的にCPU11の割り当てが行われる)ような状態にする。このように、本実施形態では、タスク管理部37は、書込速度が速いほど、データベース構築処理に係るタスクのCPU11への割り当ての優先度を、他処理に係るタスクについての優先度に対して相対的に低くする。換言すれば、タスク管理部37は、書込速度が遅いほど、データベース構築処理に係るタスクのCPU11の割り当ての優先度を、他処理に係るタスクについての優先度に対して相対的に高くする。
After determining the write speed level, the
なお、同時アクセス量は、時間の経過と共に動的に変化する。従って、同時アクセス量の変化に応じて、データベース構築タスクの優先度も動的に変化する。 The amount of simultaneous access changes dynamically with the passage of time. Therefore, the priority of the database construction task changes dynamically according to the change in the amount of simultaneous access.
データベース構築処理が実行されている間、データベース構築処理と並行して、他処理(処理リソースとしてCPU11を使用して実行される処理)が実行される場合がある。特に、携帯端末KTが送信する楽曲情報の量が大きく、データベース構築処理に要する時間が長いほど、データベース構築処理と並行して他処理が実行される可能性は高くなる。ここで、データベースの構築が完了するまでは、ユーザは楽曲情報データベースDB1を使用した楽曲の検索ができないため、データベース構築処理の実行に要する時間が長ければ長いほど、ユーザの満足度が低下する。また、他処理が、ユーザ操作をトリガとして実行される処理の場合、ユーザがユーザ操作を行ってから、処理が実行されて処理結果が反映されるまでに要する時間が長ければ長いほど(=他処理が完了するタイミングが遅延するほど)、ユーザの満足度が低下する。
While the database construction process is being executed, another process (process executed using the
そして、データベースの構築処理の実行中に、当該処理と同じ処理リソース(CPU11)を使用する他処理を実行する必要が生じた場合、当該他処理に係るタスクのCPU11の割り当てが、データベース構築処理が実行されていない場合と比較して減少し、当該他処理が完了するタイミングの遅延を招く。当該他処理が完了するタイミングの遅延を抑制するために、データベース構築タスクについて固定的に優先度を低くした場合、データベースの構築が完了するタイミングが遅延してしまう。
Then, when it becomes necessary to execute another process using the same processing resource (CPU 11) as the process during the execution of the database construction process, the database construction process assigns the
以上を踏まえ、本実施形態によれば、タスク管理部37が上述した処理を実行することにより、以下の効果を奏する。すなわち、データベース構築処理が実行されている場合において、データベース構築処理に係る一のタスクでメモリー制御部32にデータが転送された後、メモリー制御部32によりそのデータの書き込みが行われている期間は、データベース構築タスクは入出力の完了待ち状態となるため、データベース構築タスクのCPU11への割り当ては行われず、この期間は、他処理に係るタスクをCPU11に割り当てることが可能である。そして、メモリー制御部32の書込速度が速いほど、メモリー制御部32が書き込みを行う期間は短くなる。このため、書込速度が速い場合に、データベース構築タスクの優先度を高くすると、メモリー制御部32によりデータの書き込みが行われる期間が短い上に、さらに、メモリー制御部32がデータの書き込みを行っていない期間においてデータベース構築タスクと、他処理に係るタスクとが共に実行可能状態となった場合、データベース構築タスクに対してCPU11が優先的に割り当てられることになり、他処理が完了するタイミングの遅延を招く。これを踏まえ、本実施形態によれば、書込速度が速いほど、データベース構築タスクのCPU11への割り当ての優先度が低くなるため、書込速度が速いほど、メモリー制御部32がデータの書き込みを行っていない期間では、当該他の処理に係るタスクに対してCPU11が優先的に割り当てられることになり、当該他の処理が完了するタイミングを早くできる。
Based on the above, according to the present embodiment, the following effects are obtained when the
その上で、本実施形態によれば、書込速度が遅く、従って、メモリー制御部32によりデータの書き込みが行われる期間が長く、このため、他処理に係るタスクに十分にCPU11が割り当てられる状況下では、データベース構築タスクの優先度が低くならないため、不要にデータベース構築タスクの優先度が低くなることがなく、データベースの構築が完了するタイミングの遅延を抑制することができる。
On top of that, according to the present embodiment, the writing speed is slow, and therefore the period in which data is written by the
なお、本実施形態では、書込速度のレベルが高速レベルと低速レベルとの2つ存在し、タスク管理部37は、書込速度のレベルが高速レベルの場合は、データベース構築タスクの優先度を、他処理に係るタスクの優先度よりも相対的に低くし、書込速度のレベルが低速レベルの場合は、データベース構築タスクの優先度を、他処理に係るタスクの優先度よりも相対的に高くする。この点に関し、以下の構成でもよい。すなわち、書込速度として3つ以上のレベルを設け、タスク管理部37が、書込速度のレベルに応じて、書込速度が高いレベルほどデータベース構築タスクの優先度を段階的に低くし、書込速度が低いレベルほどデータベース構築タスクの優先度を段階的に高くする構成でもよい。この構成によれば、書込速度が速いほど、データベース構築タスクの優先度を下げて、データベース構築タスクと他処理タスクとが共に実行可能状態となったときに、他処理タスクが優先して実行される可能性を高めることができる。また、この構成によれば、書込速度が遅いほど、データベース構築タスクの優先度を上げて、データベース構築タスクと他処理タスクとが共に実行可能状態となったときに、データベース構築タスクが優先して実行される可能性を高めることができる。これにより、上述した効果と同様の効果を奏することができる。
In the present embodiment, there are two writing speed levels, a high-speed level and a low-speed level, and the
以下の説明では、他処理に係るタスクを「他処理タスク」という。また、メモリー制御部32が、転送されてきたデータをメモリー17に書き込む処理を「書込処理」という。
In the following description, the task related to other processing is referred to as "other processing task". Further, a process in which the
図3は、データベース構築処理と並行して他処理が行われる場合に、データベース構築タスクにCPU11が割り当てられる期間(=実行状態の期間)と、他処理に係るタスクにCPU11が割り当てられる期間とを、メモリー制御部32が書込処理を行う期間と共に示すタイムチャートである。図3において、軸J3Aは他処理タスクにCPU11が割り当てられる期間を時系列で示し、軸J3Bはデータベース構築タスクにCPU11が割り当てられる期間を時系列で示し、軸J3Cは書込処理が実行される期間を時系列で示す。
FIG. 3 shows a period in which the
図3は、タスク管理部37が、書込速度のレベルを高速レベルと判定し、データベース構築タスクに対して、他処理タスクよりも相対的に低い優先度を付与する場合に、データベース構築タスクと他処理タスクとにCPU11が割り当てられる期間を示している。
FIG. 3 shows a database construction task when the
図3では、説明の便宜のため、以下のことを前提とする。すなわち、データベース構築タスクは、実行状態となった後、20ミリ秒が経過した段階で一律に当該タスクに対応する一定のプログラムの実行が終了し、入出力の完了待ち状態となる。上述したように、タスク管理部37は、データベース構築タスクが入出力の完了待ち状態となった場合、当該タスクを待機状態に遷移する。
In FIG. 3, for convenience of explanation, the following is assumed. That is, the database construction task uniformly ends the execution of a certain program corresponding to the task when 20 milliseconds have elapsed after the execution state, and is in the input / output completion waiting state. As described above, when the database construction task is in the input / output completion waiting state, the
また、図3の説明では、他処理タスクは、40ミリ秒がタイムクォンタムとされる。従って、他処理タスクは、実行状態となった後、40ミリ秒が経過した段階で、タスク管理部37によって強制的に、最も低い優先度が付与された上で実行可能状態へ遷移される。この最も低い優先度は、後述する優先度「低」よりも低い優先度であり、タイムクォンタムを使い切ったタスクに対して特別に付与される。タスク管理部37は、他処理タスクに最も低い優先度を付与した後、20ミリ秒が経過したときに、優先度をリセットし、元の優先度を付与する。
Further, in the explanation of FIG. 3, 40 milliseconds is set as the time quantum for the other processing task. Therefore, the other processing task is forcibly transferred to the executable state after being given the lowest priority by the
また、図3の説明では、タイミングT0を図における経過時間の起点とし、各タイミングを、「タイミングT」という文言に、タイミングT0からの経過時間を表す数字(単位は「ミリ秒」)を付加した名称によって表す。例えば、タイミングT0から20ミリ秒経過したタイミングをタイミングT20と表現し、タイミングT0から100ミリ秒経過したタイミングをタイミングT100と表現する。
Further, in the explanation of FIG. 3, the timing T0 is set as the starting point of the elapsed time in the figure, and each timing is added to the word “timing T” with a number (unit: “millisecond”) indicating the elapsed time from the timing T0. Represented by the name given. For example, the
また、図3では、CPU11には、データベース構築タスクおよび他処理タスクのみが割り当てられるものとし、説明に際し、これらタスク以外のタスクについては考慮しない。
Further, in FIG. 3, it is assumed that only the database construction task and the other processing task are assigned to the
また、図3では、優先度は、高い順に、「高」、「中」、「低」がある。そして、他処理タスクには、タイムクォンタムを使い切ったことに起因してタスク管理部37に強制的に優先度が付与される期間を除いて、優先度として、常に優先度「中」が付与される。
Further, in FIG. 3, the priorities are "high", "medium", and "low" in descending order. Then, the other processing task is always given the priority "medium" as the priority, except for the period in which the
以上のことを前提とする点は、第1実施形態の説明に用いる図4〜8、および、第2実施形態の説明に用いる図10、11についても同じである。 The points premised on the above are the same for FIGS. 4 to 8 used for the explanation of the first embodiment and FIGS. 10 and 11 used for the explanation of the second embodiment.
さらに、図3では、以下のことを前提とする。すなわち、1つの他処理は、他処理タスクが合計して、60ミリ秒、実行状態となった場合(=CPU11に割り当てられた時間の累計が60ミリ秒となった場合)、一律に処理が完了する。
Further, FIG. 3 assumes the following. That is, one other process is uniformly processed when the other processing tasks are in the execution state for 60 milliseconds in total (= when the cumulative total of time allocated to the
以上のことを前提とする点は、第1実施形態の説明に用いる図4〜8についても同じである。 The points premised on the above are the same for FIGS. 4 to 8 used in the description of the first embodiment.
さらに、図3では、以下のことを前提とする。すなわち、図3で示す期間の間、タスク管理部37は、継続して書込速度のレベルを高速レベルと判定し、データベース構築タスクに、優先度として、優先度「低」を付与する。また、図3では、データベース構築タスクでメモリー制御部32に転送されたデータベース構成データをメモリー17に書き込む処理に要する時間は、一律で「10ミリ秒」である。また、図3では、タイミングT0で、データベース構築処理が開始され、タイミングT20で他処理が開始される。
Further, FIG. 3 assumes the following. That is, during the period shown in FIG. 3, the
さて、図3に示すように、タイミングT0において、データベース構築処理が開始される。これに応じて、軸J3Bに示すように、タスク管理部37は、タイミングT0−T20の20ミリ秒の期間、データベース構築タスクを実行状態とする。軸J3Cに示すように、タイミングT20−T30の10ミリ秒の期間、メモリー制御部32は、タイミングT0−T20の期間で実行されたデータベース構築タスクにより転送されたデータベース構成データについての書込処理を実行する。
Now, as shown in FIG. 3, the database construction process is started at the timing T0. In response to this, as shown on the axis J3B, the
また、図3に示すように、タイミングT20において、他処理が開始される。タイミングT20−T30の期間は、データベース構築タスクは待機状態のため、タスク管理部37は、当該期間、他処理タスクを実行状態とする。タイミングT30で書込処理が完了すると、タスク管理部37は、データベース構築タスクを実行可能状態へと移行する。しかしながら、図3では、データベース構築タスクの優先度(優先度「低」)は、他処理タスクの優先度(優先度「中」)よりも低い。このため、タスク管理部37は、引き続き他処理タスクを実行状態として他処理タスクへのCPU11の割り当てを行う一方、データベース構築タスクの状態を実行可能状態のまま維持する。
Further, as shown in FIG. 3, another process is started at the timing T20. Since the database construction task is in the standby state during the timing T20-T30, the
軸J3Aに示すように、他処理タスクはタイミングT60でタイムクォンタムを使い切る。タスク管理部37は、タイミングT60で、他処理タスクに最も低い優先度を付与した上で、他処理タスクを実行可能状態に遷移する。これにより、タイミングT60において、他処理タスクおよびデータベース構築タスクが実行可能状態となるが、優先度はデータベース構築タスクの方が高い。従って、軸J3Bに示すように、タスク管理部37は、データベース構築タスクを実行状態へ遷移する。
As shown on axis J3A, the other processing task runs out of time quantum at timing T60. At the timing T60, the
軸J3Bおよび軸J3Cに示すように、タスク管理部37は、タイミングT60−T80の20ミリ秒の期間、データベース構築タスクを実行状態とする。また、タイミングT80−T90の10ミリ秒の期間、書込処理が実行される。軸J3Bに示すように、タスク管理部37は、タイミングT80でデータベース構築タスクを待機状態へ遷移する。軸J3Aに示すように、タスク管理部37は、タイミングT80で、他処理タスクの優先度をリセットすると共に、他処理タスクを実行状態へ遷移する。
As shown on the axis J3B and the axis J3C, the
軸J3Aおよび軸J3Bに示すように、タイミングT90で書込処理が完了すると、タスク管理部37は、データベース構築タスクを実行可能状態へと移行する。しかしながら、図3では、データベース構築タスクの優先度(優先度「低」)は、他処理タスクの優先度(優先度「中」)よりも低い。このため、タスク管理部37は、引き続き他処理タスクを実行状態として他処理タスクへのCPU11の割り当てを行う一方、データベース構築タスクの状態を実行可能状態のまま維持する。
As shown on the axis J3A and the axis J3B, when the write process is completed at the timing T90, the
軸J3Aに示すように、タイミングT100で、他処理タスクが実行状態となった期間の合計が60ミリ秒となり、他処理が終了する。軸J3Bおよび軸J3Cに示すように、タイミングT100以降は、20ミリ秒のデータベース構築タスクの実行と、10ミリ秒の書込処理とが交互に繰り返し実行される。 As shown on the axis J3A, at the timing T100, the total period during which the other processing task is in the execution state becomes 60 milliseconds, and the other processing ends. As shown on the axis J3B and the axis J3C, after the timing T100, the execution of the database construction task for 20 milliseconds and the writing process for 10 milliseconds are alternately and repeatedly executed.
図4は、図3との比較のために、タスク管理部37が、仮に、書込速度のレベルにかかわらず、データベース構築タスクの優先度を、他処理タスクの優先度に比して相対的に高くした場合に、データベース構築タスクと他処理タスクとにCPU11が割り当てられる期間を示す。他処理の状況にかかわらずデータベース構築処理を優先的に実行することを意図して、データベース構築タスクの優先度を固定的に高くすると、図4に示すタイミングでデータベース構築タスクと他処理とにCPU11の割り当てが行われることになる。
In FIG. 4, for comparison with FIG. 3, the
図4において、軸J4Aは他処理タスクにCPU11が割り当てられる期間を時系列で示し、軸J4Bはデータベース構築タスクにCPU11が割り当てられる期間を時系列で示し、軸J4Cは書込処理が実行される期間を時系列で示す。図4では、タスク管理部37は、データベース構築タスクに対して、優先度として、常に、優先度「高」を付与する。それ以外の前提は、図3と同じである。
In FIG. 4, the axis J4A shows the period in which the
図4に示すように、タイミングT0でデータベース構築処理が開始される。これに伴って、軸J4Bに示すように、タスク管理部37は、タイミングT0−T20の期間、データベース構築処理を実行状態とする。また、軸J4Cに示すように、タイミングT20−T30の期間、書込処理が行われる。また、タイミングT20で他処理が開始される。軸J4Aに示すように、タスク管理部37は、タイミングT20で、他処理タスクを実行状態とする。
As shown in FIG. 4, the database construction process is started at the timing T0. Along with this, as shown on the axis J4B, the
軸J4Cに示すように、タイミングT30で書込処理が完了する。書込処理の完了に応じて、タイミングT30で、タスク管理部37は、データベース構築タスクを実行可能状態に遷移する。他処理の優先度は「中」であり、データベース構築タスクの優先度は「高」であり、データベース構築タスクの優先度の方が高い。これを踏まえ、軸J4Aおよび軸J4Bに示すように、タイミングT30で、さらに、タスク管理部37は、他処理タスクを実行可能状態へ遷移すると共に、データベース構築タスクを実行状態へ遷移する。
As shown on the axis J4C, the writing process is completed at the timing T30. At timing T30, the
軸J4A、軸J4Bおよび軸J4Cに示すように、タイミングT30−T180の期間、「20ミリ秒のデータベース構築タスクの実行」と、「10ミリ秒の書込処理および他処理タスクの実行」とが交互に繰り返し実行される。軸J4Aに示すように、タイミングT180で、他処理タスクが実行状態となった期間の合計が60ミリ秒となり、他処理が終了する。タイミングT180以降は、20ミリ秒のデータベース構築タスクの実行と、10ミリ秒の書込処理とが交互に繰り返し実行される。 As shown in axis J4A, axis J4B and axis J4C, during the timing T30-T180, "execution of database construction task for 20 milliseconds" and "execution of write processing and other processing tasks for 10 milliseconds" It is executed repeatedly alternately. As shown on the axis J4A, at the timing T180, the total period during which the other processing task is in the execution state becomes 60 milliseconds, and the other processing ends. After the timing T180, the execution of the database construction task for 20 milliseconds and the writing process for 10 milliseconds are alternately and repeatedly executed.
以下、図3と図4とを比較する。図3の軸J3Aに示すように、図3では、タイミングT20で他処理が開始された後、タイミングT100で他処理が完了する。すなわち、図3では、他処理の実行に80ミリ秒を要している。一方、図4の軸J4Aに示すように、図4では、タイミングT20で他処理が開始された後、タイミングT180で他処理が完了する。すなわち、図4では、他処理の実行に160ミリ秒を要している。このように、書込速度のレベルが高速レベルの場合に、データベース構築タスクの優先度を、他処理タスクの優先度に比して相対的に低くすることにより、他処理の実行に要する時間を大幅に短縮できる。このため、データベース構築処理が行われているときに、ユーザ操作に応じて他処理が並行して実行された場合、ユーザは、短時間で処理結果を得ることができ、ユーザの満足度が高い。 Hereinafter, FIG. 3 and FIG. 4 will be compared. As shown on the axis J3A of FIG. 3, in FIG. 3, after the other processing is started at the timing T20, the other processing is completed at the timing T100. That is, in FIG. 3, it takes 80 milliseconds to execute the other processing. On the other hand, as shown by the axis J4A of FIG. 4, in FIG. 4, after the other processing is started at the timing T20, the other processing is completed at the timing T180. That is, in FIG. 4, it takes 160 milliseconds to execute the other processing. In this way, when the write speed level is high, the time required to execute other processes is reduced by lowering the priority of the database construction task relative to the priority of other processing tasks. It can be shortened significantly. Therefore, when the database construction process is being performed and other processes are executed in parallel according to the user operation, the user can obtain the process result in a short time, and the user's satisfaction is high. ..
図3の軸J3Cに示すように、図3では、8回分の書込処理が完了するタイミングは、タイミングT280である。一方、図4の軸J4Cに示すように、図4では、8回分の書込処理が完了するタイミングは、タイミングT240である。このように、本実施形態に係る図3では、書込速度のレベルが高速レベルのときに、データベース構築タスクに付与する優先度を低くすることに起因して、データベース構築処理に40ミリ秒の遅延が発生するが、当該遅延に係る時間は、他処理の実行に要する時間の短縮時間と比較して十分に短く、全体として、ユーザの満足度を向上できる。 As shown on the axis J3C of FIG. 3, in FIG. 3, the timing at which the writing process for eight times is completed is the timing T280. On the other hand, as shown by the axis J4C of FIG. 4, in FIG. 4, the timing at which the writing process for eight times is completed is the timing T240. As described above, in FIG. 3 according to the present embodiment, when the write speed level is high speed level, the priority given to the database construction task is lowered, so that the database construction process takes 40 milliseconds. Although a delay occurs, the time related to the delay is sufficiently shorter than the time required for executing other processes, and the user satisfaction can be improved as a whole.
図5は、図3との比較のために、タスク管理部37が、仮に、以下の処理を実行した場合に、データベース構築タスクと他処理タスクとにCPU11が割り当てられる期間を示す。すなわち、図5において、タスク管理部37は、データベース構築タスクに常に最も高い優先度を付与する。その上で、タスク管理部37は、メモリー制御部32による書込処理が完了した後、即時にデータベース構築タスクを実行可能状態に遷移するのではなく、書込処理が完了したタイミングを起点として、所定期間、強制的にデータベース構築タスクの状態を待機状態のままで維持し、その後、実行可能状態に遷移する。
FIG. 5 shows a period in which the
このような処理が行われることにより、データベース構築処理と並行して他処理が実行される場合に、書込処理の完了後、所定期間の間は、他処理タスクにCPU11を割り当てることができる。これにより、書込速度が速い場合であっても、書込速度が実行される期間に連続して所定期間の間、他処理タスクにCPU11が割り当てられ、他処理タスクの処理に要する時間の短縮化を図ることができる。従来、データベース構築処理と並行して行われる他処理の処理に要する時間を短縮することを意図して、タスク管理部37により上述した処理が行われることがあった。この場合、図5に示すタイミングでデータベース構築タスクと他処理とにCPU11の割り当てが行われることになる。
By performing such a process, when another process is executed in parallel with the database construction process, the
図5において、軸J5Aは他処理タスクにCPU11が割り当てられる期間を時系列で示し、軸J5Bはデータベース構築タスクにCPU11が割り当てられる期間を時系列で示し、軸J5Cは書込処理が実行される期間を時系列で示す。図5では、タスク管理部37は、データベース構築タスクに対して、優先度として、常に、優先度「高」を付与する。さらに、タスク管理部37は、メモリー制御部32による書込処理が完了した後、即時にデータベース構築タスクを実行可能状態に遷移するのではなく、書込処理が完了したタイミングを起点として、20ミリ秒、強制的にデータベース構築タスクの状態を待機状態のままで維持し、その後、実行可能状態に遷移する。それ以外の前提は、図3と同じである。
In FIG. 5, the axis J5A indicates the period in which the
図5に示すように、タイミングT0でデータベース構築処理が開始される。これに伴って、軸J5Bに示すように、タスク管理部37は、タイミングT0−T20の期間、データベース構築処理を実行状態とする。また、軸J5Cに示すように、タイミングT20−T30の期間、書込処理が行われる。また、タイミングT20で他処理が開始される。軸J5Aに示すように、タスク管理部37は、タイミングT20で、他処理タスクを実行状態とする。
As shown in FIG. 5, the database construction process is started at timing T0. Along with this, as shown on the axis J5B, the
軸J5Cに示すように、タイミングT30で書込処理が完了する。軸J5Bに示すように、タスク管理部37は、タイミングT30から20ミリ秒の間、データベース構築タスクを強制的に待機状態とする。その上で、タスク管理部37は、タイミングT20−T50の期間、他処理タスクを実行状態とする。
As shown on the axis J5C, the writing process is completed at the timing T30. As shown on the axis J5B, the
タイミングT50で、タスク管理部37は、データベース構築タスクを実行可能状態へ遷移する。図5では、データベース構築タスクの優先度の方が、他処理タスクの優先度よりも高い。これを踏まえ、軸J5Aおよび軸J5Bで示すように、タイミングT50で、タスク管理部37は、データベース構築タスクを実行状態へ遷移すると共に、他処理タスクを実行可能状態へ遷移する。
At the timing T50, the
軸J5Bに示すように、タスク管理部37は、タイミングT50−T70の期間、データベース構築タスクを実行状態とする。軸J5Cに示すように、タイミングT70−T80の期間、書込処理が行われる。軸J5Bに示すように、タイミングT80−T100の期間、タスク管理部37は、データベース構築タスクを強制的に待機状態とする。軸J5Aに示すように、タイミングT70−T100の期間、タスク管理部37は、他処理タスクを実行状態とする。タイミングT100で、他処理タスクが実行状態となった期間の合計が60ミリ秒となり、他処理が終了する。タイミングT100以降は、データベース構築タスクが実行される20ミリ秒の期間、書込処理が行われる10ミリ秒の期間、および、データベース構築タスクおよび書込処理の双方が行われない20ミリ秒の期間が繰り返し現出する。
As shown on the axis J5B, the
以下、図3と図5とを比較する。上述したように、図3では、他処理の実行に80ミリ秒を要している。一方、図5の軸J5Aに示すように、図5では、タイミングT20で他処理が開始された後、タイミングT100で他処理が完了する。すなわち、図5では、他処理の実行に80ミリ秒を要している。このように、図3と図5とでは、データベース構築処理と並行して他処理が実行される場合に、他処理の実行に同等の時間を要している。 Hereinafter, FIG. 3 and FIG. 5 will be compared. As described above, in FIG. 3, it takes 80 milliseconds to execute the other processing. On the other hand, as shown by the axis J5A of FIG. 5, in FIG. 5, after the other processing is started at the timing T20, the other processing is completed at the timing T100. That is, in FIG. 5, it takes 80 milliseconds to execute the other processing. As described above, in FIGS. 3 and 5, when the other process is executed in parallel with the database construction process, it takes the same amount of time to execute the other process.
一方で、上述したように、図3では、8回分の書込処理が完了するタイミングは、タイミングT280である。一方、図5の軸J5Cに示すように、図5では、8回分の書込処理が完了するタイミングは、タイミングT380である。このように、本実施形態に係る図3は、図5と比較して、同一量のデータの書き込みに要する時間を大幅に短くでき、データベースの構築が完了するタイミングを大幅に早めることができる。 On the other hand, as described above, in FIG. 3, the timing at which the writing process for eight times is completed is the timing T280. On the other hand, as shown by the axis J5C of FIG. 5, in FIG. 5, the timing at which the writing process for eight times is completed is the timing T380. As described above, in FIG. 3 according to the present embodiment, the time required for writing the same amount of data can be significantly shortened as compared with FIG. 5, and the timing at which the construction of the database is completed can be significantly accelerated.
図6は、データベース構築処理と並行して他処理が行われる場合に、データベース構築タスクにCPU11が割り当てられる期間(=実行状態の期間)と、他処理に係るタスクにCPU11が割り当てられる期間とを、メモリー制御部32が書込処理を行う期間と共に示すタイムチャートである。図6において、軸J6Aは他処理タスクにCPU11が割り当てられる期間を時系列で示し、軸J6Bはデータベース構築タスクにCPU11が割り当てられる期間を時系列で示し、軸J6Cは書込処理が実行される期間を時系列で示す。
FIG. 6 shows a period in which the
図6は、タスク管理部37が、書込速度のレベルを低速レベルと判定し、データベース構築タスクに対して、他処理タスクよりも相対的に高い優先度を付与する場合に、データベース構築タスクと他処理タスクとにCPU11が割り当てられる期間を示している。
FIG. 6 shows a database construction task when the
図6では、以下のことを前提とする。すなわち、図6で示す期間の間、タスク管理部37は、継続して書込速度のレベルを低速レベルと判定し、データベース構築タスクに、優先度として、優先度「高」を付与する。また、図6では、データベース構築タスクでメモリー制御部32に転送されたデータベース構成データをメモリー17に書き込む処理に要する時間は、一律で「30ミリ秒」である。つまり図5では、図3と比較して、書込速度が遅いため、書込処理に要する時間が長い。その他の前提は、図3の前提と同じである。
In FIG. 6, the following is assumed. That is, during the period shown in FIG. 6, the
さて、図6では、タイミングT0において、データベース構築処理が開始される。これに応じて、軸J6Bに示すように、タスク管理部37は、タイミングT0−T20の期間、データベース構築タスクを実行状態とする。軸J6Cに示すように、タイミングT20−T50の期間、メモリー制御部32は、タイミングT0−T20の期間で実行されたデータベース構築タスクにより転送されたデータベース構成データについての書込処理を実行する。
By the way, in FIG. 6, the database construction process is started at the timing T0. In response to this, as shown on the axis J6B, the
また、図6では、タイミングT20において、他処理が開始される。タイミングT20−T50の期間は、データベース構築タスクは待機状態のため、タスク管理部37は、当該期間、他処理タスクを実行状態とする。タイミングT50で書込処理が完了すると、タスク管理部37は、データベース構築タスクを実行可能状態へと移行する。図6では、データベース構築タスクの優先度(優先度「高」)は、他処理タスクの優先度(優先度「中」)よりも高い。このため、軸J6Aおよび軸J6Bに示すように、タイミングT50で、タスク管理部37は、他処理タスクを実行可能状態へ遷移すると共に、データベース構築タスクを実行状態へ遷移する。
Further, in FIG. 6, another process is started at the timing T20. Since the database construction task is in the standby state during the period of timing T20-T50, the
軸J6Bおよび軸J6Cに示すように、タスク管理部37は、タイミングT50−T70の期間、データベース構築タスクを実行状態とする。また、タイミングT70−T100の期間、書込処理が実行される。軸J6Aに示すように、タイミングT70−T100の期間、タスク管理部37は、他処理タスクを実行状態とする。タイミングT100で、他処理タスクが実行状態となった期間の合計が60ミリ秒となり、他処理が終了する。軸J6Bおよび軸J6Cに示すように、タイミングT100以降は、20ミリ秒のデータベース構築タスクの実行と、30ミリ秒の書込処理とが交互に繰り返し実行される。
As shown on the axis J6B and the axis J6C, the
図7は、図6との比較のために、タスク管理部37が、仮に、書込速度のレベルにかかわらず、データベース構築タスクの優先度を、他処理タスクの優先度に比して相対的に低くした場合に、データベース構築タスクと他処理タスクとにCPU11が割り当てられる期間を示す。データベース構築処理よりも他処理を優先的に実行することを意図して、データベース構築タスクの優先度を固定的に低くすると、図7に示すタイミングでデータベース構築タスクと他処理とにCPU11の割り当てが行われることになる。
In FIG. 7, for comparison with FIG. 6, the
図7において、軸J7Aは他処理タスクにCPU11が割り当てられる期間を時系列で示し、軸J7Bはデータベース構築タスクにCPU11が割り当てられる期間を時系列で示し、軸J7Cは書込処理が実行される期間を時系列で示す。図7では、タスク管理部37は、データベース構築タスクに対して、優先度として、常に、優先度「低」を付与する。それ以外の前提は、図6と同じである。
In FIG. 7, the axis J7A indicates the period in which the
図7に示すように、タイミングT0でデータベース構築処理が開始される。これに伴って、軸J7Bに示すように、タスク管理部37は、タイミングT0−T20の期間、データベース構築処理を実行状態とする。また、軸J7Cに示すように、タイミングT20−T50の期間、書込処理が行われる。
As shown in FIG. 7, the database construction process is started at timing T0. Along with this, as shown on the axis J7B, the
また、図7では、タイミングT20において、他処理が開始される。タイミングT20−T50の期間は、データベース構築タスクは待機状態のため、タスク管理部37は、当該期間、他処理タスクを実行状態とする。タイミングT50で書込処理が完了すると、タスク管理部37は、データベース構築タスクを実行可能状態へと移行する。しかしながら、図7では、データベース構築タスクの優先度(優先度「低」)は、他処理タスクの優先度(優先度「中」)よりも低い。このため、タスク管理部37は、引き続き他処理タスクを実行状態として他処理タスクへのCPU11の割り当てを行う一方、データベース構築タスクの状態を実行可能状態のまま維持する。
Further, in FIG. 7, another process is started at the timing T20. Since the database construction task is in the standby state during the period of timing T20-T50, the
軸J7Aに示すように、他処理タスクはタイミングT60でタイムクォンタムを使い切る。タスク管理部37は、タイミングT60で、他処理タスクに最も低い優先度を付与した上で、他処理タスクを実行可能状態に遷移する。これにより、タイミングT60において、他処理タスクおよびデータベース構築タスクが実行可能状態となるが、優先度はデータベース構築タスクの方が高くなる。従って、軸J7Bに示すように、タスク管理部37は、データベース構築タスクを実行状態へ遷移する。
As shown on axis J7A, the other processing task runs out of time quantum at timing T60. At the timing T60, the
軸J7Bおよび軸J7Cに示すように、タスク管理部37は、タイミングT60−T80の期間、データベース構築タスクを実行状態とする。また、タイミングT80−T110の期間、書込処理が実行される。軸J7Bに示すように、タスク管理部37は、タイミングT80でデータベース構築タスクを待機状態へ遷移する。軸J7Aに示すように、タスク管理部37は、タイミングT80で、他処理タスクの優先度をリセットすると共に、他処理タスクを実行状態へ遷移する。
As shown on the axis J7B and the axis J7C, the
軸J7Aに示すように、タイミングT100で、他処理タスクが実行状態となった期間の合計が60ミリ秒となり、他処理が終了する。軸J7Bおよび軸J7Cに示すように、タイミングT110で書込処理が完了する。タイミングT110以降は、20ミリ秒のデータベース構築タスクの実行と、30ミリ秒の書込処理とが交互に繰り返し実行される。 As shown on the axis J7A, at the timing T100, the total period during which the other processing task is in the execution state becomes 60 milliseconds, and the other processing ends. As shown on the axis J7B and the axis J7C, the writing process is completed at the timing T110. After the timing T110, the execution of the database construction task for 20 milliseconds and the writing process for 30 milliseconds are alternately and repeatedly executed.
以下、図6と図7とを比較する。図6と図7との比較で明らかなとおり、図6と図7とでは、他処理が完了するタイミングは、共に、タイミングT100であり、変わりはない。一方、図6の軸J6Cに示すように、図6では、3回分の書込処理が完了するタイミングは、タイミングT150である。一方、図7の軸J7Cに示すように、図7では、3回分の書込処理が完了するタイミングは、タイミングT160である。このように、図6では、書込速度のレベルが高速レベルのときに、データベース構築タスクに付与する優先度を高くすることにより、図7と比較して、同一量のデータの書き込みに要する時間を短くでき、データベースの構築が完了するタイミングを早めることができる。 Hereinafter, FIG. 6 and FIG. 7 will be compared. As is clear from the comparison between FIGS. 6 and 7, in FIGS. 6 and 7, the timing at which the other processing is completed is the timing T100, and there is no difference. On the other hand, as shown by the axis J6C of FIG. 6, in FIG. 6, the timing at which the three writing processes are completed is the timing T150. On the other hand, as shown by the axis J7C of FIG. 7, in FIG. 7, the timing at which the three writing processes are completed is the timing T160. As described above, in FIG. 6, when the writing speed level is high, the time required to write the same amount of data is increased as compared with FIG. 7 by increasing the priority given to the database construction task. Can be shortened, and the timing when the database construction is completed can be accelerated.
図8は、本実施形態に係るタスク管理装置100のタスク管理部37の動作例を示すフローチャートである。タスク管理部37は、図8のフローチャートが示す処理を、データベース構築処理が実行されている間、所定の周期で繰り返し実行する。
FIG. 8 is a flowchart showing an operation example of the
図8のフローチャートに示すように、タスク管理部37は、アクセス量検出部36により検出された同時アクセス量を取得する(ステップS1)。次いで、タスク管理部37は、ステップS1で取得した同時アクセス量に基づいて、書込速度のレベルを判定する(ステップS2)。ステップS2において、タスク管理部37は、取得した同時アクセス量が所定の閾値を下回る場合は、書込速度のレベルが高速レベルである判定し、当該所定の閾値以上の場合は、書込速度のレベルが低速レベルであると判定する。
As shown in the flowchart of FIG. 8, the
次いで、タスク管理部37は、書込速度のレベルに基づいて、データベース構築タスクの優先度を決定する(ステップS3)。上述したように、タスク管理部37は、書込速度が速いレベルほど、データベース構築タスクの優先度を低くする。
Next, the
以上の処理が行われる結果、データベース構築タスクの優先度は、実際の書込速度のレベルに応じて、書込速度が速いレベルほどデータベース構築タスクの優先度が低くなるように、動的に変動する。 As a result of the above processing, the priority of the database construction task dynamically fluctuates according to the level of the actual write speed so that the higher the write speed, the lower the priority of the database construction task. To do.
以上詳しく説明したように、本実施形態に係るタスク管理装置100のタスク管理部37は、データベース構築処理が実行される間、データベース構築処理に係る一のタスクをCPU11に割り当てて実行させた後、メモリー制御部32により当該一のタスクにおいて転送されたデータについての書き込みが完了した場合に、データベース構築処理に係る次のタスクのCPU11への割り当てを試みる。その上で、タスク管理部37は、メモリー制御部32の書込速度のレベルを判定し、書込速度が速いレベルほど、データベース構築処理に係るタスクのCPU11への割り当ての優先度を低くする。
As described in detail above, the
この構成によれば、上述したように、携帯端末KTから受信した楽曲情報に基づいて楽曲情報データベースDB1の構築が行われる際に、当該データベースの構築が完了するタイミングの遅延を抑制した上で、データベース構築処理と同じ処理リソースであるCPU11を使用する他処理が発生した場合に、当該他処理が完了するタイミングを早くすることができる。
According to this configuration, as described above, when the music information database DB1 is constructed based on the music information received from the mobile terminal KT, the delay in the timing at which the construction of the database is completed is suppressed, and then the delay is suppressed. When another process using the
なお、以上の第1実施形態では、タスク管理部37は、記憶媒体(第1実施形態では、メモリー17)への同時アクセス量に基づいて書込速度のレベルを判定した。この点に関し、タスク管理部37が、記憶媒体の種別(ハードディスク、NAND型フラッシュメモリー、NOR型フラッシュメモリー等)に基づいて、書込速度のレベルを判定する構成でもよい。記憶媒体に種別によって書込速度に低速、高速の違いがあるからである。この場合、例えば、タスク管理部37は、メモリー制御部32と通信して記憶媒体の種別を取得する。また例えば、記憶媒体の種別を示す情報が事前に所定の記憶領域に記憶され、タスク管理部37は、記憶された情報に基づいて記憶媒体の種別を取得する。
In the above first embodiment, the
また、タスク管理部37が、記憶媒体の使用期間に基づいて、書込速度のレベルを判定する構成でもよい。一般に、記憶媒体の使用期間が長いほど、記憶媒体の経年劣化が進み、経年劣化が進むほど、書込速度が遅くなっていくからである。この場合、例えば、OS、その他のプログラムの機能により、記憶媒体の使用期間を示す情報がログに記憶され、タスク管理部37は、ログに基づいて記憶媒体の使用期間を取得する。また、タスク管理部37が、記憶媒体の使用期間と同様の理由で、記憶媒体の読み書き回数に基づいて、書込速度のレベルを判定する構成でもよい。
Further, the
なお、記憶媒体の種別は、データベース構築処理が行われている間に変化するものではなく、また、記憶媒体の使用期間および記憶媒体の読み書き回数は、データベース構築処理が行われている間の変化量が微少であり、変化しないものとみなすことができる。これを踏まえ、記憶媒体の種別、記憶媒体の使用期間、又は、記憶媒体の読み書き回数に基づいて書込速度のレベルを判定する構成の場合、タスク管理部37が、データベース構築処理が開始されたときに、書込速度のレベルを判定してデータベース構築タスクに付与する優先度を決定し、そのデータベース構築処理が実行されている間、決定した優先度を変化させない構成でもよい。また、記憶媒体の種別、記憶媒体の使用期間、および、記憶媒体の読み書き回数のうち、2つ以上を組み合わせて、書込速度のレベルを判定する構成でもよい。また、記憶媒体の種別、記憶媒体の使用期間、および、記憶媒体の読み書き回数のうち少なくとも1つを使用して書込速度のレベルを判定した上で、さらに、同時アクセス量に基づいて、書込速度のレベルを調整する構成でもよい。
The type of storage medium does not change while the database construction process is being performed, and the period of use of the storage medium and the number of times the storage medium is read / written are changed during the database construction process. The amount is insignificant and can be considered unchanged. Based on this, in the case of a configuration in which the writing speed level is determined based on the type of storage medium, the usage period of the storage medium, or the number of times of reading and writing of the storage medium, the
以上、書込速度のレベルを判定する際に使用するパラメータに関する事項については、後述する第2、第3実施形態についても同様である。 As described above, the matters relating to the parameters used when determining the level of the writing speed are the same for the second and third embodiments described later.
また、タスク管理部37が、メモリー制御部32の書込速度を実測することによって、書込速度のレベルを判定する構成でもよい。この構成の場合、例えば、タスク管理部37は、所定のタイミングで、メモリー制御部32にテスト用データの書き込みを行わせ、書き込みに要した時間を実測する。所定のタイミングは、例えば、タスク管理装置100の電源がオンされたタイミングである。間隔をあけて定期的に書込速度を実測する構成でもよい。この構成によれば、タスク管理部37は、実際の書込速度に基づいて、適切に、データベース構成タスクの優先度を決定できる。このことは、後述する第2、第3実施形態についても同様である。
Further, the
(第2実施形態)
次に、本発明の第2実施形態を図面に基づいて説明する。なお、以下の第2実施形態において、第1実施形態の構成要素と対応する構成要素については同一の符号を付し、その詳細な説明を省略する。
(Second Embodiment)
Next, a second embodiment of the present invention will be described with reference to the drawings. In the following second embodiment, the components corresponding to the components of the first embodiment are designated by the same reference numerals, and detailed description thereof will be omitted.
図9は、本実施形態に係るタスク管理装置100Aの機能的構成例を示すブロック図である。図9と図2との比較で明らかなとおり、本実施形態に係るタスク管理装置100Aは、タスク管理部37に代えてタスク管理部37Aを備えている点で、第1実施形態に係るタスク管理装置100と機能構成が異なっている。
FIG. 9 is a block diagram showing a functional configuration example of the
ここで、本実施形態では、動作モードとして、メモリー17に事前に記憶された動画ファイルのデータベースを用いた動画の視聴が可能な動画視聴モードがある。この動画視聴モードでは、メモリー関連処理実行部33は、メモリー関連処理として、ユーザの指示に応じて、データベースを使用して動画ファイルを検索する処理や、メモリー17に記憶された動画ファイルをメモリー制御部32を介して読み出して動画を出力する処理を実行する。すなわち、動作モードが動画視聴モードの場合、メモリー関連処理実行部33は、ユーザの指示に応じて、メモリー17へのアクセスを伴う処理(=ソースとしてメモリー17を使用する処理)を実行する。動作モードとして動画視聴モードが選択されている状態は、ユーザによって、メモリー17がソースとして選択された状態に相当する。
Here, in the present embodiment, as an operation mode, there is a moving image viewing mode in which a moving image can be viewed using a database of moving image files stored in advance in the
なお、本実施形態では、説明の便宜のため、メモリー関連処理実行部33がメモリー関連処理(メモリー17へのアクセスを伴う処理)を実行する可能性のある動作モードとしては、上述した動画視聴モードのみがあるものとする。ただし、動画視聴モードに代えて、または、動画視聴モードに加えて、メモリー関連処理実行部33がメモリー関連処理を実行する可能性のある動作モードがあってもよい。例えば、車載装置1が、地図表示を伴う機能(自車位置表示機能や、ナビゲーション機能)を有し、メモリー17に地図データが記憶されている場合において、メモリー関連処理実行部33により地図データを用いた処理が実行される動作モードがあってもよい。
In the present embodiment, for convenience of explanation, the above-described moving image viewing mode is defined as an operation mode in which the memory-related
また、本実施形態では、動作モードとして、メディアモードがある。このメディアモードでは、メディア関連処理実行部34は、メディア関連処理として、メディア再生装置500へのアクセスを伴う処理(=ソースとしてメディア再生装置500を使用する処理)を実行する。動作モードとしてメディアモードが選択されている状態は、ユーザによって、メディア再生装置500がソースとして選択された状態に相当する。
Further, in the present embodiment, there is a media mode as an operation mode. In this media mode, the media-related
また、本実施形態では、動作モードとして、ラジオモードがある。このラジオモードでは、ラジオ関連処理実行部35は、ラジオ関連処理として、ラジオ受信装置600へのアクセスを伴う処理(=ソースとしてラジオ受信装置600を使用する処理)を実行する。動作モードとしてラジオモードが選択されている状態は、ユーザによって、ラジオ受信装置600がソースとして選択された状態に相当する。
Further, in the present embodiment, there is a radio mode as an operation mode. In this radio mode, the radio-related
動画視聴モードと、メディアモードと、ラジオモードとは、排他的に選択可能であり、同時に複数の動作モードを選択することはできない。 The video viewing mode, the media mode, and the radio mode can be exclusively selected, and a plurality of operation modes cannot be selected at the same time.
本実施形態では、タスク管理部37Aは、データベース構築タスクの優先度の決定に関し、以下の処理を実行する。すなわち、タスク管理部37Aは、データベース構築タスクの優先度を、「書込速度のレベル」および「データベース構築処理と並行して実行される他処理の予測される処理負荷」の2つのパラメータを使用して決定する。
In the present embodiment, the
タスク管理部37Aは、第1実施形態と同様、書込速度のレベルが速いほど、データベース構築タスクの優先度が低くなるように、データベース構築タスクの優先度を暫定的に決定する。その上で、タスク管理部37Aは、データベース構築処理と並行して実行される他処理の処理負荷を予測し、書込速度のレベルに基づいて決定した優先度を、予測した処理負荷が大きいほど優先度が低くなるように調整し、最終的な優先度を決定する。また、処理負荷の予測に際し、タスク管理部37Aは、ユーザによって選択されたソースの種類(本実施形態では、メモリー17、メディア再生装置500またはラジオ受信装置600)に基づいて、データベース構築処理と並行して実行される他処理の処理負荷を予測する。
Similar to the first embodiment, the
以下、タスク管理部37Aの処理について詳述する。データベース構築処理が行われている間、タスク管理部37Aは、所定の周期で、以下で示す優先度設定処理を実行する。すなわち、優先度設定処理において、まず、タスク管理部37Aは、アクセス量検出部36により検出された同時アクセス量を取得する。次いで、タスク管理部37Aは、メモリー制御部32の書込速度のレベルを判定する。本実施形態では、第1実施形態と同様、書込速度のレベルとして、高速レベルと、低速レベルとの2つがある。タスク管理部37Aは、取得した同時アクセス量が所定の閾値を下回る場合は、書込速度のレベルが高速レベルである判定し、当該所定の閾値を上回る場合は、書込速度のレベルが低速レベルであると判定する。
Hereinafter, the processing of the
書込速度のレベルを判定した後、タスク管理部37Aは、データベース構築処理と並行して実行される他処理の処理負荷のレベル(以下、「他処理負荷レベル」という。)を予測する。本実施形態では、他処理負荷レベルとして、処理負荷が大きい順に、レベル「大」、レベル「中」、レベル「小」がある。
After determining the write speed level, the
以下、他処理負荷レベルを予測するときのタスク管理部37Aの処理について詳述する。本実施形態では、上述したように、動作モードとして、動画視聴モードと、メディアモードと、ラジオモードとがある。これら動作モードは、それぞれ、ソースが異なる。そして、発明者らは、ソースが異なることに起因して、動作モードごとに、動作モードが選択されているときに実行される処理の処理負荷の大きさに傾向があることを見出した。つまり、動作モードごとにソースが異なることに起因して、大きい処理負荷の処理が発生する傾向にある動作モードや、小さい処理負荷の処理が発生する傾向にある動作モードが存在し、大きい処理負荷の処理が発生する傾向にある動作モードが選択されている場合には、実行される処理の処理負荷は大きい可能性が高く、一方、小さい処理負荷の処理が発生する傾向にある動作モードが選択されている場合には、実行される処理の処理負荷は小さい可能性が高い。
Hereinafter, the processing of the
以上を踏まえ、本実施形態では、タスク管理部37Aは、現時点で選択されている動作モードによって、他処理負荷レベルを予測する。具体的には、タスク管理部37Aは、動作モードとして動画視聴モードが選択されている場合は、他処理負荷レベルをレベル「大」と予測し、動作モードとしてメディアモードが選択されている場合は、他処理負荷レベルをレベル「中」と予測し、動作モードとしてラジオモードが選択されている場合は、他処理負荷レベルをレベル「小」と予測する。これは、本実施形態では、動画視聴モードが選択されている場合に実行される他処理の処理負荷は、他の動作モードが選択されている場合と比較して大きい傾向があり、ラジオモードが選択されている場合に実行される他処理の処理負荷は、他の動作モードが選択されている場合と比較して小さい傾向があり、メディアモードが選択されている場合に実行される他処理の処理負荷は、動画視聴モードが選択されている場合における処理負荷とラジオモードが選択されている場合における処理負荷との中間くらいになる傾向があることを意味する。
Based on the above, in the present embodiment, the
なお、現時点で選択されている動作モードは、設定ファイルに記録されており、タスク管理部37Aは、設定ファイルを参照して、現時点で選択されている動作モードを認識する。タスク管理部37Aが動作モードを認識する方法は、どのような方法であってもよい。
The currently selected operation mode is recorded in the setting file, and the
、
他処理負荷レベルを予測した後、タスク管理部37Aは、書込速度のレベルに応じて、第1実施形態と同じ方法で、暫定的にデータベース構築タスクの優先度を決定する。すなわち、タスク管理部37Aは、書込速度のレベルが高速レベルの場合は、暫定的に、他処理に係るタスクの優先度に対して相対的に低い優先度をデータベース構築タスクに付与する。一方、タスク管理部37Aは、書込速度のレベルが低速レベルの場合は、暫定的に、他処理に係るタスクの優先度に対して相対的に高い優先度をデータベース構築タスクに付与する。以下、暫定的に決定した優先度を「暫定優先度」という。
,
After predicting the other processing load level, the
その上で、タスク管理部37Aは、予測した他処理負荷レベルに基づいて、暫定優先度を調整する。詳述すると、タスク管理部37Aは、暫定優先度が他処理タスクの優先度に対して相対的に高い優先度の場合において、予測した他処理負荷レベルがレベル「大」の場合は、データベース構築タスクの最終的な優先度を、他処理に係るタスクの優先度に対して相対的に低い優先度とする。また、タスク管理部37Aは、暫定優先度が他処理タスクの優先度に対して相対的に低い優先度の場合において、予測した他処理負荷レベルがレベル「小」の場合は、データベース構築タスクの最終的な優先度を、他処理タスクの優先度に対して相対的に高い優先度とする。それ以外の場合、タスク管理部37Aは、暫定優先度を、データベース構築タスクの最終的な優先度とする。
Then, the
例えば、タスクの優先度として、「高」、「中」、「低」があるとする。そして、他処理について、固定的に優先度として「中」が付与されるとする。この場合、タスク管理部37Aは、書込速度のレベルが低速レベルの場合は暫定優先度を優先度「高」とし、書込速度のレベルが高速レベルの場合は暫定優先度を優先度「低」とする。そして、タスク管理部37Aは、暫定優先度が優先度「高」の場合であっても、予測した他処理負荷レベルがレベル「大」の場合には、最終的な優先度を優先度「低」とする。一方、タスク管理部37Aは、暫定優先度が優先度「低」の場合であっても、予測した他処理負荷レベルがレベル「小」の場合には、最終的な優先度を優先度「高」とする。
For example, suppose there are "high", "medium", and "low" priority tasks. Then, it is assumed that "medium" is fixedly given as a priority for other processes. In this case, the
本実施形態において、タスク管理部37Aが上述した方法でデータベース構築タスクの最終的な優先度を決定することにより、以下の効果を奏する。すなわち、データベース構築タスクの優先度を他処理タスクの優先度よりも高くした場合、データベース構築タスクの優先度を他処理タスクの優先度よりも低くした場合と比較して、基本的には他処理が完了するタイミングの遅延の度合いが大きい。さらに、データベース構築タスクの優先度を他処理タスクの優先度よりも高くした場合、データベース構築処理と並行して実行される他処理の処理負荷が大きければ大きいほど、当該他処理が完了するタイミングの遅延の度合いは大きくなる。従って、書込速度が遅い場合であっても、他処理の処理負荷が非常に大きい場合に、データベース構築タスクの優先度を他処理タスクの優先度よりも高くすると、他処理の処理が完了するタイミングの著しい遅延を招く可能性がある。
In the present embodiment, the
以上を踏まえ、本実施形態によれば、タスク管理部37Aは、暫定優先度が優先度「高」の場合であっても、予測した他処理負荷レベルがレベル「大」の場合には、最終的な優先度を優先度「低」とする。このため、処理負荷が大きい他処理が発生する可能性が高い状況下で、実際に処理負荷が大きい他処理が発生したときに、当該他処理が完了するタイミングが著しく遅延することを防止でき、ユーザの満足度が低下することを抑制できる。なお、本実施形態では、上述したように、動作モードと他処理負荷レベルとが対応付けられており、選択されている動作モードに応じて、他処理負荷レベルが予測されるが、1の動作モードに、レベル「大」の他処理負荷レベルを対応付けるか否かは、当該1の動作モードが選択されている場合、データベース構築タスクの優先度が他処理タスクの優先度よりも高い場合に著しい遅延が生じるほど処理負荷の高い他処理が、相当な頻度で発生するか否かが考慮されて適切に定められる。
Based on the above, according to the present embodiment, the
また、データベース構築処理と並行して実行される他処理の処理負荷が非常に小さい場合は、書込速度が速いことに起因してデータベース構築処理の優先度を高くした場合であっても、他処理が完了するタイミングの遅延は、ユーザの満足度に影響しない程度に微小である。データベース構築処理が入出力の完了待ちの状態の期間だけ他処理タスクを実行しても、他処理タスクを短時間で完了させることができるからである。これを踏まえ、本実施形態によれば、タスク管理部37Aは、暫定優先度が優先度「低」の場合であっても、予測した他処理負荷レベルがレベル「小」の場合には、最終的な優先度を優先度「高」とする。このため、処理負荷が小さい他処理が発生する可能性が高いことを活用して、他処理の遅延によるユーザの満足度の低下を抑制した上で、データベースの構築をより早く完了できる。なお、1の動作モードに、レベル「小」の他処理負荷レベルを対応付けるか否かは、当該1の動作モードが選択されている場合、データベース構築タスクの優先度が他処理タスクの優先度よりも高い場合であっても、ユーザの満足度に影響を与えない程度に微小な遅延しか生じさせないほど処理負荷の小さい他処理が、相当な頻度で発生し得るか否かが考慮されて適切に定められる。
In addition, if the processing load of other processing executed in parallel with the database construction processing is very small, even if the priority of the database construction processing is increased due to the high writing speed, other processing may occur. The delay in the timing at which the processing is completed is so small that it does not affect the user's satisfaction. This is because the other processing task can be completed in a short time even if the other processing task is executed only during the period in which the database construction process is waiting for the completion of input / output. Based on this, according to the present embodiment, the
図10は、データベース構築処理と並行して他処理が行われる場合に、データベース構築タスクにCPU11が割り当てられる期間(=実行状態の期間)と、他処理に係るタスクにCPU11が割り当てられる期間とを、メモリー制御部32が書込処理を行う期間と共に示すタイムチャートである。図10において、軸J10Aは他処理タスクにCPU11が割り当てられる期間を時系列で示し、軸J10Bはデータベース構築タスクにCPU11が割り当てられる期間を時系列で示し、軸J10Cは書込処理が実行される期間を時系列で示す。
FIG. 10 shows a period in which the
図10は、タスク管理部37Aが、書込速度のレベルを高速レベルと判定し、データベース構築タスクに対して、暫定優先度として、他処理タスクよりも相対的に低い優先度を付与する場合に、データベース構築タスクと他処理タスクとにCPU11が割り当てられる期間を示している。
FIG. 10 shows a case where the
図10は、以下のことを前提とする。すなわち、図10で示す期間の間、タスク管理部37Aは、継続して、書込速度のレベルを高速レベルと判定し、データベース構築タスクに、暫定優先度として優先度「低」を付与する。また、図10では、データベース構築タスクでメモリー制御部32に転送されたデータベース構成データをメモリー17に書き込む処理に要する時間は、一律で「10ミリ秒」である。また、図10では、タイミングT0で、データベース構築処理が開始される。
FIG. 10 assumes the following. That is, during the period shown in FIG. 10, the
また、図10では、動作モードとして動画視聴モードが選択されているときに発生する他処理は、他処理タスクが合計して、100ミリ秒、実行状態となった場合(=CPU11に割り当てられた時間の累計が100ミリ秒となった場合)、一律で処理が完了する。また、動作モードとしてメディアモードが選択されているときに発生する他処理は、他処理タスクが合計して、60ミリ秒、実行状態となった場合(=CPU11に割り当てられた時間の累計が60ミリ秒となった場合)、一律で処理が完了する。また、動作モードとしてラジオモードが選択されているときに発生する他処理は、他処理タスクが合計して、20ミリ秒、実行状態となった場合(=CPU11に割り当てられた時間の累計が20ミリ秒となった場合)、一律で処理が完了する。
Further, in FIG. 10, the other processing that occurs when the moving image viewing mode is selected as the operation mode is the case where the other processing tasks are in the execution state for 100 milliseconds in total (= assigned to the CPU 11). When the cumulative total of time reaches 100 milliseconds), the process is completed uniformly. In addition, the other processing that occurs when the media mode is selected as the operation mode is when the other processing tasks are in the execution state for 60 milliseconds in total (= the cumulative total of the time allocated to the
また、図10では、タイミングT0で、ユーザにより動画視聴モードが選択され、また、タスク管理部37Aにより優先度設定処理が実行される。タイミングT0で実行される優先度設定処理については後述する。また、図10では、タイミングT20で、他処理(動作モードが動画視聴モードのため、処理の実行に要する時間は100ミリ秒)が開始される。また、図10では、タイミングT190で、ユーザにより動画視聴モードに代えてラジオモードが選択され、選択後、タスク管理部37Aにより優先度設定処理が実行される。タイミングT190で実行される優先度設定処理については後述する。このように図10では、タイミングT0−T190の期間、動作モードが動画視聴モードであり、タイミングT190以降は、動作モードがラジオモードである。また、図10では、タイミングT210で、他処理(動作モードがラジオモードのため、処理に要する時間は20ミリ秒)が開始される。
Further, in FIG. 10, at the timing T0, the moving image viewing mode is selected by the user, and the priority setting process is executed by the
その他の前提は、図3の前提と同じである。 Other assumptions are the same as those in FIG.
さて、図10に示すように、タイミングT0で、データベース構築処理が開始される。また、上述したように、タイミングT0で、ユーザにより動画視聴モードが選択されると共に、タスク管理部37Aにより優先度設定処理が実行される。優先度設定処理において、タスク管理部37Aは、以下の処理を実行する。すなわち、タスク管理部37Aは、書込速度のレベルを高速レベルと判定し、データベース構築タスクに、暫定優先度として優先度「低」を付与する。次いで、タスク管理部37Aは、選択されている動作モードが動画視聴モードであることを認識する。次いで、タスク管理部37Aは、動作モードが動画視聴モードであるため、他処理負荷レベルをレベル「大」と予測する。次いで、タスク管理部37Aは、他処理負荷レベルがレベル「大」であるため、暫定優先度(優先度「低」)をそのまま最終的な優先度として決定する。
By the way, as shown in FIG. 10, the database construction process is started at the timing T0. Further, as described above, at the timing T0, the moving image viewing mode is selected by the user, and the priority setting process is executed by the
図10に示すように、動作モードが動画視聴モードである期間は、データベース構築タスクの優先度は、他処理タスクの優先度よりも低い。このように、書込速度のレベルが高速レベルのときに、データベース構築タスクの優先度が他処理タスクの優先度よりも低いことの効果は、第1実施形態で述べたとおりである。 As shown in FIG. 10, the priority of the database construction task is lower than the priority of the other processing task during the period when the operation mode is the moving image viewing mode. As described above, the effect that the priority of the database construction task is lower than the priority of the other processing task when the write speed level is high is as described in the first embodiment.
上述したように、タイミングT190で、ユーザによりラジオモードが選択されると共に、タスク管理部37Aにより優先度設定処理が実行される。優先度設定処理において、タスク管理部37Aは、以下の処理を実行する。すなわち、タスク管理部37Aは、書込速度のレベルを高速レベルと判定し、データベース構築タスクに、暫定優先度として優先度「低」を付与する。次いで、タスク管理部37Aは、選択されている動作モードがラジオモードであることを認識する。次いで、タスク管理部37Aは、動作モードがラジオモードであるため、他処理負荷レベルをレベル「小」と予測する。次いで、タスク管理部37Aは、他処理負荷レベルがレベル「小」であるため、暫定優先度を変更し、最終的な優先度を優先度「高」とする。
As described above, at the timing T190, the radio mode is selected by the user, and the priority setting process is executed by the
図10に示すように、動作モードがラジオモードである期間は、書込速度のレベルが高速レベルであるにもかかわらず、データベース構築タスクの優先度は、他処理タスクの優先度よりも高い。この点が、第1実施形態と相違する。このように、動作モードがラジオモードの期間では、データベース構築タスクの優先度は、他処理タスクの優先度よりも高いが、当該期間で発生した他処理は、その処理負荷が非常に小さく、データベース構築タスクの優先度が他処理タスクの優先度よりも高いことに起因して生じる遅延が小さい。また、動作モードがラジオモードのときに発生する他処理は、処理負荷が小さい可能性が高い。 As shown in FIG. 10, during the period when the operation mode is the radio mode, the priority of the database construction task is higher than the priority of the other processing task, even though the writing speed level is high. This point is different from the first embodiment. As described above, in the period when the operation mode is the radio mode, the priority of the database construction task is higher than the priority of the other processing task, but the processing load of the other processing generated in the period is very small, and the database. The delay caused by the higher priority of the build task than that of the other processing task is small. In addition, other processing that occurs when the operation mode is the radio mode is likely to have a small processing load.
図11は、データベース構築処理と並行して他処理が行われる場合に、データベース構築タスクにCPU11が割り当てられる期間(=実行状態の期間)と、他処理に係るタスクにCPU11が割り当てられる期間とを、メモリー制御部32が書込処理を行う期間と共に示すタイムチャートである。図11において、軸J11Aは他処理タスクにCPU11が割り当てられる期間を時系列で示し、軸J11Bはデータベース構築タスクにCPU11が割り当てられる期間を時系列で示し、軸J11Cは書込処理が実行される期間を時系列で示す。
FIG. 11 shows a period in which the
図11は、タスク管理部37Aが、書込速度のレベルを低速レベルと判定し、データベース構築タスクに対して、暫定優先度として、他処理タスクよりも相対的に高い優先度を付与する場合に、データベース構築タスクと他処理タスクとにCPU11が割り当てられる期間を示している。
FIG. 11 shows a case where the
図11は、以下のことを前提とする。すなわち、図11で示す期間の間、タスク管理部37Aは、継続して、書込速度のレベルを低速レベルと判定し、データベース構築タスクに、暫定優先度として優先度「高」を付与する。また、図11では、データベース構築タスクでメモリー制御部32に転送されたデータベース構成データをメモリー17に書き込む処理に要する時間は、一律で「30ミリ秒」である。また、図11では、タイミングT0で、データベース構築処理が開始される。
FIG. 11 assumes the following. That is, during the period shown in FIG. 11, the
また、図11では、タイミングT0で、ユーザによりメディアモードが選択され、また、タスク管理部37Aにより優先度設定処理が実行される。タイミングT0で実行される優先度設定処理については後述する。また、図11では、タイミングT20で、他処理(動作モードがメディアモードのため、処理に要する時間は60ミリ秒)が開始される。また、図11では、タイミングT150で、ユーザによりメディアモードに代えて動画視聴モードが選択され、また、タスク管理部37Aにより優先度設定処理が実行される。タイミングT150で実行される優先度設定処理については後述する。このように図11では、タイミングT0−T150の期間、動作モードがメディアモードであり、タイミングT150以降は、動作モードが動画視聴モードである。また、図11では、タイミングT170で、他処理(動作モードが動画視聴モードのため、処理に要する時間は100ミリ秒)が開始される。
Further, in FIG. 11, at the timing T0, the media mode is selected by the user, and the priority setting process is executed by the
その他の前提は、図10の前提と同じである。 Other assumptions are the same as those in FIG.
さて、図11に示すように、タイミングT0で、データベース構築処理が開始される。また、上述したように、タイミングT0で、ユーザによりメディアモードが選択されると共に、タスク管理部37Aにより優先度設定処理が実行される。優先度設定処理において、タスク管理部37Aは、以下の処理を実行する。すなわち、タスク管理部37Aは、書込速度のレベルを低速レベルと判定し、データベース構築タスクに、暫定優先度として優先度「高」を付与する。次いで、タスク管理部37Aは、選択されている動作モードがメディアモードであることを認識する。次いで、タスク管理部37Aは、動作モードがメディアモードであるため、他処理負荷レベルをレベル「中」と予測する。次いで、タスク管理部37Aは、他処理負荷レベルがレベル「中」であるため、暫定優先度(優先度「高」)をそのまま最終的な優先度として決定する。
By the way, as shown in FIG. 11, the database construction process is started at the timing T0. Further, as described above, at the timing T0, the media mode is selected by the user, and the priority setting process is executed by the
図11に示すように、動作モードがメディアモードである期間は、データベース構築タスクの優先度は、他処理タスクの優先度よりも高い。このように、書込速度のレベルが低速レベルのときに、データベース構築タスクの優先度が他処理タスクの優先度よりも高いことの効果は、第1実施形態で述べたとおりである。 As shown in FIG. 11, during the period when the operation mode is the media mode, the priority of the database construction task is higher than the priority of the other processing task. As described above, the effect that the priority of the database construction task is higher than the priority of the other processing task when the write speed level is low is as described in the first embodiment.
上述したように、タイミングT150で、ユーザにより動画視聴モードが選択されると共に、タスク管理部37Aにより優先度設定処理が実行される。優先度設定処理において、タスク管理部37Aは、以下の処理を実行する。すなわち、タスク管理部37Aは、書込速度のレベルを低速レベルと判定し、データベース構築タスクに、暫定優先度として優先度「高」を付与する。次いで、タスク管理部37Aは、選択されている動作モードが動画視聴モードであることを認識する。次いで、タスク管理部37Aは、動作モードが動画視聴モードであるため、他処理負荷レベルをレベル「大」と予測する。次いで、タスク管理部37Aは、他処理負荷レベルがレベル「大」であるため、暫定優先度を変更し、最終的な優先度を優先度「低」とする。
As described above, at the timing T150, the moving image viewing mode is selected by the user, and the priority setting process is executed by the
図11に示すように、動作モードが動画視聴モードである期間の間は、書込速度のレベルが低速レベルであるにもかかわらず、データベース構築タスクの優先度は、他処理タスクの優先度よりも低い。この点が、第1実施形態と相違する。このように動画視聴モードの期間は、データベース構築タスクの優先度は、他処理タスクの優先度よりも低い。そして、当該期間で発生した他処理は、その処理負荷が非常に大きく、データベース構築タスクの優先度は、他処理タスクの優先度よりも低いことを効果的に活用して、他処理が完了するタイミングの遅延を抑制できる。また、動作モードが動画視聴モードのときに発生する他処理は、処理負荷が大きい可能性が高い。 As shown in FIG. 11, during the period when the operation mode is the video viewing mode, the priority of the database construction task is higher than the priority of the other processing task, even though the writing speed level is low. Is also low. This point is different from the first embodiment. As described above, during the video viewing mode, the priority of the database construction task is lower than the priority of other processing tasks. Then, the other processing generated in the relevant period has a very large processing load, and the other processing is completed by effectively utilizing the fact that the priority of the database construction task is lower than the priority of the other processing task. Timing delay can be suppressed. In addition, other processing that occurs when the operation mode is the moving image viewing mode is likely to have a large processing load.
図12は、本実施形態に係るタスク管理装置100Aのタスク管理部37Aの動作例を示すフローチャートである。タスク管理部37Aは、図12のフローチャートが示す処理を、データベース構築処理が実行されている間、所定の周期で繰り返し実行する。
FIG. 12 is a flowchart showing an operation example of the
図12のフローチャートに示すように、タスク管理部37Aは、アクセス量検出部36により検出された同時アクセス量を取得する(ステップS11)。次いで、タスク管理部37Aは、ステップS11で取得した同時アクセス量に基づいて、書込速度のレベルを判定する(ステップS12)。ステップS12において、タスク管理部37Aは、取得した同時アクセス量が所定の閾値を下回る場合は、書込速度のレベルが高速レベルである判定し、当該所定の閾値以上の場合は、書込速度のレベルが低速レベルであると判定する。
As shown in the flowchart of FIG. 12, the
次いで、タスク管理部37Aは、現時点で選択されている動作モードを認識する(ステップS13)。次いで、タスク管理部37Aは、選択されている動作モードに応じて、他処理負荷レベルを予測する(ステップS14)。次いで、タスク管理部37Aは、ステップS12で判定した書込速度のレベルに基づいて、データベース構築タスクの暫定優先度を決定する(ステップS15)。次いで、タスク管理部37Aは、ステップS14で予測した他処理負荷レベルに基づいて、暫定優先度を調整して、最終的な優先度を決定する(ステップS16)。
Next, the
以上の処理が行われる結果、データベース構築タスクの優先度は、書込速度のレベルおよび予測された他処理負荷レベルを反映して、適切に決定される。 As a result of the above processing, the priority of the database construction task is appropriately determined by reflecting the writing speed level and the predicted other processing load level.
(第3実施形態)
次に、本発明の第3実施形態を図面に基づいて説明する。なお、以下の第3実施形態において、第1実施形態の構成要素と対応する構成要素については同一の符号を付し、その詳細な説明を省略する。
(Third Embodiment)
Next, a third embodiment of the present invention will be described with reference to the drawings. In the following third embodiment, the components corresponding to the components of the first embodiment are designated by the same reference numerals, and detailed description thereof will be omitted.
図13は、本実施形態に係るタスク管理装置100Bの機能的構成例を示すブロック図である。図13と図2との比較で明らかなとおり、本実施形態に係るタスク管理装置100Bは、タスク管理部37に代えてタスク管理部37Bを備えている点で、第1実施形態に係るタスク管理装置100と機能構成が異なっている。
FIG. 13 is a block diagram showing a functional configuration example of the
上述した第1実施形態では、タスク管理部37は、パラメータとして「書込速度のレベル」を使用して、データベース構築タスクの優先度を決定した。また、上述した第2実施形態では、タスク管理部37Aは、パラメータとして「書込速度のレベル」および「データベース構築処理と並行して実行される他処理の予測される処理負荷」を使用して、データベース構築タスクの優先度を決定した。
In the first embodiment described above, the
一方で、本実施形態では、タスク管理部37Bは、データベース構築タスクの優先度の決定に関し、以下の処理を実行する。すなわち、タスク管理部37Bは、データベース構築タスクの優先度を、「データベース構築処理と並行して実行される他処理の予測される処理負荷」を使用して決定する。以下、タスク管理部37Bの処理について詳述する。
On the other hand, in the present embodiment, the
データベース構築処理が行われている間、タスク管理部37Bは、所定の周期で、以下で示す優先度設定処理を実行する。すなわち、優先度設定処理において、まず、タスク管理部37Bは、現時点で選択されている動作モードを認識する。次いで、タスク管理部37Bは、選択されている動作モードに応じて、他処理負荷レベルを予測する。タスク管理部37Bは、第2実施形態で説明した方法と同様の方法で、他処理負荷レベルの予測を実行する。
While the database construction process is being performed, the
次いで、タスク管理部37Bは、予測した他処理負荷レベルが、処理負荷が大きいレベルほど、データベース構築タスクの優先度を低くする。換言すれば、タスク管理部37Bは、予測した他処理負荷レベルが、処理負荷が小さいレベルほど、データベース構築タスクの優先度を高くする。
Next, the
例えば、タスクの優先度として、高い順に、「高」、「中」、「低」があるとし、他処理タスクには、常に、優先度「中」が付与されるとする。この場合において、タスク管理部37Bは、予測した他処理負荷レベルがレベル「大」の場合、データベース構築タスクに、優先度として、優先度「低」を付与する。一方、タスク管理部37Bは、予測した他処理負荷レベルがレベル「小」の場合、データベース構築タスクに、優先度として、優先度「高」を付与する。
For example, it is assumed that the priority of tasks is "high", "medium", and "low" in descending order, and the priority "medium" is always given to other processing tasks. In this case, when the predicted other processing load level is the level "large", the
以上のように、本実施形態では、タスク管理部37Bは、書込速度を使用することなく、予測した他処理負荷レベルに基づいて、データベース構築タスクの優先度を決定する。予測した処理負荷が大きいほど、データベース構築タスクの優先度を低くし、予測した処理負荷が小さいほど、データベース構築タスクの優先度を高くすることの効果は、第2実施形態で述べたとおりである。
As described above, in the present embodiment, the
図14は、本実施形態に係るタスク管理装置100Bのタスク管理部37Bの動作例を示すフローチャートである。タスク管理部37Bは、図14のフローチャートが示す処理を、データベース構築処理が実行されている間、所定の周期で繰り返し実行する。
FIG. 14 is a flowchart showing an operation example of the
図14のフローチャートに示すように、タスク管理部37Bは、現時点で選択されている動作モードを認識する(ステップS21)。次いで、タスク管理部37Bは、ステップS21で認識した動作モードに応じて、他処理負荷レベルを予測する(ステップS22)。次いで、タスク管理部37Bは、テップS22で予測した他処理負荷レベルに基づいて、最終的な優先度を決定する(ステップS23)。上述したように、タスク管理部37は、予測した処理負荷が大きいほど、データベース構築タスクの優先度を低くし、予測した処理負荷が小さいほど、データベース構築タスクの優先度を高くする。
As shown in the flowchart of FIG. 14, the
以上の処理が行われる結果、データベース構築タスクの優先度は、現時点で選択されている動作モードに応じて、予測した処理負荷が大きいほど、データベース構築タスクの優先度が低くなるように、動的に変動する。 As a result of the above processing, the priority of the database construction task is dynamically set so that the higher the predicted processing load, the lower the priority of the database construction task, depending on the operation mode currently selected. Fluctuates to.
なお、上述した各実施形態では、タスク管理装置100、100A、100Bは、車両に搭載される車載装置1に適用されていた。しかしながら、タスク管理装置100、100A、100Bが、車載装置1に適用される装置である必要は無い。すなわち、本発明は、外部装置から受信した情報に基づいてデータベースを構築する装置に広く適用可能である。
In each of the above-described embodiments, the
また、上述した各実施形態では、タスク管理装置100、100A、100Bは、外部装置から、構築用情報として楽曲情報を受信し、楽曲情報に基づいて楽曲情報データベースDB1を構築する構成であった。この点に関し、タスク管理装置100、100A、100Bがデータベースの構築のために受信する情報は、楽曲情報である必要はない。
Further, in each of the above-described embodiments, the
また、ユーザが他処理の実行を指示できない期間は、ユーザが他処理の実行を指示できる期間と比較して、データベース構築タスクの優先度を高くする構成としてもよい。例えば、タスク管理装置100を含む車載装置1への電力はアクセサリ電源より供給されるが、アクセサリ電源がオンされた後の所定の期間は、ディスプレイ200に画像が表示されず、ユーザがタッチ操作による指示を行えない状態で、各種起動処理が行われる。この期間は、ユーザが他処理の実行を指示できない期間であり、この期間について、起動処理が終わり、ユーザが他処理の実行を指示できるようになった期間よりも、データベース構築タスクの優先度を高くする構成としてもよい。つまり、上述した各実施形態で挙げたパラメータ以外に、車載装置1(タスク管理装置100)の状態を変化させるような装置外からの要素を、データベース構築タスクの優先度を決めるときに用いるパラメータとして使用してもよい。
Further, the period during which the user cannot instruct the execution of the other process may be configured to give higher priority to the database construction task than the period during which the user can instruct the execution of the other process. For example, power to the in-vehicle device 1 including the
その他、上記実施形態は、何れも本発明を実施するにあたっての具体化の一例を示したものに過ぎず、これによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその要旨、またはその主要な特徴から逸脱することなく、様々な形で実施することができる。 In addition, the above embodiments are merely examples of embodiment of the present invention, and the technical scope of the present invention should not be construed in a limited manner. That is, the present invention can be implemented in various forms without departing from its gist or its main features.
11 CPU(第2の処理リソース)
17 メモリー(記憶媒体)
18 メモリーコントローラ
31 データベース構築部
32 メモリー制御部(書込制御部)
33 メモリー関連処理実行部(他処理実行部)
34 メディア関連処理実行部(他処理実行部)
35 ラジオ関連処理実行部(他処理実行部)
37 タスク管理部
100 タスク管理装置
DB1 楽曲情報データベース(データベース)
KT 携帯端末(外部装置)
11 CPU (second processing resource)
17 Memory (storage medium)
18
33 Memory-related processing execution unit (other processing execution unit)
34 Media-related processing execution unit (other processing execution unit)
35 Radio-related processing execution unit (other processing execution unit)
37
KT mobile terminal (external device)
Claims (8)
外部装置から受信した構築用情報に基づいてデータベースを生成すると共に、上記データベースを構成するデータを上記書込制御部に転送するデータベース構築処理を、上記第1の処理リソースとは異なる第2の処理リソースを使用して実行するデータベース構築部と、
上記第2の処理リソースを使用して、上記データベース構築処理以外の処理である他処理を実行する他処理実行部と、
上記データベース構築処理が実行される間、上記データベース構築処理に係る一のタスクを上記第2の処理リソースに割り当てて実行させた後、上記書込制御部により当該一のタスクにおいて転送されたデータについての書き込みが完了した場合に、上記データベース構築処理に係る次のタスクの上記第2の処理リソースへの割り当てを試みる一方、
上記書込制御部の書込速度のレベルを判定し、書込速度が速いレベルほど、上記データベース構築処理に係るタスクの上記第2の処理リソースへの割り当ての優先度を低くするタスク管理部と、
を備えることを特徴とするタスク管理装置。 A write control unit that executes writing of the transferred data to the storage medium using the first processing resource, and
The database construction process of generating the database based on the construction information received from the external device and transferring the data constituting the database to the write control unit is a second process different from the first process resource. Database construction department that executes using resources, and
Using the second processing resource, the other processing execution unit that executes other processing that is processing other than the database construction processing, and
While the database construction process is being executed, the data transferred in the one task by the write control unit after the one task related to the database construction process is assigned to the second processing resource and executed. When the writing of is completed, while trying to allocate the next task related to the database construction process to the second process resource, while
The task management unit determines the level of the write speed of the write control unit, and the higher the write speed, the lower the priority of allocating the task related to the database construction process to the second processing resource. ,
A task management device characterized by comprising.
上記記憶媒体への同時アクセス量、上記記憶媒体の種別、上記記憶媒体の使用期間、および、上記記憶媒体の読み書き回数のうちの少なくともいずれか1つに基づいて上記書込速度のレベルを判定することを特徴とする請求項1に記載のタスク管理装置。 The above task management department
The level of the writing speed is determined based on at least one of the amount of simultaneous access to the storage medium, the type of the storage medium, the period of use of the storage medium, and the number of times of reading and writing of the storage medium. The task management device according to claim 1.
上記書込制御部の書込速度を実測することによって、上記書込速度のレベルを判定することを特徴とする請求項1に記載のタスク管理装置。 The above task management department
The task management device according to claim 1, wherein the level of the writing speed is determined by actually measuring the writing speed of the writing control unit.
上記データベース構築処理と並行して実行される上記他処理の処理負荷を予測し、上記書込制御部の書込速度のレベルに基づいて決定した優先度を、予測した処理負荷が大きいほど優先度が低くなるように調整することを特徴とする請求項1から3のいずれか一項に記載のタスク管理装置。 The above task management department
The processing load of the other processing executed in parallel with the database construction processing is predicted, and the priority determined based on the level of the writing speed of the writing control unit is determined. The larger the predicted processing load, the higher the priority. The task management device according to any one of claims 1 to 3, wherein the task management device is adjusted so as to have a low speed.
上記タスク管理部は、
ユーザによって選択されたソースの種類に基づいて、上記データベース構築処理と並行して実行される上記他処理の処理負荷を予測することを特徴とする請求項4に記載のタスク管理装置。 The above other processes are processes executed using the source selected by the user.
The above task management department
The task management device according to claim 4, wherein the processing load of the other processing executed in parallel with the database construction processing is predicted based on the type of the source selected by the user.
上記データベース構築部は、
上記構築用情報として上記付加情報を上記外部装置から受信し、受信した上記付加情報に基づいてデータベースを生成することを特徴とする請求項1から5のいずれか一項に記載のタスク管理装置。 The external device stores audio data in association with additional information composed of a plurality of pieces of information.
The above database construction department
The task management device according to any one of claims 1 to 5, wherein the additional information is received from the external device as the construction information, and a database is generated based on the received additional information.
上記タスク管理装置の上記タスク管理部が上記書込制御部の書込速度のレベルを判定する第1のステップと、
上記タスク管理装置の上記タスク管理部が書込速度が速いレベルほど、上記データベース構築処理に係るタスクの上記第2の処理リソースへの割り当ての優先度を低くする第2のステップとを有することを特徴とするタスク管理方法。 A write control unit that executes writing of the transferred data to the storage medium using the first processing resource, a database is generated based on the construction information received from the external device, and the above database is used. The database construction unit that executes the database construction process for transferring the constituent data to the write control unit using a second processing resource different from the first processing resource, and the second processing resource are used. Then, while the other processing execution unit that executes other processing other than the database construction processing and the database construction processing are executed, one task related to the database construction processing is assigned to the second processing resource. After allocating and executing, when the writing of the data transferred in the one task by the write control unit is completed, the next task related to the database construction process is assigned to the second process resource. It is a task management method by a task management device equipped with a task management unit to try.
The first step in which the task management unit of the task management device determines the level of the writing speed of the writing control unit, and
The faster the writing speed of the task management unit of the task management device is, the second step is to lower the priority of allocating the task related to the database construction process to the second processing resource. Characterized task management method.
上記コンピュータを、
上記データベース構築処理が実行される間、上記データベース構築処理に係る一のタスクを上記第2の処理リソースに割り当てて実行させた後、上記書込制御部により当該一のタスクにおいて転送されたデータについての書き込みが完了した場合に、上記データベース構築処理に係る次のタスクの上記第2の処理リソースへの割り当てを試みる一方、上記書込制御部の書込速度のレベルを判定し、書込速度が速いレベルほど、上記データベース構築処理に係るタスクの上記第2の処理リソースへの割り当ての優先度を低くするタスク管理部として機能させることを特徴とするタスク管理プログラム。 A write control unit that executes writing of the transferred data to the storage medium using the first processing resource, a database is generated based on the construction information received from the external device, and the above database is used. The database construction unit that executes the database construction process for transferring the constituent data to the write control unit using a second processing resource different from the first processing resource, and the second processing resource are used. A task management program that can be executed by a computer of a task management device including an other processing execution unit that executes other processing other than the above database construction processing.
The above computer,
While the database construction process is being executed, the data transferred in the one task by the write control unit after the one task related to the database construction process is assigned to the second processing resource and executed. When the writing of the above is completed, while trying to allocate the next task related to the database construction process to the second processing resource, the writing speed level of the writing control unit is determined and the writing speed is increased. A task management program characterized in that the faster the level, the lower the priority of allocation of tasks related to the database construction process to the second processing resource, the task management unit.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017117374A JP6845751B2 (en) | 2017-06-15 | 2017-06-15 | Task management device, task management method and task management program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017117374A JP6845751B2 (en) | 2017-06-15 | 2017-06-15 | Task management device, task management method and task management program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2019003391A JP2019003391A (en) | 2019-01-10 |
| JP6845751B2 true JP6845751B2 (en) | 2021-03-24 |
Family
ID=65006309
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2017117374A Active JP6845751B2 (en) | 2017-06-15 | 2017-06-15 | Task management device, task management method and task management program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6845751B2 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR102736157B1 (en) | 2019-07-29 | 2024-12-02 | 삼성전자주식회사 | Method of operating storage device for improving qos latency and storage device performing the same |
| CN111915152B (en) * | 2020-07-10 | 2022-10-18 | 中铁第四勘察设计院集团有限公司 | Task allocation method and system applied to intelligent contact network construction site |
| CN112711483A (en) * | 2020-12-10 | 2021-04-27 | 广州广电运通金融电子股份有限公司 | High-concurrency method, system and equipment for processing big data annotation service |
-
2017
- 2017-06-15 JP JP2017117374A patent/JP6845751B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2019003391A (en) | 2019-01-10 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9244617B2 (en) | Scheduling requests in a solid state memory device | |
| US20090150697A1 (en) | Media file reproduction apparatus and method | |
| CN111666140A (en) | Resource scheduling method, apparatus, device and storage medium | |
| JP6845751B2 (en) | Task management device, task management method and task management program | |
| US8131990B2 (en) | Data processing apparatus and method of mounting logical drive | |
| US20120278539A1 (en) | Memory apparatus, memory control apparatus, and memory control method | |
| US20120290792A1 (en) | Media device with intelligent cache utilization | |
| JP5330409B2 (en) | MEMORY CONTROL DEVICE, DATA PROCESSOR, AND DATA READING METHOD | |
| US12047759B2 (en) | Seamless audio transfer in a multi-processor audio system | |
| EP1684288B1 (en) | Information recorder, information recording method, and recording medium containing program | |
| KR101521907B1 (en) | Apparatus and method for playing media files | |
| JP2017204113A (en) | Electronic device, database construction method and system | |
| US7552299B2 (en) | Data-processing apparatus, data-processing method and program | |
| CN105868721A (en) | Sound file switching method and apparatus | |
| KR100673093B1 (en) | How to Play Real-Time Multimedia Files Using Multiple File Caching in Portable Multimedia Players | |
| CN100480978C (en) | HDD control apparatus | |
| US12026428B2 (en) | Audio video navigation system for vehicle and method for playing media thereof | |
| CN115359810B (en) | Data processing method, device and readable storage medium | |
| JP2020135683A (en) | Control device and control program | |
| KR101444397B1 (en) | Method and apparatus for controlling hard disk access | |
| CN101933093A (en) | Media rewind playback | |
| EP2046016B1 (en) | Video processing system and method thereof | |
| WO2026048242A1 (en) | Video processing system, information processing device, and control method | |
| CN121166175A (en) | Firmware upgrading method, device, medium, solid state disk, equipment and program product | |
| JP2010015385A (en) | Information processing apparatus, information processing method, and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200306 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20210209 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20210224 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210226 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6845751 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |