Patent ID: 9009442
Filing Date: 2015-04-14
Classification: G06F

Abstract:
1. A data writing method for a rewritable non-volatile memory module, wherein the rewritable non-volatile memory module includes a plurality of physical blocks, each of the physical blocks includes a plurality of physical pages, the physical blocks are grouped into at least a data area and a spare area, the physical blocks belonging to the data area and the spare area are grouped into a plurality of physical units, the physical units of the spare area are for substituting the physical units of the data area to write data, a plurality of logical units are configured for mapping to the physical units of the data area, and each of the logical units includes a plurality of logical pages, the data writing method comprising: selecting at least one physical unit from the physical units of the spare area as a global random area, wherein the global random area temporarily stores data belonging to a plurality of updated logical pages, and the updated logical pages belong to a plurality of updated logical units among the logical units; building a global random searching table for recording a plurality of updated information corresponding to the updated logical pages in the global random area; receiving a write command and updated data corresponding to the write command, wherein the updated data belongs to a first logical page and the first logical page belongs to a first logical unit among the logical units; determining whether the global random area stores data belonging to the first logical unit; when the global random area does not store the data belonging to the first logical unit, determining whether the number of the updated logical units is smaller than a predetermined number, wherein the predetermined number is smaller than the total number of the logical units; when the number of the updated logical units is smaller than the predetermined number, assigning a first index number for the first logical unit, writing the updated data into the global random area and using the first index number corresponding to the first logical unit to record updated information corresponding to the first logical page in the global random searching table.