JP6007628B2 - Cache control device and cache control method - Google Patents

Cache control device and cache control method Download PDF

Info

Publication number
JP6007628B2
JP6007628B2 JP2012154505A JP2012154505A JP6007628B2 JP 6007628 B2 JP6007628 B2 JP 6007628B2 JP 2012154505 A JP2012154505 A JP 2012154505A JP 2012154505 A JP2012154505 A JP 2012154505A JP 6007628 B2 JP6007628 B2 JP 6007628B2
Authority
JP
Japan
Prior art keywords
data
compression
primary storage
predicted value
storage means
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
Application number
JP2012154505A
Other languages
Japanese (ja)
Other versions
JP2014016863A (en
Inventor
飛日 藤原
飛日 藤原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2012154505A priority Critical patent/JP6007628B2/en
Publication of JP2014016863A publication Critical patent/JP2014016863A/en
Application granted granted Critical
Publication of JP6007628B2 publication Critical patent/JP6007628B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、二段階以上の階層的な記憶構成を持つキャッシュ制御装置およびキャッシュ制御方法に関し、特に、キャッシュ用領域に空き領域を作る処理時間を短縮することができるキャッシュ制御装置およびキャッシュ制御方法に関する。   The present invention relates to a cache control device and a cache control method having a hierarchical storage configuration of two or more stages, and more particularly to a cache control device and a cache control method capable of reducing processing time for creating a free area in a cache area. .

現在、コンピュータ上で動作するアプリケーションプログラム(以下、単に「アプリケーション」とも言う。)が必要なデータを取得する場合、そのデータがアクセス速度の低速な記憶装置に存在するときには、そのデータをその低速な記憶装置から取得後、取得したそのデータを、2回目以降の使用に備えて、アクセス速度の高速な記憶装置に一時的に保存するキャッシュ機能が知られている。   Currently, when an application program (hereinafter also simply referred to as an “application”) that runs on a computer acquires necessary data, if the data exists in a storage device with a low access speed, the data is stored at the low speed. A cache function is known in which, after being acquired from a storage device, the acquired data is temporarily stored in a storage device with a high access speed in preparation for subsequent use.

言うまでもなく、キャッシュ機能では、アクセス要求されたデータが、高速な記憶装置に既にキャッシュされている場合(これを「キャッシュヒット」と呼ぶ。)に、その効果が発揮できる。   Needless to say, the cache function is effective when the data requested to be accessed is already cached in a high-speed storage device (this is called “cache hit”).

ここで、キャッシュ機能の効果を高めるためには、キャッシュデータを保存する記憶装置(以下、「キャッシュメモリ」と言う。)の記憶容量を増やす方法と、限られた記憶容量のキャッシュメモリでキャッシュヒットの確率を高める方法とが考えられる。   Here, in order to increase the effect of the cache function, a method of increasing the storage capacity of a storage device for storing cache data (hereinafter referred to as “cache memory”) and a cache hit with a cache memory having a limited storage capacity It is conceivable to increase the probability of.

まず、キャッシュメモリの記憶容量を増やす方法であるが、一般に、キャッシュメモリとして使用される高速な記憶装置は、低速な記憶装置に比べて高価であり、費用の面で、キャッシュメモリを単純に増設することには限度がある。   First, it is a method of increasing the storage capacity of the cache memory. Generally, a high-speed storage device used as a cache memory is more expensive than a low-speed storage device, and the cache memory is simply added in terms of cost. There are limits to what you can do.

そこで、高価だが高速な1次キャッシュメモリと、安価だが低速な2次キャッシュメモリとを用意し、2次キャッシュメモリを1次キャッシュメモリの下の階層の補助記憶装置として使用する方法がある。   Therefore, there is a method in which an expensive but high-speed primary cache memory and an inexpensive but low-speed secondary cache memory are prepared and the secondary cache memory is used as an auxiliary storage device in a hierarchy below the primary cache memory.

次に、キャッシュヒットの確率を高める方法として、新たなキャッシュすべきデータが発生した場合に、キャッシュメモリの記憶容量一杯までメモリにデータが保存されているときには、保存済みのデータの一部をキャッシュヒットの確率をできるだけ下げないように破棄することで、その新しいデータを保存するための記憶領域を確保する方法が考えられている。   Next, as a method for increasing the probability of a cache hit, when new data to be cached occurs, if the data is stored in the memory until the storage capacity of the cache memory is full, a part of the stored data is cached. There has been considered a method of securing a storage area for storing the new data by discarding the hit probability so as not to decrease as much as possible.

このような技術の一例として、特許文献1には、限られた記憶容量の高速な記憶装置と、大記憶容量だが低速な記憶装置とをネットワーク接続したコンテンツ蓄積システムを構成し、データへのアクセス頻度を基にして記憶先を選択する技術が開示されている。   As an example of such a technique, Patent Document 1 describes a content storage system in which a high-speed storage device having a limited storage capacity and a large storage capacity but a low-speed storage device are connected to each other to access data. A technique for selecting a storage destination based on frequency is disclosed.

この技術においては、高速蓄積装置に蓄積されているコンテンツを低速記憶装置に転送完了後、高速蓄積装置からコンテンツを消去することで、高速蓄積装置の空き領域が確保されている。   In this technique, after the content stored in the high-speed storage device is transferred to the low-speed storage device, the empty area of the high-speed storage device is secured by erasing the content from the high-speed storage device.

また、本技術では、高速蓄積装置に蓄積されているコンテンツの消去の対象をアクセス頻度に基づいて選定することで、ダウンロード要求の少ないコンテンツを高速蓄積装置から削除し、ダウンロード要求の多いコンテンツを高速蓄積装置に残すように構成されている。   Also, with this technology, by selecting the content to be erased from the high-speed storage device based on the access frequency, content with few download requests is deleted from the high-speed storage device, and content with many download requests is processed at high speed. It is configured to remain in the storage device.

これにより、ダウンロード要求の多いコンテンツが高速蓄積装置に恒久的に保存されるので、コスト増を抑えられた高速で大規模なコンテンツ蓄積システムを提供することが可能である。   As a result, content with many download requests is permanently stored in the high-speed storage device, so that it is possible to provide a high-speed and large-scale content storage system with suppressed cost increase.

すなわち、本技術は、上述のキャッシュメモリの記憶容量を増やす方法と、キャッシュヒットの確率を高める方法とを組み合わせて使用した例である。なお、上述の1次キャッシュメモリは本技術の高速蓄積装置に、上述の2次キャッシュメモリは本技術の低速蓄積装置に相当する。   That is, the present technology is an example in which the above-described method for increasing the storage capacity of the cache memory and the method for increasing the probability of cache hit are used in combination. The primary cache memory described above corresponds to the high-speed storage device of the present technology, and the secondary cache memory described above corresponds to the low-speed storage device of the present technology.

また、キャッシュメモリの記憶容量を増加させる方法として、他にも、限られた記憶容量に保存するデータ量を増加させる方法が知られている。   As another method for increasing the storage capacity of the cache memory, another method for increasing the amount of data stored in a limited storage capacity is known.

このような技術の一例として、特許文献2には、階層状に構成された記憶装置システムにおいて、上位装置からキャッシュメモリへのデータ書き込み時にデータを圧縮し、キャッシュメモリから上位装置へのデータ読み出し時にデータを伸長する技術が開示されている。この技術は、データ圧縮することにより、キャッシュメモリに記憶できるデータ容量を増加させ、より大きなキャッシュメモリを設けることと同じ効果を得ようとするものである。すなわち、限られた容量のキャッシュメモリの利用効率を上げて、キャッシュヒット率を高め、演算速度を速くすることが可能である。   As an example of such a technique, in Patent Document 2, in a hierarchical storage device system, data is compressed when data is written from the host device to the cache memory, and data is read from the cache memory to the host device. A technique for decompressing data is disclosed. This technique increases the data capacity that can be stored in the cache memory by compressing the data, and intends to obtain the same effect as that of providing a larger cache memory. In other words, it is possible to increase the utilization efficiency of the limited capacity cache memory, increase the cache hit rate, and increase the calculation speed.

特許第4464656号Japanese Patent No. 4464656 特開平05−07413号公報JP 05-07413 A

ここで、新たなデータをキャッシュ登録するための処理時間を考えると、特許文献1に開示された技術においては、高速蓄積装置にすぐ消去できるデータがなかった場合、高速蓄積装置からコンテンツを低速蓄積装置へ転送して書き込んだ後、該コンテンツを消去して空き領域を作る時間が必要となる。   Here, considering the processing time for registering new data in the cache, in the technique disclosed in Patent Document 1, if there is no data that can be immediately erased in the high-speed storage device, the content is stored at low speed from the high-speed storage device. After transferring and writing to the device, it takes time to erase the content and create a free space.

一方、特許文献2に開示された技術においては、新たなデータを登録するための記憶容量を、それまでのキャッシュデータを圧縮しておくことによって確保したと考えれば、新たなデータ(を圧縮した)分の空き領域を得るためのデータ圧縮の時間が必要となる。   On the other hand, in the technique disclosed in Patent Document 2, if it is considered that the storage capacity for registering new data is secured by compressing the cache data so far, the new data (compressed) is compressed. Data compression time is required to obtain a free space.

また、特許文献1に開示された技術においては、空き領域に元々キャッシュされていたデータを再び利用する場合、低速蓄積装置から読み出して転送する時間が必要になる。   In the technique disclosed in Patent Document 1, when data that has been cached in a free area is used again, it takes time to read and transfer from the low-speed storage device.

一方、特許文献2に開示された技術においては、キャッシュデータの利用にはデータ伸張する時間が必要となる。   On the other hand, in the technique disclosed in Patent Document 2, it takes time to decompress data in order to use cache data.

これら2つの技術のどちらの総合的な処理時間が短いかは、使用する記憶装置やデータ圧縮アルゴリズムの性能などに依存するが、図1に示すように、一律には定まらないケースがあると考えられる。なお、図1の「書込時間」には、2次キャッシュへ転送(send)して書き込む(Write)する時間が含まれる。   Which of these two technologies has the shorter total processing time depends on the storage device used and the performance of the data compression algorithm, etc., but as shown in FIG. It is done. Note that the “write time” in FIG. 1 includes the time to transfer (send) and write (write) to the secondary cache.

図1ならば、Aの範囲では圧縮時間<書込時間であり、データ圧縮の処理の方が速い。一方、Bの範囲では、圧縮時間>書込時間であり、2次キャッシュへ書き込む処理の方が速い。   In FIG. 1, in the range A, the compression time is less than the write time, and the data compression process is faster. On the other hand, in the range of B, the compression time> the write time, and the process of writing to the secondary cache is faster.

すなわち、対象のデータのサイズによって、1次キャッシュから2次キャッシュに移動させる方が速い場合と、1次キャッシュ内でデータを圧縮して空き領域を作る方が速い場合とがあり、どちらの技術を採用しても常に最適な処理が行えるとは言えない。   That is, depending on the size of the target data, there are a case where it is faster to move from the primary cache to the secondary cache, and a case where it is faster to compress the data in the primary cache to create a free area. Even if it is adopted, it cannot always be said that optimum processing can be performed.

本発明のキャッシュ制御装置は、データを記憶する1次記憶手段と、前記1次記憶手段よりもデータの読み出しが低速である2次記憶手段と、データを圧縮して前記1次記憶手段に保存できるデータ圧縮手段と、前記1次記憶手段に新規データを保存する場合であって、前記1次記憶手段に該新規データを保存するための空き領域が存在しない場合、予め定めた条件に基づき指定される前記1次記憶手段内のデータを処理対象データとして選択する選択手段と、データの各サイズと、前記データ圧縮手段により各サイズのデータを圧縮するのに要する圧縮時間の予測値である圧縮方式予測値と、各サイズのデータを前記1次記憶手段から2次記憶手段に移動させ書き込むのに要する移動時間の予測値である移動方式予測値との関係を予め記憶し、前記処理対象データのサイズの場合には、前記圧縮方式予測値および前記移動方式予測値のうちのいずれが小さいかを判定する判定手段と、前記判定手段において、前記圧縮方式予測値の方が小さいと判定された場合には、前記処理対象データを前記圧縮手段で圧縮した圧縮データを前記1次記憶手段に保存し、一方、前記移動方式予測値の方が小さいと判定された場合には、前記処理対象データを前記第2の記憶手段に移動させ書き込む処理手段とを備える。   The cache control apparatus according to the present invention includes a primary storage means for storing data, a secondary storage means for reading data at a lower speed than the primary storage means, and compressing and storing the data in the primary storage means When data is stored in the primary storage means and there is no free space for storing the new data in the primary storage means, it is designated based on a predetermined condition. Selection means for selecting data in the primary storage means to be processed as data to be processed, each size of the data, and compression that is a predicted value of the compression time required to compress the data of each size by the data compression means The relationship between the method prediction value and the movement method prediction value that is the predicted value of the movement time required to move and write data of each size from the primary storage means to the secondary storage means is stored in advance. In the case of the size of the processing target data, in the determination unit that determines which one of the compression method predicted value and the movement method predicted value is smaller, and in the determination unit, the compression method predicted value is more If it is determined to be small, the compressed data obtained by compressing the processing target data by the compression unit is stored in the primary storage unit. On the other hand, if it is determined that the movement method predicted value is smaller, And processing means for moving and writing the processing object data to the second storage means.

本発明のキャッシュ制御装置は、データを記憶する1次記憶手段と、前記1次記憶手段よりもデータの読み出しが低速である2次記憶手段と、データを圧縮して前記1次記憶手段に保存できるデータ圧縮手段と、前記1次記憶手段に新規データを保存する場合であって、前記1次記憶手段に該新規データを保存するための空き領域が存在しない場合、予め定めた条件に基づき指定される前記1次記憶手段内のデータを処理対象データとして選択する選択手段と、前記データ圧縮手段により前記処理対象データを圧縮するのに要する圧縮時間の予測値である圧縮方式予測値と、前記処理対象データを前記1次記憶手段から2次記憶手段に移動させ書き込むのに要する移動時間の予測値である移動方式予測値とを算出し、前記圧縮方式予測値および前記移動方式予測値のうちのいずれが小さいかを判定する判定手段と、前記判定手段において、前記圧縮方式予測値の方が小さいと判定された場合には、前記処理対象データを前記圧縮手段で圧縮した圧縮データを前記1次記憶手段に保存し、一方、前記移動方式予測値の方が小さいと判定された場合には、前記処理対象データを前記第2の記憶手段に移動させ書き込む処理手段とを備える。   The cache control apparatus according to the present invention includes a primary storage means for storing data, a secondary storage means for reading data at a lower speed than the primary storage means, and compressing and storing the data in the primary storage means When data is stored in the primary storage means and there is no free space for storing the new data in the primary storage means, it is designated based on a predetermined condition. Selection means for selecting the data in the primary storage means to be processed data, a compression method predicted value that is a predicted value of the compression time required to compress the processing target data by the data compression means, A movement method predicted value, which is a predicted value of the movement time required to move and write data to be processed from the primary storage unit to the secondary storage unit, and calculates the compression method predicted value and When the determination unit determines which of the movement method predicted values is smaller and the determination unit determines that the compression method predicted value is smaller, the compression unit stores the processing target data. Processing means for storing compressed compressed data in the primary storage means, and on the other hand, if it is determined that the movement method predicted value is smaller, the processing target data is moved to the second storage means and written. With.

本発明のキャッシュ制御方法は、データを記憶する1次記憶手段と、前記1次記憶手段よりもデータの読み出しが低速である2次記憶手段と、データを圧縮して前記1次記憶手段に保存できるデータ圧縮手段とを使用する方法であって、データの各サイズと、前記データ圧縮手段により各サイズのデータを圧縮するのに要する圧縮時間の予測値である圧縮方式予測値と、各サイズのデータを前記1次記憶手段から2次記憶手段に移動させ書き込むのに要する移動時間の予測値である移動方式予測値との関係を記憶手段に予め記憶する予測値記憶ステップと、前記1次記憶手段に新規データを保存する場合であって、前記1次記憶手段に該新規データを保存するための空き領域が存在しない場合、予め定めた条件に基づき指定される前記1次記憶手段内のデータを処理対象データとして選択する選択ステップと、前記処理対象データのサイズの場合には、前記圧縮方式予測値および前記移動方式予測値のうちのいずれが小さいかを判定する判定ステップと、前記判定ステップにおいて、前記圧縮方式予測値の方が小さいと判定された場合には、前記処理対象データを前記圧縮手段で圧縮した圧縮データを前記1次記憶手段に保存し、一方、前記移動方式予測値の方が小さいと判定された場合には、前記処理対象データを前記第2の記憶手段に移動させ書き込む処理ステップとを含む。   The cache control method of the present invention includes a primary storage means for storing data, a secondary storage means for reading data at a lower speed than the primary storage means, and compressing and storing the data in the primary storage means Each of the data sizes, a compression method prediction value that is a prediction value of the compression time required to compress the data of each size by the data compression means, and each size A predicted value storage step for storing in advance in the storage means a relationship with a movement method predicted value that is a predicted value of the movement time required to move and write data from the primary storage means to the secondary storage means; In the case where new data is stored in the means, and there is no free space for storing the new data in the primary storage means, the primary data specified based on a predetermined condition. A selection step of selecting data in the means as processing target data, and a determination step of determining which one of the compression method prediction value and the movement method prediction value is smaller in the case of the size of the processing target data; In the determination step, when it is determined that the compression method predicted value is smaller, the compressed data obtained by compressing the processing target data by the compression unit is stored in the primary storage unit, while the movement When it is determined that the method predicted value is smaller, the processing step includes moving and writing the processing target data to the second storage unit.

本発明のキャッシュ制御方法は、データを記憶する1次記憶手段と、前記1次記憶手段よりもデータの読み出しが低速である2次記憶手段と、データを圧縮して前記1次記憶手段に保存できるデータ圧縮手段とを使用する方法であって、前記1次記憶手段に新規データを保存する場合であって、前記1次記憶手段に該新規データを保存するための空き領域が存在しない場合、予め定めた条件に基づき指定される前記1次記憶手段内のデータを処理対象データとして選択する選択ステップと、前記データ圧縮手段により前記処理対象データを圧縮するのに要する圧縮時間の予測値である圧縮方式予測値と、前記処理対象データを前記1次記憶手段から2次記憶手段に移動させ書き込むのに要する移動時間の予測値である移動方式予測値とを算出し、前記圧縮方式予測値および前記移動方式予測値のうちのいずれが小さいかを判定する判定ステップと、前記判定ステップにおいて、前記圧縮方式予測値の方が小さいと判定された場合には、前記処理対象データを前記圧縮手段で圧縮した圧縮データを前記1次記憶手段に保存し、一方、前記移動方式予測値の方が小さいと判定された場合には、前記処理対象データを前記第2の記憶手段に移動させ書き込む処理ステップとを含む。   The cache control method of the present invention includes a primary storage means for storing data, a secondary storage means for reading data at a lower speed than the primary storage means, and compressing and storing the data in the primary storage means A method of using data compression means that can store new data in the primary storage means, and there is no free space in the primary storage means for storing the new data, A selection step of selecting data in the primary storage means designated based on a predetermined condition as processing target data, and a predicted value of a compression time required to compress the processing target data by the data compression means Calculate a compression method predicted value and a movement method predicted value that is a predicted value of the movement time required to move and write the processing target data from the primary storage unit to the secondary storage unit In the determination step of determining which one of the compression method prediction value and the movement method prediction value is smaller, and in the determination step, if it is determined that the compression method prediction value is smaller, the processing The compressed data obtained by compressing the target data by the compression unit is stored in the primary storage unit. On the other hand, if it is determined that the movement method predicted value is smaller, the processing target data is stored in the second storage unit. Processing steps to move and write to the means.

本発明には、二段階以上の階層的なメモリ構成を持つキャッシュ制御装置において、1次キャッシュに空き領域がない状況におけるキャッシュ登録処理の性能向上を達成できるという効果がある。   The present invention has an effect that, in a cache control device having a hierarchical memory structure of two or more stages, it is possible to achieve an improvement in cache registration processing performance in a situation where there is no free area in the primary cache.

データ圧縮による処理時間と2次キャッシュへの書き込みによる処理時間の一例を示すグラフである。It is a graph which shows an example of the processing time by data compression, and the processing time by the write to a secondary cache. 本発明の第1の実施形態の構成を示すブロック図である。It is a block diagram which shows the structure of the 1st Embodiment of this invention. 1次記憶装置と2次記憶装置の構成を示すブロック図である。It is a block diagram which shows the structure of a primary storage device and a secondary storage device. 本発明の第1乃至第3の実施形態における1次キャッシュへのデータ登録動作を示すフローチャートである。It is a flowchart which shows the data registration operation | movement to the primary cache in the 1st thru | or 3rd embodiment of this invention. 本発明の第1乃至第3の実施形態におけるキャッシュしたデータへの参照動作を示すフローチャートである。It is a flowchart which shows the reference operation | movement to the cached data in the 1st thru | or 3rd embodiment of this invention. 本発明の第2の実施形態の構成を示すブロック図である。It is a block diagram which shows the structure of the 2nd Embodiment of this invention.

次に、本発明の実施形態について図面を参照して詳細に説明する。   Next, embodiments of the present invention will be described in detail with reference to the drawings.

<第1の実施形態>
図2は、本発明の第1の実施形態を示すブロック図である。
<First Embodiment>
FIG. 2 is a block diagram showing the first embodiment of the present invention.

図2を参照すると、本実施形態は、コンピュータ100および外部情報源200から構成される。   Referring to FIG. 2, the present embodiment includes a computer 100 and an external information source 200.

コンピュータ100は、演算処理装置10、1次記憶装置20、2次記憶装置30、処理データ選択部40、方式判定部50、データ圧縮手段60、およびデータ展開手段70を備える。   The computer 100 includes an arithmetic processing device 10, a primary storage device 20, a secondary storage device 30, a processing data selection unit 40, a method determination unit 50, a data compression unit 60, and a data expansion unit 70.

演算処理装置10は、各部の動作を制御する。   The arithmetic processing device 10 controls the operation of each unit.

1次記憶装置20は、演算処理装置10に接続された主記憶装置であり、データの読み書き速度(以下、「アクセス速度」という)が高速な記憶装置である。   The primary storage device 20 is a main storage device connected to the arithmetic processing device 10, and is a storage device having a high data read / write speed (hereinafter referred to as “access speed”).

1次記憶装置20は、1次キャッシュメモリとしての動作も行うとともに、OSプログラムおよびアプリケーションプログラム自体並びにそれらのプログラムが利用するデータを保持する動作を行い、そのために、キャッシュデータを保持する領域とOSプログラムおよびアプリケーションプログラムの利用するデータを保持する領域とに区分されている。   The primary storage device 20 performs an operation as a primary cache memory, and also performs an operation of holding an OS program and application programs themselves and data used by those programs. For this purpose, an area for holding cache data and an OS It is divided into areas for holding data used by programs and application programs.

なお、以降の説明では、OSプログラムおよびアプリケーションプログラムなどのプログラムを総称して単に「アプリケーション」と言う。   In the following description, programs such as OS programs and application programs are collectively referred to simply as “applications”.

次に、図3を参照して、1次記憶装置20の詳細な構成を説明する。   Next, a detailed configuration of the primary storage device 20 will be described with reference to FIG.

1次記憶装置20の記憶領域は、1次キャッシュ用領域21と、アプリケーション用領域25とに区分されている。   The storage area of the primary storage device 20 is divided into a primary cache area 21 and an application area 25.

1次キャッシュ用領域21は、アプリケーションが外部情報源3から取得したデータを、次のアクセスの機会に備えて一時的にデータを保持するための記憶領域であり、コンピュータ100の起動時などに1次記憶装置20内に所定の記憶容量を持つよう割り当てられる。   The primary cache area 21 is a storage area for temporarily storing data acquired from the external information source 3 by the application in preparation for the next access opportunity. The next storage device 20 is assigned with a predetermined storage capacity.

1次キャッシュ用領域21は、さらに、展開情報保存領域22と圧縮情報保存領域23と空き領域24とからなる。なお、空き領域24は、1次キャッシュ用領域21の中で使用されていない領域を示し、存在しないこともある。   The primary cache area 21 further includes a decompressed information storage area 22, a compressed information storage area 23, and a free area 24. The free area 24 indicates an unused area in the primary cache area 21 and may not exist.

展開情報保存領域22は、1次キャッシュ用領域21に保存すべきキャッシュデータを圧縮せず、そのまま保存する領域である。なお、データ圧縮していないキャッシュデータを「非圧縮データ」と呼ぶことがある。   The development information storage area 22 is an area in which the cache data to be stored in the primary cache area 21 is stored as it is without being compressed. Note that cache data that has not been compressed may be referred to as “uncompressed data”.

圧縮情報保存領域23は、1次キャッシュ用領域21に保存すべきキャッシュデータを圧縮した状態で保存する領域である。   The compressed information storage area 23 is an area for storing the cache data to be stored in the primary cache area 21 in a compressed state.

展開情報保存領域22および圧縮情報保存領域23の大きさは、キャッシュされているデータの状態によって変動する。また、領域22と領域23とはそれぞれ非連続でもよい。   The sizes of the decompressed information storage area 22 and the compressed information storage area 23 vary depending on the state of cached data. Further, the region 22 and the region 23 may be discontinuous.

アプリケーション用領域25は、アプリケーションが使用する領域であり、外部情報源3から読み出されたデータはこの領域に格納されて、そのデータを要求したアプリケーションに引き渡される。   The application area 25 is an area used by the application, and the data read from the external information source 3 is stored in this area and delivered to the application that requested the data.

2次記憶装置30は、1次記憶装置20よりはアクセス速度が低速であるが、外部情報源3よりはアクセス速度が高速な記憶装置である。   The secondary storage device 30 is a storage device that has a lower access speed than the primary storage device 20 but a higher access speed than the external information source 3.

具体的には、例えば、1次記憶装置20はRAM(Random Access Memory)などの半導体メモリ、2次記憶装置30はSSD(Solid State Drive、半導体ディスク)、そして、外部情報源3は磁気ディスク(HDD)である。   Specifically, for example, the primary storage device 20 is a semiconductor memory such as a RAM (Random Access Memory), the secondary storage device 30 is an SSD (Solid State Drive, a semiconductor disk), and the external information source 3 is a magnetic disk ( HDD).

次に、図3を参照して、2次記憶装置30の詳細な構成を説明する。   Next, the detailed configuration of the secondary storage device 30 will be described with reference to FIG.

本実施形態では、2次記憶装置30は、2次キャッシュ用領域31のみから構成され、2次キャッシュ用領域31は、展開情報保存領域32と圧縮情報保存領域33と空き領域34とからなる。なお、空き領域34は、2次キャッシュ用領域31の中で使用されていない領域を示し、存在しないこともある。   In the present embodiment, the secondary storage device 30 includes only a secondary cache area 31, and the secondary cache area 31 includes a decompressed information storage area 32, a compressed information storage area 33, and a free area 34. The free area 34 indicates an unused area in the secondary cache area 31 and may not exist.

展開情報保存領域32は、2次キャッシュ用領域31に保存すべきキャッシュデータを圧縮せず、そのまま保存する領域である。   The development information storage area 32 is an area in which the cache data to be stored in the secondary cache area 31 is stored without being compressed.

圧縮情報保存領域33は、2次キャッシュ用領域31に保存すべきキャッシュデータを圧縮した状態で保存する領域である。   The compressed information storage area 33 is an area for storing the cache data to be stored in the secondary cache area 31 in a compressed state.

展開情報保存領域32および圧縮情報保存領域33の大きさは、キャッシュされているデータの状態によって変動する。また、領域32と領域33とはそれぞれ非連続でもよい。   The sizes of the decompressed information storage area 32 and the compressed information storage area 33 vary depending on the state of cached data. Further, the region 32 and the region 33 may be discontinuous.

2次キャッシュ用領域31は、1次キャッシュ用領域21で保存しきれなくなったキャッシュデータを一時的に保存するためのものである。アプリケーションが該データを再び参照する場合は、まず、該データが2次キャッシュ用領域31から読み出されて1次キャッシュ用領域21に転送され、アプリケーションはこうして1次キャッシュ用領域に転送されてきた該データを利用する。   The secondary cache area 31 is for temporarily storing cache data that cannot be stored in the primary cache area 21. When the application refers to the data again, the data is first read from the secondary cache area 31 and transferred to the primary cache area 21, and the application is thus transferred to the primary cache area. The data is used.

処理データ選択部40は、1次キャッシュ用領域21の空き領域を増やすために、1次キャッシュ用領域21に保存されているデータの中から移動もしくは削除するデータを選択する。処理データ選択部40で行われるデータ選択の選択基準は、例えば、利用頻度や最終アクセス時刻を考慮して、再アクセスの確率が低そうなデータを選択することを基本とする。   The processing data selection unit 40 selects data to be moved or deleted from the data stored in the primary cache area 21 in order to increase the free area of the primary cache area 21. The selection criteria for data selection performed by the processing data selection unit 40 is basically based on selecting data that has a low re-access probability in consideration of, for example, the use frequency and the last access time.

このため、処理データ選択部40は、例えば、アプリケーションからの各データへのアクセスタイミング等の情報を収集し、利用頻度や最終アクセス時刻等の情報として整理する。   Therefore, for example, the processing data selection unit 40 collects information such as the access timing of each data from the application, and arranges it as information such as the usage frequency and the last access time.

データ圧縮手段50は、1次記憶装置20上の非圧縮データを読み出して、圧縮し、圧縮後の圧縮データを1次記憶装置20上に書き込む。   The data compression means 50 reads and compresses uncompressed data on the primary storage device 20 and writes the compressed data after compression onto the primary storage device 20.

データ圧縮アルゴリズムとしては、圧縮対象データのサイズを基に圧縮に掛かる時間、および、圧縮データの展開時間を予測できるものが採用される。   As the data compression algorithm, an algorithm that can predict the time required for compression based on the size of the data to be compressed and the expansion time of the compressed data is employed.

例えば、よく知られているLZSS(Lempel−Ziv−Storer−Szymanski)方式などのいわゆる辞書式のアルゴリズムにおいては、元データの各要素について同じ処理を繰り返すことで圧縮を行うため、処理対象となるデータのサイズに比例して圧縮処理回数が増加する。これにより、1回あたりの圧縮処理時間を測定しておけば、データサイズからおおよその圧縮時間を予測することができる。なお、展開についても同様である。   For example, in a so-called lexicographic algorithm such as the well-known LZSS (Lempel-Ziv-Storer-Szymanski) method, compression is performed by repeating the same process for each element of the original data. The number of compression processes increases in proportion to the size of. Thereby, if the compression processing time per time is measured, the approximate compression time can be predicted from the data size. The same applies to development.

また、圧縮および展開の演算処理には、演算処理装置10を使用してもよいし、GPU(Graphics Processing Unit)などの別の装置を使用してもよい。   Further, the arithmetic processing device 10 may be used for the compression and decompression arithmetic processing, or another device such as a GPU (Graphics Processing Unit) may be used.

データ展開手段60は、データ圧縮手段50によって圧縮されたデータを、1次記憶装置20上から読み出して、展開し、展開されたデータを1次記憶装置20上に書き込む。データ展開アルゴリズムは、データ圧縮手段50の圧縮アルゴリズムに対応するものを採用する。   The data expansion unit 60 reads out the data compressed by the data compression unit 50 from the primary storage device 20, expands the data, and writes the expanded data on the primary storage device 20. A data expansion algorithm corresponding to the compression algorithm of the data compression means 50 is employed.

方式判定部70は、処理データ選択部40が選択した処理対象データのサイズを基に、1次キャッシュ用領域21に該データを書き込むのに必要な空き容量を確保するための処理に要する時間が短い処理方式を判定する。   Based on the size of the processing target data selected by the processing data selection unit 40, the method determination unit 70 takes the time required for processing to secure the free space necessary for writing the data to the primary cache area 21. Determine the short processing method.

この処理方式としては、本実施形態では、1次キャッシュ用領域21内で既存の非圧縮データを圧縮し、縮小した分のサイズを空ける方式(以下、「圧縮方式」と言う。)と、1次キャッシュ用領域21から2次キャッシュ用領域31へデータを移動させる方式(以下、「移動方式」と言う。)との2つの処理方式がある。   As this processing method, in this embodiment, a method of compressing existing uncompressed data in the primary cache area 21 and freeing the reduced size (hereinafter referred to as “compression method”), and 1 There are two processing methods: a method of moving data from the next cache area 21 to the secondary cache area 31 (hereinafter referred to as “move method”).

はじめに、圧縮方式の処理時間について説明する。   First, the processing time of the compression method will be described.

本実施形態では、この方式の処理時間は、1次キャッシュ用領域21の非圧縮データをデータ圧縮手段50で圧縮するのに要する時間と、該圧縮データをデータ展開手段60で展開するのに要する時間との合計の時間で表わされるものとする。これら2つの処理に要する時間は、上述したとおり、データサイズから予測することが可能である。   In the present embodiment, the processing time of this method is the time required for compressing the uncompressed data in the primary cache area 21 by the data compressing means 50 and the data expanding means 60 for expanding the compressed data. It shall be expressed as the total time with time. As described above, the time required for these two processes can be estimated from the data size.

なお、本実施形態では、1次記憶装置20に対する読み書きの時間は、上記2つの処理に要する時間に比べて十分に短く無視できるため考慮に入れないが、1次記憶装置20、データ圧縮手段50、および、データ展開手段60の性能次第では考慮に入れることもありうる。   In the present embodiment, the read / write time for the primary storage device 20 is sufficiently short compared with the time required for the above two processes and can be ignored, but is not taken into consideration, but the primary storage device 20 and the data compression means 50 are not taken into consideration. Depending on the performance of the data expansion means 60, it may be taken into consideration.

次に、移動方式の処理時間について説明する。   Next, the processing time of the movement method will be described.

本実施形態では、この方式の処理時間は、データを1次記憶装置20から2次記憶装置30へ送るのに要する時間、データを2次記憶装置30に書き込むのに要する時間、2次記憶装置30から読み出すのに要する時間および1次記憶装置20へ送るのに要する時間の合計の時間で表されるものとする。これら4つの時間は、装置を構成後のテストによる測定値や装置の仕様情報に基づいて、処理対象のデータサイズ毎におおよそ予測できる。   In this embodiment, the processing time of this method is the time required to send data from the primary storage device 20 to the secondary storage device 30, the time required to write data to the secondary storage device 30, and the secondary storage device. It is represented by the total time of the time required for reading from 30 and the time required for sending to the primary storage device 20. These four times can be roughly estimated for each data size to be processed, based on measurement values obtained from tests after the device is configured and device specification information.

なお、本方式でも同様に、1次記憶装置20に対する読み書きの時間は、上記2つの時間に比べて十分に短く無視できるため考慮に入れていないが、1次記憶装置20と2次記憶装置30との間の性能差の程度によっては考慮に入れることもありえる。   Similarly, in this method, the reading / writing time for the primary storage device 20 is sufficiently short compared with the above two times and can be ignored, but is not taken into consideration. However, the primary storage device 20 and the secondary storage device 30 are not taken into consideration. Depending on the degree of performance difference between the two, it may be taken into account.

以上のように、2つの方式は、対象となるデータサイズから処理時間が予測できる。そこで、本実施形態では、2つの方式におけるデータサイズと処理時間との関係を予め予測した判定情報が方式判定部70内に予め格納されており、これにより、方式判定部70はデータサイズに応じて処理時間が短い方の方式を選定する。   As described above, the two methods can predict the processing time from the target data size. Therefore, in the present embodiment, determination information in which the relationship between the data size and the processing time in the two methods is predicted is stored in advance in the method determination unit 70, and thus the method determination unit 70 responds to the data size. Select the method with the shorter processing time.

なお、上記判定情報は、方式判定部70が、処理中に算出してもよい。   The determination information may be calculated by the method determination unit 70 during processing.

ここで、判定情報とは、例えば、2つの方式における処理時間とデータサイズとの関係が図1のようなグラフで表せるとすると、処理対象のデータサイズをdとして、0≦d<aのときは圧縮方式、a≦d<bのときは移動方式、b≦d<x(xは図示せず)のときは圧縮方式、のような関係を示した情報である。   Here, for example, if the relationship between the processing time and the data size in the two methods can be represented by a graph as shown in FIG. 1, the determination information is when the data size to be processed is d and 0 ≦ d <a. Indicates information such as a compression method, a movement method when a ≦ d <b, and a compression method when b ≦ d <x (x is not shown).

なお、上記の移動方式では、4つの時間のうち、2次記憶装置30から読み出すのに要する時間および1次記憶装置20へ送るのに要する時間は処理時間から削っても良い。   In the above moving method, the time required for reading from the secondary storage device 30 and the time required for sending to the primary storage device 20 among the four times may be reduced from the processing time.

外部情報源200は、コンピュータ100で動作するアプリケーションがアクセスする対象のオリジナルデータを格納している記憶装置である。外部情報源200は、1次記憶装置20および2次記憶装置30に比べて、アクセス速度が遅い記憶手段であり、上述の通り、本実施形態では磁気ディスク装置とする。   The external information source 200 is a storage device that stores original data to be accessed by an application running on the computer 100. The external information source 200 is a storage means having a lower access speed than the primary storage device 20 and the secondary storage device 30, and is a magnetic disk device in this embodiment as described above.

なお、本実施形態では、外部情報源200以外の構成要素はすべて1つのコンピュータに搭載されているが、それに限定されるものではない。例えば、2次記憶装置30が高速なネットワーク回線でつながれた別のコンピュータに設けられ、外部情報源200がより低速なネットワーク回線でつながれた別のコンピュータに設けられる構成などでもよい。   In the present embodiment, all the components other than the external information source 200 are mounted on one computer, but the present invention is not limited to this. For example, the secondary storage device 30 may be provided in another computer connected through a high-speed network line, and the external information source 200 may be provided in another computer connected through a lower-speed network line.

次に、上述した構成を備える本実施形態の動作について詳細に説明する。   Next, the operation of the present embodiment having the above-described configuration will be described in detail.

本実施形態の主な動作は、1次キャッシュ用領域21へのデータ登録動作と、キャッシュしたデータへの参照動作とに分けられる。これらについて、以下順番に説明する。   The main operation of this embodiment is divided into a data registration operation to the primary cache area 21 and a reference operation to the cached data. These will be described in order below.

まず、図4を参照して、1次キャッシュ用領域21へのデータ登録動作を説明する。   First, the data registration operation in the primary cache area 21 will be described with reference to FIG.

コンピュータ100の起動時の1次キャッシュ用領域21と2次キャッシュ用領域31との状態は図3の通りであるとする。   Assume that the state of the primary cache area 21 and the secondary cache area 31 when the computer 100 is started is as shown in FIG.

まず、アプリケーションがデータD1の登録を要求し、データD1を1次キャッシュ用領域21へ登録する必要がある場合、演算処理装置10は、1次キャッシュ用領域21への登録対象のデータD1のサイズを確認し、1次キャッシュ用領域21の空き領域24に収められるかどうかを判断する(ステップS100)。   First, when the application requests registration of the data D1 and the data D1 needs to be registered in the primary cache area 21, the arithmetic processing unit 10 determines the size of the data D1 to be registered in the primary cache area 21. Is checked to determine whether or not it can be stored in the free area 24 of the primary cache area 21 (step S100).

なお、1次キャッシュ用領域21への登録要否の判断は、一般的なキャッシュ技術を利用し、本実施形態では詳細を記述しない。   The determination as to whether or not registration to the primary cache area 21 is necessary uses a general cache technology, and details are not described in this embodiment.

もし、空き領域24に収められる場合、演算処理装置10は、1次キャッシュ用領域21の空き領域24にデータD1を書き込んで、その領域を展開情報保存領域22の一部と定義する(ステップS130)。この場合は、これで1次キャッシュ用領域21へのデータD1の登録処理は完了する。   If it is stored in the free area 24, the arithmetic processing unit 10 writes the data D1 in the free area 24 of the primary cache area 21 and defines that area as a part of the development information storage area 22 (step S130). ). In this case, the registration process of the data D1 in the primary cache area 21 is completed.

