JP2014530422A - Method and buffer system for controlling buffer mapping - Google Patents

Method and buffer system for controlling buffer mapping Download PDF

Info

Publication number
JP2014530422A
JP2014530422A JP2014531069A JP2014531069A JP2014530422A JP 2014530422 A JP2014530422 A JP 2014530422A JP 2014531069 A JP2014531069 A JP 2014531069A JP 2014531069 A JP2014531069 A JP 2014531069A JP 2014530422 A JP2014530422 A JP 2014530422A
Authority
JP
Japan
Prior art keywords
data block
target data
cache
storage medium
mapped
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2014531069A
Other languages
Japanese (ja)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to JP2014531069A priority Critical patent/JP2014530422A/en
Publication of JP2014530422A publication Critical patent/JP2014530422A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems

Abstract

本発明は、バッファマッピングを制御するための方法、およびバッファシステムに関する。この方法は、プリセットされた時間周期に、下層記憶媒体内の少なくとも1個のデータブロックから下層記憶媒体のバッファにマッピングされるターゲットデータブックを変更するステップを含む。下層記憶媒体内の1個または複数のデータブロックは、バッファ内の1つのターゲットデータブロックだけにマッピング可能であり、下層記憶媒体のバッファは、フラッシュメモリ媒体を含み、バッファ内の変更されたターゲットデータブロックは、現在のバッファ内の最大再書込み時間を有するターゲットデータブロックを含む。この技術的解決策は、フラッシュメモリ媒体のサービス寿命を最適化する。The present invention relates to a method for controlling buffer mapping and a buffer system. The method includes changing a target data book that is mapped from at least one data block in the underlying storage medium to a buffer in the underlying storage medium at a preset time period. One or more data blocks in the underlying storage medium can be mapped to only one target data block in the buffer, the underlying storage medium buffer includes a flash memory medium, and the modified target data in the buffer The block contains the target data block with the maximum rewrite time in the current buffer. This technical solution optimizes the service life of the flash memory medium.

Description

本発明は、キャッシュシステムのキャッシュマッピング技術に関し、詳細には、フラッシュメモリ媒体がキャッシュとして使用されるとき、キャッシュマッピングを制御するための方法、およびキャッシュシステムに関する。   The present invention relates to a cache mapping technique for a cache system, and more particularly, to a method and a cache system for controlling cache mapping when a flash memory medium is used as a cache.

フラッシュメモリ(Flash Memory)媒体は、長いサービス寿命を有する不揮発性ストレージであり、電力がオフにされたとき、記憶されたデータ情報を維持することができる。先行技術では、フラッシュメモリ媒体は、基礎をなす記憶媒体の不十分な入力/出力パフォーマンスによって引き起こされるパフォーマンス制約を軽減するために、ハードディスクおよびハードディスクアレイなど、従来のディスクストレージシステムでありうる、基礎をなす記憶媒体(underlying storage medium)のキャッシュとしてしばしば使用される。   A flash memory medium is a non-volatile storage having a long service life, and can maintain stored data information when power is turned off. In the prior art, flash memory media is a foundation that can be traditional disk storage systems such as hard disks and hard disk arrays to alleviate performance constraints caused by insufficient input / output performance of the underlying storage media. Often used as a cache for an underlying storage medium.

一般に、フラッシュメモリ媒体がキャッシュとして使用されるとき、キャッシュと基礎をなす記憶媒体との間で採用されるマッピングポリシーは、Nウェイセットアソシアティブマッピング(N-way set associative mapping)である。Nウェイセットアソシアティブマッピングでは、マッピングターゲットとして機能するキャッシュのサイズに応じて、マッピングソースとして機能する、基礎をなす記憶媒体は、複数のセットに分割され、この場合、それぞれのセットの容量はキャッシュのサイズに等しい。キャッシュ内に含まれたターゲットデータブロックの数とサイズとに応じて、基礎をなす記憶媒体のそれぞれのセットは同じ数の領域(すなわち、データブロック)に分割され、それぞれの領域のサイズは、キャッシュ内の1つのターゲットデータブロックのサイズに一致する。基礎をなす記憶媒体の1つのセット内で、異なるデータブロックはキャッシュ内の異なるターゲットデータブロックに対応する。基礎をなす記憶媒体の異なるセット内で、対応する位置におけるデータブロックは、キャッシュ内の同じターゲットデータブロックにマッピングされる。   In general, when a flash memory medium is used as a cache, the mapping policy adopted between the cache and the underlying storage medium is N-way set associative mapping. In N-way set associative mapping, depending on the size of the cache that serves as the mapping target, the underlying storage medium that serves as the mapping source is divided into multiple sets, where the capacity of each set is the cache capacity. Equal to size. Depending on the number and size of target data blocks contained in the cache, each set of underlying storage media is divided into the same number of regions (i.e., data blocks), and the size of each region is determined by the cache size. Matches the size of one of the target data blocks. Within one set of underlying storage media, different data blocks correspond to different target data blocks in the cache. Within a different set of underlying storage media, data blocks at corresponding locations are mapped to the same target data block in the cache.

図1は、Nウェイセットアソシアティブマッピングのある例を示す。この例では、キャッシュとして機能するフラッシュメモリ媒体は、ターゲットデータブロック0からターゲットデータブロック3の4個のターゲットデータブロックに分割され、マッピングソースとして機能するハードディスクは2つのセットを含み、それぞれのセットはキャッシュの4個のターゲットデータブロックに対応するデータブロックに分割され、ハードディスク内のそれぞれのデータブロックのサイズは、フラッシュメモリ媒体内のそれぞれのターゲットデータブロックのサイズに一致する。この例では、ハードディスクとキャッシュとの間のNウェイセットアソシアティブマッピング関係は、以下の通りである。すなわち、ハードディスクの(データブロック0からデータブロック3を含む)第1のセット内のデータブロック0と(データブロック4からデータブロック7を含む)第2のセット内のデータブロック4とがフラッシュメモリ媒体内のターゲットデータブロック0にマッピングされ、ハードディスクの第1のセット内のデータブロック1と第2のセット内のデータブロック5とがフラッシュメモリ媒体内のターゲットデータブロック1にマッピングされ、ハードディスクの第1のセット内のデータブロック2と第2のセット内のデータブロック6とがフラッシュメモリ媒体内のターゲットデータブロック2にマッピングされ、ハードディスクの第1のセット内のデータブロック3と第2のセット内のデータブロック7とがフラッシュメモリ媒体内のターゲットデータブロック3にマッピングされる。このマッピング関係に従って、データブロック0内およびデータブロック4内のデータはターゲットデータブロック0内にキャッシュされ、データブロック1内およびデータブロック5内のデータはターゲットデータブロック1内にキャッシュされ、データブロック2内およびデータブロック6内のデータはターゲットデータブロック2内にキャッシュされ、データブロック3内およびデータブロック7内のデータはターゲットデータブロック3内にキャッシュされる。   FIG. 1 shows an example of N-way set associative mapping. In this example, the flash memory medium that functions as a cache is divided into four target data blocks, target data block 0 to target data block 3, and the hard disk that functions as a mapping source includes two sets, each set The block is divided into data blocks corresponding to the four target data blocks in the cache, and the size of each data block in the hard disk matches the size of each target data block in the flash memory medium. In this example, the N-way set associative mapping relationship between the hard disk and the cache is as follows. That is, the data block 0 in the first set (including data block 0 to data block 3) and the data block 4 in the second set (including data block 4 to data block 7) of the hard disk are flash memory media. Is mapped to target data block 0 in the first set of hard disks, data block 1 in the first set of hard disks and data block 5 in the second set are mapped to target data blocks 1 in the flash memory medium, and Data block 2 in the first set and data block 6 in the second set are mapped to target data block 2 in the flash memory medium, and data block 3 in the first set of hard disks and in the second set Data block 7 is mapped to target data block 3 in the flash memory medium. Wrapped. According to this mapping relationship, data in data block 0 and data block 4 are cached in target data block 0, data in data block 1 and data block 5 are cached in target data block 1, data block 2 The data in the data block 6 is cached in the target data block 2, and the data in the data block 3 and the data block 7 is cached in the target data block 3.

しかし、先行技術では、キャッシュと基礎をなす記憶媒体との間のマッピング関係は、一般に静的である。システムの作業プロセス全体で、基礎をなす記憶媒体内のデータブロックがマッピングされる、キャッシュ内のターゲットデータブロックは、一般に、変更されない状態に留まる。結果として、フラッシュメモリ媒体がキャッシュとして使用されるとき、システム内のローカルエリア内のデータが異常に頻繁にアクセスされるアプリケーションシナリオの場合、システム内の頻繁にアクセスされるデータがマッピングされるフラッシュメモリ媒体の媒体領域の消去の回数は非常に高い。フラッシュメモリ媒体の消去の回数は制限されているため、頻繁にアクセスされるデータがマッピングされるフラッシュメモリ媒体の媒体領域は、他の領域よりもより迅速に消去回数の限界に達し、結果として、フラッシュメモリ媒体全体が利用不可能になる。   However, in the prior art, the mapping relationship between the cache and the underlying storage medium is generally static. The target data block in the cache, to which the data block in the underlying storage medium is mapped throughout the work process of the system, generally remains unchanged. As a result, when flash memory media is used as a cache, for application scenarios where data in the local area in the system is accessed abnormally frequently, the flash memory to which the frequently accessed data in the system is mapped The number of times of erasing the medium area of the medium is very high. Since the number of erases of flash memory media is limited, the media area of flash memory media to which frequently accessed data is mapped reaches the limit of erase counts more quickly than other areas, and as a result, The entire flash memory medium becomes unavailable.

先行技術の欠点に鑑みて、本発明の実施形態は、キャッシュマッピングを制御するための方法およびキャッシュシステムであって、システム上の頻繁にアクセスされるデータがキャッシュ上のある種のターゲットデータブロックに静的にマッピングされず、それによって、キャッシュとして機能するフラッシュメモリ媒体のサービス寿命を最適化するように、キャッシュと基礎をなす記憶媒体との間に動的マッピングポリシーが導入される、キャッシュマッピングを制御するための方法およびキャッシュシステムを提供する。   In view of the shortcomings of the prior art, embodiments of the present invention are a method and cache system for controlling cache mapping, wherein frequently accessed data on the system is directed to certain target data blocks on the cache. A cache mapping that is not statically mapped and that introduces a dynamic mapping policy between the cache and the underlying storage medium to optimize the service life of the flash memory medium acting as a cache. A method and cache system for controlling are provided.

本発明のある実施形態は、キャッシュマッピングを制御するための方法であって、プリセット時間間隔で、基礎をなす記憶媒体のキャッシュ内のターゲットデータブロックを変更するステップであって、基礎をなす記憶媒体内の少なくとも1個のデータブロックがターゲットデータブロックにマッピングされ、基礎をなす記憶媒体内の1個または複数のデータブロックがキャッシュ内の1個のターゲットデータブロックだけにマッピングされ、基礎をなす記憶媒体のキャッシュがフラッシュメモリ媒体を含み、キャッシュ内の変更されたターゲットデータブロックが、キャッシュ内の、最大消去回数を現在有するターゲットデータブロックを含む、変更するステップを含む方法を提供する。   An embodiment of the present invention is a method for controlling cache mapping, the step of changing a target data block in a cache of an underlying storage medium at a preset time interval, the underlying storage medium At least one data block in the target is mapped to the target data block, and one or more data blocks in the underlying storage medium are mapped to only one target data block in the cache, and the underlying storage medium The method includes a step of modifying, wherein the cache includes a flash memory medium, and the modified target data block in the cache includes the target data block in the cache that currently has the maximum number of erases.

本発明のある実施形態は、キャッシュマッピングを制御するための方法であって、
基礎をなす記憶媒体のキャッシュ内のそれぞれのターゲットデータブロックの消去回数を監視するステップであって、基礎をなす記憶媒体内の1個または複数のデータブロックがキャッシュ内の1個のターゲットデータブロックだけにマッピングされ、基礎をなす記憶媒体のキャッシュがフラッシュメモリ媒体を含む、監視するステップと、
キャッシュ内の、最大消去回数を有するターゲットデータブロックと最小消去回数を有するターゲットデータブロックとの間の消去回数の差がプリセットされた消去しきい値に達したとき、基礎をなす記憶媒体内の少なくとも1個のデータブロックがマッピングされる、キャッシュ内のターゲットデータブロックを変更するステップであって、キャッシュ内の変更されたターゲットデータブロックが、キャッシュ内の、最大消去回数を現在有するターゲットデータブロックを含む、変更するステップと、
キャッシュ内のそれぞれのターゲットデータブロックが変更された後で生成される消去回数を継続的に監視するステップ
とを含む方法を提供する。
An embodiment of the present invention is a method for controlling cache mapping comprising:
Monitoring the number of erasures of each target data block in the cache of the underlying storage medium, where one or more data blocks in the underlying storage medium are only one target data block in the cache Monitoring the cache of the underlying storage medium mapped to and including the flash memory medium;
When the erase count difference between the target data block having the maximum erase count and the target data block having the minimum erase count in the cache reaches a preset erase threshold, at least in the underlying storage medium Modifying a target data block in the cache to which one data block is mapped, wherein the modified target data block in the cache includes a target data block in the cache that currently has the maximum number of erasures Step to change,
And continuously monitoring the number of erases generated after each target data block in the cache has been modified.

本発明のある実施形態は、基礎をなす記憶媒体と、基礎をなす記憶媒体に結合され、かつ基礎をなす記憶媒体のキャッシュとして機能するフラッシュメモリ媒体であって、基礎をなす記憶媒体内の1個または複数のデータブロックがキャッシュ内の1個のターゲットデータブロックだけにマッピングされる、フラッシュメモリ媒体と、プリセット時間間隔で、基礎をなす記憶媒体のキャッシュ内のターゲットデータブロックを変更するステップであって、基礎をなす記憶媒体内の少なくとも1個のデータブロックがターゲットデータブロックにマッピングされ、キャッシュ内の変更されたターゲットデータブロックが、キャッシュ内の、最大消去回数を現在有するターゲットデータブロックを含む、変更するステップを行うように構成されたプロセッサとを含むキャッシュシステムを提供する。   An embodiment of the present invention is an underlying storage medium and a flash memory medium coupled to the underlying storage medium and functioning as a cache for the underlying storage medium, wherein one of the underlying storage media The step of changing the target data block in the cache of the underlying storage medium with a flash memory medium and a preset time interval in which one or more data blocks are mapped to only one target data block in the cache. At least one data block in the underlying storage medium is mapped to the target data block, and the modified target data block in the cache includes a target data block in the cache that currently has the maximum number of erasures, A professional configured to take steps to change To provide a cache system including a Tsu support.

