MEMORY SYSTEM AND CONTROL METHOD OF THE SAME
First Claim
1. A memory system comprising:
- a nonvolatile memory including a plurality of blocks;
a volatile memory including a write buffer configured to temporarily store data designated by a write command received from a host; and
a controller electrically connected to the nonvolatile memory, and configured to;
write the data stored in the write buffer to a first block, the first block being included in the plurality of blocks;
execute a garbage collection when the number of free blocks in the nonvolatile memory is not greater than a first threshold value;
calculate a first number based on amounts of invalid data in a plurality of second blocks, the first number being a ratio of the number of copy destination blocks needed for the garbage collection to the number of blocks to which the data designated by the write command is written, the plurality of second blocks being included in the plurality of blocks;
determine whether the first number is greater than a second threshold value when an empty area exists in the first block and the controller receives a first command from the host, the first command being either a command for instructing preparation of power-off, or a command for requesting flushing the data stored in the write buffer to the nonvolatile memory;
perform fill-up processing for the first block by writing, to the empty area in the first block, at least one of unwritten data in the write buffer and data written to the nonvolatile memory, when the first number is not greater than the second threshold value; and
save the data written to the first block to a third block and write dummy data to the empty area of the first block, when the first number is greater than the second threshold value, the third block being included in the plurality of blocks.
5 Assignments
0 Petitions
Accused Products
Abstract
According to one embodiment, a memory system writes data to a first block, and executes a garbage collection when the number of free blocks is not greater than a first threshold value. The memory system calculates a first number which is a ratio of the number of copy destination blocks needed for the garbage collection to the number of blocks to which data designated by a write command is written. The memory system determines whether the first number is greater than a second threshold value when a first command is received from the host, and performs fill-up processing for the first block when the first number is not greater than the second threshold value.
-
Citations
20 Claims
-
1. A memory system comprising:
-
a nonvolatile memory including a plurality of blocks; a volatile memory including a write buffer configured to temporarily store data designated by a write command received from a host; and a controller electrically connected to the nonvolatile memory, and configured to; write the data stored in the write buffer to a first block, the first block being included in the plurality of blocks; execute a garbage collection when the number of free blocks in the nonvolatile memory is not greater than a first threshold value; calculate a first number based on amounts of invalid data in a plurality of second blocks, the first number being a ratio of the number of copy destination blocks needed for the garbage collection to the number of blocks to which the data designated by the write command is written, the plurality of second blocks being included in the plurality of blocks; determine whether the first number is greater than a second threshold value when an empty area exists in the first block and the controller receives a first command from the host, the first command being either a command for instructing preparation of power-off, or a command for requesting flushing the data stored in the write buffer to the nonvolatile memory; perform fill-up processing for the first block by writing, to the empty area in the first block, at least one of unwritten data in the write buffer and data written to the nonvolatile memory, when the first number is not greater than the second threshold value; and save the data written to the first block to a third block and write dummy data to the empty area of the first block, when the first number is greater than the second threshold value, the third block being included in the plurality of blocks. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A method for controlling a memory system comprising a volatile memory and a nonvolatile memory including a plurality of blocks, the method comprising:
-
temporarily storing, in a write buffer in the volatile memory, data designated by a write command received from a host; writing the data stored in the write buffer to a first block, the first block being included in the plurality of blocks; executing a garbage collection when the number of free blocks in the nonvolatile memory is not greater than a first threshold value; calculating a first number based on amounts of invalid data in a plurality of second blocks, the first number being a ratio of the number of copy destination blocks needed for the garbage collection to the number of blocks to which the data designated by the write command is written, the plurality of second blocks being included in the plurality of blocks; determining whether the first number is greater than a second threshold value, when an empty area exists in the first block and a first command is received from the host, the first command being either a command for instructing preparation of power-off, or a command for requesting flushing the data stored in the write buffer to the nonvolatile memory; performing fill-up processing for the first block by writing, to the empty area in the first block, at least one of unwritten data in the write buffer and data written to the nonvolatile memory, when the first number is not greater than the second threshold value; and saving the data written to the first block to a third block and writing dummy data to the empty area of the first block, when the first number is greater than the second threshold value, the third block being included in the plurality of blocks. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
-
Specification