一方、データD1のサイズが空き領域24のサイズより大きい場合には、1次キャッシュ用領域21の空き領域24のサイズを増やすための処理に進む。   On the other hand, if the size of the data D1 is larger than the size of the free area 24, the process proceeds to increase the size of the free area 24 in the primary cache area 21.

演算処理装置10は、1次キャッシュ用領域21に圧縮情報保存領域23が存在するか否かを確認する(ステップS101)。   The arithmetic processing unit 10 checks whether or not the compressed information storage area 23 exists in the primary cache area 21 (step S101).

もし、ここで圧縮情報保存領域23がなければ、後述するステップS102に進む。   If there is no compressed information storage area 23 here, the process proceeds to step S102 described later.

今は、圧縮情報保存領域23があるので、圧縮データを移動させる処理に進む。   Since there is the compressed information storage area 23 now, the process proceeds to the process of moving the compressed data.

処理データ選択部40は、それまでのアクセス状況から、圧縮情報保存領域23の中で最も利用度の低い圧縮データD2を選択する(ステップS110)。   The processing data selection unit 40 selects the compressed data D2 having the lowest usage in the compressed information storage area 23 from the access status so far (step S110).

演算処理装置10は、圧縮データD2を装置30の2次キャッシュ用領域31内の空き領域34に書き込み、書き込んだ領域を圧縮情報保存領域33と定義する。そして、圧縮データD2を1次キャッシュ用領域21の圧縮情報保存領域23から削除する(ステップS111)。これにより、空き領域24は、データD2の分だけ増加する。この結果、データD1を登録するために必要なサイズの空き領域24が確保された場合には、データD1をそこに登録する(ステップ130)。   The arithmetic processing unit 10 writes the compressed data D2 to the free area 34 in the secondary cache area 31 of the apparatus 30, and defines the written area as the compressed information storage area 33. Then, the compressed data D2 is deleted from the compressed information storage area 23 of the primary cache area 21 (step S111). As a result, the free space 24 is increased by the amount of the data D2. As a result, when a free space 24 having a size necessary for registering the data D1 is secured, the data D1 is registered there (step 130).