本発明のある実施形態は、基礎をなす記憶媒体と、基礎をなす記憶媒体に結合され、かつ基礎をなす記憶媒体のキャッシュとして機能するフラッシュメモリ媒体であって、基礎をなす記憶媒体内の1個または複数のデータブロックがキャッシュ内の1個のターゲットデータブロックだけにマッピングされる、フラッシュメモリ媒体と、キャッシュ内のそれぞれのターゲットデータブロックの消去回数を監視するステップと、キャッシュ内の、最大消去回数を有するターゲットデータブロックと最小消去回数を有するターゲットデータブロックとの間の消去回数の差がプリセットされた消去しきい値に達したとき、基礎をなす記憶媒体内の少なくとも1個のデータブロックがマッピングされる、キャッシュ内のターゲットデータブロックを変更するステップであって、キャッシュ内の変更されたターゲットデータブロックが、キャッシュ内の、最大消去回数を現在有するターゲットデータブロックを含む、変更するステップと、
キャッシュ内のそれぞれのターゲットデータブロックが変更された後で生成される消去回数を継続的に監視するステップと
を行うように構成されたプロセッサと
を含むキャッシュシステムを提供する。
An embodiment of the present invention is an underlying storage medium and a flash memory medium coupled to the underlying storage medium and functioning as a cache for the underlying storage medium, wherein one of the underlying storage media A flash memory medium in which one or more data blocks are mapped to only one target data block in the cache, monitoring the number of erases of each target data block in the cache, and maximum erasure in the cache When the difference in the number of erases between the target data block having the number of times and the target data block having the minimum number of erases reaches a preset erase threshold, at least one data block in the underlying storage medium is Change the target data block in the cache to be mapped A step, the steps changed target data block in the cache, containing the target data block having in the cache, the maximum number of erasures currently changing,
And a processor configured to continually monitor the number of erases generated after each target data block in the cache is modified.

本発明の実施形態の方法および装置によれば、基礎をなす記憶媒体内の少なくとも1個のデータブロックがマッピングされる、キャッシュ内のターゲットデータブロックが変更され、少なくとも1個のデータブロックは、最大消去回数を現在有するターゲットデータブロックに対応するデータブロックを含む。このようにして、キャッシュとして機能するフラッシュメモリ媒体のサービス寿命が最適化される。   According to the method and apparatus of an embodiment of the present invention, a target data block in a cache to which at least one data block in an underlying storage medium is mapped is changed, and at least one data block is A data block corresponding to a target data block that currently has an erase count is included. In this way, the service life of the flash memory medium functioning as a cache is optimized.

以下の添付の図面を参照して、下の詳細な説明により、本発明の目的、特徴、特性、および利点が明らかになるであろう。   The objects, features, characteristics, and advantages of the present invention will become apparent from the following detailed description with reference to the accompanying drawings.

Nウェイセットアソシアティブマッピングのある例を示す図である。It is a figure which shows an example with N way set associative mapping. 本発明の第1の実施形態による、キャッシュマッピングを制御するための方法の概略流れ図である。2 is a schematic flowchart of a method for controlling cache mapping according to the first embodiment of the present invention; 本発明の第1の実施形態による方法を採用することによって、キャッシュマッピングを制御するある例における、異なる切替え期間中のマッピング関係の概略図である。FIG. 6 is a schematic diagram of mapping relationships during different switching periods in an example of controlling cache mapping by employing the method according to the first embodiment of the present invention. 本発明の第1の実施形態による方法を採用することによって、キャッシュマッピングを制御するある例における、異なる切替え期間中のマッピング関係の概略図である。FIG. 6 is a schematic diagram of mapping relationships during different switching periods in an example of controlling cache mapping by employing the method according to the first embodiment of the present invention. 本発明の第1の実施形態による方法を採用することによって、キャッシュマッピングを制御するある例における、異なる切替え期間中のマッピング関係の概略図である。FIG. 6 is a schematic diagram of mapping relationships during different switching periods in an example of controlling cache mapping by employing the method according to the first embodiment of the present invention. 本発明の第1の実施形態による方法を採用することによって、キャッシュマッピングを制御する別の例における、異なる切替え期間中のマッピング関係の概略図である。FIG. 6 is a schematic diagram of mapping relationships during different switching periods in another example of controlling cache mapping by employing the method according to the first embodiment of the present invention. 本発明の第1の実施形態による方法を採用することによって、キャッシュマッピングを制御する別の例における、異なる切替え期間中のマッピング関係の概略図である。FIG. 6 is a schematic diagram of mapping relationships during different switching periods in another example of controlling cache mapping by employing the method according to the first embodiment of the present invention. 本発明の第1の実施形態による方法を採用することによって、キャッシュマッピングを制御する別の例における、異なる切替え期間中のマッピング関係の概略図である。FIG. 6 is a schematic diagram of mapping relationships during different switching periods in another example of controlling cache mapping by employing the method according to the first embodiment of the present invention. 本発明の第1の実施形態による方法を採用することによって、キャッシュマッピングを制御する別の例における、異なる切替え期間中のマッピング関係の概略図である。FIG. 6 is a schematic diagram of mapping relationships during different switching periods in another example of controlling cache mapping by employing the method according to the first embodiment of the present invention. 本発明の第1の実施形態による方法を採用することによって、キャッシュマッピングを制御する別の例における、異なる切替え期間中のマッピング関係の概略図である。FIG. 6 is a schematic diagram of mapping relationships during different switching periods in another example of controlling cache mapping by employing the method according to the first embodiment of the present invention. 本発明の第1の実施形態による方法を採用することによって、キャッシュマッピングを制御する別の例における、異なる切替え期間中のマッピング関係の概略図である。FIG. 6 is a schematic diagram of mapping relationships during different switching periods in another example of controlling cache mapping by employing the method according to the first embodiment of the present invention. 本発明の第2の実施形態による、キャッシュマッピングを制御するための方法の概略流れ図である。4 is a schematic flowchart of a method for controlling cache mapping according to a second embodiment of the present invention; 本発明の第2の実施形態による方法を採用することによって、キャッシュマッピングを制御するある例における、マッピング関係の概略図である。FIG. 6 is a schematic diagram of mapping relationships in an example of controlling cache mapping by employing a method according to the second embodiment of the present invention. 本発明の第2の実施形態による方法を採用することによって、キャッシュマッピングを制御するある例における、マッピング関係の概略図である。FIG. 6 is a schematic diagram of mapping relationships in an example of controlling cache mapping by employing a method according to the second embodiment of the present invention. 本発明のある実施形態によるキャッシュシステムを示す図である。1 is a diagram illustrating a cache system according to an embodiment of the present invention. FIG.

本発明の実施形態は、キャッシュマッピングを制御するための方法およびキャッシュシステムを提供する。この方法は、プリセット時間間隔で、基礎をなす記憶媒体のキャッシュ内のターゲットデータブロックを変更するステップであって、基礎をなす記憶媒体内の少なくとも1個のデータブロックがターゲットデータブロックにマッピングされ、基礎をなす記憶媒体内の1個または複数のデータブロックがキャッシュ内の1個のターゲットデータブロックだけにマッピングされ、基礎をなす記憶媒体のキャッシュがフラッシュメモリ媒体を含み、キャッシュ内の変更されたターゲットデータブロックが、キャッシュ内の、最大消去回数を現在有するターゲットデータブロックを含む、変更するステップを含む。   Embodiments of the present invention provide a method and cache system for controlling cache mapping. The method includes changing a target data block in a cache of an underlying storage medium at a preset time interval, wherein at least one data block in the underlying storage medium is mapped to the target data block; One or more data blocks in the underlying storage medium are mapped to only one target data block in the cache, the underlying storage medium cache includes a flash memory medium, and the modified target in the cache The data block includes a modifying step that includes a target data block in the cache that currently has the maximum number of erasures.

本発明のそれぞれの実施形態は、下で、添付の図面を参照して詳細に説明される。   Each embodiment of the invention is described in detail below with reference to the accompanying drawings.

図2は、本発明の第1の実施形態による、キャッシュマッピングを制御するための方法の概略流れ図である。この実施形態では、フラッシュメモリ媒体がキャッシュとして使用され、基礎をなす記憶媒体は、例えば、ハードディスクであり、基礎をなす記憶媒体内の1個または複数のデータブロックはキャッシュ内の1個のターゲットデータブロックだけにマッピングされる。フラッシュメモリ媒体は、固体ディスク、すなわち、SSD(solid storage disk)を含む。   FIG. 2 is a schematic flowchart of a method for controlling cache mapping according to the first embodiment of the present invention. In this embodiment, a flash memory medium is used as a cache, the underlying storage medium is, for example, a hard disk, and one or more data blocks in the underlying storage medium are one target data in the cache. Mapped to block only. The flash memory medium includes a solid disk, that is, an SSD (solid storage disk).

図2に示されるように、第1の実施形態による、キャッシュマッピングを制御するための方法は、以下のステップを含む。   As shown in FIG. 2, the method for controlling cache mapping according to the first embodiment includes the following steps.

ステップS201。プリセットされた切替え期間Tに従って、タイミングを開始するためのタイマをトリガするステップ。   Step S201. Triggering a timer to start timing according to a preset switching period T;

ステップS202。1つの切替え周期の後でキャッシュ内のターゲットデータブロックの消去回数が互いに近接するように、ハードディスク内の少なくとも1個のデータブロックがマッピングされる、キャッシュ内のターゲットデータブロックを、1つの切替え周期のそれぞれの切替え期間に変更するステップであって、1つの切替え周期内に含まれる切替え期間の数がキャッシュ内に含まれたターゲットデータブロックの数N以上である、変更するステップ。   Step S202: At least one data block in the hard disk is mapped to one target data block in the cache so that the number of erases of the target data block in the cache is close to each other after one switching cycle. A step of changing to each switching period of the switching cycle, wherein the number of switching periods included in one switching cycle is equal to or greater than the number N of target data blocks included in the cache.

図1および図3から図5は、本発明の第1の実施形態による方法を採用することによって、キャッシュマッピングを制御する特定の例を示す。この例では、ハードディスク内のそれぞれのデータブロックが1つの切替え周期の異なる切替え期間にキャッシュ内の異なるターゲットデータブロックにマッピングされるように、ハードディスク内のそれぞれのデータブロックがマッピングされる、キャッシュ内のターゲットデータブロックが、1つの切替え周期のそれぞれの切替え期間に変更され、1つの切替え周期内に含まれる切替え期間の数はキャッシュ内に含まれたターゲットデータブロックの数Nに等しい。この例では、例えば、限定としてではなく、キャッシュは4個のターゲットデータブロックを有し、ハードディスクは2つのセットを含み、それぞれのセットは、キャッシュの4個のターゲットデータブロックに対応する4個のデータブロックに分割され、ハードディスク内のそれぞれのデータブロックのサイズは、フラッシュメモリ媒体内のそれぞれのターゲットデータブロックのサイズに一致する。   FIGS. 1 and 3 to 5 show specific examples of controlling cache mapping by employing the method according to the first embodiment of the present invention. In this example, each data block in the hard disk is mapped to a different target data block in the cache so that each data block in the hard disk is mapped to a different target data block in the cache during different switching periods of one switching cycle. The target data block is changed in each switching period of one switching period, and the number of switching periods included in one switching period is equal to the number N of target data blocks included in the cache. In this example, for example, but not by way of limitation, the cache has four target data blocks, the hard disk includes two sets, each set corresponding to four target data blocks in the cache. Divided into data blocks, the size of each data block in the hard disk matches the size of each target data block in the flash memory medium.

図1および図3から図5に示されるように、この例は、周期的なラウンドロビンの動的切替えポリシーを採用し、1つの切替え周期内に含まれる切替え期間の数はキャッシュ内に含まれたターゲットデータブロックの数Nに等しく、Nは0を超える整数であり、この例では、N=4である。この例では、それぞれの切替え期間の後で、ハードディスク内のそれぞれのデータブロックに対応するマッピングターゲットが切り替えられる。ハードディスク内のそれぞれのデータブロックは、異なる切替え期間に、異なるターゲットデータブロックにマッピングされる。   As shown in Figures 1 and 3-5, this example employs a periodic round-robin dynamic switching policy, and the number of switching periods included in one switching period is included in the cache. Equal to the number of target data blocks N, where N is an integer greater than 0, and in this example N = 4. In this example, the mapping target corresponding to each data block in the hard disk is switched after each switching period. Each data block in the hard disk is mapped to a different target data block during different switching periods.

詳細には、この例では、最初に、図1に示されたマッピング関係が採用される。図1に示されるように、この例では、当初、ハードディスクとキャッシュとの間のマッピング関係は以下の通りである。すなわち、ハードディスクのデータブロック0とデータブロック4とがキャッシュのターゲットデータブロック0にマッピングされ、ハードディスクのデータブロック1とデータブロック5とがキャッシュのターゲットデータブロック1にマッピングされ、ハードディスクのデータブロック2とデータブロック6とがキャッシュのターゲットデータブロック2にマッピングされ、ハードディスクのデータブロック3とデータブロック7とがキャッシュのターゲットデータブロック3にマッピングされる。数字は、データブロックまたはターゲットデータブロックの数である。   Specifically, in this example, the mapping relationship shown in FIG. 1 is first employed. As shown in FIG. 1, in this example, initially, the mapping relationship between the hard disk and the cache is as follows. That is, hard disk data block 0 and data block 4 are mapped to cache target data block 0, hard disk data block 1 and data block 5 are mapped to cache target data block 1, and hard disk data block 2 and Data block 6 is mapped to target data block 2 of the cache, and data block 3 and data block 7 of the hard disk are mapped to target data block 3 of the cache. The number is the number of data blocks or target data blocks.

(略して、第1の期間と呼ばれる)第1の切替え期間が終了するとき、フラッシュメモリ媒体内のそれぞれのターゲットデータブロック内にキャッシュされているデータは別のターゲットデータブロックに移動(migrate)される。この例では、例えば、フラッシュメモリ媒体内のターゲットデータブロック0内に現在キャッシュされている有効データはターゲットデータブロック1に移動され、ターゲットデータブロック1内に現在キャッシュされている有効データはターゲットデータブロック2に移動され、ターゲットデータブロック2内に現在キャッシュされている有効データはターゲットデータブロック3に移動され、ターゲットデータブロック3内に現在キャッシュされている有効データはターゲットデータブロック0に移動される。キャッシュ内のデータが移動された後で、ターゲットデータブロック内のデータに移動に応じて、ハードディスク内のそれぞれのデータブロックがマッピングされるターゲットデータブロックがそれに応じて変更される。この移動の後で、修正により取得されるマッピング関係が図3に示される。   At the end of the first switching period (referred to as the first period for short), the data cached in each target data block in the flash memory medium is migrated to another target data block The In this example, for example, the valid data currently cached in the target data block 0 in the flash memory medium is moved to the target data block 1, and the valid data currently cached in the target data block 1 is the target data block. 2, the valid data currently cached in the target data block 2 is moved to the target data block 3, and the valid data currently cached in the target data block 3 is moved to the target data block 0. After the data in the cache is moved, the target data block to which each data block in the hard disk is mapped is changed accordingly according to the movement in the data in the target data block. After this move, the mapping relationship obtained by modification is shown in FIG.

