A data programming method for a solid state drive is provided. The solid state drive has a flash memory with plural blocks. If a garbage collection is determined to be performed, a first open block is selected from the plural blocks of the flash memory for storing a moved valid data corresponding to the garbage collection. Then, the moved valid data corresponding to the garbage collection is programmed into the first open block. A second open block is selected from the plural blocks of the flash memory for storing a write data from a host.

Patent
   10055143
Priority
Nov 25 2015
Filed
Apr 14 2016
Issued
Aug 21 2018
Expiry
Jun 29 2036
Extension
76 days
Assg.orig
Entity
Large
2
28
currently ok
1. A data programming method for a solid state drive, the solid state drive having a flash memory with plural blocks and a buffer, the data programming method comprising steps of:
temporarily storing a valid data corresponding to a garbage collection in a first storage zone of the buffer when the garbage collection is determined to be performed during a data programming process issued by a host;
temporarily storing a write data from the host in a second storage zone of the buffer, wherein the first storage zone and the second storage zone are individual for respectively temporarily storing the valid data and the write data at the same time;
selecting a first open block and a second open block from the plural blocks of the flash memory, wherein the first open block and the second open block are simultaneously existed;
programming the valid data corresponding to the garbage collection into the first open block; and
programming the write data from the host into the second open block.
7. A solid state drive in communication with a host, the solid state drive comprising:
a controller determining whether to perform a garbage collection during a data programming process issued by the host;
a flash memory connected with the controller, and comprising plural blocks; and
a buffer;
wherein if the garbage collection is determined to be performed, a moved valid data corresponding to the garbage collection is temporarily stored in a first storage zone, and a write data from the host is temporarily stored in the second storage zone, wherein the first storage zone and the second storage zone are individual for respectively temporarily storing the valid data and the write data at the same time,
wherein the controller selects a first open block and a second open block from the plural blocks of the flash memory, programs the moved valid data corresponding to the garbage collection into the first open block, and programs the write data from the host into the second open block,
wherein the first open block and the second open block are simultaneously existed.
3. A data programming method for a solid state drive, the solid state drive having a flash memory with plural blocks, the data programming method comprising steps of: determining whether to perform a garbage collection during a data programming process issued by a host: if the garbage collection is determined to be performed during the data programming process, selecting a first open block from the plural blocks of the flash memory; and programming a moved valid data corresponding to the garbage collection into the first open block, wherein, during the data programming process, a second open block is selected from the plural blocks of the flash memory, and a write data from the host is programmed into the second open block, wherein the first open block and the second open block are simultaneously existed; and wherein the solid state drive further comprises a buffer, and the buffer comprises a first storage zone and a second storage zone, wherein the moved valid data corresponding to the garbage collection is temporarily stored in the first storage zone, and the write data from the host is temporarily stored in the second storage zone.
2. The data programming method as claimed in claim 1, wherein each of the plural blocks of the flash memory contains either the moved valid data corresponding to the garbage collection or the write data from the host.
4. The data programming method as claimed in claim 3, wherein each of the plural blocks of the flash memory contains either the moved valid data corresponding to the garbage collection or the write data from the host.
5. The data programming method as claimed in claim 3, wherein the moved valid data corresponding to the garbage collection and the write data from the host are respectively stored in different blocks of the flash memory.
6. The data programming method as claimed in claim 3, wherein if the garbage collection is determined to be performed and the write data from the host is received by the solid state drive, the data programming method further comprises a step of programming the write data from the host into the second open block.
8. The solid state drive as claimed in claim 7, wherein each of the plural blocks of the flash memory contains either the moved valid data corresponding to the garbage collection or the write data from the host.
9. The solid state drive as claimed in claim 7, wherein the moved valid data corresponding to the garbage collection and the write data from the host are respectively stored in different blocks of the flash memory.
10. The solid state drive as claimed in claim 7, wherein if the garbage collection is performed and the write data from the host is received by the solid state drive, the controller further programs the write data from the host into the second open block.