一方、データD1を登録するために必要なサイズの空き領域24がまだ確保できない場合には(ステップ100)、ステップS110およびS111の処理をデータD1を収められるだけのサイズの空き領域24が確保できるまで繰り返す。もし、これらのステップを繰り返し、圧縮情報保存領域23の全てのデータを削除してもデータD1を登録するために必要なサイズの空き領域24が確保できない場合には、処理データ選択部40は、それまでのアクセス状況から、1次キャッシュ用領域21の展開情報保存領域22の中で最も利用度の低い非圧縮のデータD3を選択する(ステップS102)。   On the other hand, if the free area 24 of the size necessary for registering the data D1 cannot be secured yet (step 100), the processing of steps S110 and S111 can secure the free area 24 of a size that can accommodate the data D1. Repeat until. If these steps are repeated and all the data in the compressed information storage area 23 is deleted, but the empty area 24 of the size necessary for registering the data D1 cannot be secured, the processing data selection unit 40 From the access status up to that point, uncompressed data D3 having the lowest usage is selected from the expanded information storage area 22 of the primary cache area 21 (step S102).

次に、方式判定部70が、データD3のサイズを確認し、以下のようにして処理時間が短い方式を選択する(ステップS103)。   Next, the method determination unit 70 confirms the size of the data D3 and selects a method with a short processing time as follows (step S103).