第2の期間が終了するとき、同様に、フラッシュメモリ媒体内のターゲットデータブロック0内に現在キャッシュされている有効データはターゲットデータブロック1に移動され、ターゲットデータブロック1内に現在キャッシュされている有効データはターゲットデータブロック2に移動され、ターゲットデータブロック2内に現在キャッシュされている有効データはターゲットデータブロック3に移動され、ターゲットデータブロック3内に現在キャッシュされている有効データはターゲットデータブロック0に移動される。この移動の後で、この移動に応じて、キャッシュとハードディスクとの間のマッピング関係が修正され、修正の後のマッピング関係は図4に示される。   Similarly, when the second period ends, valid data currently cached in the target data block 0 in the flash memory medium is moved to the target data block 1 and is currently cached in the target data block 1 Valid data is moved to target data block 2, valid data currently cached in target data block 2 is moved to target data block 3, and valid data currently cached in target data block 3 is target data block Moved to 0. After this move, the mapping relationship between the cache and the hard disk is modified according to this move, and the mapping relationship after the modification is shown in FIG.

第3の期間が終了するとき、同様に、フラッシュメモリ媒体内のターゲットデータブロック0内に現在キャッシュされている有効データはターゲットデータブロック1に移動され、ターゲットデータブロック1内に現在キャッシュされている有効データはターゲットデータブロック2に移動され、ターゲットデータブロック3内に現在キャッシュされている有効データはターゲットデータブロック3に移動され、ターゲットデータブロック3内に現在キャッシュされている有効データはターゲットデータブロック0に移動される。この移動の後で、この修正に従って、キャッシュとハードディスクとの間のマッピング関係が修正され、修正の後のマッピング関係、すなわち、修正によって取得されるマッピング関係は図5に示される。第4の期間が終了するとき、同様に、移動が実行された後で、マッピング関係がそれに応じて修正され、修正によって取得されるマッピング関係は図1に示され、すなわち、修正によって取得されるマッピング関係は、第1の期間のマッピング関係に戻る。このようにして、1つの切替え周期が終了する。次いで、次の切替え周期の切替えプロセスを続けることができる。   Similarly, when the third period ends, valid data currently cached in the target data block 0 in the flash memory medium is moved to the target data block 1 and is currently cached in the target data block 1 Valid data is moved to target data block 2, valid data currently cached in target data block 3 is moved to target data block 3, and valid data currently cached in target data block 3 is target data block Moved to 0. After this move, according to this modification, the mapping relationship between the cache and the hard disk is modified, and the mapping relationship after the modification, that is, the mapping relationship obtained by the modification is shown in FIG. Similarly, when the fourth period ends, after the move is performed, the mapping relationship is modified accordingly, and the mapping relationship obtained by modification is shown in FIG. 1, ie obtained by modification. The mapping relationship returns to the mapping relationship of the first period. In this way, one switching cycle ends. The switching process for the next switching period can then continue.

この実施形態では、ターゲットデータブロック内にキャッシュされているデータの移動の後で、データブロックがマッピングされるターゲットデータブロックは、フラッシュメモリ媒体内および/またはメモリ内に記憶されたキャッシュメタデータを更新することによって変更可能である。   In this embodiment, after moving the data cached in the target data block, the target data block to which the data block is mapped updates the cache metadata stored in the flash memory medium and / or in memory. This can be changed.

ハードディスク内のデータブロックなど、ローカルエリアが頻繁にアクセスされるシナリオでは、ハードディスク内の頻繁にアクセスされるローカルエリアが常に固定ターゲットデータブロックに静的にマッピングされるだけでなく、それによって、フラッシュメモリ媒体のサービス寿命を延期および最適化するように、ハードディスク内の頻繁にアクセスされるデータブロックは、1つの切替え周期のそれぞれの切替え期間に、フラッシュメモリ媒体内の異なるターゲットデータブロックにマッピングされる。さらに、上で説明された、1つのラウンドロビン切替え周期の後で、フラッシュメモリ媒体内のターゲットデータブロックの消去回数は互いに近接し、かつ平均値に近接し、フラッシュメモリ媒体のサービス寿命が最適化されるように、ターゲットデータブロックの消去回数は均等に分散される。   In scenarios where local areas are frequently accessed, such as data blocks on a hard disk, frequently accessed local areas on the hard disk are not only statically mapped to fixed target data blocks, but also to flash memory. In order to extend and optimize the service life of the medium, frequently accessed data blocks in the hard disk are mapped to different target data blocks in the flash memory medium in each switching period of one switching period. Furthermore, after one round robin switching period as described above, the number of erases of the target data block in the flash memory medium is close to each other and close to the average value, and the service life of the flash memory medium is optimized As described above, the number of erasures of the target data block is evenly distributed.

この実施形態では、マッピング関係の動的切替えにおいて、キャッシュ内のターゲットデータブロックの数列(number sequence)に従って、キャッシュ内のそれぞれのターゲットデータブロック内のデータは、ラウンドロビン様式で、ターゲットデータブロックの数に隣り合う数を有するターゲットデータブロックに移動される。この例は、単なる例示的な実施例であり、他のラウンドロビン様式も適用可能である。例えば、切替え期間が終了するとき、ターゲットデータブロック0内に現在キャッシュされているデータがターゲットデータブロック3に移動され、ターゲットデータブロック3内に現在キャッシュされているデータがターゲットデータブロック2に移動され、ターゲットデータブロック2内に現在キャッシュされているデータがターゲットデータブロック1に移動され、ターゲットデータブロック1内に現在キャッシュされているデータがターゲットデータブロック0に移動される順番で、キャッシュのそれぞれのターゲットデータブロック内にキャッシュされているデータは移動される。次いで、ハードディスクなど、基礎をなす記憶媒体内のそれぞれのデータブロックがマッピングされるターゲットデータブロックがそれに応じて変更され、ハードディスクとキャッシュとの間のマッピング関係がそれに応じて変更される。   In this embodiment, in the dynamic switching of the mapping relationship, according to the number sequence of the target data blocks in the cache, the data in each target data block in the cache is the number of target data blocks in a round-robin fashion. Are moved to target data blocks having adjacent numbers. This example is merely an illustrative example and other round robin formats are applicable. For example, when the switchover period ends, the data currently cached in target data block 0 is moved to target data block 3, and the data currently cached in target data block 3 is moved to target data block 2. , The data currently cached in target data block 2 is moved to target data block 1, and the data currently cached in target data block 1 is moved to target data block 0 Data cached in the target data block is moved. Then, the target data block to which each data block in the underlying storage medium, such as the hard disk, is mapped is changed accordingly, and the mapping relationship between the hard disk and the cache is changed accordingly.

当然、上で説明されたラウンドロビン様式に加えて、1つの切替え周期の後でキャッシュ内のターゲットデータブロックの消去回数が互いに近接することを条件に、基礎をなす記憶媒体内の少なくとも1個のデータブロックがマッピングされる、キャッシュ内のターゲットデータブロックを変更する他の様式も適用可能である。互いに近接することは、ターゲットデータブロックの消去回数が平均値に近接することを指す場合があり、詳細には、ターゲットデータブロック同士の間の消去回数の差が消去回数の差のプリセットされたしきい値未満であることを指す。差のしきい値は、要件または特定のアプリケーションシナリオに従って設定可能である。   Naturally, in addition to the round robin format described above, at least one of the underlying storage media in the underlying storage medium is subject to the proximity of the target data block erasures in the cache after one switch period. Other ways of changing the target data block in the cache to which the data block is mapped are also applicable. Proximity to each other may indicate that the number of erasures of the target data block is close to the average value.In detail, the difference in the number of erasures between the target data blocks is preset as the difference in the number of erasures. It means that it is less than the threshold. The difference threshold can be set according to requirements or specific application scenarios.

周期的なラウンドロビンの動的切替えポリシーが採用されるとき、ユーザはアプリケーションシナリオに従って、切替え期間を柔軟に設定することができ、切替え周期は比較的に短い。しかし、周期的なラウンドロビンの動的切替えポリシーが小容量を有するキャッシュに関してより適切であるように、マッピングターゲットが切り替わるたびに、キャッシュ内のすべての有効データは移動される。   When the periodic round robin dynamic switching policy is adopted, the user can flexibly set the switching period according to the application scenario, and the switching period is relatively short. However, every time the mapping target is switched, all valid data in the cache is moved so that a periodic round robin dynamic switching policy is more appropriate for caches with small capacity.

図6から図11は、本発明の第1の実施形態による方法を採用することによって、キャッシュマッピングを制御する別の例を示す。この例では、1つの切替え周期の後でキャッシュ内のターゲットデータブロックの消去回数が互いに近接するように、ハードディスク内のそれぞれのデータブロックがマッピングされる、キャッシュ内のターゲットデータブロックを変更するために周期配列動的切替えマッピングポリシー(periodic-arrangement dynamic switching mapping policy)が採用される。この例では、1つの切替え周期内に含まれる切替え期間の数はN×(N-1)に等しく、式中、Nは、キャッシュ内に含まれたターゲットデータブロックの数であり、Nは0より大きな整数である。例えば、この例では、N=3である。したがって、この例では、1つの切替え周期は、6個の切替え期間を含む。   6 to 11 show another example of controlling the cache mapping by adopting the method according to the first embodiment of the present invention. In this example, to change the target data block in the cache to which each data block in the hard disk is mapped so that the number of erases of the target data block in the cache is close to each other after one switching period A periodic-arrangement dynamic switching mapping policy is employed. In this example, the number of switching periods included in one switching period is equal to N × (N−1), where N is the number of target data blocks included in the cache and N is 0. It is a larger integer. For example, in this example, N = 3. Therefore, in this example, one switching cycle includes six switching periods.

この例では、フラッシュメモリ媒体はキャッシュとして使用され、基礎をなす記憶媒体は、例えば、ハードディスクとして使用される。例えば、限定としてではなく、キャッシュは3個のターゲットデータブロックを有し、ハードディスクは2つのセットを含み、それぞれのセットは、キャッシュの3個のターゲットデータブロックに対応する、3個のデータブロックに分割され、ハードディスク内のそれぞれのデータブロックのサイズは、フラッシュメモリ媒体内のそれぞれのターゲットデータブロックのサイズに一致する。   In this example, the flash memory medium is used as a cache and the underlying storage medium is used, for example, as a hard disk. For example, but not by way of limitation, the cache has three target data blocks, the hard disk contains two sets, each set corresponding to three data blocks, corresponding to the three target data blocks in the cache. The size of each divided data block in the hard disk matches the size of each target data block in the flash memory medium.

この例では、キャッシュ内の、最大消去回数を現在有するターゲットデータブロック内にキャッシュされているデータは、1つの切替え周期のそれぞれの切替え期間に、最大消去回数を有するターゲットデータブロック以外の、キャッシュ内のターゲットデータブロック内にキャッシュされているデータと交換され、後者のターゲットデータブロック内のデータは現在の切替え周期に最小回数だけ交換され、前記後者のターゲットデータブロックは、現在の切替え周期の先の切替え期間において、最大消去回数を現在有するターゲットデータブロックとデータを交換するターゲットデータブロックとは異なり、すなわち、データは相互に移動され、ハードディスク内の対応するデータブロックがマッピングされるターゲットデータブロックは、ターゲットデータブロック内にキャッシュされているデータの移動に応じて、それに応じて変更される。キャッシュ内のそれぞれのターゲットデータブロックは、最大消去回数を有するターゲットデータブロックになる、N-1個の機会を有し、すなわち、1つの切替え周期において、それぞれのターゲットデータブロックは、最大消去回数を有するターゲットデータブロックであり、すなわち、異なるN-1個の期間に最も頻繁にアクセスされるデータブロックに対応する。   In this example, the data cached in the target data block that currently has the maximum number of erases in the cache is in the cache other than the target data block that has the maximum number of erases in each switching period of one switching cycle. Is exchanged with the data cached in the target data block, the data in the latter target data block is exchanged a minimum number of times in the current switching period, and the latter target data block Unlike the target data block that exchanges data with the target data block that currently has the maximum number of erases in the switching period, i.e., the data is moved to each other and the corresponding data block in the hard disk is mapped to As the data cached in the target data block is moved, it is changed accordingly. Each target data block in the cache has N-1 opportunities to become the target data block with the maximum erase count, i.e., in one switching period, each target data block has a maximum erase count. Corresponding to the most frequently accessed data block in different N-1 periods.

例えば、切替え周期の初めに、フラッシュメモリ媒体内のターゲットデータブロック0は最大消去回数を有すると仮定され、これは、ターゲットデータブロック0にマッピングされる、ハードディスク内のデータブロック0およびデータブロック3が最も頻繁にアクセスされることを示す。ターゲットデータブロック0に加えて、ターゲットデータブロックは、ターゲットデータブロック1とターゲットデータブロック2とを含む。図6に示されるように、この例では、第1の期間が終了する前に、ハードディスクとキャッシュとの間のマッピング関係は以下の通りである。すなわち、ハードディスクのデータブロック0とデータブロック3とがキャッシュのターゲットデータブロック0にマッピングされ、ハードディスクのデータブロック1とデータブロック4とがキャッシュのターゲットデータブロック1にマッピングされ、ハードディスクのデータブロック2とデータブロック5とがキャッシュのターゲットデータブロック2にマッピングされる。   For example, at the beginning of the switching cycle, it is assumed that the target data block 0 in the flash memory medium has the maximum number of erases, which means that data block 0 and data block 3 in the hard disk mapped to the target data block 0 Indicates the most frequently accessed. In addition to the target data block 0, the target data block includes a target data block 1 and a target data block 2. As shown in FIG. 6, in this example, before the first period ends, the mapping relationship between the hard disk and the cache is as follows. That is, hard disk data block 0 and data block 3 are mapped to cache target data block 0, hard disk data block 1 and data block 4 are mapped to cache target data block 1, and hard disk data block 2 and Data block 5 is mapped to target data block 2 in the cache.

この例では、例えば、第1の期間が終了するとき、フラッシュメモリ媒体内のターゲットデータブロック0内に現在キャッシュされている有効データはターゲットデータブロック1に移動され、ターゲットデータブロック1内に現在キャッシュされている有効データはターゲットデータブロック0に移動される。キャッシュ内のデータの移動の後で、ターゲットデータブロック内のデータに移動に応じて、ハードディスク内のデータブロック0とデータブロック3とがマッピングされる、キャッシュ内のターゲットデータブロックと、ハードディスク内のデータブロック1とデータブロック4とがマッピングされる、キャッシュ内のターゲットデータブロックとがそれに応じて変更される。この移動の後で、修正によって取得されるマッピング関係が図7に示される。この時点で、最も頻繁にアクセスされるデータブロック0とデータブロック3とがターゲットデータブロック1にマッピングされる。   In this example, for example, when the first period ends, valid data currently cached in the target data block 0 in the flash memory medium is moved to the target data block 1, and the current cache in the target data block 1 is The valid data being moved is moved to the target data block 0. The target data block in the cache and the data in the hard disk, where data block 0 and data block 3 in the hard disk are mapped according to the movement to the data in the target data block after the data in the cache is moved The target data block in the cache to which block 1 and data block 4 are mapped is changed accordingly. After this move, the mapping relationship obtained by modification is shown in FIG. At this point, the most frequently accessed data block 0 and data block 3 are mapped to the target data block 1.

