P
USRE46404EExpiredUtilityPatentIndex 51

Flash memory management method

Assignee: SAMSUNG ELECTRONICS CO LTDPriority: Jun 4, 2001Filed: Feb 23, 2015Granted: May 16, 2017
Est. expiryJun 4, 2021(expired)· nominal 20-yr term from priority
Inventors:KIM BUM-SOOLEE GUI-YOUNGKIM JONG MININ JI-HYUNKIM JE-SUNGNOH SAM HYUKMIN SANG LYULLEE DONG HEEJEONG JAE-YONGCHO YOO-KUNCHOI JONG MOO
G06F 13/4239G06F 12/0246G06F 2212/7203G06F 3/0679G06F 2212/2022G06F 12/00
51
PatentIndex Score
0
Cited by
41
References
37
Claims

Abstract

A flash memory management method is provided. According to the method, when a request to write the predetermined data to a page to which data has been written is made, the predetermined data is written to a log block corresponding to a data block containing the page. When a request to write the predetermined data to the page again is received, the predetermined data is written to an empty free page in the log block. Even if the same page is requested to be continuously written to, the management method allows this to be processed in one log block, thereby improving the effectiveness in the use of flash memory resources.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
       1. A method for writing predetermined data to a flash memory, the method comprising the steps of:
 (a) receiving a request to write the predetermined data to a page to which data has been written;   (b) writing the predetermined data to a log block corresponding to a data block containing the page;   (c) receiving a request to write the predetermined data to the page again; and   (d) writing the predetermined data to an empty free page in the log block.   
     
     
       2. The method of  claim 1 , wherein the step (b) comprises the step (b11) of writing the predetermined data to an empty free page. 
     
     
       3. The method of  claim 1 , wherein the step (b) comprises the steps of:
 (b21) allocating the log block; and   (b22) writing the predetermined data to an empty page at the same position as the requested page in the data block.   
     
     
       4. The method of  claim 1 , wherein the data block is configured to store data and the log block is configured to store data which has been modified. 
     
     
       5. A method for writing predetermined data to a flash memory, the method comprising the steps of:
 (a) receiving a request to write the predetermined data to a page;   (b) allocating a log block  1 - 1  corresponding to a first data block containing the page;   (c) writing the predetermined data to an empty page in the log block  1 - 1 ;   (d) receiving a request to write the predetermined data to the page again; and   (e) writing the predetermined data to an empty free page in the log block  1 - 1 .   
     
     
       6. The method of  claim 5 , wherein the step (b) comprises the steps of:
 (b1) performing a block merge to create a third data block based on a second data block and a second log block corresponding to the second data block; and   (2) allocating a free block obtained by performing an erase operation on the second data block as the log block  1 - 1 .   
     
     
       7. The method of  claim 6 , wherein the step (b1) is performed when a free block to be allocated as the log block  1 - 1  does not exist. 
     
     
       8. The method of  claim 6 , wherein the step (b1) is performed when all pages of the existing log block corresponding to the first data block have been used. 
     
     
       9. The method of  claim 6 , wherein the step (b1) comprises the step of (b11) performing a switch merge to change the second log block to the third data block when pages of the second log block are arranged in the same order that pages of the second data block are arranged, and the pages of the second log block correspond one-to-one to the pages of the second data block. 
     
     
       10. The method of  claim 6 , wherein the step (b1) comprises the step of (b12) performing a copy merge to copy corresponding pages of the second data block to free pages in the second log block and create the third data block when the pages in the second log block are requested to be written only once. 
     
     
       11. The method of  claim 6 , wherein the step (b1) comprises the step of (13) performing a simple merge to copy the latest pages in the second log block to free pages of a free block to which data has not been written and copy a corresponding page of the second data block to the remaining free pages thereof, thereby creating the third data block. 
     
     
       12. The method of  claim 5 , wherein thestep (e) comprises the steps of:
 (e1) allocating a new log block  1 - 2  if a free page does not exist in the log block  1 - 1  and   (e2) writing the predetermined data to a free page in the log block  1 - 2 .   
     
     
       13. The method of  claim 12 , wherein the step (e1) comprises the steps of:
 (e11) performing a switch merge to change the log block to a second data block when pages of the log block  1 - 1  are arranged in the order in which 5 pages of the first data block are arranged and the pages of the log block  1 - 1  correspond one-to-one to the pages of the first data block, and   (e12) allocating a free block obtained by performing an erase operation on the first data block as the log block  1 - 2 .   
     
     
       14. The method of  claim 12 , wherein the step (e1) comprises the steps of: (e21) performing a copy merge to copy corresponding pages in the first data block to a free page in the log block  1 - 1  when pages in the log block  1 - 1  are requested to be written only once; and
 (e22) allocating a free block obtained by performing an erase operation on the first data block as the log block  1 - 2 . 
 
     
     
       15. The method of  claim 12 , wherein the step (e1) comprises the steps of:
 (e31) performing a simple merge to copy the latest pages in the log block  1 - 1  to free pages of a free block and copy a corresponding page of the first data block to the remaining free pages thereof, thereby creating a second data block; and   (e32) allocating a free block obtained by performing an erase operation on the first data block or the log block  1 - 1  as the log block  1 - 2 .   
     
     
       16. The method of  claim 12 , wherein the step (e2) comprises the step of (e21) writing the predetermined data to a free page at the same position as the requested page in the data block. 
     
     
       17. The method of  claim 5 , wherein the first data block is configured to store data and the log block  1 - 1  is configured to store data which has been modified. 
     
     
       18. A method of operating a nonvolatile memory including a plurality of memory blocks each of which is a minimum unit of erase, the method comprising:
 receiving a first update request for instructing to write second data to a first logical address corresponding to a first page, to which first data has been written, among a plurality of pages of a first data block;   in response to the first update request, writing the second data to a first free page of a first log block corresponding to the first data block;   receiving a second update request instructing to write third data to the first logical address;   if no second free page for the third data exists in the first log block and no free block which is allocatable as a second log block exists, processing a second data block including invalid data as an erasable block so as to create a first free block; and   allocating the first free block as the second log block and writing the third data to a third free page of the second log block,   wherein each of the plurality of memory blocks is allocatable as one of a data block, a log block, a free block, and an erasable block.    
     
     
       19. The method of claim 18, further comprising, if the second free page exists in the first log block, writing the third data to the second free page of the first log block.  
     
     
       20. The method of claim 18, wherein the processing the second data block as the erasable block so as to create the first free block comprises performing a switch merge to switch a third log block corresponding to the second data block to the second data block.  
     
     
       21. The method of claim 18, wherein the processing the second data block as the erasable block so as to create the first free block comprises performing a copy merge to copy valid data of the second data block to a free page of the third log block corresponding to the second data block.  
     
     
       22. The method of claim 18, wherein the processing the second data block as the erasable block so as to create the first free block comprises performing a simple merge to copy valid data of the second data block and valid data of a third log block corresponding to the second data block, to the third data block.  
     
     
       23. The method of claim 18, wherein the processing the second data block as the erasable block so as to create the first free block comprises:
 writing to a plan log a type of a block merge performed to process the second data block as an erasable block and information about a block transitioned from the second data block; and   updating recovery information including at least one of a data block list, a free block list, an erasable block list, and a log block list of the nonvolatile memory based on the plan log.    
     
     
       24. The method of claim 23, further comprising, when the nonvolatile memory is initialized, performing a recovery operation on the nonvolatile memory based on the recovery information.  
     
     
       25. The method of claim 24, wherein the performing the recovery operation comprises:
 checking a first free page of a check point region in which the recovery information is stored; and   if data exists in the first free page of the check point region, determining that an operation of the nonvolatile memory is stopped during update of the recovery information.    
     
     
       26. The method of claim 24, wherein the performing the recovery operation comprises:
 if data of at least one of pages of a block transitioned from the second data block is not valid, determining that an operation of the nonvolatile memory is stopped during the block merge with respect to the second data block; and   performing a block merge with respect to the second data block again.    
     
     
       27. The method of claim 24, further comprising updating address conversion information due to the block merge of the second data block in a map region of the nonvolatile memory, wherein the performing the recovery operation comprises:
 comparing a logical address of each of pages scanned from the block transitioned from the second data block and address conversion information of the map region;   if the logical address of each of the scanned pages is different from the address conversion information of the map region, determining that an operation of the nonvolatile memory is stopped during update of the address conversion information; and   updating the address conversion information based on the logical address of each of the scanned pages.    
     
     
       28. The method of claim 24, wherein the processing the second data block as the erasable block so as to create the first free block comprises erasing the second data block so as to create the first free block,
 wherein the performing of a recovery operation comprises:   if data is written to at least one page of the second data block, determining that an operation of the nonvolatile memory is stopped during erase of the second data block; and   performing an erase with respect to the second data block again.    
     
     
       29. The method of claim 18, further comprising:
 in response to the first update request, if the first log block is not allocated and no free block that is allocatable as the first log block exists, processing a fourth data block among the data blocks as an erasable block so as to create a second free block; and   allocating the second free block as the first log block.    
     
     
       30. The method of claim 18, further comprising, in response to the first update request or the second update request, updating a logical address of the first data block, a physical address of the first log block or the second log block, and a log pointer table including an offset value of a page written in the first log block or the second log block.  
     
     
       31. The method of claim 30, further comprising:
 receiving a request for reading the first logical address; and   in response to the request for reading, accessing one of the first data block, the first log block, and the second log block by referring to the log pointer table.    
     
     
       32. A method of operating a nonvolatile memory including a plurality of memory blocks each of which is allocatable as one of a data block, a log block, a free block, and an erasable block, the method comprising:
 receiving a first update request for instructing to write second data to a first logical address corresponding to a first page, to which first data is written, among a plurality of pages of a first data block;   if no first log block corresponding to the first data block exists, processing a second data block including invalid data as an erasable block so as to create a first free block;   allocating the first free block as the first log block and writing the second data to a first free page of the first log block;   receiving a second update request for instructing to write third data to the first logical address; and   in response to the second update request, if a second free page of the first log block exists, writing the third data to a second free page of the first log block.    
     
     
       33. The method of claim 32, further comprising:
 if the second free page for the third data does not exist in the first log block and no free block that is allocatable as a second log block exists, processing a third data block including invalid data as the erasable block so as to create a second free block; and   allocating the second free block as the second log block and writing the third data to a third free page of the second log block.    
     
     
       34. The method of claim 32, wherein the processing the second data block as the erasable block so as to create the first free block comprises performing one of a switch merge to switch a third log block corresponding to the second data block to the second log block, a copy merge to copy valid data of the second data block to a free page of a third log block, and a simple merge to copy valid data of the second data block and valid data of the third log block to a fourth data block.  
     
     
       35. The method of claim 32, wherein the processing the second data block as the erasable block so as to create the first free block comprises:
 writing to a plan log a type of a block merge performed to process the second data block as an erasable block and information about a block transitioned from the second data block; and   updating recovery information including at least one of a data block list, a free block list, an erasable block list, and a log block list of the nonvolatile memory based on the plan log.    
     
     
       36. A method of operating a nonvolatile memory including a plurality of memory blocks which are allocatable as one of data blocks, log blocks corresponding to the data blocks, free blocks, and erasable blocks, the method comprising:
 receiving a first update request for instructing to write second data to a first logical address corresponding to a first page, to which first data is written, among a plurality of pages of a first data block;   in response to the first update request, writing the second data to a first free page of a first log block corresponding to the first data block;   receiving a second update request for instructing to write third data to the first logical address;   if no second free page for the third data exists in the first log block and no free block that is allocatable as a second log block exists, processing a second data block including invalid data as an erasable block so as to create a first free block; and   creating recovery information corresponding to a block merge performed to process the second data block as an erasable block.    
     
     
       37. The method of claim 36, wherein the creating the recovery information comprises:
 writing to a plan log a type of the block merge performed to process the second data block as the erasable block and information about a block transitioned from the second data block; and   updating the recovery information including at least one of a data block list, a free block list, an erasable block list, and a log block list of the nonvolatile memory based on the plan log.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.