すなわち、データD3のサイズd3が、図1のBの範囲(a≦d3<b)の場合、方式判定部70は2次キャッシュ用領域31への移動方式を選択し、ステップS120に進む。   That is, when the size d3 of the data D3 is in the range B in FIG. 1 (a ≦ d3 <b), the method determination unit 70 selects the transfer method to the secondary cache area 31 and proceeds to step S120.

演算処理装置10は、非圧縮データD3を2次キャッシュ用領域31内の空き領域34に書き込み、その書き込んだ領域を展開情報保存領域32と定義する。そして、非圧縮データD3を1次キャッシュ用領域21の展開情報保存領域22から削除する(ステップS120)。これにより、空き領域24は、データD3の分だけ増加する。そして、ステップS100の処理に戻る。   The arithmetic processing unit 10 writes the uncompressed data D3 into the empty area 34 in the secondary cache area 31, and defines the written area as the development information storage area 32. Then, the uncompressed data D3 is deleted from the expanded information storage area 22 of the primary cache area 21 (step S120). As a result, the free space 24 increases by the amount of the data D3. Then, the process returns to step S100.

一方、ステップS102において、データD3のサイズd3が、図1のAの範囲(0≦d3<a、または、b≦d3<x、xは図示せず)の場合、方式判定部70は圧縮方式を選択し、ステップS104に進む。   On the other hand, in step S102, when the size d3 of the data D3 is in the range A in FIG. 1 (0 ≦ d3 <a or b ≦ d3 <x, x is not shown), the method determination unit 70 selects the compression method. And proceed to step S104.

データ圧縮手段50は、非圧縮データD3を圧縮して、1次キャッシュ用領域21内に圧縮情報保存領域23を再度作成し、そこに圧縮したデータD3を書き込む(ステップS104)。   The data compression means 50 compresses the uncompressed data D3, creates the compressed information storage area 23 in the primary cache area 21 again, and writes the compressed data D3 therein (step S104).

次に、演算処理装置10は、圧縮前のデータD3を1次キャッシュ用領域21の展開情報保存領域22から削除する(ステップS105)。これにより、空き領域24は、データD3の圧縮により縮小したサイズ分だけ増加する。そして、ステップS100の処理に戻る。   Next, the arithmetic processing unit 10 deletes the data D3 before compression from the expanded information storage area 22 of the primary cache area 21 (step S105). As a result, the free space 24 increases by the size reduced by the compression of the data D3. Then, the process returns to step S100.

この時点で、まだデータD1を登録するために必要なサイズの空き領域24が確保できない場合であって、ステップ103でデータD3に対して移動方式が選択されていたときには、再度ステップS102およびS103の処理に進み、ステップS120、または、ステップS104およびS105、の処理を行い、一方、ステップ103でデータD3に対して圧縮方式が選択されていたときには、ステップS110およびS111の処理に進む。   At this time, if the empty area 24 of the size necessary for registering the data D1 cannot be secured yet, and the movement method is selected for the data D3 in step 103, the steps S102 and S103 are performed again. The process proceeds to step S120 or steps S104 and S105. On the other hand, if the compression method is selected for the data D3 in step 103, the process proceeds to steps S110 and S111.

例えば、展開情報保存領域22に2つのデータaとデータbとがあるとき、まず、利用率が低いデータaが先に処理対象に選ばれて、そのまま移動した方が速い場合は非圧縮のまま2次キャッシュ用領域31へ移動され、移動するより圧縮した方が速い場合は圧縮される。そして、それでも空き領域24が足りない場合は、展開情報保存領域22内の別のデータbが処理対象になる前に、先に圧縮されたデータaが2次キャッシュ用領域31へ移動される。すなわち、空き領域24のサイズが十分に確保できるまで、展開情報保存領域22のデータは、処理データ選択部40により利用率が低いと判断された順に、2次キャッシュ用領域31へ移動されていき、そのデータの形態は、処理時間に応じて、圧縮または非圧縮という形態になる。   For example, when there are two data a and data b in the development information storage area 22, first, data a having a low utilization rate is selected as a processing target first, and if it is faster to move as it is, it remains uncompressed. If it is moved to the secondary cache area 31 and the compression is faster than the movement, the area is compressed. If the free space 24 is still insufficient, the previously compressed data a is moved to the secondary cache area 31 before another data b in the development information storage area 22 is processed. That is, until the size of the free area 24 can be sufficiently secured, the data in the development information storage area 22 is moved to the secondary cache area 31 in the order in which the processing data selection unit 40 determines that the usage rate is low. The form of the data is a form of compression or non-compression according to the processing time.

以上のような処理フローに従って空き領域24のサイズを増やしていき、最終的に、データD1を登録できるだけのサイズの空き領域24を確保し(ステップS100)、そこを展開情報保存領域23と定義してデータD1を格納する(ステップS130)ことにより、1次キャッシュ用領域21へのデータD1の登録処理が完了する。   The size of the free area 24 is increased in accordance with the processing flow as described above. Finally, a free area 24 having a size sufficient to register the data D1 is secured (step S100), and this is defined as a development information storage area 23. By storing the data D1 (step S130), the registration process of the data D1 in the primary cache area 21 is completed.

