×

Method for performing static wear leveling on flash memory

  • US 8,700,839 B2
  • Filed: 12/21/2007
  • Issued: 04/15/2014
  • Est. Priority Date: 12/28/2006
  • Status: Active Grant
First Claim
Patent Images

1. A method for performing a static wear leveling on a flash memory, which is performed by at least one static wear leveling unit linked to a block reclamation unit of either a flash translation layer or a native file system having a memory management unit, wherein the block reclamation unit is linked to the flash memory for performing a leveling operation on a physical block of the flash memory, the method comprising the steps of:

  • (A) defining a block leveling table whose fields are used for traces of block leveling cycles of the physical block of the flash memory, then proceeding to step (B);

    (B) examining if an access command has been received from at least one of the flash translation layer and the native file system, wherein if the access command is received, proceeding to step (M), and otherwise, proceeding to step (C);

    (C) examining if a distribution status of the block leveling cycles concentrates block leveling cycles in excess of a premeditated threshold, wherein if the distribution status concentrates block leveling cycles to be in excess of the premeditated threshold, proceeding to step (D), and if the distribution status is smaller than the premeditated threshold, proceeding to step (M);

    (D) requesting the block reclamation unit of either the flash translation layer or the native file system to force leveling of the physical block corresponding to a field whose value appears 0 in the block leveling table, proceeding to step (E);

    (E) adding 1 into the field of the block leveling table whose value appears 0 and performing a maintaining operation, wherein the maintaining operation of the step (E) further comprises the steps of;

    (E1) notifying the static wear leveling unit for leveling the physical block which is to be leveled by using at least one of the block reclamation unit of the flash translation layer and the native file system;

    (E2) identifying if the field value corresponding to the physical block in the block leveling table reaches a maximum value by examining if the field value in the physical block of the block leveling table appears 0, wherein if the maximum value is not reached, proceeding to step (E3), and if the maximum value is reached, proceeding to step (E4);

    (E3) adding 1 into the field of the block leveling table whose value appears 0 for performing the maintaining operation, and proceeding to step (E4); and

    (E4) finished with the maintaining operation, proceeding to step (F);

    (F) before the block reclamation unit starts to level the physical block of the flash memory, notifying the memory management unit to prohibit access to the flash memory, then proceeding to step (G);

    (G) moving a valid data stored in the physical block which is to be leveled, then proceeding to step (H);

    (H) the block reclamation unit starts to level the physical block whose valid data have been moved out, then proceeds to step (I);

    (I) notifying the memory management unit of a new physical address to which the valid data of the physical block is moved after leveling the physical block for updating a corresponding relationship between the new physical address of the physical block to which the valid data has been moved and a logical address of the valid data, then proceeding to step (J);

    (J) notifying the memory management unit that the physical block is leveled completely, then proceeding to step (K);

    (K) identifying if all values of the fields in the block leveling table appear 1, then proceeding to step (L); and

    (L) performing a recession operation in the block leveling table and then returning to step (B), wherein the recession operation further comprises the steps of;

    (L1) identifying if all values of the fields in the block leveling table appear non-zero, wherein if all values of the fields appear non-zero, proceeding to step (L2), and otherwise, proceeding to step (L3);

    (L2) subtracting the values of the fields of the block leveling table from the value of a minimum field of the block leveling table to achieve the value of the minimum field of the block leveling table appearing 0, and proceeding to step (L3); and

    (L3) finished with the recession operation; and

    (M) finished with the method for performing a static wear leveling.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×