第2の期間が終了するとき、フラッシュメモリ媒体内の、最大消去回数を現在有するターゲットデータブロック1内にキャッシュされている有効データはターゲットデータブロック2に移動され、ターゲットデータブロック2内に現在キャッシュされている有効データはターゲットデータブロック1に移動される。キャッシュ内のデータの移動の後で、ターゲットデータブロック内の移動に応じて、ハードディスク内のデータブロック0とデータブロック3とがマッピングされる、キャッシュ内のターゲットデータブロックと、ハードディスク内のデータブロック2とデータブロック5とがマッピングされる、キャッシュ内のターゲットデータブロックとがそれに応じて変更される。この移動の後で、修正によって取得されるマッピング関係が図8に示される。この時点で、最も頻繁にアクセスされる、ハードディスク内のデータブロック0とデータブロック3とがターゲットデータブロック2にマッピングされる。   When the second period ends, valid data cached in the target data block 1 that currently has the maximum number of erases in the flash memory medium is moved to the target data block 2 and is cached in the target data block 2 The valid data being moved is moved to the target data block 1. After data movement in the cache, data block 0 and data block 3 in the hard disk are mapped according to movement in the target data block, target data block in the cache and data block 2 in the hard disk And the target data block in the cache to which the data block 5 is mapped are changed accordingly. After this move, the mapping relationship obtained by modification is shown in FIG. At this point, data block 0 and data block 3 in the hard disk, which are accessed most frequently, are mapped to target data block 2.

第3の期間が終了するとき、フラッシュメモリ媒体内の、最大消去回数を現在有するターゲットデータブロック2内にキャッシュされている有効データはターゲットデータブロック0に移動され、ターゲットデータブロック0内に現在キャッシュされている有効データはターゲットデータブロック2に移動される。キャッシュ内のデータの移動の後で、ターゲットデータブロック内のデータの移動に応じて。この移動の後で、修正によって取得されるマッピング関係が図9に示される。この時点で、最も頻繁にアクセスされる、ハードディスク内のデータブロック0とデータブロック3とがターゲットデータブロック0にマッピングされる。   At the end of the third period, valid data cached in the target data block 2 that currently has the maximum number of erases in the flash memory medium is moved to the target data block 0 and is cached in the target data block 0. The valid data being moved is moved to the target data block 2. Depending on the data movement in the target data block after the data movement in the cache. After this move, the mapping relationship obtained by modification is shown in FIG. At this point, data block 0 and data block 3 in the hard disk that are accessed most frequently are mapped to target data block 0.

第4の期間が終了するとき、フラッシュメモリ媒体内の、最大消去回数を現在有するターゲットデータブロック0内にキャッシュされている有効データはターゲットデータブロック1に移動され、ターゲットデータブロック1内に現在キャッシュされている有効データはターゲットデータブロック0に移動される。キャッシュ内のデータの移動の後で、ターゲットデータブロック内のデータに移動に応じて。この移動の後で、修正によって取得されたマッピング関係が図10に示される。この時点で、最も頻繁にアクセスされる、ハードディスク内のデータブロック0とデータブロック3とがターゲットデータブロック1にマッピングされる。   When the fourth period ends, valid data cached in the target data block 0 that currently has the maximum number of erases in the flash memory medium is moved to the target data block 1 and is cached in the target data block 1 The valid data being moved is moved to the target data block 0. After moving data in the cache, in response to moving data in the target data block. After this move, the mapping relationship obtained by modification is shown in FIG. At this point, data block 0 and data block 3 in the hard disk, which are accessed most frequently, are mapped to target data block 1.

第5の期間が終了するとき、フラッシュメモリ媒体内の、最大消去回数を現在有するターゲットデータブロック1内にキャッシュされている有効データはターゲットデータブロック2に移動され、ターゲットデータブロック2内に現在キャッシュされている有効データはターゲットデータブロック1に移動される。キャッシュ内のデータの移動の後で、ターゲットデータブロック内のデータの移動に応じて。この移動の後で、修正によって取得されたマッピング関係が図11に示される。この時点で、最も頻繁にアクセスされる、ハードディスク内のデータブロック0とデータブロック3とがターゲットデータブロック2にマッピングされる。   When the fifth period ends, valid data cached in the target data block 1 that currently has the maximum number of erases in the flash memory medium is moved to the target data block 2 and is cached in the target data block 2 The valid data being moved is moved to the target data block 1. Depending on the data movement in the target data block after the data movement in the cache. After this move, the mapping relationship obtained by modification is shown in FIG. At this point, data block 0 and data block 3 in the hard disk, which are accessed most frequently, are mapped to target data block 2.

第6の期間が終了するとき、フラッシュメモリ媒体内の、最大消去回数を現在有するターゲットデータブロック2内にキャッシュされている有効データはターゲットデータブロック0に移動され、ターゲットデータブロック0内に現在キャッシュされている有効データはターゲットデータブロック2に移動される。キャッシュ内のデータの移動の後で、ターゲットデータブロック内のデータの移動に応じて。この移動の後で、修正によって取得されたマッピング関係が図6に示される。この時点で、1つの切替え周期が終了し、図6から、次の切替え周期が図6から図11に示される切替え順序に従って継続的に実行される。   At the end of the sixth period, valid data cached in the target data block 2 that currently has the maximum number of erases in the flash memory medium is moved to the target data block 0 and is now cached in the target data block 0. The valid data being moved is moved to the target data block 2. Depending on the data movement in the target data block after the data movement in the cache. After this move, the mapping relationship obtained by modification is shown in FIG. At this point, one switching cycle ends, and from FIG. 6, the next switching cycle is continuously executed according to the switching order shown in FIGS.

この例では、それぞれの期間が終了するとき、最大消去回数を現在有するターゲットデータブロック、すなわち、現在最も頻繁にアクセスされているデータブロックがマッピングされるターゲットデータブロックの切替えターゲットが、ターゲットデータブロックの数列に従って選択される。その他の実施形態では、ターゲットデータブロックの数が3を超えたとき、切替えターゲット内のデータが現在の切替え周期に最大回数だけ他のターゲットデータブロックと交換されており、切替えターゲットが、現在の切替え周期の先の切替え期間において、最大消去回数を現在有するターゲットデータブロックとデータ交換を実行したばかりのターゲットデータブロックとは異なる任意のターゲットデータブロックであることを条件に、切替えターゲットは、ターゲットデータブロックの数列に従って選択されてよく、またはターゲットデータブロックの数列に従わずに、選択されてもよい。   In this example, at the end of each period, the target data block that currently has the maximum number of erases, i.e., the target data block switching target to which the most frequently accessed data block is currently mapped, is the target data block's Selected according to a sequence of numbers. In other embodiments, when the number of target data blocks exceeds 3, the data in the switching target is exchanged with other target data blocks a maximum number of times in the current switching period, and the switching target The switching target is the target data block on the condition that it is an arbitrary target data block that is different from the target data block having the maximum number of erasures and the target data block that has just undergone data exchange in the switching period ahead of the cycle. Or may be selected without following the target data block sequence.

この実施形態では、ターゲットデータブロック内にキャッシュされているデータの移動の後でフラッシュメモリ媒体内および/またはメモリ内に記憶されたキャッシュメタデータを更新することによって、データブロックがマッピングされるターゲットデータブロックを変更することが可能である。   In this embodiment, the target data to which the data block is mapped by updating cache metadata stored in the flash memory medium and / or in memory after movement of the data cached in the target data block It is possible to change the block.

ハードディスク内のデータブロックなど、ローカルエリアが頻繁にアクセスされるシナリオでは、ハードディスク内の頻繁にアクセスされるローカルエリアが常に固定ターゲットデータブロックにマッピングされるだけでなく、それによって、フラッシュメモリ媒体のサービス寿命を延期および最適化するように、ハードディスク内の頻繁にアクセスされるデータブロックは、1つの切替え周期のそれぞれの切替え期間に、フラッシュメモリ媒体内の異なるターゲットデータブロックにマッピングされる。さらに、上で説明された1つの周期配列切替え周期の後で、フラッシュメモリ媒体内のターゲットデータブロックの消去回数は互いに近接し、かつ平均値に近接し、フラッシュメモリ媒体のサービス寿命が最適化されるように、ターゲットデータブロックの消去回数は均等に分散される。さらに、この実施形態の周期配列動的切替えマッピングポリシーを採用することによって、マッピングターゲットが切り替わるたびに、キャッシュ内の2個のターゲットデータブロック内の有効データだけが移動され、これはパフォーマンスに深刻な影響を与えず、様々なサイズのキャッシュに適用可能である。   In scenarios where the local area is frequently accessed, such as data blocks in the hard disk, the frequently accessed local area in the hard disk is not always mapped to a fixed target data block, thereby enabling the service of flash memory media. In order to extend and optimize lifetime, frequently accessed data blocks in the hard disk are mapped to different target data blocks in the flash memory medium in each switching period of one switching period. In addition, after one periodic array switching period as described above, the number of erases of the target data block in the flash memory medium is close to each other and close to the average value, and the service life of the flash memory medium is optimized. As described above, the number of erases of the target data block is evenly distributed. Furthermore, by adopting the periodic array dynamic switching mapping policy of this embodiment, each time the mapping target is switched, only valid data in the two target data blocks in the cache is moved, which is serious for performance. It can be applied to caches of various sizes without affecting them.

上で説明された基礎をなす記憶媒体とキャッシュとの間の周期的な動的マッピング切替え方法は、サービスが周期的規則を有するアプリケーションシナリオ、特に、サービスが周期的規則を有し、システム内で最も頻繁にアクセスされるデータがハードディスク上の固定位置に記憶されるシナリオに適用可能である。   The cyclic dynamic mapping switching method between the underlying storage medium and the cache described above is an application scenario in which the service has a periodic rule, in particular, the service has a periodic rule in the system. Applicable to scenarios where the most frequently accessed data is stored in a fixed location on the hard disk.

本発明のある実施形態は、キャッシュマッピングを制御する解決策であって、基礎をなす記憶媒体のキャッシュ内のそれぞれのターゲットデータブロックの消去回数を監視するステップであって、基礎をなす記憶媒体内の1個または複数のデータブロックがキャッシュ内の1個のターゲットデータブロックだけにマッピングされ、基礎をなす記憶媒体のキャッシュがフラッシュメモリ媒体を含む、監視するステップと、キャッシュ内の、最大消去回数を有するターゲットデータブロックと最小消去回数を有するターゲットデータブロックとの間の差がプリセットされた消去しきい値に達したとき、基礎をなす記憶媒体内の少なくとも1個のデータブロックがマッピングされる、キャッシュ内のターゲットデータブロックを変更するステップであって、キャッシュ内の変更されたターゲットデータブロックが、キャッシュ内の、最大消去回数を現在有するターゲットデータブロックを含む、変更するステップと、キャッシュ内のそれぞれのターゲットデータブロックが変更された後で生成される消去回数を継続的に監視するステップとを含む、解決策をさらに提供する。   An embodiment of the present invention is a solution for controlling cache mapping, the step of monitoring the number of erasures of each target data block in the cache of the underlying storage medium, and in the underlying storage medium One or more data blocks are mapped to only one target data block in the cache, and the underlying storage media cache includes flash memory media, and monitoring the maximum number of erases in the cache A cache in which at least one data block in the underlying storage medium is mapped when the difference between the target data block having and the target data block having the minimum erase count reaches a preset erase threshold This is a step to change the target data block in The modified target data block in the cache is generated after the modification of each target data block in the cache, including the target data block in the cache that currently has the maximum number of erasures Further providing a solution comprising the step of continuously monitoring the number of erasures.

図12は、本発明の第2の実施形態による、キャッシュマッピングを制御するための方法の概略流れ図である。この実施形態では、フラッシュメモリ媒体は、キャッシュとして使用され、基礎をなす記憶媒体は、例えば、ハードディスクとして使用される。例えば、限定としてではなく、キャッシュは4個のターゲットデータブロックを有し、ハードディスクは2つのセットを含み、それぞれのセットは、キャッシュの4個のターゲットデータブロックに対応する4個のデータブロックに分割され、ハードディスク内のそれぞれのデータブロックのサイズは、フラッシュメモリ媒体内のそれぞれのターゲットデータブロックのサイズに一致する。   FIG. 12 is a schematic flowchart of a method for controlling cache mapping according to the second embodiment of the present invention. In this embodiment, the flash memory medium is used as a cache, and the underlying storage medium is used, for example, as a hard disk. For example, but not by way of limitation, the cache has 4 target data blocks, the hard disk contains 2 sets, each set divided into 4 data blocks corresponding to the 4 target data blocks in the cache The size of each data block in the hard disk matches the size of each target data block in the flash memory medium.

図12に示されるように、本実施形態による、キャッシュマッピングを制御するための方法は、以下のステップを含む。   As shown in FIG. 12, the method for controlling cache mapping according to the present embodiment includes the following steps.

ステップS1201。キャッシュ内のそれぞれのターゲットデータブロックの消去回数を監視および記録するステップ。   Step S1201. Monitoring and recording the number of erases of each target data block in the cache.

ステップS1202。キャッシュ内の、最大消去回数を有するターゲットデータブロックと最小消去回数を有するターゲットデータブロックとの間の消去回数の差がプリセットされた消去しきい値に達したとき、最大消去回数を有するターゲットデータブロック内にキャッシュされているデータを、最小消去回数を有するターゲットデータブロック内にキャッシュされているデータと交換するステップ。   Step S1202. The target data block having the maximum number of erases when the erase number difference between the target data block having the maximum number of erases and the target data block having the minimum number of erases reaches a preset erase threshold in the cache Replacing the data cached in the data with the data cached in the target data block having the minimum number of erasures.

ステップS1203。ターゲットデータブロックの交換に従って、それに応じて、基礎をなす記憶媒体内の、最大消去回数を有するターゲットデータブロックに現在マッピングされているすべてのデータブロックがマッピングされる、キャッシュ内のターゲットデータブロックを、最小消去回数を有するターゲットデータブロックに現在マッピングされているすべてのデータブロックにマッピングされる、キャッシュ内のターゲットデータブロックと変更するステップ。詳細には、基礎をなす記憶媒体内の、最大消去回数を有するターゲットデータブロックに現在マッピングされているすべてのデータブロックが、最小消去回数を現在有するターゲットデータブロックにマッピングされ、基礎をなす記憶媒体内の、最小消去回数を有するターゲットデータブロックに現在マッピングされているすべてのデータブロックが最大消去回数を現在有するターゲットデータブロックにマッピングされるように変更を行う。詳細には、キャッシュメタデータを変更することによって、ハードディスク内のデータブロックとキャッシュ内のターゲットデータブロックとの間のマッピング関係を変更することができる。   Step S1203. In accordance with the exchange of the target data block, the target data block in the cache to which all data blocks currently mapped to the target data block having the maximum number of erases in the underlying storage medium are mapped accordingly. Changing to a target data block in the cache that is mapped to all data blocks currently mapped to the target data block having the minimum number of erasures. In particular, all data blocks currently mapped to the target data block having the maximum number of erases in the underlying storage medium are mapped to the target data block currently having the minimum number of erases, and the underlying storage medium Of all the data blocks currently mapped to the target data block having the minimum number of erasures are mapped to the target data block currently having the maximum number of erasures. Specifically, the mapping relationship between the data block in the hard disk and the target data block in the cache can be changed by changing the cache metadata.

