Patent ID: 8200890

Claim:
A memory controller for controlling access to one or more flash memories, in which data writing and data reading are performed in physical pages and data erasing is performed in physical blocks each composed of a plurality of physical pages, comprising: a logical page forming unit which forms logical pages each composed of a plurality of logical sectors each assigned a logical address provided from a host system; a data holding unit which has a plurality of unit areas each for holding data corresponding to one logical page; a management unit which manages a relationship between the logical pages and the unit areas; a control unit which writes data provided from the host system to one or more unit areas of the unit areas according to the relationship between the logical pages and the unit areas managed by the management unit; a first access unit which stores data held in one or more unit areas of the unit areas in the flash memory; a second access unit which reads data from the flash memories and write the read data to one or more unit areas of the unit areas; and a data transfer unit which transfers data from any one of the unit areas to another unit area of the unit areas; wherein first operations and second operations are performed in parallel, wherein the first operations are operations for the control unit to write first data to a first unit area which is any one of the unit areas, wherein the second operations are operations for the second access unit to read second data corresponding to the same logical page as first data from the flash memories and write the second data to a second unit area which is any one of the unit areas and different from the first unit area, wherein the data transfer unit performs data transfer between the first unit area and the second unit area so as to form data composed of the first data and a portion of the second data which is not replaced with the first data, and wherein the data transfer unit transfers the first data from the first unit area to the second unit area in a case where a total amount of the first data is smaller than a half amount of data corresponding one logical page, and transfers the second data from the second unit area to the first unit area in a case where a total amount of the first data equals or exceeds a half amount of data corresponding to one logical page.