This application claims the benefit of People's Republic of China Application Serial No. 201510833643.9, filed Nov. 25, 2015, the subject matter of which is incorporated herein by reference.

The present invention relates to a solid state drive and a data programming method thereof, and more particularly to a solid state drive with a garbage collection function and a data programming method comprising the garbage collection.

As is well known, a solid state drive (SSD) is a data storage device that uses a non-volatile memory to store data. A NAND-based flash memory is one kind of the non-volatile memory. After data are written to the flash memory, if the system is powered off, the data are still retained in the flash memory.

FIG. 1 is a schematic functional block diagram illustrating a conventional solid state drive. As shown in FIG. 1, the solid state drive 10 comprises a controller 101, a buffer 107 and a flash memory 105. The controller 101 is in communication with the flash memory 105 and the buffer 107. In addition, the controller 101 is in communication with a host 12 through an external bus 20. Consequently, commands and data can be exchanged between the controller 101 and the host 12.

A process of programming write data from the host 12 into the flash memory 105 will be illustrated as follows. Firstly, the controller 101 performs an error correction (ECC) encoding operation on the write data, and then temporarily stores the write data into the buffer 107. Moreover, the controller 101 performs a program action at proper time in order to store the write data of the buffer 107 into the flash memory 105.

For example, the buffer 107 is a cache memory such as a static random access memory (SRAM) or a dynamic random access memory (DRAM). Generally, the external bus 20 is a USB bus, an IEEE 1394 bus, an SATA bus, or the like.

Generally, the flash memory 105 comprises plural blocks, for example 1024 blocks. Each block comprises plural pages, for example 64 pages. Each page is typically 4K bytes in size. Due to the inherent properties of the flash memory 105, at least one page is written during the program action, and the erase operation is performed in a block-wise fashion.

Generally, the host 12 accesses the flash memory 105 through logical block addresses (LBA). Each LBA can store data of 512 bytes in size. When the host 12 intends to program the write data into the flash memory 105, the host 12 may provide a write command and a corresponding LBA to the controller 101. Then, the write data is transmitted from the host 12 to the controller 101. The write data is temporarily stored in the buffer 107 by the controller 101.

For example, if one page of the flash memory 105 is 4K bytes in size, the data amount of eight LBAs is equal to the data amount of one page. As known, the flash memory 105 is programmed in a unit of at least one page. If the amount of data temporarily stored in the buffer 107 exceeds the data amount of one page, the controller 101 starts the program action and programs the data to the flash memory 105 in a unit of at least one page.

Moreover, the controller 101 selects one free block of the flash memory 105 as an open block. While the program action is performed, the data temporarily stored in the buffer 107 is programmed into the open block under control of the controller 101. After the open block is occupied by the data, the controller 101 will select another block as another open block and continuously program the data of the buffer 107 into this open block.

Since the erase operation of the flash memory 105 is performed in a block-wise fashion, the data is each page cannot be individually erased and updated. After an updated data is received by the flash memory 105, the updated data is stored in a new page (i.e., a blank page), and the original data in the old page is set as an invalid data. However, after the flash memory 105 has been accessed for a long time, each block of the flash memory 105 may contain some valid data and some invalid data. Consequently, the writable space of the flash memory 105 gradually decreases.

FIGS. 2A˜2C schematically illustrate a process of updating data of a conventional flash memory. It is assumed that the flash memory has five blocks (Block_1˜Block_5). Each block has four pages (Page_1˜Page_4).

As shown in FIG. 2A, the first block (Block_1) stores the data Data1˜Data4, and the second block (Block_2) stores the data Data5˜Data8.

For example, the host 12 intends to output the write data Data8′, Data2′, Data9, Data10, Data11, Data7′, Data12 and Data13 to the flash memory 105. The write data Data2′, Data7′ and Data8′ are updated data of the data Data2, Data7 and Data8, respectively. The write data Data9˜Data13 are new data.