ステップS1204。ハードディスクとキャッシュとの間のマッピングが変更された後で、キャッシュのそれぞれのターゲットデータブロックの記録された消去回数をリセットして、ステップS1201に戻って、マッピング変更の後で生成される、それぞれのターゲットデータブロックの消去回数を継続的に監視および記録して、条件が満たされたとき、ステップS1203およびステップS1204を実行するステップ。例えば、それぞれのターゲットデータブロックの消去回数を記録するために、カウンタを使用することができる。それぞれのマッピング変更の後で、カウンタはリセットされ、次いで、カウントを開始して、マッピング変更の後で生成される消去回数を記録する。   Step S1204. After the mapping between the hard disk and the cache is changed, the recorded number of erases of each target data block in the cache is reset, and the process returns to step S1201 to generate each after the mapping change. A step of continuously monitoring and recording the number of erasures of the target data block, and executing step S1203 and step S1204 when the condition is satisfied. For example, a counter can be used to record the number of erases of each target data block. After each mapping change, the counter is reset and then starts counting to record the number of erasures generated after the mapping change.

図1、図13、および図14は、本発明の第2の実施形態による方法を採用することによって、キャッシュマッピングを制御する特定の例を示す。この例では、当初、図1に示されるマッピング関係がハードディスクとキャッシュとの間で採用されると仮定する。図1に示されるように、当初、ハードディスクとキャッシュとの間のマッピング関係は以下の通りである。すなわち、ハードディスク内のデータブロック0とデータブロック4とがキャッシュ内のターゲットデータブロック0にマッピングされ、ハードディスクのデータブロック1とデータブロック5とがキャッシュ内のターゲットデータブロック1にマッピングされ、ハードディスクのデータブロック2とデータブロック6とがキャッシュ内のターゲットデータブロック2にマッピングされ、ハードディスクのデータブロック3とデータブロック7とがキャッシュ内のターゲットデータブロック3にマッピングされる。キャッシュ内のそれぞれのターゲットデータブロックの消去回数が監視される。   FIGS. 1, 13, and 14 show specific examples of controlling cache mapping by employing the method according to the second embodiment of the present invention. In this example, it is initially assumed that the mapping relationship shown in FIG. 1 is adopted between the hard disk and the cache. As shown in FIG. 1, initially, the mapping relationship between the hard disk and the cache is as follows. That is, data block 0 and data block 4 in the hard disk are mapped to target data block 0 in the cache, data block 1 and data block 5 in the hard disk are mapped to target data block 1 in the cache, and data on the hard disk Block 2 and data block 6 are mapped to target data block 2 in the cache, and data block 3 and data block 7 of the hard disk are mapped to target data block 3 in the cache. The number of erases of each target data block in the cache is monitored.

ターゲットデータブロック0は、最大消去回数を現在有し、ターゲットデータブロック1は、最小消去回数を現在有すると仮定する。データキャッシングの進展に伴い、それぞれのターゲットデータブロックの消去回数が監視および記録される。ターゲットデータブロック0とターゲットデータブロック1との間の消去回数の差が消去しきい値Sに達したと判断されたとき、最大消去回数を有するターゲットデータブロック0内にキャッシュされているデータは最小消去回数を有するターゲットデータブロック1内にキャッシュされているデータと交換され、それに応じて、ハードディスク内のターゲットデータブロック0に現在マッピングされているすべてのデータブロック(この例では、データブロック0およびデータブロック4)がターゲットデータブロック1にマッピングされ、ターゲットデータブロック1に現在マッピングされているすべてのデータブロック(この例では、データブロック1およびデータブロック5)がターゲットデータブロック0にマッピングされるように、変更が実行される。変更の後のマッピング関係が図13に示される。次いで、キャッシュ内のそれぞれのターゲットデータブロックの消去回数がリセットされ、マッピング変更の後で生成される、キャッシュ内のそれぞれのターゲットデータブロックの消去回数が継続的に監視される。   Assume that target data block 0 currently has a maximum number of erases and target data block 1 currently has a minimum number of erases. As data caching progresses, the number of erases of each target data block is monitored and recorded. When it is determined that the difference in the erase count between the target data block 0 and the target data block 1 has reached the erase threshold S, the data cached in the target data block 0 having the maximum erase count is the smallest All data blocks that are exchanged with data cached in target data block 1 with the number of erases and are currently mapped to target data block 0 in the hard disk (in this example, data block 0 and data Block 4) is mapped to target data block 1, and all data blocks currently mapped to target data block 1 (in this example, data block 1 and data block 5) are mapped to target data block 0 The change is performed. The mapping relationship after the change is shown in FIG. The number of erases of each target data block in the cache is then reset and the number of erases of each target data block in the cache generated after the mapping change is continuously monitored.

この例では、前の交換の後で、データキャッシングの進展に伴い、ターゲットデータブロック3の消去回数は最小になり、ターゲットデータブロック2の消去回数は最大になると仮定する。ターゲットデータブロック2とターゲットデータブロック3との間の消去回数の差が消去しきい値Sに達したとき、最大消去回数を有するターゲットデータブロック2内にキャッシュされているデータは、最小消去回数を有するターゲットデータブロック3内にキャッシュされているデータと交換され、それに応じて、ハードディスク内のターゲットデータブロック2に現在マッピングされているすべてのデータブロック(この例では、データブロック2およびデータブロック6)がターゲットデータブロック3にマッピングされ、ターゲットデータブロック3に現在マッピングされているすべてのデータブロック(この例では、データブロック3およびデータブロック7)がターゲットデータブロック2にマッピングされるように、変更が実行される。変更の後のマッピング関係が図14に示される。次いで、キャッシュ内のそれぞれのターゲットデータブロックの消去回数はリセットされて、マッピング変更の後で生成される、キャッシュ内のそれぞれのターゲットデータブロックの消去回数は継続的に監視され、最大消去回数を有するターゲットデータブロックと最小消去回数を有するターゲットデータブロックとの間の消去回数の差がプリセットされた消去しきい値Sに達したとき、上で説明されたのと類似の形でハードディスクとキャッシュとの間のマッピングは変更される。   In this example, it is assumed that the number of erases of the target data block 3 is minimized and the number of erases of the target data block 2 is maximized as data caching progresses after the previous exchange. When the difference in the number of erases between the target data block 2 and the target data block 3 reaches the erase threshold S, the data cached in the target data block 2 having the maximum erase number All data blocks that are exchanged with the data cached in the target data block 3 and are currently mapped to the target data block 2 in the hard disk (in this example, data block 2 and data block 6) Is mapped to target data block 3, and all data blocks currently mapped to target data block 3 (in this example, data block 3 and data block 7) are mapped to target data block 2. Executed. The mapping relationship after the change is shown in FIG. Then, the erase count of each target data block in the cache is reset, and the erase count of each target data block in the cache generated after the mapping change is continuously monitored and has the maximum erase count When the erase count difference between the target data block and the target data block with the minimum erase count reaches the preset erase threshold S, the hard disk and cache are similar in the manner described above. The mapping between is changed.

本実施形態を使用することによって、フラッシュメモリ媒体内のターゲットデータブロックの最大消去回数と最小消去回数との間の差と、消去されたブロックの最大消去回数と最小消去回数との間の差は制御可能になり、その結果、それぞれのターゲットデータブロックの消去回数が平均値に近接することが確実にされる。フラッシュメモリ媒体内のターゲットデータブロックの消去回数の相違は、消去しきい値Sを設定することによって制御可能である。本実施形態は、サービスが周期現象を有さないか、または自明でない周期現象を有するアプリケーションシナリオに特に適用可能である。   By using this embodiment, the difference between the maximum erase count and the minimum erase count of the target data block in the flash memory medium and the difference between the maximum erase count and the minimum erase count of the erased block are As a result, it is ensured that the number of erases of each target data block is close to the average value. The difference in the number of erasures of the target data block in the flash memory medium can be controlled by setting the erasing threshold value S. This embodiment is particularly applicable to application scenarios where the service does not have a periodic phenomenon or has a non-trivial periodic phenomenon.

本発明の実施形態の実装では、消去回数を置換回数と置き換えることが可能であり、置換回数は、動的マッピング交換を実行するために監視および記録される。当業者が理解するように、キャッシュ内でデータを書き込まれた他のデータと置換する動作は、キャッシュ置換と呼ばれる。   In implementation of embodiments of the present invention, the number of erasures can be replaced with the number of replacements, which are monitored and recorded to perform dynamic mapping exchanges. As those skilled in the art will appreciate, the operation of replacing data in the cache with other written data is called cache replacement.

特定のアプリケーションでは、ユーザは、実際のアプリケーションシナリオに従って、上で説明された動的マッピングポリシーからある動的マッピングポリシーを選択して、その動的マッピングポリシーを採用し、動的マッピングポリシーが必要とされないときは、その動的マッピングポリシーを完了させることが可能である。さらに、動的マッピングポリシーを選択した後で、ユーザは、実際のニーズに従って、対応するインターフェースモジュールを介して、切替え期間、切替え周期、および/または消去しきい値など、対応するパラメータを設定することも可能である。動的マッピングポリシーを選択しない場合、ユーザは、デフォルトマッピングポリシー、例えば、直接マッピング、完全なアソシアティブマッピング、およびNウェイセットアソシアティブマッピングを使用することができる。   For a specific application, the user may choose a dynamic mapping policy from the dynamic mapping policies described above according to the actual application scenario, adopt that dynamic mapping policy, and need a dynamic mapping policy. If not, it is possible to complete the dynamic mapping policy. Furthermore, after selecting a dynamic mapping policy, the user can set corresponding parameters such as switching period, switching period, and / or erasure threshold via the corresponding interface module according to actual needs. Is also possible. If no dynamic mapping policy is selected, the user can use a default mapping policy, eg, direct mapping, full associative mapping, and N-way set associative mapping.

キャッシュとして機能するフラッシュメモリ媒体内のターゲットデータブロックが使用限度に迅速に達せず、それによって、フラッシュメモリ媒体のサービス寿命を延長できるように、その切替え方法が、基礎をなす記憶媒体内の頻繁にアクセスされるデータブロック内のデータが常にキャッシュ内の固定ターゲットデータブロックに対応するだけではないことを可能にすることを条件に、上で説明された切替え方法の他に、他の切替え順序を使用するマッピング切替え方法も容認可能である点を当業者は理解されたい。   The switching method is frequently used in the underlying storage medium so that the target data block in the flash memory medium functioning as a cache does not reach the usage limit quickly, thereby extending the service life of the flash memory medium. In addition to the switching methods described above, other switching orders are used, provided that it allows the data in the data block being accessed not only to always correspond to a fixed target data block in the cache. Those skilled in the art should understand that the mapping switching method is also acceptable.

切替え方法が、キャッシュ内のそれぞれのターゲットデータブロックの消去回数が互いに近接すること、例えば、平均値に近接することを可能にするとき、フラッシュメモリ媒体のサービス寿命が最大となることを当業者は理解されたい。   Those skilled in the art will know that the service life of the flash memory medium is maximized when the switching method allows the number of erases of each target data block in the cache to be close to each other, eg close to the average value. I want you to understand.

次に、図15を参照すると、図15は、本発明のある実施形態によるキャッシュシステムを示す。   Reference is now made to FIG. 15, which illustrates a cache system according to an embodiment of the present invention.

図15に示されるように、本発明の本実施形態によるキャッシュシステム1500は、基礎をなす記憶媒体1510と、基礎をなす記憶媒体に結合され、かつ基礎をなす記憶媒体のキャッシュとして機能するフラッシュメモリ媒体1520であって、基礎をなす記憶媒体内の1個または複数のデータブロックがキャッシュ内の1個のターゲットデータブロックだけにマッピングされる、フラッシュメモリ媒体1520と、プリセット時間間隔で、基礎をなす記憶媒体のキャッシュ内のターゲットデータブロックを変更するステップであって、基礎をなす記憶媒体内の少なくとも1個のデータブロックがターゲットデータブロックにマッピングされ、キャッシュ内の変更されたターゲットデータブロックが、キャッシュ内の、最大消去回数を現在有するターゲットデータブロックを含む、変更するステップを行うように構成されたプロセッサ1530とを含む。   As shown in FIG. 15, a cache system 1500 according to this embodiment of the present invention includes an underlying storage medium 1510 and a flash memory that is coupled to the underlying storage medium and functions as a cache for the underlying storage medium. Medium 1520, with flash memory medium 1520, where one or more data blocks in the underlying storage medium are mapped to only one target data block in the cache, at preset time intervals Modifying the target data block in the cache of the storage medium, wherein at least one data block in the underlying storage medium is mapped to the target data block, and the modified target data block in the cache is Of the target data block that currently has the maximum number of erasures Including click, and a processor 1530 configured to perform the step of changing.

キャッシュシステム内のプロセッサは、1つの切替え周期の後でキャッシュ内のターゲットデータブロックの消去回数が互いに近接するように、基礎をなす記憶媒体内の少なくとも1個のデータブロックがマッピングされる、キャッシュ内のターゲットデータブロックを、1つの切替え周期のそれぞれの切替え期間に変更するステップであって、1つの切替え周期内に含まれる切替え期間の数が、キャッシュ内に含まれたターゲットデータブロックの数N以上である、変更するステップを行うようにさらに構成可能である。   A processor in the cache system is configured in the cache to which at least one data block in the underlying storage medium is mapped such that the number of erases of the target data block in the cache is close to each other after one switching period. The target data block is changed to each switching period of one switching period, and the number of switching periods included in one switching period is equal to or more than the number N of target data blocks included in the cache. It can be further configured to perform the changing step.

キャッシュシステム内のプロセッサは、基礎をなす記憶媒体内のそれぞれのデータブロックが1つの切替え周期の異なる切替え期間にキャッシュ内の異なるターゲットデータブロックにマッピングされるように、基礎をなす記憶媒体内のそれぞれのデータブロックがマッピングされる、キャッシュ内のターゲットデータブロックを、1つの切替え周期のそれぞれの切替え期間に変更するステップであって、1つの切替え周期内に含まれる切替え期間の数がキャッシュ内に含まれたターゲットデータブロックの数に等しい、変更するステップを行うようにさらに構成可能である。   A processor in the cache system is responsible for each in the underlying storage medium such that each data block in the underlying storage medium is mapped to a different target data block in the cache during different switching periods of one switching period. The target data block in the cache to which the data block is mapped is changed to each switching period of one switching period, and the number of switching periods included in one switching period is included in the cache. It can be further configured to perform a changing step equal to the number of target data blocks that have been generated.

キャッシュシステム内のプロセッサは、キャッシュ内のターゲットデータブロックの数列に従って、キャッシュ内のそれぞれのターゲットデータブロックのデータを、1つの切替え周期のそれぞれの切替え期間に、ラウンドロビン様式で、ターゲットデータブロックの数に隣り合う数を有するターゲットデータブロックに移動するステップと、ターゲットデータブロック内のデータの移動に応じて、基礎をなす記憶媒体内のそれぞれのデータブロックがマッピングされるターゲットデータブロックをそれに応じて変更するステップとを行うようにさらに構成可能である。   The processor in the cache system transfers the data of each target data block in the cache according to the sequence of the target data blocks in the cache, in a round robin manner in each switching period of one switching period. To the target data block having a number adjacent to the target data block, and according to the movement of the data in the target data block, the target data block to which each data block in the underlying storage medium is mapped is changed accordingly. Can be further configured to perform the following steps:

