IP Library Granted Patent US 8,626,987
Granted Patent B2
US 8,626,987 · App. 12/912,997 · Granted Jan 7, 2014

Flash memory system and defragmentation method

Inventors: Dawoon Jung (Hwaseong-si, KR); Moon Sang Kwon (Seoul, KR); Dong Jun Shin (Hwaseong-si, KR)
Assignee: Samsung Electronics Co., Ltd.
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,626,987
App. No.
12/912,997
Granted
Jan 7, 2014
Kind
B2
Abstract

Provided is a flash memory system supporting flash defragmentation. The flash memory system includes a host and a flash storage device. In response to a flash defragmentation command by the host, the flash storage device performs flash defragmentation by grouping fragments stored in fragmented blocks of a flash memory on a flash memory management unit basis. The flash memory management unit may be a memory block or page. The flash storage device performs the flash defragmentation regardless of the arrangement order of fragmented files stored in the flash memory.

Claims (40)

1. A method of defragmenting a flash memory operated under the control of a host, the flash memory being arranged in a plurality of blocks including a free block and a plurality of fragmented blocks respectively storing at least one fragment, the method comprising:

identifying a plurality of fragments stored in the plurality of fragmented blocks according to corresponding logical addresses;

converting the logical addresses to corresponding physical addresses using a flash translation layer (FTL);

using the physical addresses, reading a subset of fragments in the plurality of fragments from at least one of the plurality of fragmented blocks;

grouping the subset of fragments in a defragmentation region having a size defined by a flash management unit in response to a defragmentation command by the host;

writing the grouped subset of fragments to the free block,

wherein the reading and the grouping of the subset of fragments are performed regardless of an arrangement order of the plurality of fragments as stored in the flash memory; and

setting the defragmentation region according to a defragmentation size, a defragmentation start sector and a number of sectors provided by the host.

2. The method of claim 1 , wherein the flash management unit is equal in size to a single block in the plurality of blocks.

3. The method of claim 1 , wherein the logical addresses are defined by sector addresses compatible with a data storage method used with a hard disk drive (HDD).

4. The method of claim 1 , further comprising:

creating at least one new free block from at least one of the fragmented blocks following writing of the grouped subset of fragments to the free block.

5. The method of claim 4 , wherein the converting of the logical addresses into the corresponding physical addresses using the FTL is performed with reference to a mapping table managed by the FTL, the method further comprising:

updating the mapping table following writing of the grouped subset of fragments to the free block; and

updating the mapping table following creation of the new free block.

6. The method of claim 5 , wherein the host comprises an application and a file system, and the method further comprises:

by operation of the application and the file system, defining systems files in relation to the logical addresses, and

updating the file system following each updating of the mapping table.

7. The method of claim 6 , further comprising:

by operation of the file system, identifying a number of fragmented blocks;

comparing the number of fragmented blocks to a fragmented block threshold; and

only if the number of fragmented blocks exceeds the fragmented block threshold, executing the method of defragmenting the flash memory.

8. The method of claim 7 , further comprising after the updating the system files:

identifying an updated number of fragmented blocks;

comparing the updated number of fragmented blocks to the fragmented block threshold; and

if the updated number of fragmented blocks still exceeds the fragmented block threshold, continue execution of the method of defragmenting the flash memory, or if the updated number of fragmented blocks does not exceed the fragmented block threshold, ending the method of defragmenting the flash memory.

9. The method of claim 1 , wherein the host further comprises a host memory used as the grouping memory.

10. A method of defragmenting a flash memory, the flash memory being arranged in a plurality of blocks including a free block and a plurality of fragmented blocks storing a plurality of fragments, and the method comprising:

managing a mapping table correlating externally applied logical addresses with physical addresses for the flash memory using a flash translation layer (FTL);

identifying the plurality of fragmented blocks and a plurality of fragments stored in the plurality of fragmented blocks;

reading a subset of fragments in a defragmentation region among the plurality of fragments without regard to an arrangement order of the plurality of fragments as stored in the fragmented blocks in response to a defragmentation command by a host, and writing the subset of fragments in the free block; and

setting the defragmentation region according to a defragmentation size, a defragmentation start sector and a number of sectors provided by the host.

11. The method of claim 10 , further comprising:

updating the mapping table following the writing of the subset of fragments in the free block.

12. The method of claim 10 , further comprising:

performing a data invalidity operation on one of the fragmented blocks from which at least one fragment was read during the flash defragmentation operation to thereby convert the one fragmented memory block to a new free block.

13. The method of claim 12 , further comprising:

updating the mapping table following the data invalidity operation.

14. The method of claim 10 , wherein the logical addresses are defined by sector addresses compatible with a data storage method used with a hard disk drive (HDD).

15. The method of claim 10 , wherein the identifying of the plurality of fragmented blocks and the plurality of fragments stored in the plurality of fragmented blocks is performed with reference to the mapping table.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 28, 2010
From: JUNG, DAWOON; KWON, MOON SANG; SHIN, DONG JUN
To: SAMSUNG ELECTRONICS CO., LTD.
Reel/Frame 025208/0539 →
Priority Claims (1)
KR 10-2010-0042077 · May 4, 2010 · national
Continuity (2)
Provisional Application 61255119 · Oct 27, 2009
Related Publication 20110099326A1 · Apr 28, 2011