このようにして、1次キャッシュ用領域21内の既存データを、該データを最も速く移動できる手段を用いて2次キャッシュ用領域31へ移動させるか、1次キャッシュ用領域21内で圧縮することにより既存データのサイズを縮小して、新しいデータD1を1次キャッシュ用領域21へ登録することが実現できる。   In this way, the existing data in the primary cache area 21 is moved to the secondary cache area 31 using means capable of moving the data fastest, or is compressed in the primary cache area 21. Thus, it is possible to reduce the size of the existing data and register the new data D1 in the primary cache area 21.

次に、図5を参照して、キャッシュしたデータの参照動作を説明する。   Next, referring to FIG. 5, the reference operation for the cached data will be described.

今、すでに1次キャッシュ用領域21と2次キャッシュ用領域31とになんらかのデータが登録されており、アプリケーションがデータD4の参照を要求したとする。   Now, it is assumed that some data has already been registered in the primary cache area 21 and the secondary cache area 31, and the application requests reference to the data D4.

まず、演算処理装置10は、アクセス対象のデータD4が1次キャッシュ用領域21に保存されているかどうかを確認する(ステップS200)。   First, the arithmetic processing unit 10 checks whether or not the access target data D4 is stored in the primary cache area 21 (step S200).

もし、1次キャッシュ用領域21の展開情報保存領域22、または、圧縮情報保存領域23に保存されていた場合は、ステップS203に進む。   If it is stored in the expansion information storage area 22 or the compressed information storage area 23 of the primary cache area 21, the process proceeds to step S203.

一方、1次キャッシュ用領域21に保存されていなかった場合、演算処理装置10は、アクセス対象のデータD4が2次キャッシュ用領域31に保存されているかどうかを確認する(ステップS201)。   On the other hand, when the data is not stored in the primary cache area 21, the arithmetic processing unit 10 checks whether the access target data D4 is stored in the secondary cache area 31 (step S201).

もし、2次キャッシュ用領域21の展開情報保存領域22、または、圧縮情報保存領域23に保存されていなかった場合、キャッシュミスとして処理する。すなわち、演算処理装置10は、外部情報源200からデータD4を取得し(ステップS210)、1次記憶装置20のアプリケーション用領域25に格納してアプリケーションに引き渡す(ステップS206)。   If it is not stored in the expanded information storage area 22 or the compressed information storage area 23 of the secondary cache area 21, it is processed as a cache miss. That is, the arithmetic processing device 10 acquires the data D4 from the external information source 200 (step S210), stores it in the application area 25 of the primary storage device 20, and delivers it to the application (step S206).

この後、データD4を1次キャッシュ用領域21に登録する必要があると判断された場合は、上述した1次キャッシュ用領域21へのデータ登録動作を行っても良い。   Thereafter, when it is determined that the data D4 needs to be registered in the primary cache area 21, the above-described data registration operation in the primary cache area 21 may be performed.

一方、ステップS201において、データD4が2次キャッシュ用領域31に保存されていた場合、演算処理装置10は、2次キャッシュ用領域31からデータD4を1次キャッシュ用領域21へ転送する。そして、演算処理装置10は、転送したデータD4が非圧縮データならば展開情報保存領域22へデータD1を保存し、データD4が圧縮データならば圧縮情報保存領域23へ保存する(ステップS202)。転送後、演算処理装置10は、2次キャッシュ用領域31のデータD4を削除する。   On the other hand, when the data D4 is stored in the secondary cache area 31 in step S201, the arithmetic processing unit 10 transfers the data D4 from the secondary cache area 31 to the primary cache area 21. If the transferred data D4 is non-compressed data, the arithmetic processing unit 10 stores the data D1 in the decompressed information storage area 22, and if the data D4 is compressed data, stores it in the compressed information storage area 23 (step S202). After the transfer, the arithmetic processing unit 10 deletes the data D4 in the secondary cache area 31.

次に、演算処理装置10は、データD4が圧縮されているかどうか確認する(ステップS203)。   Next, the arithmetic processing unit 10 confirms whether the data D4 is compressed (step S203).

もし、非圧縮データの場合は、ステップS206に進む。   If it is uncompressed data, the process proceeds to step S206.

一方、圧縮データの場合、データ展開手段60は、圧縮データD4を展開し(ステップS204)、1次キャッシュ用領域21の展開情報保存領域22に展開したデータD4を保存するとともに、元の圧縮データD4を圧縮情報保存領域23から削除する(ステップS205)。   On the other hand, in the case of compressed data, the data expansion means 60 expands the compressed data D4 (step S204) and stores the expanded data D4 in the expanded information storage area 22 of the primary cache area 21 and the original compressed data. D4 is deleted from the compressed information storage area 23 (step S205).

最後に、演算処理装置10は、1次キャッシュ用領域21の展開情報保存領域22の非圧縮データD4を、1次記憶装置20のアプリケーション用領域25に格納してアプリケーションに引き渡す(ステップS206)。   Finally, the arithmetic processing unit 10 stores the uncompressed data D4 in the decompressed information storage area 22 of the primary cache area 21 in the application area 25 of the primary storage apparatus 20 and delivers it to the application (step S206).

なお、ステップS202およびS205において、データD4を保存するための1次キャッシュ用領域21の空き領域24が不足している場合は、上述した1次キャッシュ用領域21へのデータ登録動作を行う。   In steps S202 and S205, when the free area 24 of the primary cache area 21 for storing the data D4 is insufficient, the data registration operation to the primary cache area 21 described above is performed.

ここで、キャッシュデータの参照に要した時間を考える。   Here, the time required for referring to the cache data is considered.

まず、2次キャッシュ用領域31に保存されていた場合は、2次記憶装置30からの読み出しと、1次記憶装置20への転送時間を要する。   First, when it is stored in the secondary cache area 31, it takes time to read from the secondary storage device 30 and to transfer to the primary storage device 20.

次に、データ圧縮されていた場合は、展開する時間を要する。   Next, when data is compressed, it takes time to decompress.

しかし、1次キャッシュ用領域21へのデータ登録動作において方式判定部70が処理方式を選択する(ステップS103)ときの判定情報に、上記のような参照するために要する時間を加算しているので、後でデータを利用する際の処理に要する時間はすでに方式選択において考慮済みである。すなわち、本実施形態では、キャッシュデータ参照のための展開処理を含めても処理時間が短くなるときだけ、データ圧縮を行うように制御されていると言える。同じく、2次記憶装置30からの読み出しと、1次記憶装置20へ送る時間を含めても処理時間が短くなるときだけ、データ移動を行うように制御されているとも言える。   However, since the method determining unit 70 adds the time required for the reference as described above to the determination information when the method determining unit 70 selects the processing method in the data registration operation in the primary cache area 21 (step S103). The time required for processing when using data later has already been taken into account in the method selection. That is, in the present embodiment, it can be said that the data compression is controlled only when the processing time is shortened even if the expansion processing for cache data reference is included. Similarly, it can be said that the data movement is controlled only when the processing time becomes short even when the reading from the secondary storage device 30 and the time to send to the primary storage device 20 are included.

以上説明したように、本実施形態には、従来の階層的な記憶構成を持つキャッシュ制御装置や、キャッシュデータを圧縮して保存するのみのキャッシュ制御装置に比べて、キャッシュデータの登録処理の性能が向上するという効果がある。   As described above, this embodiment has a cache data registration processing performance higher than that of a conventional cache control device having a hierarchical storage configuration and a cache control device that only stores compressed cache data. Has the effect of improving.

その理由は、新たなデータを登録するために1次キャッシュ用領域から予め定めた条件に基づきデータを選択し、その選択されたデータを圧縮するのに要する時間とその選択されたデータを2次キャッシュ用領域に移動させ書き込むのに要する時間とのうちの短い時間の方の処理を選択して、当該選択された処理を当該データに施すようにしたためである。   The reason is that, in order to register new data, data is selected from the primary cache area based on a predetermined condition, and the time required for compressing the selected data and the selected data are determined as secondary data. This is because a process having a shorter time out of the time required for moving to the cache area and writing is selected, and the selected process is performed on the data.

さらに、2次キャッシュ用領域に保存されたデータにおいては、キャッシュの参照処理の性能が向上する効果もある。   Further, the data stored in the secondary cache area has an effect of improving the performance of the cache reference process.

その理由は、1次キャッシュ用領域の空き容量を確保する処理の時点で、2次キャッシュ用領域からデータを読み込む際の移動と展開のための処理に要する時間を加算した予測値に基づいて、処理時間が短い方の方式を判定するためである。すなわち、圧縮と展開とに要する時間を加算してもなお、圧縮してサイズが小さくなったデータを2次記憶装置から読み出して1次記憶装置へ転送するために要する処理時間がより短く済むようなデータサイズの場合は、圧縮して2次キャッシュ用領域に保存されるので、常に非圧縮の状態で2次キャッシュにデータを保存する従来方式に比べて参照性能が向上する。一方、圧縮と展開とを行うことで余計に時間が掛かるようなデータサイズの場合は、圧縮しないまま2次キャッシュ用領域に移動されるので、常にキャッシュデータを圧縮する従来方式に比べても性能が向上する。   The reason is based on a predicted value obtained by adding the time required for the processing for movement and expansion when reading data from the secondary cache area at the time of the process for securing the free capacity of the primary cache area, This is to determine the method with the shorter processing time. In other words, even if the time required for compression and decompression is added, the processing time required for reading the compressed and reduced data from the secondary storage device and transferring it to the primary storage device can be shortened. When the data size is small, the data is compressed and stored in the secondary cache area. Therefore, the reference performance is improved as compared with the conventional method in which data is always stored in the secondary cache in an uncompressed state. On the other hand, if the data size takes extra time by performing compression and decompression, it is moved to the secondary cache area without being compressed, so performance is always better than the conventional method of compressing cache data. Will improve.

<第2の実施形態>
次に、上述した第1の実施形態を基本とする第2の実施形態について説明する。以下では、第2の実施形態に係る特徴的な部分を中心に説明し、第1の実施形態と同様な構成を有する第2の実施形態の構成要素には、第1の実施形態で付した参照符号と同一の参照符号を付し、その構成要素について重複する詳細な説明は省略する。
<Second Embodiment>
Next, a second embodiment based on the above-described first embodiment will be described. In the following, the characteristic part according to the second embodiment will be mainly described, and the components of the second embodiment having the same configuration as the first embodiment are attached in the first embodiment. The same reference numerals as those of the reference numerals are attached, and the detailed description of the constituent elements is omitted.

図6は、第2の実施形態を示すブロック図である。   FIG. 6 is a block diagram showing the second embodiment.

図6を参照すると、本実施形態では、コンピュータ101の中にデータ圧縮手段50およびデータ展開手段60をそれぞれ複数個有する点が第1の実施形態と異なる。   Referring to FIG. 6, the present embodiment is different from the first embodiment in that a computer 101 has a plurality of data compression means 50 and a plurality of data expansion means 60.

なお、データ圧縮手段50およびデータ展開手段60の数は同数である必要はない。   Note that the number of data compression means 50 and data expansion means 60 need not be the same.

次に、上述した構成を備える本実施形態の動作について詳細に説明する。   Next, the operation of the present embodiment having the above-described configuration will be described in detail.

本実施形態の動作は、第1の実施形態と基本的には同じであり、異なる点は以下の点だけである。   The operation of the present embodiment is basically the same as that of the first embodiment, and only the following points are different.

まず、1次キャッシュ用領域21へのデータ登録動作においては、方式判定部70が、データ圧縮手段50およびデータ展開手段60の数に合わせてデータD3を複数の部分データに分割し、例えば、最短時間の方式を決定する際に採用するデータサイズを、分割したデータの中で最も大きなデータサイズとする(図4のステップS103)。すなわち、方式判定部70が、データD3を複数の圧縮手段50と一対一対応するよう複数の第1の部分データに分割して各第1の部分データを対応する圧縮手段50に圧縮処理させたときに要する処理時間の予測値のうちの最も長いものと、データD3を圧縮した圧縮データを複数の展開手段60と一対一対応するよう複数の第2の部分データに分割して各第2の部分データを対応する展開手段60に展開処理させたときに要する処理時間の予測値のうちの最も長いものとを加算した値を圧縮方式の予測値として割り出す。   First, in the data registration operation in the primary cache area 21, the method determination unit 70 divides the data D3 into a plurality of partial data according to the number of the data compression means 50 and the data expansion means 60. The data size adopted when determining the time method is set to the largest data size among the divided data (step S103 in FIG. 4). That is, the method determination unit 70 divides the data D3 into a plurality of first partial data so as to have a one-to-one correspondence with the plurality of compression units 50, and causes each compression unit 50 to perform compression processing on each first partial data. The longest predicted processing time required and the compressed data obtained by compressing the data D3 are divided into a plurality of second partial data so as to have a one-to-one correspondence with the plurality of decompressing means 60, and each second data is divided. A value obtained by adding the longest predicted value of the processing time required when the corresponding data is expanded by the corresponding expansion means 60 is determined as a compression method predicted value.