Please refer to FIG. 2B. The controller 101 selects the third block (Block_3) as the open block, and programs the Data8′, Data2′, Data9 and Data10 into the third block (Block_3). As the third block (Block_3) is occupied by the data, the controller 101 selects the fourth block (Block_4) as the open block, and programs the data Data11, Data7′, Data12 and Data13 into the fourth block (Block_4). And then, the old data Data2, Data7 and Data8 will be considered as invalid data, which are indicated as oblique lines.

Then, the host 12 intends to output the write data Data14, Data3′, Data7″ and Data12′ to the flash memory 105. The write data Data3′, Data7″ and Data12′ are updated data of the data Data3, Data7′ and Data12, respectively. The write data Data14 is a new data.

Please refer to FIG. 2C. The controller 101 selects the fifth block (Block_5) as the open block, and programs the Data14, Data3′, Data7″ and Data12′ into the fifth block (Block_5). And then, the old data Data3, Data7′ and Data12 will be considered as invalid data, which are indicated as oblique lines.

From the above discussions, after many program actions, the flash memory 105 may contain a great number of invalid data. Consequently, the writable space of the flash memory gradually decreases. Moreover, the erase operation of the flash memory 105 can be performed in a block-wise fashion. Although the flash memory 105 as shown in FIG. 2C has many invalid data, some blocks still contain valid data. In other words, the block containing the valid data cannot be directly erased by the controlling unit 101.

As the number of free blocks in the flash memory 105 gradually decreases, it is necessary for the controller 101 of the solid state drive 10 to perform a garbage collection. After the garbage collection is performed, the storing space of the invalid data in the used blocks can be released. Consequently, the writable space of the flash memory 105 increases.

Generally, when the host 12 issues a write command, the write command may be determined as a sequential write command or a random write command according to the logical block address (LBA) from the host 12. For example, if the LBA in the write command is a consecutive logical block address, the write command from the host 12 is determined as the sequential write command. Moreover, according to the sequential write command, the write data from the host 12 is continuously stored into the flash memory 105. For example, the host 12 will continuously overwrite the flash memory 105 or continuously update the data. Hereinafter, the operations of the garbage collection of the conventional flash memory after the situation of FIG. 2C will be illustrated.

FIGS. 3A-3F schematically illustrate a data programming method comprising the garbage collection according to the prior art. For example, the controller 101 intends to release the storing space of the invalid data from the first block (Block_1) and the second block (Block_2). Please refer to FIG. 3A. The valid data Data1, Data4, Data5 and Data6 in the first block (Block_1) and the second block (Block_2) are moved to the buffer 107 by the controller 101. And then, the data Data1, Data4, Data5 and Data6 in the first block (Block_1) and the second block (Block_2) will be considered as invalid data, which are indicated as oblique lines.

While the valid data in the to-be-released blocks are moved by the controller 101, the write data from the host 12 may be continuously received by the buffer 107. In other words, the controller 101 can simultaneously perform the garbage collection and receive the write data from the host 12. As shown in FIG. 3A, the buffer 107 contains the valid data Data1, Data4, Data5 and Data6 of the first block (Block_1) and the second block (Block_2) and the write data Data15, Data16, Data17 and Data18 from the host 12. The write data Data15, Data16, Data17 and Data18 are sequential write data.

As shown in FIG. 3B, the controller 101 confirms that no valid data are contained in the first block (Block_1) and the second block (Block_2). Then, the controller 101 performs a block erase operation on the first block (Block_1) and the second block (Block_2). Consequently, the first block (Block_1) and the second block (Block_2) are erased as free blocks.

Then, as shown in FIG. 3C, the controller 101 performs the program action to program the data of the buffer 107 into the flash memory 105. Consequently, one programming procedure comprising the garbage collection is completed. That is, the controller 101 firstly selects the first block (Block_1) as the open block, and programs the data Data1, Data15, Data4 and Data16 into the first block (Block_1). Then, the controller 101 selects the second block (Block_2) as the open block, and programs the data Data17, Data5, Data6 and Data18 into the second block (Block_2).