キャッシュシステム内のプロセッサは、キャッシュ内の、最大消去回数を現在有するターゲットデータブロック内にキャッシュされているデータを、1つの切替え周期のそれぞれの切替え期間に、最大消去回数を有するターゲットデータブロック以外の、キャッシュ内のターゲットデータブロック内にキャッシュされているデータと交換するステップであって、後者のターゲットデータブロック内のデータが現在の切替え周期に最小回数だけ交換され、前記後者のターゲットデータブロックが、現在の切替え周期の前の切替え期間において、最大消去回数を現在有するターゲットデータブロックとデータを交換するターゲットデータブロックとは異なる、交換するステップと、基礎をなす記憶媒体内の対応するデータブロックがマッピングされるターゲットデータブロックをそれに応じて変更するステップとを行うようにさらに構成可能であり、1つの切替え周期はN×(N-1)個の切替え期間を含み、1つの切替え周期において、キャッシュ内のそれぞれのターゲットデータブロックは、異なるN-1個の切替え期間において、キャッシュ内の、最大消去回数を有するターゲットデータブロックである。   The processor in the cache system transfers the data cached in the target data block currently having the maximum number of erasures in the cache other than the target data block having the maximum number of erasures in each switching period of one switching period. Replacing the data cached in the target data block in the cache, wherein the data in the latter target data block is exchanged a minimum number of times in the current switching period, the latter target data block being In the switching period prior to the current switching cycle, the target data block that currently has the maximum number of erasures is different from the target data block to exchange data, and the corresponding data block in the underlying storage medium is mapped Is And a step of changing the target data block accordingly, one switching period includes N × (N-1) switching periods, and in one switching period, in the cache Each target data block is a target data block having the maximum number of erases in the cache in different N-1 switching periods.

本発明のある実施形態は、基礎をなす記憶媒体と、基礎をなす記憶媒体に結合され、かつ基礎をなす記憶媒体のキャッシュとして機能するフラッシュメモリ媒体であって、基礎をなす記憶媒体内の1個または複数のデータブロックがキャッシュ内の1個のターゲットデータブロックだけにマッピングされる、フラッシュメモリ媒体と、キャッシュ内のそれぞれのターゲットデータブロックの消去回数を監視するステップと、キャッシュ内の、最大消去回数を有するターゲットデータブロックと最小消去回数を有するターゲットデータブロックとの間の消去回数の差がプリセットされた消去しきい値に達したとき、基礎をなす記憶媒体内の少なくとも1個のデータブロックがマッピングされる、キャッシュ内のターゲットデータブロックを変更するステップであって、キャッシュ内の変更されたターゲットデータブロックが、キャッシュ内の、最大消去回数を現在有するターゲットデータブロックを含む、変更するステップと、キャッシュ内のそれぞれのターゲットデータブロックが変更された後で生成される消去回数を継続的に監視するステップとを行うように構成されたプロセッサとを含むキャッシュシステムをさらに提供する。   An embodiment of the present invention is an underlying storage medium and a flash memory medium coupled to the underlying storage medium and functioning as a cache for the underlying storage medium, wherein one of the underlying storage media A flash memory medium in which one or more data blocks are mapped to only one target data block in the cache, monitoring the number of erases of each target data block in the cache, and maximum erasure in the cache When the difference in the number of erases between the target data block having the number of times and the target data block having the minimum number of erases reaches a preset erase threshold, at least one data block in the underlying storage medium is Change the target data block in the cache to be mapped The modified target data block in the cache includes the target data block in the cache that currently has the maximum number of erasures, and after each target data block in the cache is modified And a processor configured to continuously monitor the number of erasures generated in step (b).

キャッシュシステム内のプロセッサは、最大消去回数を有するターゲットデータブロック内にキャッシュされているデータを、最小消去回数を有するターゲットデータブロック内にキャッシュされているデータと交換するステップと、基礎をなす記憶媒体内の、最大消去回数を有するターゲットデータブロックに現在マッピングされているすべてのデータブロックが最小消去回数を有するターゲットデータブロックにマッピングされ、基礎をなす記憶媒体内の最小消去回数を有するターゲットデータブロックに現在マッピングされているすべてのデータブロックが最大消去回数を有するターゲットデータブロックにマッピングされるように、それに応じて変更を実行するステップとを行うようにさらに構成可能である。   A processor in a cache system for exchanging data cached in a target data block having a maximum erase count with data cached in a target data block having a minimum erase count, and an underlying storage medium All of the data blocks currently mapped to the target data block having the maximum number of erases are mapped to the target data block having the minimum number of erases, and the target data block having the minimum number of erases in the underlying storage medium It is further configurable to perform a change accordingly, so that all currently mapped data blocks are mapped to the target data block having the maximum number of erases.

装置1500内のプロセッサの機能は、ソフトウェア、ハードウェア、またはソフトウェアとハードウェアの組合せによって実施可能であることを当業者は理解されたい。   Those skilled in the art will appreciate that the functions of the processor in apparatus 1500 can be implemented by software, hardware, or a combination of software and hardware.

本発明のある実施形態は、機械実行可能命令を記憶するための機械可読記憶媒体であって、機械実行可能命令が実行されるとき、機械が、プリセット時間間隔で、基礎をなす記憶媒体のキャッシュ内のターゲットデータブロックを変更するステップであって、基礎をなす記憶媒体内の少なくとも1個のデータブロックがターゲットデータブロックにマッピングされ、基礎をなす記憶媒体内の1個または複数のデータブロックがキャッシュ内の1個のターゲットデータブロックだけにマッピングされ、基礎をなす記憶媒体のキャッシュがフラッシュメモリ媒体を含み、キャッシュ内の変更されたターゲットデータブロックが、キャッシュ内の、最大消去回数を現在有するターゲットデータブロックを含む、変更するステップを行うことが可能にされる機械可読記憶媒体をさらに提供する。   An embodiment of the present invention is a machine-readable storage medium for storing machine-executable instructions, wherein when the machine-executable instructions are executed, the machine caches an underlying storage medium at preset time intervals. Modifying a target data block within the underlying storage medium, wherein at least one data block in the underlying storage medium is mapped to the target data block and one or more data blocks in the underlying storage medium are cached Target data that is mapped to only one target data block in the cache, the underlying storage medium cache contains a flash memory medium, and the modified target data block in the cache currently has the maximum number of erases in the cache It is possible to carry out changing steps, including blocks Further provides a machine-readable storage medium.

この方法は、以下のステップ、すなわち、1つの切替え周期の後でキャッシュ内のターゲットデータブロックの消去回数が互いに近接するように、基礎をなす記憶媒体内の少なくとも1個のデータブロックがマッピングされる、キャッシュ内のターゲットデータブロックを、1つの切替え周期のそれぞれの切替え期間に変更するステップであって、1つの切替え周期内に含まれる切替え期間の数がキャッシュ内に含まれたターゲットデータブロックの数N以上である、変更するステップをさらに含むことが可能である。   The method maps at least one data block in the underlying storage medium such that the number of erasures of the target data block in the cache are close to each other after the following steps: one switching period The step of changing the target data block in the cache to each switching period of one switching cycle, wherein the number of switching periods included in one switching cycle is the number of target data blocks included in the cache It may further include a changing step that is greater than or equal to N.

この方法は、以下のステップ、すなわち、基礎をなす記憶媒体内のそれぞれのデータブロックが1つの切替え周期の異なる切替え期間にキャッシュ内の異なるターゲットデータブロックにマッピングされるように、基礎をなす記憶媒体内のそれぞれのデータブロックがマッピングされる、キャッシュ内のターゲットデータブロックを、1つの切替え周期のそれぞれの切替え期間に変更するステップであって、1つの切替え周期内に含まれる切替え期間の数がキャッシュ内に含まれたターゲットデータブロックの数Nに等しい、変更するステップをさらに含むことが可能である。   The method includes the following steps: an underlying storage medium such that each data block in the underlying storage medium is mapped to a different target data block in the cache during different switching periods of one switching period The target data block in the cache to which each data block in the cache is mapped is changed to each switching period of one switching period, and the number of switching periods included in one switching period is the cache. It may further comprise a changing step equal to the number N of target data blocks contained within.

上で説明された送信ステップは、以下のステップ、すなわち、キャッシュ内のターゲットデータブロックの数列に従って、キャッシュ内のそれぞれのターゲットデータブロックのデータを、1つの切替え周期のそれぞれの切替え期間に、ラウンドロビン様式で、ターゲットデータブロックの数に隣り合う数を有するターゲットデータブロックに移動させるステップと、ターゲットデータブロック内のデータの移動に応じて、基礎をなす記憶媒体内のそれぞれのデータブロックがマッピングされるターゲットデータブロックをそれに応じて変更するステップとをさらに含むことが可能である。   The transmission step described above consists of round-robin the data of each target data block in the cache in each switching period of one switching cycle according to the following steps: a sequence of target data blocks in the cache. In the manner, each data block in the underlying storage medium is mapped in accordance with the step of moving to a target data block having a number adjacent to the number of target data blocks and the movement of data in the target data block And further modifying the target data block accordingly.

上で説明された検出ステップは、以下のステップ、すなわち、キャッシュ内の、最大消去回数を現在有するターゲットデータブロック内にキャッシュされているデータを、1つの切替え周期のそれぞれの切替え期間に、最大消去回数を有するターゲットデータブロック以外の、キャッシュ内のターゲットデータブロック内にキャッシュされているデータと交換するステップであって、後者のターゲットデータブロック内のデータが現在の切替え周期に最小回数だけ交換され、前記後者のターゲットデータブロックが、現在の切替え周期の前の切替え期間において、最大消費回数を現在有するターゲットデータブロックとデータを交換するターゲットデータブロックとは異なる、交換するステップと、基礎をなす記憶媒体内の対応するデータブロックがマッピングされるターゲットデータブロックをそれに応じて変更するステップとをさらに含むことが可能であり、1つの切替え周期はN×(N-1)個の切替え期間を含み、1つの切替え周期において、キャッシュのそれぞれのターゲットデータブロックは、異なるN-1個の切替え期間において、キャッシュ内の、最大消去回数を有するターゲットデータブロックである。   The detection step described above consists of the following steps: erasing the data cached in the target data block that currently has the maximum number of erasures in each switching period of one switching period. Replacing the data cached in the target data block in the cache other than the target data block having a number of times, the data in the latter target data block being exchanged a minimum number of times in the current switching period, The latter target data block is different from the target data block that exchanges data with the target data block that currently has the maximum number of consumptions in the switching period before the current switching cycle, and the underlying storage medium Corresponding data block in And changing the target data block to which the mapping is mapped accordingly, wherein one switching period includes N × (N−1) switching periods, and in one switching period Each target data block in the cache is a target data block having the maximum number of erases in the cache in different N-1 switching periods.

本発明のある実施形態は、機械実行可能命令を記憶するための機械可読記憶媒体であって、機械実行可能命令が実行されるとき、機械が、基礎をなす記憶媒体のキャッシュ内のそれぞれのターゲットデータブロックの消去回数を監視するステップであって、基礎をなす記憶媒体内の1個または複数のデータブロックがキャッシュ内の1個のターゲットデータブロックだけにマッピングされ、基礎をなす記憶媒体のキャッシュがフラッシュメモリ媒体を含む、監視するステップと、キャッシュ内の、最大消去回数を有するターゲットデータブロックと最小消去回数を有するターゲットデータブロックとの間の消去回数の差がプリセットされた消去しきい値に達したとき、基礎をなす記憶媒体内の少なくとも1個のデータブロックがマッピングされる、キャッシュ内のターゲットデータブロックを変更するステップであって、キャッシュ内の変更されたターゲットデータブロックが、キャッシュ内の、最大消去回数を現在有するターゲットデータブロックを含む、変更するステップと、キャッシュ内のそれぞれのターゲットデータブロックが変更された後で生成される消去回数を継続的に監視するステップとを実行することが可能にされる機械可読記憶媒体をさらに提供する。   An embodiment of the present invention is a machine-readable storage medium for storing machine-executable instructions, wherein when the machine-executable instructions are executed, each machine in the cache of the underlying storage medium Monitoring the number of times data blocks are erased, wherein one or more data blocks in the underlying storage medium are mapped to only one target data block in the cache, and the underlying storage medium cache is The monitoring step, including the flash memory medium, and the erase count difference between the target data block with the maximum erase count and the target data block with the minimum erase count in the cache reach a preset erase threshold. At least one data block in the underlying storage medium is mapped Modifying a target data block in the cache, wherein the modified target data block in the cache includes a target data block in the cache that currently has the maximum number of erasures, and each in the cache Further providing a machine-readable storage medium capable of performing the step of continuously monitoring the number of erasures generated after the target data block has been modified.

この方法は、以下のステップ、すなわち、最大消去回数を有するターゲットデータブロック内にキャッシュされているデータを、最小消去回数を有するターゲットデータブロック内にキャッシュされているデータと交換するステップと、基礎をなす記憶媒体内の、最大消去回数を有するターゲットデータブロックに現在マッピングされているすべてのデータブロックが最小消去回数を有するターゲットデータブロックにマッピングされ、基礎をなす記憶媒体内の、最小消去回数を有するターゲットデータブロックに現在マッピングされているすべてのデータブロックが最大消去回数を有するターゲットデータブロックにマッピングされるように、それに応じて変更を実行するステップとをさらに含むことが可能である。   The method is based on the following steps: exchanging data cached in a target data block having a maximum number of erases with data cached in a target data block having a minimum number of erases, and All data blocks currently mapped to the target data block with the maximum number of erases in the underlying storage medium are mapped to the target data block with the minimum number of erases and have the minimum number of erases in the underlying storage medium And further performing a corresponding change such that all data blocks currently mapped to the target data block are mapped to the target data block having the maximum number of erasures.

本発明の本質から逸脱せずに、本発明の実施形態で開示された方法および装置に様々な修正および変更を行うことが可能であり、これらの修正および変更は本発明の保護範囲に該当することを当業者は理解されたい。したがって、本発明の保護範囲は、添付の請求項を条件とすべきである。   Various modifications and changes may be made to the methods and apparatus disclosed in the embodiments of the present invention without departing from the essence of the present invention, and these modifications and changes fall within the protection scope of the present invention. It should be understood by those skilled in the art. Therefore, the protection scope of the present invention should be subject to the appended claims.

1500 キャッシュシステム、装置
1510 記憶媒体
1520 フラッシュメモリ媒体
1530 プロセッサ
1500 cash system, equipment
1510 Storage media
1520 Flash memory media
1530 processor