なお、ここでは、展開手段60による展開処理の時間の予測値を考慮して圧縮方式の予測値を割り出すようにしたが、展開手段60による展開処理の時間の予測値を考慮せず、圧縮処理の処理時間のみから予測値を割り出すようにしてもよいことは言うまでもない。   Here, the predicted value of the compression method is calculated in consideration of the predicted value of the decompression process time by the decompression means 60, but the compression process is performed without considering the predictive value of the decompression process time by the decompression means 60. Needless to say, the predicted value may be determined only from the processing time.

次に、データD3を実際に圧縮する際には、ステップS103で方式判定部70により分割された複数の第1の部分データがそれぞれ対応する複数のデータ圧縮手段50に分配されて、複数のデータ圧縮手段50で並行して圧縮処理される(図4のステップS104)。   Next, when the data D3 is actually compressed, the plurality of first partial data divided by the method determination unit 70 in step S103 is distributed to the corresponding plurality of data compression means 50, and the plurality of data The compression means 50 performs compression processing in parallel (step S104 in FIG. 4).

そして、データへの参照動作においては、圧縮されたデータD3を展開する際も同様に、データD3が複数の第2の部分データに分割され、こうして分割された複数の第2の部分データはそれぞれ対応する複数のデータ展開手段60に分配されて、複数のデータ展開手段60で並行して展開処理される(図5のステップS203)。   In the reference operation to the data, when decompressing the compressed data D3, the data D3 is divided into a plurality of second partial data, and the plurality of second partial data thus divided are respectively The data is distributed to a plurality of corresponding data expansion means 60 and processed in parallel by the plurality of data expansion means 60 (step S203 in FIG. 5).

以上、説明したように、本実施形態には、上述した第1の実施形態と同様の効果に加えて、さらに、キャッシュ登録処理および参照処理の時間を短縮することができるという効果がある。   As described above, the present embodiment has an effect that the time for the cache registration process and the reference process can be further shortened in addition to the same effect as the first embodiment described above.

その理由は、データを分割して並列処理することで、データ圧縮および展開の処理時間を短縮することができるためである。   This is because the data compression and decompression processing time can be shortened by dividing the data and performing parallel processing.

なお、本発明は上述した実施形態の一部または全部は、以下の付記のようにも記載されうるが、以下の付記に限定されるものではないことは言うまでもない。   In addition, although part or all of this invention can be described also as the following additional remarks, it cannot be overemphasized that this invention is not limited to the following additional remarks.

(付記1)
データを記憶する1次記憶手段と、前記1次記憶手段よりもデータの読み出しが低速である2次記憶手段と、データを圧縮して前記1次記憶手段に保存できるデータ圧縮手段とを使用するキャッシュ制御方法において、
データの各サイズと、前記データ圧縮手段により各サイズのデータを圧縮するのに要する圧縮時間の予測値である圧縮方式予測値と、各サイズのデータを前記1次記憶手段から2次記憶手段に移動させ書き込むのに要する移動時間の予測値である移動方式予測値との関係を記憶手段に予め記憶しておく予測値記憶ステップと、
前記1次記憶手段に新規データを保存する場合であって、前記1次記憶手段に該新規データを保存するための空き領域が存在しない場合、予め定めた条件に基づき指定される前記1次記憶手段内のデータを処理対象データとして選択する選択ステップと、
前記処理対象データのサイズの場合には、前記圧縮方式予測値および前記移動方式予測値のうちのいずれが小さいかを判定する判定ステップと、
前記判定ステップにおいて、前記圧縮方式予測値の方が小さいと判定された場合には、前記処理対象データを前記圧縮手段で圧縮した圧縮データを前記1次記憶手段に保存し、一方、前記移動方式予測値の方が小さいと判定された場合には、前記処理対象データを前記第2の記憶手段に移動させ書き込む処理ステップと
を含むことを特徴とするキャッシュ制御方法。
(Appendix 1)
A primary storage unit that stores data, a secondary storage unit that reads data at a lower speed than the primary storage unit, and a data compression unit that compresses and stores the data in the primary storage unit are used. In the cache control method,
Each size of data, a compression method predicted value that is a predicted value of the compression time required to compress the data of each size by the data compression unit, and each size of data from the primary storage unit to the secondary storage unit A predicted value storage step for storing in advance in the storage means the relationship with the predicted value of the movement method, which is the predicted value of the travel time required to move and write,
In the case where new data is stored in the primary storage means, and there is no free area for storing the new data in the primary storage means, the primary storage specified based on a predetermined condition. A selection step of selecting data in the means as processing target data;
In the case of the size of the processing target data, a determination step of determining which one of the compression method predicted value and the movement method predicted value is smaller;
In the determination step, when it is determined that the compression method predicted value is smaller, the compressed data obtained by compressing the processing target data by the compression unit is stored in the primary storage unit, while the movement method is stored. And a processing step of moving and writing the processing target data to the second storage means when it is determined that the predicted value is smaller.

(付記2)
データを記憶する1次記憶手段と、前記1次記憶手段よりもデータの読み出しが低速である2次記憶手段と、データを圧縮して前記1次記憶手段に保存できるデータ圧縮手段とを使用するキャッシュ制御方法において、
前記1次記憶手段に新規データを保存する場合であって、前記1次記憶手段に該新規データを保存するための空き領域が存在しない場合、予め定めた条件に基づき指定される前記1次記憶手段内のデータを処理対象データとして選択する選択ステップと、
前記データ圧縮手段により前記処理対象データを圧縮するのに要する圧縮時間の予測値である圧縮方式予測値と、前記処理対象データを前記1次記憶手段から2次記憶手段に移動させ書き込むのに要する移動時間の予測値である移動方式予測値とを算出し、前記圧縮方式予測値および前記移動方式予測値のうちのいずれが小さいかを判定する判定ステップと、
前記判定ステップにおいて、前記圧縮方式予測値の方が小さいと判定された場合には、前記処理対象データを前記圧縮手段で圧縮した圧縮データを前記1次記憶手段に保存し、一方、前記移動方式予測値の方が小さいと判定された場合には、前記処理対象データを前記第2の記憶手段に移動させ書き込む処理ステップと
を含むことを特徴とするキャッシュ制御方法。
(Appendix 2)
A primary storage unit that stores data, a secondary storage unit that reads data at a lower speed than the primary storage unit, and a data compression unit that compresses and stores the data in the primary storage unit are used. In the cache control method,
In the case where new data is stored in the primary storage means, and there is no free area for storing the new data in the primary storage means, the primary storage specified based on a predetermined condition. A selection step of selecting data in the means as processing target data;
A compression method predicted value, which is a predicted value of the compression time required for compressing the processing target data by the data compression means, and the processing target data required to move from the primary storage means to the secondary storage means for writing. A determination step of calculating a movement method prediction value that is a predicted value of a movement time, and determining which of the compression method prediction value and the movement method prediction value is smaller;
In the determination step, when it is determined that the compression method predicted value is smaller, the compressed data obtained by compressing the processing target data by the compression unit is stored in the primary storage unit, while the movement method is stored. And a processing step of moving and writing the processing target data to the second storage means when it is determined that the predicted value is smaller.

(付記3)
前記移動方式予測値は、当該データを前記2次記憶手段から読み出し1次記憶手段に移動させるのに要する時間を加算した値であることを特徴とする付記1または2記載のキャッシュ制御方法。
(Appendix 3)
The cache control method according to appendix 1 or 2, wherein the movement method predicted value is a value obtained by adding a time required to read the data from the secondary storage unit and move it to the primary storage unit.

(付記4)
前記データ圧縮手段は複数個使用され、
前記判定ステップは、前記処理対象データを複数の前記圧縮手段と一対一対応するよう複数の部分データに分割して、各該部分データを対応する前記データ圧縮手段に圧縮処理させたときに要する処理時間の予測値のうちの最も長いものを前記圧縮方式予測値として使用し、
前記判定ステップで前記圧縮方式予測値の方が小さいと判定された場合には、前記複数の部分データを対応する複数の前記データ圧縮手段で並行して圧縮処理する
ことを特徴とする付記1乃至3記載のキャッシュ制御方法。
(Appendix 4)
A plurality of the data compression means are used,
The determination step is a process required when the processing target data is divided into a plurality of partial data so as to have a one-to-one correspondence with the plurality of compression units, and each partial data is compressed by the corresponding data compression unit. Use the longest prediction value of time as the compression method prediction value,
If it is determined in the determining step that the compression method predicted value is smaller, the plurality of partial data are compressed in parallel by the plurality of corresponding data compressing means. 3. The cache control method according to 3.

(付記5)
前記データ圧縮手段と圧縮データを非圧縮データに展開するデータ展開手段とが複数個使用され、
前記判定ステップは、前記処理対象データを複数の前記圧縮手段と一対一対応するよう複数の第1の部分データに分割して各該第1の部分データを対応する前記データ圧縮手段に圧縮処理させたときに要する処理時間の予測値のうちの最も長いものと、前記処理対象データを圧縮した圧縮データを複数の前記データ展開手段と一対一対応するよう複数の第2の部分データに分割して各該第2の部分データを対応する前記データ展開手段に展開処理させたときに要する処理時間の予測値のうちの最も長いものとを加算した値を前記圧縮方式予測値として使用し、
前記判定ステップで前記圧縮方式予測値の方が小さいと判定された場合には、前記複数の第1の部分データを対応する複数の前記データ圧縮手段で並行して圧縮処理する
ことを特徴とする付記1乃至3記載のキャッシュ制御方法。
(Appendix 5)
A plurality of the data compression means and data expansion means for expanding compressed data into uncompressed data are used,
The determination step divides the processing target data into a plurality of first partial data so as to have a one-to-one correspondence with the plurality of compression units, and causes each data compression unit to perform compression processing on each first partial data. The longest predicted value of the processing time required at the time and the compressed data obtained by compressing the processing target data are divided into a plurality of second partial data so as to correspond one-to-one with the plurality of data expansion means. Using the value obtained by adding the longest of the predicted values of the processing time required when the second data is expanded by the corresponding data expansion means as the compression method predicted value,
When it is determined in the determining step that the compression method predicted value is smaller, the plurality of first partial data are compressed in parallel by the plurality of corresponding data compression means. The cache control method according to appendices 1 to 3.

(付記6)
データを記憶する1次記憶手段と、前記1次記憶手段よりもデータの読み出しが低速である2次記憶手段と、データを圧縮して前記1次記憶手段に保存できるデータ圧縮手段とを含むシステムにおいて、
データの各サイズと、前記データ圧縮手段により各サイズのデータを圧縮するのに要する圧縮時間の予測値である圧縮方式予測値と、各サイズのデータを前記1次記憶手段から2次記憶手段に移動させ書き込むのに要する移動時間の予測値である移動方式予測値との関係を記憶手段に予め記憶しておく予測値記憶処理と、
前記1次記憶手段に新規データを保存する場合であって、前記1次記憶手段に該新規データを保存するための空き領域が存在しない場合、予め定めた条件に基づき指定される前記1次記憶手段内のデータを処理対象データとして選択する選択処理と、
前記処理対象データのサイズの場合には、前記圧縮方式予測値および前記移動方式予測値のうちのいずれが小さいかを判定する判定処理と、
前記判定処理において、前記圧縮方式予測値の方が小さいと判定された場合には、前記処理対象データを前記圧縮手段で圧縮した圧縮データを前記1次記憶手段に保存し、一方、前記移動方式予測値の方が小さいと判定された場合には、前記処理対象データを前記第2の記憶手段に移動させ書き込む処理と
をコンピュータに実行させることを特徴とするキャッシュ制御プログラム。
(Appendix 6)
A system comprising primary storage means for storing data, secondary storage means for reading data at a lower speed than the primary storage means, and data compression means for compressing and storing data in the primary storage means In
Each size of data, a compression method predicted value that is a predicted value of the compression time required to compress the data of each size by the data compression unit, and each size of data from the primary storage unit to the secondary storage unit A predicted value storage process for storing in advance in a storage means a relationship with a predicted value of a movement method that is a predicted value of a moving time required to move and write;
In the case where new data is stored in the primary storage means, and there is no free area for storing the new data in the primary storage means, the primary storage specified based on a predetermined condition. Selection processing for selecting data in the means as processing target data;
In the case of the size of the processing target data, a determination process for determining which of the compression method predicted value and the movement method predicted value is smaller;
In the determination process, when it is determined that the compression method predicted value is smaller, the compressed data obtained by compressing the processing target data by the compression unit is stored in the primary storage unit, while the movement method When it is determined that the predicted value is smaller, the cache control program causes the computer to execute a process of moving and writing the processing target data to the second storage unit.