While the controller 101 performs the programming procedure comprising the garbage collection, if the block to be erased contains the valid data and the invalid data, the controller 101 has to move the valid data from the block to the buffer 107, and the controller 101 has to receive the write data from the host 12 and temporarily store the write data into the buffer 107. In other words, while the controller 101 performs the programming procedure comprising the garbage collection, the moved valid data corresponding to the garbage collection and the write data from the host 12 are temporarily stored in the buffer 107 in an interlaced manner. Consequently, after the data in the buffer 107 are programmed to the open blocks of the flash memory 105 by the controller 101, the moved valid data corresponding to the garbage collection and the write data from the host 12 are stored into the first block (Block_1) and the second block (Block_2) in the interlaced manner.

Please refer to FIG. 3C again. If the storing space of the flash memory 105 is insufficient, the controller 101 has to re-perform the garbage collection in order to program the new or updated data. For example, the host 12 intends to program the write data Data15′, Data16′, Data17′ and Data18′ to the flash memory 105. The write data Data15′, Data16′, Data17′ and Data18′ are sequential write data. In addition, the write data Data15′, Data16′, Data17′ and Data18′ are updated data of the data Data15, Data16, Data17 and Data18, respectively. As shown in FIG. 3C, the old data Data15, Data16, Data17 and Data18 in the first block (Block_1) and the second block (Block_2) will be considered as the invalid data because these data have been updated. However, since the moved valid data corresponding to the garbage collection are still stored in the first block (Block_1) and the second block (Block_2), the controller 101 has to re-perform the garbage collection in order to move these valid data to the buffer 107. Then, the controller 101 will perform a block erase operation on the first block (Block_1) and the second block (Block_2).

The process of performing another garbage collection will be illustrated with reference to FIGS. 3D-3F. Firstly, as shown in FIG. 3D, the valid data Data1, Data4, Data5 and Data6 in the first block (Block_1) and the second block (Block_2) are moved to the buffer 107 by the controller 101. And then, the data Data1, Data4, Data5 and Data6 in the first block (Block_1) and the second block (Block_2) will be considered as invalid data, which are indicated as oblique lines.

Similarly, while the valid data in the to-be-released blocks are moved by the controller 101, the write data from the host 12 are continuously received by the buffer 107. As shown in FIG. 3D, the buffer 107 contains the valid data Data1, Data4, Data5 and Data6 of the first block (Block_1) and the second block (Block_2) and the write data Data15′, Data16′, Data17′ and Data18′ from the host 12. And then, the old data Data15, Data16, Data17 and Data18 in the first block (Block_1) and the second block (Block_2) will be considered as the invalid data because these data have been updated.

As shown in FIG. 3E, the controller 101 confirms that no valid data are contained in the first block (Block_1) and the second block (Block_2). Then, the controller 101 performs a block erase operation on the first block (Block_1) and the second block (Block_2). Consequently, the first block (Block_1) and the second block (Block_2) are erased as free blocks.

Then, as shown in FIG. 3F, the controller 101 performs the program action to program the data of the buffer 107 into the flash memory 105. Consequently, another programming procedure comprising the garbage collection is completed. That is, the controller 101 firstly selects the first block (Block_1) as the open block, and programs the data Data1, Data15′, Data16′ and Data4 into the first block (Block_1). Then, the controller 101 selects the second block (Block_2) as the open block, and programs the data Data17′, Data18′, Data5 and Data6 into the second block (Block_2).

Similarly, after the data in the buffer 107 are programmed to the open blocks of the flash memory 105 by the controller 101, the moved valid data corresponding to the garbage collection and the write data from the host 12 are stored into the first block (Block_1) and the second block (Block_2) in the interlaced manner (see FIG. 3F).