第3の期間が終了するとき、フラッシュメモリ媒体内の、最大消去回数を現在有するターゲットデータブロック2内にキャッシュされている有効データはターゲットデータブロック0に移動され、ターゲットデータブロック0内に現在キャッシュされている有効データはターゲットデータブロック2に移動される。キャッシュ内のデータの移動の後で、ターゲットデータブロック内のデータの移動に応じて、ハードディスク内のデータブロック0とデータブロック3とがマッピングされる、キャッシュ内のターゲットデータブロックと、ハードディスク内のデータブロック1とデータブロック4とがマッピングされる、キャッシュ内のターゲットデータブロックとがそれに応じて変更される。この移動の後で、修正によって取得されるマッピング関係が図9に示される。この時点で、最も頻繁にアクセスされる、ハードディスク内のデータブロック0とデータブロック3とがターゲットデータブロック0にマッピングされる。 At the end of the third period, valid data cached in the target data block 2 that currently has the maximum number of erases in the flash memory medium is moved to the target data block 0 and is cached in the target data block 0. The valid data being moved is moved to the target data block 2. Target data block in cache and data in hard disk, where data block 0 and data block 3 in hard disk are mapped according to data movement in target data block after data movement in cache The target data block in the cache to which block 1 and data block 4 are mapped is changed accordingly . After this move, the mapping relationship obtained by modification is shown in FIG. At this point, data block 0 and data block 3 in the hard disk that are accessed most frequently are mapped to target data block 0.

第4の期間が終了するとき、フラッシュメモリ媒体内の、最大消去回数を現在有するターゲットデータブロック0内にキャッシュされている有効データはターゲットデータブロック1に移動され、ターゲットデータブロック1内に現在キャッシュされている有効データはターゲットデータブロック0に移動される。キャッシュ内のデータの移動の後で、ターゲットデータブロック内のデータに移動に応じて、ハードディスク内のデータブロック0とデータブロック3とがマッピングされる、キャッシュ内のターゲットデータブロックと、ハードディスク内のデータブロック2とデータブロック5とがマッピングされる、キャッシュ内のターゲットデータブロックとがそれに応じて変更される。この移動の後で、修正によって取得されたマッピング関係が図10に示される。この時点で、最も頻繁にアクセスされる、ハードディスク内のデータブロック0とデータブロック3とがターゲットデータブロック1にマッピングされる。 When the fourth period ends, valid data cached in the target data block 0 that currently has the maximum number of erases in the flash memory medium is moved to the target data block 1 and is cached in the target data block 1 The valid data being moved is moved to the target data block 0. The target data block in the cache and the data in the hard disk, where data block 0 and data block 3 in the hard disk are mapped according to the movement to the data in the target data block after the data in the cache is moved The target data block in the cache to which block 2 and data block 5 are mapped is changed accordingly . After this move, the mapping relationship obtained by modification is shown in FIG. At this point, data block 0 and data block 3 in the hard disk, which are accessed most frequently, are mapped to target data block 1.

第5の期間が終了するとき、フラッシュメモリ媒体内の、最大消去回数を現在有するターゲットデータブロック1内にキャッシュされている有効データはターゲットデータブロック2に移動され、ターゲットデータブロック2内に現在キャッシュされている有効データはターゲットデータブロック1に移動される。キャッシュ内のデータの移動の後で、ターゲットデータブロック内のデータの移動に応じて、ハードディスク内のデータブロック0とデータブロック3とがマッピングされる、キャッシュ内のターゲットデータブロックと、ハードディスク内のデータブロック1とデータブロック4とがマッピングされる、キャッシュ内のターゲットデータブロックとがそれに応じて変更される。この移動の後で、修正によって取得されたマッピング関係が図11に示される。この時点で、最も頻繁にアクセスされる、ハードディスク内のデータブロック0とデータブロック3とがターゲットデータブロック2にマッピングされる。 When the fifth period ends, valid data cached in the target data block 1 that currently has the maximum number of erases in the flash memory medium is moved to the target data block 2 and is cached in the target data block 2 The valid data being moved is moved to the target data block 1. Target data block in cache and data in hard disk, where data block 0 and data block 3 in hard disk are mapped according to data movement in target data block after data movement in cache The target data block in the cache to which block 1 and data block 4 are mapped is changed accordingly . After this move, the mapping relationship obtained by modification is shown in FIG. At this point, data block 0 and data block 3 in the hard disk, which are accessed most frequently, are mapped to target data block 2.

第6の期間が終了するとき、フラッシュメモリ媒体内の、最大消去回数を現在有するターゲットデータブロック2内にキャッシュされている有効データはターゲットデータブロック0に移動され、ターゲットデータブロック0内に現在キャッシュされている有効データはターゲットデータブロック2に移動される。キャッシュ内のデータの移動の後で、ターゲットデータブロック内のデータの移動に応じて、ハードディスク内のデータブロック0とデータブロック3とがマッピングされる、キャッシュ内のターゲットデータブロックと、ハードディスク内のデータブロック2とデータブロック5とがマッピングされる、キャッシュ内のターゲットデータブロックとがそれに応じて変更される。この移動の後で、修正によって取得されたマッピング関係が図6に示される。この時点で、1つの切替え周期が終了し、図6から、次の切替え周期が図6から図11に示される切替え順序に従って継続的に実行される。 At the end of the sixth period, valid data cached in the target data block 2 that currently has the maximum number of erases in the flash memory medium is moved to the target data block 0 and is now cached in the target data block 0. The valid data being moved is moved to the target data block 2. Target data block in cache and data in hard disk, where data block 0 and data block 3 in hard disk are mapped according to data movement in target data block after data movement in cache The target data block in the cache to which block 2 and data block 5 are mapped is changed accordingly . After this move, the mapping relationship obtained by modification is shown in FIG. At this point, one switching cycle ends, and from FIG. 6, the next switching cycle is continuously executed according to the switching order shown in FIGS.

Claims (15)