(付記7)
データを記憶する1次記憶手段と、前記1次記憶手段よりもデータの読み出しが低速である2次記憶手段と、データを圧縮して前記1次記憶手段に保存できるデータ圧縮手段とを含むシステムにおいて、
前記1次記憶手段に新規データを保存する場合であって、前記1次記憶手段に該新規データを保存するための空き領域が存在しない場合、予め定めた条件に基づき指定される前記1次記憶手段内のデータを処理対象データとして選択する選択処理と、
前記データ圧縮手段により前記処理対象データを圧縮するのに要する圧縮時間の予測値である圧縮方式予測値と、前記処理対象データを前記1次記憶手段から2次記憶手段に移動させ書き込むのに要する移動時間の予測値である移動方式予測値とを算出し、前記圧縮方式予測値および前記移動方式予測値のうちのいずれが小さいかを判定する判定処理と、
前記判定処理において、前記圧縮方式予測値の方が小さいと判定された場合には、前記処理対象データを前記圧縮手段で圧縮した圧縮データを前記1次記憶手段に保存し、一方、前記移動方式予測値の方が小さいと判定された場合には、前記処理対象データを前記第2の記憶手段に移動させ書き込む処理と
をコンピュータに実行させることを特徴とするキャッシュ制御プログラム。
(Appendix 7)
A system comprising primary storage means for storing data, secondary storage means for reading data at a lower speed than the primary storage means, and data compression means for compressing and storing data in the primary storage means In
In the case where new data is stored in the primary storage means, and there is no free area for storing the new data in the primary storage means, the primary storage specified based on a predetermined condition. Selection processing for selecting data in the means as processing target data;
A compression method predicted value, which is a predicted value of the compression time required for compressing the processing target data by the data compression means, and the processing target data required to move from the primary storage means to the secondary storage means for writing. A determination process for calculating a movement method prediction value that is a predicted value of a movement time and determining which one of the compression method prediction value and the movement method prediction value is smaller;
In the determination process, when it is determined that the compression method predicted value is smaller, the compressed data obtained by compressing the processing target data by the compression unit is stored in the primary storage unit, while the movement method When it is determined that the predicted value is smaller, the cache control program causes the computer to execute a process of moving and writing the processing target data to the second storage unit.

(付記8)
前記圧縮方式予測値は、圧縮された当該データをデータ展開手段で非圧縮データに展開するのに要する時間を加算した値であることを特徴とする付記6または7記載のキャッシュ制御プログラム。
(Appendix 8)
8. The cache control program according to appendix 6 or 7, wherein the compression method predicted value is a value obtained by adding a time required for decompressing the compressed data to uncompressed data by a data decompressing unit.

(付記9)
前記移動方式予測値は、当該データを前記2次記憶手段から読み出し1次記憶手段に移動させるのに要する時間を加算した値であることを特徴とする付記6乃至8記載のキャッシュ制御プログラム。
(Appendix 9)
The cache control program according to any one of appendices 6 to 8, wherein the movement method predicted value is a value obtained by adding a time required for reading the data from the secondary storage unit and moving it to the primary storage unit.

(付記10)
前記システムは、複数の前記データ圧縮手段を含み、
前記判定処理は、前記処理対象データを複数の前記圧縮手段と一対一対応するよう複数の部分データに分割して、各該部分データを対応する前記データ圧縮手段に圧縮処理させたときに要する処理時間の予測値のうちの最も長いものを前記圧縮方式予測値として使用し、
前記判定処理で前記圧縮方式予測値の方が小さいと判定された場合には、前記複数の部分データを対応する複数の前記データ圧縮手段で並行して圧縮処理する
ことを特徴とする付記6、7または9記載のキャッシュ制御プログラム。
(Appendix 10)
The system includes a plurality of the data compression means,
The determination process is a process required when the processing target data is divided into a plurality of partial data so as to have a one-to-one correspondence with the plurality of compression units, and each partial data is compressed by the corresponding data compression unit. Use the longest prediction value of time as the compression method prediction value,
Appendix 6, wherein when the determination process determines that the compression method predicted value is smaller, the plurality of partial data are compressed in parallel by the plurality of corresponding data compression means. The cache control program according to 7 or 9.

(付記11)
前記システムは、複数の前記データ圧縮手段と圧縮データを非圧縮データに展開する複数のデータ展開手段とを含み、
前記判定処理は、前記処理対象データを複数の前記圧縮手段と一対一対応するよう複数の第1の部分データに分割して各該第1の部分データを対応する前記データ圧縮手段に圧縮処理させたときに要する処理時間の予測値のうちの最も長いものと、前記処理対象データを圧縮した圧縮データを複数の前記データ展開手段と一対一対応するよう複数の第2の部分データに分割して各該第2の部分データを対応する前記データ展開手段に展開処理させたときに要する処理時間の予測値のうちの最も長いものとを加算した値を前記圧縮方式予測値として使用し、
前記判定処理で前記圧縮方式予測値の方が小さいと判定された場合には、前記複数の第1の部分データを対応する複数の前記データ圧縮手段で並行して圧縮処理する
ことを特徴とする付記6、7または9記載のキャッシュ制御プログラム。
(Appendix 11)
The system includes a plurality of data compression means and a plurality of data expansion means for expanding compressed data into uncompressed data,
In the determination process, the data to be processed is divided into a plurality of first partial data so as to have a one-to-one correspondence with the plurality of compression units, and each of the first partial data is compressed by the corresponding data compression unit. The longest predicted value of the processing time required at the time and the compressed data obtained by compressing the processing target data are divided into a plurality of second partial data so as to correspond one-to-one with the plurality of data expansion means. Using the value obtained by adding the longest of the predicted values of the processing time required when the second data is expanded by the corresponding data expansion means as the compression method predicted value,
When it is determined that the compression method predicted value is smaller in the determination process, the plurality of first partial data are compressed in parallel by the plurality of corresponding data compression units. The cache control program according to appendix 6, 7 or 9.

10 演算処理装置
20 1次記憶装置
21 1次キャッシュ用領域
22 展開情報保存領域
23 圧縮情報保存領域
24 空き領域
25 アプリケーション用領域
30 2次記憶装置
31 2次キャッシュ用領域
32 展開情報保存領域
33 圧縮情報保存領域
34 空き領域
40 処理データ選択部
50 データ圧縮手段
60 データ展開手段
70 方式判定部
100 コンピュータ
200 外部情報源
101 コンピュータ
DESCRIPTION OF SYMBOLS 10 Arithmetic processing unit 20 Primary storage device 21 Primary cache area 22 Expansion information storage area 23 Compression information storage area 24 Free area 25 Application area 30 Secondary storage device 31 Secondary cache area 32 Expansion information storage area 33 Compression Information storage area 34 Free area 40 Processing data selection section 50 Data compression means 60 Data expansion means 70 Method determination section 100 Computer 200 External information source 101 Computer

Claims (10)