Please refer to FIG. 3F again. If the storing space of the flash memory 105 is insufficient and the host 12 intends to update or overwrite the sequential write data Data15′, Data16′, Data17′ and Data18′, the controller 101 has to re-perform the garbage collection and repeatedly move the valid data corresponding to the previous garbage collection. The procedures are similar to those mentioned above, and are not redundantly described herein.

FIG. 4 schematically illustrates the data storage conditions in the flash memory of the conventional solid state drive. According to the above data programming method, each of the blocks Block_1˜Block_n of the flash memory 105 may contain the moved valid data (GC) corresponding to the garbage collection and the write data (H) from the host 12 after the programming procedure comprising the garbage collection is completed many times.

For example, after the above data programming method, the data in the flash memory 105 of the conventional solid state drive 10 has the storage condition as shown in FIG. 4. If the host 12 issues a sequential write command, the controller 101 has to continuously re-perform the garbage collection and repeatedly move the valid data corresponding to the previous garbage collection. Consequently, free blocks are generated. Moreover, the open blocks also store the moved valid data (GC) corresponding to the garbage collection and the write data (H) from the host 12. Under this circumstance, the write speed of the solid state drive 10 decreases and fails to be effectively increased.

From the above discussions about the conventional data programming method, the moved valid data (GC) corresponding to the garbage collection and the write data (H) from the host 12 are stored in the flash memory 105 in the interlaced manner. Moreover, if the host 12 intends to update or overwrite the sequential write data, the controller 101 has to re-perform the garbage collection and repeatedly move the valid data corresponding to the previous garbage collection. Moreover, after the valid data in the to-be-released blocks are moved to the buffer 107, the controller 101 performs the block erase operation and programs the data into the flash memory 105. Moreover, since the buffer 107 still contains the valid data (GC) and the write data (H) in the interlaced manner, the valid data (GC) and the write data (H) are programmed into the open block in the interlaced manner.

During the sequential write process, the controller 101 has to continuously re-perform the garbage collection and repeatedly move the valid data corresponding to the previous garbage collection. Consequently, the write speed of the solid state drive 10 fluctuates between a high speed and a low speed. That is, the write speed cannot reach the desired level.

An embodiment of the present invention provides a data programming method for a solid state drive. The solid state drive has a flash memory with plural blocks. If a garbage collection is determined to be performed, a first open block is selected from the plural blocks of the flash memory for storing a moved valid data corresponding to the garbage collection. Then, the moved valid data corresponding to the garbage collection is programmed into the first open block. A second open block is selected from the plural blocks of the flash memory for storing a write data from a host.

Another embodiment of the present invention provides a solid state drive in communication with a host. The solid state drive includes a controller and a flash memory. The controller determines whether to perform a garbage collection. A flash memory is connected with the controller, and includes plural blocks. If the garbage collection is determined to be performed, the controller selects a first open block from the plural blocks of the flash memory for storing a moved valid data corresponding to the garbage collection, and programs the moved valid data corresponding to the garbage collection into the first open block. Moreover, a second open block is selected from the plural blocks of the flash memory for storing a write data from a host.

Numerous objects, features and advantages of the present invention will be readily apparent upon a reading of the following detailed description of embodiments of the present invention when taken in conjunction with the accompanying drawings. However, the drawings employed herein are for the purpose of descriptions and should not be regarded as limiting.

The above objects and advantages of the present invention will become more readily apparent to those ordinarily skilled in the art after reviewing the following detailed description and accompanying drawings, in which:

FIG. 1 (prior art) is a schematic functional block diagram illustrating a conventional solid state drive;

FIGS. 2A˜2C (prior art) schematically illustrate a process of updating data of a conventional flash memory;

FIGS. 3A˜3F (prior art) schematically illustrate a data programming method comprising the garbage collection of the conventional solid state drive;

FIG. 4 (prior art) schematically illustrates the data storage conditions in the flash memory of the conventional solid state drive;

FIG. 5 is a schematic functional block diagram illustrating a solid state drive according to an embodiment of the present invention;