キャッシュマッピングを制御するための方法であって、
プリセット時間間隔で、基礎をなす記憶媒体のキャッシュ内のターゲットデータブロックを変更するステップを具備し、
前記基礎をなす記憶媒体内の少なくとも1個のデータブロックが前記ターゲットデータブロックにマッピングされ、
前記基礎をなす記憶媒体内の1個または複数のデータブロックが前記キャッシュ内の1個のターゲットデータブロックだけにマッピングされ、
前記基礎をなす記憶媒体の前記キャッシュがフラッシュメモリ媒体を含み、
前記キャッシュ内の前記変更されたターゲットデータブロックが、前記キャッシュ内の、最大消去回数を現在有するターゲットデータブロックを含むことを特徴とする方法。
A method for controlling cache mapping, comprising:
Changing the target data block in the cache of the underlying storage medium at a preset time interval;
At least one data block in the underlying storage medium is mapped to the target data block;
One or more data blocks in the underlying storage medium are mapped to only one target data block in the cache;
The cache of the underlying storage medium includes a flash memory medium;
The method, wherein the modified target data block in the cache includes a target data block in the cache that currently has a maximum number of erases.
プリセット時間間隔で、基礎をなす記憶媒体のキャッシュ内のターゲットデータブロックを変更する前記ステップであって、前記基礎をなす記憶媒体内の少なくとも1個のデータブロックが前記ターゲットデータブロックにマッピングされる、前記ステップが、
1つの切替え周期の後で、前記キャッシュ内のターゲットデータブロックの消去回数が互いに近接するように、前記基礎をなす記憶媒体内の少なくとも1個のデータブロックがマッピングされる、前記キャッシュ内のターゲットデータブロックを、前記1つの切替え周期のそれぞれの切替え期間に変更するステップであって、前記1つの切替え周期内に含まれる切替え期間の数が前記キャッシュ内に含まれた前記ターゲットデータブロックの数N以上である、変更するステップ
を含む、請求項1に記載の方法。
Changing a target data block in a cache of an underlying storage medium at a preset time interval, wherein at least one data block in the underlying storage medium is mapped to the target data block; Said step is
Target data in the cache to which at least one data block in the underlying storage medium is mapped such that the number of erasures of the target data block in the cache is close to each other after one switching period Changing the block to each switching period of the one switching period, wherein the number of switching periods included in the one switching period is equal to or greater than the number N of the target data blocks included in the cache The method of claim 1, comprising the step of modifying.
プリセット時間間隔で、基礎をなす記憶媒体のキャッシュ内のターゲットデータブロックを変更する前記ステップであって、前記基礎をなす記憶媒体内の少なくとも1個のデータブロックが前記ターゲットデータブロックにマッピングされる、前記ステップは、
前記基礎をなす記憶媒体内のそれぞれのデータブロックが、1つの切替え周期の異なる切替え期間に前記キャッシュ内の異なるターゲットデータブロックにマッピングされるように、前記基礎をなす記憶媒体内のそれぞれのデータブロックがマッピングされる前記キャッシュ内のターゲットデータブロックを、1つの切替え周期のそれぞれの切替え期間において、変更するステップを具備し、
1つの切替え周期内に含まれる切替え期間の数が前記キャッシュ内に含まれた前記ターゲットデータブロックの数Nに等しいことを特徴とする請求項1に記載の方法。
Changing a target data block in a cache of an underlying storage medium at a preset time interval, wherein at least one data block in the underlying storage medium is mapped to the target data block; The step includes
Each data block in the underlying storage medium such that each data block in the underlying storage medium is mapped to a different target data block in the cache during different switching periods of one switching period. Changing the target data block in the cache to which is mapped in each switching period of one switching period,
2. The method according to claim 1, wherein the number of switching periods included in one switching period is equal to the number N of the target data blocks included in the cache.
前記基礎をなす記憶媒体内のそれぞれのデータブロックがマッピングされる前記キャッシュ内のターゲットデータブロックを、前記1つの切替え周期のそれぞれの切替え期間において、変更する前記ステップが、
前記キャッシュ内の前記ターゲットデータブロックの数列に従って、前記キャッシュ内のそれぞれのターゲットデータブロックのデータを、1つの切替え周期のそれぞれの切替え期間に、ラウンドロビン様式で、前記ターゲットデータブロックの数に隣り合う数を有するターゲットデータブロックに移動させるステップと、前記ターゲットデータブロック内のデータの移動に応じて、前記基礎をなす記憶媒体内のそれぞれのデータブロックがマッピングされるターゲットデータブロックをそれに応じて変更するステップと、
を含むことを特徴とする請求項3に記載の方法。
Changing the target data block in the cache to which each data block in the underlying storage medium is mapped in each switching period of the one switching period;
According to the sequence of the target data blocks in the cache, the data of each target data block in the cache is adjacent to the number of the target data blocks in a round robin manner in each switching period of one switching period. Moving to a target data block having a number, and changing the target data block to which each data block in the underlying storage medium is mapped according to the movement of the data in the target data block Steps,
4. The method of claim 3, comprising:
プリセット時間間隔で、基礎をなす記憶媒体のキャッシュ内のターゲットデータブロックを変更する前記ステップであって、前記基礎をなす記憶媒体内の少なくとも1個のデータブロックが前記ターゲットデータブロックにマッピングされる、前記ステップは、
前記キャッシュ内における最大消去回数を現在有するターゲットデータブロック内にキャッシュされているデータを、1つの切替え周期のそれぞれの切替え期間に、前記最大消去回数を有するターゲットデータブロック以外の、前記キャッシュ内のターゲットデータブロック内にキャッシュされているデータと交換するステップであって、後者のターゲットデータブロック内の前記データは、現在の切替え周期内において最小回数だけ交換され、前記後者のターゲットデータブロックは、前記現在の切替え周期の前の切替え期間において、前記最大消去回数を現在有する前記ターゲットデータブロックとデータを交換するターゲットデータブロックとは異なる、交換するステップと、
前記基礎をなす記憶媒体内の対応するデータブロックがマッピングされるターゲットデータブロックをそれに応じて変更するステップと、
を含み、
前記1つの切替え周期は、N×(N-1)個の切替え期間を含み、
前記1つの切替え周期において、前記キャッシュのそれぞれのターゲットデータブロックは、異なるN-1個の切替え期間において、前記キャッシュ内における前記最大消去回数を有するターゲットデータブロックであることを特徴とする請求項1に記載の方法。
Changing a target data block in a cache of an underlying storage medium at a preset time interval, wherein at least one data block in the underlying storage medium is mapped to the target data block; The step includes
Data cached in a target data block that currently has the maximum number of erases in the cache is replaced with a target in the cache other than the target data block having the maximum number of erases in each switching period of one switching cycle. Exchanging with data cached in a data block, wherein the data in the latter target data block is exchanged a minimum number of times within a current switching period, the latter target data block being Replacing a target data block that exchanges data with the target data block that currently has the maximum number of erasures in a switching period before the switching cycle of:
Changing accordingly the target data block to which the corresponding data block in the underlying storage medium is mapped;
Including
The one switching cycle includes N × (N-1) switching periods,
2. The target data block of the cache in the one switching period is a target data block having the maximum number of erasures in the cache in different N−1 switching periods. The method described in 1.
キャッシュマッピングを制御するための方法であって、
基礎をなす記憶媒体のキャッシュ内のそれぞれのターゲットデータブロックの消去回数を監視するステップであって、前記基礎をなす記憶媒体内の1個または複数のデータブロックが前記キャッシュ内の1個のターゲットデータブロックだけにマッピングされ、前記基礎をなす記憶媒体の前記キャッシュがフラッシュメモリ媒体を含む、監視するステップと、
前記キャッシュ内の、最大消去回数を有するターゲットデータブロックと最小消去回数を有するターゲットデータブロックとの間の前記消去回数の差がプリセットされた消去しきい値に達したとき、前記基礎をなす記憶媒体内の少なくとも1個のデータブロックがマッピングされる、前記キャッシュ内のターゲットデータブロックを変更するステップであって、前記キャッシュ内の前記変更されたターゲットデータブロックが、前記キャッシュ内の、前記最大消去回数を現在有するターゲットデータブロックを含む、変更するステップと、
前記キャッシュ内のそれぞれのターゲットデータブロックが変更された後で生成される前記消去回数を継続的に監視するステップと
を含む方法。
A method for controlling cache mapping, comprising:
Monitoring the number of erasures of each target data block in a cache of an underlying storage medium, wherein one or more data blocks in the underlying storage medium are one target data in the cache Monitoring, wherein only the block is mapped and the cache of the underlying storage medium includes a flash memory medium;
The underlying storage medium when the difference in the erase count between the target data block having the maximum erase count and the target data block having the minimum erase count in the cache reaches a preset erase threshold Changing the target data block in the cache to which at least one data block in the cache is mapped, wherein the changed target data block in the cache is the maximum number of erasures in the cache. Including a target data block that currently has
Continuously monitoring the number of erasures generated after each target data block in the cache is modified.
前記基礎をなす記憶媒体内の少なくとも1個のデータブロックがマッピングされる、前記キャッシュ内のターゲットデータブロックを変更する前記ステップが、
前記最大消去回数を有する前記ターゲットデータブロック内にキャッシュされているデータを、前記最小消去回数を有する前記ターゲットデータブロック内にキャッシュされているデータと交換するステップと、前記基礎をなす記憶媒体内の、前記最大消去回数を有する前記ターゲットデータブロックに現在マッピングされているすべてのデータブロックが前記最小消去回数を有する前記ターゲットデータブロックにマッピングされ、前記基礎をなす記憶媒体内の、前記最小消去回数を有する前記ターゲットデータブロックに現在マッピングされているすべてのデータブロックが前記最大消去回数を有する前記ターゲットデータブロックにマッピングされるように、それに応じて変更を実行するステップと
を含む、請求項6に記載の方法。
Changing the target data block in the cache to which at least one data block in the underlying storage medium is mapped;
Exchanging data cached in the target data block having the maximum number of erases with data cached in the target data block having the minimum number of erases, in the underlying storage medium; All data blocks currently mapped to the target data block having the maximum erase count are mapped to the target data block having the minimum erase count, and the minimum erase count in the underlying storage medium is Performing a change accordingly such that all data blocks currently mapped to the target data block having are mapped to the target data block having the maximum number of erasures. the method of.
基礎をなす記憶媒体と、
前記基礎をなす記憶媒体に結合され、かつ前記基礎をなす記憶媒体のキャッシュとして機能するフラッシュメモリ媒体であって、前記基礎をなす記憶媒体内の1個または複数のデータブロックが前記キャッシュ内の1個のターゲットデータブロックだけにマッピングされる、フラッシュメモリ媒体と、
プリセット時間間隔で、前記基礎をなす記憶媒体の前記キャッシュ内のターゲットデータブロックを変更するように構成されているプロセッサと、
を具備し、
前記基礎をなす記憶媒体内の少なくとも1個のデータブロックが、前記ターゲットデータブロックにマッピングされ、
前記キャッシュ内の前記変更されたターゲットデータブロックが、前記キャッシュ内の、最大消去回数を現在有するターゲットデータブロックを具備することを特徴とするキャッシュシステム。
The underlying storage medium,
A flash memory medium coupled to the underlying storage medium and functioning as a cache for the underlying storage medium, wherein one or more data blocks in the underlying storage medium are stored in the cache. A flash memory medium that is mapped to only one target data block;
A processor configured to change a target data block in the cache of the underlying storage medium at preset time intervals;
Comprising
At least one data block in the underlying storage medium is mapped to the target data block;
The cache system, wherein the modified target data block in the cache comprises a target data block in the cache that currently has a maximum number of erases.
前記プロセッサが、
1つの切替え周期の後で、前記キャッシュ内のターゲットデータブロックの消去回数が互いに近接するように、前記基礎をなす記憶媒体内の少なくとも1個のデータブロックがマッピングされる、前記キャッシュ内のターゲットデータブロックを、前記1つの切替え周期のそれぞれの切替え期間に変更するステップであって、前記1つの切替え周期内に含まれる切替え期間の数が前記キャッシュ内に含まれた前記ターゲットデータブロックの数N以上である、変更するステップ
を行うようにさらに構成された、請求項8に記載のキャッシュシステム。
The processor is
Target data in the cache to which at least one data block in the underlying storage medium is mapped such that the number of erasures of the target data block in the cache is close to each other after one switching period Changing the block to each switching period of the one switching period, wherein the number of switching periods included in the one switching period is equal to or greater than the number N of the target data blocks included in the cache 9. The cache system of claim 8, further configured to perform the modifying step.
前記プロセッサは、
前記基礎をなす記憶媒体内のそれぞれのデータブロックが1つの切替え周期の異なる切替え期間に前記キャッシュ内の異なるターゲットデータブロックにマッピングされるように、前記基礎をなす記憶媒体内のそれぞれのデータブロックがマッピングされる前記キャッシュ内のターゲットデータブロックを、前記1つの切替え周期のそれぞれの切替え期間に変更するようにさらに構成され、
前記1つの切替え周期内に含まれる切替え期間の数が、前記キャッシュ内に含まれた前記ターゲットデータブロックの数Nに等しいことを特徴とする請求項8に記載のキャッシュシステム。
The processor is
Each data block in the underlying storage medium is mapped to a different target data block in the cache in a different switching period of one switching period so that each data block in the underlying storage medium is mapped to a different target data block in the cache. Further configured to change the target data block in the cache to be mapped to each switching period of the one switching period;
9. The cache system according to claim 8, wherein the number of switching periods included in the one switching period is equal to the number N of the target data blocks included in the cache.
前記プロセッサは、
前記キャッシュ内の前記ターゲットデータブロックの数列に従って、前記キャッシュ内のそれぞれのターゲットデータブロックのデータを、前記1つの切替え周期のそれぞれの切替え期間に、ラウンドロビン様式で、前記ターゲットデータブロックの数に隣り合う数を有するターゲットデータブロックに移動させるようにさらに構成され、
前記ターゲットデータブロック内のデータの移動に応じて、前記基礎をなす記憶媒体内のそれぞれのデータブロックがマッピングされるターゲットデータブロックをそれに応じて変更することを特徴とする請求項10に記載のキャッシュシステム。
The processor is
According to the sequence of the target data blocks in the cache, the data of each target data block in the cache is adjacent to the number of target data blocks in a round robin manner in each switching period of the one switching period. Further configured to move to a target data block having a matching number,
11. The cache according to claim 10, wherein in response to movement of data in the target data block, a target data block to which each data block in the underlying storage medium is mapped is changed accordingly. system.
前記プロセッサは、
前記キャッシュ内の、最大消去回数を現在有するターゲットデータブロック内にキャッシュされているデータを、1つの切替え周期のそれぞれの切替え期間に、前記最大消去回数を有するターゲットデータブロック以外の、前記キャッシュ内のターゲットデータブロック内にキャッシュされているデータと交換し、後者のターゲットデータブロック内の前記データは、現在の切替え周期において最小回数だけ交換され、前記後者のターゲットデータブロックは、前記現在の切替え周期の前の切替え期間内において、前記最大消去回数を現在有する前記ターゲットデータブロックとデータを交換するターゲットデータブロックとは異なっており、
前記基礎をなす記憶媒体内の対応するデータブロックがマッピングされるターゲットデータブロックをそれに応じて変更する
ようにさらに構成され、
前記1つの切替え周期がN×(N-1)個の切替え期間を含み、
前記1つの切替え周期において、前記キャッシュのそれぞれのターゲットデータブロックは、異なるN-1個の切替え期間において、前記キャッシュ内における前記最大消去回数を有するターゲットデータブロックであることを特徴とする請求項6に記載のキャッシュシステム。
The processor is
Data cached in the target data block currently having the maximum number of erasures in the cache is stored in the cache other than the target data block having the maximum number of erasures in each switching period of one switching cycle. Exchanging with data cached in the target data block, the data in the latter target data block being exchanged a minimum number of times in the current switching period, the latter target data block being In the previous switching period, the target data block that exchanges data with the target data block that currently has the maximum number of erasures is different,
Further configured to change accordingly the target data block to which the corresponding data block in the underlying storage medium is mapped,
The one switching cycle includes N × (N-1) switching periods,
In the one switching cycle, each target data block of the cache is different in the N-1 switching period, claim, characterized in that said a target data block having the maximum number of erasures in the cache 6 The cache system described in.
基礎をなす記憶媒体と、
前記基礎をなす記憶媒体に結合され、かつ前記基礎をなす記憶媒体のキャッシュとして機能するフラッシュメモリ媒体であって、前記基礎をなす記憶媒体内の1個または複数のデータブロックが前記キャッシュ内の1個のターゲットデータブロックだけにマッピングされる、フラッシュメモリ媒体と、
前記キャッシュ内のそれぞれのターゲットデータブロックの消去回数を監視するステップと、
前記キャッシュ内の、最大消去回数を有するターゲットデータブロックと最小消去回数を有するターゲットデータブロックとの間の前記消去回数の差がプリセットされた消去しきい値に達したとき、前記基礎をなす記憶媒体内の少なくとも1個のデータブロックがマッピングされる、前記キャッシュ内のターゲットデータブロックを変更するステップであって、前記キャッシュ内の前記変更されたターゲットデータブロックが、前記キャッシュ内の、前記最大消去回数を現在有するターゲットデータブロックを含む、変更するステップと、
前記キャッシュ内のそれぞれのターゲットデータブロックが変更された後で生成される前記消去回数を継続的に監視するステップと
を行うように構成されたプロセッサと
を含むキャッシュシステム。
The underlying storage medium,
A flash memory medium coupled to the underlying storage medium and functioning as a cache for the underlying storage medium, wherein one or more data blocks in the underlying storage medium are stored in the cache. A flash memory medium that is mapped to only one target data block;
Monitoring the number of erases of each target data block in the cache;
The underlying storage medium when the difference in the erase count between the target data block having the maximum erase count and the target data block having the minimum erase count in the cache reaches a preset erase threshold Changing the target data block in the cache to which at least one data block in the cache is mapped, wherein the changed target data block in the cache is the maximum number of erasures in the cache. Including a target data block that currently has
A processor configured to continuously monitor the number of erases generated after each target data block in the cache has been modified.
前記プロセッサが、
前記最大消去回数を有する前記ターゲットデータブロック内にキャッシュされているデータを、前記最小消去回数を有する前記ターゲットデータブロック内にキャッシュされているデータと交換するステップと、前記基礎をなす記憶媒体内の、前記最大消去回数を有する前記ターゲットデータブロックに現在マッピングされているすべてのデータブロックが前記最小消去回数を有する前記ターゲットデータブロックにマッピングされ、前記基礎をなす記憶媒体内の、前記最小消去回数を有する前記ターゲットデータブロックに現在マッピングされているすべてのデータブロックが前記最大消去回数を有する前記ターゲットデータブロックにマッピングされるように、それに応じて変更を実行するステップと
を行うようにさらに構成された、請求項13に記載のキャッシュシステム。
The processor is
Exchanging data cached in the target data block having the maximum number of erases with data cached in the target data block having the minimum number of erases, in the underlying storage medium; All data blocks currently mapped to the target data block having the maximum erase count are mapped to the target data block having the minimum erase count, and the minimum erase count in the underlying storage medium is And further performing a change accordingly, such that all data blocks currently mapped to the target data block having are mapped to the target data block having the maximum number of erasures , Contract Cache system according to claim 13.
機械実行可能命令を記憶するための機械可読記憶媒体であって、前記機械実行可能命令が実行されるとき、機械が、請求項1から7のいずれか一項のステップを実行することが可能にされる、機械可読記憶媒体。   A machine-readable storage medium for storing machine-executable instructions, wherein when the machine-executable instructions are executed, the machine can execute the steps of any one of claims 1 to 7 A machine-readable storage medium.
JP2014531069A 2011-10-27 2011-10-27 Method and buffer system for controlling buffer mapping Pending JP2014530422A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014531069A JP2014530422A (en) 2011-10-27 2011-10-27 Method and buffer system for controlling buffer mapping

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014531069A JP2014530422A (en) 2011-10-27 2011-10-27 Method and buffer system for controlling buffer mapping

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2014059606A Division JP5950470B2 (en) 2014-03-24 2014-03-24 Method and buffer system for controlling buffer mapping

Publications (1)

Publication Number Publication Date
JP2014530422A true JP2014530422A (en) 2014-11-17

Family

ID=51942489

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014531069A Pending JP2014530422A (en) 2011-10-27 2011-10-27 Method and buffer system for controlling buffer mapping

Country Status (1)

Country Link
JP (1) JP2014530422A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016507847A (en) * 2013-02-21 2016-03-10 クアルコム,インコーポレイテッド Inter-set wear leveling for caches with limited write endurance
JP2016510475A (en) * 2013-02-19 2016-04-07 クアルコム,インコーポレイテッド Method and apparatus for intraset wear leveling for memory with limited write endurance
KR20210013870A (en) * 2019-07-29 2021-02-08 에스케이하이닉스 주식회사 Memory system for data swap and method operating thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07503564A (en) * 1992-05-12 1995-04-13 インターナシヨナル・ビジネス・マシーンズ・コーポレーシヨン Method and apparatus for reducing memory wear in computer systems
US20090103203A1 (en) * 2007-10-22 2009-04-23 Fujitsu Limited Recording apparatus and control circuit
US20100064111A1 (en) * 2008-09-09 2010-03-11 Kabushiki Kaisha Toshiba Information processing device including memory management device managing access from processor to memory and memory management method
WO2011007599A1 (en) * 2009-07-17 2011-01-20 株式会社 東芝 Memory management device
JP2011022933A (en) * 2009-07-17 2011-02-03 Toshiba Corp Information processing apparatus including memory management device, and memory management method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07503564A (en) * 1992-05-12 1995-04-13 インターナシヨナル・ビジネス・マシーンズ・コーポレーシヨン Method and apparatus for reducing memory wear in computer systems
US20090103203A1 (en) * 2007-10-22 2009-04-23 Fujitsu Limited Recording apparatus and control circuit
JP2009104687A (en) * 2007-10-22 2009-05-14 Fujitsu Ltd Storage device and control circuit
US20100064111A1 (en) * 2008-09-09 2010-03-11 Kabushiki Kaisha Toshiba Information processing device including memory management device managing access from processor to memory and memory management method
WO2011007599A1 (en) * 2009-07-17 2011-01-20 株式会社 東芝 Memory management device
JP2011022933A (en) * 2009-07-17 2011-02-03 Toshiba Corp Information processing apparatus including memory management device, and memory management method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016510475A (en) * 2013-02-19 2016-04-07 クアルコム,インコーポレイテッド Method and apparatus for intraset wear leveling for memory with limited write endurance
JP2016507847A (en) * 2013-02-21 2016-03-10 クアルコム,インコーポレイテッド Inter-set wear leveling for caches with limited write endurance
KR20210013870A (en) * 2019-07-29 2021-02-08 에스케이하이닉스 주식회사 Memory system for data swap and method operating thereof
KR102322727B1 (en) * 2019-07-29 2021-11-05 에스케이하이닉스 주식회사 Memory system for data swap and method operating thereof

Similar Documents

Publication Publication Date Title
RU2556459C1 (en) Method to control cache display and cache system
KR101437123B1 (en) Memory system and wear leveling method thereof
US9189420B2 (en) Wear-leveling method, storage device, and information system
KR101257691B1 (en) Memory controller and data management method
CN104216665B (en) The memory management method of multilevel-cell solid state hard disc
KR101726824B1 (en) Efficient Use of Hybrid Media in Cache Architectures
TW201945921A (en) Workload-adaptive overprovisioning in solid state storage drive arrays
US8966204B2 (en) Data migration between memory locations
CN109542354B (en) Wear leveling method, device and equipment based on upper limit erasure
JP6711121B2 (en) Information processing apparatus, cache memory control method, and cache memory control program
CN108897492B (en) Data writing method and device
US11188261B2 (en) Memory controllers for solid-state storage devices
Liu et al. A block-level flash memory management scheme for reducing write activities in PCM-based embedded systems
EP3425513A1 (en) Cache management method and apparatus for non-volatile storage device
TW201824010A (en) Information processing device and memory access method
JP2014530422A (en) Method and buffer system for controlling buffer mapping
JP4829202B2 (en) Storage device and memory control method
JP5950470B2 (en) Method and buffer system for controlling buffer mapping
JP5594647B2 (en) Storage apparatus and control method thereof
Chen et al. Refinery swap: An efficient swap mechanism for hybrid DRAM–NVM systems
CN105205015A (en) Data storage method and storage equipment
CN108572924B (en) Request processing method of 3D MLC flash memory device
JP2011022963A (en) Information processing apparatus and information processing method
KR101718888B1 (en) Memory system and garbage collection method thereof
KR20170119305A (en) Hybrid memory system and page placement method in mobile device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150312

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150414

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150901