データを記憶する1次記憶手段と、
前記1次記憶手段よりもデータの読み出しが低速である2次記憶手段と、
データを圧縮して前記1次記憶手段に保存できるデータ圧縮手段と、
前記1次記憶手段に新規データを保存する場合であって、前記1次記憶手段に該新規データを保存するための空き領域が存在しない場合、予め定めた条件に基づき指定される前記1次記憶手段内のデータを処理対象データとして選択する選択手段と、
データの各サイズと、前記データ圧縮手段により各サイズのデータを圧縮するのに要する圧縮時間の予測値である圧縮方式予測値、および各サイズのデータを前記1次記憶手段から前記2次記憶手段に移動させ書き込むのに要する移動時間の予測値である移動方式予測値との関係に基づいて、前記処理対象データのサイズから予測される前記圧縮方式予測値および前記移動方式予測値のうちのいずれが小さいかを判定する判定手段と、
前記判定手段において、前記圧縮方式予測値の方が小さいと判定された場合には、前記処理対象データを前記データ圧縮手段で圧縮した圧縮データを前記1次記憶手段に保存し、一方、前記移動方式予測値の方が小さいと判定された場合には、前記処理対象データを前記2次記憶手段に移動させ書き込む処理手段と
を備えたことを特徴とするキャッシュ制御装置。
Primary storage means for storing data;
Secondary storage means for reading data slower than the primary storage means;
Data compression means capable of compressing and storing data in the primary storage means;
In the case where new data is stored in the primary storage means, and there is no free area for storing the new data in the primary storage means, the primary storage specified based on a predetermined condition. Selecting means for selecting data in the means as processing target data;
And each size of the data, the compression method predicted value is a prediction value of the compression time required to compress the data for each size by the data compressing means, and said secondary storage means data for each size from the primary storage means Any one of the compression method prediction value and the movement method prediction value predicted from the size of the processing target data based on the relationship with the movement method prediction value that is a prediction value of the movement time required to move and write to Determining means for determining whether or not is small;
When the determination means determines that the compression method predicted value is smaller, the compressed data obtained by compressing the data to be processed by the data compression means is stored in the primary storage means, while the movement A cache control device comprising : a processing unit that moves and writes the processing target data to the secondary storage unit when it is determined that the method predicted value is smaller.
データを記憶する1次記憶手段と、
前記1次記憶手段よりもデータの読み出しが低速である2次記憶手段と、
データを圧縮して前記1次記憶手段に保存できるデータ圧縮手段と、
前記1次記憶手段に新規データを保存する場合であって、前記1次記憶手段に該新規データを保存するための空き領域が存在しない場合、予め定めた条件に基づき指定される前記1次記憶手段内のデータを処理対象データとして選択する選択手段と、
前記データ圧縮手段により前記処理対象データを圧縮するのに要する圧縮時間の予測値である圧縮方式予測値と、前記処理対象データを前記1次記憶手段から前記2次記憶手段に移動させ書き込むのに要する移動時間の予測値である移動方式予測値とを算出し、前記圧縮方式予測値および前記移動方式予測値のうちのいずれが小さいかを判定する判定手段と、
前記判定手段において、前記圧縮方式予測値の方が小さいと判定された場合には、前記処理対象データを前記データ圧縮手段で圧縮した圧縮データを前記1次記憶手段に保存し、一方、前記移動方式予測値の方が小さいと判定された場合には、前記処理対象データを前記2次記憶手段に移動させ書き込む処理手段と
を備えたことを特徴とするキャッシュ制御装置。
Primary storage means for storing data;
Secondary storage means for reading data slower than the primary storage means;
Data compression means capable of compressing and storing data in the primary storage means;
In the case where new data is stored in the primary storage means, and there is no free area for storing the new data in the primary storage means, the primary storage specified based on a predetermined condition. Selecting means for selecting data in the means as processing target data;
A compression scheme predicted value is a prediction value of the compression time required to compress the processed data by said data compression means, for writing to move the processing target data from said primary storage means in said secondary storage means A determination unit that calculates a movement method predicted value that is a predicted value of the required movement time, and determines which of the compression method predicted value and the movement method predicted value is smaller;
When the determination means determines that the compression method predicted value is smaller, the compressed data obtained by compressing the data to be processed by the data compression means is stored in the primary storage means, while the movement A cache control device comprising : a processing unit that moves and writes the processing target data to the secondary storage unit when it is determined that the method predicted value is smaller.
圧縮データを非圧縮データに展開するデータ展開手段を含み、
前記圧縮方式予測値は、圧縮された当該データを前記データ展開手段で展開するのに要する時間を加算した値であることを特徴とする請求項1または2記載のキャッシュ制御装置。
Data expansion means for expanding compressed data into uncompressed data;
The compression method predicted value, the cache control apparatus according to claim 1 or 2, wherein the compressed the data was a value obtained by adding the time required to deploy the data expansion means.
前記データ圧縮手段は複数個設けられ、
前記判定手段は、前記処理対象データを複数の前記データ圧縮手段と一対一対応するよう複数の部分データに分割して、各該部分データを対応する前記データ圧縮手段に圧縮処理させたときに要する処理時間の予測値のうちの最も長いものを前記圧縮方式予測値として使用し、
前記判定手段で前記圧縮方式予測値の方が小さいと判定された場合には、前記複数の部分データを対応する複数の前記データ圧縮手段で並行して圧縮処理する
ことを特徴とする請求項1または2記載のキャッシュ制御装置。
A plurality of the data compression means are provided,
The determination unit is required when the processing target data is divided into a plurality of partial data so as to have a one-to-one correspondence with the plurality of data compression units, and each partial data is compressed by the corresponding data compression unit. Using the longest prediction value of processing time as the compression method prediction value,
2. When the determination unit determines that the compression method predicted value is smaller, the plurality of partial data is compressed in parallel by the plurality of corresponding data compression units. Or the cache control apparatus of 2 .
前記データ圧縮手段と圧縮データを非圧縮データに展開するデータ展開手段とが複数個設けられ、
前記判定手段は、前記処理対象データを複数の前記データ圧縮手段と一対一対応するよう複数の第1の部分データに分割して各該第1の部分データを対応する前記データ圧縮手段に圧縮処理させたときに要する処理時間の予測値のうちの最も長いものと、前記処理対象データを圧縮した圧縮データを複数の前記データ展開手段と一対一対応するよう複数の第2の部分データに分割して各該第2の部分データを対応する前記データ展開手段に展開処理させたときに要する処理時間の予測値のうちの最も長いものとを加算した値を前記圧縮方式予測値として使用し、
前記判定手段で前記圧縮方式予測値の方が小さいと判定された場合には、前記複数の第1の部分データを対応する複数の前記データ圧縮手段で並行して圧縮処理する
ことを特徴とする請求項1または2記載のキャッシュ制御装置。
A plurality of data compression means and a data expansion means for expanding compressed data into uncompressed data are provided,
The determination unit divides the processing target data into a plurality of first partial data so as to have a one-to-one correspondence with the plurality of data compression units, and compresses each first partial data into the corresponding data compression unit. And dividing the compressed data obtained by compressing the processing target data into a plurality of second partial data so as to have a one-to-one correspondence with the plurality of data expansion means. A value obtained by adding the longest of the predicted values of the processing time required when the second data is expanded by the corresponding data expansion means as the compression method predicted value,
When the determination unit determines that the compression method predicted value is smaller, the plurality of first partial data are compressed in parallel by the plurality of corresponding data compression units. The cache control device according to claim 1 or 2 .
前記移動方式予測値は、当該データを前記2次記憶手段から読み出し前記1次記憶手段に移動させるのに要する時間を加算した値であることを特徴とする請求項1乃至5のいずれか1つに記載のキャッシュ制御装置。 The moving method predicted value, any one of claims 1 to 5, characterized in that a value obtained by adding the time required to move the data from the secondary storage means to read said primary storage means the cache control apparatus according to. データを記憶する1次記憶手段と、前記1次記憶手段よりもデータの読み出しが低速である2次記憶手段と、データを圧縮して前記1次記憶手段に保存できるデータ圧縮手段とを使用するキャッシュ制御方法において、
前記1次記憶手段に新規データを保存する場合であって、前記1次記憶手段に該新規データを保存するための空き領域が存在しない場合、予め定めた条件に基づき指定される前記1次記憶手段内のデータを処理対象データとして選択する選択ステップと、
データの各サイズと、前記データ圧縮手段により各サイズのデータを圧縮するのに要する圧縮時間の予測値である圧縮方式予測値、および各サイズのデータを前記1次記憶手段から2次記憶手段に移動させ書き込むのに要する移動時間の予測値である移動方式予測値との関係に基づいて、前記処理対象データのサイズから予測される前記圧縮方式予測値および前記移動方式予測値のうちのいずれが小さいかを判定する判定ステップと、
前記判定ステップにおいて、前記圧縮方式予測値の方が小さいと判定された場合には、前記処理対象データを前記データ圧縮手段で圧縮した圧縮データを前記1次記憶手段に保存し、一方、前記移動方式予測値の方が小さいと判定された場合には、前記処理対象データを前記2次記憶手段に移動させ書き込む処理ステップと
を含むことを特徴とするキャッシュ制御方法。
A primary storage unit that stores data, a secondary storage unit that reads data at a lower speed than the primary storage unit, and a data compression unit that compresses and stores the data in the primary storage unit are used. In the cache control method,
In the case where new data is stored in the primary storage means, and there is no free area for storing the new data in the primary storage means, the primary storage specified based on a predetermined condition. A selection step of selecting data in the means as processing target data;
Each size of data, a compression method predicted value that is a predicted value of the compression time required to compress the data of each size by the data compression unit, and data of each size are transferred from the primary storage unit to the secondary storage unit. Which one of the compression method prediction value and the movement method prediction value predicted from the size of the processing target data is based on the relationship with the movement method prediction value that is a predicted value of the movement time required to move and write. A determination step for determining whether the value is small;
In the determination step, when it is determined that the compression method predicted value is smaller, the compressed data obtained by compressing the data to be processed by the data compression unit is stored in the primary storage unit, while the movement And a processing step of moving and writing the processing target data to the secondary storage means when it is determined that the method predicted value is smaller.
データを記憶する1次記憶手段と、前記1次記憶手段よりもデータの読み出しが低速である2次記憶手段と、データを圧縮して前記1次記憶手段に保存できるデータ圧縮手段とを使用するキャッシュ制御方法において、
前記1次記憶手段に新規データを保存する場合であって、前記1次記憶手段に該新規データを保存するための空き領域が存在しない場合、予め定めた条件に基づき指定される前記1次記憶手段内のデータを処理対象データとして選択する選択ステップと、
前記データ圧縮手段により前記処理対象データを圧縮するのに要する圧縮時間の予測値である圧縮方式予測値と、前記処理対象データを前記1次記憶手段から前記2次記憶手段に移動させ書き込むのに要する移動時間の予測値である移動方式予測値とを算出し、前記圧縮方式予測値および前記移動方式予測値のうちのいずれが小さいかを判定する判定ステップと、
前記判定ステップにおいて、前記圧縮方式予測値の方が小さいと判定された場合には、前記処理対象データを前記データ圧縮手段で圧縮した圧縮データを前記1次記憶手段に保存し、一方、前記移動方式予測値の方が小さいと判定された場合には、前記処理対象データを前記2次記憶手段に移動させ書き込む処理ステップと
を含むことを特徴とするキャッシュ制御方法。
A primary storage unit that stores data, a secondary storage unit that reads data at a lower speed than the primary storage unit, and a data compression unit that compresses and stores the data in the primary storage unit are used. In the cache control method,
In the case where new data is stored in the primary storage means, and there is no free area for storing the new data in the primary storage means, the primary storage specified based on a predetermined condition. A selection step of selecting data in the means as processing target data;
A compression scheme predicted value is a prediction value of the compression time required to compress the processed data by said data compression means, for writing to move the processing target data from said primary storage means in said secondary storage means A determination step of calculating a movement method predicted value that is a predicted value of the required movement time, and determining which of the compression method predicted value and the movement method predicted value is smaller;
In the determination step, when it is determined that the compression method predicted value is smaller, the compressed data obtained by compressing the data to be processed by the data compression unit is stored in the primary storage unit, while the movement And a processing step of moving and writing the processing target data to the secondary storage means when it is determined that the method predicted value is smaller.
前記圧縮方式予測値は、圧縮された当該データを非圧縮データに展開するのに要する時間を加算した値であることを特徴とする請求項7または8記載のキャッシュ制御方法。   9. The cache control method according to claim 7, wherein the compression method predicted value is a value obtained by adding a time required to expand the compressed data into uncompressed data. 前記移動方式予測値は、当該データを前記2次記憶手段から読み出し1次記憶手段に移動させるのに要する時間を加算した値であることを特徴とする請求項7乃至9のいずれか1つに記載のキャッシュ制御方法。 The moving method predicted value, in any one of claims 7 to 9, characterized in that the data is a value obtained by adding the time required to move the read primary storage means from said secondary storage means The described cache control method.
JP2012154505A 2012-07-10 2012-07-10 Cache control device and cache control method Active JP6007628B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012154505A JP6007628B2 (en) 2012-07-10 2012-07-10 Cache control device and cache control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012154505A JP6007628B2 (en) 2012-07-10 2012-07-10 Cache control device and cache control method

Publications (2)

Publication Number Publication Date
JP2014016863A JP2014016863A (en) 2014-01-30
JP6007628B2 true JP6007628B2 (en) 2016-10-12

Family

ID=50111466

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012154505A Active JP6007628B2 (en) 2012-07-10 2012-07-10 Cache control device and cache control method

Country Status (1)

Country Link
JP (1) JP6007628B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170127345A (en) * 2015-03-12 2017-11-21 르네사스 일렉트로닉스 가부시키가이샤 Data processing device, data processing system and method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3149477B2 (en) * 1991-09-26 2001-03-26 富士ゼロックス株式会社 Image data processing device
JPH096678A (en) * 1995-06-19 1997-01-10 Toshiba Corp Hierarchical storage
JP2001125820A (en) * 1999-10-26 2001-05-11 Nec Eng Ltd Cache data managing device for web browser
US7447814B1 (en) * 2005-10-14 2008-11-04 Sun Microsystems, Inc. Method and apparatus for fast loss-less memory data compression wherein data corresponds to a cache line of data in cache
US7895242B2 (en) * 2007-10-31 2011-02-22 Microsoft Corporation Compressed storage management
JP5104740B2 (en) * 2008-12-10 2012-12-19 富士通株式会社 Data transfer device, data transfer method, and data transfer program

Also Published As

Publication number Publication date
JP2014016863A (en) 2014-01-30

Similar Documents

Publication Publication Date Title
US10970203B2 (en) Methods and apparatus for compressed and compacted virtual memory
US10649890B2 (en) Information processing system, storage control apparatus, storage control method, and storage control program
KR101270281B1 (en) Memory menagement device, information processing device and memory menagement methods
US10572378B2 (en) Dynamic memory expansion by data compression
US20130227198A1 (en) Flash memory device and electronic device employing thereof
WO2017006674A1 (en) Information processing system, storage control device, storage control method, and storage control program
JP6608468B2 (en) Storage apparatus and control method thereof
JP2012505440A (en) Storage device and data processing method in storage device
US20070005625A1 (en) Storage architecture for embedded systems
US11144464B2 (en) Information processing device, access controller, information processing method, and computer program for issuing access requests from a processor to a sub-processor
WO2017006675A1 (en) Information processing system, storage control device, storage control method, and storage control program
CN108139972B (en) Method and apparatus for managing memory fragmentation in hardware assisted data compression
CN115756312A (en) Data access system, data access method, and storage medium
JP2006236239A (en) Data processing system and data decompressing method
CN105630413B (en) A kind of synchronization write-back method of data in magnetic disk
JP4874162B2 (en) Data expansion apparatus and data expansion method
JP6007628B2 (en) Cache control device and cache control method
JP5978259B2 (en) Sequential read optimization variable size flash translation layer
CN107122312B (en) solid-state disk address mapping method
JP6254986B2 (en) Information processing apparatus, access controller, and information processing method
JP6243884B2 (en) Information processing apparatus, processor, and information processing method
US10838727B2 (en) Device and method for cache utilization aware data compression
CN104123243A (en) Data caching system and method
CN113312275A (en) Data processing method, device and system of memory equipment
JP6668785B2 (en) Information processing system, storage control device, storage control method, and storage control program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150617

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160229

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160322

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160519

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160829

R150 Certificate of patent or registration of utility model

Ref document number: 6007628

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150