FIGS. 6A˜6F schematically illustrate a data programming method comprising the garbage collection according to an embodiment of the present invention; and

FIG. 7 schematically illustrates the data storage conditions in the flash memory of the solid state drive according to an embodiment of the present invention.

FIG. 5 is a schematic functional block diagram illustrating a solid state drive according to an embodiment of the present invention. As shown in FIG. 5, the solid state drive 50 comprises a controller 501, a buffer 510 and a flash memory 505. The controller 501 is in communication with the flash memory 505 and the buffer 510. In addition, the controller 501 is in communication with a host 52 through an external bus 55. Consequently, commands and data can be exchanged between the controller 501 and the host 52.

In accordance with the present invention, the buffer 510 is divided into a first storage zone 512 and a second storage zone 514. The moved valid data (GC) corresponding to the garbage collection are temporarily stored in the first storage zone 512. The write data (H) from the host 52 are temporarily stored in the second storage zone 514.

Moreover, the controller 51 selects two free blocks of the flash memory 505, and defines the two free blocks as a first open block and a second open block. The first open block is used for storing the moved valid data (GC) corresponding to the garbage collection. The second open block is used for storing the write data (H) from the host 52. While the program action is performed, the valid data (GC) in the first storage zone 512 and the write data (H) in the second storage zone 514 are respectively stored into the first open block and the second open block of the flash memory 505 by the controller 501. After the first open block is programmed and is full, the controller 501 selects an additional first open block from the flash memory 505 to store the valid data (GC). Similarly, after the second open block is programmed and is full, the controller 501 selects an additional second open block from the flash memory 505 to store the write data (H).

Since the moved valid data (GC) corresponding to the garbage collection and the write data (H) from the host 52 are programmed into different open blocks by the controller 501, the valid data (GC) and the write data (H) are not simultaneously contained in the same block. Under this circumstance, the write speed of the solid state drive 50 is enhanced.

FIGS. 6A˜6F schematically illustrate a data programming method comprising the garbage collection according to an embodiment of the present invention. Hereinafter, the operations of the garbage collection of the present invention after the situation of FIG. 2C will be illustrated. If the storing space of the flash memory is insufficient, the controller 501 performs the garbage collection in order to release storing space to program the new data.

Please refer to FIG. 6A. The valid data Data1, Data4, Data5 and Data6 in the first block (Block_1) and the second block (Block_2) are moved to the first storage zone 512 of the buffer 510 by the controller 501. And then, the data Data1, Data4, Data5 and Data6 in the first block (Block_1) and the second block (Block_2) will be considered as invalid data, which are indicated as oblique lines.

Similarly, while the valid data in the to-be-released blocks are moved from the flash memory 505 by the controller 501, the write data from the host 52 are continuously received by the controller 501 and stored into the buffer 510. In other words, the controller 501 can simultaneously perform the garbage collection and receive the write data from the host 52. As shown in FIG. 6A, the moved valid data Data1, Data4, Data5 and Data6 corresponding to the garbage collection are stored in the first storage zone 512 of the buffer 510, and the write data Data15, Data16, Data17 and Data18 from the host 52 are stored in the second storage zone 514 of the buffer 510. The write data Data15, Data16, Data17 and Data18 are sequential write data.

As shown in FIG. 6B, the controller 501 confirms that no valid data are contained in the first block (Block_1) and the second block (Block_2). Then, the controller 501 performs a block erase operation on the first block (Block_1) and the second block (Block_2). Consequently, the first block (Block_1) and the second block (Block_2) are erased as free blocks.

Then, as shown in FIG. 6C, the controller 501 performs the program action to program the data of the buffer 510 into the flash memory 505. Consequently, one programming procedure comprising the garbage collection is completed. That is, the controller 501 selects the first block (Block_1) as the first open block, and programs the moved valid data Data1, Data4, Data5 and Data6 into the first block (Block_1). And, the controller 501 selects the second block (Block_2) as the second open block, and programs the write data Data15, Data16, Data17 and Data18 into the second block (Block_2).

Obviously, the all data in the first block (Block_1) are the moved valid data (GC) corresponding to the garbage collection, and all data in the second block (Block_2) are the write data (H) from the host 52.

Please refer to FIG. 6C again. If the storing space of the flash memory 505 is insufficient, the controller 501 performs the garbage collection in order to program the new or updated data into the flash memory 505. For example, the host 52 intends to program the write data Data15′, Data16′, Data17′ and Data18′ to the flash memory 505. The write data Data15′, Data16′, Data17′ and Data18′ are sequential write data. Moreover, the write data Data15′, Data16′, Data17′ and Data18′ are updated data of the write data Data15, Data16, Data17 and Data18, respectively.

After the previous programming procedure comprising the garbage collection is performed, the moved valid data corresponding to the garbage collection are all stored in the first open block, i.e., the first block (Block_1). And, the second open block, i.e., the second block (Block_2), only stores the write data Data15, Data16, Data17 and Data18 from the host 52 but does not store the moved valid data corresponding to the garbage collection. Since the old data Data15, Data16, Data17 and Data18 in the second block (Block_2) are considered as the invalid data because these data have been updated, the controller 501 can directly perform a block erase action on the second block (Block_2) to acquire the storing space. Under this circumstance, it is not necessary to move the valid data.

The process of performing another garbage collection will be illustrated with reference to FIGS. 6D-6F. Firstly, as shown in FIG. 6D, the write data Data15′, Data16′, Data17′ and Data18′ from the host 52 are temporarily stored into the second storage zone 514 of the buffer 510. Meanwhile, the old data Data15, Data16, Data17 and Data18 in the second block (Block_2) will be considered as the invalid data, which are indicated as oblique lines. As shown in FIG. 6E, the controller 501 confirms that no valid data are contained in the second block (Block_2). Then, the controller 501 performs a block erase operation on the second block (Block_2). Consequently, the second block (Block_2) is erased as a free block.

Then, as shown in FIG. 6F, the controller 501 performs the program action to program the data of the buffer 510 into the flash memory 505. Consequently, another programming procedure comprising the garbage collection is completed. That is, the controller 501 selects the second block (Block_2) as the second open block, and programs the write data Data15′, Data16′, Data17′ and Data18′ into the second block (Block_2). In this programming procedure comprising the garbage collection, it is not necessary to repeatedly move the valid data corresponding to the previous garbage collection. Since the block erase operation is directly performed, the write speed of the solid state drive 50 is not reduced.

From the above descriptions, the present invention provides a solid state drive and a data programming method. The controller selects two free blocks as the first open block and the second open block. The first open block is used for storing the moved valid data (GC) corresponding to the garbage collection. The second open block is used for storing the write data (H) from the host. Moreover, the buffer is divided into a first storage zone and a second storage zone. The moved valid data (GC) corresponding to the garbage collection are temporarily stored in the first storage zone. The write data (H) from the host are temporarily stored in the second storage zone.

FIG. 7 schematically illustrates the data storage conditions in the flash memory of the solid state drive according to an embodiment of the present invention. As shown in FIG. 7, each of the blocks Block_1˜Block_n of the flash memory 505 contains either the moved valid data (GC) corresponding to the garbage collection or the write data (H) from the host after the programming procedure comprising the garbage collection is completed many times. That is, the moved valid data (GC) and the write data (H) are not simultaneously contained in the same block.

Moreover, if the storing space of the flash memory 505 is insufficient and the host 52 intends to update or overwrite the sequential write data, the block of the flash memory 505 storing the write data (H) has higher probability of being completely occupied by invalid data because the block of the flash memory 505 storing the write data (H) does not have the moved valid data (GC) corresponding to the garbage collection. Under this circumstance, the controller 501 does not need to repeatedly move the valid data and perform the program action. After the block completely occupied by invalid data is erased, the controller 501 may set the erased free block as the second open block and directly program the write data into the second open block.

While the invention has been described in terms of what is presently considered to be the most practical and preferred embodiments, it is to be understood that the invention needs not be limited to the disclosed embodiment. On the contrary, it is intended to cover various modifications and similar arrangements included within the spirit and scope of the appended claims which are to be accorded with the broadest interpretation so as to encompass all such modifications and similar structures.

Hung, Min-I, Lin, Liang-You, Peng, Yu-Chuang, Pan, Ya-Ping

Patent Priority Assignee Title
11860777, Oct 15 2019 Samsung Electronics Co., Ltd. Storage device and a garbage collection method thereof
12061814, Jan 25 2021 Pure Storage, Inc. Using data similarity to select segments for garbage collection
Patent Priority Assignee Title
7444462, Sep 28 2006 SanDisk Technologies LLC Methods for phased garbage collection using phased garbage collection block or scratch pad block as a buffer
8990480, Mar 15 2012 Kioxia Corporation Semiconductor memory device and computer program product
9342458, Feb 28 2013 International Business Machines Corporation Cache allocation in a computerized system
20080034175,
20080129740,
20100082890,
20100217927,
20110022778,
20110029749,
20110153911,
20110246821,
20120054414,
20120084489,
20120151124,
20120173795,
20120284587,
20120290769,
20130019057,
20130103889,
20130132647,
20130151892,
20130166818,
20140019670,
20140029341,
20140122774,
20140189209,
20140281338,
20150261797,
////////////
Executed onAssignorAssigneeConveyanceFrameReelDoc
Apr 07 2016PAN, YA-PINGLite-On Technology CorporationASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS 0382840190 pdf
Apr 07 2016PENG, YU-CHUANGLite-On Technology CorporationASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS 0382840190 pdf
Apr 07 2016LIN, LIANG-YOULite-On Technology CorporationASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS 0382840190 pdf
Apr 07 2016HUNG, MIN-ILite-On Technology CorporationASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS 0382840190 pdf
Apr 07 2016PAN, YA-PINGLITE-ON ELECTRONICS GUANGZHOU LIMITEDASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS 0382840190 pdf
Apr 07 2016PENG, YU-CHUANGLITE-ON ELECTRONICS GUANGZHOU LIMITEDASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS 0382840190 pdf
Apr 07 2016LIN, LIANG-YOULITE-ON ELECTRONICS GUANGZHOU LIMITEDASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS 0382840190 pdf
Apr 07 2016HUNG, MIN-ILITE-ON ELECTRONICS GUANGZHOU LIMITEDASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS 0382840190 pdf
Apr 14 2016Lite-On Technology Corporation(assignment on the face of the patent)
Apr 14 2016LITE-ON ELECTRONICS (GUANGZHOU) LIMITED(assignment on the face of the patent)
Dec 04 2019Lite-On Technology CorporationSOLID STATE STORAGE TECHNOLOGY CORPORATIONASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS 0512130824 pdf
Dec 04 2019LITE-ON ELECTRONICS GUANGZHOU LIMITEDSOLID STATE STORAGE TECHNOLOGY CORPORATIONASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS 0512130824 pdf
Date Maintenance Fee Events
Dec 07 2021M1551: Payment of Maintenance Fee, 4th Year, Large Entity.


Date Maintenance Schedule
Aug 21 20214 years fee payment window open
Feb 21 20226 months grace period start (w surcharge)
Aug 21 2022patent expiry (for year 4)
Aug 21 20242 years to revive unintentionally abandoned end. (for year 4)
Aug 21 20258 years fee payment window open
Feb 21 20266 months grace period start (w surcharge)
Aug 21 2026patent expiry (for year 8)
Aug 21 20282 years to revive unintentionally abandoned end. (for year 8)
Aug 21 202912 years fee payment window open
Feb 21 20306 months grace period start (w surcharge)
Aug 21 2030patent expiry (for year 12)
Aug 21 20322 years to revive unintentionally abandoned end. (for year 12)